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.
716 lines (714 loc) • 20.4 kB
JavaScript
// 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/line-status.gen.ts
var PUBLISHED = "D23A";
var LINE_STATUS = [
{
key: "ADDED",
name: "Added",
value: "1",
description: "The information is to be or has been added."
},
{
key: "DELETED",
name: "Deleted",
value: "2",
description: "The information is to be or has been deleted."
},
{
key: "CHANGED",
name: "Changed",
value: "3",
description: "The information is to be or has been changed."
},
{
key: "NO_ACTION",
name: "No action",
value: "4",
description: "This line item is not affected by the actual message."
},
{
key: "ACCEPTED_WITHOUT_AMENDMENT",
name: "Accepted without amendment",
value: "5",
description: "This line item is entirely accepted by the seller."
},
{
key: "ACCEPTED_WITH_AMENDMENT",
name: "Accepted with amendment",
value: "6",
description: "This line item is accepted but amended by the seller."
},
{
key: "NOT_ACCEPTED",
name: "Not accepted",
value: "7",
description: "This line item is not accepted by the seller."
},
{
key: "SCHEDULE_ONLY",
name: "Schedule only",
value: "8",
description: "Code specifying that the message is a schedule only."
},
{
key: "AMENDMENTS",
name: "Amendments",
value: "9",
description: "Code specifying that amendments are requested/notified."
},
{
key: "NOT_FOUND",
name: "Not found",
value: "10",
description: "This line item is not found in the referenced message."
},
{
key: "NOT_AMENDED",
name: "Not amended",
value: "11",
description: "This line is not amended by the buyer."
},
{
key: "LINE_ITEM_NUMBERS_CHANGED",
name: "Line item numbers changed",
value: "12",
description: "Code specifying that the line item numbers have changed."
},
{
key: "BUYER_HAS_DEDUCTED_AMOUNT",
name: "Buyer has deducted amount",
value: "13",
description: "Buyer has deducted amount from payment."
},
{
key: "BUYER_CLAIMS_AGAINST_INVOICE",
name: "Buyer claims against invoice",
value: "14",
description: "Buyer has a claim against an outstanding invoice."
},
{
key: "CHARGE_BACK_BY_SELLER",
name: "Charge back by seller",
value: "15",
description: "Factor has been requested to charge back the outstanding item."
},
{
key: "SELLER_WILL_ISSUE_CREDIT_NOTE",
name: "Seller will issue credit note",
value: "16",
description: "Seller agrees to issue a credit note."
},
{
key: "TERMS_CHANGED_FOR_NEW_TERMS",
name: "Terms changed for new terms",
value: "17",
description: "New settlement terms have been agreed."
},
{
key: "ABIDE_OUTCOME_OF_NEGOTIATIONS",
name: "Abide outcome of negotiations",
value: "18",
description: "Factor agrees to abide by the outcome of negotiations between seller and buyer."
},
{
key: "SELLER_REJECTS_DISPUTE",
name: "Seller rejects dispute",
value: "19",
description: "Seller does not accept validity of dispute."
},
{
key: "SETTLEMENT",
name: "Settlement",
value: "20",
description: "The reported situation is settled."
},
{
key: "NO_DELIVERY",
name: "No delivery",
value: "21",
description: "Code indicating that no delivery will be required."
},
{
key: "CALL_OFF_DELIVERY",
name: "Call-off delivery",
value: "22",
description: "A request for delivery of a particular quantity of goods to be delivered on a particular date (or within a particular period)."
},
{
key: "PROPOSED_AMENDMENT",
name: "Proposed amendment",
value: "23",
description: "A code used to indicate an amendment suggested by the sender."
},
{
key: "ACCEPTED_WITH_AMENDMENT_NO_CONFIRMATION_REQUIRED",
name: "Accepted with amendment, no confirmation required",
value: "24",
description: "Accepted with changes which require no confirmation."
},
{
key: "EQUIPMENT_PROVISIONALLY_REPAIRED",
name: "Equipment provisionally repaired",
value: "25",
description: "The equipment or component has been provisionally repaired."
},
{
key: "INCLUDED",
name: "Included",
value: "26",
description: "Code indicating that the entity is included."
},
{
key: "UPON_RECEIPT_AND_VERIFICATION_OF_DOCUMENTS_WE_SHALL_COVER_YOU_WHEN_DUE_AS_PER_YOUR_INSTRUCTIONS",
name: "Upon receipt and verification of documents we shall cover you when due as per your instructions",
value: "27",
description: "Upon receipt and verification of documents we shall cover you when due as per your instructions."
},
{
key: "UPON_RECEIPT_AND_VERIFICATION_OF_DOCUMENTS_WE_SHALL_AUTHORIZE_YOU_TO_DEBIT_OUR_ACCOUNT_WITH_YOU_WHEN_DUE",
name: "Upon receipt and verification of documents we shall authorize you to debit our account with you when due",
value: "28",
description: "Upon receipt and verification of documents we shall authorize you to debit our account with you when due."
},
{
key: "ON_RECEIPT_OF_YOUR_AUTHENTICATED_ADVICE_WE_SHALL_COVER_YOU_WHEN_DUE_AS_PER_YOUR_INSTRUCTIONS",
name: "On receipt of your authenticated advice we shall cover you when due as per your instructions",
value: "29",
description: "On receipt of your authenticated advice we shall cover you when due as per your instructions."
},
{
key: "ON_RECEIPT_OF_YOUR_AUTHENTICATED_ADVICE_WE_SHALL_AUTHORIZE_YOU_TO_DEBIT_OUR_ACCOUNT_WITH_YOU_WHEN_DUE",
name: "On receipt of your authenticated advice we shall authorize you to debit our account with you when due",
value: "30",
description: "On receipt of your authenticated advice we shall authorize you to debit our account with you when due."
},
{
key: "ON_RECEIPT_OF_YOUR_AUTHENTICATED_ADVICE_WE_SHALL_CREDIT_YOUR_ACCOUNT_WITH_US_WHEN_DUE",
name: "On receipt of your authenticated advice we shall credit your account with us when due",
value: "31",
description: "On receipt of your authenticated advice we shall credit your account with us when due."
},
{
key: "CREDIT_ADVICE_REQUESTED_FOR_DIRECT_DEBIT",
name: "Credit advice requested for direct debit",
value: "32",
description: "A credit advice is requested for the direct debit."
},
{
key: "CREDIT_ADVICE_AND_ACKNOWLEDGEMENT_FOR_DIRECT_DEBIT",
name: "Credit advice and acknowledgement for direct debit",
value: "33",
description: "A credit advice and acknowledgement are requested for the direct debit."
},
{
key: "INQUIRY",
name: "Inquiry",
value: "34",
description: "Request for information."
},
{ key: "CHECKED", name: "Checked", value: "35", description: "Checked." },
{
key: "NOT_CHECKED",
name: "Not checked",
value: "36",
description: "Not checked."
},
{
key: "CANCELLED",
name: "Cancelled",
value: "37",
description: "Discontinued."
},
{
key: "REPLACED",
name: "Replaced",
value: "38",
description: "Provide a replacement."
},
{ key: "NEW", name: "New", value: "39", description: "Not existing before." },
{ key: "AGREED", name: "Agreed", value: "40", description: "Consent." },
{
key: "PROPOSED",
name: "Proposed",
value: "41",
description: "Put forward for consideration."
},
{
key: "ALREADY_DELIVERED",
name: "Already delivered",
value: "42",
description: "Delivery has taken place."
},
{
key: "ADDITIONAL_SUBORDINATE_STRUCTURES_WILL_FOLLOW",
name: "Additional subordinate structures will follow",
value: "43",
description: "Additional subordinate structures will follow the current hierarchy level."
},
{
key: "ADDITIONAL_SUBORDINATE_STRUCTURES_WILL_NOT_FOLLOW",
name: "Additional subordinate structures will not follow",
value: "44",
description: "No additional subordinate structures will follow the current hierarchy level."
},
{
key: "RESULT_OPPOSED",
name: "Result opposed",
value: "45",
description: "A notification that the result is opposed."
},
{
key: "AUCTION_HELD",
name: "Auction held",
value: "46",
description: "A notification that an auction was held."
},
{
key: "LEGAL_ACTION_PURSUED",
name: "Legal action pursued",
value: "47",
description: "A notification that legal action has been pursued."
},
{
key: "MEETING_HELD",
name: "Meeting held",
value: "48",
description: "A notification that a meeting was held."
},
{
key: "RESULT_SET_ASIDE",
name: "Result set aside",
value: "49",
description: "A notification that the result has been set aside."
},
{
key: "RESULT_DISPUTED",
name: "Result disputed",
value: "50",
description: "A notification that the result has been disputed."
},
{
key: "COUNTERSUED",
name: "Countersued",
value: "51",
description: "A notification that a countersuit has been filed."
},
{
key: "PENDING",
name: "Pending",
value: "52",
description: "A notification that an action is awaiting settlement."
},
{
key: "COURT_ACTION_DISMISSED",
name: "Court action dismissed",
value: "53",
description: "A notification that a court action will no longer be heard."
},
{
key: "REFERRED_ITEM_ACCEPTED",
name: "Referred item, accepted",
value: "54",
description: "The item being referred to has been accepted."
},
{
key: "REFERRED_ITEM_REJECTED",
name: "Referred item, rejected",
value: "55",
description: "The item being referred to has been rejected."
},
{
key: "DEBIT_ADVICE_STATEMENT_LINE",
name: "Debit advice statement line",
value: "56",
description: "Notification that the statement line is a debit advice."
},
{
key: "CREDIT_ADVICE_STATEMENT_LINE",
name: "Credit advice statement line",
value: "57",
description: "Notification that the statement line is a credit advice."
},
{
key: "GROUPED_CREDIT_ADVICES",
name: "Grouped credit advices",
value: "58",
description: "Notification that the credit advices are grouped."
},
{
key: "GROUPED_DEBIT_ADVICES",
name: "Grouped debit advices",
value: "59",
description: "Notification that the debit advices are grouped."
},
{
key: "REGISTERED",
name: "Registered",
value: "60",
description: "The name is registered."
},
{
key: "PAYMENT_DENIED",
name: "Payment denied",
value: "61",
description: "The payment has been denied."
},
{
key: "APPROVED_AS_AMENDED",
name: "Approved as amended",
value: "62",
description: "Approved with modifications."
},
{
key: "APPROVED_AS_SUBMITTED",
name: "Approved as submitted",
value: "63",
description: "The request has been approved as submitted."
},
{
key: "CANCELLED_NO_ACTIVITY",
name: "Cancelled, no activity",
value: "64",
description: "Cancelled due to the lack of activity."
},
{
key: "UNDER_INVESTIGATION",
name: "Under investigation",
value: "65",
description: "Investigation is being done."
},
{
key: "INITIAL_CLAIM_RECEIVED",
name: "Initial claim received",
value: "66",
description: "Notification that the initial claim was received."
},
{
key: "NOT_IN_PROCESS",
name: "Not in process",
value: "67",
description: "Not in process."
},
{
key: "REJECTED_DUPLICATE",
name: "Rejected, duplicate",
value: "68",
description: "Rejected because it is a duplicate."
},
{
key: "REJECTED_RESUBMIT_WITH_CORRECTIONS",
name: "Rejected, resubmit with corrections",
value: "69",
description: "Rejected but may be resubmitted when corrected."
},
{
key: "PENDING_INCOMPLETE",
name: "Pending, incomplete",
value: "70",
description: "Pending because of incomplete information."
},
{
key: "UNDER_FIELD_OFFICE_INVESTIGATION",
name: "Under field office investigation",
value: "71",
description: "Investigation by the field is being done."
},
{
key: "PENDING_AWAITING_ADDITIONAL_MATERIAL",
name: "Pending, awaiting additional material",
value: "72",
description: "Pending awaiting receipt of additional material."
},
{
key: "PENDING_AWAITING_REVIEW",
name: "Pending, awaiting review",
value: "73",
description: "Pending while awaiting review."
},
{
key: "REOPENED",
name: "Reopened",
value: "74",
description: "Opened again."
},
{
key: "PROCESSED_BY_PRIMARY_FORWARDED_TO_ADDITIONAL_PAYERS",
name: "Processed by primary, forwarded to additional payer(s)",
value: "75",
description: "This request has been processed by the primary payer and sent to additional payer(s)."
},
{
key: "PROCESSED_BY_SECONDARY_FORWARDED_TO_ADDITIONAL_PAYERS",
name: "Processed by secondary, forwarded to additional payer(s)",
value: "76",
description: "This request has been processed by the secondary payer and sent to additional payer(s)."
},
{
key: "PROCESSED_BY_TERTIARY_FORWARDED_TO_ADDITIONAL_PAYERS",
name: "Processed by tertiary, forwarded to additional payer(s)",
value: "77",
description: "This request has been processed by the tertiary payer and sent to additional payer(s)."
},
{
key: "PREVIOUS_PAYMENT_DECISION_REVERSED",
name: "Previous payment decision reversed",
value: "78",
description: "A previous payment decision has been reversed."
},
{
key: "NOT_OUR_CLAIM_FORWARDED_TO_ANOTHER_PAYERS",
name: "Not our claim, forwarded to another payer(s)",
value: "79",
description: "A request does not belong to this payer but has been forwarded to another payer(s)."
},
{
key: "TRANSFERRED_TO_CORRECT_INSURANCE_CARRIER",
name: "Transferred to correct insurance carrier",
value: "80",
description: "The request has been transferred to the correct insurance carrier for processing."
},
{
key: "NOT_PAID_PREDETERMINATION_PRICING_ONLY",
name: "Not paid, predetermination pricing only",
value: "81",
description: "Payment has not been made and the enclosed response is predetermination pricing only."
},
{
key: "DOCUMENTATION_CLAIM",
name: "Documentation claim",
value: "82",
description: "The claim is for documentation purposes only, no payment required."
},
{ key: "REVIEWED", name: "Reviewed", value: "83", description: "Assessed." },
{
key: "REPRICED",
name: "Repriced",
value: "84",
description: "This price was changed."
},
{
key: "AUDITED",
name: "Audited",
value: "85",
description: "An official examination has occurred."
},
{
key: "CONDITIONALLY_PAID",
name: "Conditionally paid",
value: "86",
description: "Payment has been conditionally made."
},
{
key: "ON_APPEAL",
name: "On appeal",
value: "87",
description: "Reconsideration of the decision has been applied for."
},
{ key: "CLOSED", name: "Closed", value: "88", description: "Shut." },
{
key: "REAUDITED",
name: "Reaudited",
value: "89",
description: "A subsequent official examination has occurred."
},
{
key: "REISSUED",
name: "Reissued",
value: "90",
description: "Issued again."
},
{
key: "CLOSED_AFTER_REOPENING",
name: "Closed after reopening",
value: "91",
description: "Reopened and then closed."
},
{
key: "REDETERMINED",
name: "Redetermined",
value: "92",
description: "Determined again or differently."
},
{
key: "PROCESSED_AS_PRIMARY",
name: "Processed as primary",
value: "93",
description: "Processed as the first."
},
{
key: "PROCESSED_AS_SECONDARY",
name: "Processed as secondary",
value: "94",
description: "Processed as the second."
},
{
key: "PROCESSED_AS_TERTIARY",
name: "Processed as tertiary",
value: "95",
description: "Processed as the third."
},
{
key: "CORRECTION_OF_ERROR",
name: "Correction of error",
value: "96",
description: "A correction to information previously communicated which contained an error."
},
{
key: "SINGLE_CREDIT_ITEM_OF_A_GROUP",
name: "Single credit item of a group",
value: "97",
description: "Notification that the credit item is a single credit item of a group of credit items."
},
{
key: "SINGLE_DEBIT_ITEM_OF_A_GROUP",
name: "Single debit item of a group",
value: "98",
description: "Notification that the debit item is a single debit item of a group of debit items."
},
{
key: "INTERIM_RESPONSE",
name: "Interim response",
value: "99",
description: "The response is an interim one."
},
{
key: "FINAL_RESPONSE",
name: "Final response",
value: "100",
description: "The response is an final one."
},
{
key: "DEBIT_ADVICE_REQUESTED",
name: "Debit advice requested",
value: "101",
description: "A debit advice is requested for the transaction."
},
{
key: "TRANSACTION_NOT_IMPACTED",
name: "Transaction not impacted",
value: "102",
description: "Advice that the transaction is not impacted."
},
{
key: "PATIENT_TO_BE_NOTIFIED",
name: "Patient to be notified",
value: "103",
description: "The action to take is to notify the patient."
},
{
key: "HEALTHCARE_PROVIDER_TO_BE_NOTIFIED",
name: "Healthcare provider to be notified",
value: "104",
description: "The action to take is to notify the healthcare provider."
},
{
key: "USUAL_GENERAL_PRACTITIONER_TO_BE_NOTIFIED",
name: "Usual general practitioner to be notified",
value: "105",
description: "The action to take is to notify the usual general practitioner."
},
{
key: "ADVICE_WITHOUT_DETAILS",
name: "Advice without details",
value: "106",
description: "An advice without details is requested or notified."
},
{
key: "ADVICE_WITH_DETAILS",
name: "Advice with details",
value: "107",
description: "An advice with details is requested or notified."
},
{
key: "AMENDMENT_REQUESTED",
name: "Amendment requested",
value: "108",
description: "An amendment is requested."
},
{
key: "FOR_INFORMATION",
name: "For information",
value: "109",
description: "Included for information only."
},
{
key: "WITHDRAW",
name: "Withdraw",
value: "110",
description: "A code indicating discontinuance or retraction."
},
{
key: "DELIVERY_DATE_CHANGE",
name: "Delivery date change",
value: "111",
description: "The action / notiification is a change of the delivery date."
},
{
key: "QUANTITY_CHANGE",
name: "Quantity change",
value: "112",
description: "The action / notification is a change of quantity."
},
{
key: "RESALE_AND_CLAIM",
name: "Resale and claim",
value: "113",
description: "The identified items have been sold by the distributor to the end customer, and compensation for the loss of inventory value is claimed."
},
{
key: "RESALE",
name: "Resale",
value: "114",
description: "The identified items have been sold by the distributor to the end customer."
},
{
key: "PRIOR_ADDITION",
name: "Prior addition",
value: "115",
description: "This existing line item becomes available at an earlier date."
},
{
key: "EXPIRED",
name: "Expired",
value: "116",
description: "This line has expired."
},
{
key: "HOLD",
name: "Hold",
value: "117",
description: "This line is on Hold."
},
{
key: "OPEN",
name: "Open",
value: "118",
description: "This line is open."
},
{
key: "OBSERVE",
name: "Observe",
value: "119",
description: "The object or item is to be or has been observed."
}
];
var lineStatusCode = LINE_STATUS.map(({ value }) => value);
var LineStatus = createEnum(LINE_STATUS, {
keyProp: "key",
valueProp: "value"
});
export {
LINE_STATUS,
LineStatus,
PUBLISHED,
lineStatusCode
};