UNPKG

node-zugferd

Version:

A Node.js library for creating ZUGFeRD/Factur-X compliant documents. Generating XML and embedding it into PDF/A files, enabling seamless e-invoicing and digital document compliance.

79 lines (77 loc) 2.03 kB
// src/codelists/index.ts var getByPath = (obj, path) => path.split(".").reduce((acc, key) => acc?.[key], obj); var createEnum = (data, options) => { return Object.fromEntries( data.map((item) => [ getByPath(item, options.keyProp), getByPath(item, options.valueProp) ]) ); }; // src/codelists/untdid-5305.gen.ts var UNTDID_5305 = [ { key: "STANDARD_RATE", name: "Standard rate", value: "S", semantic_model: "Standard rate" }, { key: "ZERO_RATED_GOODS", name: "Zero rated goods", value: "Z", semantic_model: "Zero rated goods" }, { key: "EXEMPT_FROM_TAX", name: "Exempt from tax", value: "E", semantic_model: "Exempt from tax" }, { key: "VAT_REVERSE_CHARGE", name: "VAT Reverse charge", value: "AE", semantic_model: "VAT reverse charge" }, { key: "VAT_EXEMPT_FOR_EEA_INTRA_COMMUNITY_SUPPLY_OF_GOODS_AND_SERVICES", name: "VAT exempt for EEA intra-community supply of goods and services", value: "K", semantic_model: "VAT exempt for intra community supply of goods" }, { key: "FREE_EXPORT_ITEM_TAX_NOT_CHARGED", name: "Free export item, tax not charged", value: "G", semantic_model: "Free export item, tax not charged" }, { key: "SERVICE_OUTSIDE_SCOPE_OF_TAX", name: "Service outside scope of tax", value: "O", semantic_model: "Services outside scope of tax" }, { key: "CANARY_ISLANDS_GENERAL_INDIRECT_TAX", name: "Canary Islands general indirect tax", value: "L", semantic_model: "Canary Islands General Indirect Tax" }, { key: "TAX_FOR_PRODUCTION_SERVICES_AND_IMPORTATION_IN_CEUTA_AND_MELILLA", name: "Tax for production, services and importation in Ceuta and Melilla", value: "M", semantic_model: "Liable for IPSI" } ]; var untdid5305Code = UNTDID_5305.map(({ value }) => value); var Untdid5305 = createEnum(UNTDID_5305, { keyProp: "key", valueProp: "value" }); export { UNTDID_5305, Untdid5305, untdid5305Code };