feat(accounting): VAT registration + reclaim-country settings in the Accounting tab
Adds the 'VAT registration & reclaim' section to Settings → Accounting: a 'VAT-registered' toggle (charge output + reclaim input VAT) and a multi-select of countries whose input VAT is reclaimable (default domestic CH/LI). Wires accounting.service + the backend keys added earlier (accounting_vat_registered, accounting_vat_reclaim_countries). i18n en/de. The report VAT-payable math that consumes these is the next slice.
This commit is contained in:
@@ -86,6 +86,12 @@ export interface AccountingSettings {
|
||||
accounting_km_rate_minor: number;
|
||||
accounting_per_diem_rate_minor: number;
|
||||
accounting_require_proof: boolean;
|
||||
/** VAT-registered: charge output VAT + reclaim input VAT. Off = small
|
||||
* business / under threshold (no VAT). */
|
||||
accounting_vat_registered: boolean;
|
||||
/** ISO-2 countries whose input VAT can be reclaimed (drives cost
|
||||
* tax-treatment + the report's VAT-payable). */
|
||||
accounting_vat_reclaim_countries: string[];
|
||||
}
|
||||
|
||||
export interface CategorizePayload {
|
||||
@@ -177,6 +183,9 @@ export const accountingService = {
|
||||
accounting_km_rate_minor: Number(data.accounting_km_rate_minor) || 0,
|
||||
accounting_per_diem_rate_minor: Number(data.accounting_per_diem_rate_minor) || 0,
|
||||
accounting_require_proof: data.accounting_require_proof === true,
|
||||
accounting_vat_registered: data.accounting_vat_registered === true,
|
||||
accounting_vat_reclaim_countries: Array.isArray(data.accounting_vat_reclaim_countries)
|
||||
? data.accounting_vat_reclaim_countries : [],
|
||||
};
|
||||
},
|
||||
async updateSettings(payload: Partial<AccountingSettings>): Promise<{ updated: string[] }> {
|
||||
|
||||
Reference in New Issue
Block a user