Fix work_order_email similar to quote_email (#1824)

This commit is contained in:
FrancescoUK committed 2018-02-18 17:12:43 +00:00
1 parent b69d57a4b9
commit 16dd8fb0a1
3 files changed
+52 -37

No files matched your search

+7 -6
View File
@@ -14,7 +14,7 @@
}
// Temporarily loads the system language for _lang to print invoice in the system language rather than user defined.
load_language(TRUE,array('sales','common'));
load_language(TRUE, array('sales', 'common'));
?>
<div id="page-wrap">
@@ -49,13 +49,14 @@
<td class="meta-head"><?php echo $this->lang->line('common_date'); ?></td>
<td><div><?php echo $transaction_date; ?></div></td>
</tr>
<?php if($amount_due > 0)
<?php
if($amount_due > 0)
{
?>
<tr>
<td class="meta-head"><?php echo $this->lang->line('sales_amount_due'); ?></td>
<td><div class="due"><?php echo to_currency($total); ?></div></td>
</tr>
<tr>
<td class="meta-head"><?php echo $this->lang->line('sales_amount_due'); ?></td>
<td><div class="due"><?php echo to_currency($total); ?></div></td>
</tr>
<?php
}
?>
+10 -10
View File
@@ -7,14 +7,14 @@
<body>
<?php
if (isset($error_message))
if(isset($error_message))
{
echo "<div class='alert alert-dismissible alert-danger'>".$error_message."</div>";
exit;
}
// Temporarily loads the system language for _lang to print invoice in the system language rather than user defined.
load_language(TRUE,array('sales','common'));
load_language(TRUE, array('sales', 'common'));
?>
<div id="page-wrap">
@@ -24,9 +24,9 @@
<td id="logo">
<?php if($this->config->item('company_logo') != '')
{
?>
?>
<img id="image" src="<?php echo 'uploads/' . $this->config->item('company_logo'); ?>" alt="company_logo" />
<?php
<?php
}
?>
</td>
@@ -49,14 +49,15 @@
<td class="meta-head"><?php echo $this->lang->line('common_date'); ?></td>
<td><div><?php echo $transaction_date; ?></div></td>
</tr>
<?php if ($amount_due > 0)
<?php
if($amount_due > 0)
{
?>
?>
<tr>
<td class="meta-head"><?php echo $this->lang->line('sales_amount_due'); ?></td>
<td><div class="due"><?php echo to_currency($total); ?></div></td>
</tr>
<?php
<?php
}
?>
</table>
@@ -99,8 +100,7 @@
<tr>
<td colspan="4" class="blank"> </td>
<td colspan="2" class="total-line"><?php echo $this->lang->line('sales_sub_total'); ?></td>
<td class="total-value"><?php echo to_currency($subtotal); ?></td>
<td id="subtotal" class="total-value"><?php echo to_currency($subtotal); ?></td>
</tr>
<?php
@@ -110,7 +110,7 @@
<tr>
<td colspan="4" class="blank"> </td>
<td colspan="2" class="total-line"><?php echo $sales_tax['tax_group']; ?></td>
<td class="total-value"><?php echo to_currency_tax($sales_tax['sale_tax_amount']); ?></td>
<td id="taxes" class="total-value"><?php echo to_currency_tax($sales_tax['sale_tax_amount']); ?></td>
</tr>
<?php
}
+35 -21
View File
@@ -7,11 +7,14 @@
<body>
<?php
if (isset($error_message))
{
echo "<div class='alert alert-dismissible alert-danger'>".$error_message."</div>";
exit;
}
if(isset($error_message))
{
echo "<div class='alert alert-dismissible alert-danger'>".$error_message."</div>";
exit;
}
// Temporarily loads the system language for _lang to print invoice in the system language rather than user defined.
load_language(TRUE, array('sales', 'common'));
?>
<div id="page-wrap">
@@ -21,9 +24,9 @@ if (isset($error_message))
<td id="logo">
<?php if($this->config->item('company_logo') != '')
{
?>
?>
<img id="image" src="<?php echo 'uploads/' . $this->config->item('company_logo'); ?>" alt="company_logo" />
<?php
<?php
}
?>
</td>
@@ -46,14 +49,15 @@ if (isset($error_message))
<td class="meta-head"><?php echo $this->lang->line('common_date'); ?></td>
<td><div><?php echo $transaction_date; ?></div></td>
</tr>
<?php if ($amount_due > 0)
<?php
if($amount_due > 0)
{
?>
?>
<tr>
<td class="meta-head"><?php echo $this->lang->line('sales_amount_due'); ?></td>
<td><div class="due"><?php echo to_currency($total); ?></div></td>
</tr>
<?php
<?php
}
?>
</table>
@@ -68,42 +72,52 @@ if (isset($error_message))
<th><?php echo $this->lang->line('sales_quantity'); ?></th>
<th><?php echo $this->lang->line('sales_price'); ?></th>
<th><?php echo $this->lang->line('sales_discount'); ?></th>
<th><?php echo $this->lang->line('sales_customer_discount');?></th>
<th><?php echo $this->lang->line('sales_total'); ?></th>
</tr>
<?php
foreach($cart as $line=>$item)
{
?>
?>
<tr class="item-row">
<td><?php echo $item['item_number']; ?></td>
<td class="item-name"><?php echo $item['name']; ?></td>
<td><?php echo to_quantity_decimals($item['quantity']); ?></td>
<td><?php echo to_currency($item['price']); ?></td>
<td><?php echo $item['discount'] .'%'; ?></td>
<td><?php echo to_currency($item['discounted_total'] / $item['quantity']); ?></td>
<td class="total-line"><?php echo to_currency($item['discounted_total']); ?></td>
</tr>
<?php
<?php
}
?>
<tr>
<td colspan="6" align="center"><?php echo '&nbsp;'; ?></td>
<td colspan="7" align="center"><?php echo '&nbsp;'; ?></td>
</tr>
<tr>
<td colspan="3" class="blank"> </td>
<td colspan="4" class="blank"> </td>
<td colspan="2" class="total-line"><?php echo $this->lang->line('sales_sub_total'); ?></td>
<td id="subtotal" class="total-value"><?php echo to_currency($tax_exclusive_subtotal); ?></td>
<td id="subtotal" class="total-value"><?php echo to_currency($subtotal); ?></td>
</tr>
<?php foreach($taxes as $name=>$value) { ?>
<?php
foreach($taxes as $tax_group_index=>$sales_tax)
{
?>
<tr>
<td colspan="3" class="blank"> </td>
<td colspan="2" class="total-line"><?php echo $name; ?></td>
<td id="taxes" class="total-value"><?php echo to_currency_tax($value); ?></td>
<td colspan="4" class="blank"> </td>
<td colspan="2" class="total-line"><?php echo $sales_tax['tax_group']; ?></td>
<td id="taxes" class="total-value"><?php echo to_currency_tax($sales_tax['sale_tax_amount']); ?></td>
</tr>
<?php }; ?>
<?php
}
?>
<tr>
<td colspan="3" class="blank"> </td>
<td colspan="4" class="blank"> </td>
<td colspan="2" class="total-line"><?php echo $this->lang->line('sales_total'); ?></td>
<td id="total" class="total-value"><?php echo to_currency($total); ?></td>
</tr>