mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-10-31 12:39:56 -04: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>
126 lines
7.4 KiB
PHP
126 lines
7.4 KiB
PHP
<?php
|
|
|
|
return [
|
|
'add_minus' => '增/減庫存',
|
|
'allow_alt_description' => '允許ALT描述',
|
|
'amount_entry' => '',
|
|
'bulk_edit' => '批次編輯',
|
|
'buy_price_required' => '進貨價為必填欄位',
|
|
'cannot_be_deleted' => '無法刪除選定產品,所選產品中的一個或多個有銷售紀綠。',
|
|
'cannot_find_item' => '無法找到任何有關的產品',
|
|
'categories' => '',
|
|
'category' => '類別',
|
|
'category_new' => '',
|
|
'category_required' => '類別為必填欄位',
|
|
'change_all_to_allow_alt_desc' => ' 充許全部ALT倒序',
|
|
'change_all_to_not_allow_allow_desc' => '不允許全部ALT倒序',
|
|
'change_all_to_serialized' => '全部更改序號至序列化',
|
|
'change_all_to_unserialized' => '全部更改序號至非序列化',
|
|
'change_image' => 'Change Image',
|
|
'confirm_bulk_edit' => '您確定您要編輯的所有選定的產品嗎?',
|
|
'confirm_bulk_edit_wipe_taxes' => 'All item tax information will be replaced!',
|
|
'confirm_delete' => '你確定你要刪除選定的產品嗎?',
|
|
'confirm_restore' => '',
|
|
'cost_price' => '成本價',
|
|
'cost_price_number' => '成本價必需是數值',
|
|
'cost_price_required' => '成本價為必填攔位',
|
|
'count' => '更新庫存',
|
|
'csv_import_failed' => 'CSV匯入失敗',
|
|
'csv_import_invalid_location' => '',
|
|
'csv_import_nodata_wrongformat' => 'Your uploaded file has no data or wrong format',
|
|
'csv_import_partially_failed' => 'Most Items imported. But some were not, here is the list',
|
|
'csv_import_success' => 'Import of Items successful',
|
|
'current_quantity' => '當前數量',
|
|
'default_pack_name' => '',
|
|
'description' => '描述',
|
|
'details_count' => '庫存盤點詳情',
|
|
'do_nothing' => '沒有執行任何修改',
|
|
'edit' => '',
|
|
'edit_fields_you_want_to_update' => '編輯您選定產品的所有欄位',
|
|
'edit_multiple_items' => '編輯多項產品',
|
|
'empty_upc_items' => 'Empty UPC Items',
|
|
'error_adding_updating' => '新增/更新產品錯誤',
|
|
'error_updating_multiple' => '更新產品錯誤',
|
|
'generate_barcodes' => '產生條碼',
|
|
'hsn_code' => '',
|
|
'image' => 'Avatar',
|
|
'import_items_csv' => 'Import items from CSV sheet',
|
|
'info_provided_by' => '訊息提供者',
|
|
'inventory' => '庫存',
|
|
'inventory_CSV_import_quantity' => '',
|
|
'inventory_comments' => '評論',
|
|
'inventory_data_tracking' => '',
|
|
'inventory_date' => '',
|
|
'inventory_employee' => '',
|
|
'inventory_in_out_quantity' => '',
|
|
'inventory_remarks' => '',
|
|
'is_deleted' => 'Deleted',
|
|
'is_printed' => '',
|
|
'is_serialized' => '產品有序號',
|
|
'item' => '產品',
|
|
'item_id' => '',
|
|
'item_number' => 'UPC/EAN/ISBN',
|
|
'item_number_duplicate' => 'The item number is already present in the database',
|
|
'item_number_invalid' => '项目编号包含不允许的字符。',
|
|
'kit' => '',
|
|
'location' => '位置',
|
|
'low_inventory_items' => '低庫存產品',
|
|
'low_sell_item' => '',
|
|
'manually_editing_of_quantity' => '手動編輯數量',
|
|
'markup' => '',
|
|
'name' => '產品名稱',
|
|
'name_required' => '產品名稱為必填',
|
|
'new' => '新增產品',
|
|
'no_description_items' => '產品沒有說明',
|
|
'no_items_to_display' => '沒有產品可以顯示',
|
|
'none' => '無',
|
|
'none_selected' => '您還沒有選擇任何產品進行編輯',
|
|
'nonstock' => '',
|
|
'number_information' => '產品編號',
|
|
'number_required' => 'UPC/EAN/ISBN is a required field',
|
|
'one_or_multiple' => '產品',
|
|
'pack_name' => '',
|
|
'qty_per_pack' => '',
|
|
'quantity' => '數量',
|
|
'quantity_number' => '數量必需是數值',
|
|
'quantity_required' => '數量為必填欄位',
|
|
'receiving_quantity' => 'Receiving quantity',
|
|
'remove_image' => 'Remove Image',
|
|
'reorder_level' => '補貨點',
|
|
'reorder_level_number' => '補貨點必需是數值',
|
|
'reorder_level_required' => '補貨點為必填欄位',
|
|
'retrive_item_info' => '檢索產品訊息',
|
|
'sales_tax_1' => '營業稅',
|
|
'sales_tax_2' => '營業稅 2',
|
|
'search_attributes' => 'Search Custom Fields',
|
|
'select_image' => 'Select Image',
|
|
'serialized_items' => '序列化產品',
|
|
'standard' => '',
|
|
'stock' => '',
|
|
'stock_location' => '倉庫地址',
|
|
'stock_type' => '',
|
|
'successful_adding' => '已成功新增產品',
|
|
'successful_bulk_edit' => '您已成功更新所選產品',
|
|
'successful_deleted' => '刪除成功',
|
|
'successful_updating' => '已成功更新產品',
|
|
'supplier' => '供貨商',
|
|
'tax_1' => '稅額 1',
|
|
'tax_2' => '稅額 2',
|
|
'tax_3' => '',
|
|
'tax_category' => '',
|
|
'tax_name_invalid' => '税项名称包含不允许的字符。',
|
|
'tax_percent' => '稅率',
|
|
'tax_percent_number' => '',
|
|
'tax_percent_non_negative' => '',
|
|
'tax_percent_required' => '稅率為必填欄位',
|
|
'tax_percents' => '稅率 %',
|
|
'temp' => '',
|
|
'type' => '',
|
|
'unit_price' => '單價',
|
|
'unit_price_number' => '單價必需是數值',
|
|
'unit_price_required' => '單價為必填欄位',
|
|
'upc_database' => 'UPC Database',
|
|
'update' => '更新產品',
|
|
'use_inventory_menu' => '使用庫存清單',
|
|
];
|