Package org.mustangproject
Class CalculatedInvoice
- java.lang.Object
-
- org.mustangproject.Invoice
-
- org.mustangproject.CalculatedInvoice
-
- All Implemented Interfaces:
java.io.Serializable,IExportableTransaction
public class CalculatedInvoice extends Invoice implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.math.BigDecimalduePayableprotected java.math.BigDecimalgrandTotalprotected java.math.BigDecimallineTotalAmountprotected java.math.BigDecimaltaxBasisprotected TransactionCalculatortc-
Fields inherited from class org.mustangproject.Invoice
Allowances, buyerOrderReferencedDocumentID, buyerOrderReferencedDocumentIssueDateTime, cashDiscounts, Charges, contractReferencedDocument, creditorReferenceID, currency, deliveryAddress, deliveryDate, despatchAdviceReferencedDocumentID, detailedDeliveryDateStart, detailedDeliveryPeriodEnd, documentCode, documentName, dueDate, invoiceReferencedDocumentID, invoiceReferencedDocuments, invoiceReferencedIssueDate, issueDate, LogisticsServiceCharges, notes, number, ownForeignOrganisationID, ownOrganisationFullPlaintextInfo, ownOrganisationName, payee, paymentTermDescription, paymentTerms, recipient, referenceNumber, sellerOrderReferencedDocumentID, sender, shipToCountry, shipToLocation, shipToOrganisationID, shipToOrganisationName, shipToStreet, shipToZIP, specifiedProcuringProjectID, specifiedProcuringProjectName, tenderReference, totalPrepaidAmount, vatDueDateTypeCode, xmlEmbeddedFiles, ZFItems
-
-
Constructor Summary
Constructors Constructor Description CalculatedInvoice()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalculate()TransactionCalculatorgetCalculation()this can be used to additionally e.g. access the VAT amountsjava.math.BigDecimalgetDuePayable()java.math.BigDecimalgetGrandTotal()java.math.BigDecimalgetLineTotalAmount()java.math.BigDecimalgetTaxBasis()CalculatedInvoicesetDuePayable(java.math.BigDecimal due)usually one would use calculate, use only if the invoice is parsedCalculatedInvoicesetGrandTotal(java.math.BigDecimal grand)usually one would use calculate, use only if the invoice is parsedCalculatedInvoicesetLineTotalAmount(java.math.BigDecimal total)usually one would use calculate, use only if the invoice is parsedCalculatedInvoicesetTaxBasis(java.math.BigDecimal basis)usually one would use calculate, use only if the invoice is parsed-
Methods inherited from class org.mustangproject.Invoice
addAllowance, addCashDiscount, addCharge, addCustomsNote, addDiscountBonusNote, addGeneralNote, addIntroductionNote, addInvoiceReferencedDocument, addItem, addLegalNote, addNote, addNotes, addPaymentTerms, addRegulatoryNote, addSellerNote, addTaxNote, embedFileInXML, getAdditionalReferencedDocuments, getBuyerOrderReferencedDocumentID, getBuyerOrderReferencedDocumentIssueDateTime, getCashDiscounts, getContractReferencedDocument, getCreditorReferenceID, getCurrency, getDeliveryAddress, getDeliveryDate, getDespatchAdviceReferencedDocumentID, getDetailedDeliveryPeriodFrom, getDetailedDeliveryPeriodTo, getDocumentCode, getDocumentName, getDueDate, getExtendedPaymentTerms, getInvoiceReferencedDocumentID, getInvoiceReferencedDocuments, getInvoiceReferencedIssueDate, getIssueDate, getNotes, getNotesWithSubjectCode, getNumber, getOwnCountry, getOwnForeignOrganisationID, getOwnLocation, getOwnOrganisationFullPlaintextInfo, getOwnOrganisationName, getOwnStreet, getOwnTaxID, getOwnVATID, getOwnZIP, getPayee, getPaymentReference, getPaymentTermDescription, getPaymentTerms, getRecipient, getReferenceNumber, getRoundingAmount, getSellerOrderReferencedDocumentID, getSender, getShipToCountry, getShipToLocation, getShipToOrganisationID, getShipToOrganisationName, getShipToStreet, getShipToZIP, getSpecifiedProcuringProjectID, getSpecifiedProcuringProjectName, getTenderReferencedDocument, getTotalPrepaidAmount, getTradeSettlement, getVATDueDateTypeCode, getZFAllowances, getZFCharges, getZFItems, getZFLogisticsServiceCharges, isValid, setAdditionalReferencedDocuments, setBuyerOrderReferencedDocumentID, setBuyerOrderReferencedDocumentIssueDateTime, setContractReferencedDocument, setCorrection, setCreditNote, setCreditorReferenceID, setCurrency, setDeliveryAddress, setDeliveryDate, setDespatchAdviceReferencedDocumentID, setDetailedDeliveryPeriod, setDetailedDeliveryPeriodFrom, setDetailedDeliveryPeriodTo, setDocumentCode, setDocumentName, setDueDate, setExtendedPaymentTerms, setInvoiceReferencedDocumentID, setInvoiceReferencedDocuments, setInvoiceReferencedIssueDate, setIssueDate, setNotesWithSubjectCode, setNumber, setOwnContact, setOwnForeignOrganisationID, setOwnOrganisationFullPlaintextInfo, setOwnOrganisationName, setOwnTaxID, setOwnVATID, setPayee, setPaymentReference, setPaymentTermDescription, setPaymentTerms, setRecipient, setReferenceNumber, setRoundingAmount, setSellerOrderReferencedDocumentID, setSender, setShipToCountry, setShipToLocation, setShipToOrganisationID, setShipToOrganisationName, setShipToStreet, setShipToZIP, setSpecifiedProcuringProjectID, setSpecifiedProcuringProjectName, setTenderReferencedDocument, setTenderReferencedDocument, setTotalPrepaidAmount, setVATDueDateTypeCode, setZFAllowances, setZFCharges, setZFItems
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mustangproject.ZUGFeRD.IExportableTransaction
getSubjectNote, getTradeSettlementPayment, rebateAgreementExists
-
-
-
-
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
-
tc
protected TransactionCalculator tc
-
-
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
-
-