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

24 lines
460 B
JavaScript

Hedera.DeliveryNote = new Class
({
Extends: Hedera.Report
,subtotalRenderer: function (column, form)
{
column.value = this.subtotal (form);
}
,subtotal: function (form)
{
var price = form.get ('price');
var discount = form.get ('discount');
return form.get ('quantity') * price * ((100 - discount) / 100);
}
,onPackagesChanged: function (model)
{
this.$('packages').node.style.display =
model.numRows > 0 ? 'block' : 'none';
}
});