/** * Whether a booking's German VAT fits the account it is booked on, as the * chart ties the account to a tax: one check for the recipes, which know the * rate of the booking they make, and for a posted entry, whose rate is the * one of its VAT lines. Internal to the core. */ import type { IAccountPolicy } from './core.accountpolicy.js'; /** * How far a tax a document states may differ from the tax its rate gives: * one cent, either way (the recipes' `vat_amount_off_rate`). A document of a * few cents may so state no tax where the rate gives a cent. */ export declare const STATED_VAT_TOLERANCE_CENTS = 1; /** Why a booking does not fit its account (`accountRateMismatchOf`). */ export interface IAccountRateMismatch { /** * `automatik_account_not_allowed`: the account's automatism books German VAT * at a rate, the booking carries none; `account_rate_mismatch`: the booking * carries German VAT at a rate the account is not tied to. */ code: 'automatik_account_not_allowed' | 'account_rate_mismatch'; /** the rate the account's DATEV automatism books (`CHART_VAT_AUTOMATIK_RATES`), where it has one */ automatikRatePercent?: number; } /** * Why a booking on `account` that carries German VAT at `ratePercent` (19 or * 7), or none (`undefined`), does not fit the tax the chart ties the account * to, or `undefined` where it fits: * - no German VAT on an account whose DATEV automatism books it at a rate * (`CHART_VAT_AUTOMATIK_RATES`, e.g. SKR03 8400, 8820, 3400): DATEV would book * the automatism's tax from a line without a key, and reports the base under * that rate's Kennzahl; * - German VAT at 19 or 7 % on an account whose automatism books another rate * (SKR03 8300 at 19 %), or on one the chart marks for the UStVA without an * automatism at a rate (`CHART_VAT_ACCOUNTS`: tax-free revenue, revenue taxed * abroad, 0 %): DATEV reports the base by the account, under the other * rate's Kennzahl or a tax-free one. * Other rates (16 and 5 % of 2020) are not checked: the chart's automatisms * know 19 and 7. An individual account of the books is checked as the account * it is under (`vatCheckAccountOf`): tied to the rate its parent is. */ export declare function accountRateMismatchOf(policy: IAccountPolicy, account: string, ratePercent: number | undefined): IAccountRateMismatch | undefined; /** The rate of a domestic VAT account of the policy; the intra-EU and ยง 13b accounts only ever appear as self-assessed pairs. */ export declare function vatRateOfAccount(policy: IAccountPolicy, accountNumber: string): number | undefined;