Class CalculatedInvoice

    • Field Detail

      • lineTotalAmount

        protected java.math.BigDecimal lineTotalAmount
      • duePayable

        protected java.math.BigDecimal duePayable
      • grandTotal

        protected java.math.BigDecimal grandTotal
      • taxBasis

        protected java.math.BigDecimal taxBasis
    • Constructor Detail

      • CalculatedInvoice

        public CalculatedInvoice()
    • Method Detail

      • calculate

        public void calculate()
      • getGrandTotal

        public java.math.BigDecimal getGrandTotal()
      • setGrandTotal

        public CalculatedInvoice setGrandTotal​(java.math.BigDecimal grand)
        usually one would use calculate, use only if the invoice is parsed
        Parameters:
        grand - the gross total
        Returns:
        fluent setter
      • getTaxBasis

        public java.math.BigDecimal getTaxBasis()
      • setTaxBasis

        public CalculatedInvoice setTaxBasis​(java.math.BigDecimal basis)
        usually one would use calculate, use only if the invoice is parsed
        Parameters:
        basis - taxable net total
        Returns:
        fluent setter
      • getDuePayable

        public java.math.BigDecimal getDuePayable()
      • setDuePayable

        public CalculatedInvoice setDuePayable​(java.math.BigDecimal due)
        usually one would use calculate, use only if the invoice is parsed
        Parameters:
        due - the gross total minus prepaid
        Returns:
        fluent setter
      • getLineTotalAmount

        public java.math.BigDecimal getLineTotalAmount()
      • setLineTotalAmount

        public CalculatedInvoice setLineTotalAmount​(java.math.BigDecimal total)
        usually one would use calculate, use only if the invoice is parsed
        Parameters:
        total - the net total
        Returns:
        fluent setter
      • getCalculation

        public TransactionCalculator getCalculation()
        this can be used to additionally e.g. access the VAT amounts
        Returns:
        a updated transactioncalulator