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>
236 lines
14 KiB
PHP
236 lines
14 KiB
PHP
<?php
|
|
|
|
return [
|
|
'account_number' => 'Broj računa',
|
|
'add_payment' => 'Plaćanje',
|
|
'amount_due' => 'Iznos duga',
|
|
'amount_tendered' => 'Ponuđeni iznos',
|
|
'authorized_signature' => 'Ovlašćeni potpis',
|
|
'cancel_sale' => 'Otkaži',
|
|
'cash' => 'Gotovina',
|
|
'cash_1' => '',
|
|
'cash_2' => '',
|
|
'cash_3' => '',
|
|
'cash_4' => '',
|
|
'cash_adjustment' => 'Usklađivanje gotovine',
|
|
'cash_deposit' => 'Polog gotovine',
|
|
'cash_filter' => 'Gotovina',
|
|
'change_due' => 'Kusur',
|
|
'change_price' => 'Promjena prodajne cijene',
|
|
'check' => 'Ček',
|
|
'check_balance' => 'Provjeri razliku',
|
|
'check_filter' => 'Ček',
|
|
'close' => '',
|
|
'comment' => 'Komentar',
|
|
'comments' => 'Komentari',
|
|
'company_name' => '',
|
|
'complete' => '',
|
|
'complete_sale' => 'Završeno',
|
|
'confirm_cancel_sale' => 'Da li ste sigurni da želite da očistite ovu prodaju? Sve stavke će biti izbrisane.',
|
|
'confirm_delete' => 'Da li ste sigurni da želite da izbrišete izabranu prodaju?',
|
|
'confirm_restore' => 'Da li ste sigurni da želite da vratite izabranu prodaju?',
|
|
'credit' => 'Kreditna kartica',
|
|
'credit_deposit' => 'Kreditni depozit',
|
|
'credit_filter' => 'Kreditna kartica',
|
|
'current_table' => '',
|
|
'customer' => 'Kupac',
|
|
'customer_address' => 'Adresa kupca',
|
|
'customer_discount' => 'Popust',
|
|
'customer_email' => 'E-mail kupca',
|
|
'customer_location' => 'Mjesto kupca',
|
|
'customer_mailchimp_status' => 'Status MailChimp-a',
|
|
'customer_optional' => '(Potrebno za odloženo plaćanje)',
|
|
'customer_required' => 'Obavezno',
|
|
'customer_total' => 'Ukupno',
|
|
'customer_total_spent' => '',
|
|
'customers_available_points' => 'Dostupni poeni',
|
|
'daily_sales' => '',
|
|
'date' => 'Datum prodaje',
|
|
'date_range' => 'Period',
|
|
'date_required' => 'Morate unijeti ispravan datum.',
|
|
'date_type' => 'Datum je obavezno polje.',
|
|
'debit' => 'Dugovna kartica',
|
|
'debit_filter' => '',
|
|
'delete' => 'Dozvoli brisanje',
|
|
'delete_confirmation' => 'Da li ste sigurni da želite da izbrišete ovu prodaju? Ova radnja se ne može opozvati.',
|
|
'delete_entire_sale' => 'Izbriši cijelu prodaju',
|
|
'delete_successful' => 'Prodaja je uspješno izbrisana.',
|
|
'delete_unsuccessful' => 'Brisanje prodaje nije uspjelo.',
|
|
'description_abbrv' => 'Opis',
|
|
'discard' => 'Odbaci',
|
|
'discard_quote' => '',
|
|
'discount' => 'Popust',
|
|
'discount_exceeds_item_total' => '',
|
|
'discount_included' => '% Rabat',
|
|
'discount_percent_exceeds_100' => '',
|
|
'discount_short' => '%',
|
|
'due' => 'Dug',
|
|
'due_filter' => 'Dug',
|
|
'edit' => 'Uredi',
|
|
'edit_item' => 'Uredi artikal',
|
|
'edit_sale' => 'Uredi prodaju',
|
|
'email_receipt' => 'Potvrda putem e-mail',
|
|
'employee' => 'Zaposlenik',
|
|
'entry' => 'Ulaz',
|
|
'error_editing_item' => 'Greška pri uređivanju artikla',
|
|
'find_or_scan_item' => 'Pronađi/Skeniraj artikal',
|
|
'find_or_scan_item_or_receipt' => 'Pronađi/Skeniraj artikal ili priznanicu',
|
|
'giftcard' => 'Poklon kartica',
|
|
'giftcard_balance' => 'Saldo poklon kartice',
|
|
'giftcard_filter' => '',
|
|
'giftcard_number' => 'Broj poklon kartice',
|
|
'group_by_category' => 'Grupiraj po kategoriji',
|
|
'group_by_type' => 'Grupiraj po tipu',
|
|
'hsn' => 'HSN',
|
|
'id' => 'ID prodaje',
|
|
'include_prices' => 'Uključi cijene?',
|
|
'invoice' => 'Faktura',
|
|
'invoice_confirm' => 'Ova faktura će biti poslata na',
|
|
'invoice_enable' => 'Broj fakture',
|
|
'invoice_filter' => 'Fakture',
|
|
'invoice_no_email' => 'Kupac nema važeću adresu e-pošte.',
|
|
'invoice_number' => 'Broj fakture',
|
|
'invoice_number_duplicate' => 'Broj fakture {0} mora biti jedinstven.',
|
|
'invoice_sent' => 'Faktura poslata',
|
|
'invoice_total' => 'Ukupan iznos fakture',
|
|
'invoice_type_custom_invoice' => 'Prilagođena faktura (custom_invoice.php)',
|
|
'invoice_type_custom_tax_invoice' => 'Prilagođena poreska faktura (custom_tax_invoice.php)',
|
|
'invoice_type_invoice' => 'Faktura (invoice.php)',
|
|
'invoice_type_tax_invoice' => 'Poreska faktura (tax_invoice.php)',
|
|
'invoice_unsent' => 'Faktura nije poslata',
|
|
'invoice_update' => 'Ažuriranje',
|
|
'item_insufficient_of_stock' => 'Artikla nema dovoljno na zalihi.',
|
|
'item_name' => 'Naziv artikla',
|
|
'item_number' => 'Barkod',
|
|
'item_out_of_stock' => 'Artikal je rasprodan.',
|
|
'key_browser' => '',
|
|
'key_cancel' => 'Cancels Current Quote/Invoice/Sale',
|
|
'key_customer_search' => 'Customer Search',
|
|
'key_finish_quote' => 'Finish Quote/Invoice witdout payment',
|
|
'key_finish_sale' => 'Add Payment and Complete Invoice/Sale',
|
|
'key_full' => '',
|
|
'key_function' => 'Function',
|
|
'key_help' => 'Shortcuts',
|
|
'key_help_modal' => 'Open Shortcuts Window',
|
|
'key_in' => '',
|
|
'key_item_search' => 'Item Search',
|
|
'key_out' => '',
|
|
'key_payment' => 'Add Payment',
|
|
'key_print' => '',
|
|
'key_restore' => '',
|
|
'key_search' => '',
|
|
'key_suspend' => 'Suspend Current Sale',
|
|
'key_suspended' => 'Show Suspended Sales',
|
|
'key_system' => '',
|
|
'key_tendered' => 'Edit Amount Tendered',
|
|
'key_title' => 'Sales Keyboard Shortcuts',
|
|
'mc' => '',
|
|
'mode' => 'Mod registrovanja',
|
|
'must_enter_numeric' => 'Ponuđeni iznos mora biti broj.',
|
|
'must_enter_numeric_giftcard' => 'Broj poklon kartice mora biti broj.',
|
|
'must_enter_reference_code' => 'Referentni/broj za preuzimanje mora biti unesen.',
|
|
'negative_discount_invalid' => '',
|
|
'negative_price_invalid' => '',
|
|
'negative_quantity_invalid' => '',
|
|
'negative_total_invalid' => '',
|
|
'new_customer' => 'Novi kupac',
|
|
'new_item' => 'Novi artikal',
|
|
'no_description' => 'Nema opisa',
|
|
'no_filter' => 'Svi',
|
|
'no_items_in_cart' => 'Nema artikala u korpi.',
|
|
'no_sales_to_display' => 'Nema prodaje za prikaz.',
|
|
'none_selected' => 'Niste izabrali nijedu prodaju za brisanje.',
|
|
'nontaxed_ind' => ' ',
|
|
'not_authorized' => 'Ova radnja nije ovlašćena.',
|
|
'one_or_multiple' => 'Prodaja',
|
|
'payment' => 'Tip plaćanja',
|
|
'payment_amount' => 'Iznos',
|
|
'payment_not_cover_total' => 'Iznos plaćanja mora biti veći ili jednak ukupnom iznosu.',
|
|
'payment_type' => 'Tip',
|
|
'payments' => '',
|
|
'payments_total' => 'Ukupno plaćeno',
|
|
'price' => 'Cijena',
|
|
'print_after_sale' => 'Štampaj poslije prodaje',
|
|
'quantity' => 'Količina',
|
|
'quantity_less_than_reorder_level' => 'Upozorenje! Željena količina je ispod minimalne.',
|
|
'quantity_less_than_zero' => 'Upozorenje: Željena količina je nedovoljna. Možete nastaviti prodaju, ali provjerite svoju zalihu.',
|
|
'quantity_of_items' => 'Količina od {0} stavke(i)',
|
|
'quote' => 'Ponuda',
|
|
'quote_number' => 'Broj ponude',
|
|
'quote_number_duplicate' => 'Broj ponude mora biti jedinstven.',
|
|
'quote_sent' => 'Ponuda poslata na',
|
|
'quote_unsent' => 'Ponuda nije poslata na',
|
|
'receipt' => 'Račun',
|
|
'receipt_no_email' => 'Ovaj kupac nema važeću e-mail adresu.',
|
|
'receipt_number' => 'Rasprodaja #',
|
|
'receipt_sent' => 'Račun poslat',
|
|
'receipt_unsent' => 'Račun nije poslat',
|
|
'reference_code' => 'Referentni kod plaćanja',
|
|
'reference_code_invalid_characters' => 'Referentni kod smije sadržavati samo slova i brojeve.',
|
|
'reference_code_length_error' => 'Duljina referentnog koda nije ispravna.',
|
|
'refund' => 'Tip povrata',
|
|
'register' => 'Registar prodaje',
|
|
'remove_customer' => 'Uklonite kupca',
|
|
'remove_discount' => '',
|
|
'return' => 'Povrat',
|
|
'rewards' => 'Nagradni bodovi',
|
|
'rewards_balance' => 'Bilans nagradnih bodova',
|
|
'rewards_package' => 'Nagrade',
|
|
'rewards_remaining_balance' => 'Preostala vrijednost nagradnih bodova je ',
|
|
'sale' => 'Prodaja',
|
|
'sale_by_invoice' => 'Prodaja po fakturi',
|
|
'sale_for_customer' => 'Kupac:',
|
|
'sale_time' => 'Vrijeme',
|
|
'sales_tax' => 'Porez na promet',
|
|
'sales_total' => '',
|
|
'select_customer' => 'Odaberi kupca',
|
|
'send_invoice' => 'Pošalji fakturu',
|
|
'send_quote' => 'Pošalji ponudu',
|
|
'send_receipt' => 'Pošalji račun',
|
|
'send_work_order' => 'Pošalji radni nalog',
|
|
'serial' => 'Serijski broj',
|
|
'service_charge' => '',
|
|
'show_due' => '',
|
|
'show_invoice' => 'Pokaži fakturu',
|
|
'show_receipt' => 'Pokaži račun',
|
|
'start_typing_customer_name' => 'Počnite upisivati naziv kupca ...',
|
|
'start_typing_item_name' => 'Počnite upisivati naziv artikla ili skenirajte barkod...',
|
|
'stock' => 'Zaliha',
|
|
'stock_location' => 'Lokacija skladišta',
|
|
'sub_total' => 'Međuzbir',
|
|
'successfully_deleted' => 'Uspješno ste izbrisali',
|
|
'successfully_restored' => 'Uspješno ste obnovili',
|
|
'successfully_suspended_sale' => 'Obustava prodaje je uspjela.',
|
|
'successfully_updated' => 'Prodaja je uspješno ažurirana.',
|
|
'suspend_sale' => 'Obustavi',
|
|
'suspended_doc_id' => 'Dokument',
|
|
'suspended_sale_id' => 'ID',
|
|
'suspended_sales' => 'Obustavljeno',
|
|
'table' => 'Sto',
|
|
'takings' => 'Dnevna prodaja',
|
|
'tax' => 'Porez',
|
|
'tax_id' => 'Porez Id',
|
|
'tax_invoice' => 'Poreska faktura',
|
|
'tax_percent' => 'Porez %',
|
|
'taxed_ind' => 'P',
|
|
'total' => 'Ukupno',
|
|
'total_tax_exclusive' => 'Porez isključen',
|
|
'transaction_failed' => 'Obrada nije ispravna.',
|
|
'unable_to_add_item' => 'Dodavanje artikla u rasprodaju nije uspjelo',
|
|
'unsuccessfully_deleted' => 'Brisanje prodaje nije uspjelo.',
|
|
'unsuccessfully_restored' => 'Obnova prodaje(a) nije uspjela.',
|
|
'unsuccessfully_suspended_sale' => 'Obustava prodaje nije uspjela.',
|
|
'unsuccessfully_updated' => 'Ažuriranje prodaje nije uspjelo.',
|
|
'unsuspend' => 'Odustani',
|
|
'unsuspend_and_delete' => 'Akcija',
|
|
'update' => 'Ažuriranje',
|
|
'upi' => 'UPI',
|
|
'visa' => '',
|
|
'wholesale' => '',
|
|
'work_order' => 'Radni nalog',
|
|
'work_order_number' => 'Broj radnog naloga',
|
|
'work_order_number_duplicate' => 'Broj radnog naloga mora biti jedinstven.',
|
|
'work_order_sent' => 'Radni nalog poslat na',
|
|
'work_order_unsent' => 'Slanje radnog naloga nije uspjelo',
|
|
];
|