EVOLUTION-NINJA
Edit File: report_status_details.php
<?php echo view('includes/header');?> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/admin_dashboard/css/jquery-ui.css');?>"> <script src="<?php echo base_url('public/assets/js/jquery-ui.js');?>"></script> <section class="content-header"> <?php ?> <h1> Site Details<span style="float: right; color:red;"><?php if(!empty($bookin_details)){ if($bookin_details->booking_status == "CANCELLED" || $bookin_details->booking_status == "REFUNDED" ){ echo $bookin_details->booking_status;} }?></span></h1> <div class="rowland_owner_a" style="padding-bottom:20px; padding-top:10px;"> <!-- <label class="col-sm-4">Payment mode</label>--> <div class="col-sm-12 col-md-5"> <label class="radio-inline booked_sites"><input type="radio" value="cancelled" onclick="bookeddetails()" id="cancelled" name="site_type">Booked </label> <label class="radio-inline cancelled_sites"><input type="radio" onclick="refundeddetails()" value="Refunded" id="refunded" name="site_type" >Cancelled/Refunded</label> </div> <div class="col-sm-0 col-md-5"> </div> </div> </section> <?php if(!empty($bookin_details)){ ?> <section class="content"> <input type="hidden" value="<?php echo $bookin_details->site_number; ?>" class="site_number"/> <input type="hidden" value="<?php echo $bookin_details->booking_id; ?>" class="booking_id"/> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Project</label> <input type="text" value="<?php echo $project_name->project_name; ?>" class="col-sm-8" readonly> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">TSV</label> <input type="text" value="<?php if(!empty($payment_ind )) {echo $payment_ind['tsv'];/*$payment_ind->tsv;*/ }else {echo "";}?>" class="col-sm-8 tsv" readonly> </div> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Site No</label> <input type="text" value="<?php echo $site_no; ?>" class="col-sm-8" readonly> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Khata Status</label> <input type="text" value="<?php echo $bookin_details->d_status; ?>" class="col-sm-8" readonly> </div> </div> <!-----------Row 1-------------> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Customer Name</label> <input type="text" value="<?php if($bookin_details !=""){ echo $bookin_details->customer_name; } ?>" class="col-sm-8" readonly> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Agreement Due Date</label> <input type="text" value="<?php if(!empty($payment_ind )) { if( $payment_ind['sales_agreement_due_date']!= "0000-00-00") { echo date("d-m-Y", strtotime($payment_ind['sales_agreement_due_date'])); } }?>" class="col-sm-8" readonly> </div> </div> <!-----------Row 2-------------> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Agreement Due Amount</label> <input type="text" value="<?php if(!empty($payment_ind )) {echo $payment_ind['sales_agreement_due_amount']; }?>" class="col-sm-8 agr_due_amt" readonly> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Instalment Due Date</label> <input type="text" value="<?php if(!empty($payment_ind )) { if( $payment_ind['installment_due_date']!= "0000-00-00") { echo date("d-m-Y", strtotime($payment_ind['installment_due_date'])); } }?>" class="col-sm-8" readonly> </div> </div> <!-----------Row 2-------------> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Instalment Due Amount</label> <input type="text" value="<?php if(!empty($payment_ind )) {echo $payment_ind['installment_due_amount'];}?>" class="col-sm-8 install_due_amount" readonly> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Registration Due Date</label> <input type="text" value="<?php if(!empty($payment_ind )) { if($payment_ind['registration_due_date'] == "0000-00-00"){ echo ""; }else { echo date("d-m-Y", strtotime( $payment_ind['registration_due_date']));} } else { echo '';}?>" class="col-sm-8" readonly> </div> </div> <!-----------Row 2-------------> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4">Registration Due Amount</label> <input type="text" value="<?php if(!empty($payment_ind )) {echo $payment_ind['registration_due_amount']; }?>" class="col-sm-8 regis_due_amount" readonly> </div> </div> <!-----------Row 6-------------> </section> <?php }?> <?php if(empty($bookin_details)){ ?> <section class="content-header"> <h1 class="text-center"> This Site is Cancelled </h1> </section> <?php }?> <?php if(!empty($bookin_details)){ ?> <section > <h1 class="text-center"> Received Details </h1> </section> <!--- section 1 ----> <?php }?> <section class="content"> <div class="col-sm-12 col-md-12"> <form id="land_owner" class="form-inline payment_form"> <input type="hidden" name="project_id" value="<?= esc($project_name->project_id ?? '') ?>"> <input type="hidden" name="site_number" value="<?= esc($site_no ?? '') ?>"> <?php $total=0;if(!empty($bookin_details)) { if($bookin_details->booking_amount1 >0){?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6">Booking Amount 1:</label> <?php $bookin_details->booking_amount1; $num=$bookin_details->booking_amount1;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } echo 'Rs. '.$thecash.'/-'; $total=$num; ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Booking Date 1:</label> <?php echo date("d-m-Y", strtotime($bookin_details->booking_date1));?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($bookin_details->booking_payment_type == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($bookin_details->booking_payment_type== "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($bookin_details->booking_payment_type == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $bookin_details->booking_payment_type.'<br/>'; } if($bookin_details->booking_payment_type == "Cash") { echo ""; } else if($bookin_details->booking_payment_type == "Cheque") { if(!empty($bookin_details->check_no)) { echo '<label class="col-sm-4">Cheque no.</label>'.$bookin_details->check_no.'<br/>'; if($bookin_details->check_date == "" || $bookin_details->check_date == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->check_date)).'<br/>'; } /*echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->check_date)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$bookin_details->bank_name.'<br/>'; } } else if($bookin_details->booking_payment_type == "Online Payment") { echo '<label class="col-sm-4">UTR no.</label>'.$bookin_details->vtr_no.'<br/>'; if($bookin_details->online_date == "" || $bookin_details->online_date == "0000-00-00") { echo '<label class="col-sm-4">NEFT Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">NEFT Date</label>'.date("d-m-Y", strtotime($bookin_details->online_date)).'<br/>'; } } else if($bookin_details->booking_payment_type == "DD") { echo '<label class="col-sm-4">DD no.</label>'.$bookin_details->dd_no.'<br/>'; if($bookin_details->dd_date == "" || $bookin_details->dd_date == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->dd_date)).'<br/>'; } /* echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->dd_date)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$bookin_details->dd_bank.'<br/>'; } else if($bookin_details->booking_payment_type == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$bookin_details->paytm_ref_no.'<br/>'; if($bookin_details->paytm_online_date == "" || $bookin_details->paytm_online_date == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->paytm_online_date)).'<br/>'; } } else if($bookin_details->booking_payment_type == "UPI Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$bookin_details->upi_ref_no.'<br/>'; if($bookin_details->upi_online_date == "" || $bookin_details->upi_online_date == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->upi_online_date)).'<br/>'; } } ?> <!-- <?php print_r($bookin_details) ?> --> <label class="col-sm-4">Confirming Type:</label> <?php if($bookin_details->confirming_party == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $bookin_details->confirming_party.'<br/>'; } ?> </div> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <!-- row 5----> <?php } if($bookin_details->booking_amount2 >0){?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6">Booking Amount 2:</label> <?php $bookin_details->booking_amount2; $num=$bookin_details->booking_amount2;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } echo 'Rs. '.$thecash.'/-'; $total=$total+$num; ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4">Booking Date 2:</label> <?php if(!empty($bookin_details->booking_date2)){ if($bookin_details->booking_date2 !='0000-00-00'){echo date("d-m-Y", strtotime($bookin_details->booking_date2));} }else {}?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($bookin_details->booking_payment_type2 == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($bookin_details->booking_payment_type2== "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($bookin_details->booking_payment_type2 == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $bookin_details->booking_payment_type2.'<br/>'; } if($bookin_details->booking_payment_type2 == "Cash") { echo ""; } else if($bookin_details->booking_payment_type2 == "Cheque") { if(!empty($bookin_details->check_no2)) { echo '<label class="col-sm-4">Cheque no.</label>'.$bookin_details->check_no2.'<br/>'; if($bookin_details->check_date2 == "" || $bookin_details->check_date2 == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->check_date2)).'<br/>'; } /* echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->check_date2)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$bookin_details->bank_name2.'<br/>'; } } else if($bookin_details->booking_payment_type2 == "Online Payment") { echo '<label class="col-sm-4">UTR no.</label>'.$bookin_details->vtr_no2.'<br/>'; if($bookin_details->online_date2 == "" || $bookin_details->online_date2 > "0000-00-00") { echo '<label class="col-sm-4">NEFT Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">NEFT Date</label>'.date("d-m-Y", strtotime($bookin_details->online_date2)).'<br/>'; } } else if($bookin_details->booking_payment_type2 == "DD") { echo '<label class="col-sm-4">DD no.</label>'.$bookin_details->dd_no2.'<br/>'; if($bookin_details->dd_date2 == "" || $bookin_details->dd_date2 == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->dd_date2)).'<br/>'; } /* echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->dd_date2)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$bookin_details->dd_bank2.'<br/>'; } else if($bookin_details->booking_payment_type2 == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$bookin_details->paytm_ref_no2.'<br/>'; /*if($bookin_details->paytm_online_date2 == "" || $bookin_details->paytm_online_date2 > "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->paytm_online_date2)).'<br/>'; }*/ if($bookin_details->paytm_online_date2 == "" || $bookin_details->paytm_online_date2 == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->paytm_online_date2)).'<br/>'; } } else if($bookin_details->booking_payment_type2 == "UPI Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$bookin_details->upi_ref_no2.'<br/>'; /* if($bookin_details->upi_online_date2 == "" || $bookin_details->upi_online_date2 > "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->upi_online_date2)).'<br/>'; }*/ if($bookin_details->upi_online_date2 == "" || $bookin_details->upi_online_date2 == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($bookin_details->upi_online_date2)).'<br/>'; } } ?> <label class="col-sm-4">Confirming Type:</label> <?php if($bookin_details->confirming_party2 == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $bookin_details->confirming_party2.'<br/>'; } ?> </div> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <!-- row 5----> <?php } } ?> <?php if(empty($agreement_details)) { } else { if( $agreement_details->agreement_amount != 0 || $agreement_details->agreement_payment_mode != 0) { ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6">Agreement Amount:</label> <?php $agreement_details->agreement_amount; $num=$agreement_details->agreement_amount;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } echo 'Rs. '.$thecash.'/-'; $total=$total+$num; ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4">Agreement Date:</label> <?php if(!empty($agreement_details->agreement_date)){echo date("d-m-Y", strtotime($agreement_details->agreement_date));}else{}?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($agreement_details->agreement_payment_mode == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($agreement_details->agreement_payment_mode == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($agreement_details->agreement_payment_mode == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $agreement_details->agreement_payment_mode.'<br/>'; } if($agreement_details->agreement_payment_mode == "Cash") { echo ""; } else if($agreement_details->agreement_payment_mode == "Cheque") { if(!empty($agreement_details->agreement_cheque_no)) { echo '<label class="col-sm-4">Cheque no.</label>'.$agreement_details->agreement_cheque_no.'<br/>'; if($agreement_details->agreement_cheque_date == "") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($agreement_details->agreement_cheque_date)).'<br/>'; } /* echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($agreement_details->agreement_cheque_date)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$agreement_details->agreement_bank.'<br/>'; } } else if($agreement_details->agreement_payment_mode == "Online Payment") { echo '<label class="col-sm-4">UTR no.</label>'.$agreement_details->agreement_vtr_no.'<br/>'; if($agreement_details->agreement_online_date == "" || $agreement_details->agreement_online_date == "0000-00-00") { echo '<label class="col-sm-4">NEFT Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">NEFT Date</label>'.date("d-m-Y", strtotime($agreement_details->agreement_online_date)).'<br/>'; } } else if($agreement_details->agreement_payment_mode == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$agreement_details->agreementpaytm_ref_no.'<br/>'; if($agreement_details->agreementpaytm_online_date1 == "" || $agreement_details->agreementpaytm_online_date1 == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($agreement_details->agreementpaytm_online_date1)).'<br/>'; } } else if($agreement_details->agreement_payment_mode == "UPI Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$agreement_details->agreementupi_ref_no.'<br/>'; if($agreement_details->agreementupi_online_date1 == "" || $agreement_details->agreementupi_online_date1 == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($agreement_details->agreementupi_online_date1)).'<br/>'; } } else if($agreement_details->agreement_payment_mode == "DD") { echo '<label class="col-sm-4">DD no.</label>'.$agreement_details->agreement_dd_no.'<br/>'; if($agreement_details->agreement_dd_date == "" || $agreement_details->agreement_dd_date == "0000-00-00") { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($agreement_details->agreement_dd_date)).'<br/>'; } /*echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($agreement_details->agreement_dd_date)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$agreement_details->agreement_dd_bank.'<br/>'; } /**/ ?> <label class="col-sm-4">Confirming Type:</label> <?php if($agreement_details->agreement_confirming_type == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $agreement_details->agreement_confirming_type.'<br/>'; } ?> </div> <div class="form-group col-sm-12 col-md-4"> <!-- <label class="">Confirming Party:</label> <?php if($agreement_details->agreement_confirming_type == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $agreement_details->agreement_confirming_type.'<br/>'; } ?> --> </div> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <!-- row 5----> <?php } } ?> <?php $i = 1; $h=1;; if(empty($installment_details)) { } else { foreach($installment_details as $payment) { ?> <?php if($payment->installment_amount1 != 0 || $payment->installment_payment_mode1 != 0) { ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6">Installment Amount<?php echo ' '.$h; ?>:</label> <?php $payment->installment_amount1; $num=$payment->installment_amount1;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } echo 'Rs. '.$thecash.'/-'; $total += floatval(str_replace(',', '', $num)); ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4">Installment<?php echo ' '.$h; ?> Date:</label> <?php if(!empty($payment->installment1_date)){echo date("d-m-Y", strtotime($payment->installment1_date));}else{}?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($payment->installment_payment_mode1 == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($payment->installment_payment_mode1 == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($payment->installment_payment_mode1 == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $payment->installment_payment_mode1.'<br/>'; } if($payment->installment_payment_mode1 == "Cash") { echo ""; } else if($payment->installment_payment_mode1 == "Cheque") { echo '<label class="col-sm-4">Cheque no.:</label>'.$payment->install_cheque_no1.'<br/>'; if($payment->install_cheque_date1 == "" || $payment->install_cheque_date1 == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->install_cheque_date1)).'<br/>'; } /*echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->install_cheque_date1)).'<br/>';*/ echo '<label class="col-sm-4">Bank:</label>'.$payment->install_bank1.'<br/>'; } else if($payment->installment_payment_mode1 == "Online Payment") { echo '<label class="col-sm-4">UTR no.:</label>'.$payment->install_vtr_no1.'<br/>'; if($payment->install_online_date1 == "" || $payment->install_online_date1 == "0000-00-00") { echo '<label class="col-sm-4">NEFT Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">NEFT Date:</label>'.date("d-m-Y", strtotime($payment->install_online_date1)).'<br/>'; } } else if($payment->installment_payment_mode1 == "DD") { echo '<label class="col-sm-4">DD no.</label>'.$payment->install_dd_no1.'<br/>'; if($payment->install_dd_date1 == "" || $payment->install_dd_date1 == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->install_dd_date1)).'<br/>'; } /*echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($payment->install_dd_date1)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$payment->install_dd_bank1.'<br/>'; } else if($payment->installment_payment_mode1 == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.:</label>'.$payment->paytm_ref_no.'<br/>'; if($payment->paytm_online_date1 == "" || $payment->paytm_online_date1 == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->paytm_online_date1)).'<br/>'; } } else if($payment->installment_payment_mode1 == "UPI Payment") { echo '<label class="col-sm-4">Ref no.:</label>'.$payment->upi_ref_no.'<br/>'; if($payment->upi_online_date1 == "" || $payment->upi_online_date1 == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->upi_online_date1)).'<br/>'; } } ?> <label class="col-sm-4">Confirming Type:</label> <?php if($payment->installment_confirming_type == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $payment->installment_confirming_type.'<br/>'; } ?> </div> <!-- <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Confirming Type:</label> <?php if($payment->installment_confirming_type == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $payment->installment_confirming_type.'<br/>'; } ?> </div> --> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <!-- row 6----> <?php } ?> <?php if($payment->installment_amount2 != 0 || $payment->installment_payment_mode2 != 0) { ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6">Instalment Amount 2 :</label> <?php $payment->installment_amount2; $num=$payment->installment_amount2;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } echo 'Rs. '.$thecash.'/-'; $total += floatval(str_replace(',', '', $num)); ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4">Instalment<?php echo $h; ?> Date:</label> <?php if(!empty($payment->installment2_date)){echo date("d-m-Y", strtotime($payment->installment2_date));}else{}?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($payment->installment_payment_mode2 == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($payment->installment_payment_mode2 == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($payment->installment_payment_mode2 == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $payment->installment_payment_mode2.'<br/>'; } if($payment->installment_payment_mode2 == "Cash") { echo ""; } else if($payment->installment_payment_mode2 == "Cheque") { echo '<label class="col-sm-4">Cheque no.:</label>'.$payment->install_cheque_no2.'<br/>'; if($payment->install_cheque_date2 == "" || $payment->install_cheque_date2 == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->install_cheque_date2)).'<br/>'; } /* echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->install_cheque_date2)).'<br/>';*/ echo '<label class="col-sm-4">Bank:</label>'.$payment->install_bank2.'<br/>'; } else if($payment->installment_payment_mode2 == "Online Payment") { echo '<label class="col-sm-4">UTR no.:</label>'.$payment->install_vtr_no2.'<br/>'; if($payment->install_online_date2 == "" || $payment->install_online_date2 == "0000-00-00") { echo '<label class="col-sm-4">NEFT Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">NEFT Date:</label>'.date("d-m-Y", strtotime($payment->install_online_date2)).'<br/>'; } } else if($payment->installment_payment_mode2 == "DD") { echo '<label class="col-sm-4">DD no.</label>'.$payment->install_dd_no2.'<br/>'; if($payment->install_dd_date2 == "" || $payment->install_dd_date2 == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->install_dd_date2)).'<br/>'; } /* echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($payment->install_dd_date2)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$payment->install_dd_bank2.'<br/>'; } else if($payment->installment_payment_mode2 == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.:</label>'.$payment->paytm_ref_no2.'<br/>'; if($payment->paytm_online_date2 == "" || $payment->paytm_online_date2 == "0000-00-00") { echo '<label class="col-sm-4"> Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->paytm_online_date2)).'<br/>'; } } else if($payment->installment_payment_mode2 == "UPI Payment") { echo '<label class="col-sm-4">Ref no.:</label>'.$payment->upi_ref_no2.'<br/>'; if($payment->upi_online_date2 == "" || $payment->upi_online_date2 == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($payment->upi_online_date2)).'<br/>'; } } ?> <label class="col-sm-4">Confirming Type:</label> <?php if($payment->confirming_party1 == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $payment->confirming_party1.'<br/>'; } ?> </div> <!-- <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Confirming Type:</label> <?php if($payment->confirming_party1 == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $payment->confirming_party1.'<br/>'; } ?> </div> --> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <!-- row 6----> <?php } ?> <?php $h++; } } ?> <?php if(empty($registration1_details)) { } else { if($registration1_details->registration_amount != 0 || $registration1_details->registration_payment_mode != 0) { ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6"> Registration Amount 1:</label> <?php $registration1_details->registration_amount; $num=$registration1_details->registration_amount;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } echo 'Rs. '.$thecash.'/-'; $total=$total+$num; ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4">Registration Date:</label> <?php if(!empty($registration1_details->registration_date)){ if($registration1_details->registration_date =='0000-00-00') { echo ""; }else{ echo date("d-m-Y", strtotime($registration1_details->registration_date)); }}else{}?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($registration1_details->registration_payment_mode == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($registration1_details->registration_payment_mode == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($registration1_details->registration_payment_mode == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $registration1_details->registration_payment_mode.'<br/>'; } if($registration1_details->registration_payment_mode == "Cash") { echo ""; } else if($registration1_details->registration_payment_mode == "Cheque") { if(!empty($registration1_details->regn_cheque_no)) { echo '<label class="col-sm-4">Cheque no.:</label>'.$registration1_details->regn_cheque_no.'<br/>'; if($registration1_details->regn_cheque_date == "" || $registration1_details->regn_cheque_date == "0000-00-00") { echo '<label class="col-sm-4"> Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($registration1_details->regn_cheque_date)).'<br/>'; } /* echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($registration1_details->regn_cheque_date)).'<br/>';*/ echo '<label class="col-sm-4">Bank:</label>'.$registration1_details->regn_bank.'<br/>'; } } else if($registration1_details->registration_payment_mode == "Online Payment") { echo '<label class="col-sm-4">UTR no.:</label>'.$registration1_details->regn_vtr_no.'<br/>'; if($registration1_details->regn_online_date == "" || $registration1_details->regn_online_date == "0000-00-00") { echo '<label class="col-sm-4">NEFT Date:</label>'.'<br/>'; } else { echo '<label class="col-sm-4">NEFT Date:</label>'.date("d-m-Y", strtotime($registration1_details->regn_online_date)).'<br/>'; } } else if($registration1_details->registration_payment_mode == "DD") { if(!empty($registration1_details->regn_dd_no)) { echo '<label class="col-sm-4">DD no.</label>'.$registration1_details->regn_dd_no.'<br/>'; if($registration1_details->regn_dd_date == "" || $registration1_details->regn_dd_date == "0000-00-00") { echo '<label class="col-sm-4"> Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($registration1_details->regn_dd_date)).'<br/>'; } /*echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($registration1_details->regn_dd_date)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$registration1_details->regn_dd_bank.'<br/>'; } } else if($registration1_details->registration_payment_mode == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.:</label>'.$registration1_details->regn_ref_no.'<br/>'; if($registration1_details->regn_paytm_date == "" || $registration1_details->regn_paytm_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($registration1_details->regn_paytm_date)).'<br/>'; } } else if($registration1_details->registration_payment_mode == "UPI Payment") { echo '<label class="col-sm-4">Ref no.:</label>'.$registration1_details->regn_upiref_no.'<br/>'; if($registration1_details->regn_upi_date == "" || $registration1_details->regn_upi_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($registration1_details->regn_upi_date)).'<br/>'; } } else if($registration1_details->registration_payment_mode == "Cash") { if($registration1_details->cash_date == "" || $registration1_details->cash_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($registration1_details->cash_date)).'<br/>'; } } else if($registration1_details->registration_payment_mode == "Swipe") { if($registration1_details->swipe_date == "" || $registration1_details->swipe_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($registration1_details->swipe_date)).'<br/>'; } } ?> <label class="col-sm-4">Confirming Type:</label> <?php if($registration1_details->registration_confirming_type == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $registration1_details->registration_confirming_type.'<br/>'; } ?> </div> <!-- <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4" style="color: green;">Registration Value:</label> <span style="color: green;"><b><?php //echo 'Rs. '. $registration1_details->registration_value. '/-';?></b></span> </div>--> <!-- <div class="form-group col-sm-12 col-md-4"> </div> --> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <!-- row 8----> <!-- --------------------------------------------------------------------- --> <?php } } ?> <?php if(!empty($more_registration_details)){ ?> <?php $a=2; if($more_registration_details != ""){ foreach($more_registration_details as $get_reg_amt){?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6"> Registration Amount <?php echo $a;?>:</label> <?php $get_reg_amt->reg_amount; $num=$get_reg_amt->reg_amount;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } echo 'Rs. '.$thecash.'/-'; $total=$total+$num; ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4">Registration Date:</label> <?php if(!empty($get_reg_amt->reg_date)){if($get_reg_amt->reg_date != '0000-00-00') {echo date("d-m-Y", strtotime($get_reg_amt->reg_date));}else {echo "";}}else{}?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($get_reg_amt->reg_payment_mode == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($get_reg_amt->reg_payment_mode == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($get_reg_amt->reg_payment_mode == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $get_reg_amt->reg_payment_mode.'<br/>'; } if($get_reg_amt->reg_payment_mode == "Cash") { if($get_reg_amt->mode_date == "" || $get_reg_amt->mode_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>'; } } if($get_reg_amt->reg_payment_mode == "Swipe") { if($get_reg_amt->mode_date == "" || $get_reg_amt->mode_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>'; } } else if($get_reg_amt->reg_payment_mode == "Cheque") { echo '<label class="col-sm-4">Cheque no.:</label>'.$get_reg_amt->number.'<br/>'; if($get_reg_amt->mode_date == "" || $get_reg_amt->mode_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>'; } /* echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>';*/ echo '<label class="col-sm-4">Bank:</label>'.$get_reg_amt->branch_name.'<br/>'; } else if($get_reg_amt->reg_payment_mode == "Online Payment") { echo '<label class="col-sm-4">UTR no.:</label>'.$get_reg_amt->number.'<br/>'; if($get_reg_amt->mode_date == "" || $get_reg_amt->mode_date == "0000-00-00") { echo '<label class="col-sm-4">NEFT Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">NEFT Date:</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>'; } } else if($get_reg_amt->reg_payment_mode == "DD") { echo '<label class="col-sm-4">DD no.</label>'.$get_reg_amt->number.'<br/>'; if($get_reg_amt->mode_date == "" || $get_reg_amt->mode_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>'; } /*echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>';*/ echo '<label class="col-sm-4">Bank</label>'.$get_reg_amt->branch_name.'<br/>'; } else if($get_reg_amt->reg_payment_mode == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.:</label>'.$get_reg_amt->number.'<br/>'; if($get_reg_amt->mode_date == "" || $get_reg_amt->mode_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>'; } } else if($get_reg_amt->reg_payment_mode == "UPI Payment") { echo '<label class="col-sm-4">Ref no.:</label>'.$get_reg_amt->number.'<br/>'; if($get_reg_amt->mode_date == "" || $get_reg_amt->mode_date == "0000-00-00") { echo '<label class="col-sm-4">Date:</label>'.'<br/>'; } else { echo '<label class="col-sm-4">Date:</label>'.date("d-m-Y", strtotime($get_reg_amt->mode_date)).'<br/>'; } } ?> <label class="col-sm-4">Confirming Type:</label> <?php if($get_reg_amt->registration_confirming_type == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $get_reg_amt->registration_confirming_type.'<br/>'; } ?> </div> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <?php $a++; } }?> <?php }?> <?php if(!empty($bookin_details)){ ?> <?php $tsv = $bookin_details->tsv; $balance = $tsv-$total; ?> <?php $balance; $num=$balance;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } /* echo 'Rs. '.$thecash.'/-'; $total=$total+$num;*/ ?> <h4 class="balance_amount_1">Balance Amount: <span style="color: green;"><?php echo 'Rs. '. $thecash. '/-'; ?></span></h4> <?php $total; $num=$total;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); // extracts the last three digits $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; // explodes the remaining digits in 2's formats, adds a zero in the beginning to maintain the 2's grouping. $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { // creates each of the 2's group and adds a comma to the end if($i==0) { $explrestunits .= (int)$expunit[$i].","; // if is first value , convert into integer } else { $explrestunits .= $expunit[$i].","; } } $total = $explrestunits.$lastthree; } else { $total = $num; } /* echo 'Rs. '.$thecash.'/-'; $total=$total+$num;*/ ?> <h2 class="total_amount_1">Total Paid: <span style="color: blue;"><?php echo 'Rs.'. $total .'/-';?></span></h2> </form> <button type="button" class="btn btn-primary center-block mail_report">Mail</button> <!-- form End ----> <?php }?> </div> <!--- col-sm-8 ----> <div class="col-sm-0 col-md-1"></div> </section> <!--- section 2 ----> </section> <section> </section> <script> function refundeddetails() { var project_id = "<?= esc($project_id) ?>"; var site_number = "<?= esc($site_number) ?>"; // alert(project_id); $.ajax({ url:"<?php echo site_url('view-cancelation-details')?>/"+project_id+'/'+site_number, type:"POST", success:function(response) { //alert(response); // alert(); window.location.href="<?php echo site_url('view-cancelation-details')?>/"+project_id+'/'+site_number; } }); } $(document).ready(function(){ var $radios = $('input:radio[name=site_type]'); if($radios.is(':checked') === false) { $radios.filter('[value=cancelled]').prop('checked', true); } }); </script> <script type="text/javascript"> $('.mail_report').click(function(){ var project_id = $('.project_id').val(); var site_number = $('.site_number').val(); var booking_id = $('.booking_id').val(); var total_amount_1 = $('.total_amount_1').text(); var balance_amount_1 = $('.balance_amount_1').text(); $.ajax({ type : 'post', url : "<?php echo site_url('send-site-reports');?>", data : {'balance_amount_1':balance_amount_1,'total_amount_1':total_amount_1,'booking_id':booking_id,'project_id':project_id,'site_number':site_number}, success:function(response){ //response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { var inserted_id = response.message; window.location.href = "<?php echo site_url('view_mail_content');?>"+'/'+inserted_id; } } }) }); </script> <style type="text/css"> .content-wrapper, .right-side { min-height: 1500px !important; } .a { //margin-left:1.3%; } </style> <?php echo view('includes/footer');?>