(self)
return sum([line_item.total for line_item in self.lineitem_set.all()])
This will be inserted in the subtotal field on the printed invoice.
This will be inserted in the subtotal field on the printed invoice.
This will be inserted in the subtotal field on the printed invoice .
def subtotal(self):
        """
        This will be inserted in the subtotal field on the printed invoice.
        """
        if self.lineitem_set.count() == 0:
            return Decimal('0.0000')
        return sum([line_item.total for line_item in self.lineitem_set.all()])
def subtotal ( self ) : if self . lineitem_set . count ( ) == 0 : return Decimal ( '0.0000' ) return sum ( [ line_item . total for line_item in self . lineitem_set . all ( ) ] )