This commit is contained in:
seb
2026-10-17 21:37:36 +02:00
parent 5e9b168e0d
commit 856692b66c

View File

@@ -55,7 +55,7 @@ async function resolveThumbPng(store, googleAuthId, picHash, smallthumbbinary) {
if (smallthumbbinary) { if (smallthumbbinary) {
try { try {
return await sharp(smallthumbbinary).png().toBuffer(); return await sharp(smallthumbbinary).png().toBuffer();
} catch (_) {} } catch (_) { }
} }
if (picHash) { if (picHash) {
try { try {
@@ -63,7 +63,7 @@ async function resolveThumbPng(store, googleAuthId, picHash, smallthumbbinary) {
if (thumb?.buffer) { if (thumb?.buffer) {
return await sharp(thumb.buffer).png().toBuffer(); return await sharp(thumb.buffer).png().toBuffer();
} }
} catch (_) {} } catch (_) { }
} }
return null; return null;
} }
@@ -130,7 +130,7 @@ const TYPE_CONFIG = {
numberPrefix: 'Auftrags-Nr.', numberPrefix: 'Auftrags-Nr.',
showPrices: true, showPrices: true,
filenamePrefix: 'auftrag', filenamePrefix: 'auftrag',
introText: 'Wir bestätigen dankend die Annahme Ihres Auftrags zu folgenden Positionen:', introText: '',
closingText: 'Vielen Dank für Ihren Auftrag!', closingText: 'Vielen Dank für Ihren Auftrag!',
defaultSubject: 'Auftragsbestätigung', defaultSubject: 'Auftragsbestätigung',
}, },
@@ -140,7 +140,7 @@ const TYPE_CONFIG = {
showPrices: false, showPrices: false,
filenamePrefix: 'lieferschein', filenamePrefix: 'lieferschein',
introText: 'Mit dieser Sendung liefern wir Ihnen folgende Artikel:', introText: 'Mit dieser Sendung liefern wir Ihnen folgende Artikel:',
closingText: 'Die Ware bleibt bis zur vollständigen Bezahlung unser Eigentum. Bitte prüfen Sie die Sendung sofort auf Vollständigkeit und eventuelle Transportschäden.', closingText: '',
defaultSubject: 'Lieferschein', defaultSubject: 'Lieferschein',
}, },
delivery: { delivery: {
@@ -148,7 +148,7 @@ const TYPE_CONFIG = {
numberPrefix: 'Beleg-Nr.', numberPrefix: 'Beleg-Nr.',
showPrices: false, showPrices: false,
filenamePrefix: 'wareneingang', filenamePrefix: 'wareneingang',
introText: 'Wareneingangsdokumentation zu folgenden Positionen:', introText: '',
closingText: '', closingText: '',
defaultSubject: 'Wareneingang', defaultSubject: 'Wareneingang',
}, },
@@ -435,7 +435,7 @@ export function generateManifestPdf({
.fillColor('#ffffff'); .fillColor('#ffffff');
if (isDelivery) { if (isDelivery) {
doc.text('Pos', colDeliv.pos, atY + 6, { width: colDeliv.posW, align: 'center' }); doc.text('Pos', colDeliv.pos, atY + 6, { width: colDeliv.posW, align: 'center' });
doc.text('Bild', colDeliv.thumb, atY + 6, { width: colDeliv.thumbW, align: 'center' }); doc.text('Bild', colDeliv.thumb, atY + 6, { width: colDeliv.thumbW, align: 'center' });
doc.text('Lief.-SKU', colDeliv.suppSku, atY + 6, { width: colDeliv.suppSkuW }); doc.text('Lief.-SKU', colDeliv.suppSku, atY + 6, { width: colDeliv.suppSkuW });
@@ -600,7 +600,7 @@ export function generateManifestPdf({
if (line.ownSkuBarcode) { if (line.ownSkuBarcode) {
try { try {
doc.image(line.ownSkuBarcode, colDeliv.ownSku, y + 12, { width: 88, height: 20 }); doc.image(line.ownSkuBarcode, colDeliv.ownSku, y + 12, { width: 88, height: 20 });
} catch (_) {} } catch (_) { }
} }
// 6. EAN as barcode // 6. EAN as barcode
@@ -610,7 +610,7 @@ export function generateManifestPdf({
if (line.eanBarcode) { if (line.eanBarcode) {
try { try {
doc.image(line.eanBarcode, colDeliv.ean, y + 12, { width: 76, height: 20 }); doc.image(line.eanBarcode, colDeliv.ean, y + 12, { width: 76, height: 20 });
} catch (_) {} } catch (_) { }
} }
} else { } else {
doc.font('Helvetica').fontSize(8).fillColor(mutedColor) doc.font('Helvetica').fontSize(8).fillColor(mutedColor)