Commit Graph

129 Commits

Author SHA1 Message Date
jekkos
6a0f33e5db Fix print after sale (#3985) 2024-10-19 00:35:26 +02:00
jekkos
4369a94363 Fix sale edit form 2024-10-13 23:16:55 +02:00
jekkos
f3277b0d38 Try to fix checkNumeric (#4082) 2024-10-05 02:35:17 +02:00
jekkos
b8a74ba30a Fix employee, supplier, customer (#4086) 2024-10-05 02:27:25 +02:00
jekkos
0f4d06af61 Blind SQL injection fix (#3284) 2024-10-03 00:00:55 +02:00
jekkos
72f147074d Enable html escape + fix XSS (#3965) 2024-10-02 21:29:09 +02:00
objecttothis
951279aabe Pre-view filtering Items Controller
- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

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

- Bump bootstrap-table to 1.23.1 in attempt to resolve issue with sticky headers
- Sanitize attribute data in tables
- Sanitize item data with controller function.

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

Sanitize Item data

- Sanitize category and item_number before display in forms.
- refactor check in pic_filename for empty to be best practices compliant.
- Added TODO

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

Minor changes

- Refactored for code clarity.
- Removed extra blank lines.
- Minor reformatting.
- Added PHPdocs
- bumped bootstrap-table to 1.23.2

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

Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

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

- Bump bootstrap-table to 1.23.1 in attempt to resolve issue with sticky headers
- Sanitize attribute data in tables
- Sanitize item data with controller function.

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

Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

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

Sanitize Item data

- Sanitize category and item_number before display in forms.
- refactor check in pic_filename for empty to be best practices compliant.
- Added TODO

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

Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

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

Removed unnecessary use statement

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-10-02 21:29:09 +02:00
jekkos
a197226c28 Fix employee search suggestion 2024-09-23 23:31:35 +02:00
jekkos
c606bde733 More giftcard fixes (#2935) 2024-09-23 00:54:46 +02:00
jekkos
1406c232a5 Fix attribute save (#4016) 2024-09-20 00:46:50 +02:00
jekkos
3e32a5e121 Giftcard number validation (#2935) 2024-09-20 00:00:35 +02:00
jekkos
7d04371425 Fix checkNumeric validation (#3872) 2024-09-17 02:02:05 +02:00
jekkos
d69e7be848 Fix bugs in expenses form (#3840) 2024-09-17 01:50:35 +02:00
jekkos
f279877cd6 Fix customer suggestion (#4031) 2024-09-17 00:32:10 +02:00
objecttothis
6eb22276f3 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>
2024-09-16 14:18:17 +02:00
jekkos
c1dcf4e3c6 Fix for giftcard suggestions (#4030)
Switch back to master in docker-compose.yml
2024-08-28 00:04:56 +02:00
jekkos
f49d763254 XSS mitigation features (#4041)
* Remove HtmlPurifier calls

- All calls to Services::htmlPurifier()->purify() removed from data received from view.
- Bootstrap and bootswatch bump in package-lock.json

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

* Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

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

* Pre-view filtering Customers Controller

- Refactored code for clarity
- Replaced == with === operator to prevent type juggling
- Added Sanitization of Customer data before being sent to the view

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

* Bump bootstrap-table to 1.23.1

- Bump bootstrap-table to 1.23.1 in attempt to resolve issue with sticky headers
- Sanitize attribute data in tables
- Sanitize item data with controller function.

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

* Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

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

* Sanitize Item data

- Sanitize category and item_number before display in forms.
- refactor check in pic_filename for empty to be best practices compliant.
- Added TODO

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

* Minor changes

- Refactored for code clarity.
- Removed extra blank lines.
- Minor reformatting.
- Added PHPdocs
- bumped bootstrap-table to 1.23.2

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

* Pre-view filtering Items Controller

- Refactored code for clarity
- Created and called sanitization functions.
- Sanitize TEXT type Attributes before being sent to the view.

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

* Sanitize Item data

- Sanitize category and item_number before display in forms.
- refactor check in pic_filename for empty to be best practices compliant.
- Added TODO

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

---------

Signed-off-by: objecttothis <objecttothis@gmail.com>
Co-authored-by: objecttothis <objecttothis@gmail.com>
2024-08-26 11:35:56 +04:00
jekkos
0be9488cfb Fix customer sale suggestion (#4031) 2024-08-04 00:13:07 +02:00
Steve Ireland
05538570ec Supplementing issue #3997, this change allows the discount amount to be deleted by the user (instead of needing to enter a zero). 2024-07-26 21:36:19 +02:00
Steve Ireland
d2622e94d7 An attempt to resolve issue #4025. Since a kit item code is prefixed by "KIT" it's not going to work to always assume that the item id is numeric. So "int" needs to be replaced with "string". 2024-07-22 08:38:18 +02:00
Steve Ireland
034f79e157 Start Daily Sales with selected customer (#4019) 2024-07-08 20:48:31 -04:00
objecttothis
52723ceeec Updated PHPDocs
- Added @noinspection PhpUnused to AJAX-called functions to remove weak warning that the function is unused. This will be needed for the linter.
- Referenced where the function is called in the PHPdocs.
- Removed redundant transaction. batch_save() is already being run in a transaction.
- Fixed function name in controller and view.
- Removed form helper load because it's autoloaded.
- Corrected variable reference in Secure_Controller.php

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
b3b8e7ec1d HTMLPurifier filtering on searches
- Formatting
- Added calls to HTMLPurifier
- Added filtering
- Refactored out variable for clarity

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
14248edc06 HTMLPurifier filtering
- Replaced == with === to avoid type juggling
- Removed unneeded TODO
- Added HTMLPurifier to composer.json
- Added Service to allow singleton instance of purifier.
- Implemented use in Customer Controller Search function.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
SpookedByRoaches
11d5abe6d7 Fixed csv import when updating items that have a barcode 2024-06-15 17:19:15 +02:00
jekkos
07e09e1948 Fix register functionality
Fix controller method names
2024-06-15 17:19:15 +02:00
BudsieBuds
9fe578504c Update login screen
- Updated deprecated BS5 classes
- Throw errors in separate alert boxes and not as an <ul>
- Make error translatable
- Small updates/fixes
2024-06-15 17:19:15 +02:00
objecttothis
1328b4d9b8 - Removed TODOs that had been completed
- Added TODO where we need to convert to querybuilder
- Converted to switch statement.
- Removed unnecessary local variable
- Replaced Qualifiers with imports
- Replaced isset() call with null coalescing operator
- Replaced strpos function calls in if statements with str_contains calls
- Removed unnecessary leading \ in use statement
- Replaced deprecated functions
- Updated PHPdocs to match function signature
- Added missing type declarations
- Made class variables private.
- Explicitly declared dynamic properties
- use https:// links instead of http://
- Fixed type error from sending null when editing transactions
- Fixed Search Suggestion function name in Employees, Persons, Suppliers controller
- Fixed function name on Receivings Controller

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
jekkos
3963b2c924 Fix redirect + no permission error message 2024-06-15 17:19:15 +02:00
jekkos
8d59cd9d83 Fix no_access route (#3984) 2024-06-15 17:19:15 +02:00
jekkos
bd1af2b854 Fix delete payment (#3983) 2024-06-15 17:19:15 +02:00
WShells
70f464c094 Gift Card edit
Refining code to ensure consistency among other sections.
Replacing FILTER_SANITIZE_NUMBER_FLOAT as it's removing all other chars
2024-06-15 17:19:15 +02:00
objecttothis
34503b73b8 Fixing Reports
- Corrected sale_time data

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
35e3adeca8 Fixing Reports
- Added checks for array keys not set
- Renamed functions so that reports would generate
- Minor reformatting
- Added sale_id to the groupBy() call to remove error when only full group by is enabled.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
658a9ce553 Fixing routes
- Refactored function name to match the route.
- Added null check on sale date.
- enabled escaping in bootstrap-tables
- removed the esc() function from the

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
WShells
9516073084 Fix for line break in invoice 2024-06-15 17:19:15 +02:00
WShells
3d88d1a387 Fix For Gift Card: Always displaying invalid when generated randomly
Upon creating a new gift card and using it to complete the sales alphabetical identifiers are being removed due to FILTER_SANITIZE_NUMBER_FLOAT thus detecting gift card as invalid.
This is a fix unless we should rewrite it in a different way.
2024-06-15 17:19:15 +02:00
WShells
e07cfd4143 Fix for Shortcuts
Keyboard Shortcuts Help modl returning 404 / not displaying
2024-06-15 17:19:15 +02:00
WShells
9fc2a4edbd Refactoring Change Register Mode
Switched from conditional if stmt to case
2024-06-15 17:19:15 +02:00
WShells
b2f5a94859 Fix for Quantity Update in Register
($decimal) must be of type string, null given
2024-06-15 17:19:15 +02:00
WShells
5e55296ea7 Fix for Item Update in Items
Qty Per Pack: ($decimal) must be of type string, null given
2024-06-15 17:19:15 +02:00
WShells
9508770f47 Fix for Serialnumber & Discount Type
($discount_type) must be of type int
($serialnumber) must be of type string
2024-06-15 17:19:15 +02:00
objecttothis
5500d3989f Filtering
- Added filtering to decimals which may have different comma separator
- Added formatting of decimals before concatenating into string
- Cast int to string in form_hidden() call

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
73cec25468 Clean up code
- Removed unneeded use statements

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
8197e1918a - Refactor file name to match class name.
- Updated autoload in composer.json to reflect actual structure.
- Removed unneeded use statements

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
e8c6d7e01d - Updated .gitattributes to automatically convert line endings on commit to LF.
- Changed Line endings.
- Prepared Decimals before filtering them for number_float.
- Refactored variable names
- Reworked code for clarity
- Added empty check to POST var.
- Removed unneeded code.
- Removed old TODO.
- changed POST variable check to !empty

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
730d01fb74 CI 4.5.1 fixes
Changed .editorconfig
- Force lf line endings for compatibility with all systems.

Fixed Login
- Removed strtolower() call because getMethod() now returns all uppercase

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
4c689ec6fd Bump CodeIgniter to 4.5.1
- CodeIgniter 4.5.1
- PSR/Log 3.0.0
- PHP >= 8.1
- Replaced mandatory files.
- Modified breaking change code.
- Modified updated code.
- Added missing files.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
68d3482065 Attribute item form and decimal fixes
- Updated formatting to reflect standard
- Wrapped Decimal type in to_decimals() function for localization
- Fixed function name
- Removed unneeded TODO
- Fixed problems with sales register not receiving decimals with comma for separator properly.

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
34476ce374 Bump CI4 to 4.4.8
- Merged changed files since 4.4.8
- Fixed Breaking changes

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00