mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-11-03 04:55:04 -05:00
* fix(taxes): reject negative tax rates and percentages
Reject negative tax values across all tax entry points so they can
never be persisted and produce inverted sales totals:
- Items::postSave / postBulkUpdate: validate tax_percents.* as
nonNegativeDecimal (was unvalidated, persisted raw).
- Items::save_tax_data (CSV import): fail the row on a negative
Tax N Percent instead of silently dropping the tax.
- Taxes::postSave: reject negative tax_rate before saving.
- Config::postSaveTax: reject negative default tax rates.
Adds non-negative regression tests for Items, Taxes and Config, plus
boundary tests proving a zero tax rate/percent is still accepted. New
language strings for the rejection messages.
* test: adopt test{Method}_{Purpose} naming convention for new tests
Align the negative-tax test method names with the convention established
in ConfigTest (testPostSave_RejectsNegativeTaxPercent, etc.), per review.
* fix(config): add language entries to all locales, extract TaxFixtureTrait
* fix(i18n): place tax_rate_non_negative in alphabetical order
Move the new tax_rate_non_negative entry to its correct alphabetical
position (after tax_rate_error_adding_updating) in all locale files.
---------
Co-authored-by: objecttothis <17935339+objecttothis@users.noreply.github.com>
85 lines
6.1 KiB
PHP
85 lines
6.1 KiB
PHP
<?php
|
||
|
||
return [
|
||
"add_exception" => "İstisna Əlavə Et",
|
||
"cascade" => "Çağlayan",
|
||
"cascade_sequence" => "Çağlayan sırası",
|
||
"city" => "Şəhər",
|
||
"code" => "Kod",
|
||
"confirm_delete" => "Vergi Məcəlləsini silmək istədiyinizə əminsinizmi? Bu hərəkət geri qaytarıla bilməz",
|
||
"confirm_restore" => "Seçilmiş Vergi Məcəlləsini (lər) bərpa etmək istədiyinizə əminsinizmi?",
|
||
"default_tax_category" => "Cari Vergi Kategoriyası",
|
||
"default_tax_rate" => "Sabit Vergi dərəcəsi",
|
||
"error_adding_updating" => "Vergi kodu Əlavə ya yeniləmə uğursuzdur",
|
||
"group_seq" => "Qrup seq",
|
||
"jurisdiction_name" => "Yurisdiksiya Adı",
|
||
"name" => "Ad",
|
||
"new" => "Yeni Vergi",
|
||
"no_taxes" => "",
|
||
"no_taxes_to_display" => "Göstərməyə Vergi Kodu yoxdur",
|
||
"reporting_authority" => "Hesabat orqanı",
|
||
"round_half_down" => "Yarı Aşağı",
|
||
"round_half_even" => "Cüt Rəqəm",
|
||
"round_half_odd" => "Tək Rəqəm",
|
||
"round_half_up" => "Yarı Rəqəmdən Yuxarı",
|
||
"rounding_code" => "Yuvarlama Kodu",
|
||
"sales_tax" => "Satış Vergisi",
|
||
"sales_tax_by_invoice" => "Satış Vergisi Faktura ilə",
|
||
"sequence" => "Ardı.",
|
||
"state" => "Bölgə",
|
||
"successful_deleted" => "Siz uğurla sildiniz",
|
||
"tax_categories" => "Vergi bölməsi",
|
||
"tax_categories_configuration" => "Vergi Bölmələrinin Konfiqurasiyası",
|
||
"tax_categories_saved_successfully" => "Vergi bölmələrində dəyişikliklər edildi",
|
||
"tax_categories_saved_unsuccessfully" => "Vergi bölmələrində dəyişikliklər edilməmişdir",
|
||
"tax_category" => "Vergi Bölməsi",
|
||
"tax_category_code" => "Vergi bölmə kodu",
|
||
"tax_category_duplicate" => "Vergi bölməsinin dublikatı",
|
||
"tax_category_invalid_chars" => "Vergi bölmə adında icazə veilməyən simvollar",
|
||
"tax_category_name" => "Vergi Bölmə Adı",
|
||
"tax_category_new" => "Yeni vergi Bölməsi",
|
||
"tax_category_required" => "Vergi Bölməsi tələb olunur",
|
||
"tax_code" => "Vergi kodu",
|
||
"tax_code_cannot_be_deleted" => "Vergi kodu silinmədi",
|
||
"tax_code_duplicate" => "Vergi kodunun dublikatı",
|
||
"tax_code_invalid_chars" => "Vergi kodunda yararsız simvollar",
|
||
"tax_code_name" => "Vergi kodu adı",
|
||
"tax_code_required" => "Vergi kodu zəruri bir sahədir",
|
||
"tax_code_successful_deleted" => "Vergi kodu müvəffəqiyyətlə silindi",
|
||
"tax_code_successful_updated" => "Müvəffəqiyyətlə yenilədiniz",
|
||
"tax_code_successful_updating" => "Vergi kodunuzu uğurla yenilədiniz",
|
||
"tax_code_successfully_added" => "Siz uğurla əlavə etdiniz",
|
||
"tax_code_type" => "Vergi Məcəlləsi növü",
|
||
"tax_codes" => "Vergi kodları",
|
||
"tax_codes_configuration" => "Vergi kodları konfiqurasiyası",
|
||
"tax_codes_saved_successfully" => "Vergi kodu dəyişikliyi saxlanıldı",
|
||
"tax_codes_saved_unsuccessfully" => "Vergi kodu dəyişikliyi saxlanılmadı",
|
||
"tax_excluded" => "Vergi istisna olunur",
|
||
"tax_group" => "Vergi qurupu",
|
||
"tax_group_not_unique" => "Vergi Qrupu {0} unikal deyil",
|
||
"tax_group_sequence" => "Vergi Qrupu Sırası",
|
||
"tax_included" => "Vergi daxildir",
|
||
"tax_jurisdiction" => "Vergi Yurisdiksiya",
|
||
"tax_jurisdiction_duplicate" => "Vergi yurisdiksiyasının dublikatı",
|
||
"tax_jurisdiction_invalid_chars" => "Yurisdiksiyası adına Yanlış simvol",
|
||
"tax_jurisdiction_required" => "Vergi yurisdiksiyası tələb olunur",
|
||
"tax_jurisdictions" => "Vergi yurisdiksiyalarda",
|
||
"tax_jurisdictions_configuration" => "Vergi yurisdiksiyalarda Konfiqurasiya",
|
||
"tax_jurisdictions_saved_successfully" => "Vergi Yurisdiksiyası dəyişiklikləri saxlanıldı",
|
||
"tax_jurisdictions_saved_unsuccessfully" => "Vergi Yurisdiksiyası dəyişiklikləri saxlanılmadı",
|
||
"tax_rate" => "Vergi Dərəcəsi",
|
||
"tax_rate_configuration" => "Vergi dərəcəsi konfiqurasiyası",
|
||
"tax_rate_error_adding_updating" => "Vergi dərəcəsi əlavə ya yeniləmə baş verdi",
|
||
"tax_rate_non_negative" => "",
|
||
"tax_rate_numeric" => "Vergi dərəcəsi rəqəmlə olmalıdır",
|
||
"tax_rate_required" => "Vergi Dərəcəsi sahəsi boş qala bilməz",
|
||
"tax_rate_successful_updated" => "Müvəffəqiyyətlə yenilənmisiniz",
|
||
"tax_rate_successfully_added" => "Siz uğurla əlavə etdiniz",
|
||
"tax_rates" => "Vergi dərəcələri",
|
||
"tax_rates_configuration" => "Vergi məzənnələri konfiqurasiyası",
|
||
"tax_rounding" => "Vergi yuvarlaqlaşdırması",
|
||
"tax_type" => "Vergi növü",
|
||
"update" => "Vergi dərəcəsini yenilənir",
|
||
"vat_tax" => "ƏDV Vergisi",
|
||
];
|