
In Progress
Posted
Paid on delivery
### html source ### <--- Start ---> <script> $(document).ready(function() { $('.datepicker').datepicker({ monthNames: ['1','2','3','4','5','6','7','8','9','10','11','12'], dayNames: ['sun','mon','tue','wed','thu','fri','sat'], dateFormat:'yy-mm-dd', showMonthAfterYear: true, yearSuffix: 'year', monthSuffix: 'month', }); $('.datepicker').on('focus', function() { $(this).siblings(".floating_label").addClass("on"); }); $('.tabs a').click(function(e) { [login to view URL](); $('.tabs a').removeClass('active'); $(this).addClass('active'); }); }); </script> <div> total : <span id="total"></span> </div> <script> jQuery(document).ready(function(){ jQuery('.sum').click(function(){ var total = 0; jQuery('.sum:checked').each(function(){ total += parseInt(jQuery(this).val()); }); jQuery('#total').text(total); }); }); </script> <!-- One way/round trip --> <select id="m4r1InfoMrO" name="m4r1InfoMrO"> <option value="1">1</option><!-- one way --> <option value="2">2</option><!-- round trip --> </select> <br /><br /> <!-- 9 seats --> <select id="m4r1InfoMrP" name="m4r1InfoMrP"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <br /><br /> <!-- 15 seats --> <select id="m4r1InfoMrS" name="m4r1InfoMrS"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <br /><br /> <!-- 25 seats --> <select id="m4r1InfoMrJ" name="m4r1InfoMrJ"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <br /><br /> <!-- 45 seats --> <select id="m4r1InfoMrK" name="m4r1InfoMrK"> <option value="0">0</option> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> </select> <br /><br /> <!-- distance --> <select id="m4r1InfoMrD" name="m4r1InfoMrD"> <option value="100">100</option> <option value="125">125</option> <option value="150">150</option> <option value="175">175</option> </select> <div class=""> <input type="text" id="departure" name="" required class="datepicker" readonly> <label class="floating_label"><span class="ico_necessary"><span class="blind">Departure</label> </div> <div class=""> <input type="text" id="arrival" name="" required class="datepicker" readonly> <label class="floating_label"><span class="ico_necessary"><span class="blind">Arrival</label> </div> <input id="m4r1InfoMrPS"> <script type="text/javascript"> var m4r1InfoMrP = [login to view URL]("m4r1InfoMrP"), m4r1InfoMrPValue = [login to view URL]; var m4r1InfoMrS = [login to view URL]("m4r1InfoMrS"), m4r1InfoMrSValue = [login to view URL]; var m4r1InfoMrD = [login to view URL]("m4r1InfoMrD"), m4r1InfoMrDValue = [login to view URL]; var m4r1InfoMrJ = [login to view URL]("m4r1InfoMrJ"), m4r1InfoMrJValue = [login to view URL]; var m4r1InfoMrK = [login to view URL]("m4r1InfoMrK"), m4r1InfoMrKValue = [login to view URL]; var m4r1InfoMrO = [login to view URL]("m4r1InfoMrO"), m4r1InfoMrOValue = [login to view URL]; // [login to view URL] = () => calculate(); [login to view URL] = () => calculate(); [login to view URL] = () => calculate(); [login to view URL] = () => calculate(); [login to view URL] = () => calculate(); [login to view URL] = () => calculate(); // function calculate() { m4r1InfoMrPValue = [login to view URL]; m4r1InfoMrSValue = [login to view URL]; m4r1InfoMrDValue = [login to view URL]; m4r1InfoMrJValue = [login to view URL]; m4r1InfoMrKValue = [login to view URL]; m4r1InfoMrOValue = [login to view URL]; // var sum = 0; var a = +m4r1InfoMrPValue; var b = +m4r1InfoMrSValue; var c = m4r1InfoMrDValue; var f = +m4r1InfoMrJValue; var g = +m4r1InfoMrKValue; var e = +m4r1InfoMrOValue; sum = (a + b + c) * e; [login to view URL]("m4r1InfoMrPS").value = sum; } calculate() </script> <--- End ---> ### php value ### <--- Start ---> Car type = $document->category1 == 'value' peak season, low season = $document->category2 == 'value' car distance&price = $document->title, $document->option->distance_price <--- End ---> # php data print sample # <?php foreach($results as $item):?> <?php $document = new KBContent(); $document->initWithUID($item->uid); ?> <?php if($document->category1 == '9seat' && $document->category2 == 'peakseason'):?> <option value="<?php echo $document->title?>-<?php echo $document->option->distance_price?>"><?php echo $document->title?>--<?php echo $document->option->distance_price?></option> <?php endif?> <?php endforeach?> # # # # # ##### How to calculate the final result ##### ex. peak season = 5 ~ 9 / low season = 1 ~ 4, 10 ~ 12 * peak season vs seats&price 9 seats & distance 150 = 220,000 / 15 seats & distance 150 = 350,000 / 25 seats & diistance 150 = 550,000 * low season vs seats&price 9 seats & distance 150 = 160,000 / 15 seats & distance 150 = 210,000 / 25 seats & diistance 150 = 390,000 !!! select data = 'Round trip' , distance 150 , 9 seats x 2 , 15 seats x 1 , departure date : 2025-09-20, arrival date = 2025-10-03 !!! Expected result (220,000 x 2) + (350,000 x 1) + (160,000 x 2) + (210,000 x 1) = 1,320,000 Please complete the cording so that it can be calculated as expected.
Project ID: 38738410
50 proposals
Remote project
Active 2 yrs ago
Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs