mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 16:28:40 -04:00
Fix Send Invoice PDF
This commit is contained in:
@@ -518,7 +518,7 @@ class Sales extends Secure_Controller
|
||||
$employee_info = $this->Employee->get_info($employee_id);
|
||||
$data['employee'] = $employee_info->first_name . ' ' . mb_substr($employee_info->last_name, 0, 1);
|
||||
|
||||
$data['company_info'] = implode("\n", array(
|
||||
$data['company_info'] = implode("<br/>", array(
|
||||
$this->config->item('address'),
|
||||
$this->config->item('phone')
|
||||
));
|
||||
@@ -896,7 +896,7 @@ class Sales extends Secure_Controller
|
||||
$data['customer_total'] = empty($cust_stats) ? 0 : $cust_stats->total;
|
||||
}
|
||||
|
||||
$data['customer_info'] = implode("\n", array(
|
||||
$data['customer_info'] = implode("<br/>", array(
|
||||
$data['customer'],
|
||||
$data['customer_address'],
|
||||
$data['customer_location']
|
||||
@@ -971,7 +971,7 @@ class Sales extends Secure_Controller
|
||||
$data['quote_number'] = $sale_info['quote_number'];
|
||||
$data['sale_status'] = $sale_info['sale_status'];
|
||||
|
||||
$data['company_info'] = implode("\n", array(
|
||||
$data['company_info'] = implode("<br/>", array(
|
||||
$this->config->item('address'),
|
||||
$this->config->item('phone')
|
||||
));
|
||||
|
||||
@@ -15,7 +15,7 @@ function pdf_create($html, $filename = '')
|
||||
}
|
||||
|
||||
$dompdf = new Dompdf\Dompdf();
|
||||
$dompdf->loadHtml($html);
|
||||
$dompdf->loadHtml(str_replace(array("\n", "\r"), '', $html));
|
||||
$dompdf->render();
|
||||
|
||||
if(!$magic_quotes_enabled)
|
||||
|
||||
@@ -14,7 +14,7 @@ $(document).ready(function()
|
||||
{
|
||||
var send_email = function()
|
||||
{
|
||||
$.get('<?php echo site_url() . "/sales/send_pdf/" . $sale_id_num; ?>',
|
||||
$.get('<?php echo site_url() . "sales/send_pdf/" . $sale_id_num; ?>',
|
||||
function(response)
|
||||
{
|
||||
$.notify(response.message, { type: response.success ? 'success' : 'danger'} );
|
||||
@@ -51,7 +51,7 @@ $(document).ready(function()
|
||||
if(isset($customer))
|
||||
{
|
||||
?>
|
||||
<textarea id="customer" rows="5" cols="6"><?php echo $customer_info ?></textarea>
|
||||
<div id="customer"><?php echo $customer_info ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
@@ -79,7 +79,7 @@ $(document).ready(function()
|
||||
</div>
|
||||
|
||||
<div id="block2">
|
||||
<textarea id="company-title" rows="5" cols="35"><?php echo $company_info ?></textarea>
|
||||
<div id="company-title"><?php echo $company_info ?></div>
|
||||
<table id="meta">
|
||||
<tr>
|
||||
<td class="meta-head"><?php echo $this->lang->line('sales_invoice_number');?> </td>
|
||||
|
||||
@@ -28,16 +28,18 @@
|
||||
?>
|
||||
</td>
|
||||
<td id="customer-title">
|
||||
<pre><?php if(isset($customer)) { echo $customer_info; } ?></pre>
|
||||
<div id="customer"><?php if(isset($customer)) { echo $customer_info; } ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="company-title">
|
||||
<pre><?php echo $this->config->item('company'); ?></pre>
|
||||
<pre><?php echo $company_info; ?></pre>
|
||||
<div id="company">
|
||||
<?php echo $this->config->item('company'); ?><br/>
|
||||
<?php echo $company_info; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td id="meta">
|
||||
<table align="right">
|
||||
<table id="meta-content" align="right">
|
||||
<tr>
|
||||
<td class="meta-head"><?php echo $this->lang->line('sales_invoice_number');?> </td>
|
||||
<td><div><?php echo $invoice_number; ?></div></td>
|
||||
|
||||
@@ -27,14 +27,15 @@ pre { font-family: Helvetica; font-size: 13px; }
|
||||
.edit #logohelp { display: block; }
|
||||
.edit #save-logo, .edit #cancel-logo { display: inline; }
|
||||
.edit #image, #save-logo, #cancel-logo, .edit #change-logo, .edit #delete-logo { display: none; }
|
||||
#customer-title { text-align: right; }
|
||||
#customer-title { text-align: right; height: 100px; width: 50%;}
|
||||
#customer { float:right; width:300px; text-align: left; }
|
||||
#terms div { width: 100%; text-align: center; margin-bottom: 10px;}
|
||||
|
||||
/* second row */
|
||||
#company-title { width: 50%; padding-left: 20px; }
|
||||
#meta td { text-align: right; }
|
||||
#meta td.meta-head { text-align: left; background: #eee; }
|
||||
|
||||
#meta-content { width: 300px; }
|
||||
#items { width: 100%; border: 1px solid black; }
|
||||
#items th { background: #eee; }
|
||||
#items tr.item-row td { border: 0; vertical-align: top; }
|
||||
|
||||
Reference in New Issue
Block a user