1
|
var store = Ext.StoreMgr.lookup("storePTRSALESITEMS");
|
2
|
var idx = store.getCount() - 1;
|
3
|
var discountPercentage = val.value;
|
4
|
var priceAmount = store.getAt(idx).get('PriceAmount');
|
5
|
var quantityTransaction = store.getAt(idx).get('QuantityTransaction');
|
6
|
var discount = priceAmount * quantityTransaction * discountPercentage / 100;
|
7
|
store.getAt(idx).set('Discount', discount);
|
8
|
var netAmount = (quantityTransaction * priceAmount) - discount;
|
9
|
if (store.getAt(idx).get('TaxType') == '1') {
|
10
|
var totAmount = netAmount;
|
11
|
store.getAt(idx).set('TotAmount', totAmount);
|
12
|
}
|
13
|
store.getAt(idx).set('NetAmount', netAmount);
|
14
|
|
15
|
|
16
|
var store = Ext.StoreMgr.lookup("storePTRSALESITEMS");
|
17
|
var idx = store.getCount() - 1;
|
18
|
var priceAmount = val.value;
|
19
|
var discountPercentage = store.getAt(idx).get('DiscountPercentage');
|
20
|
var quantityTransaction = store.getAt(idx).get('QuantityTransaction');
|
21
|
var discount = priceAmount * quantityTransaction * discountPercentage / 100;
|
22
|
var netAmount = (quantityTransaction * priceAmount) - discount;
|
23
|
if (store.getAt(idx).get('TaxType') == '1') {
|
24
|
var totAmount = netAmount;
|
25
|
store.getAt(idx).set('TotAmount', totAmount);
|
26
|
}
|
27
|
store.getAt(idx).set('Discount', discount);
|
28
|
store.getAt(idx).set('NetAmount', netAmount);
|
29
|
|
30
|
|
31
|
var store = Ext.StoreMgr.lookup("storePTRSALESITEMS"); var idx = store.getCount() - 1; var quantityTransaction = val.value; var priceAmount = store.getAt(idx).get('PriceAmount'); var discountPercentage = store.getAt(idx).get('DiscountPercentage'); var discount = priceAmount * quantityTransaction * discountPercentage / 100; var netAmount = (quantityTransaction * priceAmount) - discount; if (store.getAt(idx).get('TaxType') == '1') { var totAmount = netAmount; store.getAt(idx).set('TotAmount', totAmount); } store.getAt(idx).set('Discount', discount); store.getAt(idx).set('NetAmount', netAmount);
|