@weiliang79/ubl-builder
Version:
Tool to create xml documents with UBL 2.1 standard
51 lines (49 loc) • 2.67 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DeliveryTerms = void 0;
const GenericAggregateComponent_1 = __importDefault(require("./GenericAggregateComponent"));
const UnqualifiedDataTypes_1 = require("../types/UnqualifiedDataTypes");
const UdtAmount_1 = require("../types/UnqualifiedDataTypes/UdtAmount");
const LocationTypeGroup_1 = require("./LocationTypeGroup");
/*
1 cbc:ID [0..1] An identifier for this description of delivery terms.
2 cbc:SpecialTerms [0..*] A description of any terms or conditions relating to the delivery items.
3 cbc:LossRiskResponsibilityCode [0..1] A code that identifies one of various responsibilities for loss risk in the execution of the delivery.
4 cbc:LossRisk [0..*] A description of responsibility for risk of loss in execution of the delivery, expressed as text.
5 cbc:Amount [0..1] The monetary amount covered by these delivery terms.
6 cac:DeliveryLocation [0..1] The location for the contracted delivery.
7 cac:AllowanceCharge [0..1] An allowance or charge covered by these delivery terms.
*/
const ParamsMap = {
id: { order: 1, attributeName: 'cbc:ID', min: 0, max: 1, classRef: UnqualifiedDataTypes_1.UdtIdentifier },
specialTerms: { order: 2, attributeName: 'cbc:SpecialTerms', min: 0, max: undefined, classRef: UnqualifiedDataTypes_1.UdtText },
lossRiskResponsibilityCode: {
order: 3,
attributeName: 'cbc:LossRiskResponsibilityCode',
min: 0,
max: 1,
classRef: UnqualifiedDataTypes_1.UdtCode,
},
lossRisks: { order: 4, attributeName: 'cbc:LossRisk', min: 0, max: undefined, classRef: UnqualifiedDataTypes_1.UdtText },
amount: { order: 5, attributeName: 'cbc:Amount', min: 0, max: 1, classRef: UdtAmount_1.UdtAmount },
deliveryLocation: { order: 6, attributeName: 'cac:DeliveryLocation', min: 0, max: 1, classRef: LocationTypeGroup_1.DeliveryLocation },
// allowanceCharge: { order: 7, attributeName: 'cac:AllowanceCharge', min: 0, max: 1, classRef: AllowanceCharge },
// ################################## TODO CAC MISSING ################################################
};
/**
*
*/
class DeliveryTerms extends GenericAggregateComponent_1.default {
/**
* @param {AllowedParams} content
* @param {string} name
*/
constructor(content) {
super(content, ParamsMap, 'cac:DeliveryTerms');
}
}
exports.DeliveryTerms = DeliveryTerms;
//# sourceMappingURL=DeliveryTerms.js.map