EVOLUTION-NINJA
Edit File: gss_installment_ack.php
<!DOCTYPE HTML> <html lang="en-US"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <title>GSS Acknowledgement</title> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/main.css');?>"/> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/bootstrap.min.css');?>" /> <link rel="stylesheet" type="text/css" href="<?php echo base_url('public/assets/css/font-awesome.min.css');?>" /> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <script type="text/javascript" src="<?php echo base_url('public/assets/js/jquery-2.2.4.min.js');?>"></script> <script type="text/javascript" src="<?php echo base_url('public/assets/js/bootstrap.min.js');?>"></script> </head> <body class="gss_body" style="width:900px;display:block;margin:auto !important;"> <?php $uri=service('uri') ?> <p class="booking_ids" style="display:none;"><?php echo $uri->getSegment(2); ?></p> <div class="row print_div" id="print_div"> <div class="row row_one"> <h2 class="gss_redline">Acknowledgement</h2> <img src="<?php echo base_url('public/assets/images/header_line.png');?>" class="img-responsive center-block"> <h2 style="font-size: 28px;line-height: 1.3; ">Project Name: <?php echo $project->project_name;?><br>Address: <?php echo $project->land_owner_address;?></h2> </div> <div class="row row_two"> <img src="<?php echo base_url('public/assets/images/line.png');?>" class="img-responsive center-block"> <div class="table_one"> <table class="table"> <tr> <!--<td><p>Date: <?php $date = new DateTime('now', new DateTimeZone('Asia/Kolkata')); $todays_date = $date->format('d-m-Y'); echo $todays_date;?></p></td> <td style="text-align:right;"><p><!--Ack No: <?php //echo '0'.$ack_no;?></p></td>--> <td><p style="padding-left: 50px;">Client Name: <?php echo $site_result[0]['customer_name'];?></p></td> <td><p style="padding-right: 50px;text-align:right;">Site No: <?php echo $site_result[0]['site_number'];?></p></td> </tr> </table> </div> <img src="<?php echo base_url('public/assets/images/line.png');?>" class="img-responsive center-block"> </div> <!-- <div class="row row_three"> <div class="table_one"> <table class="table"> <tr> <td><p style="padding-left: 50px;">Client Name: </?php echo $site_result->customer_name'];?></p></td> <td><p style="padding-right: 50px;text-align:right;">Site No: </?php echo $site_result[0]['site_number'];?></p></td> </tr> </table> </div> </div>--> <div class="row row_four"> <table class="table table-bordered"> <tbody> <tr> <td style="width:15%;">Payment Date</td> <!-- <td style="width:15%;">Ack No</td> --> <td style="width:18%;">Amount</td> <td style="width:22%;">Payment Type</td> <td style="width:32%;">Particulars</td> </tr> <tr> <td class="booking_date1"><?php echo date("d-m-Y", strtotime($res->installment1_date));?></td> <!-- <td class="booking_ack_no1"><?php echo "Ack No: 0".$ack_no;?></td> <?php $a = $ack_no-2;?> --> <td class="booking_amount1"><?php $num=$res->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.'/-'; ?></td> <td class="booking_count1"><?php echo "Installment Amount ".$a;?></td> <?php $cheque_date = date('d-m-Y',strtotime($res->install_cheque_date1)); ?> <?php $online_date = date('d-m-Y',strtotime($res->install_online_date1)); ?> <?php $dd_date = date('d-m-Y',strtotime($res->install_dd_date1)); ?> <?php $upi_online_date1 = date('d-m-Y',strtotime($res->upi_online_date1)); ?> <?php $install_cash_date = date('d-m-Y',strtotime($res->install_cash_date)); ?> <?php $install_swipe_date = date('d-m-Y',strtotime($res->install_swipe_date)); ?> <?php $paytm_online_date1 = date('d-m-Y',strtotime($res->paytm_online_date1)); ?> <td class="booking_payment_particulars1"><?php $bpt = $res->installment_payment_mode1; if($bpt == 'Online Payment'){ echo 'NEFT/RTGS'.'<br>'; }else if($bpt == 'Paytm Payment'){ echo 'UPI/Direct Payment'.'<br>'; }else if($bpt == 'UPI Payment'){ echo 'Credit/Debit Payment'.'<br>'; }else{ echo $bpt.'<br>'; } if($bpt == 'Cheque'){ if(!empty($res->install_cheque_no1)){ echo ' No. : '.$res->install_cheque_no1.'<br>'; }else{} if($res->install_cheque_date1 != '0000-00-00'){ echo ' Date : '.$cheque_date.'<br>'; }else{} if(!empty($res->install_bank1)){ echo ' Bank Name : '.$res->install_bank1.'<br>';}else{} } else if($bpt == 'Online Payment'){ if(!empty($res->install_vtr_no1)){ echo ' No. : '.$res->install_vtr_no1.'<br>'; }else{} if($res->install_online_date1 != '0000-00-00'){ echo ' Date : '.$online_date.'<br>'; }else{} } else if($bpt == 'DD'){ if(!empty($res->install_dd_no1)){ echo ' No. : '.$res->install_dd_no1.'<br>'; }else{} if($res->install_dd_date1 != '0000-00-00'){ echo ' Date : '.$dd_date.'<br>'; }else{} if(!empty($res->install_dd_bank1)){ echo ' Bank Name : '.$res->install_dd_bank1.'<br>'; }else{} } else if($bpt == 'Paytm Payment'){ if(!empty($res->paytm_ref_no)){ echo ' No. : '.$res->paytm_ref_no.'<br>'; }else{} if($res->paytm_online_date1 != '0000-00-00'){ echo ' Date : '.$paytm_online_date1.'<br>'; }else if($res->paytm_online_date1 == '0000-00-00'){ echo '';} else{} }else if($bpt == 'UPI Payment'){ if(!empty($res->upi_ref_no)){ echo ' No. : '.$res->upi_ref_no.'<br>'; }else{} if($res->upi_online_date1 != '0000-00-00'){ echo ' Date : '.$upi_online_date1.'<br>'; }else if($res->upi_online_date1 == '0000-00-00'){ echo '';} else{} } else if($bpt == 'Cash'){ if($res->install_cash_date != '0000-00-00'){ echo ' Date : '.$install_cash_date.'<br>'; }else if($res->install_cash_date == '0000-00-00'){ echo '';} else{} }else if($bpt == 'Swipe'){ if($res->install_swipe_date != '0000-00-00'){ echo ' Date : '.$install_swipe_date.'<br>'; }else if($res->install_swipe_date == '0000-00-00'){ echo '';} else{} }?></td> </tr> </tbody> </table> <p>(The validity of this receipt is subject to realization of all <br>cheques/demand draft/account transfer)</p> <p>This is a computer generated receipt. Signature is not required.</p> </div> </div> <div class="row row_four print_mail"> <p><button type="button" class="print">Print</button> <button type="button" class="mail">Mail</button> <button type="button" class="back">Back</button></p> </div> </body> </html> <script type="text/javascript"> $(document).ready(function() { $('.print_mail').show(); }); $('.print').click(function() { $('.print_mail').hide(); window.print(); window.close(); window.location.href = "<?php echo site_url('payment-form');?>"; }); $('.back').click(function(){ window.location.href = "<?php echo site_url('payment-form');?>"; }); $('.mail').click(function() { /*var ack_no1 = $('.booking_ack_no1').text(); var ack_no2= $('.booking_ack_no2').text();*/ var receipt_type = $('.gss_redline').text(); var booking_date1 = $('.booking_date1').text(); var booking_amount1 = $('.booking_amount1').text(); var booking_count = $('.booking_count1').text(); var booking_payment_particulars1 = $('.booking_payment_particulars1').text(); var booking_date2 = $('.booking_date2').text(); if(booking_date2 == undefined) { var booking_date2 = '00-00-0000'; } else { var booking_date2 = $('.booking_date2').text(); } var booking_amount2 = $('.booking_amount2').text(); if(booking_amount2 == undefined) { var booking_amount2 = '0'; } else { var booking_amount2 = $('.booking_amount2').text(); } var booking_count2 = $('.booking_count2').text(); if(booking_count2 == undefined) { var booking_count2 = '0'; } else { var booking_count2 = $('.booking_count2').text(); } var booking_payment_particulars2 = $('.booking_payment_particulars2').text(); if(booking_payment_particulars2 == undefined) { var booking_payment_particulars2 = '0'; } else { var booking_payment_particulars2 = $('.booking_payment_particulars2').text(); } var booking_ids = $('.booking_ids').text(); $.ajax({ type : 'post', url : "<?php echo site_url('send-mail-receipt');?>", data : {'booking_ids':booking_ids, 'receipt_type':receipt_type,'booking_date1':booking_date1, 'booking_date2':booking_date2, 'booking_amount1':booking_amount1, 'booking_amount2':booking_amount2, 'booking_count':booking_count, 'booking_count2':booking_count2, 'booking_payment_particulars1':booking_payment_particulars1, 'booking_payment_particulars2':booking_payment_particulars2}, success:function(response){ //response=jQuery.parseJSON(response); console.log(response); if(response.result == 1) { var inserted_id = response.message; window.location.href = "<?php echo site_url('view_mail_content');?>"+'/'+inserted_id; } } }) }); </script> <style> .gss_body { border-left:10px solid #E3000F; padding-left: 100px !important; padding-right: 100px !important; padding-top: 50px !important; padding-bottom: 50px !important; } .row_one { padding-bottom:10px; position:relative; } .row_one h2 { text-align:center; } .gss_redline { position:relative; padding-bottom:5px; } .row_two { padding-bottom:15px; padding-top:15px; margin-bottom: 5px; position:relative; } .table_one>table { margin-bottom:0px !important; } .row_two h3 { margin-bottom:0px; margin-top:0px; text-align:center; color:#E40025; font-weight:bold; } .row_two p, .row_three p, .row_five p { margin-bottom:0px; margin-top:0px; font-size:18px; font-weight:bold; padding-top: 3px; } .row_three { padding-bottom:20px; } .table-bordered>tbody>tr>td { border: 2px solid #e40025 !important; text-align:center !important; vertical-align:middle !important; font-size:18px !important; font-weight:bold !important; } .row_four p { text-align:center; font-weight:bold; font-size:18px; line-height:1.8; } .row_five { padding-top:50px; } .table_one>.table>tbody>tr>td { border-top: transparent !important; } </style>