forked from verdnatura/hedera-web
22 lines
382 B
JavaScript
22 lines
382 B
JavaScript
|
|
Vn.DeliveryNote = new Class
|
|
({
|
|
Extends: Vn.Report
|
|
|
|
,subtotalRenderer: function (column, form)
|
|
{
|
|
column.value = this.subtotal (form);
|
|
}
|
|
|
|
,subtotal: function (form)
|
|
{
|
|
var price = form.get ('price');
|
|
var discount = form.get ('discount');
|
|
|
|
if (price && form.get ('fixed'))
|
|
return form.get ('amount') * price * ((100 - discount) / 100);
|
|
else
|
|
return null;
|
|
}
|
|
});
|