?
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/application/views/Accounting/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/public_html/savoyglobal.net/sgms/application/views/Accounting/payment_voucher_pdf.php |
<?php $this->load->view('Accounting/number2word.php'); $company_details= $this->mastermodel->get_data_srow('company','1','company_id'); $currency = $this->mastermodel->get_data_srow('currency','1','default_currency'); $gl_details = $this->mastermodel->get_data('gl_trans',$refs->ref_id,'ref_id'); $html=""; foreach ($gl_details as $list) { $amount=$list['amount']; if($list['amount']>0) { $customer_name = $this->mastermodel->getSingleFieldValue('chart_master','chart_account_name','chart_account_code',$list['account_code']); $words=convert_number(abs($amount)); $html.='<html><head><body>'; $html.='<table width="100%" style="padding:10px;"> <tr> <td> <img src="'.base_url().'assets/images/'.$company_details->logo.'" width="400" height="148"> </td> <tr> <td style="text-align:center;font-weight:bold;"><u>PAYMENT RECEIPT</u></td> </tr> </tr> </table>'; $html.=' <table width="100%" style="padding:10px;"> <tr> <td style="text-align:left">To: '.$customer_name.'</td> <td style="text-align:right">Transaction Date: '.$this->mastermodel->convertdatenormalformat($refs->transaction_date).'</td> </tr> <tr style="height:30px;"> <td style="text-align:left"></td> <td style="text-align:right;"> Reference No: '.$refs->ref_code.'</td> </tr> </table> <br/><br/><br/> <hr> <table width="100%" style="padding:10px;"> <tr style="height:30px;"> <td colspan="3">Payment to '.$customer_name.':</td> </tr> <tr style="height:30px;"> <td style="text-align:center;">Amount</td><td>:</td><td>'.$currency->currency_code.' '.number_format(abs($amount)).'</td> </tr> <tr style="height:30px;"> <td style="text-align:center;"><strong>Total</strong> </td><td>:</td><td><strong>'.$currency->currency_code.' '.number_format(abs($amount)).'</strong></td> </tr> <tr style="height:30px;"> <td style="text-align:center;"> ('.$currency->currency_code.' '.$words.')</td> </tr> </table> <hr> <div style="text-align:left;width:900px;margin-right:50px;margin-top:100px;"> <span style="text-align:left;padding-left:20px;">Received Signatory</span> <span style="text-align:right;padding-left:375px;">Authorized Signatory</span> </div>'; $html.='<div style="page-break-after: always"></div>'; } } $footer=$this->mastermodel->getSingleFieldValue('company','footer','company_id','1'); $html.='<script type="text/php"> if ( isset($pdf) ) { $font = Font_Metrics::get_font("verdana", "normal"); $pdf->page_text(5, 750, "'.$company_details->footer.' Page {PAGE_NUM} of {PAGE_COUNT}", $font, 10, array(0,0,0)); } </script> </html>'; pdf_create($html, 'Payment Voucher'); ?>