Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion assets/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2910,7 +2910,11 @@ function discSuffix(mode,gst){
then wraps as "% on MRP" / "+ 18% GST" rather than leaving the "+" dangling
at the end of the first line. */
var base='%\u00A0on\u00A0MRP';
return (mode==='excl') ? base+' +\u00A0'+gst+'%\u00A0GST' : base;
// Nett Discount takes the price straight off MRP incl GST and lands on the
// incl-GST price, so there is no GST clause to add — say which basis it is
// rather than leaving the reader to work it out from the absence of one.
return (mode==='excl') ? base+' +\u00A0'+gst+'%\u00A0GST'
: base+' (incl\u00A0GST)';
}
/* ── Dynamic GST label updater ── */
function updateGSTLabels(){
Expand Down
2 changes: 0 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ <h1 class="header-brand">Price Calc</h1>

<!-- INCENTIVE PANELS — side by side on desktop, stacked on a phone -->
<div class="inc-pair">
<!-- INCENTIVES PANEL -->
<!-- INCENTIVES PANEL -->
<div class="panel panel-amber" id="sec-inc">
<div class="panel-header">
Expand Down Expand Up @@ -436,7 +435,6 @@ <h2 class="panel-title" id="ttl-sp-inc">Incentives on SP</h2>
</div>
</div>
<div class="panel-body" id="body-sp-inc">
<p style="font-size:11.5px;color:var(--text2);margin-bottom:10px;line-height:1.5">Optional discounts to customer that reduce effective selling price. Profit = Eff. SP − Eff. CP.</p>
<div class="inc-grid" id="sp-inc-grid"></div>
<button class="inc-add-btn" id="sp-inc-add-btn" data-click="a60">+ Add incentive</button>
<div class="inc-footer">
Expand Down
12 changes: 7 additions & 5 deletions tests/features.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3141,15 +3141,17 @@ ok('the rate in the suffix follows the GST setting',
sufOf('cpd-suf') === '% on MRP + 5% GST', sufOf('cpd-suf'));
w.setGST(18);

// Nett Discount takes the price straight off MRP incl GST, so there is no
// separate GST to add — but it is still a percentage on MRP.
// Nett Discount takes the price straight off MRP incl GST and lands on the
// incl-GST price, so there is no GST clause to add — it names the basis instead
// of leaving it to be inferred from the absence of one.
w.setCM('incl');
ok('Nett Discount drops the GST part but keeps the base',
sufOf('cpd-suf') === '% on MRP', sufOf('cpd-suf'));
ok('Nett Discount names the basis instead of adding GST',
sufOf('cpd-suf') === '% on MRP (incl GST)', sufOf('cpd-suf'));
ok('and the other card is unaffected',
sufOf('spd-suf') === '% on MRP + 18% GST', sufOf('spd-suf'));
w.setSM('incl');
ok('until it is switched too', sufOf('spd-suf') === '% on MRP');
ok('until it is switched too', sufOf('spd-suf') === '% on MRP (incl GST)',
sufOf('spd-suf'));
w.setCM('excl'); w.setSM('excl');

ok('the wizard field says the same',
Expand Down
Loading