UNPKG

@weiliang79/ubl-builder

Version:

Tool to create xml documents with UBL 2.1 standard

65 lines 3.63 kB
"use strict"; // 'use strict' var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.PartyLegalEntity = void 0; const GenericAggregateComponent_1 = __importDefault(require("./GenericAggregateComponent")); const UnqualifiedDataTypes_1 = require("../types/UnqualifiedDataTypes"); const CorporateRegistrationScheme_1 = require("./CorporateRegistrationScheme"); // const GenericAggregateComponent = require("./GenericAggregateComponent"); // /* TODO GANERIC CLASSES */ // const { UdtCode, UdtIdentifier, UdtDate, UdtText, UdtTime, UdtName } = require("../types/UnqualifiedDataTypes"); // const { CorporateRegistrationScheme }= require("./CorporateRegistrationScheme"); /* TODO GANERIC CLASSES */ /* 1 cbc:RegistrationName [0..1] The name of the party as registered with the relevant legal authority. 2 cbc:CompanyID [0..1] An identifier for the party as registered within a company registration scheme. 3 cbc:RegistrationDate [0..1] The registration date of the CompanyID. 4 cbc:RegistrationExpirationDate [0..1] The date upon which a registration expires (e.g., registration for an import/export license). 5 cbc:CompanyLegalFormCode [0..1] A code signifying the party's legal status. 6 cbc:CompanyLegalForm [0..1] The company legal status, expressed as a text. 7 cbc:SoleProprietorshipIndicator [0..1] An indicator that the company is owned and controlled by one person (true) or not (false). 8 cbc:CompanyLiquidationStatusCode [0..1] A code signifying the party's liquidation status. 9 cbc:CorporateStockAmount [0..1] The number of shares in the capital stock of a corporation. 10 cbc:FullyPaidSharesIndicator [0..1] An indicator that all shares of corporate stock have been paid by shareholders (true) or not (false). 11 cac:RegistrationAddress [0..1] The registered address of the party within a corporate registration scheme. 12 cac:CorporateRegistrationScheme [0..1] The corporate registration scheme used to register the party. 13 cac:HeadOfficeParty [0..1] The head office of the legal entity 14 cac:ShareholderParty [0..*] A party owning shares in this legal entity. */ // ################################## TODO CAC MISSING ################################################ const ParamsMap = { registrationName: { order: 1, attributeName: 'cbc:RegistrationName', min: 0, max: 1, classRef: UnqualifiedDataTypes_1.UdtName }, companyID: { order: 2, attributeName: 'cbc:CompanyID', min: 0, max: 1, classRef: UnqualifiedDataTypes_1.UdtIdentifier }, corporateRegistrationScheme: { order: 12, attributeName: 'cac:CorporateRegistrationScheme', min: 0, max: 1, classRef: CorporateRegistrationScheme_1.CorporateRegistrationScheme, }, }; /** * More info: http://www.datypic.com/sc/ubl21/e-cac_PartyLegalEntity.html */ class PartyLegalEntity extends GenericAggregateComponent_1.default { constructor(content) { super(content, ParamsMap, 'cac:PartyLegalEntity'); } /** * * @param value */ setCorporateRegistrationScheme(value) { if (value instanceof CorporateRegistrationScheme_1.CorporateRegistrationScheme) { this.attributes.corporateRegistrationScheme = value; } else { throw new Error('value must to be instance of CorporateRegistrationScheme'); } } } exports.PartyLegalEntity = PartyLegalEntity; //# sourceMappingURL=PartyLegalEntity.js.map