mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-12 16:07:26 -04:00
Show tax names and amounts in invoice and invoice_email views
Fix invoice numbering for $YCO after update
This commit is contained in:
@@ -164,7 +164,7 @@ class Sale extends CI_Model
|
||||
$this->db->where("DATE_FORMAT(sale_time, '%Y' ) = ", $year, FALSE);
|
||||
$this->db->where("invoice_number IS NOT ", "NULL", FALSE);
|
||||
$result = $this->db->get()->row_array();
|
||||
return ($start_from + $result[ 'invoice_number_year' ] + 1);
|
||||
return ($start_from + $result[ 'invoice_number_year']);
|
||||
}
|
||||
|
||||
function exists($sale_id)
|
||||
|
||||
@@ -75,7 +75,7 @@ if (isset($error_message))
|
||||
?>
|
||||
<tr class="item-row">
|
||||
<td><?php echo $item['item_number']; ?></td>
|
||||
<td class="item-name"><textarea rows="5" cols="6" class='long_name'><?php echo !empty($item['description']) ? $item['description'] : $item['name']; ?></textarea></td>
|
||||
<td class="item-name"><textarea rows="5" cols="6" class='long_name'><?php echo $item['name']; ?></textarea></td>
|
||||
<td style='text-align:center;'><textarea rows="5" cols="6"><?php echo $item['quantity']; ?></textarea></td>
|
||||
<td><textarea rows="5" cols="6"><?php echo to_currency($item['price']); ?></textarea></td>
|
||||
<td style='text-align:center;'><textarea rows="5" cols="6"><?php echo $item['discount'] .'%'; ?></textarea></td>
|
||||
@@ -93,11 +93,13 @@ if (isset($error_message))
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $this->lang->line('sales_sub_total'); ?></textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="subtotal"><?php echo to_currency($tax_exclusive_subtotal); ?></textarea></td>
|
||||
</tr>
|
||||
<?php foreach($taxes as $name=>$value) { ?>
|
||||
<tr>
|
||||
<td colspan="3" class="blank"> </td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $this->lang->line('sales_tax'); ?></textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="taxes"><?php echo to_currency(array_sum($taxes)); ?></textarea></td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $name; ?>:</textarea></td>
|
||||
<td class="total-value"><textarea rows="5" cols="6" id="taxes"><?php echo to_currency($value); ?></textarea></td>
|
||||
</tr>
|
||||
<?php }; ?>
|
||||
<tr>
|
||||
<td colspan="3" class="blank"> </td>
|
||||
<td colspan="2" class="total-line"><textarea rows="5" cols="6"><?php echo $this->lang->line('sales_total'); ?></textarea></td>
|
||||
|
||||
@@ -85,7 +85,7 @@ if (isset($error_message))
|
||||
?>
|
||||
<tr class="item-row">
|
||||
<td><?php echo $item['item_number']; ?></td>
|
||||
<td class="item-name long_name"><?php echo !empty($item['description']) ? $item['description'] : $item['name']; ?></td>
|
||||
<td class="item-name long_name"><?php echo $item['name']; ?></td>
|
||||
<td><?php echo $item['quantity']; ?></td>
|
||||
<td><?php echo to_currency($item['price']); ?></td>
|
||||
<td><?php echo $item['discount'] .'%'; ?></td>
|
||||
@@ -103,11 +103,13 @@ if (isset($error_message))
|
||||
<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>
|
||||
</tr>
|
||||
<?php foreach($taxes as $name=>$value) { ?>
|
||||
<tr>
|
||||
<td colspan="3" class="blank"> </td>
|
||||
<td colspan="2" class="total-line"><?php echo $this->lang->line('sales_tax'); ?></td>
|
||||
<td id="taxes" class="total-value"><?php echo to_currency(array_sum($taxes)); ?></td>
|
||||
<td colspan="2" class="total-line"><?php echo $name; ?></td>
|
||||
<td id="taxes" class="total-value"><?php echo to_currency($value); ?></td>
|
||||
</tr>
|
||||
<?php }; ?>
|
||||
<tr>
|
||||
<td colspan="3" class="blank"> </td>
|
||||
<td colspan="2" class="total-line"><?php echo $this->lang->line('sales_total'); ?></td>
|
||||
|
||||
Reference in New Issue
Block a user