Update IWT fee calculation
This commit is contained in:
parent
6df1fe78a4
commit
005d1980ae
@ -100,8 +100,8 @@ class BudgetRevision(models.Model):
|
|||||||
total = Decimal(0)
|
total = Decimal(0)
|
||||||
for item in self.revenue:
|
for item in self.revenue:
|
||||||
total += Decimal(item['Unit price']) * item['Units']
|
total += Decimal(item['Unit price']) * item['Units']
|
||||||
if item['IWT']:
|
if item['IWT'] and item['Unit price'] > 0:
|
||||||
total -= (Decimal(item['Unit price']) - (Decimal(item['Unit price']) - Decimal('0.8')) / Decimal('1.019')) * item['Units']
|
total -= (Decimal(item['Unit price']) - (Decimal(item['Unit price']) - Decimal('0.8133')) / Decimal('1.01884')) * item['Units']
|
||||||
return total
|
return total
|
||||||
|
|
||||||
def get_expense_total(self):
|
def get_expense_total(self):
|
||||||
|
@ -24,7 +24,7 @@ function recalcRevTotal(args) {
|
|||||||
for (var row of args.grid.data) {
|
for (var row of args.grid.data) {
|
||||||
total += row['Unit price'] * row['Units'];
|
total += row['Unit price'] * row['Units'];
|
||||||
if (row['Unit price'] > 0 && row['IWT']) {
|
if (row['Unit price'] > 0 && row['IWT']) {
|
||||||
totalIWT += (row['Unit price'] - (row['Unit price'] - 0.8) / 1.019) * row['Units'];
|
totalIWT += (row['Unit price'] - (row['Unit price'] - 0.8133) / 1.01884) * row['Units'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user