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' => 'Montante º',
|
|
'add_payment' => 'Pagar',
|
|
'amount_due' => 'Diferença',
|
|
'amount_tendered' => 'A Pagar',
|
|
'authorized_signature' => 'Assinatura autorizada',
|
|
'cancel_sale' => 'Cancelar',
|
|
'cash' => 'Dinheiro',
|
|
'cash_1' => '',
|
|
'cash_2' => '',
|
|
'cash_3' => '',
|
|
'cash_4' => '',
|
|
'cash_adjustment' => 'Ajuste de Dinheiro',
|
|
'cash_deposit' => 'Depósito em dinheiro',
|
|
'cash_filter' => 'Dinheiro',
|
|
'change_due' => 'Troco',
|
|
'change_price' => 'Mudar o Preço de Venda',
|
|
'check' => 'Cheque',
|
|
'check_balance' => 'Cheque restante',
|
|
'check_filter' => 'Cheque',
|
|
'close' => '',
|
|
'comment' => 'Cementário',
|
|
'comments' => 'Comentários',
|
|
'company_name' => '',
|
|
'complete' => '',
|
|
'complete_sale' => 'Finalizar',
|
|
'confirm_cancel_sale' => 'Tem certeza de que deseja apagar esta venda? Todos os itens serão apagados.',
|
|
'confirm_delete' => 'Tem certeza de que deseja excluir as vendas selecionados?',
|
|
'confirm_restore' => 'Tem certeza de que deseja restaurar a (s) venda (ões) selecionada (s)?',
|
|
'credit' => 'Cartão Crédito',
|
|
'credit_deposit' => 'Depósito de crédito',
|
|
'credit_filter' => 'Cartão de Crédito',
|
|
'current_table' => '',
|
|
'customer' => 'Cliente',
|
|
'customer_address' => 'Endereço',
|
|
'customer_discount' => 'Desconto',
|
|
'customer_email' => 'e-mail',
|
|
'customer_location' => 'Localização',
|
|
'customer_mailchimp_status' => 'Status Mailchimp',
|
|
'customer_optional' => '(Obrigatório para pagamentos vencidos)',
|
|
'customer_required' => '(Requerido)',
|
|
'customer_total' => 'Total',
|
|
'customer_total_spent' => '',
|
|
'customers_available_points' => 'Pontos Disponíveis',
|
|
'daily_sales' => '',
|
|
'date' => 'Data Venda',
|
|
'date_range' => 'Intervalo de datas',
|
|
'date_required' => 'A data correta precisa ser preenchida.',
|
|
'date_type' => 'Data é requerida.',
|
|
'debit' => 'Cartão Débito',
|
|
'debit_filter' => '',
|
|
'delete' => 'Permitir exclusão',
|
|
'delete_confirmation' => 'Tem certeza de que deseja excluir esta venda, esta ação não pode ser desfeita.',
|
|
'delete_entire_sale' => 'Apagar toda a venda',
|
|
'delete_successful' => 'Apagado com sucesso.',
|
|
'delete_unsuccessful' => 'Foi excluído com sucesso uma venda.',
|
|
'description_abbrv' => 'Descrição.',
|
|
'discard' => 'Descartar',
|
|
'discard_quote' => '',
|
|
'discount' => 'Desconto',
|
|
'discount_exceeds_item_total' => '',
|
|
'discount_included' => '% Desconto',
|
|
'discount_percent_exceeds_100' => '',
|
|
'discount_short' => '%',
|
|
'due' => 'Vencimento',
|
|
'due_filter' => 'Vencimento',
|
|
'edit' => 'Editar',
|
|
'edit_item' => 'Atualizar',
|
|
'edit_sale' => 'Editar Venda',
|
|
'email_receipt' => 'E-mail Recebido',
|
|
'employee' => 'Empregado',
|
|
'entry' => 'Entrada',
|
|
'error_editing_item' => 'Erro editando item',
|
|
'find_or_scan_item' => 'Pesquisar Item',
|
|
'find_or_scan_item_or_receipt' => 'Produto',
|
|
'giftcard' => 'Cupom',
|
|
'giftcard_balance' => 'Balanço de Cartões presente',
|
|
'giftcard_filter' => '',
|
|
'giftcard_number' => 'Número cartão presente',
|
|
'group_by_category' => 'Agrupar por Categoria',
|
|
'group_by_type' => 'Agrupar por Tipo',
|
|
'hsn' => 'HSN',
|
|
'id' => 'Venda ID',
|
|
'include_prices' => 'Incluir Preços?',
|
|
'invoice' => 'Fatura',
|
|
'invoice_confirm' => 'Esta fatura será enviada para',
|
|
'invoice_enable' => 'Criar Fatura',
|
|
'invoice_filter' => 'Faturas',
|
|
'invoice_no_email' => 'Este cliente não tem um endereço de e-mail válido.',
|
|
'invoice_number' => 'Fatura nº',
|
|
'invoice_number_duplicate' => 'Por favor insira um número de fatura única.',
|
|
'invoice_sent' => 'Enviar Fatura para',
|
|
'invoice_total' => 'Total da fatura',
|
|
'invoice_type_custom_invoice' => 'Fatura personalizada (custom_invoice.php)',
|
|
'invoice_type_custom_tax_invoice' => 'Fatura fiscal personalizada (custom_tax_invoice.php)',
|
|
'invoice_type_invoice' => 'Fatura (invoice.php)',
|
|
'invoice_type_tax_invoice' => 'Fatura fiscal (tax_invoice.php)',
|
|
'invoice_unsent' => 'Fatura não devem ser enviados para',
|
|
'invoice_update' => 'Recontagem',
|
|
'item_insufficient_of_stock' => 'Item insuficiente no estoque.',
|
|
'item_name' => 'Produto',
|
|
'item_number' => 'Item nº',
|
|
'item_out_of_stock' => 'Item sem estoque.',
|
|
'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' => 'Registrar como',
|
|
'must_enter_numeric' => 'Deve entrar valor numérico para montante da proposta apresentada.',
|
|
'must_enter_numeric_giftcard' => 'Deve entrar valor numérico para o número de cartão presente.',
|
|
'must_enter_reference_code' => 'O número de referência/recuperação deve ser informado.',
|
|
'negative_discount_invalid' => '',
|
|
'negative_price_invalid' => '',
|
|
'negative_quantity_invalid' => '',
|
|
'negative_total_invalid' => '',
|
|
'new_customer' => 'Novo Cliente',
|
|
'new_item' => 'Novo Item',
|
|
'no_description' => 'Sem descrição',
|
|
'no_filter' => 'Todos',
|
|
'no_items_in_cart' => 'Não há itens na cesta.',
|
|
'no_sales_to_display' => 'Sem vendas para mostrar.',
|
|
'none_selected' => 'Você não selecionou nenhuma venda para apagar.',
|
|
'nontaxed_ind' => ' ',
|
|
'not_authorized' => 'Esta ação não é autorizada.',
|
|
'one_or_multiple' => 'venda(s)',
|
|
'payment' => 'Forma de pagamento',
|
|
'payment_amount' => 'Conta',
|
|
'payment_not_cover_total' => 'Valor do pagamento não cobre total.',
|
|
'payment_type' => 'Tipo',
|
|
'payments' => '',
|
|
'payments_total' => 'Total Pago',
|
|
'price' => 'Preço',
|
|
'print_after_sale' => 'Imprimir ao final',
|
|
'quantity' => 'Quantidade',
|
|
'quantity_less_than_reorder_level' => 'Aviso, quantidade desejada está abaixo do nível de reabastecimento.',
|
|
'quantity_less_than_zero' => 'Aviso, Quantidade desejado é insuficiente. Você ainda pode processar a venda mas verifique seu inventário.',
|
|
'quantity_of_items' => 'Quantidade de {0} itens',
|
|
'quote' => 'Cotação',
|
|
'quote_number' => 'Cotação número',
|
|
'quote_number_duplicate' => 'O número de cotação deve ser exclusivo.',
|
|
'quote_sent' => 'Cotação enviada para',
|
|
'quote_unsent' => 'As cotações não foram enviadas para',
|
|
'receipt' => 'Vendas',
|
|
'receipt_no_email' => 'Este cliente não possui um endereço de email válido.',
|
|
'receipt_number' => 'Venda nº',
|
|
'receipt_sent' => 'Enviar recibo para',
|
|
'receipt_unsent' => 'Recibo não devem ser enviados para',
|
|
'reference_code' => 'Código de referência do pagamento',
|
|
'reference_code_invalid_characters' => 'O código de referência deve conter apenas letras e números.',
|
|
'reference_code_length_error' => 'O comprimento do código de referência é inválido.',
|
|
'refund' => 'Tipo de Reembolso',
|
|
'register' => 'Registar Venda',
|
|
'remove_customer' => 'Remover Cliente',
|
|
'remove_discount' => '',
|
|
'return' => 'Devolução',
|
|
'rewards' => 'Pontos de recompensa',
|
|
'rewards_balance' => 'Saldo de pontos de recompensa',
|
|
'rewards_package' => 'Recompensa',
|
|
'rewards_remaining_balance' => 'O valor restante dos pontos de recompensa é ',
|
|
'sale' => 'Venda',
|
|
'sale_by_invoice' => 'Venda por fatura',
|
|
'sale_for_customer' => 'Cliente:',
|
|
'sale_time' => 'Data',
|
|
'sales_tax' => 'Imposto de venda',
|
|
'sales_total' => '',
|
|
'select_customer' => 'Selecionar Cliente',
|
|
'send_invoice' => 'Enviar fatura',
|
|
'send_quote' => 'enviar cotação',
|
|
'send_receipt' => 'Enviar recibo',
|
|
'send_work_order' => 'Enviar ordem de trabalho',
|
|
'serial' => 'Série',
|
|
'service_charge' => '',
|
|
'show_due' => '',
|
|
'show_invoice' => 'fatura',
|
|
'show_receipt' => 'recibo',
|
|
'start_typing_customer_name' => 'Nome Cliente ...',
|
|
'start_typing_item_name' => 'Produto ...',
|
|
'stock' => 'Estoque',
|
|
'stock_location' => 'Estoque',
|
|
'sub_total' => 'Sub-total',
|
|
'successfully_deleted' => 'Apagado com sucesso',
|
|
'successfully_restored' => 'Você restaurou com sucesso',
|
|
'successfully_suspended_sale' => 'Suspenso com sucesso.',
|
|
'successfully_updated' => 'Venda atualizada.',
|
|
'suspend_sale' => 'Suspender',
|
|
'suspended_doc_id' => 'Documento',
|
|
'suspended_sale_id' => 'ID',
|
|
'suspended_sales' => 'Suspenso',
|
|
'table' => 'Mesa',
|
|
'takings' => 'Vendas',
|
|
'tax' => 'Taxa',
|
|
'tax_id' => 'Id imposto',
|
|
'tax_invoice' => 'Fatura de imposto',
|
|
'tax_percent' => 'Taxa %',
|
|
'taxed_ind' => 'Indicador de Taxa de Vendas',
|
|
'total' => 'Total',
|
|
'total_tax_exclusive' => 'taxas excluídas',
|
|
'transaction_failed' => 'Falha na transação Vendas.',
|
|
'unable_to_add_item' => 'Não é possível adicionar item à venda',
|
|
'unsuccessfully_deleted' => 'Venda(s) não pode ser excluído.',
|
|
'unsuccessfully_restored' => 'Falha na restauração de venda (s).',
|
|
'unsuccessfully_suspended_sale' => 'Suspenso com sucesso.',
|
|
'unsuccessfully_updated' => 'Venda sem sucesso na atualização.',
|
|
'unsuspend' => 'Não suspenso',
|
|
'unsuspend_and_delete' => 'Retornar e apagar',
|
|
'update' => 'Editar Venda',
|
|
'upi' => 'UPI',
|
|
'visa' => '',
|
|
'wholesale' => '',
|
|
'work_order' => 'Ordem de trabalho',
|
|
'work_order_number' => 'Número da ordem de trabalho',
|
|
'work_order_number_duplicate' => 'O número da ordem de serviço deve ser exclusivo.',
|
|
'work_order_sent' => 'Ordem de trabalho enviada para',
|
|
'work_order_unsent' => 'A ordem de serviço não foi enviada para',
|
|
];
|