Commit Graph

284 Commits

Author SHA1 Message Date
Ollama
1be8602e3c 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:27:14 +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
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
jekkos
bafe3ddf1b Fix stored XSS vulnerability in Attribute Definitions (GHSA-rvfg-ww4r-rwqf) (#4429)
* Fix stored XSS vulnerability in Attribute Definitions

GHSA-rvfg-ww4r-rwqf: Stored XSS via Attribute Definition Name

Security Impact:
- Authenticated users with attribute management permission can inject XSS payloads
- Payloads execute when viewing/editing attributes in admin panel
- Can steal session cookies, perform CSRF attacks, or compromise admin operations

Root Cause:
1. Input: Attributes.php postSaveDefinition() accepts definition_name without sanitization
2. Output: Views echo definition_name without proper escaping

Fix Applied:
- Input sanitization: Added FILTER_SANITIZE_FULL_SPECIAL_CHARS to definition_name and definition_unit
- Output escaping: Added esc() wrapper when displaying definition_name in views
- Defense-in-depth: htmlspecialchars on attribute values saved to database

Files Changed:
- app/Controllers/Attributes.php - Sanitize inputs on save
- app/Views/attributes/form.php - Escape output on display
- app/Views/attributes/item.php - Escape output on display

* Remove input sanitization, keep output escaping only

Use escaping on output (esc() in views) as the sole XSS prevention
measure instead of sanitizing on input. This preserves the original
data in the database while still protecting against XSS attacks.

* Add validation for definition_fk foreign key in attribute definitions

Validate definition_group input before saving:
- Must be a positive integer (> 0)
- Must exist in attribute_definitions table
- Must be of type GROUP to ensure data integrity

Also add translation for definition_invalid_group error message
in all 45 language files (English placeholder for translations).

* Refactor definition_fk validation into single conditional statement

* Add esc() to attribute value outputs for XSS protection

- Add esc() to TEXT input value in item.php
- Add esc() to definition_unit in form.php

These fields display user-provided content and need output escaping
to prevent stored XSS attacks.

* Refactor definition_group validation into separate method

Extract validation logic for definition_fk into validateDefinitionGroup()
private method to improve code readability and reduce method complexity.

Returns:
- null if input is empty (no group selected)
- false if validation fails (invalid group)
- integer ID if valid

* Add translations for definition_invalid_group in all languages

- Added proper translations for 28 languages (de, es, fr, it, nl, pl, pt-BR, ru, tr, uk, th, zh-Hans, zh-Hant, ro, sv, vi, id, el, he, fa, hu, da, sw-KE, sw-TZ, ar-LB, ar-EG)
- Set empty string for 14 languages to fallback to English (cs, hr-HR, bg, bs, ckb, hy, km, lo, ml, nb, ta, tl, ur, az)

---------

Co-authored-by: Ollama <ollama@steganos.dev>
2026-03-14 15:33:58 +00:00
Ollama
9a2b308647 Sync language files (#3468)
- Add csv_import_invalid_location to Items.php for CSV import validation
- Add error_deleting_admin and error_updating_admin to Employees.php for admin protection messages

Strings added with empty values so they fallback to English and show as untranslated in Weblate.
2026-03-09 07:45:19 +01:00
jekkos
b1819b3b36 dd validation for invalid stock locations in CSV import (#4399)
- Add validateCSVStockLocations() method to check CSV columns against allowed locations
- Log error when invalid stock location columns are detected
- Tests for valid, invalid, and mixed stock location columns
- Tests for location name case sensitivity
- Tests for CSV parsing and detecting location columns
- Add error message language string for invalid locations

Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
2026-03-06 13:17:52 +01:00
jekkos
19eb43270a Fix broken object-level authorization in Employees controller (CVE-worthy) (#4391)
- Non-admin employees can no longer view/modify admin accounts
- Non-admin employees can no longer delete admin accounts
- Non-admin employees can only grant permissions they themselves have
- Added is_admin() and can_modify_employee() methods to Employee model
- Prevents privilege escalation via permission grants

Add tests for BOLA fix and permission delegation

- EmployeeTest: Unit tests for is_admin() and can_modify_employee() methods
- EmployeesControllerTest: Test cases for authorization checks (integration tests require DB)
- ReportsControllerTest: Test validating the constructor redirect fix pattern

Fix return type error in Employees controller

Use $this->response->setJSON() instead of echo json_encode() + return
to properly satisfy the ResponseInterface return type.
2026-03-05 19:46:39 +01:00
Lucas Lyimo
5c8905aa1b Language Array Key Typo Fix (#4371)
* Fix typo in stock location translation

* Fix typo in stock location key

* Fix typo in Language Receivings files stock_location

* Add Swahili-TZ Language Files

* Add Swahili-KE Language Files
2026-03-04 22:06:17 +01:00
BhojKamal
aee5f31cf5 Add show/hide cost price & profit feature - in reports #4130 (#4350)
* Add show/hide cost price & profit feature

* .env should be ignored.

* js code formatted. .vscode folder ignore for vscode user settings.json

* style is replaced with bootstrap class, formatted and .env.example

* toggle button on table to like in other

* comment corrected.

* class re-factored

* minor refactor

* formatted with 4 space

---------

Co-authored-by: Lotussoft Youngtech <lotussoftyoungtech@gmail.com>
2025-12-21 15:23:39 +05:45
j2272850861-pixel
d1e5575ac1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (8 of 8 strings)

Translation: opensourcepos/bootstrap_tables
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/bootstrap_tables/pt_BR/
2025-10-10 12:58:48 +02:00
j2272850861-pixel
b3f67a5e0f Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/pt_BR/
2025-10-10 12:58:48 +02:00
j2272850861-pixel
41b349134a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (12 of 12 strings)

Translation: opensourcepos/login
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/login/pt_BR/
2025-10-10 12:58:48 +02:00
Aril Apria Susanto
880fb8faef Translated using Weblate (Indonesian)
Currently translated at 100.0% (327 of 327 strings)

Translation: opensourcepos/config
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/config/id/
2025-08-11 10:27:22 +02:00
Aril Apria Susanto
4d2347173b Translated using Weblate (Indonesian)
Currently translated at 100.0% (85 of 85 strings)

Translation: opensourcepos/common
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/common/id/
2025-08-11 10:27:22 +02:00
Aril Apria Susanto
82d36d01fb Translated using Weblate (Indonesian)
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/id/
2025-08-11 10:27:22 +02:00
Aril Apria Susanto
13314b7da1 Translated using Weblate (Indonesian)
Currently translated at 100.0% (53 of 53 strings)

Translation: opensourcepos/customers
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/customers/id/
2025-08-11 10:27:22 +02:00
Mohamed-Qadir
7ba60ba58b Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (38 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-05-10 02:04:32 +02:00
Mohamed-Qadir
64f34933c4 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (145 of 145 strings)

Translation: opensourcepos/reports
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/reports/ckb/
2025-05-10 02:04:32 +02:00
Mohamed-Qadir
1c0442c4f6 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (68 of 68 strings)

Translation: opensourcepos/giftcards
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/giftcards/ckb/
2025-05-10 02:04:32 +02:00
Mohamed-Qadir
8bc4ee3792 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (45 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ckb/
2025-05-10 02:04:31 +02:00
Mohamed-Qadir
c200561eb5 Translated using Weblate (Kurdish (Central))
Currently translated at 100.0% (117 of 117 strings)

Translation: opensourcepos/items
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/items/ckb/
2025-05-10 02:04:19 +02:00
Mohamed-Qadir
a55d5b415e Translated using Weblate (Kurdish (Central))
Currently translated at 73.3% (33 of 45 strings)

Translation: opensourcepos/module
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/module/ckb/
2025-05-09 19:33:42 +02:00
Mohamed-Qadir
f31d004fb7 Translated using Weblate (Kurdish (Central))
Currently translated at 55.2% (21 of 38 strings)

Translation: opensourcepos/item_kits
Translate-URL: https://translate.opensourcepos.org/projects/opensourcepos/item_kits/ckb/
2025-05-09 19:33:41 +02:00