From 387abe57dfa639d21f3130db4e2c55027fdf1549 Mon Sep 17 00:00:00 2001 From: BudsieBuds Date: Tue, 21 Jul 2026 16:18:20 +0200 Subject: [PATCH] Bootstrap 5 WIP - work in progress build of conversion from bootstrap 3 to 5 --- README.md | 4 + app/Controllers/Config.php | 63 +- app/Controllers/Reports.php | 14 +- .../Migrations/sqlscripts/initial_schema.sql | 8 +- app/Helpers/tabular_helper.php | 32 +- app/Helpers/tax_helper.php | 8 +- app/Language/en/Config.php | 2 +- app/Views/attributes/form.php | 158 ++-- app/Views/attributes/item.php | 174 ++-- app/Views/attributes/manage.php | 17 +- app/Views/cashups/form.php | 364 +++----- app/Views/cashups/manage.php | 58 +- app/Views/configs/appearance_config.php | 124 +++ app/Views/configs/barcode_config.php | 424 ++++------ app/Views/configs/config_header.php | 5 + app/Views/configs/email_config.php | 178 ++-- app/Views/configs/general_config.php | 654 +++++---------- app/Views/configs/info_config.php | 246 +++--- app/Views/configs/integrations_config.php | 98 +-- app/Views/configs/invoice_config.php | 311 +++---- app/Views/configs/license_config.php | 42 +- app/Views/configs/locale_config.php | 542 ++++++------ app/Views/configs/manage.php | 133 ++- app/Views/configs/message_config.php | 111 +-- app/Views/configs/receipt_config.php | 508 +++++------- app/Views/configs/reward_config.php | 55 +- app/Views/configs/shortcuts_config.php | 55 +- app/Views/configs/stock_config.php | 36 +- app/Views/configs/system_config.php | 17 - app/Views/configs/system_info.php | 410 +++++---- app/Views/configs/table_config.php | 51 +- app/Views/configs/tax_config.php | 216 ++--- app/Views/customers/form.php | 598 +++++--------- app/Views/customers/form_csv_import.php | 37 +- app/Views/employees/form.php | 223 +++-- app/Views/expenses/form.php | 248 +++--- app/Views/expenses/manage.php | 58 +- app/Views/expenses_categories/form.php | 39 +- app/Views/expenses_categories/manage.php | 17 +- app/Views/giftcards/form.php | 85 +- app/Views/giftcards/manage.php | 17 +- app/Views/home/form_change_password.php | 138 ---- app/Views/home/home.php | 15 +- app/Views/home/modules.php | 16 + app/Views/home/office.php | 15 +- app/Views/home/profile.php | 137 ++++ app/Views/item_kits/form.php | 258 ++---- app/Views/item_kits/manage.php | 22 +- app/Views/items/form.php | 590 +++++-------- app/Views/items/form_bulk.php | 233 ++---- app/Views/items/form_count_details.php | 153 ++-- app/Views/items/form_csv_import.php | 35 +- app/Views/items/form_inventory.php | 130 +-- app/Views/items/manage.php | 107 ++- app/Views/login.php | 228 ++++-- app/Views/messages/form_sms.php | 54 +- app/Views/messages/sms.php | 54 +- app/Views/partial/customer_rewards.php | 37 +- app/Views/partial/daterangepicker.php | 389 ++++----- app/Views/partial/dinner_tables.php | 27 +- app/Views/partial/footer.php | 33 +- app/Views/partial/header.php | 136 +-- app/Views/partial/stock_locations.php | 27 +- app/Views/partial/visibility_js.php | 2 +- app/Views/people/form_basic_info.php | 200 ++--- app/Views/people/manage.php | 31 +- app/Views/receivings/receipt.php | 4 +- app/Views/receivings/receiving.php | 30 +- app/Views/reports/date_input.php | 123 +-- app/Views/reports/graphical.php | 22 +- app/Views/reports/inventory_summary_input.php | 53 +- app/Views/reports/listing.php | 118 ++- app/Views/reports/specific_customer_input.php | 92 ++- app/Views/reports/specific_input.php | 100 +-- app/Views/reports/tabular.php | 25 +- app/Views/reports/tabular_details.php | 24 +- app/Views/sales/form.php | 3 +- app/Views/sales/help.php | 6 +- app/Views/sales/invoice.php | 11 +- app/Views/sales/manage.php | 57 +- app/Views/sales/quote.php | 11 +- app/Views/sales/receipt.php | 9 +- app/Views/sales/register.php | 775 ++++++------------ app/Views/sales/suspended.php | 2 +- app/Views/sales/tax_invoice.php | 11 +- app/Views/sales/work_order.php | 11 +- app/Views/suppliers/form.php | 88 +- app/Views/taxes/manage.php | 41 +- app/Views/taxes/tax_categories.php | 33 +- app/Views/taxes/tax_codes.php | 37 +- app/Views/taxes/tax_jurisdictions.php | 41 +- app/Views/taxes/tax_rates.php | 12 +- app/Views/taxes/tax_rates_form.php | 85 +- gulpfile.js | 99 +-- package-lock.json | 340 ++++---- package.json | 25 +- public/css/interface.css | 71 ++ public/css/ospos.css | 186 ----- public/css/popupbox.css | 86 -- public/css/receipt.css | 5 - public/css/register.css | 117 --- public/js/bs-modal_switch_content.js | 17 + public/js/bs-tab_anchor_linking.js | 37 + public/js/bs-tooltips.js | 3 + public/js/bs-validation.js | 20 + public/js/clipboard.min.js | 7 - public/js/manage_tables.js | 134 ++- 107 files changed, 5329 insertions(+), 7149 deletions(-) create mode 100644 app/Views/configs/appearance_config.php create mode 100644 app/Views/configs/config_header.php delete mode 100644 app/Views/configs/system_config.php delete mode 100644 app/Views/home/form_change_password.php create mode 100644 app/Views/home/modules.php create mode 100644 app/Views/home/profile.php create mode 100644 public/css/interface.css delete mode 100644 public/css/ospos.css delete mode 100644 public/css/popupbox.css delete mode 100644 public/css/register.css create mode 100644 public/js/bs-modal_switch_content.js create mode 100644 public/js/bs-tab_anchor_linking.js create mode 100644 public/js/bs-tooltips.js create mode 100644 public/js/bs-validation.js delete mode 100644 public/js/clipboard.min.js diff --git a/README.md b/README.md index ecd695b8f..4192cb67c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@

Open Source Point of Sale Logo

Open Source Point of Sale

+## ☢️ Bootstrap 5 conversion WIP + +This is a heavily under-construction build converting OSPOS from Bootstrap 3 to Bootstrap 5. Please do not use! +

Introduction · Demo · Installation · Contributing · Bugs · FAQ · diff --git a/app/Controllers/Config.php b/app/Controllers/Config.php index 0619190f8..1fa6650ff 100644 --- a/app/Controllers/Config.php +++ b/app/Controllers/Config.php @@ -371,8 +371,6 @@ class Config extends Secure_Controller public function postSaveGeneral(): ResponseInterface { $batchSaveData = [ - 'theme' => $this->request->getPost('theme'), - 'login_form' => $this->request->getPost('login_form'), 'default_sales_discount_type' => $this->request->getPost('default_sales_discount_type') != null, 'default_sales_discount' => parse_decimals($this->request->getPost('default_sales_discount')), 'default_receivings_discount_type' => $this->request->getPost('default_receivings_discount_type') != null, @@ -380,8 +378,6 @@ class Config extends Secure_Controller 'enforce_privacy' => $this->request->getPost('enforce_privacy') != null, 'receiving_calculate_average_price' => $this->request->getPost('receiving_calculate_average_price') != null, 'lines_per_page' => $this->request->getPost('lines_per_page', FILTER_SANITIZE_NUMBER_INT), - 'notify_horizontal_position' => $this->request->getPost('notify_horizontal_position'), - 'notify_vertical_position' => $this->request->getPost('notify_vertical_position'), 'image_max_width' => $this->request->getPost('image_max_width', FILTER_SANITIZE_NUMBER_INT), 'image_max_height' => $this->request->getPost('image_max_height', FILTER_SANITIZE_NUMBER_INT), 'image_max_size' => $this->request->getPost('image_max_size', FILTER_SANITIZE_NUMBER_INT), @@ -425,6 +421,26 @@ class Config extends Secure_Controller return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]); } + /** + * Saves Appearance configuration. Used in app/Views/configs/appearance_config.php + */ + public function postSaveAppearance(): ResponseInterface + { + $batch_save_data = [ + 'theme' => $this->request->getPost('theme'), + 'login_form' => $this->request->getPost('login_form'), + 'notify_horizontal_position' => $this->request->getPost('notify_horizontal_position'), + 'notify_vertical_position' => $this->request->getPost('notify_vertical_position'), + 'color_mode' => $this->request->getPost('color_mode'), + 'config_menu_position' => $this->request->getPost('config_menu_position'), + 'responsive_design' => $this->request->getPost('responsive_design') != null + ]; + + $success = $this->appconfig->batch_save($batch_save_data); + + return $this->response->setJSON(['success' => $success, 'message' => lang('Config.saved_' . ($success ? '' : 'un') . 'successfully')]); + } + /** * Checks a number against the currently selected locale. Used in app/Views/configs/locale_config.php * @@ -486,26 +502,25 @@ class Config extends Secure_Controller $exploded = explode(":", $this->request->getPost('language')); $currency_symbol = $this->request->getPost('currency_symbol'); $batch_save_data = [ - 'currency_symbol' => htmlspecialchars($currency_symbol ?? ''), - 'currency_code' => $this->request->getPost('currency_code'), - 'language_code' => $exploded[0], - 'language' => $exploded[1], - 'timezone' => $this->request->getPost('timezone'), - 'dateformat' => $this->request->getPost('dateformat'), - 'timeformat' => $this->request->getPost('timeformat'), - 'thousands_separator' => $this->request->getPost('thousands_separator') != null, - 'number_locale' => $this->request->getPost('number_locale'), - 'currency_decimals' => $this->request->getPost('currency_decimals', FILTER_SANITIZE_NUMBER_INT), - 'tax_decimals' => $this->request->getPost('tax_decimals', FILTER_SANITIZE_NUMBER_INT), - 'quantity_decimals' => $this->request->getPost('quantity_decimals', FILTER_SANITIZE_NUMBER_INT), - 'country_codes' => htmlspecialchars($this->request->getPost('country_codes')), - 'payment_options_order' => $this->request->getPost('payment_options_order'), - 'payment_reference_code_min' => $this->request->getPost('payment_reference_code_min', FILTER_SANITIZE_NUMBER_INT), - 'payment_reference_code_max' => $this->request->getPost('payment_reference_code_max', FILTER_SANITIZE_NUMBER_INT), - 'date_or_time_format' => $this->request->getPost('date_or_time_format') != null, - 'cash_decimals' => $this->request->getPost('cash_decimals', FILTER_SANITIZE_NUMBER_INT), - 'cash_rounding_code' => $this->request->getPost('cash_rounding_code'), - 'financial_year' => $this->request->getPost('financial_year', FILTER_SANITIZE_NUMBER_INT) + 'currency_symbol' => htmlspecialchars($currency_symbol ?? ''), + 'currency_code' => $this->request->getPost('currency_code'), + 'language_code' => $exploded[0], + 'language' => $exploded[1], + 'rtl_language' => $this->request->getPost('rtl_language') != null, + 'timezone' => $this->request->getPost('timezone'), + 'dateformat' => $this->request->getPost('dateformat'), + 'timeformat' => $this->request->getPost('timeformat'), + 'thousands_separator' => $this->request->getPost('thousands_separator') != null, + 'number_locale' => $this->request->getPost('number_locale'), + 'currency_decimals' => $this->request->getPost('currency_decimals', FILTER_SANITIZE_NUMBER_INT), + 'tax_decimals' => $this->request->getPost('tax_decimals', FILTER_SANITIZE_NUMBER_INT), + 'quantity_decimals' => $this->request->getPost('quantity_decimals', FILTER_SANITIZE_NUMBER_INT), + 'country_codes' => htmlspecialchars($this->request->getPost('country_codes')), + 'payment_options_order' => $this->request->getPost('payment_options_order'), + 'date_or_time_format' => $this->request->getPost('date_or_time_format') != null, + 'cash_decimals' => $this->request->getPost('cash_decimals', FILTER_SANITIZE_NUMBER_INT), + 'cash_rounding_code' => $this->request->getPost('cash_rounding_code'), + 'financial_year' => $this->request->getPost('financial_year', FILTER_SANITIZE_NUMBER_INT) ]; $success = $this->appconfig->batch_save($batch_save_data); diff --git a/app/Controllers/Reports.php b/app/Controllers/Reports.php index 0c9a884ca..b4ab3b67c 100644 --- a/app/Controllers/Reports.php +++ b/app/Controllers/Reports.php @@ -1312,7 +1312,7 @@ class Reports extends Secure_Controller 'sales/edit/' . $row['sale_id'], '', [ - 'class' => 'modal-dlg print_hide', + 'class' => 'modal-launch print_hide', $button_key => $button_label, 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Sales.update') @@ -1439,7 +1439,7 @@ class Reports extends Secure_Controller 'sales/edit/' . $row['sale_id'], '', [ - 'class' => 'modal-dlg print_hide', + 'class' => 'modal-launch print_hide', $button_key => $button_label, 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Sales.update') @@ -1571,7 +1571,7 @@ class Reports extends Secure_Controller 'sales/edit/' . $row['sale_id'], '', [ - 'class' => 'modal-dlg print_hide', + 'class' => 'modal-launch print_hide', $button_key => $button_label, 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Sales.update') @@ -1659,7 +1659,7 @@ class Reports extends Secure_Controller 'sales/edit/' . $report_data['sale_id'], '', [ - 'class' => 'modal-dlg print_hide', + 'class' => 'modal-launch print_hide', $button_key => $button_label, 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Sales.update') @@ -1835,7 +1835,7 @@ class Reports extends Secure_Controller 'sales/edit/' . $row['sale_id'], '', [ - 'class' => 'modal-dlg print_hide', + 'class' => 'modal-launch print_hide', $button_key => $button_label, 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Sales.update') @@ -1915,7 +1915,7 @@ class Reports extends Secure_Controller 'receivings/edit/' . $report_data['receiving_id'], '', [ - 'class' => 'modal-dlg print_hide', + 'class' => 'modal-launch print_hide', 'data-btn-submit' => lang('Common.submit'), 'data-btn-delete' => lang('Common.delete'), 'title' => lang('Receivings.update') @@ -1975,7 +1975,7 @@ class Reports extends Secure_Controller 'receivings/edit/' . $row['receiving_id'], '', [ - 'class' => 'modal-dlg print_hide', + 'class' => 'modal-launch print_hide', 'data-btn-delete' => lang('Common.delete'), 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Receivings.update') diff --git a/app/Database/Migrations/sqlscripts/initial_schema.sql b/app/Database/Migrations/sqlscripts/initial_schema.sql index 0823793a5..363757edc 100644 --- a/app/Database/Migrations/sqlscripts/initial_schema.sql +++ b/app/Database/Migrations/sqlscripts/initial_schema.sql @@ -79,10 +79,14 @@ INSERT INTO `ospos_app_config` (`key`, `value`) VALUES ('smtp_timeout', '5'), ('smtp_crypto', 'ssl'), ('receipt_template', 'receipt_default'), - ('theme', 'flatly'), + ('theme', 'bootstrap'), ('statistics', '1'), ('language', 'english'), - ('language_code', 'en'); + ('language_code', 'en'), + ('rtl_language', '0'), + ('color_mode', 'light'), + ('config_menu_position', 'start'), + ('responsive_design', '1'); -- -------------------------------------------------------- diff --git a/app/Helpers/tabular_helper.php b/app/Helpers/tabular_helper.php index 3aa23fafd..068e6ee4b 100644 --- a/app/Helpers/tabular_helper.php +++ b/app/Helpers/tabular_helper.php @@ -132,7 +132,7 @@ function get_sale_data_row(object $sale): array "$controller/edit/$sale->sale_id", '', [ - 'class' => 'modal-dlg print_hide', + 'class' => 'modal-launch print_hide', 'data-btn-delete' => lang('Common.delete'), 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") @@ -234,7 +234,7 @@ function get_person_data_row(object $person): array "Messages/view/$person->person_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Messages.sms_send') ] @@ -243,7 +243,7 @@ function get_person_data_row(object $person): array "$controller/view/$person->person_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . '.update') // TODO: String interpolation ] @@ -301,7 +301,7 @@ function get_customer_data_row(object $person, object $stats): array "Messages/view/$person->person_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Messages.sms_send') ] @@ -310,7 +310,7 @@ function get_customer_data_row(object $person, object $stats): array "$controller/view/$person->person_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] @@ -371,7 +371,7 @@ function get_supplier_data_row(object $supplier): array "Messages/view/$supplier->person_id", '', [ - 'class' => "modal-dlg", + 'class' => "modal-launch", 'data-btn-submit' => lang('Common.submit'), 'title' => lang('Messages.sms_send') ] @@ -380,7 +380,7 @@ function get_supplier_data_row(object $supplier): array "$controller/view/$supplier->person_id", '', [ - 'class' => "modal-dlg", + 'class' => "modal-launch", 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] @@ -500,7 +500,7 @@ function get_item_data_row(object $item): array "$controller/inventory/$item->item_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".count") ] @@ -509,7 +509,7 @@ function get_item_data_row(object $item): array "$controller/countDetails/$item->item_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'title' => lang(ucfirst($controller) . ".details_count") ] ), @@ -517,7 +517,7 @@ function get_item_data_row(object $item): array "$controller/view/$item->item_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] @@ -563,7 +563,7 @@ function get_giftcard_data_row(object $giftcard): array "$controller/view/$giftcard->giftcard_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] @@ -609,7 +609,7 @@ function get_item_kit_data_row(object $item_kit): array "$controller/view/$item_kit->item_kit_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] @@ -717,7 +717,7 @@ function get_attribute_definition_data_row(object $attribute_row): array "$controller/view/$attribute_row->definition_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] @@ -757,7 +757,7 @@ function get_expense_category_data_row(object $expense_category): array "$controller/view/$expense_category->expense_category_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] @@ -811,7 +811,7 @@ function get_expenses_data_row(object $expense): array "$controller/view/$expense->expense_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] @@ -913,7 +913,7 @@ function get_cash_up_data_row(object $cash_up): array "$controller/view/$cash_up->cashup_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller) . ".update") ] diff --git a/app/Helpers/tax_helper.php b/app/Helpers/tax_helper.php index 654ebfd76..501e1d65d 100644 --- a/app/Helpers/tax_helper.php +++ b/app/Helpers/tax_helper.php @@ -38,7 +38,7 @@ function get_tax_code_data_row($tax_code_row): array "$controller_name/view_tax_codes/$tax_code_row->tax_code", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller_name) . ".update_tax_codes") ] @@ -76,7 +76,7 @@ function get_tax_categories_data_row($tax_categories_row): array "$controller_name/view/$tax_categories_row->tax_category_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller_name) . ".update") ] @@ -113,7 +113,7 @@ function get_tax_jurisdictions_data_row($tax_jurisdiction_row): array "$controller_name/view/$tax_jurisdiction_row->jurisdiction_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller_name) . ".update") ] @@ -158,7 +158,7 @@ function get_tax_rates_data_row($tax_rates_row): array "$controller_name/view/$tax_rates_row->tax_rate_id", '', [ - 'class' => 'modal-dlg', + 'class' => 'modal-launch', 'data-btn-submit' => lang('Common.submit'), 'title' => lang(ucfirst($controller_name) . ".update") ] diff --git a/app/Language/en/Config.php b/app/Language/en/Config.php index 6ad5f033c..4a661b863 100644 --- a/app/Language/en/Config.php +++ b/app/Language/en/Config.php @@ -227,7 +227,7 @@ return [ 'os_timezone' => 'OSPOS Timezone:', 'ospos_info' => 'OSPOS Installation Info', 'payment_options_order' => 'Payment Options Order', - 'payment_reference_code_length_limits' => 'Payment Reference Code
Length Limits', + 'payment_reference_code_length_limits' => 'Payment Reference Code Length Limits', 'payment_reference_code_length_max_label' => 'Max', 'payment_reference_code_length_min_label' => 'Min', 'perm_risk' => 'Incorrect permissions leaves this software at risk.', diff --git a/app/Views/attributes/form.php b/app/Views/attributes/form.php index 345189dd8..a75dcb833 100644 --- a/app/Views/attributes/form.php +++ b/app/Views/attributes/form.php @@ -10,93 +10,75 @@ */ ?> -

- + 'attribute_form']) ?> - 'attribute_form', 'class' => 'form-horizontal']) ?> -
+ -
- 'required control-label col-xs-3']) ?> -
- 'definition_name', - 'id' => 'definition_name', - 'class' => 'form-control input-sm', - 'value' => esc($definition_info->definition_name) - ]) ?> -
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+
-
- 'required control-label col-xs-3']) ?> -
- definition_type, DEFINITION_TYPES), 'id="definition_type" class="form-control"') ?> -
+
+ +
+ +
+
-
- 'control-label col-xs-3']) ?> -
- definition_fk, - 'id="definition_group" class="form-control" ' . (empty($definition_group) ? 'disabled="disabled"' : '') - ) ?> -
+
+ +
+ + +
+
- +
+
    +
    - - - - - - -
    -
    -
    diff --git a/app/Views/cashups/form.php b/app/Views/cashups/form.php index 9d69faa62..89ac17f64 100644 --- a/app/Views/cashups/form.php +++ b/app/Views/cashups/form.php @@ -7,244 +7,140 @@ */ ?> -
    - +cashup_id, ['id' => 'cashups_edit_form']) // TODO: String Interpolation ?> -cashup_id, ['id' => 'cashups_edit_form', 'class' => 'form-horizontal']) // TODO: String Interpolation ?> -
    + -
    - 'control-label col-xs-3']) ?> - cashup_id) ? lang('Cashups.id') . ' ' . $cash_ups_info->cashup_id : '', 'cashup_id', ['class' => 'control-label col-xs-8', 'style' => 'text-align: left']) ?> +
    cashup_id) ? lang('Cashups.id') . " $cash_ups_info->cashup_id" : '' ?>
    + + +
    + + +
    + + +
    + + +
    + + +
    + + + + + + + +
    + + +
    + + + + + + + +
    + + +
    + + +
    + + +
    + + +
    + + +
    + + + + + + + +
    + +
    + note == 1 ? 'checked' : '' ?>> + +
    + + +
    + + + + + + + +
    + + +
    + + + + + + + +
    + + +
    + + + + + + + +
    + + +
    + + + + + + + + +
    + + +
    + + +
    + + cashup_id)): ?> +
    + deleted == 1 ? 'checked' : '' ?>> +
    + -
    - 'required control-label col-xs-3']) ?> -
    -
    - - - - 'open_date', - 'id' => 'open_date', - 'class' => 'form-control input-sm datepicker', - 'value' => to_datetime(strtotime($cash_ups_info->open_date)) - ]) ?> -
    -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    - open_employee_id, 'id="open_employee_id" class="form-control"') ?> -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    -
    - - - - 'open_amount_cash', - 'id' => 'open_amount_cash', - 'class' => 'form-control input-sm', - 'value' => to_currency_no_money($cash_ups_info->open_amount_cash) - ]) ?> - - - -
    -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    -
    - - - - 'transfer_amount_cash', - 'id' => 'transfer_amount_cash', - 'class' => 'form-control input-sm', - 'value' => to_currency_no_money($cash_ups_info->transfer_amount_cash) - ]) ?> - - - -
    -
    -
    - -
    - 'required control-label col-xs-3']) ?> -
    -
    - - - - 'close_date', - 'id' => 'close_date', - 'class' => 'form-control input-sm datepicker', - 'value' => to_datetime(strtotime($cash_ups_info->close_date)) - ]) ?> -
    -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    - close_employee_id, 'id="close_employee_id" class="form-control"') ?> -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    -
    - - - - 'closed_amount_cash', - 'id' => 'closed_amount_cash', - 'class' => 'form-control input-sm', - 'value' => to_currency_no_money($cash_ups_info->closed_amount_cash) - ]) ?> - - - -
    -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    - 'note', - 'id' => 'note', - 'value' => 0, - 'checked' => $cash_ups_info->note == 1 - ]) ?> -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    -
    - - - - 'closed_amount_due', - 'id' => 'closed_amount_due', - 'class' => 'form-control input-sm', - 'value' => to_currency_no_money($cash_ups_info->closed_amount_due) - ]) ?> - - - -
    -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    -
    - - - - 'closed_amount_card', - 'id' => 'closed_amount_card', - 'class' => 'form-control input-sm', - 'value' => to_currency_no_money($cash_ups_info->closed_amount_card) - ]) ?> - - - -
    -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    -
    - - - - 'closed_amount_check', - 'id' => 'closed_amount_check', - 'class' => 'form-control input-sm', - 'value' => to_currency_no_money($cash_ups_info->closed_amount_check) - ]) ?> - - - -
    -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    -
    - - - - 'closed_amount_total', - 'id' => 'closed_amount_total', - 'readonly' => 'true', - 'class' => 'form-control input-sm', - 'value' => to_currency_no_money($cash_ups_info->closed_amount_total) - ]) ?> - - - -
    -
    -
    - -
    - 'control-label col-xs-3']) ?> -
    - 'description', - 'id' => 'description', - 'class' => 'form-control input-sm', - 'value' => $cash_ups_info->description - ]) ?> -
    -
    - - cashup_id)) { ?> -
    - 'control-label col-xs-3']) ?> -
    - 'deleted', - 'id' => 'deleted', - 'value' => 1, - 'checked' => $cash_ups_info->deleted == 1 - ]) ?> -
    -
    - -
    diff --git a/app/Views/configs/appearance_config.php b/app/Views/configs/appearance_config.php new file mode 100644 index 000000000..ca8758f99 --- /dev/null +++ b/app/Views/configs/appearance_config.php @@ -0,0 +1,124 @@ +BETA'; +?> + + 'appearance_config_form']) ?> + + + + + +
    +
    + +
    + + +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    +
    +
    + + +
    +
    +
    +
    + + +
    +
    +
    +
    + +
    + +
    + + +
    +
    +
    + +
    + > + +
    + +
    + +
    + + + + diff --git a/app/Views/configs/barcode_config.php b/app/Views/configs/barcode_config.php index 495675628..6b25f0c24 100644 --- a/app/Views/configs/barcode_config.php +++ b/app/Views/configs/barcode_config.php @@ -6,256 +6,194 @@ */ ?> - 'barcode_config_form', 'class' => 'form-horizontal']) ?> -
    -
    + 'barcode_config_form']) ?> -
    -
      + -
      - 'control-label col-xs-2']) ?> -
      - -
      +
        + +
        +
        + +
        + +
        +
        -
        - 'control-label col-xs-2 required']) ?> -
        - '5', - 'max' => '350', - 'min' => '60', - 'type' => 'number', - 'name' => 'barcode_width', - 'id' => 'barcode_width', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_width'] - ]) ?> -
        +
        + +
        + + + px
        +
        -
        - 'control-label col-xs-2 required']) ?> -
        - 'number', - 'min' => 10, - 'max' => 120, - 'name' => 'barcode_height', - 'id' => 'barcode_height', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_height'] - ]) ?> -
        +
        + +
        + + + px
        - -
        - 'control-label col-xs-2 required']) ?> -
        - -
        -
        - 'number', - 'min' => '1', - 'max' => '30', - 'name' => 'barcode_font_size', - 'id' => 'barcode_font_size', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_font_size'] - ]) ?> -
        -
        - -
        - 'control-label col-xs-2']) ?> -
        - 'allow_duplicate_barcodes', - 'id' => 'allow_duplicate_barcodes', - 'value' => 'allow_duplicate_barcodes', - 'checked' => $config['allow_duplicate_barcodes'] == 1 - ]) ?> -   - -
        -
        - -
        - 'control-label col-xs-2']) ?> -
        - - -   -   - -
        -
        - -
        - 'control-label col-xs-2']) ?> -
        - settings['barcode_formats']); - echo form_dropdown([ - 'name' => 'barcode_formats[]', - 'id' => 'barcode_formats', - 'options' => !empty($barcode_formats) ? array_combine($barcode_formats, $barcode_formats) : [], - 'multiple' => 'multiple', - 'data-role' => 'tagsinput' - ]) ?> -
        -
        - -
        - 'control-label col-xs-2']) ?> -
        -
        - -
        - lang('Config.none'), - 'name' => lang('Items.name'), - 'category' => lang('Items.category'), - 'cost_price' => lang('Items.cost_price'), - 'unit_price' => lang('Items.unit_price'), - 'company_name' => lang('Suppliers.company_name') - ], - $config['barcode_first_row'], - ['class' => 'form-control input-sm'] - ); ?> -
        - -
        - lang('Config.none'), - 'name' => lang('Items.name'), - 'category' => lang('Items.category'), - 'cost_price' => lang('Items.cost_price'), - 'unit_price' => lang('Items.unit_price'), - 'item_code' => lang('Items.item_number'), - 'company_name' => lang('Suppliers.company_name') - ], - $config['barcode_second_row'], - ['class' => 'form-control input-sm'] - ) ?> -
        - -
        - lang('Config.none'), - 'name' => lang('Items.name'), - 'category' => lang('Items.category'), - 'cost_price' => lang('Items.cost_price'), - 'unit_price' => lang('Items.unit_price'), - 'item_code' => lang('Items.item_number'), - 'company_name' => lang('Suppliers.company_name') - ], - $config['barcode_third_row'], - ['class' => 'form-control input-sm'] - ) ?> -
        -
        -
        -
        - -
        - 'control-label col-xs-2 required']) ?> -
        - 'number', - 'name' => 'barcode_num_in_row', - 'id' => 'barcode_num_in_row', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_num_in_row'] - ]) ?> -
        -
        - -
        - 'control-label col-xs-2 required']) ?> -
        -
        - 'number', - 'min' => '0', - 'max' => '100', - 'name' => 'barcode_page_width', - 'id' => 'barcode_page_width', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_page_width'] - ]) ?> - % -
        -
        -
        - -
        - 'control-label col-xs-2 required']) ?> -
        -
        - 'number', - 'name' => 'barcode_page_cellspacing', - 'id' => 'barcode_page_cellspacing', - 'class' => 'form-control input-sm required', - 'value' => $config['barcode_page_cellspacing'] - ]) ?> - px -
        -
        -
        - - 'submit_barcode', - 'id' => 'submit_barcode', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
        +
        + +
        +
        + +
        + + +
        +
        + +
        + +
        + + + px +
        +
        +
        + +
        + > + +
        +
        + + +
        +
        +
        + > + +
        + +
        + > + +
        + +
        + > + +
        +
        +
        + +
        +
        + +
        + + + +
        +
        +
        + +
        + +
        +
        + + +
        +
        + +
        +
        + + +
        +
        + +
        +
        + + +
        +
        +
        + +
        +
        + +
        + + +
        +
        + +
        + +
        + + + +
        +
        + +
        + +
        + + + px +
        +
        +
        + +
        + +
        + diff --git a/app/Views/configs/general_config.php b/app/Views/configs/general_config.php index 2e5581edf..1afe4ae77 100644 --- a/app/Views/configs/general_config.php +++ b/app/Views/configs/general_config.php @@ -9,459 +9,209 @@ */ ?> - 'general_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> -
        -
        + 'general_config_form', 'enctype' => 'multipart/form-data']) ?> -
        -
          + -
          - 'control-label col-xs-2']) ?> -
          -
          -
          - -
          - -
          -
          +
            + +
            +
            + +
            + + + > + + > +
            +
            -
            - 'control-label col-xs-2']) ?> -
            - lang('Config.floating_labels'), - 'input_groups' => lang('Config.input_groups') - ], - $config['login_form'], - 'class="form-control input-sm"' - ) ?> -
            +
            + +
            + + + > + + > +
            - -
            - 'control-label col-xs-2 required']) ?> -
            -
            - 'default_sales_discount', - 'id' => 'default_sales_discount', - 'class' => 'form-control input-sm required', - 'type' => 'number', - 'min' => 0, - 'max' => 100, - 'value' => $config['default_sales_discount'] - ]) ?> - - 'default_sales_discount_type', - 'name' => 'default_sales_discount_type', - 'value' => 1, - 'data-toggle' => 'toggle', - 'data-size' => 'normal', - 'data-onstyle' => 'success', - 'data-on' => '' . $config['currency_symbol'] . '', - 'data-off' => '%', - 'checked' => $config['default_sales_discount_type'] == 1 - ]) ?> - -
            -
            -
            - -
            - 'control-label col-xs-2 required']) ?> -
            -
            - 'default_receivings_discount', - 'id' => 'default_receivings_discount', - 'class' => 'form-control input-sm required', - 'type' => 'number', - 'min' => 0, - 'max' => 100, - 'value' => $config['default_receivings_discount'] - ]) ?> - - 'default_receivings_discount_type', - 'name' => 'default_receivings_discount_type', - 'value' => 1, - 'data-toggle' => 'toggle', - 'data-size' => 'normal', - 'data-onstyle' => 'success', - 'data-on' => '' . $config['currency_symbol'] . '', - 'data-off' => '%', - 'checked' => $config['default_receivings_discount_type'] == 1 - ]) ?> - -
            -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - 'enforce_privacy', - 'id' => 'enforce_privacy', - 'value' => 'enforce_privacy', - 'checked' => $config['enforce_privacy'] == 1 - ]) ?> -   - -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - 'receiving_calculate_average_price', - 'id' => 'receiving_calculate_average_price', - 'value' => 'receiving_calculate_average_price', - 'checked' => $config['receiving_calculate_average_price'] == 1 - ]) ?> -
            -
            - -
            - 'control-label col-xs-2 required']) ?> -
            - 'lines_per_page', - 'id' => 'lines_per_page', - 'class' => 'form-control input-sm required', - 'type' => 'number', - 'min' => 10, - 'max' => 1000, - 'value' => $config['lines_per_page'] - ]) ?> -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            -
            -
            - lang('Config.top'), - 'bottom' => lang('Config.bottom') - ], - $config['notify_vertical_position'], - 'class="form-control input-sm"' - ) ?> -
            -
            - lang('Config.left'), - 'center' => lang('Config.center'), - 'right' => lang('Config.right') - ], - $config['notify_horizontal_position'], - 'class="form-control input-sm"' - ) ?> -
            -
            -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            -
            -
            -
            - - - - 'image_max_width', - 'id' => 'image_max_width', - 'class' => 'form-control input-sm required', - 'type' => 'number', - 'min' => 128, - 'max' => 3840, - 'value' => $config['image_max_width'], - 'data-toggle' => 'tooltip', - 'data-placement' => 'top', - 'title' => lang('Config.image_max_width_tooltip') - ]) ?> -
            -
            -
            -
            - - - - 'image_max_height', - 'id' => 'image_max_height', - 'class' => 'form-control input-sm required', - 'type' => 'number', - 'min' => 128, - 'max' => 3840, - 'value' => $config['image_max_height'], - 'data-toggle' => 'tooltip', - 'data-placement' => 'top', - 'title' => lang('Config.image_max_height_tooltip') - ]) ?> -
            -
            -
            -
            - - - - 'image_max_size', - 'id' => 'image_max_size', - 'class' => 'form-control input-sm required', - 'type' => 'number', - 'min' => 128, - 'max' => 2048, - 'value' => $config['image_max_size'], - 'data-toggle' => 'tooltip', - 'data-placement' => 'top', - 'title' => lang('Config.image_max_size_tooltip') - ]) ?> -
            -
            -
            -
            - - 'image_allowed_types[]', - 'options' => $image_allowed_types, - 'selected' => $selected_image_allowed_types, - 'id' => 'image_allowed_types', - 'class' => 'selectpicker show-menu-arrow', - 'data-none-selected-text' => lang('Common.none_selected_text'), - 'data-selected-text-format' => 'count > 1', - 'data-style' => 'btn-default btn-sm', - 'data-width' => '100%' - ]) ?> -
            -
            -
            -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - 'gcaptcha_enable', - 'id' => 'gcaptcha_enable', - 'value' => 'gcaptcha_enable', - 'checked' => $config['gcaptcha_enable'] == 1 - ]) ?> - -
            -
            - -
            - 'required control-label col-xs-2', 'id' => 'config_gcaptcha_site_key']) ?> -
            - 'gcaptcha_site_key', - 'id' => 'gcaptcha_site_key', - 'class' => 'form-control input-sm required', - 'value' => $config['gcaptcha_site_key'] - ]) ?> -
            -
            - -
            - 'required control-label col-xs-2', 'id' => 'config_gcaptcha_secret_key']) ?> -
            - 'gcaptcha_secret_key', - 'id' => 'gcaptcha_secret_key', - 'class' => 'form-control input-sm required', - 'value' => $config['gcaptcha_secret_key'] - ]) ?> -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            -
            -
            -
            - - lang('Items.name'), - 'item_number' => lang('Items.number_information'), - 'unit_price' => lang('Items.unit_price'), - 'cost_price' => lang('Items.cost_price') - ], - $config['suggestions_first_column'], - 'class="form-control input-sm"' - ) ?> -
            -
            -
            -
            - - lang('Config.none'), - 'name' => lang('Items.name'), - 'item_number' => lang('Items.number_information'), - 'unit_price' => lang('Items.unit_price'), - 'cost_price' => lang('Items.cost_price') - ], - $config['suggestions_second_column'], - 'class="form-control input-sm"' - ) ?> -
            -
            -
            -
            - - lang('Config.none'), - 'name' => lang('Items.name'), - 'item_number' => lang('Items.number_information'), - 'unit_price' => lang('Items.unit_price'), - 'cost_price' => lang('Items.cost_price') - ], - $config['suggestions_third_column'], - 'class="form-control input-sm"' - ) ?> -
            -
            -
            -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - - -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - 'derive_sale_quantity', - 'id' => 'derive_sale_quantity', - 'value' => 'derive_sale_quantity', - 'checked' => $config['derive_sale_quantity'] == 1 - ]) ?> -   - -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - 'show_office_group', - 'id' => 'show_office_group', - 'value' => 'show_office_group', - 'checked' => $show_office_group > 0 - ]) ?> -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - 'multi_pack_enabled', - 'id' => 'multi_pack_enabled', - 'value' => 'multi_pack_enabled', - 'checked' => $config['multi_pack_enabled'] == 1 - ]) ?> -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - 'include_hsn', - 'id' => 'include_hsn', - 'value' => 'include_hsn', - 'checked' => $config['include_hsn'] == 1 - ]) ?> -
            -
            - -
            - 'control-label col-xs-2']) ?> -
            - 'category_dropdown', - 'id' => 'category_dropdown', - 'value' => 'category_dropdown', - 'checked' => $config['category_dropdown'] == 1 - ]) ?> -
            -
            - - 'submit_general', - 'id' => 'submit_general', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
            +
            + +
            +
            + +
            + + +
            +
            +
            + +
            + > + +
            +
            + +
            + > + +
            + +
            + +
            +
            + + + px +
            +
            + +
            +
            + + + px +
            +
            + +
            +
            + + + kb +
            +
            + +
            +
            + + +
            +
            +
            + +
            + > + + +
            +
            + +
            +
            + +
            + + +
            +
            +
            + +
            + + +
            +
            +
            + +
            + +
            +
            +  1. + +
            +
            + +
            +
            +  2. + +
            +
            + +
            +
            +  3. + +
            +
            +
            + + +
            +
            + > + +
            +
            + > + +
            +
            + +
            + > + +
            +
            + +
            + 0 ? 'checked' : '' ?>> + +
            + +
            + > + +
            + +
            + > + +
            + +
            + > + +
            + +
            + +
            + diff --git a/app/Views/configs/info_config.php b/app/Views/configs/info_config.php index 76689a613..2966dd49e 100644 --- a/app/Views/configs/info_config.php +++ b/app/Views/configs/info_config.php @@ -6,154 +6,110 @@ */ ?> - 'info_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> -
            -
            + 'info_config_form', 'enctype' => 'multipart/form-data', 'class' => 'needs-validation']) ?> -
            -
              + -
              - 'control-label col-xs-2 required']) ?> -
              -
              - - - - 'company', - 'id' => 'company', - 'class' => 'form-control input-sm required', - 'value' => $config['company'] - ]) ?> -
              -
              +
                + +
                +
                + +
                + + +
                - -
                - 'control-label col-xs-2']) ?> -
                -
                -
                -
                - <?= esc(lang('Config.company_logo')) ?> -
                -
                - - - - - - -
                -
                -
                -
                - -
                - 'control-label col-xs-2 required']) ?> -
                - 'address', - 'id' => 'address', - 'class' => 'form-control input-sm required', - 'value' => $config['address'] - ]) ?> -
                -
                - -
                - 'control-label col-xs-2']) ?> -
                -
                - - - - 'website', - 'id' => 'website', - 'class' => 'form-control input-sm', - 'value' => $config['website'] - ]) ?> -
                -
                -
                - -
                - 'control-label col-xs-2']) ?> -
                -
                - - - - 'email', - 'id' => 'email', - 'type' => 'email', - 'class' => 'form-control input-sm', - 'value' => $config['email'] - ]) ?> -
                -
                -
                - -
                - 'control-label col-xs-2 required']) ?> -
                -
                - - - - 'tel', - 'name' => 'phone', - 'id' => 'phone', - 'class' => 'form-control input-sm required', - 'value' => $config['phone'] - ]) ?> -
                -
                -
                - -
                - 'control-label col-xs-2']) ?> -
                -
                - - - - 'tel', - 'name' => 'fax', - 'id' => 'fax', - 'class' => 'form-control input-sm', - 'value' => $config['fax'] - ]) ?> -
                -
                -
                - -
                - 'control-label col-xs-2 required']) ?> -
                - 'return_policy', - 'id' => 'return_policy', - 'class' => 'form-control input-sm required', - 'value' => $config['return_policy'] - ]) ?> -
                -
                - - 'submit_info', - 'id' => 'submit_info', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
                +
                + +
                + +
                + +
                +
                +
                  +
                • » Supported file formats; gif, png, jpg
                • +
                • » Max upload size of 100kb
                • +
                • » Max dimensions of 200x200px
                • +
                +
                +
                + + +
                + + +
                +
                + +
                +
                + +
                + + +
                +
                + +
                + +
                + + +
                +
                +
                + +
                + +
                + + +
                +
                +
                + +
                + +
                + + +
                +
                +
                + + +
                + + +
                +
                + +
                + +
                + diff --git a/app/Views/configs/invoice_config.php b/app/Views/configs/invoice_config.php index 760d936e8..a69c73c5b 100644 --- a/app/Views/configs/invoice_config.php +++ b/app/Views/configs/invoice_config.php @@ -6,193 +6,135 @@ */ ?> - 'invoice_config_form', 'class' => 'form-horizontal']) ?> -
                -
                + 'invoice_config_form']) ?> -
                -
                  + -
                  - 'control-label col-xs-2']) ?> -
                  - 'invoice_enable', - 'value' => 'invoice_enable', - 'id' => 'invoice_enable', - 'checked' => $config['invoice_enable'] == 1 - ]) ?> -
                  -
                  +
                    -
                    - 'control-label col-xs-2']) ?> -
                    - -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'recv_invoice_format', - 'id' => 'recv_invoice_format', - 'class' => 'form-control input-sm', - 'value' => $config['recv_invoice_format'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'invoice_default_comments', - 'id' => 'invoice_default_comments', - 'class' => 'form-control input-sm', - 'value' => $config['invoice_default_comments'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'invoice_email_message', - 'id' => 'invoice_email_message', - 'class' => 'form-control input-sm', - 'value' => $config['invoice_email_message'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'sales_invoice_format', - 'id' => 'sales_invoice_format', - 'class' => 'form-control input-sm', - 'value' => $config['sales_invoice_format'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'number', - 'name' => 'last_used_invoice_number', - 'id' => 'last_used_invoice_number', - 'class' => 'form-control input-sm required', - 'value' => $config['last_used_invoice_number'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'sales_quote_format', - 'id' => 'sales_quote_format', - 'class' => 'form-control input-sm', - 'value' => $config['sales_quote_format'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'number', - 'name' => 'last_used_quote_number', - 'id' => 'last_used_quote_number', - 'class' => 'form-control input-sm required', - 'value' => $config['last_used_quote_number'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'quote_default_comments', - 'id' => 'quote_default_comments', - 'class' => 'form-control input-sm', - 'value' => $config['quote_default_comments'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'work_order_enable', - 'value' => 'work_order_enable', - 'id' => 'work_order_enable', - 'checked' => $config['work_order_enable'] == 1 - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'work_order_format', - 'id' => 'work_order_format', - 'class' => 'form-control input-sm', - 'value' => $config['work_order_format'] - ]) ?> -
                    -
                    - -
                    - 'control-label col-xs-2']) ?> -
                    - 'number', - 'name' => 'last_used_work_order_number', - 'id' => 'last_used_work_order_number', - 'class' => 'form-control input-sm required', - 'value' => $config['last_used_work_order_number'] - ]) ?> -
                    -
                    - - 'submit_invoice', - 'id' => 'submit_invoice', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
                    +
                    + > +
                    + +
                    +
                    + +
                    + + +
                    +
                    + +
                    + +
                    + + +
                    +
                    +
                    + + +
                    + + +
                    + + +
                    + + +
                    + +
                    +
                    + +
                    + + +
                    +
                    +
                    + +
                    +
                    + +
                    + + +
                    +
                    + +
                    + +
                    + + +
                    +
                    + +
                    + +
                    + + +
                    +
                    + +
                    + +
                    + + +
                    +
                    +
                    + + +
                    + + +
                    + +
                    + > + +
                    + +
                    +
                    + +
                    + + +
                    +
                    + +
                    + +
                    + + +
                    +
                    +
                    + +
                    + +
                    + diff --git a/app/Views/configs/manage.php b/app/Views/configs/manage.php index af71fc87b..4640667bb 100644 --- a/app/Views/configs/manage.php +++ b/app/Views/configs/manage.php @@ -1,85 +1,66 @@ + 'info', 'icon' => 'bi-shop', 'label' => lang('Config.info'), 'title' => lang('Config.info_configuration')], + ['id' => 'general', 'icon' => 'bi-sliders', 'label' => lang('Config.general'), 'title' => lang('Config.general_configuration')], + ['id' => 'appearance', 'icon' => 'bi-eye', 'label' => 'Appearance', 'title' => 'Appearance Configuration'], + ['id' => 'locale', 'icon' => 'bi-translate', 'label' => lang('Config.locale'), 'title' => lang('Config.locale_configuration')], + ['id' => 'tax', 'icon' => 'bi-piggy-bank', 'label' => lang('Config.tax'), 'title' => lang('Config.tax_configuration')], + ['id' => 'barcode', 'icon' => 'bi-upc-scan', 'label' => lang('Config.barcode'), 'title' => lang('Config.barcode_configuration')], + ['id' => 'stock', 'icon' => 'bi-truck', 'label' => lang('Config.location'), 'title' => lang('Config.location_configuration')], + ['id' => 'receipt', 'icon' => 'bi-receipt', 'label' => lang('Config.receipt'), 'title' => lang('Config.receipt_configuration')], + ['id' => 'invoice', 'icon' => 'bi-file-text', 'label' => lang('Config.invoice'), 'title' => lang('Config.invoice_configuration')], + ['id' => 'shortcuts', 'icon' => 'bi-shift', 'label' => lang('Config.shortcuts'), 'title' => lang('Config.shortcuts_configuration')], + ['id' => 'reward', 'icon' => 'bi-trophy', 'label' => lang('Config.reward'), 'title' => lang('Config.reward_configuration')], + ['id' => 'table', 'icon' => 'bi-cup-straw', 'label' => lang('Config.table'), 'title' => lang('Config.table_configuration')], + ['id' => 'email', 'icon' => 'bi-envelope', 'label' => lang('Config.email'), 'title' => lang('Config.email_configuration')], + ['id' => 'message', 'icon' => 'bi-chat', 'label' => lang('Config.message'), 'title' => lang('Config.message_configuration')], + ['id' => 'integrations', 'icon' => 'bi-gear-wide-connected', 'label' => lang('Config.integrations'), 'title' => lang('Config.integrations_configuration')], + ['id' => 'system', 'icon' => 'bi-info-circle', 'label' => lang('Config.system_info'), 'title' => lang('Config.system_info'), 'view' => 'configs/system_info'], + ['id' => 'license', 'icon' => 'bi-journal-check', 'label' => lang('Config.license'), 'title' => lang('Config.license_configuration')], +]; +?> - + - +
                    +
                    +
                    + $tab): ?> + + +
                    -
                    -
                    - +
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - -
                    -
                    - + +
                    +
                    + $tab): ?> +
                    + +
                    + +
                    + + + diff --git a/app/Views/configs/message_config.php b/app/Views/configs/message_config.php index fcd6402f9..2da663f74 100644 --- a/app/Views/configs/message_config.php +++ b/app/Views/configs/message_config.php @@ -4,86 +4,51 @@ */ ?> - 'message_config_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> -
                    -
                    + 'message_config_form', 'enctype' => 'multipart/form-data']) ?> -
                    -
                      + -
                      - 'control-label col-xs-2 required']) ?> -
                      -
                      - - - - 'msg_uid', - 'id' => 'msg_uid', - 'class' => 'form-control input-sm required', - 'value' => $config['msg_uid'] - ]) ?> -
                      -
                      +
                        + +
                        +
                        + +
                        + +
                        +
                        -
                        - 'control-label col-xs-2 required']) ?> -
                        -
                        - - - - 'msg_pwd', - 'id' => 'msg_pwd', - 'class' => 'form-control input-sm required', - 'value' => $config['msg_pwd'] - ]) ?> -
                        -
                        +
                        + +
                        + +
                        +
                        -
                        - 'control-label col-xs-2 required']) ?> -
                        -
                        - - - - 'msg_src', - 'id' => 'msg_src', - 'class' => 'form-control input-sm required', - 'value' => $config['msg_src'] == null ? $config['company'] : $config['msg_src'] - ]) ?> -
                        -
                        +
                        + +
                        + +
                        - -
                        - 'control-label col-xs-2']) ?> -
                        - 'msg_msg', - 'id' => 'msg_msg', - 'class' => 'form-control input-sm', - 'value' => $config['msg_msg'], - 'placeholder' => lang('Config.msg_msg_placeholder') - ]) ?> -
                        -
                        - - 'submit_message', - 'id' => 'submit_message', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
                        +
                        + + +
                        + + +
                        + +
                        + +
                        + diff --git a/app/Views/configs/stock_config.php b/app/Views/configs/stock_config.php index b49986ff1..371b4b8b7 100644 --- a/app/Views/configs/stock_config.php +++ b/app/Views/configs/stock_config.php @@ -4,26 +4,23 @@ */ ?> - 'location_config_form', 'class' => 'form-horizontal']) ?> -
                        -
                        + 'location_config_form']) ?> -
                        -
                          + -
                          - $stock_locations]) ?> -
                          +
                            - 'submit_stock', - 'id' => 'submit_stock', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
                            +
                            + $stock_locations]) ?>
                            + +
                            + +
                            + +
                            -
                            - -
                            -
                            -

                            -

                            General Info

                            -

                            User Setup


                            -

                            Permissions

                            + +
                            ' . lang('Config.security_issue') . '
                            +
                            +

                            ' . lang('Config.perm_risk') . '

                            +
                              '; + } + if (substr(decoct(fileperms($logs)), -4) != 750) { + echo '
                            • ' . $bullet . 'writable/logs ' . lang('Config.is_writable') . '
                            • '; + } + + if (substr(decoct(fileperms($uploads)), -4) != 750) { + echo '
                            • ' . $bullet . 'public/uploads ' . lang('Config.is_writable') . '
                            • '; + } + + if (substr(decoct(fileperms($images)), -4) != 750) { + echo '
                            • ' . $bullet . 'public/uploads/item_pics ' . lang('Config.is_writable') . '
                            • '; + } + + if (!((substr(decoct(fileperms($importCustomers)), -4) == 640) + || (substr(decoct(fileperms($importCustomers)), -4) == 660))) { + echo '
                            • ' . $bullet . 'importCustomers.csv ' . lang('Config.is_readable') . '
                            • '; + } + echo '
                            '; + ?> + +
                            + +
                            + application_version) . ' - ' . esc(substr(config(OSPOS::class)->commit_sha1, 0, 6)); ?>
                            +
                            Language Code:

                            +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            -

                            - - application_version) ?> - commit_sha1, 0, 6)) ?>
                            - Language Code:

                            -
                            - Extensions & Modules:
                            - Enabled ✓' : 'Disabled ✗', '
                            '; - echo "» BC Math: ", extension_loaded('bcmath') ? 'Enabled ✓' : 'Disabled ✗', '
                            '; - echo "» INTL: ", extension_loaded('intl') ? 'Enabled ✓' : 'Disabled ✗', '
                            '; - echo "» OpenSSL: ", extension_loaded('openssl') ? 'Enabled ✓' : 'Disabled ✗', '
                            '; - echo "» MBString: ", extension_loaded('mbstring') ? 'Enabled ✓' : 'Disabled ✗', '
                            '; - echo "» Curl: ", extension_loaded('curl') ? 'Enabled ✓' : 'Disabled ✗', '
                            '; - echo "» Json: ", extension_loaded('json') ? 'Enabled ✓' : 'Disabled ✗', '
                            '; - echo "» Xml: ", extension_loaded('xml') ? 'Enabled ✓' : 'Disabled ✗', '

                            '; - ?> - User Configuration:
                            - .Browser: - Extensions & Modules:
                            +
                              +
                            • +
                            • +
                            • +
                            • +
                            • +
                            • +
                            • +
                            +
                            +
                            + +
                            + +
                            +
                              + 'Opera', - strpos($userAgent, 'Edge') !== false => 'Edge', - strpos($userAgent, 'Chrome') !== false => 'Chrome', - strpos($userAgent, 'Safari') !== false => 'Safari', + strpos($userAgent, 'Opera') !== false || strpos($userAgent, 'OPR/') !== false => 'Opera', + strpos($userAgent, 'Edge') !== false => 'Edge', + strpos($userAgent, 'Chrome') !== false => 'Chrome', + strpos($userAgent, 'Safari') !== false => 'Safari', strpos($userAgent, 'Firefox') !== false => 'Firefox', - strpos($userAgent, 'MSIE') !== false || strpos($userAgent, 'Trident/7') !== false => 'Internet Explorer', - default => 'Other', + strpos($userAgent, 'MSIE') !== false || strpos($userAgent, 'Trident/7') !== false => 'Internet Explorer', + default => 'Other', }; $version = match ($browser) { - 'Opera' => preg_match('/(Opera|OPR)\/([0-9.]+)/', $userAgent, $matches) ? $matches[2] : '', - 'Edge' => preg_match('/Edge\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', - 'Chrome' => preg_match('/Chrome\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', - 'Safari' => preg_match('/Version\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', - 'Firefox' => preg_match('/Firefox\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', + 'Opera' => preg_match('/(Opera|OPR)\/([0-9.]+)/', $userAgent, $matches) ? $matches[2] : '', + 'Edge' => preg_match('/Edge\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', + 'Chrome' => preg_match('/Chrome\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', + 'Safari' => preg_match('/Version\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', + 'Firefox' => preg_match('/Firefox\/([0-9.]+)/', $userAgent, $matches) ? $matches[1] : '', 'Internet Explorer' => preg_match('/(MSIE|rv:)([0-9.]+)/', $userAgent, $matches) ? $matches[2] : '', - default => '', + default => '', }; return $browser . ($version ? ' ' . $version : ''); } - echo esc(getBrowserNameAndVersion($_SERVER['HTTP_USER_AGENT'])); - ?>
                              - Server Software:
                              - PHP Version:
                              - DB Version:
                              - Server Port:
                              - OS:

                              -

                              - - File Permissions:
                              - » [writable/logs:] - Writable ✓ '; - } else { - echo ' - ' . substr(sprintf("%o", fileperms($logs)), -4) . ' | ' . ' Not Writable ✗ '; - } - - clearstatcache(); - if (is_writable($logs) && substr(decoct(fileperms($logs)), -4) != 750) { - echo ' | Vulnerable or Incorrect Permissions ✗'; - } else { - echo ' | Security Check Passed ✓'; - } - clearstatcache(); - ?> -
                              - » [public/uploads:] - Writable ✓ '; - } else { - echo ' - ' . substr(sprintf("%o", fileperms($uploads)), -4) . ' | ' . ' Not Writable ✗ '; - } - - clearstatcache(); - - if (is_writable($uploads) && substr(decoct(fileperms($uploads)), -4) != 750) { - echo ' | Vulnerable or Incorrect Permissions ✗'; - } else { - echo ' | Security Check Passed ✓ '; - } - - clearstatcache(); - ?> -
                              - » [public/uploads/item_pics:] - Writable ✓ '; - } else { - echo ' - ' . substr(sprintf("%o", fileperms($images)), -4) . ' | ' . ' Not Writable ✗ '; - } - - clearstatcache(); - - if (substr(decoct(fileperms($images)), -4) != 750) { - echo ' | Vulnerable or Incorrect Permissions ✗'; - } else { - echo ' | Security Check Passed ✓ '; - } - - clearstatcache(); - ?> -
                              - » [importCustomers.csv:] - Readable ✓ '; - } else { - echo ' - ' . substr(sprintf("%o", fileperms($importCustomers)), -4) . ' | ' . ' Not Readable ✗ '; - } - clearstatcache(); - - if (!((substr(decoct(fileperms($importCustomers)), -4) == 640) || (substr(decoct(fileperms($importCustomers)), -4) == 660))) { - echo ' | Vulnerable or Incorrect Permissions ✗'; - } else { - echo ' | Security Check Passed ✓ '; - } - clearstatcache(); - ?> -
                              - ' . lang('Config.security_issue') . '
                              ' . lang('Config.perm_risk') . '

                              '; - } else { - echo '
                              ' . lang('Config.no_risk') . '
                              '; - } - - if (substr(decoct(fileperms($logs)), -4) != 750) { - echo '
                              » [writable/logs:] ' . lang('Config.is_writable') . ''; - } - - if (substr(decoct(fileperms($uploads)), -4) != 750) { - echo '
                              » [writable/uploads:] ' . lang('Config.is_writable') . ''; - } - - if (substr(decoct(fileperms($images)), -4) != 750) { - echo '
                              » [writable/uploads/item_pics:] ' . lang('Config.is_writable') . ''; - } - - if (!((substr(decoct(fileperms($importCustomers)), -4) == 640) - || (substr(decoct(fileperms($importCustomers)), -4) == 660))) { - echo '
                              » [importCustomers.csv:] ' . lang('Config.is_readable') . ''; - } - ?> -
                            + ?> +
                          • +
                          • +
                          • +
                          • +
                          • +
                          • +
                            + +
                            + +
                            +
                              +
                            • + writable/logs + +
                            • +
                            • + public/uploads + +
                            • +
                            • + public/uploads/item_pics + +
                            • +
                            • + importCustomers.csv + +
                            • +
                            + ' . lang('Config.no_risk') . ''; + } + ?> +
                            +
                            + + +
                            + +
                            -
                            - Copy Info | - -
                            + document.getElementById("timezone").innerText = Intl.DateTimeFormat().resolvedOptions().timeZone; + + $(function() { + $('#timezone').clone().appendTo('#timezoneE'); + }); + + if ($('#timezone').html() !== $('#ostimezone').html()) { + $('#time-error').removeClass('d-none'); + }; + diff --git a/app/Views/configs/table_config.php b/app/Views/configs/table_config.php index d54452283..f63bcd97a 100644 --- a/app/Views/configs/table_config.php +++ b/app/Views/configs/table_config.php @@ -5,38 +5,28 @@ */ ?> - 'table_config_form', 'class' => 'form-horizontal']) ?> -
                            -
                            + 'table_config_form']) ?> -
                            -
                              + -
                              - 'control-label col-xs-2']) ?> -
                              - 'dinner_table_enable', - 'value' => 'dinner_table_enable', - 'id' => 'dinner_table_enable', - 'checked' => $config['dinner_table_enable'] == 1 - ]) ?> -
                              -
                              +
                                -
                                - $dinner_tables]) ?> -
                                - - 'submit_table', - 'id' => 'submit_table', - 'value' => lang('Common.submit'), - 'class' => 'btn btn-primary btn-sm pull-right' - ]) ?> - -
                                +
                                + > +
                                + +
                                + $dinner_tables]) ?> +
                                + +
                                + +
                                + diff --git a/app/Views/expenses_categories/form.php b/app/Views/expenses_categories/form.php index 31246f57a..33b5e4747 100644 --- a/app/Views/expenses_categories/form.php +++ b/app/Views/expenses_categories/form.php @@ -5,37 +5,22 @@ */ ?> -
                                -
                                  +expense_category_id", ['id' => 'expense_category_edit_form']) ?> -expense_category_id", ['id' => 'expense_category_edit_form', 'class' => 'form-horizontal']) ?> -
                                  +
                                    -
                                    - 'required control-label col-xs-3']) ?> -
                                    - 'category_name', - 'id' => 'category_name', - 'class' => 'form-control input-sm', - 'value' => $category_info->category_name - ]) ?> -
                                    -
                                    + +
                                    + + +
                                    -
                                    - 'control-label col-xs-3']) ?> -
                                    - 'category_description', - 'id' => 'category_description', - 'class' => 'form-control input-sm', - 'value' => $category_info->category_description - ]) ?> -
                                    -
                                    + +
                                    + + +
                                    -
                                    -
                                    -
                                    -
                                    diff --git a/app/Views/giftcards/form.php b/app/Views/giftcards/form.php index 586c995c5..39c139fb4 100644 --- a/app/Views/giftcards/form.php +++ b/app/Views/giftcards/form.php @@ -10,65 +10,42 @@ */ ?> -
                                    -
                                      + 'giftcard_form']) ?> - 'giftcard_form', 'class' => 'form-horizontal']) ?> -
                                      +
                                        -
                                        - 'control-label col-xs-3']) ?> -
                                        - 'person_name', - 'id' => 'person_name', - 'class' => 'form-control input-sm', - 'value' => $selected_person_name - ]) ?> - -
                                        -
                                        + +
                                        + + + +
                                        - -
                                        - "control-label col-xs-3$class"]) ?> -
                                        - 'giftcard_number', - 'id' => 'giftcard_number', - 'class' => 'form-control input-sm', - 'value' => $giftcard_number - ]) ?> -
                                        -
                                        + '; + } + ?> + +
                                        + + > +
                                        + +
                                        + + + + + + + +
                                        -
                                        - 'required control-label col-xs-3']) ?> -
                                        -
                                        - - - - 'giftcard_amount', - 'id' => 'giftcard_amount', - 'class' => 'form-control input-sm', - 'value' => to_currency_no_money($giftcard_value) - ]) ?> - - - -
                                        -
                                        -
                                        - -
                                        -
                                        -
                                        -
                                        -
                                        diff --git a/app/Views/home/form_change_password.php b/app/Views/home/form_change_password.php deleted file mode 100644 index 53d0191fe..000000000 --- a/app/Views/home/form_change_password.php +++ /dev/null @@ -1,138 +0,0 @@ - - -
                                        -
                                          - -person_id", ['id' => 'employee_form', 'class' => 'form-horizontal']) ?> -
                                          -
                                          -
                                          - -
                                          - 'required control-label col-xs-3']) ?> -
                                          -
                                          - - - - 'username', - 'id' => 'username', - 'class' => 'form-control input-sm', - 'value' => $person_info->username, - 'readonly' => 'true' - ]) ?> -
                                          -
                                          -
                                          - - person_id == "" ? ['class' => 'required'] : []; ?> - -
                                          - 'control-label col-xs-3'])) ?> -
                                          -
                                          - - - - 'current_password', - 'id' => 'current_password', - 'class' => 'form-control input-sm' - ]) ?> -
                                          -
                                          -
                                          - -
                                          - 'control-label col-xs-3'])) ?> -
                                          -
                                          - - - - 'password', - 'id' => 'password', - 'class' => 'form-control input-sm' - ]) ?> -
                                          -
                                          -
                                          - -
                                          - 'control-label col-xs-3'])) ?> -
                                          -
                                          - - - - 'repeat_password', - 'id' => 'repeat_password', - 'class' => 'form-control input-sm' - ]) ?> -
                                          -
                                          -
                                          - -
                                          -
                                          -
                                          - - - diff --git a/app/Views/home/home.php b/app/Views/home/home.php index 84237c90f..1cc66f368 100644 --- a/app/Views/home/home.php +++ b/app/Views/home/home.php @@ -6,19 +6,6 @@ - - -

                                          - - + diff --git a/app/Views/home/modules.php b/app/Views/home/modules.php new file mode 100644 index 000000000..d1749cfa6 --- /dev/null +++ b/app/Views/home/modules.php @@ -0,0 +1,16 @@ +

                                          + +
                                          + + + +
                                          diff --git a/app/Views/home/office.php b/app/Views/home/office.php index 8509c63dc..1cc66f368 100644 --- a/app/Views/home/office.php +++ b/app/Views/home/office.php @@ -6,19 +6,6 @@ - - -

                                          - - + diff --git a/app/Views/home/profile.php b/app/Views/home/profile.php new file mode 100644 index 000000000..48f506e60 --- /dev/null +++ b/app/Views/home/profile.php @@ -0,0 +1,137 @@ +email; +$size = 96; +$default = 'https://ui-avatars.com/api/?name=' . $user_info->first_name . '+' . $user_info->last_name . '&format=svg&size=' . $size; +$grav_url = 'https://www.gravatar.com/avatar/' . md5(strtolower(trim($email))) . '?d=' . urlencode($default) . '&s=' . $size; +?> + + diff --git a/app/Views/item_kits/form.php b/app/Views/item_kits/form.php index f1eb486ca..05213661a 100644 --- a/app/Views/item_kits/form.php +++ b/app/Views/item_kits/form.php @@ -8,200 +8,114 @@ */ ?> -
                                          -
                                            +item_kit_id", ['id' => 'item_kit_form']) ?> -item_kit_id", ['id' => 'item_kit_form', 'class' => 'form-horizontal']) ?> -
                                            +
                                              -
                                              - 'control-label col-xs-3']) ?> -
                                              -
                                              - - 'item_kit_number', - 'id' => 'item_kit_number', - 'class' => 'form-control input-sm', - 'value' => $item_kit_info->item_kit_number - ]) ?> -
                                              -
                                              + +
                                              + + +
                                              + + +
                                              + + +
                                              + + +
                                              + + + +
                                              + + +
                                              +
                                              + kit_discount_type == PERCENT ? 'checked' : '' ?>> +
                                              - -
                                              - 'required control-label col-xs-3']) ?> -
                                              - 'name', - 'id' => 'name', - 'class' => 'form-control input-sm', - 'value' => $item_kit_info->name - ]) ?> -
                                              +
                                              + kit_discount_type == FIXED ? 'checked' : '' ?>> +
                                              +
                                              -
                                              - 'control-label col-xs-3']) ?> -
                                              -
                                              - 'item_name', - 'id' => 'item_name', - 'class' => 'form-control input-sm', - 'size' => '50', - 'value' => $selected_kit_item - ]) ?> - + +
                                              + + +
                                              -
                                              -
                                              + +
                                              +
                                              + price_option == PRICE_ALL ? 'checked' : '' ?> > +
                                              - -
                                              - 'control-label col-xs-3']) ?> -
                                              - - -
                                              +
                                              + price_option == PRICE_KIT ? 'checked' : '' ?> > +
                                              - -
                                              - 'control-label col-xs-3']) ?> -
                                              -
                                              - 'kit_discount', - 'size' => '5', - 'maxlength' => '5', - 'id' => 'kit_discount', - 'class' => 'form-control input-sm', - 'value' => $item_kit_info->kit_discount_type === FIXED ? to_currency_no_money($item_kit_info->kit_discount) : to_decimals($item_kit_info->kit_discount) - ]) ?> -
                                              -
                                              +
                                              + price_option == PRICE_KIT_ITEMS ? 'checked' : '' ?> > +
                                              +
                                              -
                                              - 'required control-label col-xs-3'] : ['class' => 'control-label col-xs-3']) ?> -
                                              - - - -
                                              + +
                                              +
                                              + print_option == PRINT_ALL ? 'checked' : '' ?> > +
                                              - -
                                              - 'required control-label col-xs-3'] : ['class' => 'control-label col-xs-3']) ?> -
                                              - - - -
                                              +
                                              + print_option == PRINT_PRICED ? 'checked' : '' ?> > +
                                              - - -
                                              - 'control-label col-xs-3']) ?> -
                                              - 'description', - 'id' => 'description', - 'class' => 'form-control input-sm', - 'value' => $item_kit_info->description - ]) ?> -
                                              +
                                              + print_option == PRINT_KIT ? 'checked' : '' ?> > +
                                              +
                                              -
                                              - 'control-label col-xs-3']) ?> -
                                              - 'item', - 'id' => 'item', - 'class' => 'form-control input-sm' - ]) ?> -
                                              -
                                              + +
                                              + + +
                                              - - + +
                                              + + +
                                              + +
                                              +
                                              + - - - - + + + + - + - - + + - + - +
                                              +
                                              -
                                              -
                                              -
                                              -
                                              - - -
                                              diff --git a/app/Views/items/form.php b/app/Views/items/form.php index 0912ee1ea..3cf3dedb3 100644 --- a/app/Views/items/form.php +++ b/app/Views/items/form.php @@ -25,434 +25,226 @@ */ ?> -
                                              -
                                                +item_id", ['id' => 'item_form', 'enctype' => 'multipart/form-data']) ?> -item_id", ['id' => 'item_form', 'enctype' => 'multipart/form-data', 'class' => 'form-horizontal']) ?> -
                                                +
                                                  -
                                                  - 'control-label col-xs-3']) ?> -
                                                  -
                                                  - - - - 'item_number', - 'id' => 'item_number', - 'class' => 'form-control input-sm', - 'value' => $item_info->item_number - ]) ?> -
                                                  -
                                                  -
                                                  + +
                                                  + + +
                                                  -
                                                  - 'required control-label col-xs-3']) ?> -
                                                  - 'name', - 'id' => 'name', - 'class' => 'form-control input-sm', - 'value' => $item_info->name - ]) ?> -
                                                  -
                                                  + +
                                                  + + +
                                                  -
                                                  - 'required control-label col-xs-3']) ?> -
                                                  -
                                                  - - - - 'form-control']); - } else { - echo form_input([ - 'name' => 'category', - 'id' => 'category', - 'class' => 'form-control input-sm', - 'value' => $item_info->category - ]); - } - ?> -
                                                  -
                                                  -
                                                  - -
                                                  - -
                                                  - -
                                                  - 'required control-label col-xs-3'] : ['class' => 'control-label col-xs-3']) ?> -
                                                  - - -
                                                  -
                                                  - -
                                                  - 'required control-label col-xs-3'] : ['class' => 'control-label col-xs-3']) ?> -
                                                  - - - - + +
                                                  + + + + + + +
                                                  + +
                                                  + +
                                                  + + +
                                                  +
                                                  + stock_type == HAS_STOCK ? 'checked' : '' ?> > +
                                                  - -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'form-control']) ?> -
                                                  +
                                                  + stock_type == HAS_NO_STOCK ? 'checked' : '' ?> > +
                                                  +
                                                  -
                                                  - 'required control-label col-xs-3']) ?> -
                                                  -
                                                  - - - - 'cost_price', - 'id' => 'cost_price', - 'class' => 'form-control input-sm', - 'onClick' => 'this.select();', - 'value' => to_currency_no_money($item_info->cost_price) - ]) ?> - - - -
                                                  -
                                                  + +
                                                  +
                                                  + item_type == ITEM ? 'checked' : '' ?> > +
                                                  - -
                                                  - 'required control-label col-xs-3']) ?> -
                                                  -
                                                  - - - - 'unit_price', - 'id' => 'unit_price', - 'class' => 'form-control input-sm', - 'onClick' => 'this.select();', - 'value' => to_currency_no_money($item_info->unit_price) - ]) ?> - - - -
                                                  -
                                                  +
                                                  + item_type == ITEM_KIT ? 'checked' : '' ?> > +
                                                  - - -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'tax_names[]', - 'id' => 'tax_name_1', - 'class' => 'form-control input-sm', - 'value' => $item_tax_info[0]['name'] ?? $config['default_tax_1_name'] - ]) ?> -
                                                  -
                                                  -
                                                  - 'tax_percents[]', - 'id' => 'tax_percent_name_1', - 'class' => 'form-control input-sm', - 'value' => isset($item_tax_info[0]['percent']) ? to_tax_decimals($item_tax_info[0]['percent']) : to_tax_decimals($default_tax_1_rate) - ]) ?> - % -
                                                  -
                                                  -
                                                  - -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'tax_names[]', - 'id' => 'tax_name_2', - 'class' => 'form-control input-sm', - 'value' => $item_tax_info[1]['name'] ?? $config['default_tax_2_name'] - ]) ?> -
                                                  -
                                                  -
                                                  - 'tax_percents[]', - 'class' => 'form-control input-sm', - 'id' => 'tax_percent_name_2', - 'value' => isset($item_tax_info[1]['percent']) ? to_tax_decimals($item_tax_info[1]['percent']) : to_tax_decimals($default_tax_2_rate) - ]) ?> - % -
                                                  -
                                                  + +
                                                  + item_type == ITEM_AMOUNT_ENTRY ? 'checked' : '' ?> > +
                                                  - - -
                                                  - 'control-label col-xs-3']) ?> -
                                                  -
                                                  - 'tax_category', - 'id' => 'tax_category', - 'class' => 'form-control input-sm', - 'size' => '50', - 'value' => $tax_category - ]) ?> - -
                                                  -
                                                  + +
                                                  + item_type == ITEM_TEMP ? 'checked' : '' ?> > +
                                                  + +
                                                  + + +
                                                  + + +
                                                  + + +
                                                  + + - - -
                                                  - 'control-label col-xs-3']) ?> -
                                                  -
                                                  - 'hsn_code', - 'id' => 'hsn_code', - 'class' => 'form-control input-sm', - 'value' => $hsn_code - ]) ?> -
                                                  -
                                                  -
                                                  + + + +
                                                  - $location_detail) { ?> -
                                                  - 'required control-label col-xs-3']) ?> -
                                                  - "quantity_$key", - 'id' => "quantity_$key", - 'class' => 'required quantity form-control', - 'onClick' => 'this.select();', - 'value' => isset($item_info->item_id) ? to_quantity_decimals($location_detail['quantity']) : to_quantity_decimals(0) - ]) ?> -
                                                  -
                                                  - + +
                                                  + + + + + + + +
                                                  -
                                                  - 'required control-label col-xs-3']) ?> -
                                                  - 'receiving_quantity', - 'id' => 'receiving_quantity', - 'class' => 'required form-control input-sm', - 'onClick' => 'this.select();', - 'value' => isset($item_info->item_id) ? to_quantity_decimals($item_info->receiving_quantity) : to_quantity_decimals(0) - ]) ?> -
                                                  + + +
                                                  + + + +
                                                  -
                                                  - 'required control-label col-xs-3']) ?> -
                                                  - 'reorder_level', - 'id' => 'reorder_level', - 'class' => 'form-control input-sm', - 'onClick' => 'this.select();', - 'value' => isset($item_info->item_id) ? to_quantity_decimals($item_info->reorder_level) : to_quantity_decimals(0) - ]) ?> + +
                                                  + + + + +
                                                  + + + + +
                                                  + + + +
                                                  + + + + +
                                                  + + +
                                                  + + + $location_detail): ?> + +
                                                  + + +
                                                  + + + +
                                                  + + +
                                                  + + +
                                                  + + +
                                                  + + +
                                                  + + +
                                                  + + +
                                                  +
                                                  + +
                                                  +
                                                  + <?= esc(lang('Config.company_logo')) ?>
                                                  +
                                                  + + + +
                                                  + + + +
                                                  -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'description', - 'id' => 'description', - 'class' => 'form-control input-sm', - 'value' => $item_info->description - ]) ?> -
                                                  +
                                                  + allow_alt_description == 1 ? 'checked' : '' ?>> + +
                                                  + +
                                                  + is_serialized == 1 ? 'checked' : '' ?>> + +
                                                  + + + +
                                                  + +
                                                  -
                                                  - 'control-label col-xs-3']) ?> -
                                                  -
                                                  -
                                                  -
                                                  - <?= lang('Items.image') ?> -
                                                  -
                                                  - - - - - - -
                                                  -
                                                  -
                                                  + +
                                                  + +
                                                  -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'allow_alt_description', - 'id' => 'allow_alt_description', - 'value' => 1, - 'checked' => $item_info->allow_alt_description == 1 - ]) ?> -
                                                  + +
                                                  + + +
                                                  + -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'is_serialized', - 'id' => 'is_serialized', - 'value' => 1, - 'checked' => $item_info->is_serialized == 1 - ]) ?> -
                                                  -
                                                  +
                                                  + deleted == 1 ? 'checked' : '' ?>> + +
                                                  - -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'qty_per_pack', - 'id' => 'qty_per_pack', - 'class' => 'form-control input-sm', - 'value' => isset($item_info->item_id) ? to_quantity_decimals($item_info->qty_per_pack) : to_quantity_decimals(0) - ]) ?> -
                                                  -
                                                  -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'pack_name', - 'id' => 'pack_name', - 'class' => 'form-control input-sm', - 'value' => $item_info->pack_name - ]) ?> -
                                                  -
                                                  -
                                                  - 'control-label col-xs-3']) ?> -
                                                  -
                                                  - 'low_sell_item_name', - 'id' => 'low_sell_item_name', - 'class' => 'form-control input-sm', - 'value' => $selected_low_sell_item - ]) ?> - -
                                                  -
                                                  -
                                                  - - -
                                                  - 'control-label col-xs-3']) ?> -
                                                  - 'is_deleted', - 'id' => 'is_deleted', - 'value' => 1, - 'checked' => $item_info->deleted == 1 - ]) ?> -
                                                  -
                                                  - -
                                                  diff --git a/app/Views/login.php b/app/Views/login.php index ea18614aa..f84f62853 100644 --- a/app/Views/login.php +++ b/app/Views/login.php @@ -13,32 +13,83 @@ use Config\Services; $request = Services::request(); + +// Manually setting some error messages for testing +// $validation->setError('test', 'The test error is testing.'); +// $validation->setError('email', 'The email field is required.'); +// $has_errors = $validation->hasError('email'); +// $has_errors = $validation->hasError('test'); + +// Manually set database migration message to show +// $is_new_install = true; +// $is_latest = false; +// $latest_version = '1.0.0'; + +// Manually set language for page, doesn't work for dynamic elements +// \Config\Services::language()->setLocale('de-DE'); + +// Manually set login form appearence +// $config['login_form'] = 'input_groups'; + +// Manually set theme +// $config['theme'] = 'flatly'; + +$theme = (empty($config['theme']) ? 'bootstrap' : $config['theme']); + +$themeColors = [ + 'bootstrap' => '#0d6efd', + 'flatly' => '#2c3e50', + 'darkly' => '#375a7f', + 'cosmo' => '#2780e3', + 'cerulean' => '#2fa4e7', + 'journal' => '#eb6864', + 'litera' => '#4582ec', + 'lumen' => '#158cba', + 'lux' => '#1a1a1a', + 'materia' => '#2196f3', + 'minty' => '#78c2ad', + 'morph' => '#378dfc', + 'pulse' => '#593196', + 'quartz' => '#6d45bb', + 'sandstone' => '#93c54b', + 'simplex' => '#d9230f', + 'sketchy' => '#333333', + 'slate' => '#3a3f44', + 'solar' => '#b58900', + 'spacelab' => '#446e9b', + 'superhero' => '#df6919', + 'united' => '#e95420', + 'vapor' => '#6f42c1', + 'yeti' => '#008cba', + 'zephyr' => '#3459e6', +]; + +$themeColor = $themeColors[$theme] ?? '#0d6efd'; + ?> - +> <?= esc($config['company']) . ' | ' . esc(lang('Common.software_short')) . ' | ' . esc(lang('Login.login')) ?> - + ' : '' ?> - - /bootstrap.min.css"> + - + + +
                                                  -