public class Invoice extends DefaultDatabaseEntity implements DatabaseEntity
Invoice
class represents the invoice information such as
the customer and supplier related information as well as information
related to billable items.Modifier and Type | Class and Description |
---|---|
static class |
Invoice.COLUMNS |
Constructor and Description |
---|
Invoice() |
createInsertSql, getConnection, insert
public String createCompositeKey()
public static void deleteByInvoiceNumber(String invoiceNumber) throws SQLException
SQLException
public static Invoice findLatestInvoice() throws SQLException
SQLException
public static Invoice findByInvoiceNumber(String invoiceNumber) throws SQLException
SQLException
public static List<Invoice> findByCustomerId(String customerId) throws SQLException
SQLException
public long persistToDatabase() throws SQLException
persistToDatabase
in interface DatabaseEntity
SQLException
public String prepareInsertStatement()
prepareInsertStatement
in class DefaultDatabaseEntity
public void calculateTotals()
public void calculateDueDate()
public void incrementInvoiceNumberByOne()
public void incrementIssueDateByOneMonth()
public void incrementDueDateByPaymentTermNetDays()
public void reQuantifyItems(int quantity)
public LocalDate getIssueDate()
public String getInvoiceNumber()
public org.joda.money.CurrencyUnit getCurrencyCode()
public org.joda.money.Money getTaxAmount()
public org.joda.money.Money getSubtotalAmount()
public org.joda.money.Money getTotalAmount()
public Party getSupplier()
public Party getCustomer()
public PaymentTerm getPaymentTerm()
public BankAccount getPayeeBankAccount()
public void setInvoiceId(long invoiceId)
public void setSupplierId(long supplierId)
public void setCustomerId(long customerId)
public void setPayeeBankAccountId(long payeeBankAccountId)
public void setPaymentTermId(long paymentTermId)
public void setIssueDate(LocalDate issueDate)
public void setInvoiceNumber(String invoiceNumber)
public void setCurrencyCode(org.joda.money.CurrencyUnit currencyCode)
public void setOrderIdentifier(String orderIdentifier)
public void setSupplier(Party supplier)
public void setCustomer(Party customer)
public void setPaymentTerm(PaymentTerm paymentTerm)
public void setPayeeBankAccount(BankAccount payeeBankAccount)
public void setTaxAmount(org.joda.money.Money taxAmount)
public void setSubtotalAmount(org.joda.money.Money subtotalAmount)
public void setTotalAmount(org.joda.money.Money totalAmount)
public LocalDate getDueDate()
public void setDueDate(LocalDate dueDate)
Copyright © 2011–2019 Plain Source. All rights reserved.