?
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/debit_note_pdf.php |
<?php $this->load->view('Accounting/number2word.php'); $company=$this->mastermodel->getdatas('company'); $company = $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'); foreach ($gl_details as $list) { $var = substr($list['account_code'], 0,1); if(is_numeric($var)) { $b=$list['account_code']; } else { $a=$list['account_code']; } $amount=$list['amount']; } $customer_name = $this->mastermodel->getSingleFieldValue('customer','customer_name','customer_no',$a); $customer_id = $this->mastermodel->getSingleFieldValue('customer','customer_id','customer_no',$a); $project_name = $this->mastermodel->getSingleFieldValue('activity','activity_name','activity_account_code',$b); $company_name=$company->company_name; $company_address=$company->address; $company_phone=$company->contact_no; $company_email=$company->email; $company_website=$company->website; $company_logo=$company->logo; echo $amount; $words=convert_number(abs($amount)); $html='<html> <table width="100%" style="padding:10px;"> <tr> <td> <img src="'.base_url().'assets/images/'.$company_logo.'" width="400" height="148"> </td> <tr> <td style="text-align:center;font-weight:bold;"><u>DEBIT NOTE</u></td> </tr> </tr> </table> <table width="100%" style="padding:10px;"> <tr> <td style="text-align:left;width:5%">To: </td><td>'.$customer_name.'<br/>'.$this->mastermodel->getcustomeraddress($customer_id).'</td> <td style="text-align:right">Transaction Date: '.$this->mastermodel->convertdatenormalformat($refs->transaction_date).'<br/>Reference No: '.$refs->ref_code.'</td> </tr> </table> <br/><br/><br/> <hr> <table width="70%" style="padding:10px;"> <tr style="height:30px;"> <td style="text-align:left;">Customer Name</td><td>:</td><td>'.$customer_name.'</td> </tr> <tr style="height:30px;"> <td style="text-align:left;">Customer ID</td><td>:</td><td>'.$a.'</td> </tr> <tr style="height:30px;"> <td style="text-align:left;">Project Title</td><td>:</td><td>'.$project_title.'</td> </tr> <tr style="height:30px;"> <td style="text-align:left;">Quotation Code</td><td>:</td><td>'.$quotation_code.'</td> </tr> </table> <table width="100%" style="padding:10px;"> <tr style="height:30px;"> <td colspan="3">We have debited your account with the following amount:</td> </tr> <tr style="height:30px;"> <td style="text-align:center;">Being Payment</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:right;width:80%;margin-right:50px;margin-top:100px;">Authorized Signatory</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(20, 750, "'.$footer.'", $font, 10, array(0,0,0)); } </script> </html>'; pdf_create($html, 'DebitNote'); //echo $html; ?>