Acquisition : Fixing
neworderempty : problems with data updates booksellers.tmpl : TMPL_VAR not in comments list_price becomes listprice in neworderempty script as in acq.js
This commit is contained in:
parent
1ec6e3df73
commit
b22bde5263
4 changed files with 9 additions and 9 deletions
|
@ -351,7 +351,7 @@ $template->param(
|
|||
quantity => $data->{'quantity'},
|
||||
quantityrec => $data->{'quantity'},
|
||||
rrp => $data->{'rrp'},
|
||||
list_price => sprintf("%.2f", $data->{'listprice'}||$listprice),
|
||||
listprice => sprintf("%.2f", $data->{'listprice'}||$listprice),
|
||||
total => sprintf("%.2f", $data->{'ecost'}*$data->{'quantity'} ),
|
||||
ecost => $data->{'ecost'},
|
||||
notes => $data->{'notes'},
|
||||
|
|
|
@ -740,13 +740,13 @@ function calcNeworderTotal(){
|
|||
var listinc = new Number (f.listinc.value);
|
||||
var currency = f.currency.value;
|
||||
var applygst = new Number (f.applygst.value);
|
||||
var list_price = new Number(f.list_price.value);
|
||||
var list_price = new Number(f.listprice.value);
|
||||
var invoiceingst = new Number (f.invoiceincgst.value);
|
||||
var exchangerate = new Number(f.elements[currency].value); //get exchange rate
|
||||
var gst_on=(!listinc && invoiceingst);
|
||||
|
||||
//do real stuff
|
||||
var rrp = new Number(list_price*exchangerate);
|
||||
var rrp = new Number(listprice*exchangerate);
|
||||
var ecost = new Number(rrp * (100 - discount ) / 100);
|
||||
var GST = new Number(0);
|
||||
if (gst_on) {
|
||||
|
@ -763,7 +763,7 @@ function calcNeworderTotal(){
|
|||
|
||||
f.ecost.value = ecost.toFixed(2);
|
||||
f.total.value = total.toFixed(2);
|
||||
f.list_price.value = list_price.toFixed(2);
|
||||
f.listprice.value = list_price.toFixed(2);
|
||||
|
||||
// gst-stuff needs verifing, mason.
|
||||
if (f.GST) {
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
<!--/TMPL_IF-->
|
||||
<td><!-- TMPL_VAR NAME="basketno" --></td>
|
||||
<td><!-- TMPL_VAR NAME="basketname" --></td>
|
||||
<td><TMPL_VAR NAME="total"></td>
|
||||
<td><!--TMPL_VAR NAME="total"--></td>
|
||||
<td> <!-- TMPL_VAR name="firstname" -->
|
||||
<!-- TMPL_VAR name="surname" -->
|
||||
</td>
|
||||
|
|
|
@ -24,7 +24,7 @@ function Check(ff) {
|
|||
_alertString += "\n- " + _("Quanity must be greater than '0'");
|
||||
}
|
||||
|
||||
if (!(isNum(ff.list_price,0))){
|
||||
if (!(isNum(ff.listprice,0))){
|
||||
ok=1;
|
||||
_alertString += "\n- " + _("Vendor price must be a number");
|
||||
}
|
||||
|
@ -258,10 +258,10 @@ ff.submit();
|
|||
<li>
|
||||
<!-- TMPL_IF name="close" -->
|
||||
<span class="label">Vendor price: </span>
|
||||
<input type="hidden" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="list_price" -->" /><!-- TMPL_VAR NAME="list_price" -->
|
||||
<input type="hidden" size="20" name="listprice" id="listprice" value="<!-- TMPL_VAR NAME="listprice" -->" /><!-- TMPL_VAR NAME="listprice" -->
|
||||
<!-- TMPL_ELSE -->
|
||||
<label for="list_price">Vendor price: </label>
|
||||
<input type="text" size="20" name="list_price" id="list_price" value="<!-- TMPL_VAR NAME="list_price" -->" onchange="calcNeworderTotal()" /> (entered as <!-- TMPL_VAR NAME="currency" -->)
|
||||
<label for="listprice">Vendor price: </label>
|
||||
<input type="text" size="20" name="listprice" id="listprice" value="<!-- TMPL_VAR NAME="listprice" -->" onchange="calcNeworderTotal()" /> (entered as <!-- TMPL_VAR NAME="currency" -->)
|
||||
|
||||
<!--/TMPL_IF-->
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue