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');
|
2018-01-02 13:16:41 +00:00
|
|
|
return form.get ('quantity') * price * ((100 - discount) / 100);
|
2015-11-19 13:57:23 +00:00
|
|
|
}
|
2018-01-05 12:57:35 +00:00
|
|
|
|
|
|
|
,onPackagesChanged: function (model)
|
|
|
|
{
|
|
|
|
this.$('packages').node.style.display =
|
|
|
|
model.numRows > 0 ? 'block' : 'none';
|
|
|
|
}
|
2015-11-19 13:57:23 +00:00
|
|
|
});
|