Commit Graph

5366 Commits

Author SHA1 Message Date
objecttothis
3d65c3fffa CSV import optimizations and code cleanup (#3150)
Optimizations and CSV Import Rework
- Replaced " with ' where possible to prevent the parser from being called when not needed.
- Replaced == and != with === and !== where possible for bug prevention and speed.
- Replaced -1 with NEW_ITEM global constant for code clarity.
- Added NEW_ITEM global constant to constants.php.
- Refactored CSV import function names for clarity.
- Added capability to import a CSV file containing updates.
- Replaced array() with [] for speed and consistency.
- Removed hungarian notation from two private functions.
- Refactored QueryBuilder functions to place table name in the get() function call.
- Replaced (int) cast with call to intval() for speed.
- Replaced == and != with === and !== where possible to prevent bugs and for speed.
- Replaced array() with [] for speed and consistency.
- Fixed search_custom call

Optimizations and bugfixes for attributes used in csv_import
- Reordered where statements in queries to match composite index on attribute_links table.
- fixed value_exists() to account for different attribute types.
- Removed hungarian notation on private function.
- Replaced array() with [] for speed and consistency.
- Replaced != with <> in SQL for consistency.
- Removed from() calls in querybuilder where possible to reduce function calls.
- Add get_items_by_value()
- Reworked check_data_validity()
- Remove unneeded comments
- Refactor functions for code clarity.
- Use $this->db->dbprefix() where possible instead of hand-writing ospos_...
- Removed unneeded column from query.
- Replaced (int) cast with intval() call for speed.
- Added get_attribute_values()
- Fixed issue with date format locale not being used
- Refactored save_value to respect different attribute_types
- Added delete_orphaned_links() to remove attribute_links that are no longer linked to any items
- Added get_attributes_by_definition()
- Added attribute_cleanup()

Optimizations used in csv_import
- replaced array() with [] for consistency and speed.
- Removed hungarian notation in private functions.
- Replaced " with ' where possible to prevent the parser from being called.
- Minor formatting
- Refactored if statement to tertiary notation for cleaner implementation.
- Replaced " for ' where possible to prevent the parser from being called.
- Added the Id column in the generate_import_items_csv() template so that users can submit an update to an existing item.
- Removed unused key=>value pairs in foreach loops for speed.
- Removed unneeded comments where the function name was self-explanatory.
- Rework get_csv_file() for speed.
- Rework bom_exists() for speed.
- Replaced array() with [] for speed and consistency.
- Replaced == with === where possible to prevent bugs and for speed.
- Reworked valid_date() and valid_decimal helper functions for speed and accuracy according to the locale_format instead of a fixed format.
- Minor Reformatting for clarity.
- Replaced " for ' to prevent the parser from being called.
- Refactored function call names to reflect new names.
- Added missing ; in &nbsp;
- Used String interpolation where useful.

- Spelling fix in comment

Requested Review Changes
- Fixed indentation in Items.php
- Fixed indentation in Attribute.php
- Refactored variable out of long line of code to make it more readable.
2021-07-29 22:22:59 +02:00
gurulenin
517635181c Translated using Weblate (Tamil)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ta/
2021-07-28 15:46:15 +02:00
Jeroen Peelaerts
1547272665 Check username before employee creation (#3239) 2021-07-23 00:59:40 +02:00
Jeroen Peelaerts
8675aa82df Attribute value encoding fix (#3241) 2021-07-22 19:01:59 +02:00
gurulenin
5acafd4ea8 Translated using Weblate (Tamil)
Currently translated at 100.0% (29 of 29 strings)

Translation: opensourcepos/attributes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/attributes/ta/
2021-07-22 18:45:40 +02:00
gurulenin
2db50d69d0 Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/receivings
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/receivings/ta/
2021-07-22 18:45:40 +02:00
Jeroen Peelaerts
c6d0582fcb Add category column to item summary report (#3240) 2021-07-21 23:22:53 +02:00
Emin Tufan Çetin
3fbfd8c917 Translated using Weblate (Turkish)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/tr/
2021-07-18 11:06:10 +02:00
Emin Tufan Çetin
c38fc60f6a Translated using Weblate (Turkish)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/tr/
2021-07-18 11:06:10 +02:00
Emin Tufan Çetin
346a34121f Translated using Weblate (Turkish)
Currently translated at 100.0% (77 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/tr/
2021-07-18 11:06:10 +02:00
Emin Tufan Çetin
9c9c2e8b81 Translated using Weblate (Turkish)
Currently translated at 100.0% (180 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/tr/
2021-07-18 11:06:09 +02:00
Emin Tufan Çetin
510a01e2b5 Translated using Weblate (Turkish)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/tr/
2021-07-18 11:06:09 +02:00
Emin Tufan Çetin
93014dc4d8 Translated using Weblate (Turkish)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/tr/
2021-07-18 11:06:08 +02:00
Emin Tufan Çetin
294f63bd31 Translated using Weblate (Turkish)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/tr/
2021-07-18 11:06:08 +02:00
Emin Tufan Çetin
1b7531c7f4 Translated using Weblate (Turkish)
Currently translated at 100.0% (36 of 36 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/tr/
2021-07-18 11:06:08 +02:00
Emin Tufan Çetin
6d1eeb3c62 Translated using Weblate (Turkish)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/tr/
2021-07-18 11:06:07 +02:00
Emin Tufan Çetin
3ada6f8372 Translated using Weblate (Turkish)
Currently translated at 100.0% (302 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/tr/
2021-07-18 11:06:07 +02:00
Emin Tufan Çetin
d15d001b5b Translated using Weblate (Turkish)
Currently translated at 100.0% (35 of 35 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/tr/
2021-07-18 11:06:06 +02:00
BudsieBuds
29d6138951 Translated using Weblate (Dutch)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/nl/
2021-07-17 04:55:34 +02:00
BudsieBuds
d6a4161416 Translated using Weblate (Dutch)
Currently translated at 96.1% (74 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/nl/
2021-07-17 04:55:34 +02:00
BudsieBuds
0604ad121b Translated using Weblate (Dutch)
Currently translated at 99.3% (300 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/nl/
2021-07-17 04:55:34 +02:00
teddy tang
ffdc8f0bd5 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/zh_Hant/
2021-07-15 06:59:54 +02:00
teddy tang
83d1194d0c Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (77 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/zh_Hant/
2021-07-15 06:59:54 +02:00
gurulenin
e90b58f110 Translated using Weblate (Tamil)
Currently translated at 98.7% (76 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/ta/
2021-07-15 06:59:53 +02:00
gurulenin
bee3c7ede0 Translated using Weblate (Tamil)
Currently translated at 100.0% (139 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ta/
2021-07-15 06:59:53 +02:00
gurulenin
bfc1c2e55e Translated using Weblate (Tamil)
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ta/
2021-07-15 06:59:53 +02:00
teddy tang
8d0c5c6ee9 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (11 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/zh_Hant/
2021-07-15 06:59:53 +02:00
teddy tang
f87c90fdec Translated using Weblate (Chinese (Traditional))
Currently translated at 96.0% (290 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-15 06:59:52 +02:00
FrancescoUK
cb560949ac Translated using Weblate (English (United Kingdom))
Currently translated at 92.2% (71 of 77 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/en_GB/
2021-07-14 23:56:52 +02:00
FrancescoUK
4d5a2f15c2 Translated using Weblate (English (United Kingdom))
Currently translated at 54.5% (6 of 11 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/en_GB/
2021-07-14 23:56:52 +02:00
FrancescoUK
defb484640 Translated using Weblate (English (United Kingdom))
Currently translated at 98.6% (298 of 302 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/en_GB/
2021-07-14 23:56:52 +02:00
Jeroen Peelaerts
57fb2c98fa Move expenses categories to office menu group 2021-07-14 23:43:36 +02:00
Jeroen Peelaerts
c3bdff6fb4 Fix escape sequence in Polish 2021-07-14 15:50:34 +02:00
teddy tang
4ecfbc2398 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (78 of 78 strings)

Translation: opensourcepos/taxes
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/taxes/zh_Hant/
2021-07-14 14:06:17 +02:00
gurulenin
41152a5b12 Translated using Weblate (Tamil)
Currently translated at 99.4% (179 of 180 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/ta/
2021-07-14 14:06:17 +02:00
teddy tang
797ac4c9d4 Translated using Weblate (Chinese (Traditional))
Currently translated at 80.5% (240 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/zh_Hant/
2021-07-14 14:06:17 +02:00
gurulenin
13be0a1b0c Translated using Weblate (Tamil)
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ta/
2021-07-14 14:06:17 +02:00
gurulenin
b6ac9e5909 Translated using Weblate (Tamil)
Currently translated at 100.0% (52 of 52 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/ta/
2021-07-14 14:06:17 +02:00
gurulenin
3debc57ca8 Translated using Weblate (Tamil)
Currently translated at 100.0% (298 of 298 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/ta/
2021-07-14 14:06:17 +02:00
teddy tang
fd1e942273 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (110 of 110 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/zh_Hant/
2021-07-14 14:06:17 +02:00
gurulenin
c641b1762c Translated using Weblate (Tamil)
Currently translated at 100.0% (44 of 44 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/ta/
2021-07-14 14:06:17 +02:00
gurulenin
6ee8757b12 Translated using Weblate (Tamil)
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/ta/
2021-07-14 14:06:17 +02:00
teddy tang
ee575b5109 Translated using Weblate (Chinese (Traditional))
Currently translated at 90.6% (126 of 139 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/zh_Hant/
2021-07-14 14:06:17 +02:00
Jeroen Peelaerts
e11eba978f Sync language files 2021-07-14 08:35:04 +02:00
Jeroen Peelaerts
a4234a3129 Fix minification (#3213)
Upgrade grunt, grunt-cli and grunt-uglify

Only copy bootswatch 5 using npm.  Remove unused dependencies and tasks
(apigen, mocha, wd, phantomjs). This should decrease the container size.
2021-07-14 08:35:04 +02:00
BudsieBuds
ba8cb0ef86 Create codeql-analysis.yml 2021-07-14 08:35:04 +02:00
BudsieBuds
2eee6313e0 Converted login to BS5 and other changes
Converted the login view to Bootstrap and Bootswatch 5. Added an option to change the login form style. Shifted some translations around and added new ones. Partially moved from Bower to NPM, added new branding logo's. Some other small changes and optimizations.
2021-07-14 08:35:04 +02:00
Jeroen Peelaerts
95f19d6063 Force html2canvas version (#3236) 2021-07-14 00:18:00 +02:00
jacekz123
8a854d1912 Translated using Weblate (Polish)
Currently translated at 2.7% (1 of 36 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/pl/
2021-07-13 18:03:01 +02:00
jacekz123
80f8dd9b37 Translated using Weblate (Polish)
Currently translated at 2.5% (1 of 39 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/pl/
2021-07-13 18:03:00 +02:00