Versie 0.2.0
This commit is contained in:
commit
e77d8fd373
495 files changed
+81026
No files matched your search
@@ -0,0 +1,37 @@
|
||||
// Generated, do not edit. sha256:f9192eade666f121065dd68b1fecc5564b3f834c856bf8388ee039cdf9da7929
|
||||
import { TAX_CATEGORY_BY_ASSET_KIND } from '../../shared/config.js';
|
||||
|
||||
export const VERMOGENSCATEGORIE = Object.freeze({
|
||||
BANK: 'bank',
|
||||
OVERIG: 'overig',
|
||||
});
|
||||
|
||||
export const REIKWIJDTE = Object.freeze({
|
||||
ALL: 'all',
|
||||
CATEGORY: 'category',
|
||||
NONE: 'none',
|
||||
});
|
||||
|
||||
export function reikwijdteVoor(account, asset) {
|
||||
return (account && account.taxScope) || (asset && asset.taxScope) || REIKWIJDTE.ALL;
|
||||
}
|
||||
|
||||
export const CATEGORIE_PER_ASSET_KIND = TAX_CATEGORY_BY_ASSET_KIND;
|
||||
|
||||
export function categorieVoorAsset(asset) {
|
||||
if (!asset || !asset.kind) return null;
|
||||
return CATEGORIE_PER_ASSET_KIND[asset.kind] ?? null;
|
||||
}
|
||||
|
||||
export function categorieVoor(account, asset) {
|
||||
return (account && account.taxCategory) || (asset && asset.taxCategory) || categorieVoorAsset(asset);
|
||||
}
|
||||
|
||||
export function categorieGekozen(rows) {
|
||||
const gekozen = c => c === VERMOGENSCATEGORIE.BANK || c === VERMOGENSCATEGORIE.OVERIG;
|
||||
return rows.some(r => gekozen(r.account?.taxCategory) || gekozen(r.asset?.taxCategory));
|
||||
}
|
||||
|
||||
export const REGIME = Object.freeze({
|
||||
AANWAS_VANAF: 2028,
|
||||
});
|
||||
Reference in new issue
Block a user