mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-25 22:27:05 -04:00
* 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>
236 lines
18 KiB
PHP
236 lines
18 KiB
PHP
<?php
|
||
|
||
return [
|
||
'account_number' => 'Счет #',
|
||
'add_payment' => 'Добавить оплату',
|
||
'amount_due' => 'Сумма задолженности',
|
||
'amount_tendered' => 'Предложенная сумма',
|
||
'authorized_signature' => 'Подпись уполномоченного лица',
|
||
'cancel_sale' => 'Отменить продажу',
|
||
'cash' => 'Наличные',
|
||
'cash_1' => '',
|
||
'cash_2' => '',
|
||
'cash_3' => '',
|
||
'cash_4' => '',
|
||
'cash_adjustment' => 'Денежная корректировка',
|
||
'cash_deposit' => 'Наличный депозит',
|
||
'cash_filter' => 'Наличные',
|
||
'change_due' => 'Изменение задолженности',
|
||
'change_price' => 'Изменить цену продажи',
|
||
'check' => 'Банковский чек',
|
||
'check_balance' => 'Проверка остатка',
|
||
'check_filter' => 'Банковский чек',
|
||
'close' => '',
|
||
'comment' => 'Комментарий',
|
||
'comments' => 'Комментарии',
|
||
'company_name' => '',
|
||
'complete' => '',
|
||
'complete_sale' => 'Завершить продажу',
|
||
'confirm_cancel_sale' => 'Вы уверены, что хотите удалить эту продажу? Все товары будут очищены.',
|
||
'confirm_delete' => 'Вы уверены, что хотите удалить выбранные продажи?',
|
||
'confirm_restore' => 'Вы уверены, что хотите восстановить выбранные продажи?',
|
||
'credit' => 'Кредитная карта',
|
||
'credit_deposit' => 'Кредитный депозит',
|
||
'credit_filter' => 'Кредитная карта',
|
||
'current_table' => '',
|
||
'customer' => 'Клиент',
|
||
'customer_address' => 'Адрес',
|
||
'customer_discount' => 'Скидка',
|
||
'customer_email' => 'Эл. почта',
|
||
'customer_location' => 'Расположение',
|
||
'customer_mailchimp_status' => 'Статус Mailchimp',
|
||
'customer_optional' => '(Требуется для своевременной оплаты)',
|
||
'customer_required' => '(Необходимо)',
|
||
'customer_total' => 'Итог',
|
||
'customer_total_spent' => '',
|
||
'customers_available_points' => 'Доступные баллы',
|
||
'daily_sales' => '',
|
||
'date' => 'Дата продажи',
|
||
'date_range' => 'Диапазон дат',
|
||
'date_required' => 'Необходимо ввести правильную дату.',
|
||
'date_type' => 'Дата - обязательное поле для заполнения.',
|
||
'debit' => 'Дебетовая карта',
|
||
'debit_filter' => '',
|
||
'delete' => 'Разрешить удаление',
|
||
'delete_confirmation' => 'Вы уверены, что хотите удалить эту продажу? Это действие не может быть отменено.',
|
||
'delete_entire_sale' => 'Удалить все продажи',
|
||
'delete_successful' => 'Успешно удалено.',
|
||
'delete_unsuccessful' => 'Ошибка при удалении продажи.',
|
||
'description_abbrv' => 'Опис.',
|
||
'discard' => 'Брак',
|
||
'discard_quote' => '',
|
||
'discount' => 'Скидка',
|
||
'discount_exceeds_item_total' => '',
|
||
'discount_included' => '% скидки',
|
||
'discount_percent_exceeds_100' => '',
|
||
'discount_short' => '%',
|
||
'due' => 'Долг',
|
||
'due_filter' => 'Долг',
|
||
'edit' => 'Правка',
|
||
'edit_item' => 'Редактировать товар',
|
||
'edit_sale' => 'Редактировать продажу',
|
||
'email_receipt' => 'Послать квитанцию по эл. почте',
|
||
'employee' => 'Сотрудник',
|
||
'entry' => 'Запись',
|
||
'error_editing_item' => 'Ошибка при редактировании товара',
|
||
'find_or_scan_item' => 'Найти/Сканировать товар',
|
||
'find_or_scan_item_or_receipt' => 'Найти/Сканировать товара или квитанцию',
|
||
'giftcard' => 'Подарочная карта',
|
||
'giftcard_balance' => 'Баланс подарочной карты',
|
||
'giftcard_filter' => '',
|
||
'giftcard_number' => 'Номер подарочной карты',
|
||
'group_by_category' => 'Сгруппировать по категориям',
|
||
'group_by_type' => 'Сгруппировать по типу',
|
||
'hsn' => '',
|
||
'id' => '№ продажи',
|
||
'include_prices' => 'Включить цены?',
|
||
'invoice' => 'Накладная',
|
||
'invoice_confirm' => 'Эта накладная будет отправлена',
|
||
'invoice_enable' => 'Номер накладной',
|
||
'invoice_filter' => 'Накладные',
|
||
'invoice_no_email' => 'У этого клиента нет действующего адреса электронной почты.',
|
||
'invoice_number' => 'Накладная #',
|
||
'invoice_number_duplicate' => 'Номер накладной {0} должен быть уникальным.',
|
||
'invoice_sent' => 'Накладная отправлена',
|
||
'invoice_total' => 'Общая сумма накладной',
|
||
'invoice_type_custom_invoice' => 'Пользовательская накладная (custom_invoice.php)',
|
||
'invoice_type_custom_tax_invoice' => 'Пользовательская налоговая накладная (custom_tax_invoice.php)',
|
||
'invoice_type_invoice' => 'Накладная (invoice.php)',
|
||
'invoice_type_tax_invoice' => 'Налоговая накладная (tax_invoice.php)',
|
||
'invoice_unsent' => 'Не удалось отправить накладную',
|
||
'invoice_update' => 'Пересчет',
|
||
'item_insufficient_of_stock' => 'Недостаточно товара в наличии.',
|
||
'item_name' => 'Название товара',
|
||
'item_number' => '№ товара',
|
||
'item_out_of_stock' => 'Этот товар отсутствует в наличии.',
|
||
'key_browser' => 'Сочетания клавиш',
|
||
'key_cancel' => 'Отмена текущих предложений/накладных/продаж',
|
||
'key_customer_search' => 'Поиск клиента',
|
||
'key_finish_quote' => 'Закрыть предложение/накладную без оплаты',
|
||
'key_finish_sale' => 'Добавить платеж и заполнить накладную/продажу',
|
||
'key_full' => 'Открыть в полноэкранном режиме',
|
||
'key_function' => 'Назначение',
|
||
'key_help' => 'Сочетания клавиш',
|
||
'key_help_modal' => 'Показать сочетания клавиш',
|
||
'key_in' => 'Увеличить',
|
||
'key_item_search' => 'Поиск товара',
|
||
'key_out' => 'Отдалить',
|
||
'key_payment' => 'Добавить оплату',
|
||
'key_print' => 'Распечатать текущую страницу',
|
||
'key_restore' => 'Восстановить исходное отображение/увеличение',
|
||
'key_search' => 'Поиск таблиц отчетов',
|
||
'key_suspend' => 'Приостановить текущую продажу',
|
||
'key_suspended' => 'Показать приостановленные продажи',
|
||
'key_system' => 'Системные горячие клавиши',
|
||
'key_tendered' => 'Изменить предложенную сумму',
|
||
'key_title' => 'Сочетания клавиш для продаж',
|
||
'mc' => '',
|
||
'mode' => 'Режим журнала',
|
||
'must_enter_numeric' => 'Предложенная сумма должна быть числом.',
|
||
'must_enter_numeric_giftcard' => 'Номер подарочной карты должен быть числом.',
|
||
'must_enter_reference_code' => 'Необходимо ввести справочный/поисковый номер.',
|
||
'negative_discount_invalid' => '',
|
||
'negative_price_invalid' => '',
|
||
'negative_quantity_invalid' => '',
|
||
'negative_total_invalid' => '',
|
||
'new_customer' => 'Новый клиент',
|
||
'new_item' => 'Новый товар',
|
||
'no_description' => 'Нет описания',
|
||
'no_filter' => 'Все',
|
||
'no_items_in_cart' => 'Нет товаров в корзине.',
|
||
'no_sales_to_display' => 'Нет продаж для отображения.',
|
||
'none_selected' => 'Вы не выбрали ни одной продажи для удаления.',
|
||
'nontaxed_ind' => '',
|
||
'not_authorized' => 'Это действие не разрешено.',
|
||
'one_or_multiple' => 'Продажа(ы)',
|
||
'payment' => 'Тип оплаты',
|
||
'payment_amount' => 'Сумма',
|
||
'payment_not_cover_total' => 'Сумма оплаты должна быть больше или равна общей сумме.',
|
||
'payment_type' => 'Тип',
|
||
'payments' => '',
|
||
'payments_total' => 'Всего оплат',
|
||
'price' => 'Цена',
|
||
'print_after_sale' => 'Распечатать после продажи',
|
||
'quantity' => 'Кол-во',
|
||
'quantity_less_than_reorder_level' => 'Внимание: желаемое количество ниже уровня повторного заказа для этого товара.',
|
||
'quantity_less_than_zero' => 'Предупреждение: Желаемое количество недостаточно. Вы по-прежнему можете оформить продажу, но проверьте свои запасы.',
|
||
'quantity_of_items' => 'Кол-во товара {0}',
|
||
'quote' => 'Предложение',
|
||
'quote_number' => '№ предложения',
|
||
'quote_number_duplicate' => 'Номер предложения должен быть уникальным.',
|
||
'quote_sent' => 'Предложение отправлено',
|
||
'quote_unsent' => 'Предложение не было отправлено',
|
||
'receipt' => 'Товарный чек',
|
||
'receipt_no_email' => 'У этого клиента нет действующего адреса электронной почты.',
|
||
'receipt_number' => 'Продажа #',
|
||
'receipt_sent' => 'Чек отправлен',
|
||
'receipt_unsent' => 'Чек не отправлен',
|
||
'reference_code' => 'Код ссылки на платёж',
|
||
'reference_code_invalid_characters' => 'Код ссылки должен содержать только буквы и цифры.',
|
||
'reference_code_length_error' => 'Длина кода ссылки недопустима.',
|
||
'refund' => 'Тип возврата',
|
||
'register' => 'Журнал продаж',
|
||
'remove_customer' => 'Удалить клиента',
|
||
'remove_discount' => '',
|
||
'return' => 'Возврат',
|
||
'rewards' => 'Бонусные баллы',
|
||
'rewards_balance' => 'Баланс бонусных баллов',
|
||
'rewards_package' => 'Награды',
|
||
'rewards_remaining_balance' => 'Остаток бонусных баллов составляет ',
|
||
'sale' => 'Продажа',
|
||
'sale_by_invoice' => 'Продажа по накладной',
|
||
'sale_for_customer' => 'Клиент:',
|
||
'sale_time' => 'Время',
|
||
'sales_tax' => 'Налог с продаж',
|
||
'sales_total' => '',
|
||
'select_customer' => 'Выберите клиента',
|
||
'send_invoice' => 'Отправить накладную',
|
||
'send_quote' => 'Отправить предложение',
|
||
'send_receipt' => 'Отправить чек',
|
||
'send_work_order' => 'Отправить рабочий заказ',
|
||
'serial' => 'Серийный номер',
|
||
'service_charge' => '',
|
||
'show_due' => '',
|
||
'show_invoice' => 'Показать накладную',
|
||
'show_receipt' => 'Показать чек',
|
||
'start_typing_customer_name' => 'Начните печатать имя клиента...',
|
||
'start_typing_item_name' => 'Сосканируйте штрих-код или начните печатать название товара...',
|
||
'stock' => 'Запасы',
|
||
'stock_location' => 'Расположение склада',
|
||
'sub_total' => 'Промежуточный итог',
|
||
'successfully_deleted' => 'Успешно удалено',
|
||
'successfully_restored' => 'Успешно восстановлено',
|
||
'successfully_suspended_sale' => 'Продажа успешно приостановлена.',
|
||
'successfully_updated' => 'Продажа успешно обновлена.',
|
||
'suspend_sale' => 'Приостановка продажи',
|
||
'suspended_doc_id' => 'Документ',
|
||
'suspended_sale_id' => '№',
|
||
'suspended_sales' => 'Приостановлено',
|
||
'table' => 'Таблица',
|
||
'takings' => 'Ежедневные продажи',
|
||
'tax' => 'Налог',
|
||
'tax_id' => '№ налога',
|
||
'tax_invoice' => 'Налоговая накладная',
|
||
'tax_percent' => 'Налоговые %',
|
||
'taxed_ind' => 'Н',
|
||
'total' => 'Итог',
|
||
'total_tax_exclusive' => 'Без налога',
|
||
'transaction_failed' => 'Ошибка транзакции продажи.',
|
||
'unable_to_add_item' => 'Не удалось добавить товар в продажу',
|
||
'unsuccessfully_deleted' => 'Продажу(и) удалить не удалось.',
|
||
'unsuccessfully_restored' => 'Не удалось восстановить продажу(и).',
|
||
'unsuccessfully_suspended_sale' => 'Не удалось приостановить продажу.',
|
||
'unsuccessfully_updated' => 'Не удалось обновить продажу.',
|
||
'unsuspend' => 'Возобновить',
|
||
'unsuspend_and_delete' => 'Действие',
|
||
'update' => 'Обновить',
|
||
'upi' => '',
|
||
'visa' => '',
|
||
'wholesale' => '',
|
||
'work_order' => 'Рабочий заказ',
|
||
'work_order_number' => 'Номер рабочего заказа',
|
||
'work_order_number_duplicate' => 'Номер рабочего заказа должен быть уникальным.',
|
||
'work_order_sent' => 'Рабочий заказ отправлен',
|
||
'work_order_unsent' => 'Не удалось отправить рабочий заказ',
|
||
];
|