Commit Graph

112 Commits

Author SHA1 Message Date
jekkos
d0992a92e7 Revert "HTMLPurifier filtering on searches"
This reverts commit b3b8e7ec1d.
2024-08-03 23:16:31 +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
objecttothis
21c84efd2d Formatting
- Added missing ; to "nbsp"
- Remove filtering from checkbox items in controller
- Added null check to checkboxes in controller
- Fixed function naming to avoid 404
- Removed escaping from fixed urls
- Removed esc() wrapping around site_url() which already returns escaped urls.
2024-06-15 17:19:15 +02:00
objecttothis
e71c035671 Formatting
- Made view CI form helper function call format uniform.
- replaced calls to array() with []
- Placed { on its own line
- Removed empty lines where there shouldn't be any.
- Replaced text/javascript with application/javascript as the former is deprecated
2024-06-15 17:19:15 +02:00
odiea
27a4ccdff6 Update Persons.php (#3962)
Back to the original
2024-06-15 17:19:15 +02:00
odiea
ab88f1eec1 Update Persons.php (#3961)
added use Tamtamchik\NameCase\Formatter;
2024-06-15 17:19:15 +02:00
odiea
0f33c399a9 Changed < 0 to == NEW_ENTRY (#3960)
* Update Cashup.php

If(!count_only) was causing the table view to not show properly.

* Update Cashups.php

empty it must not be.

* Update Cashups.php

* Update Expenses.php

* Update Persons.php
2024-06-15 17:19:15 +02:00
odiea
9f78a8a075 Changes to Cash_up and Cash_ups for better date feature and Table view to show data (#3958)
* Update Cashup.php

If(!count_only) was causing the table view to not show properly.

* Update Cashups.php

empty it must not be.
2024-06-15 17:19:15 +02:00
objecttothis
a6b674e995 Barcode & escaping
- Removed overflow-visible as it is not needed.
- Bumped TamTamChik/nameCase to latest.
- Workaround to prevent nameCase from capitalizing the first letter of html entities
- Autoload security_helper.php
- Develop means of escaping outputs without encoding characters we don't want encoded.
- proof of concept in form_basic_info.php
2024-06-15 17:19:15 +02:00
odiea
a2df771f19 Update Customers.php
To keep coding the same
2024-06-15 17:19:15 +02:00
odiea
9926577b2f Update Suppliers.php
this allows correct sorting
2024-06-15 17:19:15 +02:00
objecttothis
e327bb3780 Suppliers Fixes
- Added html_entity_decode() to outputs which had been html encoded
- Added escaping of direct data from the database.
2024-06-15 17:19:15 +02:00
odiea
3555de87f6 Item Kits updates for form and Barcodes to show (#3949)
* Update Item_kits.php

* Update Item_kits.php Barcode Issue

public function Generate Barcodes
changed Code to just c and it started working
2024-06-15 17:19:15 +02:00
objecttothis
7356500d86 - Fixed missing call to helper and helper function
- Format percentage per locale rules
- Moved constants to Constants.php
- Added PHPdoc comments
- Refactor code for clarity and simplicity.
- Added decimal formatting per locale for display.
- autoload locale helper
- Remove unneeded calls to helpers
- Removed unneeded comments
- fixed errors causing checks in parse_decimals to return false due to locales which use a comma.
2024-06-15 17:19:15 +02:00
objecttothis
a5b5fccd5e Barcode Changes
- Strip out old code
- Added missing variable declaration
2024-06-15 17:19:15 +02:00
objecttothis
24fd80e4fd Barcode Changes
- Removed mixed type-hint
- Replacing emberlabs code with picquer/php-barcode-generator
2024-06-15 17:19:15 +02:00
objecttothis
bf167a06b6 Removed log_message() call for debugging 2024-06-15 17:19:15 +02:00
objecttothis
5b725d04d5 Company logo upload
- Added conversion to migration file for delimiter in image_allowed_types
- Corrected business logic for image upload in items form.
- Removed log message used for debugging.
- Replaced '|' with ',' in image_allowed_types save/populate.
2024-06-15 17:19:15 +02:00
objecttothis
5c0325511c Company logo upload
- Corrected errors uploading file
- Renamed remove_logo for proper routing
- Corrected name
- Assigned file extension based on guessFileExtension() for security
- Don't call file upload if no file was specified
- added missing jpeg mime type
- fixed company logo change
2024-06-15 17:19:15 +02:00