EVOLUTION-NINJA
Edit File: gss_cancellation_receipt.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 Receipt</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');?>" /> <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" id="gss_body" style="width:900px;display:block;margin:auto !important;"> <p class="booking_ids" style="display:none;"><?php echo $site_result[0]['booking_id']; ?></p> <div class="row print_div" id="print_div"> <div class="row row_one"> <h2 class="gss_redline">GSS Project Consultants Pvt. Ltd.</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 style="width:25%;"><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="width:50%;"><h3>RECEIPT</h3></td> <!-- <td style="text-align:right;"><p></p></td> --> <!--<td style="text-align:right;"><p>Receipt No: 01 <?php //echo $ack_no;?></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[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> </div> <div class="row row_four"> <table class="table table-bordered"> <tbody> <tr> <td style="width:15%;">Payment Date</td> <!-- <td style="width:18%;">Receipt No</td> --> <td style="width:18%;">Amount</td> <td style="width:18%;">Payment Type</td> <td style="width:25%;">Particulars</td> </tr> <?php $count=1; foreach($refunds as $res){?> <tr> <td class="booking_date1"><?php echo date("d-m-Y", strtotime($res->refunded_date));?></td> <!-- <td class="booking_ack_no1" style="width: 20%;"><?php echo 'Receipt No : 0'.$count;?></td> --> <td class="booking_amount1"><?php $num=$res->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.'/-'; ?></td> <td class="booking_count1"><?php echo "Refund Amount".$count;?></td> <?php $cheque_date = date('d-m-Y',strtotime($res->cheque_date)); ?> <?php $online_date = date('d-m-Y',strtotime($res->online_date)); ?> <td class="booking_payment_particulars1"><?php $bpt = $res->refunded_payment_mode; if($bpt == 'Online Payment'){ echo 'NEFT/RTGS'.'<br>'; }else{ echo $bpt.'<br>'; } if($bpt == 'Cheque'){ if(!empty($res->cheque_no)){ echo ' No. : '.$res->cheque_no.'<br>'; }else{} if($res->cheque_date != '0000-00-00'){ echo ' Date : '.$cheque_date.'<br>'; }else{} if(!empty($res->bank_name)){ echo ' Bank Name : '.$res->bank_name.'<br>';}else{} } else if($bpt == 'Online Payment'){ if(!empty($res->vtr_no)){ echo ' No. : '.$res->vtr_no.'<br>'; }else{} if($res->online_date != '0000-00-00'){ echo ' Date : '.$online_date.'<br>'; }else{} if(!empty($res->vtr_bank)){ echo ' Bank Name : '.$res->vtr_bank.'<br>';}else{} }?></td> </tr> <?php $count++; } ?> </tbody> </table> <p>(The validity of this receipt is subject to realization of all <br>cheques/demand draft/account transfter)</p> <p>This is a computer generated receipt. Signature is not required.</p> </div> <div class="row row_five"> <p>For GSS Project Consultants</p> <p style="padding-left:30px;padding-top:50px;">Authorized Signatory</p> </div> </div> <div class="row row_four print_mail" style="display:none;"> <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('cancellations-list');?>"; }); $('.back').click(function(){ window.location.href = "<?php echo site_url('cancellations-list');?>"; }); $('.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:15px; position:relative; } .row_one h2 { text-align:center; } .gss_redline { position:relative; padding-bottom:5px; } .row_two { padding-bottom:15px; padding-top:15px; position:relative; } .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 { margin-bottom:0px !important; } .table_one>.table>tbody>tr>td { border-top: transparent !important; } </style>