Locale handling of decimals in attribute saves

- Added check in controller to convert locale-specific decimal formats to use a period decimal separator.
- Added PHPdoc explanation

Signed-off-by: objecttothis <objecttothis@gmail.com>

Add TODO to clarify workaround

Signed-off-by: objecttothis <objecttothis@gmail.com>

Fixed bugs in SQL

- Added checks before attempting to delete non-existing values.
- Corrected function which deletes duplicate attribute values and replaces the attribute_ids

Signed-off-by: objecttothis <objecttothis@gmail.com>
This commit is contained in:
objecttothis
2024-07-23 17:52:21 +04:00
committed by jekkos
parent 5434eaed03
commit 6eb22276f3
5 changed files with 67 additions and 34 deletions

View File

@@ -75,6 +75,7 @@ ALTER TABLE `ospos_expense_categories` ADD INDEX(`category_description`);
ALTER TABLE `ospos_giftcards` MODIFY `deleted` tinyint(1) DEFAULT 0 NOT NULL;
#ospos_items table
ALTER TABLE `ospos_items` DROP FOREIGN KEY `ospos_items_ibfk_1`;
ALTER TABLE `ospos_items` MODIFY `deleted` tinyint(1) DEFAULT 0 NOT NULL;
ALTER TABLE `ospos_items` MODIFY `stock_type` tinyint(1) DEFAULT 0 NOT NULL;
ALTER TABLE `ospos_items` MODIFY `item_type` tinyint(1) DEFAULT 0 NOT NULL;
@@ -140,9 +141,6 @@ ALTER TABLE `ospos_suppliers` ADD CONSTRAINT `ospos_suppliers_ibfk_1` FOREIGN KE
ALTER TABLE `ospos_tax_categories` MODIFY `deleted` tinyint(1) DEFAULT 0 NOT NULL;
ALTER TABLE `ospos_tax_categories` MODIFY `tax_group_sequence` tinyint(1) NOT NULL;
#ospos_tax_codes table
ALTER TABLE `ospos_tax_codes` MODIFY `deleted` tinyint(1) DEFAULT 0 NOT NULL;
#ospos_tax_jurisdictions table
ALTER TABLE `ospos_tax_jurisdictions` MODIFY `deleted` tinyint(1) DEFAULT 0 NOT NULL;
ALTER TABLE `ospos_tax_jurisdictions` MODIFY `tax_group_sequence` tinyint(1) DEFAULT 0 NOT NULL;