mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-02-25 11:27:21 -05:00
Resolving issue #3997 for discount type toggle not staying put.
This commit is contained in:
@@ -1309,7 +1309,7 @@ class Sale_lib
|
||||
$line['quantity'] = $quantity;
|
||||
$line['discount'] = $discount;
|
||||
|
||||
if(!empty($discount_type))
|
||||
if($discount_type != null)
|
||||
{
|
||||
$line['discount_type'] = $discount_type;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ if(isset($success))
|
||||
<div class="input-group">
|
||||
<?= form_input (['name' => 'discount', 'class' => 'form-control input-sm', 'value' => $item['discount_type'] ? to_currency_no_money($item['discount']) : to_decimals($item['discount']), 'tabindex' => ++$tabindex, 'onClick' => 'this.select();']) ?>
|
||||
<span class="input-group-btn">
|
||||
<?= form_checkbox (['id' => 'discount_toggle', 'name' => 'discount_toggle', 'value' => 1, 'data-toggle' => "toggle",'data-size' => 'small', 'data-onstyle' => 'success', 'data-on' => '<b>' . $config['currency_symbol'] . '</b>', 'data-off' => '<b>%</b>', 'data-line' => $line, 'checked' => $item['discount_type']]) ?>
|
||||
<?= form_checkbox (['id' => 'discount_toggle', 'name' => 'discount_toggle', 'value' => 1, 'data-toggle' => "toggle",'data-size' => 'small', 'data-onstyle' => 'success', 'data-on' => '<b>' . $config['currency_symbol'] . '</b>', 'data-off' => '<b>%</b>', 'data-line' => $line, 'checked' => $item['discount_type'] == 1]) ?>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user