einvoicing
Version:
A JavaScript library for creating and parsing electronic invoices compliant with the eInvoicing Directive, EN 16931, and popular extensions
29 lines • 956 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/**
* DocumentType.ts
*
* @copyright Vitalii Savchuk <esvit666@gmail.com>
* @package esvit/einvoicing
* @licence MIT https://opensource.org/licenses/MIT
*/
var ValueObject_1 = require("../base/ValueObject");
// https://docs.peppol.eu/poacc/billing/3.0/2024-Q2/codelist/UNCL1001-inv/
var DocumentType = /** @class */ (function (_super) {
tslib_1.__extends(DocumentType, _super);
function DocumentType() {
return _super !== null && _super.apply(this, arguments) || this;
}
DocumentType.create = function (type) {
return new DocumentType({
type: Number(type)
});
};
DocumentType.prototype.toPrimitive = function () {
return this.props.type;
};
return DocumentType;
}(ValueObject_1.ValueObject));
exports.default = DocumentType;
//# sourceMappingURL=DocumentType.js.map