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
16 KiB
PHP
236 lines
16 KiB
PHP
<?php
|
|
|
|
return [
|
|
'account_number' => 'Tài khoản #',
|
|
'add_payment' => 'Thêm thanh toán',
|
|
'amount_due' => 'Số còn lại phải thanh toán',
|
|
'amount_tendered' => 'Số tiền thanh toán',
|
|
'authorized_signature' => 'Chữ ký ủy quyền',
|
|
'cancel_sale' => 'Thôi',
|
|
'cash' => 'Tiền mặt',
|
|
'cash_1' => '',
|
|
'cash_2' => '',
|
|
'cash_3' => '',
|
|
'cash_4' => '',
|
|
'cash_adjustment' => 'Điều chỉnh tiền mặt',
|
|
'cash_deposit' => 'Số dư tiền mặt',
|
|
'cash_filter' => 'Tiền mặt',
|
|
'change_due' => 'Tiền thối lại',
|
|
'change_price' => 'Thay đổi giá bán',
|
|
'check' => 'Séc',
|
|
'check_balance' => 'Phần còn lại séc',
|
|
'check_filter' => 'Séc',
|
|
'close' => '',
|
|
'comment' => 'Ghi chú',
|
|
'comments' => 'Ghi chú',
|
|
'company_name' => '',
|
|
'complete' => '',
|
|
'complete_sale' => 'Hoàn thành',
|
|
'confirm_cancel_sale' => 'Bạn có chắc muốn xóa trắng lần bán hàng này? Mọi hàng hóa sẽ bị xóa sạch.',
|
|
'confirm_delete' => 'Bạn chắc chắn muốn xóa các lần bán hàng được chọn không?',
|
|
'confirm_restore' => 'Bạn chắc chắn muốn hoàn lại các lần bán hàng được chọn không?',
|
|
'credit' => 'Thẻ tín dụng',
|
|
'credit_deposit' => 'Số dư tiền gửi',
|
|
'credit_filter' => 'Thẻ tín dụng',
|
|
'current_table' => '',
|
|
'customer' => 'Khách hàng',
|
|
'customer_address' => 'Địa chỉ',
|
|
'customer_discount' => 'Giảm giá',
|
|
'customer_email' => 'Thư điện tử',
|
|
'customer_location' => 'Vị trí',
|
|
'customer_mailchimp_status' => 'Trạng thái tài khoản Mailchimp',
|
|
'customer_optional' => '(Tùy chọn)',
|
|
'customer_required' => '(Bắt buộc)',
|
|
'customer_total' => 'Tổng cộng',
|
|
'customer_total_spent' => '',
|
|
'customers_available_points' => 'Các điểm sẵn có',
|
|
'daily_sales' => '',
|
|
'date' => 'Ngày bán',
|
|
'date_range' => 'Phạm vi Ngày',
|
|
'date_required' => 'Ngày phải được nhập theo định dạng.',
|
|
'date_type' => 'Trường Ngày tháng là bắt buộc.',
|
|
'debit' => 'Thẻ ghi nợ',
|
|
'debit_filter' => '',
|
|
'delete' => 'Cho phép xóa',
|
|
'delete_confirmation' => 'Bạn có chắc muốn xóa lần nhập bán hàng? Thao tác này không thể hoàn lại.',
|
|
'delete_entire_sale' => 'Xóa toàn bộ đơn bán hàng',
|
|
'delete_successful' => 'Đã xóa thành công lần bán hàng.',
|
|
'delete_unsuccessful' => 'Gặp lỗi khi xóa đơn bán hàng.',
|
|
'description_abbrv' => 'Ggiá.',
|
|
'discard' => 'Hủy',
|
|
'discard_quote' => '',
|
|
'discount' => 'Ggiá %',
|
|
'discount_exceeds_item_total' => '',
|
|
'discount_included' => '% Giảm giá',
|
|
'discount_percent_exceeds_100' => '',
|
|
'discount_short' => '%',
|
|
'due' => 'Trả chậm',
|
|
'due_filter' => 'Trả chậm',
|
|
'edit' => 'Sửa',
|
|
'edit_item' => 'Sửa hàng hóa',
|
|
'edit_sale' => 'Sửa bán hàng',
|
|
'email_receipt' => 'Biên lai thư',
|
|
'employee' => 'Nhân viên',
|
|
'entry' => 'Mục nhập',
|
|
'error_editing_item' => 'Lỗi sửa hàng hóa',
|
|
'find_or_scan_item' => 'Tìm hay quét Hàng hóa',
|
|
'find_or_scan_item_or_receipt' => 'Tìm hay quét Hàng hóa hay Biên lai',
|
|
'giftcard' => 'Thẻ quà tặng',
|
|
'giftcard_balance' => 'Số thẻ quà tặng còn lại',
|
|
'giftcard_filter' => '',
|
|
'giftcard_number' => 'Số Thẻ quà tặng',
|
|
'group_by_category' => 'Gộp theo Danh mục',
|
|
'group_by_type' => 'Gộp theo kiểu',
|
|
'hsn' => 'HSN',
|
|
'id' => 'Mã bán hàng',
|
|
'include_prices' => 'Bao gồm Giá?',
|
|
'invoice' => 'Hóa đơn',
|
|
'invoice_confirm' => 'Hóa đơn sẽ được gửi đến',
|
|
'invoice_enable' => 'Tạo hóa dơn',
|
|
'invoice_filter' => 'Hóa đơn',
|
|
'invoice_no_email' => 'Khách hàng này không có địa chỉ thư điện tử hợp lệ.',
|
|
'invoice_number' => 'Hóa đơn #',
|
|
'invoice_number_duplicate' => 'Số Hóa đơn phải duy nhất.',
|
|
'invoice_sent' => 'Gửi Hóa đơn đến',
|
|
'invoice_total' => 'Tổng hóa đơn',
|
|
'invoice_type_custom_invoice' => 'Hóa đơn tùy chọn (custom_invoice.php)',
|
|
'invoice_type_custom_tax_invoice' => 'Hóa đơn thuế tự chọn (custom_tax_invoice.php)',
|
|
'invoice_type_invoice' => 'Hóa đơn (invoice.php)',
|
|
'invoice_type_tax_invoice' => 'Hóa đơn thuế (tax_invoice.php)',
|
|
'invoice_unsent' => 'Gặp lỗi khi gửi Hóa đơn cho',
|
|
'invoice_update' => 'Kiểm lại',
|
|
'item_insufficient_of_stock' => 'Không đủ hàng tồn cho mặt hàng này.',
|
|
'item_name' => 'Tên Hàng hóa',
|
|
'item_number' => 'Hàng hóa #',
|
|
'item_out_of_stock' => 'Hết hàng trong kho.',
|
|
'key_browser' => 'Phím tắt hữu ích',
|
|
'key_cancel' => 'Hủy báo giá/hóa đơn/bán hàng hiện tại',
|
|
'key_customer_search' => 'Tìm khách hàng',
|
|
'key_finish_quote' => 'Kết thúc báo giá/hóa đơn mà không cần thanh toán',
|
|
'key_finish_sale' => 'Thanh toán và hoàn thành hóa đơn/bán hàng',
|
|
'key_full' => 'Toàn màn hình',
|
|
'key_function' => 'Function',
|
|
'key_help' => 'Phím tắt',
|
|
'key_help_modal' => 'Mở cửa sổ phím tắt',
|
|
'key_in' => 'Phòng to',
|
|
'key_item_search' => 'Tìm hàng hóa',
|
|
'key_out' => 'Thu nhỏ',
|
|
'key_payment' => 'Thêm thanh toán',
|
|
'key_print' => 'In trang hiện tại',
|
|
'key_restore' => 'Khôi phục mức thu/phóng mặc định',
|
|
'key_search' => 'Tìm báo cáo',
|
|
'key_suspend' => 'Tạm hoãn đơn hàng',
|
|
'key_suspended' => 'Xem đơn hàng tạm hoãn',
|
|
'key_system' => 'Phím tắt hệ thống',
|
|
'key_tendered' => 'Edit Amount Tendered',
|
|
'key_title' => 'Phím tắt bán hàng',
|
|
'mc' => '',
|
|
'mode' => 'Chế độ đăng ký',
|
|
'must_enter_numeric' => 'Số tiền thanh toán phải là dạng số.',
|
|
'must_enter_numeric_giftcard' => 'Số Thẻ quà tặng phải là dạng số.',
|
|
'must_enter_reference_code' => 'Số tham chiếu/truy xuất phải được nhập.',
|
|
'negative_discount_invalid' => '',
|
|
'negative_price_invalid' => '',
|
|
'negative_quantity_invalid' => '',
|
|
'negative_total_invalid' => '',
|
|
'new_customer' => 'Khách hàng mới',
|
|
'new_item' => 'Hàng hóa mới',
|
|
'no_description' => 'Không',
|
|
'no_filter' => 'Tất cả',
|
|
'no_items_in_cart' => 'Không có Hàng hóa trong rổ hàng.',
|
|
'no_sales_to_display' => 'Không có lần bán hàng để hiển thị.',
|
|
'none_selected' => 'Bạn chưa chọn bất kỳ một lần bán hàng nào để mà xóa.',
|
|
'nontaxed_ind' => '',
|
|
'not_authorized' => 'Thao tác này không được phép.',
|
|
'one_or_multiple' => 'Bán hàng',
|
|
'payment' => 'Phương thức thanh toán',
|
|
'payment_amount' => 'Tổng số',
|
|
'payment_not_cover_total' => 'Chưa thanh toán đủ đơn hàng.',
|
|
'payment_type' => 'Kiểu',
|
|
'payments' => '',
|
|
'payments_total' => 'Đã thanh toán',
|
|
'price' => 'Giá',
|
|
'print_after_sale' => 'In sau khi Bán hàng',
|
|
'quantity' => 'Số lượng',
|
|
'quantity_less_than_reorder_level' => 'Cảnh báo: Số lượng mong muốn dưới Mức đặt mua bổ xung cho hàng hóa đó.',
|
|
'quantity_less_than_zero' => 'Cảnh báo: Số lượng mong muốn không đủ. Bạn vẫn có thể xử lý đơn hàng, nhưng hãy kiểm toán tồn kho của bạn.',
|
|
'quantity_of_items' => 'Số lượng của Hàng hóa {0}',
|
|
'quote' => 'Báo giá',
|
|
'quote_number' => 'Số Báo giá',
|
|
'quote_number_duplicate' => 'Số Báo giá phải là duy nhất.',
|
|
'quote_sent' => 'Báo giá gửi đến',
|
|
'quote_unsent' => 'Gặp lỗi khi gửi báo giá đến',
|
|
'receipt' => 'Biên lai các lần bán hàng',
|
|
'receipt_no_email' => 'Khách hàng này có địa chỉ thư điện tử không hợp lệ.',
|
|
'receipt_number' => 'Bán hàng #',
|
|
'receipt_sent' => 'Biên lai gửi đến',
|
|
'receipt_unsent' => 'Gặp lỗi khi gửi biên lai đến',
|
|
'reference_code' => 'Mã tham chiếu thanh toán',
|
|
'reference_code_invalid_characters' => 'Mã tham chiếu chỉ được chứa chữ cái và chữ số.',
|
|
'reference_code_length_error' => 'Độ dài mã tham chiếu không hợp lệ.',
|
|
'refund' => 'Phương thức hoàn tiền',
|
|
'register' => 'Nhập đơn bán hàng',
|
|
'remove_customer' => 'Xóa bỏ khách hàng',
|
|
'remove_discount' => '',
|
|
'return' => 'Trả hàng',
|
|
'rewards' => 'Điểm thưởng',
|
|
'rewards_balance' => 'Số Điểm thưởng còn lại',
|
|
'rewards_package' => 'Điểm thưởng',
|
|
'rewards_remaining_balance' => 'Giá trị còn lại của điểm thưởng là ',
|
|
'sale' => 'Bán hàng',
|
|
'sale_by_invoice' => 'Bán bằng Hóa đơn',
|
|
'sale_for_customer' => 'Khách hàng:',
|
|
'sale_time' => 'Thời gian',
|
|
'sales_tax' => 'Thuế các lần bán hàng',
|
|
'sales_total' => '',
|
|
'select_customer' => 'Chọn Khách hàng',
|
|
'send_invoice' => 'Gửi hóa đơn',
|
|
'send_quote' => 'Gửi báo giá',
|
|
'send_receipt' => 'Gửi biên lai',
|
|
'send_work_order' => 'Gửi Giấy giao việc',
|
|
'serial' => 'Số sê-ri',
|
|
'service_charge' => '',
|
|
'show_due' => '',
|
|
'show_invoice' => 'Hiển thị hóa đơn',
|
|
'show_receipt' => 'Hiển thị biên lai',
|
|
'start_typing_customer_name' => 'Bắt đầu gõ chi tiết khách hàng...',
|
|
'start_typing_item_name' => 'Bắt đầu gõ tên hàng hóa hoặc quét mã vạch...',
|
|
'stock' => 'Kho',
|
|
'stock_location' => 'Vị trí kho',
|
|
'sub_total' => 'Tổng trước thuế',
|
|
'successfully_deleted' => 'Bạn đã xóa thành công',
|
|
'successfully_restored' => 'Bạn đã khôi phục lại đơn hàng',
|
|
'successfully_suspended_sale' => 'Đã tạm hoãn thành công lần bán hàng.',
|
|
'successfully_updated' => 'Đã cập nhật thành công lần bán hàng.',
|
|
'suspend_sale' => 'Tạm hoãn',
|
|
'suspended_doc_id' => 'Tài liệu',
|
|
'suspended_sale_id' => 'MÃ SỐ',
|
|
'suspended_sales' => 'Đơn hàng tạm hoãn',
|
|
'table' => 'Bàn',
|
|
'takings' => 'Đơn hàng trong ngày',
|
|
'tax' => 'Thuế',
|
|
'tax_id' => 'Mã số thuế',
|
|
'tax_invoice' => 'Hóa đơn thuế',
|
|
'tax_percent' => 'Thuế %',
|
|
'taxed_ind' => 'T',
|
|
'total' => 'Tổng',
|
|
'total_tax_exclusive' => 'Gồm thuế',
|
|
'transaction_failed' => 'Gặp lỗi khi giao dịch bán hàng.',
|
|
'unable_to_add_item' => 'Gặp lỗi khi thêm hàng hóa vào đơn hàng',
|
|
'unsuccessfully_deleted' => 'Gặp lỗi khi xóa các lần bán hàng.',
|
|
'unsuccessfully_restored' => 'Gặp lỗi khi hoàn lại các lần bán hàng.',
|
|
'unsuccessfully_suspended_sale' => 'Gặp lỗi khi tạm ngừng lần bán hàng.',
|
|
'unsuccessfully_updated' => 'Gặp lỗi khi cập nhật lần bán hàng.',
|
|
'unsuspend' => 'Hủy tạm hoãn',
|
|
'unsuspend_and_delete' => 'Thao tác',
|
|
'update' => 'Cập nhật',
|
|
'upi' => 'UPI',
|
|
'visa' => '',
|
|
'wholesale' => '',
|
|
'work_order' => 'Giấy giao việc',
|
|
'work_order_number' => 'Số giấy giao việc',
|
|
'work_order_number_duplicate' => 'Số giấy giao việc phải là duy nhất.',
|
|
'work_order_sent' => 'Gửi Giấy giao việc cho',
|
|
'work_order_unsent' => 'Gặp lỗi khi gửi Giấy giao việc cho',
|
|
];
|