@casoon/invoice-generator
Version:
Generate PDF invoices, XRechnung XML, and ZUGFeRD PDF/A-3 from JSON data with TypeScript support
31 lines • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClosingSection = void 0;
class ClosingSection {
constructor(doc, currentY) {
this.doc = doc;
this.currentY = currentY;
}
/**
* Bereich 4: Grußformel
* DIN 5008: Mindestens 20mm Abstand zur Tabelle
*/
draw(invoice) {
// Zahlungsinformationen im korrekten Format
const paymentText = `Zahlbar ohne Abzug bis zum ${invoice.paymentInfo.dueDate}.`;
this.doc.font('Helvetica')
.fontSize(10)
.text(paymentText, 50, this.currentY, { continued: false });
this.currentY += 30;
// Grußformel
this.doc.font('Helvetica')
.fontSize(10)
.text('Mit freundlichen Grüßen', 50, this.currentY, { continued: false });
this.currentY += 15;
this.doc.text(invoice.sender.name, 50, this.currentY, { continued: false });
this.currentY += 40;
return this.currentY;
}
}
exports.ClosingSection = ClosingSection;
//# sourceMappingURL=closing-section.js.map