Hide stock_type and item_type if the employee isn't authorized to item kits. On register if item type is non-stock don't display the zero stock balance message, and correct the default quote format when initializing the field.

This commit is contained in:
Steve Ireland
2017-02-17 19:15:54 -05:00
parent 9bf8989960
commit e4955027d1
6 changed files with 8 additions and 5 deletions

View File

@@ -180,6 +180,7 @@ class Items extends Secure_Controller
$data['item_tax_info'] = $this->xss_clean($this->Item_taxes->get_info($item_id));
$data['default_tax_1_rate'] = '';
$data['default_tax_2_rate'] = '';
$data['item_kits_enabled'] = $this->Employee->has_grant('item_kits', $this->Employee->get_logged_in_employee_info()->person_id);
$item_info = $this->Item->get_info($item_id);
foreach(get_object_vars($item_info) as $property => $value)

View File

@@ -683,7 +683,7 @@ class Sale_lib
$print_option = '2'; // Do not include in list
}
$result &= $this->add_item($item_kit_item['item_id'], $item_kit_item['quantity'], $item_location, $discount, $price, null, null, null, $print_option, $print_option, $item_kit_item['stock_type']);
$result &= $this->add_item($item_kit_item['item_id'], $item_kit_item['quantity'], $item_location, $discount, $price, null, null, null, $print_option, $item_kit_item['stock_type']);
if($stock_warning == null)
{

View File

@@ -46,6 +46,7 @@
</div>
</div>
<?php if ($item_kits_enabled == '1'): ?>
<div class="form-group form-group-sm">
<?php echo form_label($this->lang->line('items_stock_type'), 'stock_type', !empty($basic_version) ? array('class'=>'required control-label col-xs-3') : array('class'=>'control-label col-xs-3')); ?>
<div class="col-xs-8">
@@ -93,8 +94,9 @@
</label>
</div>
</div>
<?php endif; ?>
<div class="form-group form-group-sm">
<div class="form-group form-group-sm">
<?php echo form_label($this->lang->line('items_supplier'), 'supplier', array('class'=>'control-label col-xs-3')); ?>
<div class='col-xs-8'>
<?php echo form_dropdown('supplier_id', $suppliers, $selected_supplier, array('class'=>'form-control')); ?>

View File

@@ -25,7 +25,7 @@ ALTER TABLE `ospos_sales_suspended_items`
INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('date_or_time_format', ''),
('sales_quote_format', 'Q%m{QSEQ:6}'),
('sales_quote_format', 'Q%y{QSEQ:6}'),
('default_register_mode', 'sale'),
('last_used_invoice_number', '0'),
('last_used_quote_number', '0'),

View File

@@ -50,7 +50,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('line_sequence', '0'),
('recv_invoice_format', '$CO'),
('sales_invoice_format', '$CO'),
('sales_quote_format', 'Q%m{QSEQ:6}'),
('sales_quote_format', 'Q%y{QSEQ:6}'),
('invoice_email_message', 'Dear $CU, In attachment the receipt for sale $INV'),
('invoice_default_comments', 'This is a default comment'),
('print_silently', '1'),

View File

@@ -50,7 +50,7 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES
('line_sequence', '0'),
('recv_invoice_format', '$CO'),
('sales_invoice_format', '$CO'),
('sales_quote_format', 'Q%m{QSEQ:6}'),
('sales_quote_format', 'Q%y{QSEQ:6}'),
('invoice_email_message', 'Dear $CU, In attachment the receipt for sale $INV'),
('invoice_default_comments', 'This is a default comment'),
('print_silently', '1'),