EVOLUTION-NINJA
Edit File: site_cancellation_details.php
<?php echo view('includes/header');?> <link href="<?php echo base_url('public/assets/admin_dashboard/css/jquery-ui.css');?>" rel="stylesheet"> <script src="<?php echo base_url('public/assets/js/jquery-ui.js');?>"></script> <section class="content-header"> <!-- <input type="button" onclick="location.href='edit-cancellation-details/'+cancellation_id;" value="Edit" /> --> <!-- <input type="button" class="btn btn-primary pull-right" value="Edit" onclick="fun_edit()" style="margin:-2px 50px;" > --> <h1> Cancellation details</h1> </section> <!--- section 1 ----> <section class="content"> <?php if(!empty($detailss)) { ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Customer Name :</label> <?php echo $detailss['customer_name'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Project :</label> <?php echo $detailss['project_name'];?> </div> </div> <!-- row 1----> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Site No :</label> <?php echo $detailss['site_number'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Dimension :</label> <?php echo $detailss['total_in_sqft'];?> Sqft </div> </div> <!-- row 2----> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Allocated To :</label> <?php echo $detailss['reference'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Associate :</label> <?php echo $detailss['associate'];?> </div> </div> <!-- row 3----> <!-----------------------------------------//--> <h3 class="bok-details"> Booking Details </h3> <div class="color1"> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Booking Date1 :</label> <?php if($detailss['booking_date1'] == "" || $detailss['booking_date1'] == "0000-00-00"){echo "";}else {echo date("d-m-Y", strtotime($detailss['booking_date1']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Booking Amount1 :</label> <?php $detailss['booking_amount1']; $num=$detailss['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.'/-'; ?> </div> </div> <!-- row 4----> <!-- <?php print_r($detailss); ?> --> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Payment type :</label> <?php if($detailss['booking_payment_type']=='Online Payment'){echo "NEFT/RTGS";}else if($detailss['booking_payment_type']=='Paytm Payment'){echo "UPI / Direct Payment";}else if($detailss['booking_payment_type']=='UPI Payment'){echo "Credit / Debit Payment";}else {echo $detailss['booking_payment_type'];}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($detailss['confirming_party1']=='confirming_party'){echo "Confirming Party";}else {echo $detailss['confirming_party1'];}?> </div> </div> <?php if($detailss['booking_payment_type'] == "Cheque") { ?> <div class="row land_owner_a" id="check_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Cheque No :</label> <?php echo $detailss['check_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Cheque Date :</label> <?php if($detailss['check_date'] == "" || $detailss['check_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['check_date']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Bank Name :</label> <?php echo $detailss['bank_name'];?> </div> </div> <!-- Check -- --> <?php } ?> <?php if($detailss['booking_payment_type'] == "DD") { ?> <div class="row land_owner_a" id="check_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">DD No :</label> <?php echo $detailss['dd_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">DD Date :</label> <?php if($detailss['dd_date'] == "" || $detailss['dd_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['dd_date']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Bank Name :</label> <?php echo $detailss['dd_bank'];?> </div> </div> <!-- Check -- --> <?php } ?> <?php if($detailss['booking_payment_type'] == "Online Payment") { ?> <div class="row land_owner_a" id="onlinepayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">UTR No :</label> <?php echo $detailss['vtr_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">NEFT/RTGS Date :</label> <?php if($detailss['online_date'] == "" || $detailss['online_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['online_date']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <?php if($detailss['booking_payment_type'] == "Paytm Payment") { ?> <div class="row land_owner_a" id="paytmpayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Ref No :</label> <?php echo $detailss['paytm_ref_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Date :</label> <?php if($detailss['paytm_online_date'] == "" || $detailss['paytm_online_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['paytm_online_date']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <?php if($detailss['booking_payment_type'] == "UPI Payment") { ?> <div class="row land_owner_a" id="upipayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Ref No :</label> <?php echo $detailss['upi_ref_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Date :</label> <?php if($detailss['upi_online_date'] == "" || $detailss['upi_online_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['upi_online_date']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <!-- <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($detailss['confirming_party1']=='confirming_party'){echo "Confirming Party";}else {echo $detailss['confirming_party1'];}?> </div> </div> --> </div> <div class="color2"> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Booking Date2 :</label> <?php if($detailss['booking_date2'] == "" || $detailss['booking_date2'] == "0000-00-00"){echo "";}else {echo date("d-m-Y", strtotime($detailss['booking_date2']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Booking Amount2 :</label> <?php $detailss['booking_amount2']; $num=$detailss['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.'/-'; ?> </div> </div> <!-- row 5----> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Payment type :</label> <?php if($detailss['booking_payment_type2'] == '0'){echo "";}else if($detailss['booking_payment_type2']=='Online Payment'){echo "NEFT/RTGS";}else if($detailss['booking_payment_type2']=='Paytm Payment'){echo "UPI / Direct Payment";}else if($detailss['booking_payment_type2']=='UPI Payment'){echo "Credit / Debit Payment";}else {echo $detailss['booking_payment_type2'];}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($detailss['confirming_party2']=='confirming_party'){echo "Confirming Party";}else {echo $detailss['confirming_party2'];}?> </div> </div> <?php if($detailss['booking_payment_type2'] == "Cheque") { ?> <div class="row land_owner_a" id="check_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Cheque No :</label> <?php echo $detailss['check_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Cheque Date :</label> <?php if($detailss['check_date2'] == "" || $detailss['check_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['check_date2']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Bank Name :</label> <?php echo $detailss['bank_name2'];?> </div> </div> <!-- Check -- --> <?php } ?> <?php if($detailss['booking_payment_type2'] == "DD") { ?> <div class="row land_owner_a" id="check_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">DD No :</label> <?php echo $detailss['dd_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">DD Date :</label> <?php if($detailss['dd_date2'] == "" || $detailss['dd_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['dd_date2']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Bank Name :</label> <?php echo $detailss['dd_bank2'];?> </div> </div> <!-- Check -- --> <?php } ?> <?php if($detailss['booking_payment_type2'] == "Online Payment") { ?> <div class="row land_owner_a" id="onlinepayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">UTR No :</label> <?php echo $detailss['vtr_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">NEFT/RTGS Date :</label> <?php if($detailss['online_date2'] == "" || $detailss['online_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['online_date2']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <?php if($detailss['booking_payment_type2'] == "Paytm Payment") { ?> <div class="row land_owner_a" id="paytmpayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Ref No :</label> <?php echo $detailss['paytm_ref_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Date :</label> <?php if($detailss['paytm_online_date2'] == "" || $detailss['paytm_online_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['paytm_online_date2']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <?php if($detailss['booking_payment_type2'] == "UPI Payment") { ?> <div class="row land_owner_a" id="upipayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Ref No :</label> <?php echo $detailss['upi_ref_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Date :</label> <?php if($detailss['upi_online_date2'] == "" || $detailss['upi_online_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($detailss['upi_online_date2']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <!-- <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($detailss['confirming_party2']=='confirming_party'){echo "Confirming Party";}else {echo $detailss['confirming_party2'];}?> </div> </div> --> </div> <!---------------------------------- agreement ----------------------------------------> <?php if(!empty($agreement)) { ?> <div class="color1"> <?php foreach($agreement as $payments) { ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Agreement Date:</label> <?php echo date("d-m-Y", strtotime($payments->agreement_date));?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Agreement Amount :</label> <?php $payments->agreement_amount; $num=$payments->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.'/-'; ?> </div> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Mode:</label> <?php if($payments->agreement_payment_mode == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($payments->agreement_payment_mode == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($payments->agreement_payment_mode == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $payments->agreement_payment_mode.'<br/>'; } if($payments->agreement_payment_mode == "Cash") { echo ""; } else if($payments->agreement_payment_mode == "Cheque") { echo '<label class="col-sm-5">Cheque no.:</label>'.$payments->agreement_cheque_no.'<br/>'; echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payments->agreement_cheque_date)).'<br/>'; echo '<label class="col-sm-5">Bank:</label>'.$payments->agreement_bank.'<br/>'; } else if($payments->agreement_payment_mode == "Online Payment") { echo '<label class="col-sm-5">UTR no.:</label>'.$payments->agreement_vtr_no.'<br/>'; if($payments->agreement_online_date == "" || $payments->agreement_online_date == "0000-00-00") { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'; } else { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'.date("d-m-Y", strtotime($payments->agreement_online_date)).'<br/>'; } } else if($payments->agreement_payment_mode == "Paytm Payment") { echo '<label class="col-sm-5">Ref no.:</label>'.$payments->agreementpaytm_ref_no.'<br/>'; if($payments->agreementpaytm_online_date1 == "" || $payments->agreementpaytm_online_date1 == "0000-00-00") { echo '<label class="col-sm-5"> Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payments->agreementpaytm_online_date1)).'<br/>'; } } else if($payments->agreement_payment_mode == "UPI Payment") { echo '<label class="col-sm-5">Ref no.:</label>'.$payments->agreementupi_ref_no.'<br/>'; if($payments->agreementupi_online_date1 == "" || $payments->agreementupi_online_date1 == "0000-00-00") { echo '<label class="col-sm-5">Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payments->agreementupi_online_date1)).'<br/>'; } } else if($payments->agreement_payment_mode == "DD") { echo '<label class="col-sm-5">DD no.</label>'.$payments->agreement_dd_no.'<br/>'; echo '<label class="col-sm-5">Date</label>'.date("d-m-Y", strtotime($payments->agreement_dd_date)).'<br/>'; echo '<label class="col-sm-5">Bank</label>'.$payments->agreement_dd_bank.'<br/>'; } ?> </div> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($payments->agreement_confirming_type=='confirming_party'){echo "Confirming Party";}else {echo $payments->agreement_confirming_type;}?> </div> </div> <?php } ?> </div> <?php } ?> <!----------------------------------- end agreement ----------------------------------> <!-------------------------------------- installment ----------------------------------> <?php $i = 1; $h=1; foreach($payment as $key=>$payment) { if($payment->installment_amount1 != 0 || $payment->installment_payment_mode1 != 0) { ?> <div class="<?php if(empty($agreement)) { if($key % 2 != 0){ echo 'color2'; } else { echo 'color1';} } else { if($key % 2 == 0){ echo 'color2'; } else { echo 'color1';} } ?>"> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Instalment<?php echo $h; ?> Date:</label> <?php echo date("d-m-Y", strtotime($payment->installment1_date));?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Instalment 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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">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 == "Online Payment") { echo '<label class="col-sm-5">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-5">NEFT / RTGS date:</label>'; } else { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'.date("d-m-Y", strtotime($payment->install_online_date1)).'<br/>'; } } else if($payment->installment_payment_mode1 == "Cash") { echo ""; } else if($payment->installment_payment_mode1 == "Cheque") { echo '<label class="col-sm-5">Cheque no.:</label>'.$payment->install_cheque_no1.'<br/>'; echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->install_cheque_date1)).'<br/>'; echo '<label class="col-sm-5">Bank:</label>'.$payment->install_bank1.'<br/>'; } else if($payment->installment_payment_mode1 == "Paytm Payment") { echo '<label class="col-sm-5">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-5"> Date:</label>'; } else { echo '<label class="col-sm-5">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-5">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-5">Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->upi_online_date1)).'<br/>'; } } else if($payment->installment_payment_mode1 == "DD") { echo '<label class="col-sm-5">DD no.</label>'.$payment->install_dd_no1.'<br/>'; echo '<label class="col-sm-5">Date</label>'.date("d-m-Y", strtotime($payment->install_dd_date1)).'<br/>'; echo '<label class="col-sm-5">Bank</label>'.$payment->install_dd_bank1.'<br/>'; } else { echo $payment->installment_payment_mode1.'<br/>'; } ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($payment->installment_confirming_type =='confirming_party'){echo "Confirming Party";} else {echo $payment->installment_confirming_type;}?> </div> </div> </div> <?php } if($payment->installment_amount2 != 0 || $payment->installment_payment_mode2 != 0) { ?> <div class="<?php if(empty($agreement)) { if($key % 2 != 0){ echo 'color2'; } else { echo 'color1';} } else { if($key % 2 == 0){ echo 'color2'; } else { echo 'color1';} } ?>"> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Instalment<?php echo $h; ?> Date:</label> <?php echo date("d-m-Y", strtotime($payment->installment2_date));?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Instalment Amount2:</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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">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 { $payment->installment_payment_mode2.'<br>'; } if($payment->installment_payment_mode2 == "Online Payment") { echo '<label class="col-sm-5">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-5">NEFT / RTGS date:</label>'; } else { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'.date("d-m-Y", strtotime($payment->install_online_date2)).'<br/>'; } } else if($payment->installment_payment_mode2 == "Cash") { echo ""; } else if($payment->installment_payment_mode2 == "Cheque") { echo '<label class="col-sm-5">Cheque no.:</label>'.$payment->install_cheque_no2.'<br/>'; echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->install_cheque_date2)).'<br/>'; echo '<label class="col-sm-5">Bank:</label>'.$payment->install_bank2.'<br/>'; } else if($payment->installment_payment_mode2 == "Paytm Payment") { echo '<label class="col-sm-5">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-5"> Date:</label>'; } else { echo '<label class="col-sm-5">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-5">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-5">Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->upi_online_date2)).'<br/>'; } } else if($payment->installment_payment_mode2 == "DD") { echo '<label class="col-sm-5">DD no.</label>'.$payment->install_dd_no2.'<br/>'; echo '<label class="col-sm-5">Date</label>'.date("d-m-Y", strtotime($payment->install_dd_date2)).'<br/>'; echo '<label class="col-sm-5">Bank</label>'.$payment->install_dd_bank2.'<br/>'; } else { echo $payment->installment_payment_mode2.'<br/>'; } ?> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($payment->installment_confirming_type=='confirming_party'){echo "Confirming Party";}else {echo $payment->installment_confirming_type;}?> </div> </div> </div> </div> <?php } $h++; } ?> <!-------------------------------------- end installment ----------------------------------> <?php if(!empty($total_amount)) {$installment_amount11=0;$installment_amount12=0; foreach($total_amount as $total){ $booking_amount = $total->booking_amount1+$total->booking_amount2; $agreement_amount = $total->agreement_amount; $installment_amount11 += $total->installment_amount1; $installment_amount12 += $total->installment_amount2; $total_res = $booking_amount+$agreement_amount+$installment_amount11+$installment_amount12; } $num=$total_res;$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; } ?> <h4 class="total_paid1" style="background: green;color: white; display: inline-block; padding: 5px 10px 9px;">Total Paid: <span style="color: white;"><?php echo 'Rs. '. $thecash. '/-'; ?></span></h4> <?php } else{ } ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Refunded ?</label> <?php if($detailss['refunded'] == "Yes"){echo "Yes";}else {echo "No";}?> </div> </div> <!-- row 6----> <?php if($detailss['refunded'] == 'Yes') { $g=1; if(!empty($detailss['mul_refunds'])) { foreach($detailss['mul_refunds'] as $details){ ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Refund Date <?php echo $g;?> :</label> <?php if($details->refunded_date == "" || $details->refunded_date == "0000-00-00"){echo "";}else {echo date("d-m-Y", strtotime($details->refunded_date));} ?> </div> <div class="col-sm-12 col-md-6"> <label class="col-sm-5">Refunded Amount <?php echo $g;?> :</label> <?php $details->refunded_amount; $num=$details->refunded_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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Mode:</label> <?php if($details->refunded_payment_mode == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else { echo $details->refunded_payment_mode.'<br/>'; } if($details->refunded_payment_mode == "Cash") { echo ""; } else if($details->refunded_payment_mode == "Cheque") { echo '<label class="col-sm-5">Cheque no.:</label>'.$details->cheque_no.'<br/>'; echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($details->cheque_date)).'<br/>'; echo '<label class="col-sm-5">Bank:</label>'.$details->bank_name.'<br/>'; } else if($details->refunded_payment_mode == "Online Payment") { echo '<label class="col-sm-5">UTR no.:</label>'.$details->vtr_no.'<br/>'; if($details->online_date == "" || $details->online_date == "0000-00-00") { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'; } else { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'.date("d-m-Y", strtotime($details->online_date)).'<br/>'; } } ?> </div> </div> <div class="row land_owner_a"> <div class="col-sm-12 col-md-6"> <label class="col-sm-5">Due Amount <?php echo $g;?> :</label> <?php $details->due_amount; $num=$details->due_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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Due With <?php echo $g;?> :</label> <?php echo $details->due_with;?> </div> </div> <hr style=" border: 1px solid black;"> <?php $g++; } ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4 col-md-4">Refund Request Letter</label><br/><br/> <?php $ext = pathinfo($detailss['refunded_request_letter'], PATHINFO_EXTENSION); if($ext == 'JPG' || $ext == 'jpg' || $ext == 'JPEG' || $ext == 'jpeg' || $ext == 'png' || $ext == 'PNG') { ?> <img style="height:400px;width:300px;"src="<?php echo base_url('cancellation_uploads');?>/<?php echo $detailss['refunded_request_letter'];?>"/> <?php } else if($ext == 'pdf') { ?> <embed src="<?php echo base_url('cancellation_uploads');?>/<?php echo $detailss['refunded_request_letter'];?>" style="height:500px;width:400px;"/> <?php } ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4 col-md-4">Cancellation Agreement</label><br/><br/> <?php $ext = pathinfo($detailss['cancellation_agreement_image'], PATHINFO_EXTENSION); if($ext == 'JPG' || $ext == 'jpg' || $ext == 'JPEG' || $ext == 'jpeg' || $ext == 'png' || $ext == 'PNG') { ?> <img style="height:400px;width:300px;"src="<?php echo base_url('cancellation_uploads');?>/<?php echo $detailss['cancellation_agreement_image'];?>"/> <?php } else if($ext == 'pdf') { ?> <embed src="<?php echo base_url('cancellation_uploads');?>/<?php echo $detailss['cancellation_agreement_image'];?>" style="height:500px;width:400px;"/> <?php } ?> </div> </div> <!-- row 9----> <?php } else { ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6" style="background-color:#A7EEEE;"> <label class="col-sm-5">Total:</label> <?php echo $detailss['total'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Refund Date :</label> <?php if($detailss['refunded_date'] == "" || $detailss['refunded_date'] == "0000-00-00"){echo "";}else {echo date("d-m-Y", strtotime($detailss['refunded_date']));} ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Refunded Amount :</label> <?php $detailss['refunded_amount']; $num=$detailss['refunded_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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Note:</label> <?php echo $detailss['note'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Due Amount:</label> <?php echo $detailss['due_amount'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Due With:</label> <?php echo $detailss['due_with'];?> </div> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4 col-md-4">Refund Request Letter</label><br/><br/> <?php $ext = pathinfo($detailss['refunded_request_letter'], PATHINFO_EXTENSION); if($ext == 'JPG' || $ext == 'jpg' || $ext == 'JPEG' || $ext == 'jpeg' || $ext == 'png' || $ext == 'PNG') { ?> <img style="height:400px;width:300px;"src="<?php echo base_url('cancellation_uploads');?>/<?php echo $detailss['refunded_request_letter'];?>"/> <?php } else if($ext == 'pdf') { ?> <embed src="<?php echo base_url('cancellation_uploads');?>/<?php echo $detailss['refunded_request_letter'];?>" style="height:500px;width:400px;"/> <?php } ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4 col-md-4">Cancellation Agreement</label><br/><br/> <?php $ext = pathinfo($detailss['cancellation_agreement_image'], PATHINFO_EXTENSION); if($ext == 'JPG' || $ext == 'jpg' || $ext == 'JPEG' || $ext == 'jpeg' || $ext == 'png' || $ext == 'PNG') { ?> <img style="height:400px;width:300px;"src="<?php echo base_url('cancellation_uploads');?>/<?php echo $detailss['cancellation_agreement_image'];?>"/> <?php } else if($ext == 'pdf') { ?> <embed src="<?php echo base_url('cancellation_uploads');?>/<?php echo $detailss['cancellation_agreement_image'];?>" style="height:500px;width:400px;"/> <?php } ?> </div> </div> <!-- row 9----> <?php } } } else { if(!empty($details)) { ?> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Customer Name :</label> <?php echo $details['customer_name'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Project :</label> <?php echo $details['project_name'];?> </div> </div> <!-- row 1----> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Site No :</label> <?php echo $details['site_number'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Dimension :</label> <?php echo $details['total_in_sqft'];?> Sqft </div> </div> <!-- row 2----> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Allocated To :</label> <?php echo $details['reference'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Associate :</label> <?php echo $details['associate'];?> </div> </div> <!-- row 3----> <!-- ---------------------------- --> <h3 class="bok-details"> Booking Details </h3> <div class="color1"> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Booking Date1 :</label> <?php if($details['booking_date1'] == "" || $details['booking_date1'] == "0000-00-00"){echo "";}else {echo date("d-m-Y", strtotime($details['booking_date1']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Booking Amount1 :</label> <?php $details['booking_amount1']; $num=$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.'/-'; ?> </div> </div> <!-- row 4----> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Payment type :</label> <?php if($details['booking_payment_type']=='Online Payment'){echo "NEFT/RTGS";}else if($details['booking_payment_type']=='Paytm Payment'){echo "UPI / Direct Payment";}else if($details['booking_payment_type']=='UPI Payment'){echo "Credit / Debit payment";}else {echo $details['booking_payment_type'];}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($details['confirming_party1']=='confirming_party'){echo "Confirming Party";}else {echo $details['confirming_party1'];}?> </div> </div> <?php if($details['booking_payment_type'] == "Cheque") { ?> <div class="row land_owner_a" id="check_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Cheque No :</label> <?php echo $details['check_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Cheque Date :</label> <?php if($details['check_date'] == "" || $details['check_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['check_date']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Bank Name :</label> <?php echo $details['bank_name'];?> </div> </div> <!-- Check -- --> <?php } ?> <?php if($details['booking_payment_type'] == "DD") { ?> <div class="row land_owner_a" id="check_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">DD No :</label> <?php echo $details['dd_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">DD Date :</label> <?php if($details['dd_date'] == "" || $details['dd_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['dd_date']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Bank Name :</label> <?php echo $details['dd_bank'];?> </div> </div> <!-- Check -- --> <?php } ?> <?php if($details['booking_payment_type'] == "Online Payment") { ?> <div class="row land_owner_a" id="onlinepayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">UTR No :</label> <?php echo $details['vtr_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">NEFT/RTGS Date :</label> <?php if($details['online_date'] == "" || $details['online_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['online_date']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <?php if($details['booking_payment_type'] == "Paytm Payment") { ?> <div class="row land_owner_a" id="onlinepayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Ref No :</label> <?php echo $details['paytm_ref_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Date :</label> <?php if($details['paytm_online_date'] == "" || $details['paytm_online_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['paytm_online_date']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <?php if($details['booking_payment_type'] == "UPI Payment") { ?> <div class="row land_owner_a" id="onlinepayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Ref No :</label> <?php echo $details['upi_ref_no'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5"> Date :</label> <?php if($details['upi_online_date'] == "" || $details['upi_online_date'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['upi_online_date']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <!-- <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($details['confirming_party1']=='confirming_party'){echo "Confirming Party";}else {echo $details['confirming_party1'];}?> </div> </div> --> </div> <div class="color2"> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Booking Date2 :</label> <?php if($details['booking_date2'] == "" || $details['booking_date2'] == "0000-00-00"){echo "";}else {echo date("d-m-Y", strtotime($details['booking_date2']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Booking Amount2 :</label> <?php $details['booking_amount2']; $num=$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.'/-'; ?> </div> </div> <!-- row 4----> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Payment type :</label> <?php if($details['booking_payment_type2'] == '0'){echo "";}else if($details['booking_payment_type2']=='Online Payment'){echo "NEFT/RTGS";}else if($details['booking_payment_type2']=='Paytm Payment'){echo "UPI / Direct Payment";}else if($details['booking_payment_type2']=='UPI Payment'){echo "Credit / Debit Payment";}else {echo $details['booking_payment_type2'];}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($details['confirming_party2']=='confirming_party'){echo "Confirming Party";}else {echo $details['confirming_party2'];}?> </div> </div> <?php if($details['booking_payment_type2'] == "Cheque") { ?> <div class="row land_owner_a" id="check_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Cheque No :</label> <?php echo $details['check_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Cheque Date :</label> <?php if($details['check_date2'] == "" || $details['check_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['check_date2']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Bank Name :</label> <?php echo $details['bank_name2'];?> </div> </div> <!-- Check -- --> <?php } ?> <?php if($details['booking_payment_type2'] == "DD") { ?> <div class="row land_owner_a" id="check_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">DD No :</label> <?php echo $details['dd_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">DD Date :</label> <?php if($details['dd_date2'] == "" || $details['dd_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['dd_date2']));}?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Bank Name :</label> <?php echo $details['dd_bank2'];?> </div> </div> <!-- Check -- --> <?php } ?> <?php if($details['booking_payment_type2'] == "Online Payment") { ?> <div class="row land_owner_a" id="onlinepayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">UTR No :</label> <?php echo $details['vtr_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">NEFT/RTGS Date :</label> <?php if($details['online_date2'] == "" || $details['online_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['online_date2']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <?php if($details['booking_payment_type2'] == "Paytm Payment") { ?> <div class="row land_owner_a" id="onlinepayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Ref No :</label> <?php echo $details['paytm_ref_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5"> Date :</label> <?php if($details['paytm_online_date2'] == "" || $details['paytm_online_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['paytm_online_date2']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <?php if($details['booking_payment_type2'] == "UPI Payment") { ?> <div class="row land_owner_a" id="onlinepayment_div"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Ref No :</label> <?php echo $details['upi_ref_no2'];?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Date :</label> <?php if($details['upi_online_date2'] == "" || $details['upi_online_date2'] == "0000-00-00"){echo "";} else {echo date("d-m-Y", strtotime($details['upi_online_date2']));}?> </div> </div> <!-- Online Payment -- --> <?php } ?> <!-- <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($details['confirming_party2']=='confirming_party'){echo "Confirming Party";}else {echo $details['confirming_party2'];}?> </div> </div> --> </div> <?php if(!empty($agreement)) { ?> <div class="color1"> <div class="row land_owner_a"> <?php foreach($agreement as $payments) { ?> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Agreement Date:</label> <?php echo date("d-m-Y", strtotime($payments->agreement_date));?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Agreement Amount :</label> <?php $payments->agreement_amount; $num=$payments->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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Mode:</label> <?php if($payments->agreement_payment_mode == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($payments->agreement_payment_mode == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($payments->agreement_payment_mode == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $payments->agreement_payment_mode.'<br/>'; } if($payments->agreement_payment_mode == "Cash") { echo ""; } else if($payments->agreement_payment_mode == "Cheque") { echo '<label class="col-sm-5">Cheque no.:</label>'.$payments->agreement_cheque_no.'<br/>'; echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payments->agreement_cheque_date)).'<br/>'; echo '<label class="col-sm-5">Bank:</label>'.$payments->agreement_bank.'<br/>'; } else if($payments->agreement_payment_mode == "Online Payment") { echo '<label class="col-sm-5">UTR no.:</label>'.$payments->agreement_vtr_no.'<br/>'; if($payments->agreement_online_date == "" || $payments->agreement_online_date == "0000-00-00") { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'; } else { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'.date("d-m-Y", strtotime($payments->agreement_online_date)).'<br/>'; } } else if($payments->agreement_payment_mode == "Paytm Payment") { echo '<label class="col-sm-5">Ref no.:</label>'.$payments->agreementpaytm_ref_no.'<br/>'; if($payments->agreementpaytm_online_date1 == "" || $payments->agreementpaytm_online_date1 == "0000-00-00") { echo '<label class="col-sm-5">Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payments->agreementpaytm_online_date1)).'<br/>'; } } else if($payments->agreement_payment_mode == "UPI Payment") { echo '<label class="col-sm-5">Ref no.:</label>'.$payments->agreementupi_ref_no.'<br/>'; if($payments->agreementupi_online_date1 == "" || $payments->agreementupi_online_date1 == "0000-00-00") { echo '<label class="col-sm-5">Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payments->agreementupi_online_date1)).'<br/>'; } } else if($payments->agreement_payment_mode == "DD") { echo '<label class="col-sm-5">DD no.</label>'.$payments->agreement_dd_no.'<br/>'; echo '<label class="col-sm-5">Date</label>'.date("d-m-Y", strtotime($payments->agreement_dd_date)).'<br/>'; echo '<label class="col-sm-5">Bank</label>'.$payments->agreement_dd_bank.'<br/>'; } ?> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($payments->agreement_confirming_type=='confirming_party'){echo "Confirming Party";}else {echo $payments->agreement_confirming_type;}?> </div> </div> <?php } ?> </div> <!-- row 6----> </div> <?php }?> <?php $i = 1; $h=1; foreach($payment as $key=>$payment) { if($payment->installment_amount1 != 0 || $payment->installment_payment_mode1 != 0) { ?> <div class="<?php if(empty($agreement)) { if($key % 2 != 0){ echo 'color2'; } else { echo 'color1';} } else { if($key % 2 == 0){ echo 'color2'; } else { echo 'color1';} } ?>"> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Instalment 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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Instalment<?php echo $h; ?> Date:</label> <?php echo date("d-m-Y", strtotime($payment->installment1_date));?> </div> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">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 == "Online Payment") { echo '<label class="col-sm-5">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-5">NEFT / RTGS date:</label>'; } else { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'.date("d-m-Y", strtotime($payment->install_online_date1)).'<br/>'; } } else if($payment->installment_payment_mode1 == "Cash") { echo ""; } else if($payment->installment_payment_mode1 == "Cheque") { echo '<label class="col-sm-5">Cheque no.:</label>'.$payment->install_cheque_no1.'<br/>'; echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->install_cheque_date1)).'<br/>'; echo '<label class="col-sm-5">Bank:</label>'.$payment->install_bank1.'<br/>'; } else if($payment->installment_payment_mode1 == "Paytm Payment") { echo '<label class="col-sm-5">Ref no.:</label>'.$payment->paytm_ref_no.'<br/>'; if($payment->paytm_online_date == "" || $payment->paytm_online_date == "0000-00-00") { echo '<label class="col-sm-5">Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->paytm_online_date)).'<br/>'; } } else if($payment->installment_payment_mode1 == "UPI Payment") { echo '<label class="col-sm-5">Ref no.:</label>'.$payment->upi_ref_no.'<br/>'; if($payment->upi_online_date == "" || $payment->upi_online_date == "0000-00-00") { echo '<label class="col-sm-5">Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->upi_online_date)).'<br/>'; } } else if ($payment->installment_payment_mode1 == "DD") { echo '<label class="col-sm-5">DD no.</label>'.$payment->install_dd_no1.'<br/>'; echo '<label class="col-sm-5">Date</label>'.date("d-m-Y", strtotime($payment->install_dd_date1)).'<br/>'; echo '<label class="col-sm-5">Bank</label>'.$payment->install_dd_bank1.'<br/>'; } ?> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($payment->installment_confirming_type=='confirming_party'){echo "Confirming Party";}else {echo $payment->installment_confirming_type;}?> </div> </div> </div> </div> <!-- row 6----> <?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-6"> <label class="col-sm-5">Instalment Amount2:</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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Instalment<?php echo $h; ?> Date:</label> <?php echo date("d-m-Y", strtotime($payment->installment2_date));?> </div> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">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 == "Online Payment") { echo '<label class="col-sm-5">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-5">NEFT / RTGS date:</label>'; } else { echo '<label class="col-sm-5">NEFT / RTGS date:</label>'.date("d-m-Y", strtotime($payment->install_online_date2)).'<br/>'; } } else if($payment->installment_payment_mode2 == "Cash") { echo ""; } else if($payment->installment_payment_mode2 == "Cheque") { echo '<label class="col-sm-5">Cheque no.:</label>'.$payment->install_cheque_no2.'<br/>'; echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->install_cheque_date2)).'<br/>'; echo '<label class="col-sm-5">Bank:</label>'.$payment->install_bank2.'<br/>'; } else if($payment->installment_payment_mode2 == "Paytm Payment") { echo '<label class="col-sm-5">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-5">Date:</label>'; } else { echo '<label class="col-sm-5">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-5">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-5">Date:</label>'; } else { echo '<label class="col-sm-5">Date:</label>'.date("d-m-Y", strtotime($payment->upi_online_date2)).'<br/>'; } } else if($payment->installment_payment_mode2 == "DD") { echo '<label class="col-sm-5">DD no.</label>'.$payment->install_dd_no2.'<br/>'; echo '<label class="col-sm-5">Date</label>'.date("d-m-Y", strtotime($payment->install_dd_date2)).'<br/>'; echo '<label class="col-sm-5">Bank</label>'.$payment->install_dd_bank2.'<br/>'; } ?> </div> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-5">Confirming Type :</label> <?php if($payment->confirming_party1=='confirming_party'){echo "Confirming Party";}else {echo $payment->confirming_party1;}?> </div> </div> </div> <?php } $h++; } ?> <?php if(!empty($total_amount)) { $installment_amount11=0;$installment_amount12=0; foreach($total_amount as $total){ $booking_amount = $total->booking_amount1+$total->booking_amount2; $agreement_amount = $total->agreement_amount; $installment_amount11 += $total->installment_amount1; $installment_amount12 += $total->installment_amount2; $total_res = $booking_amount+$agreement_amount+$installment_amount11+$installment_amount12; } $num=$total_res;$explrestunits = "" ; if(strlen($num)>3) { $lastthree = substr($num, strlen($num)-3, strlen($num)); $restunits = substr($num, 0, strlen($num)-3); $restunits = (strlen($restunits)%2 == 1)?"0".$restunits:$restunits; $expunit = str_split($restunits, 2); for($i=0; $i<sizeof($expunit); $i++) { if($i==0) { $explrestunits .= (int)$expunit[$i].","; } else { $explrestunits .= $expunit[$i].","; } } $thecash = $explrestunits.$lastthree; } else { $thecash = $num; } ?> <h4 class="total_paid2"style="background: green;color: white; display: inline-block; padding: 5px 10px 9px;">Total Paid: <span style="color: white;"><?php echo 'Rs. '. $thecash. '/-'; ?></span></h4> <?php } else { echo "abc"; } ?> <div class="color3"> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4 col-md-4">Refund Request Letter</label><br/><br/> <?php $ext = pathinfo($details['refunded_request_letter'], PATHINFO_EXTENSION); if($ext == 'JPG' || $ext == 'jpg' || $ext == 'JPEG' || $ext == 'jpeg' || $ext == 'png' || $ext == 'PNG') { ?> <img style="height:400px;width:300px;"src="<?php echo base_url('cancellation_uploads');?>/<?php echo $details['refunded_request_letter'];?>"/> <?php } else if($ext == 'pdf') { ?> <embed src="<?php echo base_url('cancellation_uploads');?>/<?php echo $details['refunded_request_letter'];?>" style="height:500px;width:400px;"/> <?php } ?> </div> <div class="form-group col-sm-12 col-md-6"> <label class="col-sm-4 col-md-4">Cancellation Agreement</label><br/><br/> <?php $ext = pathinfo($details['cancellation_agreement_image'], PATHINFO_EXTENSION); if($ext == 'JPG' || $ext == 'jpg' || $ext == 'JPEG' || $ext == 'jpeg' || $ext == 'png' || $ext == 'PNG') { ?> <img style="height:400px;width:300px;"src="<?php echo base_url('cancellation_uploads');?>/<?php echo $details['cancellation_agreement_image'];?>"/> <?php } else if($ext == 'pdf') { ?> <embed src="<?php echo base_url('cancellation_uploads');?>/<?php echo $details['cancellation_agreement_image'];?>" style="height:500px;width:400px;"/> <?php } ?> </div> </div> <!-- row 9----> </div> <?php } }?> <?php if(!empty($detailss)) { $total_paid=0; if($detailss['refunded'] == 'Yes') { if(!empty($detailss['mul_refunds'])) { foreach($detailss['mul_refunds'] as $details){ $total_paid+=$details->refunded_amount; } } } $num=$total_paid;$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; } ?> <h4 class="total_paid">Total Refunded Amount: <span style="color: green;"><?php echo 'Rs. '. $thecash. '/-'; ?></span></h4> <?php } else { } ?> </section> <!--- section 2 ----> <script> function fun_edit() { var cancellation_id= "<?php echo $this->uri->segment(2);?>"; $.ajax({ url:"<?php echo site_url('edit-cancellation-details')?>/"+ cancellation_id, type:"POST", //data:{project_id:project_id}, success:function(response) { //alert(response); window.location.href="<?php echo site_url('edit-cancellation-details')?>/"+ cancellation_id; } }); } </script> <script type="text/javascript"> $(document).ready(function(){ $.ajax({ type : 'get', url : '<?php echo site_url("get-branches-list")?>', success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result==1) { var select_content = ''; select_content += '<option value="">Select</option>'; $.each(response.result1,function(idx,vx){ select_content += '<option value="'+vx.branch+'">'+vx.branch+'</option>'; }); $(".branches_list").html(select_content); } } }); $('.refunded_date').datepicker({ changeMonth:true, changeYear:true, yearRange: "1940:c", // dateFormat: 'yy-mm-dd' dateFormat: 'dd-mm-yy' }); $(".refund_amount_class").keyup(function(){ var total = $("input[name=total]").val(); var refund_amount = $("input[name=refunded_amount]").val(); var sub_total = parseInt(total)-parseInt(refund_amount); if(parseInt(refund_amount) > parseInt(total)) { toastr['error']("Refund amount exeeded"); $("input[name=due_amount]").val(''); $(".submit").attr('disabled', 'disabled'); } else { $("input[name=due_amount]").val(parseInt(sub_total)); $(".submit").removeAttr('disabled'); } }); $("input[name='refunded_payment_mode']").change(function(){ var value = $('input[name=refunded_payment_mode]:checked').val(); if(value == "Cheque") { var check_content = ''; check_content += '<div class="row land_owner_a">'; check_content += '<div class="form-group col-sm-12 col-md-6">'; check_content += '<label class="col-sm-4">Cheque No</label>'; check_content += '<input type="text" class="form-control col-sm-8" name="cheque_no" required="required">'; check_content += '</div>'; check_content += '<div class="form-group col-sm-12 col-md-6">'; check_content += '<label class="col-sm-4">Cheque Date</label>'; check_content += '<input type="rext" class="form-control col-sm-8 date_picker" name="cheque_date" max="" required="required">'; check_content += '</div>'; check_content += '</div>'; check_content += '<div class="row land_owner_a">'; check_content += '<div class="form-group col-sm-12 col-md-6">'; check_content += '<label class="col-sm-4">Bank Name</label>'; check_content += '<input type="text" class="form-control col-sm-8" name="bank_name" required="required">'; check_content += '</div>'; check_content += '</div>'; $("#cheque_div").html(check_content).fadeIn('slow'); $('.date_picker').datepicker({ dateFormat: 'dd-mm-yy' }); } else { $("#cheque_div").empty(); } }); $('.refund_form').submit(function(e){ e.preventDefault(); formdata = new FormData($(this)[0]); $(".submit").attr('disabled', 'disabled'); $(".submit_button").text("Submitting..."); var payment_type = $("input[name='refunded_payment_mode']:checked").val(); if(payment_type == undefined) { $(".submit_button").text("Submit"); toastr["error"]("Select atleast one payment type"); $(".submit_button").removeAttr('disabled'); } else { $.ajax({ type : 'post', url : '<?php echo site_url("add-refund-details")?>', data : formdata, contentType: false, processData: false, success:function(response){ response=jQuery.parseJSON(response); console.log(response); if(response.result==1) { $(".submit").text("Submit"); $(".submit").removeAttr('disabled'); var print_content = ''; print_content += '<div style="width:700px;"><style>.inv-ta-head{padding-top:5px;}.invoicetext{text-align:center;//margin-bottom:10px;}table{border-spacing:0;margin-left:10px;}td{padding:6px;}table.reference td:first-child, table.reference th:first-child {border-left: 1px solid #47ae32;}html, body {margin: 0 !important;padding: 0 !important;color: #000000 !important;font-family: Lato, Helvetica !important;font-size: 14px !important;}h1, ul, li, span, p, h2, h3, h4{padding:0 !important;margin: 0 auto !important;}.pding{//padding-right:17px;//padding-left:17px;}.pding p{padding-bottom: 3px !important;}</style>'; print_content += '<div id="printableArea">'; print_content += '<div class="inv-ta-head"></div> <!--- header END ------>'; print_content += '<div class="logo" style="padding-top:10px;">'; print_content += '<img src="<?php echo base_url("assets/admin_dashboard/images/logo.png");?>" class="img-responsive center-block" style="padding-left: 31%;padding-bottom: 6px;">'; print_content += '<p style="text-align:center; padding-top:5px;">#1104, First Floor, Udayaravi Road, Kuvempunagar, Mysore - 570023.</p>'; print_content += '<p style="text-align:center;"><b>Ph : 0821-4243950   /   gss@investinmysore.com </b> </p>'; print_content += '</div>'; print_content += '<div class="row">'; print_content += '<table border="0" style="width:100%; border-color: white; padding-top: 7px;">'; print_content += '<tr>'; print_content += '<td colspan="3" class="pding">'; print_content += '<p><strong> Name : </strong>'+response.booking_receipt.customer_name+'</p>'; print_content += '<p><strong> Phone : </strong>'+response.number+'</p>'; print_content += '</td>'; print_content += '<td colspan="3" class="pding">'; print_content += '<p><strong>Address : </strong>'+response.user_data.address+'</p>'; print_content += '<p><strong>Email : </strong>'+response.user_data.email+'</p>'; print_content += '</td>'; print_content += '<td colspan="6" class="pding">'; print_content += '<p><strong>Receipt No : </strong> 1</p>'; var date = new Date(response.todays_date); var Month=new Array("01", "02", "03","04", "05", "06", "07", "08", "09", "10", "11", "12"); var day = date.getDate(); var month = date.getMonth(); var year=date.getFullYear(); print_content += '<p><strong>Bill Date : </strong>'+day+"-"+Month[month]+"-"+year+'</p>'; print_content += '</td>'; print_content += '</tr>'; print_content += '<tr style="background:#f3f2f2;">'; print_content += '<td colspan="3" class="pding" style="border-bottom: 1px solid silver; border-top: 1px solid silver;">'; print_content += '<strong>Site No.</strong>'; print_content += '</td>'; print_content += '<td colspan="2" class="pding" style="border-bottom: 1px solid silver; border-top: 1px solid silver;">'; print_content += '<strong>Project Name</strong>'; print_content += '</td>'; print_content += '<td colspan="3 class="pding" style="border-bottom: 1px solid silver; border-top: 1px solid silver;">'; print_content += '<strong>Received</strong>'; print_content += '</td>'; print_content += '<td colspan="4" class="pding" style="border-bottom: 1px solid silver; border-top: 1px solid silver;">'; print_content += '<strong>Refund date</strong>'; print_content += '</td>'; print_content += '</tr>'; var x=parseInt(response.refunded.refunded_amount); x=x.toString(); var lastThree = x.substring(x.length-3); var otherNumbers = x.substring(0,x.length-3); if(otherNumbers != '') lastThree = ',' + lastThree; var res = otherNumbers.replace(/\B(?=(\d{2})+(?!\d))/g, ",") + lastThree; print_content += '<tr>'; print_content += '<td colspan="3" class="pding">'+response.booking_receipt.site_number+'</td>'; print_content += '<td colspan="2" class="pding">'+response.booking_receipt.project_name+'</td>'; print_content += '<td colspan="3" class="pding">'+'Rs. '+res+'/-</td>'; var date = new Date(response.refunded.refunded_date); var Month=new Array("01", "02", "03","04", "05", "06", "07", "08", "09", "10", "11", "12"); var day = date.getDate(); var month = date.getMonth(); var year=date.getFullYear(); print_content += '<td colspan="4" class="pding">'+day+"-"+Month[month]+"-"+year+'</td>'; print_content += '</tr>'; print_content += '<tr>'; print_content += '<td colspan="12" style="text-align:left; border-bottom: 1px solid silver; border-top: 1px solid silver;">'; print_content += 'Towards refund payment'; print_content += '</td>'; print_content += '</tr>'; var words = new Array(); words[0] = ''; words[1] = 'One'; words[2] = 'Two'; words[3] = 'Three'; words[4] = 'Four'; words[5] = 'Five'; words[6] = 'Six'; words[7] = 'Seven'; words[8] = 'Eight'; words[9] = 'Nine'; words[10] = 'Ten'; words[11] = 'Eleven'; words[12] = 'Twelve'; words[13] = 'Thirteen'; words[14] = 'Fourteen'; words[15] = 'Fifteen'; words[16] = 'Sixteen'; words[17] = 'Seventeen'; words[18] = 'Eighteen'; words[19] = 'Nineteen'; words[20] = 'Twenty'; words[30] = 'Thirty'; words[40] = 'Forty'; words[50] = 'Fifty'; words[60] = 'Sixty'; words[70] = 'Seventy'; words[80] = 'Eighty'; words[90] = 'Ninety'; amount = response.refunded.refunded_amount.toString(); var atemp = amount.split("."); var number = atemp[0].split(",").join(""); var n_length = number.length; var words_string = ""; if (n_length <= 9) { var n_array = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0); var received_n_array = new Array(); for (var i = 0; i < n_length; i++) { received_n_array[i] = number.substr(i, 1); } for (var i = 9 - n_length, j = 0; i < 9; i++, j++) { n_array[i] = received_n_array[j]; } for (var i = 0, j = 1; i < 9; i++, j++) { if (i == 0 || i == 2 || i == 4 || i == 7) { if (n_array[i] == 1) { n_array[j] = 10 + parseInt(n_array[j]); n_array[i] = 0; } } } value = ""; for (var i = 0; i < 9; i++) { if (i == 0 || i == 2 || i == 4 || i == 7) { value = n_array[i] * 10; } else { value = n_array[i]; } if (value != 0) { words_string += words[value] + " "; } if ((i == 1 && value != 0) || (i == 0 && value != 0 && n_array[i + 1] == 0)) { words_string += "Crores "; } if ((i == 3 && value != 0) || (i == 2 && value != 0 && n_array[i + 1] == 0)) { words_string += "Lakhs "; } if ((i == 5 && value != 0) || (i == 4 && value != 0 && n_array[i + 1] == 0)) { words_string += "Thousand "; } if (i == 6 && value != 0 && (n_array[i + 1] != 0 && n_array[i + 2] != 0)) { words_string += "Hundred and "; } else if (i == 6 && value != 0) { words_string += "Hundred "; } } words_string = words_string.split(" ").join(" "); } if(response.refunded.refunded_payment_mode == "Cash") { print_content += '<tr>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"> Cash</td>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"></td>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"></td>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"></td>'; print_content += '</tr>'; print_content += '<tr>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;">'+words_string+' Only</td>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"></td>'; print_content += '<td colspan="4" style="border-bottom: 1px solid silver;"></td>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"></td>'; print_content += '</tr>'; } else if(response.refunded.refunded_payment_mode == "Cheque") { var date = new Date(response.refunded.cheque_date); var Month=new Array("01", "02", "03","04", "05", "06", "07", "08", "09", "10", "11", "12"); var day = date.getDate(); var month = date.getMonth(); var year=date.getFullYear(); print_content += '<tr>'; print_content += '<td colspan="2" style="border-bottom: 1px solid silver;">Cheque: </td>'; print_content += '<td colspan="2" style="border-bottom: 1px solid silver;"> Cheque no : '+response.refunded.cheque_no+'</td>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"> Bank : '+response.refunded.bank_name+'</td>'; print_content += '<td colspan="5" style="border-bottom: 1px solid silver;">Cheque Date : '+day+"-"+Month[month]+"-"+year+'</td>'; print_content += '</tr>'; print_content += '<tr>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;">'+words_string+' Only</td>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"></td>'; print_content += '<td colspan="4" style="border-bottom: 1px solid silver;"></td>'; print_content += '<td colspan="3" style="border-bottom: 1px solid silver;"></td>'; print_content += '</tr>'; } print_content += '<td colspan="4" style="padding-top:42px;"> Bill Generated By</td>'; print_content += '<td colspan="2"> </td>'; print_content += '<td colspan="6" style="padding-top:42px;"> For Authorized Signatory </td>'; print_content += '</tr>'; print_content += '</table>'; print_content += '</div>'; print_content += '</div>'; print_content += '</div><!--table div-->'; $("#print_div").html(print_content); var newWindow = window.open('', '', 'width=100, height=100'), document = newWindow.document.open(), pageContent = print_content; document.write(pageContent); document.close(); newWindow.moveTo(0, 0); newWindow.resizeTo(screen.width, screen.height); setTimeout(function() { newWindow.print(); newWindow.close(); }); } else { toastr["error"](response.message); $(".submit").text("Submit"); $(".submit").removeAttr('disabled'); } } }); } }); }); </script> <!-- <style type="text/css"> .content-wrapper, .right-side { min-height: 1100px !important; } </style> --> <style type="text/css"> .content-wrapper, .right-side { min-height: 2000px !important; } .bok-details{ background: gainsboro; text-align: center; padding-top: 7px; padding-bottom: 7px; margin-bottom: 30px; margin-top: 33px; } a { color: inherit; } .color1{ color: #7C9F64; border: 1px solid #333; padding-top: 10px; padding-bottom: 10px; margin-bottom: 20px; } .color2{ color: #8149AC; border: 1px solid #333; padding-top: 10px; padding-bottom: 10px; margin-bottom: 20px; } .color3{ color:#99997E; border: 1px solid #333; padding-top: 10px; padding-bottom: 10px; margin-bottom: 20px; } .land_owner_a { margin-bottom: 0px; } </style> <?php echo view('includes/footer');?>