From 238642c949fc02a9b2adb59d97a4979d0b2e52f9 Mon Sep 17 00:00:00 2001 From: Dave Date: Fri, 4 Sep 2026 13:35:49 +0200 Subject: [PATCH] feat(pos): delivery note pricing checkbox defaults from the letterhead's saved setting --- public/pos/receipt.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/pos/receipt.html b/public/pos/receipt.html index 317b718..b286228 100644 --- a/public/pos/receipt.html +++ b/public/pos/receipt.html @@ -467,9 +467,11 @@ function renderDeliveryNote(s){ const date = new Date(s.createdAt); const dateStr = date.toLocaleDateString('en-ZA',{day:'2-digit',month:'short',year:'numeric'}); // Some customers must not see prices on the slip the driver carries; - // others want them. Default to showing, toggle re-renders in place. + // others want them. Defaults from the letterhead's saved setting + // (Settings → Edit slip layout); the checkbox is a per-print override. const toggle = document.getElementById('dnShowPrices'); - const showPrices = toggle ? !!toggle.checked : true; + const letterheadIdDn = s.letterhead && s.letterhead.id; + const showPrices = toggle ? !!toggle.checked : window.PosSlipLayout.getShowPricingForPrint(letterheadIdDn); const lines = s.items.map(it=>{ const price = showPrices ? `
${fmt((it.selling_price||0)*it.qty)}
` : ''; return `