mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-26 14:47:06 -04:00
plugin-system-fresh
2 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
1a03706c05 |
Merge remote-tracking branch 'OpensourcePOS/master' into plugin-system-fresh
Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> # Conflicts: # app/Controllers/Sales.php # app/Language/ar-EG/Config.php # app/Language/ar-EG/Sales.php # app/Language/ar-LB/Config.php # app/Language/ar-LB/Sales.php # app/Language/az/Config.php # app/Language/az/Sales.php # app/Language/bg/Config.php # app/Language/bg/Sales.php # app/Language/bs/Config.php # app/Language/bs/Sales.php # app/Language/ckb/Config.php # app/Language/ckb/Sales.php # app/Language/cs/Config.php # app/Language/cs/Sales.php # app/Language/da/Config.php # app/Language/da/Sales.php # app/Language/de-CH/Config.php # app/Language/de-CH/Sales.php # app/Language/de-DE/Config.php # app/Language/de-DE/Sales.php # app/Language/el/Config.php # app/Language/el/Sales.php # app/Language/en-GB/Config.php # app/Language/en-GB/Sales.php # app/Language/en/Config.php # app/Language/en/Sales.php # app/Language/es-ES/Config.php # app/Language/es-ES/Sales.php # app/Language/es-MX/Config.php # app/Language/es-MX/Sales.php # app/Language/fa/Config.php # app/Language/fa/Sales.php # app/Language/fr/Config.php # app/Language/fr/Sales.php # app/Language/he/Config.php # app/Language/he/Sales.php # app/Language/hr-HR/Config.php # app/Language/hr-HR/Sales.php # app/Language/hu/Config.php # app/Language/hu/Sales.php # app/Language/hy/Config.php # app/Language/hy/Sales.php # app/Language/id/Config.php # app/Language/id/Sales.php # app/Language/it/Config.php # app/Language/it/Sales.php # app/Language/km/Config.php # app/Language/km/Sales.php # app/Language/lo/Config.php # app/Language/lo/Sales.php # app/Language/ml/Config.php # app/Language/ml/Sales.php # app/Language/nb/Config.php # app/Language/nb/Sales.php # app/Language/nl-BE/Config.php # app/Language/nl-BE/Sales.php # app/Language/nl-NL/Config.php # app/Language/nl-NL/Sales.php # app/Language/pl/Config.php # app/Language/pl/Sales.php # app/Language/pt-BR/Config.php # app/Language/pt-BR/Sales.php # app/Language/ro/Config.php # app/Language/ro/Sales.php # app/Language/ru/Config.php # app/Language/ru/Sales.php # app/Language/sv/Config.php # app/Language/sv/Sales.php # app/Language/sw-KE/Config.php # app/Language/sw-KE/Sales.php # app/Language/sw-TZ/Config.php # app/Language/sw-TZ/Sales.php # app/Language/ta/Config.php # app/Language/ta/Sales.php # app/Language/th/Config.php # app/Language/th/Sales.php # app/Language/tl/Config.php # app/Language/tl/Sales.php # app/Language/tr/Config.php # app/Language/tr/Sales.php # app/Language/uk/Config.php # app/Language/uk/Sales.php # app/Language/ur/Config.php # app/Language/ur/Sales.php # app/Language/vi/Config.php # app/Language/vi/Sales.php # app/Language/zh-Hans/Config.php # app/Language/zh-Hans/Sales.php # app/Language/zh-Hant/Config.php # app/Language/zh-Hant/Sales.php # app/Libraries/Sale_lib.php # app/Models/Sale.php |
||
|
|
9c542efaf6 |
Feature: Payment reference code (#4587)
* Add `reference_code` to sale payment queries and group by statements Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * Refactor `Sales` controller to improve payment handling readability and replace snake_case with camelCase variables Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * Add missing translations for `Sales` language file and include new keys like `must_enter_rrn` and `reference_code` Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * Refactor `Sales` payment handling to use camelCase and extend `addPayment` with `referenceCode` support Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * Refactor `Sales` models, controllers, and libraries to adopt camelCase naming conventions and improve readability Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * Add translations and updates for `must_enter_reference_code` and `reference_code` across language files and update `Sales` controller to replace `must_enter_rrn` with the new key Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * feat(sales): add reference code input and payment type helper - Add `get_reference_code_payment_types()` to locale_helper as single source of truth for card-requiring payment types - Add reference code row to register view, shown/hidden via JS based on selected payment type - Fix payment type dropdown width to 100% for consistent layout - Add min-width to payment buttons and right-padding to button group Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * feat(config): add payment reference code length configuration - Add payment_reference_code_min and payment_reference_code_max fields to Config controller save logic - Add translation keys for reference code length limits across all language files (min/max label + section header) - Align array key formatting in Config controller for readability Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * style(lang): normalize string delimiters to single quotes across all language files Convert double-quoted array keys and values to single quotes in all app/Language/*/Config.php and app/Language/*/Sales.php variants. No translation content changed — formatting only. Also add Localization section to AGENTS.md documenting language file conventions for new keys and fallback behavior. Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * feat(lang): add payment reference code length translations Add localized strings for payment_reference_code_length_limits, payment_reference_code_length_max_label, and payment_reference_code_length_min_label across all supported locales. Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * test(config,sales): add payment reference code min/max validation tests - Add baseLocalePayload() helper in ConfigTest for postSaveLocale tests - Add testSaveLocale_AcceptsValidReferenceCodeMinMax and related boundary tests - Add Sale_libPaymentTest for payment reference code validation in Sale_lib Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * fix(sales): add type-specific validation for amount_tendered Gift card payments use amount_tendered as giftcard number (integer); cash/other payments require decimal_locale format. Apply correct validation rule per payment type instead of generic required. Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * fix(lang): replace self-closing </br> with <br> in all locales Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * fix(sales): use configurable precision in discount comparison Replace hardcoded precision 2 with totals_decimals() when comparing discount against item total via bccomp/bcmul, so discount validation respects the configured decimal precision setting. Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * fix(lang): correct Azerbaijani translations in Config.php Replace placeholder/mismatched strings with accurate translations: - email_mailpath, email_smtp_pass, invoice_email_message - number_locale_invalid/required, receipt_template - reward_configuration, right, tax_decimals, theme Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * feat(sales): add reference code support to payment edit flow - Add reference_code field to new payment row in sale edit form - Persist reference_code on insert in Sale model - Validate reference_code_new in Sales controller using configurable min/max length rules Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * feat(lang): add Georgian (ka) language stubs for Config and Sales Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * Match the fallback maximum reference_code length to the maximum of the field in the db Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> * Bug fixes - Add validation of UI settings to prevent overridden values from being passed. - Correct maximum value in JS for payment_reference_code maximum length to 40. - Fix bug causing copy_entire_sale() to incorrectly copy the reference code and cash_adjustment Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> --------- Signed-off-by: Travis Garrison <travis@chiraqbookstore.com> Co-authored-by: Travis Garrison <travis@chiraqbookstore.com> |