?
Current Path : /home1/savoy/www/savoyglobal.net/sgms/application/views/Software/ |
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/www/savoyglobal.net/sgms/application/views/Software/placementslippdf.php |
<?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'); $placement_details = $this->mastermodel->get_data('software_placement_details',$placement->placement_id,'placement_id'); $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; $software = $this->mastermodel->get_data_srow('software_proposal',$placement->software_proposal_id,'software_proposal_id'); $customer = $this->mastermodel->get_data_srow('customer',$software->customer_id,'customer_id'); $flag=0; foreach($placement_details as $list) { $flag = $list['discount']; if($flag > 0) break; } $html='<html> <img src="'.base_url().'assets/images/'.$company_logo.'" width="400" height="148"> <table width="100%"> <tr> <td style="text-align:left;">'.$company_name.', '.$company_address.'<br/>Tel: '.$company_phone.',Email: '.$company_email.', Website: '.$company_website.'</td> </tr> </table> <hr> <table width="100%"> <tr> <td style="text-align:center;"><b>INVOICE</b></td> </tr> <tr> <td style="text-align:right">'.$this->mastermodel->convertdatenormalformat($placement->placement_date).'</td> </tr> </table> <br/><br/><br/> <table width="100%"> <tr> <td style="text-align:left;"><strong>'.$customer->customer_name.'</strong></td> </tr> <tr> <td style="text-align:left;">'.$this->mastermodel->getcustomeraddress($software->customer_id).'</td> </tr> </table> <table width="100%"> <tr> <td style="text-align:left;">Customer ID: '.$customer->customer_no.'<br/> Quotation Code: '.$software->proposal_code.'</td> </tr> </table> <br/><br/><br/> <table border="1px" cellspacing="-1" cellpadding="0" style="text_align:center;" width="100%" height:"1000px;"> <tr> <td style="height:30px;" bgcolor="#cdc9c9">Description</td> <td style="height:30px;" bgcolor="#cdc9c9">Cost('.$currency->currency_code.')</td> <td style="height:30px;" bgcolor="#cdc9c9">QTY</td>'; if($flag>0) { $html.='<td style="height:30px;text-align:center;" bgcolor="#cdc9c9">Discount('.$currency->currency_code.')</td>'; } $html.='<td style="height:30px;" bgcolor="#cdc9c9">Total('.$currency->currency_code.')</td> </tr>'; $k=1; $totalamt=0; foreach($placement_details as $list) { $quantity = $list['quantity']; $price = $list['price']; $discount = $list['discount']; $total =($quantity*$price)-($discount); $totalamt+=$total; $html.='<tr> <td style="text-align:left;">'.nl2br($list['description']).'</td> <td>'.number_format($list['price'],2).'</td> <td>'.$list['quantity'].'</td>'; if($flag>0) { $html.='<td style="text-align:center;">'.number_format($list['discount'],2).'</td>'; } $html.='<td style="text-align:right;">'.number_format($total,2).'</td> </tr> '; $k++; } if($flag>0) $colspan=4; else $colspan=3; $html.=' <tr > <td style="text-align:right;font-weight:bold;padding-right:10px;" colspan="'.$colspan.'">TOTAL</td> <td style="text-align:right;font-weight:bold;">'.number_format($totalamt,2).'</td> </tr> </table> <br/><br/><br/>'; if($placement->terms_conditions!='') { $html.='<table id="tab" border="1px" cellspacing="-1" cellpadding="15px" width="100%"> <tr> <td style="text-align:center" bgcolor="#cdc9c9">TERMS & CONDITIONS</td> </tr> <tr> <td style="text-align:left;font-size:10px;font-weight:bold;height:100px;">'.nl2br($placement->terms_conditions).'</td> </tr> </table>'; } $html.='<div style="text-align:right;width:80%;margin-right:50px;margin-top:100px;">Authorized Signatory</div> </html>'; pdf_create($html, 'Placementslip'); // echo $html; ?>