mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-24 08:20:54 -04:00
Hide discount / item if no discount for that item (#1924)
This commit is contained in:
@@ -108,7 +108,9 @@ $(document).ready(function()
|
||||
<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>
|
||||
<?php if ($item['discount'] > 0): ?>
|
||||
<th><?php echo $this->lang->line('sales_customer_discount');?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
|
||||
@@ -122,7 +124,9 @@ $(document).ready(function()
|
||||
<td style='text-align:center;'><textarea rows="5" cols="6"><?php echo to_quantity_decimals($item['quantity']); ?></textarea></td>
|
||||
<td><textarea rows="4" cols="6"><?php echo to_currency($item['price']); ?></textarea></td>
|
||||
<td style='text-align:center;'><textarea rows="4" cols="6"><?php echo $item['discount'] . '%'; ?></textarea></td>
|
||||
<?php if ($item['discount'] > 0): ?>
|
||||
<td style='text-align:center;'><textarea rows="4" cols="6"><?php echo to_currency($item['discounted_total'] / $item['quantity']); ?></textarea></td>
|
||||
<?php endif; ?>
|
||||
<td style='border-right: solid 1px; text-align:right;'><textarea rows="4" cols="6"><?php echo to_currency($item['discounted_total']); ?></textarea></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -72,7 +72,9 @@
|
||||
<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>
|
||||
<?php if ($item['discount'] > 0): ?>
|
||||
<th><?php echo $this->lang->line('sales_customer_discount');?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
|
||||
@@ -86,7 +88,9 @@
|
||||
<td><?php echo to_quantity_decimals($item['quantity']); ?></td>
|
||||
<td><?php echo to_currency($item['price']); ?></td>
|
||||
<td><?php echo $item['discount'] .'%'; ?></td>
|
||||
<?php if ($item['discount'] > 0): ?>
|
||||
<td><?php echo to_currency($item['discounted_total'] / $item['quantity']); ?></td>
|
||||
<?php endif; ?>
|
||||
<td class="total-line"><?php echo to_currency($item['discounted_total']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -108,7 +108,9 @@ 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>
|
||||
<?php if ($item['discount'] > 0): ?>
|
||||
<th><?php echo $this->lang->line('sales_customer_discount');?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
|
||||
@@ -122,7 +124,9 @@ if (isset($error_message))
|
||||
<td style='text-align:center;'><textarea rows="5" cols="6"><?php echo to_quantity_decimals($item['quantity']); ?></textarea></td>
|
||||
<td><textarea rows="4" cols="6"><?php echo to_currency($item['price']); ?></textarea></td>
|
||||
<td style='text-align:center;'><textarea rows="4" cols="6"><?php echo $item['discount'] . '%'; ?></textarea></td>
|
||||
<?php if ($item['discount'] > 0): ?>
|
||||
<td style='text-align:center;'><textarea rows="4" cols="6"><?php echo to_currency($item['discounted_total'] / $item['quantity']); ?></textarea></td>
|
||||
<?php endif; ?>
|
||||
<td style='border-right: solid 1px; text-align:right;'><textarea rows="4" cols="6"><?php echo to_currency($item['discounted_total']); ?></textarea></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -72,7 +72,9 @@
|
||||
<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>
|
||||
<?php if ($item['discount'] > 0): ?>
|
||||
<th><?php echo $this->lang->line('sales_customer_discount');?></th>
|
||||
<?php endif; ?>
|
||||
<th><?php echo $this->lang->line('sales_total'); ?></th>
|
||||
</tr>
|
||||
|
||||
@@ -86,7 +88,9 @@
|
||||
<td><?php echo to_quantity_decimals($item['quantity']); ?></td>
|
||||
<td><?php echo to_currency($item['price']); ?></td>
|
||||
<td><?php echo $item['discount'] .'%'; ?></td>
|
||||
<?php if ($item['discount'] > 0): ?>
|
||||
<td><?php echo to_currency($item['discounted_total'] / $item['quantity']); ?></td>
|
||||
<?php endif; ?>
|
||||
<td class="total-line"><?php echo to_currency($item['discounted_total']); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
.edit #save-logo, .edit #cancel-logo { display: inline; }
|
||||
.edit #image, #save-logo, #cancel-logo, .edit #change-logo, .edit #delete-logo { display: none; }
|
||||
#customer-title { height: 100px; float: right; margin-top:40px;}
|
||||
#customer-title textarea { width: 150px; }
|
||||
#customer-title textarea { width: 200px; }
|
||||
|
||||
/* second row */
|
||||
#block2 { overflow: hidden; width: 100%; }
|
||||
|
||||
Reference in New Issue
Block a user