Beispiel #1
0
 def total(self):
     total = self.subtotal + self.vat  # subtotal with vat
     total *= (
         (100 - Decimal(self.discount)) / 100)  # subtract discount amount
     total -= self.credit  # subtract credit
     #total -= self.already_paid  # subtract already paid
     return round_to_two_places(total)
Beispiel #2
0
 def total(self):
     return round_to_two_places(self.subtotal + self.vat)
Beispiel #3
0
 def unit_price_with_vat(self):
     tax_rate = self.tax_rate if self.tax_rate else 0
     return round_to_two_places(
         Decimal(self.unit_price) * Decimal((100 + tax_rate) / 100))
Beispiel #4
0
 def vat(self):
     return round_to_two_places(self.subtotal * self.tax_rate /
                                100 if self.tax_rate else 0)
Beispiel #5
0
 def subtotal(self):
     return round_to_two_places(self.unit_price * self.quantity)
Beispiel #6
0
 def vat(self):
     vat = 0
     for item in self.invoiceitem_set.all():
         vat += item.vat
     return round_to_two_places(vat)
Beispiel #7
0
 def discount_value(self):
     total = self.subtotal + self.vat  # subtotal with vat
     discount_value = total * (Decimal(self.discount) / 100
                               )  # subtract discount amount
     return round_to_two_places(discount_value)
Beispiel #8
0
 def total(self):
     return round_to_two_places(self.subtotal + self.vat)
Beispiel #9
0
 def subtotal(self):
     sum = 0
     for item in self.invoiceitem_set.all():
         sum += item.subtotal
     return round_to_two_places(sum)
Beispiel #10
0
 def vat(self):
     return round_to_two_places(self.subtotal * self.tax_rate / 100 if self.tax_rate else 0)
Beispiel #11
0
 def unit_price_with_vat(self):
     tax_rate = self.tax_rate if self.tax_rate else 0
     return round_to_two_places(Decimal(self.unit_price) * Decimal((100 + tax_rate) / 100))
Beispiel #12
0
 def subtotal(self):
     return round_to_two_places(self.unit_price * self.quantity)
Beispiel #13
0
 def total(self):
     total = self.subtotal + self.vat  # subtotal with vat
     total *= ((100 - Decimal(self.discount)) / 100)  # subtract discount amount
     total -= self.credit  # subtract credit
     #total -= self.already_paid  # subtract already paid
     return round_to_two_places(total)
Beispiel #14
0
 def discount_value(self):
     total = self.subtotal + self.vat  # subtotal with vat
     discount_value = total * (Decimal(self.discount) / 100)  # subtract discount amount
     return round_to_two_places(discount_value)
Beispiel #15
0
 def vat(self):
     vat = 0
     for item in self.invoiceitem_set.all():
         vat += item.vat
     return round_to_two_places(vat)
Beispiel #16
0
 def subtotal(self):
     sum = 0
     for item in self.invoiceitem_set.all():
         sum += item.subtotal
     return round_to_two_places(sum)