feat(pos): delivery note pricing checkbox defaults from the letterhead's saved setting
This commit is contained in:
parent
f07d70b976
commit
238642c949
1 changed files with 4 additions and 2 deletions
|
|
@ -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 ? `<div class="pr">${fmt((it.selling_price||0)*it.qty)}</div>` : '';
|
||||
return `<div class="dn-line">
|
||||
|
|
|
|||
Loading…
Reference in a new issue