diff --git a/application/controllers/Sales.php b/application/controllers/Sales.php index dc8b5239f..3a61bb724 100644 --- a/application/controllers/Sales.php +++ b/application/controllers/Sales.php @@ -1112,6 +1112,7 @@ class Sales extends Secure_Controller } $data['items_module_allowed'] = $this->Employee->has_grant('items', $this->Employee->get_logged_in_employee_info()->person_id); + $data['change_price'] = $this->Employee->has_grant('sales_change_price', $this->Employee->get_logged_in_employee_info()->person_id); $invoice_format = $this->config->item('sales_invoice_format'); $data['invoice_format'] = $invoice_format; diff --git a/application/language/en-GB/sales_lang.php b/application/language/en-GB/sales_lang.php index d42569a68..e98386100 100644 --- a/application/language/en-GB/sales_lang.php +++ b/application/language/en-GB/sales_lang.php @@ -13,6 +13,7 @@ $lang["sales_cash"] = "Cash"; $lang["sales_cash_deposit"] = "Cash Deposit"; $lang["sales_cash_filter"] = "Cash"; $lang["sales_change_due"] = "Change Due"; +$lang["sales_change_price"] = "Change Selling Price"; $lang["sales_check"] = "Cheque"; $lang["sales_check_balance"] = "Cheque remainder"; $lang["sales_check_filter"] = "Cheque"; diff --git a/application/language/en-US/sales_lang.php b/application/language/en-US/sales_lang.php index ed97e01d0..4af808a14 100644 --- a/application/language/en-US/sales_lang.php +++ b/application/language/en-US/sales_lang.php @@ -13,13 +13,14 @@ $lang["sales_cash"] = "Cash"; $lang["sales_cash_deposit"] = "Cash Deposit"; $lang["sales_cash_filter"] = "Cash"; $lang["sales_change_due"] = "Change Due"; +$lang["sales_change_price"] = "Change Selling Price"; $lang["sales_check"] = "Check"; $lang["sales_check_balance"] = "Check remainder"; $lang["sales_check_filter"] = "Check"; $lang["sales_comment"] = "Comment"; $lang["sales_comments"] = "Comments"; $lang["sales_complete_sale"] = "Complete"; -$lang["sales_confirm_cancel_sale"] = "Are you sure you want to clear this sale? All items will cleared."; +$lang["sales_confirm_cancel_sale"] = "Are you sure you want to clear this sale? All items will be cleared."; $lang["sales_confirm_delete"] = "Are you sure you want to delete the selected Sale(s)?"; $lang["sales_confirm_restore"] = "Are you sure you want to restore the selected Sale(s)?"; $lang["sales_credit"] = "Credit Card"; diff --git a/application/migrations/20200125100000_saleschangeprice.php b/application/migrations/20200125100000_saleschangeprice.php new file mode 100644 index 000000000..f635bce39 --- /dev/null +++ b/application/migrations/20200125100000_saleschangeprice.php @@ -0,0 +1,20 @@ + diff --git a/application/migrations/sqlscripts/3.3.2_saleschangeprice.sql b/application/migrations/sqlscripts/3.3.2_saleschangeprice.sql new file mode 100644 index 000000000..c929bae27 --- /dev/null +++ b/application/migrations/sqlscripts/3.3.2_saleschangeprice.sql @@ -0,0 +1,5 @@ +INSERT INTO `ospos_permissions` (`permission_id`, `module_id`) VALUES +('sales_change_price', 'sales'); + +INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES +('sales_change_price', 1, '--'); diff --git a/application/views/sales/register.php b/application/views/sales/register.php index f968d8fd5..61828f3fc 100644 --- a/application/views/sales/register.php +++ b/application/views/sales/register.php @@ -164,7 +164,7 @@ if(isset($success)) } ?>