Commit Graph

278 Commits

Author SHA1 Message Date
jekkos
4f3226b1ba Add item_pic to escape ignore list (#3379) 2022-05-03 11:26:34 +02:00
jekkos
c3d06fc6f5 Remove markup last row expenses (#3779) 2022-04-29 15:17:53 +02:00
jekkos
a6b4f826c5 Update changelog 2022-04-26 23:49:58 +02:00
jekkos
d26498d1ad Do not escape email and phone_numbers (#3379) 2022-04-26 23:49:58 +02:00
jekkos
5897130e0a Fix sales last row style (#3379) 2022-04-25 23:32:50 +02:00
jekkos
9331d82313 Add escape flag for XSS mitigation (#3379) 2022-04-14 09:28:12 +02:00
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
jekkos
663da89293 Fix decimal render (#2975) 2021-04-22 22:28:12 +02:00
Jeroen Peelaerts
080e8ac20c Add Tamil language (#3162) 2021-04-18 22:48:00 +02:00
Jeroen Peelaerts
dfd19c38f2 Render percentage discounts in configured locale (#3114) 2021-04-18 21:31:02 +02:00
Jeroen Peelaerts
0fb93d6d14 Add sales total to daily overview (#3138) 2021-04-07 08:51:29 +02:00
Jeroen Peelaerts
a3a06fdb07 Fix cash totals in payment summary (#3138) 2021-04-07 08:51:29 +02:00
jekkos
6df9ac6a99 Correct mapping for Bosnian (#3105) 2021-03-17 14:34:22 +01:00
Jeroen Peelaerts
e92a929ae3 Add bosnian translations (#3105) 2021-02-22 22:15:16 +01:00
Jeroen Peelaerts
21722f0749 Add Ukrainian translations
Signed-off-by: admin@buchach.org.ua
2021-02-21 22:20:51 +01:00
Jeroen Peelaerts
6705e5f259 Add item_number to item kits module 2021-02-10 10:27:17 +01:00
Jeroen Peelaerts
3acf9056ec Enable PHP rendering in DOMPdf (#3019) 2020-12-29 22:09:27 +01:00
Jeroen Peelaerts
9ee3557672 Use float precision 1e14 as upper limit for decimal parsing (#3004) 2020-12-04 23:48:05 +01:00
Jeroen Peelaerts
f01f882bb8 Use float precision 1e14 as upper limit for decimal parsing (#3004) 2020-11-24 22:24:50 +01:00
Jeroen Peelaerts
8a26195a60 Remove magic quotes check in dompdf helper (#2996) 2020-10-29 23:14:44 +01:00
Ali R. Nik
4aabbaadaf solved syntax error 2020-08-18 22:01:24 +04:30
Ali R. Nik
a009f1719a add farsi language 2020-08-18 16:53:34 +04:30
jekkos-t520
d9ec9ce772 Add danish, hebrew, armenian as languages 2020-07-28 00:29:25 +02:00
objecttothis
66d426a1b6 Merge pull request #2739 from opensourcepos/pos_bool
Implement CHECKBOX attribute type
2020-04-08 15:37:12 +04:00
jekkos-t520
5db1c7a813 Make migration logging more verbose 2020-04-04 17:03:21 +02:00
objecttothis
3281fc9bb0 Correct indentation problems 2020-03-24 14:04:04 +04:00
objecttothis
fb9fec1a10 Merge branch 'master' into pos_bool 2020-03-18 16:19:45 +04:00
objecttothis
c4c475b51f Updated CSV import to handle checkboxes
0, FALSE values create attributes marked as "unchecked"
NULL, "" and spaces do not create an attribute
1, TRUE and ANY other value creates an attribute and marks as checked.

Blank lines in CSV files are skipped with no error.
2020-03-18 15:49:49 +04:00
jekkos-t520
858320fe20 Disable attribute sort (#2722) 2020-03-09 19:54:14 +01:00
jekkos-t520
eae2dd483b Remove hebrew (no more official CI support) 2020-03-06 23:00:46 +01:00
jekkos
615038ef38 Change mktime() with time() (#2666) 2020-01-11 20:08:45 +01:00
jekkos
de6a547272 Use today as default date in DATETIME attribute (#2666) 2020-01-09 20:24:32 +01:00
FrancescoUK
0c3e7be420 Merge pull request #2633 from opensourcepos/decimal_parsing_fix
Expand flexibility of parse_decimal function
2020-01-02 17:03:32 +00:00
jekkos
43420f02f2 Codestyle remarks 2020-01-02 12:40:31 +01:00
jekkos
5a98b9c3fd Fix portugese language (#2632) 2019-12-30 12:46:07 +01:00
SteveIreland
230d822fce Add support to parse_decimal function for tax_decimals and quantity_decimals parsing. 2019-12-22 11:04:01 -05:00
objecttothis
0180de5490 Correctly check for BOM and skip if exists
No characters are skipped if BOM doesn't exist
2019-11-18 14:30:18 +04:00
jekkos
e0cd10c8ec Fix barcode import (#2515) 2019-09-22 19:43:58 +02:00
WebShells
4f089aa68d Re-added EG
Re-added EG, need to be double checked to make sure it fits Egyptian Language. ( most probably 70% no differences in language ).
2019-09-10 20:08:03 +03:00
WebShells
59884e7f81 EG to LB
Although it fits for all arabic language countries, yet it's the most accurate locale to be used.
Most of AR Translation were made for LB language.
2019-09-10 16:51:46 +03:00
jekkos
8bca8fab53 Fix warning in dev mode (#2485) 2019-08-07 00:19:12 +02:00
objecttothis
9297e73b69 Update locale_helper.php
Adding back in deleted method.
2019-07-09 18:03:28 +04:00
FrancescoUK
79e1ccc9a0 Add new languages to config selection list 2019-07-07 11:19:26 +01:00
jekkos
8daab70725 Fix text attribute parsing (#2476) 2019-06-30 22:03:02 +02:00
jekkos
8ca5449b79 Add decimals to items search result + fix reports 2019-06-20 18:39:17 +02:00
FrancescoUK
0491c1888e Fix wrong Sale and Receivings receipt times 2019-06-16 14:12:12 +01:00
FrancescoUK
e173186109 Temporary fix sale form cash_refund crash, other minor code changes 2019-06-16 10:27:27 +01:00
FrancescoUK
4f78b1efab Fix datetime issues (#2319) and refactor code 2019-06-15 21:37:27 +01:00
jekkos
0ae6470b35 Migrate attribute datetime to date (#2441) 2019-06-05 00:47:17 +02:00
jekkos
d3d051ee72 Fix loading attribute values in item search (#2232) 2019-06-05 00:31:45 +02:00