EVOLUTION-NINJA
Edit File: payment_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');?>"> <section class="content-header"> <h1>Payment details </h1> </section> <!--- section 1 ----> <section class="content"> <div class="col-sm-12 col-md-12"> <form id="land_owner" class="form-inline payment_form"> <input type="hidden" class="form-control col-sm-8 booking_id" name="booking_id" required="required"> <input type="hidden" class="form-control col-sm-8 detail_id" name="detail_id" required="required"> <?php $total=0;if(!empty($others)) { if($others->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:</label> <?php $others->booking_amount1; $num=$others->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 col-sm-4">Booking Date:</label> <?php if($others->booking_date1 =='0000-00-00' || $others->booking_date1 =='' || $others->booking_date1 =='1970-01-01' ){echo '';}else {echo date("d-m-Y", strtotime($others->booking_date1));}?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($others->booking_payment_type == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($others->booking_payment_type == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($others->booking_payment_type == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $others->booking_payment_type.'<br/>'; } if($others->booking_payment_type == "Cash") { echo ""; } else if($others->booking_payment_type == "Cheque") { if(!empty($others->check_no)) { echo '<label class="col-sm-4">Cheque no.</label>'.$others->check_no.'<br/>'; if($others->check_date == "" || $others->check_date == "0000-00-00" || $others->check_date =='1970-01-01') { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($others->check_date)).'<br/>'; } echo '<label class="col-sm-4">Bank</label>'.$others->bank_name.'<br/>'; } } else if($others->booking_payment_type == "Online Payment") { echo '<label class="col-sm-4">UTR no.</label>'.$others->vtr_no.'<br/>'; if($others->online_date == "" || $others->online_date == "0000-00-00" || $others->online_date =='1970-01-01' ) { echo '<label class="col-sm-4">NEFT date</label>'.'<br></br>'; } else { echo '<label class="col-sm-4">NEFT date</label>'.date("d-m-Y", strtotime($others->online_date)).'<br/>'; } } else if($others->booking_payment_type == "DD") { echo '<label class="col-sm-4">DD no.</label>'.$others->dd_no.'<br/>'; if($others->dd_date == "" || $others->dd_date == "0000-00-00" || $others->dd_date =='1970-01-01') { echo '<label class="col-sm-4"> Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($others->dd_date)).'<br/>'; } echo '<label class="col-sm-4">Bank</label>'.$others->dd_bank.'<br/>'; } else if($others->booking_payment_type == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$others->paytm_num.'<br/>'; if($others->paytm_online_date == "" || $others->paytm_online_date == "0000-00-00" || $others->paytm_online_date =='1970-01-01') { echo '<label class="col-sm-4"> Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($others->paytm_online_date)).'<br/>'; } } else if($others->booking_payment_type == "UPI Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$others->upi_num.'<br/>'; if($others->upi_online_date == "" || $others->upi_online_date == "0000-00-00" || $others->upi_online_date =='1970-01-01') { echo '<label class="col-sm-4"> Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($others->upi_online_date)).'<br/>'; } } ?> <label class="col-sm-4">Confirming Type:</label> <?php if($others->booking1_confirming_type == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $others->booking1_confirming_type.'<br/>'; } ?> </div> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <!-- row 5----> <?php } if($others->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 $others->booking_amount2; $num=$others->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:</label> <?php if($others->booking_date2 =='0000-00-00' || $others->booking_date2 =='' || $others->booking_date2 =='1970-01-01'){echo '';}else {echo date("d-m-Y", strtotime($others->booking_date2));}?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">Mode:</label> <?php if($others->booking_payment_type2 == "Online Payment") { echo 'NEFT / RTGS'.'<br/>'; } else if($others->booking_payment_type2 == "Paytm Payment") { echo 'UPI / Direct Payment'.'<br/>'; } else if($others->booking_payment_type2 == "UPI Payment") { echo 'Credit / Debit Payment'.'<br/>'; } else { echo $others->booking_payment_type2.'<br/>'; } if($others->booking_payment_type2 == "Cash") { echo ""; } else if($others->booking_payment_type2 == "Cheque") { if(!empty($others->check_no2)) { echo '<label class="col-sm-4">Cheque no.</label>'.$others->check_no2.'<br/>'; if($others->check_date2 == "" || $others->check_date2 == "0000-00-00" || $others->check_date2 =='1970-01-01') { echo '<label class="col-sm-4"> Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($others->check_date2)).'<br/>'; } echo '<label class="col-sm-4">Bank</label>'.$others->bank_name2.'<br/>'; } } else if($others->booking_payment_type2 == "Online Payment") { echo '<label class="col-sm-4">UTR no.</label>'.$others->vtr_no2.'<br/>'; if($others->online_date2 == "" || $others->online_date2 == "0000-00-00" || $others->check_date2 =='1970-01-01' ) { 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($others->online_date2)).'<br/>'; } } else if($others->booking_payment_type2 == "DD") { echo '<label class="col-sm-4">DD no.</label>'.$others->dd_no2.'<br/>'; if($others->dd_date2 == "" || $others->dd_date2 == "0000-00-00" || $others->dd_date2 =='1970-01-01') { echo '<label class="col-sm-4"> Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($others->dd_date2)).'<br/>'; } echo '<label class="col-sm-4">Bank</label>'.$others->dd_bank2.'<br/>'; } else if($others->booking_payment_type2 == "Paytm Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$others->paytm_num2.'<br/>'; if($others->paytm_date == "" || $others->paytm_date == "0000-00-00" || $others->paytm_date =='1970-01-01') { echo '<label class="col-sm-4"> Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($others->paytm_date)).'<br/>'; } } else if($others->booking_payment_type2 == "UPI Payment") { echo '<label class="col-sm-4">Ref no.</label>'.$others->upi_num2.'<br/>'; if($others->upi_date == "" || $others->upi_date == "0000-00-00" || $others->upi_date =='1970-01-01') { echo '<label class="col-sm-4">Date</label>'.'<br>'; } else { echo '<label class="col-sm-4">Date</label>'.date("d-m-Y", strtotime($others->upi_date)).'<br/>'; } } ?> <label class="col-sm-4">Confirming Type:</label> <?php if($others->booking2_confirming_type == "confirming_party") { echo 'Confirm Party'.'<br/>'; } else { echo $others->booking2_confirming_type.'<br/>'; } ?> </div> </div> <hr style="height:2px;border-width:0;color:gray;background-color:gray"> <!-- row 5----> <?php } } ?> <?php if(!empty($agreement_details)) { 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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4">Agreement Date:</label> <?php if($agreement_details->agreement_date =='0000-00-00' ||$agreement_details->agreement_date =='' || $agreement_details->agreement_date =='1970-01-01' ){echo '';}else {echo date("d-m-Y", strtotime($agreement_details->agreement_date));}?> </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 == "" || $agreement_details->agreement_cheque_date == "0000-00-00" || $agreement_details->agreement_cheque_date =='1970-01-01' ) { 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">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" || $agreement_details->agreement_online_date =='1970-01-01') { 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 == "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" || $agreement_details->agreement_dd_date =='1970-01-01') { 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/>'; } 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" || $agreement_details->agreementpaytm_online_date1 =='1970-01-01') { echo '<label class="col-sm-4"> Date</label>'.'<br></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" || $agreement_details->agreementupi_online_date1 =='1970-01-01') { 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/>'; } } ?> <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> <hr> <?php } } ?> <?php $i = 1; $h=1; 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">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-4"> <label class="col-sm-4 col-md-4">Instalment<?php echo $h; ?> Date:</label> <?php if($payment->installment1_date =='0000-00-00' ||$payment->installment1_date =='' || $payment->installment1_date =='1970-01-01'){echo '';}else {echo date("d-m-Y", strtotime($payment->installment1_date));}?> </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") { if($payment->install_cash_date == "" || $payment->install_cash_date == "0000-00-00" || $payment->install_cash_date == "0" || $payment->install_cash_date =='1970-01-01') { 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_cash_date)).'<br/>'; } } else if($payment->installment_payment_mode1 == "Swipe") { if($payment->install_swipe_date == "" || $payment->install_swipe_date == "0000-00-00" || $payment->install_swipe_date == "0" || $payment->install_swipe_date =='1970-01-01') { 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_swipe_date)).'<br/>'; } } 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" || $payment->install_cheque_date1 == "0" || $payment->install_cheque_date1 =='1970-01-01') { 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" || $payment->install_online_date1 == "0" || $payment->install_online_date1 =='1970-01-01') { 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" || $payment->install_dd_date1 == "0" || $payment->install_dd_date1 =='1970-01-01') { 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" || $payment->paytm_online_date1 =='1970-01-01') { 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" || $payment->upi_online_date1 =='1970-01-01') { 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"> </div> </div> <hr> <!-- 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 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-4"> <label class="col-sm-4 col-md-4">Instalment<?php echo $h; ?> Date:</label> <?php if($payment->installment2_date =='0000-00-00' || $payment->installment2_date ==''){echo '';}else {echo date("d-m-Y", strtotime($payment->installment2_date));}?> </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") { if($payment->install_cash_date == "" || $payment->install_cash_date == "0000-00-00" || $payment->install_cash_date == "0" || $payment->install_cash_date =='1970-01-01') { 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_cash_date)).'<br/>'; } } else if($payment->installment_payment_mode2 == "Swipe") { if($payment->install_swipe_date == "" || $payment->install_swipe_date == "0000-00-00" || $payment->install_swipe_date == "0" || $payment->install_swipe_date =='1970-01-01') { 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_swipe_date)).'<br/>'; } } 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" || $payment->install_cheque_date2 =='1970-01-01') { 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" || $payment->install_online_date2 =='1970-01-01') { 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" || $payment->install_dd_date2 =='1970-01-01') { 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" || $payment->paytm_online_date2 =='1970-01-01') { 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" || $payment->upi_online_date2 =='1970-01-01') { 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($agreement_details->confirming_party1 == "confirming_party") { echo 'Confirming Party'.'<br/>'; } else { echo $agreement_details->confirming_party1.'<br/>'; } ?> </div> </div> <hr> <!-- row 6----> <?php } ?> <?php $h++; } ?> <?php //print_r($registration1_details); // die(); if(!empty($registration1_details)) { if($registration1_details->agreement_amount != 0 || $registration1_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"> 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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4 col-md-4">Registration Date:</label> <?php if($registration1_details->registration_date =='0000-00-00' || $registration1_details->registration_date =='' || $registration1_details->registration_date =='1970-01-01' ){echo '';}else {echo date("d-m-Y", strtotime($registration1_details->registration_date));}?> </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") { 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" || $registration1_details->swipe_date =='1970-01-01') { 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/>'; } } else if($registration1_details->registration_payment_mode == "Cheque") { 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" || $registration1_details->regn_cheque_date =='1970-01-01') { 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" || $registration1_details->regn_online_date =='1970-01-01') { 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") { 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" || $registration1_details->regn_dd_date =='1970-01-01') { 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" || $registration1_details->regn_paytm_date =='1970-01-01') { 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" || $registration1_details->regn_upi_date =='1970-01-01') { 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/>'; } } ?> <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> <div class="row land_owner_a"> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6"> Registration Value:</label> <?php $registration1_details->registration_value; $num=$registration1_details->registration_value;$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> <hr> <!-- row 8----> <?php } } ?> <?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.'/-'; ?> </div> <div class="form-group col-sm-12 col-md-4"> <!-- <label class="col-sm-4 col-md-4">Registration Date:</label> <?php if($get_reg_amt->reg_date != '0000-00-00') {echo date("d-m-Y", strtotime($get_reg_amt->reg_date));}else {echo "";}?>--> </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" || $get_reg_amt->mode_date =='1970-01-01') { 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 == "Swipe") { if($get_reg_amt->mode_date == "" || $get_reg_amt->mode_date == "0000-00-00" || $get_reg_amt->mode_date =='1970-01-01') { 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" || $get_reg_amt->mode_date =='1970-01-01') { 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" || $get_reg_amt->mode_date =='1970-01-01') { 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" || $get_reg_amt->mode_date =='1970-01-01') { 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" || $get_reg_amt->mode_date =='1970-01-01') { 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" || $get_reg_amt->mode_date =='1970-01-01') { 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> <!-- <?php print_r($get_reg_amt);?>--> <!-- <div class="form-group col-sm-12 col-md-4"> <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> <?php $a++; } }?> <div class="row land_owner_a"> <?php if(!empty($others->maintenence_amount)) { if($others->maintenence_amount != '' || $others->maintenence_amount != '0') { ?> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6">Maintainance:</label> <?php $others->maintenence_amount; $num=$others->maintenence_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> <?php } } ?> <?php if($others->no_of_years != '0' || $others->no_of_years != 0) { ?> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-4">No.of years:</label> <?php echo $others->no_of_years;?> </div> <?php } ?> </div> <hr> <div class="row land_owner_a"> <?php if(!empty($others->membership_amount)) { if($others->membership_amount != '' || $others->membership_amount != '0') { ?> <div class="form-group col-sm-12 col-md-4"> <label class="col-sm-6">Clubhouse Membership:</label> <?php $others->membership_amount; $num=$others->membership_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> <?php } } ?> </div> </form> <!-- form End ----> </div> <!--- col-sm-8 ----> <div class="col-sm-0 col-md-1"></div> </section> <!--- section 2 ----> <style type="text/css"> .content-wrapper, .right-side { min-height: 1750px !important; } </style> <script type="text/javascript"> $(document).ready(function(){ $(".delete_one").click(function(){ var payment_id = $(this).attr('payment_id'); swal({ title: "Are you sure?", text: "You will not be able to recover this data!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, delete it!", cancelButtonText: "No, cancel plz!", closeOnConfirm: false, closeOnCancel: false }, function(isConfirm){ if (isConfirm) { $(".sweet-alert").hide(); $(".sweet-overlay").hide(); // test.attr('disabled', 'disabled'); // test.text("Deleting..."); $.ajax({ type : 'post', url : '<?php echo site_url("delete-agreement-amount")?>', data : {payment_id:payment_id}, success:function(response) { // response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { location.reload(); } } }); } else { $(".sweet-alert").hide(); $(".sweet-overlay").hide(); } }); }); }); </script> <style type="text/css"> hr{ height: 2px ; border-width: 0; color: gray; background-color: gray; } </style> <?php echo view('includes/footer');?>