View | Details | Raw Unified | Return to bug 2865
Collapse All | Expand All

(-)a/acqui/parcel.pl (-2 / +2 lines)
Lines 315-322 $template->param( Link Here
315
    totalquantity         => $totalquantity,
315
    totalquantity         => $totalquantity,
316
    tototal               => sprintf($cfstr, $tototal),
316
    tototal               => sprintf($cfstr, $tototal),
317
    ordergrandtotal       => sprintf($cfstr, $ordergrandtotal),
317
    ordergrandtotal       => sprintf($cfstr, $ordergrandtotal),
318
    gst                   => $gst,
318
    gst                   => sprintf($cfstr, $gst),
319
    grandtot              => sprintf($cfstr, $tototal + $gst),
319
    grandtot              => sprintf($cfstr, $tototal * (1+$gst)),
320
    totalPunitprice       => sprintf("%.2f", $totalPunitprice),
320
    totalPunitprice       => sprintf("%.2f", $totalPunitprice),
321
    totalPquantity        => $totalPquantity,
321
    totalPquantity        => $totalPquantity,
322
    totalPqtyrcvd         => $totalPqtyrcvd,
322
    totalPqtyrcvd         => $totalPqtyrcvd,
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/acq.js (-6 / +7 lines)
Lines 660-674 function calcNeworderTotal(){ Link Here
660
        var currcode = new String(document.getElementById('currency').value);
660
        var currcode = new String(document.getElementById('currency').value);
661
	var exchangerate =  new Number(document.getElementById(currcode).value);
661
	var exchangerate =  new Number(document.getElementById(currcode).value);
662
662
663
    var gst_on=(!listinc && invoiceingst);
664
665
    //do real stuff
663
    //do real stuff
666
    var rrp   = new Number(listprice*exchangerate);
664
    var rrp   = new Number(listprice*exchangerate);
667
    var ecost = new Number(Math.floor(rrp * (100 - discount ))/100);
665
    var ecost = new Number(Math.floor(rrp * (100 - discount ))/100);
668
    var GST   = new Number(0);
666
    var GST   = new Number(0);
669
    if (gst_on) {
667
670
            rrp=rrp * (1+f.gstrate.value / 100);
668
    rrp *= (100-discount) / 100;
671
        GST=ecost * f.gstrate.value / 100;
669
    if (listinc==0){
670
        rrp *= 1 + new Number(f.gstrate.value);
671
        if(invoiceingst!=0) {
672
            GST=ecost * f.gstrate.value / 100;
673
        }
672
    }
674
    }
673
675
674
    var total =  new Number( (ecost + GST) * quantity);
676
    var total =  new Number( (ecost + GST) * quantity);
675
- 

Return to bug 2865