mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-07-26 06:37:02 -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>
237 lines
21 KiB
PHP
237 lines
21 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 Address',
|
|
'customer_discount' => 'ส่วนลด',
|
|
'customer_email' => 'Customer Email',
|
|
'customer_location' => 'Customer Location',
|
|
'customer_mailchimp_status' => 'สถานะของระบบส่งเมล์เมล์ชิม',
|
|
'customer_optional' => '(ต้องระบุวันที่ชำระเงิน)',
|
|
'customer_required' => '(ต้องระบุ)',
|
|
'customer_total' => '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' => 'ส่วนลดเปอร์เซ็นต์มีค่าได้ไม่เกิน 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' => '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' => 'เลือกลูกค้า (Optional)',
|
|
'selected_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' => 'ส่งคำสั่งงานล้มเหลว',
|
|
];
|