Commit Graph

46 Commits

Author SHA1 Message Date
jekkos
29c3c55fcc Fix item number lookup in sales/receivings (#4212) (#4250)
* Fix item number lookup in sales/receivings (#4212)

* Remove item_number check in exists()
2025-05-30 22:29:35 +02:00
BudsieBuds
e83c23cf0c Improve code style and PSR-12 compliance (#4204)
* Improve code style and PSR-12 compliance
- refactored code formatting to adhere to PSR-12 guidelines
- standardized coding conventions across the codebase
- added missing framework files and reverted markup changes
- reformatted arrays for enhanced readability
- updated language files for consistent styling and clarity
- minor miscellaneous improvements
2025-05-02 19:37:06 +02:00
BudsieBuds
82f0e75bf0 Fix PHP 8.4 errors (#4200) 2025-04-15 20:38:52 +02:00
objecttothis
e90b5b87da Replace tabs with spaces (#4196)
Signed-off-by: objecttothis <objecttothis@gmail.com>
2025-03-28 21:24:21 +04:00
El_Coloso
7ad1bfa0fb Fix requisitions (#4147)
* Fix data types on null values
* Fix receiving receipt image tag
* Fix error on Receiving Model
2025-01-28 23:32:05 +01:00
El_Coloso
a5b2b5f771 Fixes for receipt + invoice (#2682)
* Email invoice bar code
* Send invoice by email
* Remove default comment on invoice if comment was set
2025-01-24 00:17:25 +01:00
jekkos
248299521b Revert IntlFormatter refactor (#4126) 2024-12-03 00:15:06 +01:00
jekkos
4b8d009c76 Add english fallback if no translation (#3995) 2024-09-17 17:47:30 +02:00
Steve Ireland
82aac4ec79 Resolving issue #3997 for discount type toggle not staying put. 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
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
WShells
95a1d0b4f1 Fix for Receivings Receipt display
Receivings receipt returning the following errors:
. Param count in the URI are greater than the controller method
. ($supplier_id) must be of type int
2024-06-15 17:19:15 +02:00
WShells
f75c7fad15 Fix for Sale Suspend/Unsuspend 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
b593de9f83 Receivings Bugfixes
- Fixed incorrect variable name
- Return empty string on null
- Added return types for mixed return functions

Signed-off-by: objecttothis <objecttothis@gmail.com>
2024-06-15 17:19:15 +02:00
objecttothis
34246ee885 Prepped barcode for being able to be set by width. 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
objecttothis
b42d43d71d Change generated Barcodes to SVG 2024-06-15 17:19:15 +02:00
objecttothis
7cb9ffd7aa Formattings
- Format of ternary changed for readability
- Corrected CSS to use : instead of =
- Removed Label for item name to allow more text
2024-06-15 17:19:15 +02:00
objecttothis
453ee6c061 Formattings
- Format of ternary changed for readability
- Corrected CSS to use : instead of =
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
20828ea421 Barcode Changes
- Barcode content is item_id if barcode_number is empty.
- Styling fixes
- Bump picquer/php-barcode-generator version to 2.4.0
- Ported over Receipt Barcode Generation
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
183f2472eb Fixed issues related to barcode generation 2024-06-15 17:19:15 +02:00
objecttothis
cc58cecff0 Compatibility changes
- Removed `mixed` function return type from some functions for backward compatibility with php 7.4
- Refactored string concatination for readability.
- Added TODO for later
- Corrected PHPdocs
- Removed unneeded TODO
- Refactored function names with mixed snake and pascal case names
2024-06-15 17:19:15 +02:00
objecttothis
ba9bcd7786 PHPdocs
- Added missing PHPdocs
- Corrected Syntax
- Added noinspection parameters to PHPdoc for AJAX called functions
- Added missing function return types
- Added missing parameter types
- Added public keyword to functions without visibility modifier
- Corrected incorrectly formatted PHPdocs
- Added public to constants and functions missing a visibility keyword
2024-06-15 17:19:15 +02:00
objecttothis
7b224be665 PSR compliance and formatting changes
- Replaced TRUE/FALSE constants with true/false keywords
- Replaced NULL constant with null keyword
- Replaced `<?php echo` in views with shortened `<?=`
- Added missing variable declaration
- Added missing function return type in declaration
- replaced `== true`, `== false`, `=== true` and `=== false` in if statements with simplified forms
2024-06-15 17:19:15 +02:00
objecttothis
48c04417b8 Fixes
- PHP 8.2 deprecates dynamically declared class properties. Adding these declarations removes deprecation warnings and makes the code PHP 8.3 compatible.
- Add Elvis operator to set search string to an empty string when it's value is null to get rid of an error in the search function call.
- Imported class for OSPOS config
- Replaced private with protected in parent controller's property.
- Removed unneeded TODO
- Refactored local variables
- Replaced ternary notation
- Removed unneeded comments
- Removed unneeded class property
- Removed unneeded @property declarations
- Fixed database version
2024-06-15 17:19:15 +02:00
objecttothis
70ee1ed36e Declared class properties
PHP 8.2 deprecates dynamically declared class properties. Adding these declarations removes deprecation warnings and makes the code PHP 8.3 compatible.
2024-06-15 17:19:15 +02:00
objecttothis
405583c832 Attributes fixes and warning removal
- when the payments array was folded into sale_data there was an earlier payments[] reference in the foreach loop that didn't get folded in.
- Update PHPdoc
- Added ::class to remove polymorphic call warning
- Removed unreachable 'break;' statement after return statement.
- Added missing return type
- fixed missing assignment of mailchimp_api_key
2024-06-15 17:19:15 +02:00
Doug Hutcheson
044170b2b1 CI4: Bugfix test sanity of config item
Add a !empty test when dereferencing mailchimp_api_key and mailchimp_list_id from the config array.
2024-06-15 17:19:15 +02:00
Doug Hutcheson
9b86ddaac0 CI4: string interpolation changes (#3811)
* Initial setup in a new environment

The result of running the npm build and editing the .env file

* Revert "Initial setup in a new environment"

This reverts commit 23e06dea7f.

* Language interpolation update

I have edited all the interpolations in the en-US tree. To be consistent in using named parameters and not just positional numbers, I also edited the relevant lines in two controllers (Sales.php and Items.php) to send named variables to the lang() calls. The language string 'Sales.invoice_number_duplicate' contains an interploation for 'invoice_number'. This is sent when used by Controllers/Sales.php, but not sent when used by Views/sales/form.php, which means that string will contain a double space where the invoice number should be. The language string 'Customers.csv_import_partially_failed' contains no interpolations but two parameters are not being sent where it is used by Controllers/Customers.php. The string appears to be a near duplicate of 'Items.csv_import_partially_failed' which contains two interpolations. Either the Customers controller needs to be edited, or the Customers language string needs to be revised to look like the Items string.

---------

Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2024-06-15 17:19:15 +02:00
Steve Ireland
477ceb2317 In Token_lib change App\Models\tokens\Token to App\Models\Tokens\Toke 2024-06-15 17:19:15 +02:00
Steve Ireland
f5094d62a2 Restore the tables.sql to its virgin state. 2024-06-15 17:19:15 +02:00
Steve Ireland
4798041408 Tack on the void return type onto the Employee:logout method. 2024-06-15 17:19:15 +02:00
objecttothis
1d87de6f7d Sales MVC
- Added todo to Stock_location.php
- make library function return nullable
- Added missing model instantiation
- Commented out Sale model instantiation in library because it's causing infinite loop
- Changed function name prepending get and post required by CI4 autorouting
2024-06-15 17:19:15 +02:00
Steve Ireland
13a14ec310 Remove grunt045 from zipped opensourcepos file. Also fix the call to array_walker since the parameters (even if not used) are validated in PHP 8. 2024-06-15 17:19:15 +02:00
objecttothis
8d80f5a261 CI4 bugfixes
- Added session variable instantiation where needed.
- Added tabular helper to autoload
- removed tabular helper reference where no longer needed.
- Remove esc() references where it was causing display problems.
- Remove excess whitespace on blank line
- Remove unecessary using reference
- Make parameters for dinner table functions nullable
2024-06-15 17:19:15 +02:00
objecttothis
ae357cab4a Formatting
- Convert indents to tabs
- Remove unnecessary else statement
- Correct PHPDoc formatting
2024-06-15 17:19:15 +02:00
objecttothis
1dd58e922f Corrected link in README.md 2024-06-15 17:19:15 +02:00
jekkos
1745e973a1 Apply changes from master 2024-06-15 17:19:15 +02:00
jekkos
2d45ca626b Apply changes from master 2024-06-15 17:19:15 +02:00
objecttothis
f84b795ee6 Upgrade to CodeIgniter 4.1.3 2024-06-15 17:19:15 +02:00
jekkos
73b189b6d4 Prepare rebase: move files to new folder structure 2024-06-15 17:19:15 +02:00
jekkos
dcb797571e evert "Prepare rebase: move files to new folder structure"
This reverts commit eed0cd1ca0.
2023-05-30 17:52:17 +02:00
jekkos
eed0cd1ca0 Prepare rebase: move files to new folder structure 2023-05-07 15:10:27 +02:00