Files
opensourcepos/app/Language/en-GB/Config.php
objecttothis 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>
2026-07-10 13:49:05 +04:00

336 lines
25 KiB
PHP

<?php
return [
'address' => 'Company Address',
'address_required' => 'Company Address is a required field.',
'all_set' => 'All file permissions are set correctly!',
'allow_duplicate_barcodes' => 'Allow Duplicate Barcodes',
'apostrophe' => 'apostrophe',
'backup_button' => 'Backup',
'backup_database' => 'Backup Database',
'barcode' => 'Barcode',
'barcode_company' => 'Company Name',
'barcode_configuration' => 'Barcode Configuration',
'barcode_content' => 'Barcode Content',
'barcode_first_row' => 'Row 1',
'barcode_font' => 'Font',
'barcode_formats' => 'Input Formats',
'barcode_generate_if_empty' => 'Generate if empty.',
'barcode_height' => 'Height (px)',
'barcode_id' => 'Item Id/Name',
'barcode_info' => 'Barcode Configuration Information',
'barcode_layout' => 'Barcode Layout',
'barcode_name' => 'Name',
'barcode_number' => 'Barcode',
'barcode_number_in_row' => 'Number in row',
'barcode_page_cellspacing' => 'Display page cellspacing.',
'barcode_page_width' => 'Display page width',
'barcode_price' => 'Price',
'barcode_second_row' => 'Row 2',
'barcode_third_row' => 'Row 3',
'barcode_tooltip' => 'Warning: This feature can cause duplicate items to be imported or created. Do not use if you do not want duplicate barcodes.',
'barcode_type' => 'Barcode Type',
'barcode_width' => 'Width (px)',
'bottom' => 'Bottom',
'cash_button' => '',
'cash_button_1' => '',
'cash_button_2' => '',
'cash_button_3' => '',
'cash_button_4' => '',
'cash_button_5' => '',
'cash_button_6' => '',
'cash_decimals' => 'Cash Decimals',
'cash_decimals_tooltip' => 'If Cash Decimals and Currency Decimals are the same then no cash triggered rounding will take place, unless Cash Rounding is set to Half Five.',
'cash_rounding' => 'Cash Rounding',
'category_dropdown' => 'Show Category as a dropdown',
'center' => 'Centre',
'change_apperance_tooltip' => '',
'comma' => 'comma',
'company' => 'Company Name',
'company_avatar' => '',
'company_change_image' => 'Change Image',
'company_logo' => 'Company Logo',
'company_remove_image' => 'Remove Image',
'company_required' => 'Company name is a required field',
'company_select_image' => 'Select Image',
'company_website_url' => 'Company website is not a valid URL (http://...).',
'country_codes' => 'Country Codes',
'country_codes_tooltip' => 'Comma separated list of country codes for nominatim address lookup.',
'currency_code' => 'Currency Code',
'currency_decimals' => 'Currency Decimals',
'currency_symbol' => 'Currency Symbol',
'current_employee_only' => '',
'customer_reward' => 'Reward',
'customer_reward_duplicate' => 'Please use a unique reward name.',
'customer_reward_enable' => 'Enable Customer Rewards',
'customer_reward_invalid_chars' => "The reward name cannot contain '_'",
'customer_reward_required' => 'Reward is a required field',
'customer_sales_tax_support' => '',
'date_or_time_format' => 'Date and Time Filter',
'datetimeformat' => 'Date and Time Format',
'decimal_point' => 'Decimal Point',
'default_barcode_font_size_number' => 'Default Barcode Font size must be a number.',
'default_barcode_font_size_required' => 'Default Barcode Font size is a required field.',
'default_barcode_height_number' => 'Default Barcode Height must be a number.',
'default_barcode_height_required' => 'Default Barcode Height is a required field.',
'default_barcode_num_in_row_number' => 'Default Barcode Number in row must be a number.',
'default_barcode_num_in_row_required' => 'Default Barcode Number in row is a required field.',
'default_barcode_page_cellspacing_number' => 'Default Barcode Page Cellspacing must be a number.',
'default_barcode_page_cellspacing_required' => 'Default Barcode Page Cellspacing is a required field.',
'default_barcode_page_width_number' => 'Default Barcode Page Width must be a number.',
'default_barcode_page_width_required' => 'Default Barcode Page Width is a required field.',
'default_barcode_width_number' => 'Default Barcode Width must be a number.',
'default_barcode_width_required' => 'Default Barcode Width is a required field.',
'default_item_columns' => 'Default Visible Item Columns',
'default_origin_tax_code' => 'Default Origin Tax Code',
'default_receivings_discount' => 'Default Receivings Discount',
'default_receivings_discount_number' => 'Default Receivings Discount must be a number.',
'default_receivings_discount_required' => 'Default Receivings Discount is a required field.',
'default_sales_discount' => 'Default Sales Discount',
'default_sales_discount_number' => 'Default Sales Discount must be a number.',
'default_sales_discount_required' => 'Default Sales Discount is a required field.',
'default_tax_category' => 'Default Tax Category',
'default_tax_code' => 'Default Tax Code',
'default_tax_jurisdiction' => 'Default Tax Jurisdiction',
'default_tax_name_number' => 'Default Tax Name must be a string.',
'default_tax_name_required' => 'Default Tax Name is a required field.',
'default_tax_rate' => 'Default Tax Rate %',
'default_tax_rate_1' => 'Tax 1 Rate',
'default_tax_rate_2' => 'Tax 2 Rate',
'default_tax_rate_3' => '',
'default_tax_rate_number' => 'Default Tax Rate must be a number.',
'default_tax_rate_required' => 'Default Tax Rate is a required field.',
'derive_sale_quantity' => 'Allow Derived Sale Quantity',
'derive_sale_quantity_tooltip' => 'If checked then a new item type will be provided for items ordered by extended amount',
'dinner_table' => 'Table',
'dinner_table_duplicate' => 'Please use an unique table name.',
'dinner_table_enable' => 'Enable Dinner Tables',
'dinner_table_invalid_chars' => "The table name cannot contain '_'.",
'dinner_table_required' => 'Table is a required field.',
'dot' => 'dot',
'email' => 'Email',
'email_configuration' => 'Email Configuration',
'email_mailpath' => 'Path to Sendmail',
'email_protocol' => 'Protocol',
'email_receipt_check_behaviour' => 'Email Receipt checkbox',
'email_receipt_check_behaviour_always' => 'Always checked',
'email_receipt_check_behaviour_last' => 'Remember last selection',
'email_receipt_check_behaviour_never' => 'Always unchecked',
'email_smtp_crypto' => 'SMTP Encryption',
'email_smtp_host' => 'SMTP Server',
'email_smtp_pass' => 'SMTP Password',
'email_smtp_port' => 'SMTP Port',
'email_smtp_timeout' => 'SMTP Timeout (s)',
'email_smtp_user' => 'SMTP Username',
'enable_avatar' => '',
'enable_avatar_tooltip' => '',
'enable_dropdown_tooltip' => '',
'enable_new_look' => '',
'enable_right_bar' => '',
'enable_right_bar_tooltip' => '',
'enforce_privacy' => 'Enforce privacy',
'enforce_privacy_tooltip' => 'Protect Customers privacy enforcing data scrambling in case of their data being deleted',
'fax' => 'Fax',
'file_perm' => 'There are problems with file permissions. Please fix and reload this page.',
'financial_year' => 'Financial Year Start',
'financial_year_apr' => '1st of April',
'financial_year_aug' => '1st of August',
'financial_year_dec' => '1st of December',
'financial_year_feb' => '1st of February',
'financial_year_jan' => '1st of January',
'financial_year_jul' => '1st of July',
'financial_year_jun' => '1st of June',
'financial_year_mar' => '1st of March',
'financial_year_may' => '1st of May',
'financial_year_nov' => '1st of November',
'financial_year_oct' => '1st of October',
'financial_year_sep' => '1st of September',
'floating_labels' => 'Floating Labels',
'gcaptcha_enable' => 'Login Page reCAPTCHA',
'gcaptcha_secret_key' => 'reCAPTCHA Secret Key',
'gcaptcha_secret_key_required' => 'reCAPTCHA Secret Key is a required field',
'gcaptcha_site_key' => 'reCAPTCHA Site Key',
'gcaptcha_site_key_required' => 'reCAPTCHA Site Key is a required field',
'gcaptcha_tooltip' => 'Protect the Login page with Google reCAPTCHA, click the icon for an API key pair.',
'general' => 'General',
'general_configuration' => 'General Configuration',
'giftcard_number' => 'Gift Card Number',
'giftcard_random' => 'Generate Random',
'giftcard_series' => 'Generate in Series',
'image_allowed_file_types' => 'Allowed file types',
'image_max_height_tooltip' => 'Maximum allowed height of image uploads in pixels (px).',
'image_max_size_tooltip' => 'Maximum allowed file size of image uploads in kilobytes (kb).',
'image_max_width_tooltip' => 'Maximum allowed width of image uploads in pixels (px).',
'image_restrictions' => 'Image Upload Restrictions',
'include_hsn' => 'Include Support for HSN Codes',
'info' => 'Information',
'info_configuration' => 'Shop Information',
'input_groups' => 'Input Groups',
'integrations' => 'Integrations',
'integrations_configuration' => 'Third Party Integrations',
'invoice' => 'Invoice',
'invoice_configuration' => 'Invoice Print Settings',
'invoice_default_comments' => 'Default Invoice Comments',
'invoice_email_message' => 'Invoice Email Template',
'invoice_enable' => 'Enable Invoicing',
'invoice_printer' => 'Invoice Printer',
'invoice_type' => 'Invoice Type',
'is_readable' => 'is readable, but the permissions are incorrectly set. Please set it to 640 or 660 and refresh.',
'is_writable' => 'is writable, but the permissions are incorrectly set. Please set it to 750 and refresh.',
'item_markup' => '',
'jsprintsetup_required' => 'Warning! This disabled functionality will only work if you have the FireFox jsPrintSetup addon installed. Save anyway?',
'language' => 'Language',
'last_used_invoice_number' => 'Last used Invoice Number',
'last_used_quote_number' => 'Last used Quote Number',
'last_used_work_order_number' => 'Last used W/O Number',
'left' => 'Left',
'license' => 'License',
'license_configuration' => 'License Statement',
'line_sequence' => 'Line Sequence',
'lines_per_page' => 'Lines Per Page',
'lines_per_page_number' => 'Lines Per Page must be a number.',
'lines_per_page_required' => 'Lines Per Page is a required field.',
'locale' => 'Localisation',
'locale_configuration' => 'Localisation Configuration',
'locale_info' => 'Localisation Configuration Information',
'location' => 'Stock',
'location_configuration' => 'Stock Locations',
'location_info' => 'Location Configuration Information',
'login_form' => 'Login Form Style',
'logout' => "Don't you want to make a backup before logging out? Click [OK] to backup, [Cancel] to logout.",
'mailchimp' => 'MailChimp',
'mailchimp_api_key' => 'MailChimp API Key',
'mailchimp_configuration' => 'MailChimp Configuration',
'mailchimp_key_successfully' => 'Valid API Key.',
'mailchimp_key_unsuccessfully' => 'Invalid API Key.',
'mailchimp_lists' => 'MailChimp List(s)',
'mailchimp_tooltip' => 'Click the icon for an API key.',
'message' => 'Message',
'message_configuration' => 'Message Configuration',
'msg_msg' => 'Saved Text Message',
'msg_msg_placeholder' => 'If you wish to use a SMS template save your message here. Otherwise leave the box blank.',
'msg_pwd' => 'SMS-API Password',
'msg_pwd_required' => 'SMS-API Password is a required field',
'msg_src' => 'SMS-API Sender ID',
'msg_src_required' => 'SMS-API Sender ID is a required field',
'msg_uid' => 'SMS-API Username',
'msg_uid_required' => 'SMS-API Username is a required field',
'multi_pack_enabled' => 'Multiple Packages per Item',
'no_risk' => 'No security/vulnerability risks.',
'none' => 'none',
'notify_alignment' => 'Notification Popup Position',
'number_format' => 'Number Format',
'number_locale' => 'Localisation',
'number_locale_invalid' => 'The entered locale is invalid. Check the link in the tooltip to find a sensible value.',
'number_locale_required' => 'Number Locale is a required field.',
'number_locale_tooltip' => 'Find a suitable locale through this link.',
'os_timezone' => 'OSPOS Timezone:',
'ospos_info' => 'OSPOS Installation Info',
'payment_options_order' => 'Payment Options Order',
'payment_reference_code_length_limits' => 'Payment Reference Code<br>Length Limits',
'payment_reference_code_length_max_label' => 'Max',
'payment_reference_code_length_min_label' => 'Min',
'perm_risk' => 'Incorrect permissions leaves this software at risk.',
'phone' => 'Company Phone',
'phone_required' => 'Company Phone is a required field.',
'print_bottom_margin' => 'Margin Bottom',
'print_bottom_margin_number' => 'Bottom Margin must be a number.',
'print_bottom_margin_required' => 'Bottom Margin is a required field.',
'print_delay_autoreturn' => 'Autoreturn to Sale delay',
'print_delay_autoreturn_number' => 'Autoreturn to Sale delay is a required field.',
'print_delay_autoreturn_required' => 'Autoreturn to Sale delay must be a number.',
'print_footer' => 'Print Browser Footer',
'print_header' => 'Print Browser Header',
'print_left_margin' => 'Margin Left',
'print_left_margin_number' => 'Left Margin must be a number.',
'print_left_margin_required' => 'Left Margin is a required field.',
'print_receipt_check_behaviour' => 'Print Receipt checkbox',
'print_receipt_check_behaviour_always' => 'Always checked',
'print_receipt_check_behaviour_last' => 'Remember last selection',
'print_receipt_check_behaviour_never' => 'Always unchecked',
'print_right_margin' => 'Margin Right',
'print_right_margin_number' => 'Default Right Margin must be a number.',
'print_right_margin_required' => 'Default Right Margin is a required field.',
'print_silently' => 'Show Print Dialog',
'print_top_margin' => 'Margin Top',
'print_top_margin_number' => 'Default Top Margin must be a number.',
'print_top_margin_required' => 'Default Top Margin is a required field.',
'quantity_decimals' => 'Quantity Decimals',
'quick_cash_enable' => '',
'quote_default_comments' => 'Default Quote Comments',
'receipt' => 'Receipt',
'receipt_category' => '',
'receipt_configuration' => 'Receipt Print Settings',
'receipt_default' => 'Default',
'receipt_font_size' => 'Font Size',
'receipt_font_size_number' => 'Font Size must be a number.',
'receipt_font_size_required' => 'Font Size is a required field.',
'receipt_info' => 'Receipt Configuration Information',
'receipt_printer' => 'Ticket Printer',
'receipt_short' => 'Short',
'receipt_show_company_name' => 'Show Company Name',
'receipt_show_description' => 'Show Description',
'receipt_show_serialnumber' => 'Show Serial Number',
'receipt_show_tax_ind' => 'Show Tax Indicator',
'receipt_show_taxes' => 'Show Taxes',
'receipt_show_total_discount' => 'Show Total Discount',
'receipt_template' => 'Receipt Template',
'receiving_calculate_average_price' => 'Change Cost Price (Receiving)',
'recv_invoice_format' => 'Receivings Invoice Format',
'register_mode_default' => 'Default Register Mode',
'report_an_issue' => 'Report an issue',
'return_policy_required' => 'Return policy is a required field.',
'reward' => 'Reward',
'reward_configuration' => 'Reward Configuration',
'right' => 'Right',
'sales_invoice_format' => 'Sales Invoice Format',
'sales_quote_format' => 'Sales Quote Format',
'mailpath_invalid' => 'Invalid sendmail path. Only letters, numbers, dashes, underscores, slashes and dots are allowed.',
'saved_successfully' => 'Configuration saved successfully.',
'saved_unsuccessfully' => 'Configuration save failed.',
'security_issue' => 'Security Vulnerability Warning',
'server_notice' => 'Please use the below info for issue reporting.',
'service_charge' => '',
'show_due_enable' => '',
'show_office_group' => 'Show office icon',
'statistics' => 'Send Statistics',
'statistics_tooltip' => 'Send statistics for development and feature improvement purposes.',
'stock_location' => 'Stock location',
'stock_location_duplicate' => 'Please use an unique location name.',
'stock_location_invalid_chars' => "Stock location name cannot contain '_'.",
'stock_location_required' => 'Stock location is a required field.',
'suggestions_fifth_column' => '',
'suggestions_first_column' => 'Column 1',
'suggestions_fourth_column' => '',
'suggestions_layout' => 'Search Suggestions Layout',
'suggestions_second_column' => 'Column 2',
'suggestions_third_column' => 'Column 3',
'system_conf' => 'Setup & Conf',
'system_info' => 'System Info',
'table' => 'Table',
'table_configuration' => 'Table Configuration',
'takings_printer' => 'Takings Printer',
'tax' => 'Tax',
'tax_category' => 'Tax Category',
'tax_category_duplicate' => 'The entered Tax Category already exists.',
'tax_category_invalid_chars' => 'The entered Tax Category is invalid.',
'tax_category_required' => 'The Tax Category is required.',
'tax_category_used' => 'Tax Category cannot be deleted because it is being used.',
'tax_configuration' => 'Tax Configuration',
'tax_decimals' => 'Tax Decimals',
'tax_id' => 'Tax Id',
'tax_included' => 'Tax Included',
'theme' => 'Theme',
'theme_preview' => 'Preview Theme:',
'thousands_separator' => 'Thousands Separator',
'timezone' => 'Timezone',
'timezone_error' => 'OSPOS Timezone is Different from your Local Timezone.',
'top' => 'Top',
'use_destination_based_tax' => 'Use Destination Based Tax',
'user_timezone' => 'Local Timezone:',
'website' => 'Website',
'wholesale_markup' => '',
'work_order_enable' => 'Work Order Support',
'work_order_format' => 'Work Order Format',
];