mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-05-19 14:01:38 -04:00
simplify checkbox logic in sales/register and receiving (#116)
This commit is contained in:
@@ -206,7 +206,7 @@ function post_bulk_form_submit(response)
|
||||
if (count($stock_locations) > 1)
|
||||
{
|
||||
?>
|
||||
<li class="float_left"><span><?php echo form_dropdown('stock_location', $stock_locations, $stock_location, array('id'=>'stock_location', 'onchange'=>"$('#search_form').submit();", 'class'=>'selectpicker show-menu-arrow', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?></span></li>
|
||||
<li class="float_left"><?php echo form_dropdown('stock_location', $stock_locations, $stock_location, array('id'=>'stock_location', 'onchange'=>"$('#search_form').submit();", 'class'=>'selectpicker show-menu-arrow', 'data-style'=>'btn-default btn-sm', 'data-width'=>'fit')); ?></li>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -294,15 +294,7 @@ if (isset($error))
|
||||
<tr>
|
||||
<td><?php echo $this->lang->line('recvs_print_after_sale'); ?></td>
|
||||
<td>
|
||||
<?php if ($print_after_sale)
|
||||
{
|
||||
echo form_checkbox(array('name'=>'recv_print_after_sale', 'id'=>'recv_print_after_sale', 'class'=>'checkbox', 'checked'=>'checked'));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo form_checkbox(array('name'=>'recv_print_after_sale', 'id'=>'recv_print_after_sale', 'class'=>'checkbox'));
|
||||
}
|
||||
?>
|
||||
<?php echo form_checkbox(array('name'=>'recv_print_after_sale', 'id'=>'recv_print_after_sale', 'class'=>'checkbox', 'value'=>1, 'checked'=>$print_after_sale)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -313,16 +305,7 @@ if (isset($error))
|
||||
<tr>
|
||||
<td><?php echo $this->lang->line('recvs_invoice_enable'); ?></td>
|
||||
<td>
|
||||
<?php
|
||||
if ($invoice_number_enabled)
|
||||
{
|
||||
echo form_checkbox(array('name'=>'recv_invoice_enable', 'id'=>'recv_invoice_enable', 'class'=>'checkbox', 'checked'=>'checked'));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo form_checkbox(array('name'=>'recv_invoice_enable', 'id'=>'recv_invoice_enable', 'class'=>'checkbox'));
|
||||
}
|
||||
?>
|
||||
<?php echo form_checkbox(array('name'=>'recv_invoice_enable', 'id'=>'recv_invoice_enable', 'class'=>'checkbox', 'value'=>1, 'checked'=>$invoice_number_enabled)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -441,16 +441,7 @@ if (isset($success))
|
||||
<?php echo form_label($this->lang->line('sales_print_after_sale'), 'print_after_sale', array('class'=>'control-label')); ?>
|
||||
</td>
|
||||
<td style="width: 20%; text-align: center; display: inline-block;">
|
||||
<?php
|
||||
if($print_after_sale)
|
||||
{
|
||||
echo form_checkbox(array('name'=>'sales_print_after_sale', 'id'=>'sales_print_after_sale', 'class'=>'checkbox', 'checked'=>'checked'));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo form_checkbox(array('name'=>'sales_print_after_sale', 'id'=>'sales_print_after_sale', 'class'=>'checkbox'));
|
||||
}
|
||||
?>
|
||||
<?php echo form_checkbox(array('name'=>'sales_print_after_sale', 'id'=>'sales_print_after_sale', 'class'=>'checkbox', 'value'=>1, 'checked'=>$print_after_sale)); ?>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
@@ -461,16 +452,7 @@ if (isset($success))
|
||||
<?php echo form_label($this->lang->line('sales_email_receipt'), 'email_receipt', array('class'=>'control-label')); ?>
|
||||
</td>
|
||||
<td style="width: 20%; text-align: center; display: inline-block;">
|
||||
<?php
|
||||
if($email_receipt)
|
||||
{
|
||||
echo form_checkbox(array('name'=>'email_receipt', 'id'=>'email_receipt', 'class'=>'checkbox', 'checked'=>'checked'));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo form_checkbox(array('name'=>'email_receipt', 'id'=>'email_receipt', 'class'=>'checkbox'));
|
||||
}
|
||||
?>
|
||||
<?php echo form_checkbox(array('name'=>'email_receipt', 'id'=>'email_receipt', 'class'=>'checkbox', 'value'=>1, 'checked'=>$email_receipt)); ?>
|
||||
</td>
|
||||
<?php
|
||||
}
|
||||
@@ -493,18 +475,8 @@ if (isset($success))
|
||||
<?php echo form_label($this->lang->line('sales_invoice_enable'), 'invoice_enable', array('class'=>'control-label')); ?>
|
||||
</td>
|
||||
<td style="width: 20%; text-align: center; display: inline-block;">
|
||||
<?php
|
||||
if($invoice_number_enabled)
|
||||
{
|
||||
echo form_checkbox(array('name'=>'sales_invoice_enable', 'id'=>'sales_invoice_enable', 'class'=>'checkbox', 'checked'=>'checked'));
|
||||
}
|
||||
else
|
||||
{
|
||||
echo form_checkbox(array('name'=>'sales_invoice_enable', 'id'=>'sales_invoice_enable', 'class'=>'checkbox'));
|
||||
}
|
||||
?>
|
||||
<?php echo form_checkbox(array('name'=>'sales_invoice_enable', 'id'=>'sales_invoice_enable', 'class'=>'checkbox', 'value'=>1, 'checked'=>$invoice_number_enabled)); ?>
|
||||
</td>
|
||||
|
||||
<td style="width: 30%; text-align: left;">
|
||||
<?php echo form_label($this->lang->line('sales_invoice_number'), 'invoice_number', array('class'=>'control-label')); ?>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user