0
1
Fork 0
hedera-web-mindshore/reports/delivery-note/delivery-note.js

22 lines
390 B
JavaScript
Raw Normal View History

2015-11-19 13:57:23 +00:00
2016-09-26 09:28:47 +00:00
Hedera.DeliveryNote = new Class
2015-11-19 13:57:23 +00:00
({
2016-09-26 09:28:47 +00:00
Extends: Hedera.Report
2015-11-19 13:57:23 +00:00
,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;
}
});