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'},
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) {
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) {
<!--/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>
_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");
}
<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>