mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-11-02 20:45:00 -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.2 KiB
PHP
85 lines
6.2 KiB
PHP
<?php
|
|
|
|
return [
|
|
"add_exception" => "הוסף חריגה",
|
|
"cascade" => "מדורג",
|
|
"cascade_sequence" => "רצף דירוג",
|
|
"city" => "עיר",
|
|
"code" => "קוד",
|
|
"confirm_delete" => "האם אתה בטוח שברצונך למחוק קוד מס זה? לא ניתן לבטל פעולה זו",
|
|
"confirm_restore" => "האם אתה בטוח שברצונך לשחזר קוד מס זה?",
|
|
"default_tax_category" => "קטגוריה מס ברירת מחדל",
|
|
"default_tax_rate" => "שיעור מס ברירת מחדל",
|
|
"error_adding_updating" => "הוספה או עדכון של קוד מס נכשלו",
|
|
"group_seq" => "רצף קבוצות",
|
|
"jurisdiction_name" => "שם תחום שיפוט",
|
|
"name" => "שם",
|
|
"new" => "מס חדש",
|
|
"no_taxes" => "",
|
|
"no_taxes_to_display" => "אין קוד מסים זמין לתצוגה",
|
|
"reporting_authority" => "רשות מדווחת",
|
|
"round_half_down" => "חצי למטה",
|
|
"round_half_even" => "חצי לשווה",
|
|
"round_half_odd" => "חצי מספר אי זוגי",
|
|
"round_half_up" => "חצי למעלה",
|
|
"rounding_code" => "קוד עיגול",
|
|
"sales_tax" => "מס מכירה",
|
|
"sales_tax_by_invoice" => "מס מכירה לפי חשבונית",
|
|
"sequence" => "רצף.",
|
|
"state" => "מדינה",
|
|
"successful_deleted" => "נמחק בהצלחה",
|
|
"tax_categories" => "קטגוריות מס",
|
|
"tax_categories_configuration" => "הגדרות קטגוריית מס",
|
|
"tax_categories_saved_successfully" => "שינויי קטגוריות המס נשמרו",
|
|
"tax_categories_saved_unsuccessfully" => "שינויים בקטגוריות מס לא נשמרו",
|
|
"tax_category" => "קטגוריית מס",
|
|
"tax_category_code" => "קוד קטגוריית מס",
|
|
"tax_category_duplicate" => "שכפל קטגוריית מס",
|
|
"tax_category_invalid_chars" => "תווים לא חוקיים בשם הקטגוריה של מס",
|
|
"tax_category_name" => "שם קטגוריה מס",
|
|
"tax_category_new" => "קטגוריית מס חדשה",
|
|
"tax_category_required" => "קטגוריית מס נדרשת",
|
|
"tax_code" => "קוד מס",
|
|
"tax_code_cannot_be_deleted" => "מחיקת קוד המס נכשלה",
|
|
"tax_code_duplicate" => "שכפל קוד מס",
|
|
"tax_code_invalid_chars" => "תווים לא חוקיים בקוד מס",
|
|
"tax_code_name" => "שם קוד מס",
|
|
"tax_code_required" => "קוד מס הינו שדה נדרש",
|
|
"tax_code_successful_deleted" => "מחקת בהצלחה את קוד המס",
|
|
"tax_code_successful_updated" => "עדכנת בהצלחה",
|
|
"tax_code_successful_updating" => "עדכנת בהצלחה את קוד המס",
|
|
"tax_code_successfully_added" => "הוספת בהצלחה",
|
|
"tax_code_type" => "סוג קוד מס",
|
|
"tax_codes" => "קודי מס",
|
|
"tax_codes_configuration" => "הגדרת קודי מס",
|
|
"tax_codes_saved_successfully" => "שינויי קוד המס נשמרו",
|
|
"tax_codes_saved_unsuccessfully" => "שינויי קוד המס לא נשמרו",
|
|
"tax_excluded" => "לא כולל מס",
|
|
"tax_group" => "קבוצת מס",
|
|
"tax_group_not_unique" => "",
|
|
"tax_group_sequence" => "רצף קבוצת מסים",
|
|
"tax_included" => "כולל מס",
|
|
"tax_jurisdiction" => "תחום שיפוט מס (מיסוי)",
|
|
"tax_jurisdiction_duplicate" => "שכפל תחום שיפוט מס (מיסוי)",
|
|
"tax_jurisdiction_invalid_chars" => "תווים לא חוקיים בשם השיפוט",
|
|
"tax_jurisdiction_required" => "נדרשת סמכות שיפוט מס",
|
|
"tax_jurisdictions" => "שיפוט מס",
|
|
"tax_jurisdictions_configuration" => "הגדרת שיפוט מס",
|
|
"tax_jurisdictions_saved_successfully" => "שינויי שיפוט מס נשמרו",
|
|
"tax_jurisdictions_saved_unsuccessfully" => "שינויי שיפוט מס לא נשמרו",
|
|
"tax_rate" => "שיעור מס",
|
|
"tax_rate_configuration" => "הגדרת שיעור מס",
|
|
"tax_rate_error_adding_updating" => "הוספה או עדכון של שיעור המס נכשל",
|
|
"tax_rate_non_negative" => "",
|
|
"tax_rate_numeric" => "שדה שיעור המס חייב להיות מספר",
|
|
"tax_rate_required" => "שיעור המס הינו שדה חובה",
|
|
"tax_rate_successful_updated" => "עדכנת בהצלחה",
|
|
"tax_rate_successfully_added" => "הוספת בהצלחה",
|
|
"tax_rates" => "שיעורי המס",
|
|
"tax_rates_configuration" => "הגדרת שיעורי המס",
|
|
"tax_rounding" => "עיגול מס",
|
|
"tax_type" => "סוג מס",
|
|
"update" => "עדכון שיעור המס",
|
|
"vat_tax" => "מס ערך מוסף",
|
|
];
|