Commit Graph

6668 Commits

Author SHA1 Message Date
objecttothis
660971b24c Merge branch 'master' into feature-case-sensitive-attribute-updates 2026-04-02 15:17:02 +04:00
objecttothis
fa95b9fc1f Update app/Database/Seeds/TestDatabaseBootstrapSeeder.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-04-02 15:14:11 +04:00
objec
f915a6de1f - Remove unneeded comment
- Rollback transaction on failure before returning false
- Rollback transaction and return 0 on failure to save attribute link.
- Account for '0' being an acceptable TEXT or DECIMAL attributeValue.
- Add transaction to storeCSVAttributeValue function to prevent deleting the attribute links before confirming the new value successfully saved.
- Exclude the itemId in the check to see if the barcode number exists
- Add error checking to failed row insert
- Fail the import if an invalid stock location is found in the CSV
- Reworked &= to && logic so that it short-circuits the function call after if success is already false.
- Added logic to not ignore failed saveItemAttributes calls

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-02 15:08:19 +04:00
objec
8e25e59b88 Correct test problems
- Correct mocking of dropdowns
- Correct expected value in test.
- Correct return value of function
- Remove whitespace

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-02 13:52:36 +04:00
objec
4ff7899bed Replaced precision test with one reflecting testing of actual value.
- This test does not test cash rounding rules. That should go into a different test.

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-02 11:12:44 +04:00
Ollama
71eb8de7fe feat: Improve migration UX on login page
- Show 'Database Migration Required' heading instead of welcome message when migrations pending
- Add warning alert explaining credentials needed to authorize migration
- Change button text from 'Go' to 'Migrate' during migration flow
- Add language strings for clear migration messaging

This makes it clear to the user that they are performing a migration
authorization step (not a regular login), and will need to re-authenticate
after migrations complete.
2026-04-02 06:50:38 +00:00
Ollama
9d5019e12e fix: Use file-based session until database is migrated
- Prevents circular dependency where login requires session, but session requires database table created by migrations
- Fresh installs: use file session until migrations run, then switch to database session
- Upgrades: use file session during migration, then switch to database session
- Simplified: removed DDL from Load_config, migrations remain source of truth

Fixes: Sessions table missing on fresh install prevents login

Addresses CodeRabbit feedback:
- Remove duplicate session table DDL (migrations are source of truth)
- Remove MySQL-specific information_schema query
- Use proper session config cloning to avoid modifying shared config
2026-04-02 06:50:38 +00:00
objec
426322da77 Corrected bug in stock_location->save_value()
- Like other save_value() functions, the location_data variable is passed by reference.
- Unlike other save_value() functions, the location_data variable is not being updated with the primary key id.
- Corrected the logic in itemUpdate test

Signed-off-by: objec <objecttothis@gmail.com>
2026-04-02 10:44:49 +04:00
Ollama
56670271d6 fix: remove duplicate phpunit.xml that prevented tests from running
The tests/phpunit.xml was incomplete - it only configured helpers and
Libraries testsuites, while phpunit.xml.dist at root contains all tests.
PHPUnit was likely using the incomplete config, resulting in empty test
results.
2026-04-01 16:46:03 +00:00
Ollama
cef103445e refactor: optimize Docker image size
- Combine RUN commands to reduce layers
- Add --no-install-recommends and clean apt cache
- Use COPY --chown to set ownership during copy
- Update .dockerignore to exclude dev files and build configs

Saves ~260MB (21%) in image size
2026-04-01 16:46:03 +00:00
Ollama
68e9a56632 refactor: remove build-database gulp task (#4447)
The build-database task previously concatenated tables.sql and constraints.sql
into database.sql. Since we now use initial_schema.sql directly in migrations,
this task is no longer needed.

- Remove gulp task 'build-database'
- Keep all other build tasks intact
2026-04-01 16:46:03 +00:00
Ollama
ba05536317 refactor: remove tables.sql and constraints.sql (#4447)
These files have been replaced by initial_schema.sql which is now the
authoritative source for the database schema. The initial migration
loads this schema on fresh installs.

- Remove app/Database/tables.sql
- Remove app/Database/constraints.sql
- Schema is frozen in app/Database/Migrations/sqlscripts/initial_schema.sql
2026-04-01 16:46:03 +00:00
Ollama
f74f286a51 feat: migrate CI from Travis to GitHub Actions with enhancements
- Convert Travis CI configuration to GitHub Actions workflows
- Add multi-arch Docker builds (amd64/arm64)
- Implement initial schema migration for fresh database installs
- Add multi-attribute search with AND logic and sort by attribute columns
- Address various PR review feedback and formatting fixes
2026-04-01 16:46:03 +00:00
Ollama
7180ec33e8 Add Calendar.php translations for missing languages
- es-MX: Spanish (Mexico) calendar translations
- nb: Norwegian Bokmål calendar translations
- he: Hebrew calendar translations
- ml: Malayalam calendar translations
- tl: Tagalog calendar translations
- ar-EG: Arabic (Egypt) calendar translations
- ka, lo, ur: Empty placeholders (cannot translate these languages)
2026-04-01 13:01:54 +00:00
Ollama
496c8a8262 Remove English fallbacks from non-English translations
Use empty strings for sale_not_found in Khmer, Malayalam, and Urdu
as these languages cannot be translated by this model.
2026-04-01 13:01:54 +00:00
Ollama
493d9cc9c1 Fix translation issues from code review
- Use 'Bénéfice' in French Reports.php for consistency with 'profit' key
- Fix Italian grammar: 'Il numero di telefono è richiesto'
- Use 'Responsabile' for 'manager' in Italian Common.php
- Add 'sale_not_found' translation key to missing languages (km, ml, ta, ur)
- Tamil (ta) gets proper translation, others get English fallback
2026-04-01 13:01:54 +00:00
Ollama
f761e1464f Translate missing strings in multiple languages
- Add Calendar.php translation file for es-ES, nl-NL, de-DE
- Fill empty string translations in Common.php for de-DE, nl-NL, fr, it, pt-BR
- Translate UBL invoice strings (ubl_invoice, download_ubl, ubl_generation_failed) in Sales.php
- Add toggle_cost_and_profit in Reports.php for all languages
- Translate error_deleting_admin and error_updating_admin in Employees.php
- Translate csv_import_invalid_location error message in Items.php
- Update various missing translations for administrator, clerk, manager, dashboard, etc.

Languages updated: Spanish (es-ES), Dutch (nl-NL), German (de-DE), French (fr), Italian (it), Portuguese (pt-BR)
2026-04-01 13:01:54 +00:00
Ollama
a5bbb2bcc5 fix: Remove redundant clear_mode() calls
clear_all() already calls clear_mode() internally, so the separate
clear_mode() calls were redundant.
2026-04-01 07:24:23 +00:00
Ollama
92ec321d08 fix: Clear sale session after completing sale
The clear_all() calls in postComplete() were placed after return
statements, making them unreachable dead code. This caused the
completed sale to remain in the session and appear in the Register
when navigating back.

The fix moves clear_all() and clear_mode() calls before the return
statements so they are actually executed, properly clearing the sale
cart, customer, and payments from the session after sale completion.

This fixes the regression reported by @odiea where users had to
manually cancel sales after each transaction.
2026-04-01 07:24:23 +00:00
objec
02dcf29627 Resolved incorrect array key
Signed-off-by: objec <objecttothis@gmail.com>
2026-03-31 23:27:57 +04:00
objec
65d5f3b1f0 Fix Unit Tests
- Corrected several tests that were failing

Signed-off-by: objec <objecttothis@gmail.com>
2026-03-31 23:18:18 +04:00
objec
34811c1eaf Fix Unit Tests
- Refactored for PSR naming
- Corrected errors in unit tests preventing them from passing. save_value() returns a bool, not the itemId

Signed-off-by: objec <objecttothis@gmail.com>
2026-03-31 21:45:05 +04:00
objec
d8a46bca03 Minor fixes
- Corrected CodeIgniter Framework version to specific version
- Added checks in Database seeder

Signed-off-by: objec <objecttothis@gmail.com>
2026-03-30 17:06:55 +04:00
objec
28884a035c Merge remote-tracking branch 'origin/master' into feature-case-sensitive-attribute-updates 2026-03-30 16:56:06 +04:00
dependabot[bot]
e046e74c79 Bump picomatch from 2.3.1 to 2.3.2 (#4451)
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2026-03-30 12:38:07 +04:00
khao_lek
e0cd0f6129 Translated using Weblate (Thai)
Currently translated at 100.0% (146 of 146 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/th/
2026-03-29 11:10:04 +02:00
khao_lek
3b102adf3f Translated using Weblate (Thai)
Currently translated at 100.0% (47 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/th/
2026-03-29 11:10:03 +02:00
khao_lek
260358d611 Translated using Weblate (Thai)
Currently translated at 100.0% (146 of 146 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/th/
2026-03-28 06:04:39 +01:00
khao_lek
e615200466 Translated using Weblate (Thai)
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/th/
2026-03-28 06:04:39 +01:00
khao_lek
56cead478a Translated using Weblate (Thai)
Currently translated at 100.0% (118 of 118 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/th/
2026-03-28 06:04:39 +01:00
khao_lek
7030f6bac3 Translated using Weblate (Thai)
Currently translated at 100.0% (43 of 43 strings)

Translation: opensourcepos/employees
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/employees/th/
2026-03-28 06:04:38 +01:00
yakub3k
299f62669a Translated using Weblate (Polish)
Currently translated at 13.6% (20 of 146 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/pl/
2026-03-27 14:29:27 +01:00
yakub3k
072865620a Translated using Weblate (Polish)
Currently translated at 100.0% (19 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/pl/
2026-03-27 14:29:27 +01:00
yakub3k
3bbd4c4c95 Translated using Weblate (Polish)
Currently translated at 29.4% (20 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/pl/
2026-03-27 14:29:27 +01:00
yakub3k
0253bf85b8 Translated using Weblate (Polish)
Currently translated at 13.5% (16 of 118 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/pl/
2026-03-27 14:29:26 +01:00
yakub3k
92c1be8bb1 Translated using Weblate (Polish)
Currently translated at 26.0% (12 of 46 strings)

Translation: opensourcepos/cashups
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/cashups/pl/
2026-03-27 14:29:26 +01:00
yakub3k
23829eab35 Translated using Weblate (Polish)
Currently translated at 12.7% (6 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/pl/
2026-03-27 14:29:25 +01:00
yakub3k
c81c6506cb Translated using Weblate (Polish)
Currently translated at 17.1% (38 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/pl/
2026-03-27 14:29:25 +01:00
yakub3k
840d9ccc81 Translated using Weblate (Polish)
Currently translated at 9.5% (2 of 21 strings)

Translation: opensourcepos/suppliers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/suppliers/pl/
2026-03-27 14:29:25 +01:00
yakub3k
e763ee2acc Translated using Weblate (Polish)
Currently translated at 14.6% (48 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/pl/
2026-03-27 14:29:25 +01:00
yakub3k
8ef109efbc Translated using Weblate (Polish)
Currently translated at 12.3% (18 of 146 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/pl/
2026-03-27 13:05:14 +01:00
yakub3k
9a544096c2 Translated using Weblate (Polish)
Currently translated at 94.7% (18 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/pl/
2026-03-27 13:05:08 +01:00
yakub3k
3e4ac0b24d Translated using Weblate (Polish)
Currently translated at 4.4% (3 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/pl/
2026-03-27 13:05:01 +01:00
yakub3k
3c9c592ca3 Translated using Weblate (Polish)
Currently translated at 13.1% (5 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/pl/
2026-03-27 13:04:56 +01:00
yakub3k
a4d8bedbf3 Translated using Weblate (Polish)
Currently translated at 7.6% (9 of 118 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/pl/
2026-03-27 13:04:53 +01:00
yakub3k
c4304fd0a9 Translated using Weblate (Polish)
Currently translated at 16.2% (36 of 222 strings)

Translation: opensourcepos/sales
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/sales/pl/
2026-03-27 13:04:48 +01:00
yakub3k
44fe2c087a Translated using Weblate (Polish)
Currently translated at 7.5% (4 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/pl/
2026-03-27 13:04:42 +01:00
yakub3k
985c1c55ce Translated using Weblate (Polish)
Currently translated at 21.0% (4 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/pl/
2026-03-27 12:48:01 +01:00
yakub3k
8029e5538f Translated using Weblate (Polish)
Currently translated at 15.7% (3 of 19 strings)

Translation: opensourcepos/expenses_categories
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses_categories/pl/
2026-03-27 12:46:33 +01:00
yakub3k
1a7683a8ac Translated using Weblate (Polish)
Currently translated at 10.6% (5 of 47 strings)

Translation: opensourcepos/expenses
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/expenses/pl/
2026-03-27 12:46:33 +01:00