Acknowledges a payment made against an invoice, naming who paid, who was paid, how much was paid and what the invoice came to. The customer and vendor are both base entities, so either side can be a profile or an organisation. The invoice relationship is optional and the invoice number is kept as its own text field, so a receipt can still name the invoice it settles even where the invoice record itself is not linked.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| amount | BigDecimal | How much was actually paid in this transaction, which can be less than the invoice total for a part payment. Never null. |
| customer | BaseEntity | Who made the payment. A base entity, so it can be either a profile or an organisation. Never null. |
| id | long | The database identifier of this receipt. |
| invoice | Invoice | The invoice this receipt settles. Optional, so it can be null even where the invoice number field is filled in. |
| invoiceNumber | String | The number of the invoice being paid, kept as text on the receipt itself so it survives independently of the invoice relationship. May be null. |
| total | BigDecimal | The full amount owing on the invoice, against which the paid amount is set. Never null. |
| vendor | BaseEntity | Who received the payment. A base entity, so it can be either a profile or an organisation. Never null. |
Methods
getId() · setOrganisation(Organisation organisation) · getInvoice() · setInvoice(Invoice invoice) · getAmount() · setAmount(BigDecimal amount) · getTotal() · setTotal(BigDecimal total) · getInvoiceNumber() · setInvoiceNumber(String invoiceNumber) · getCustomer() · setCustomer(BaseEntity customer) · getVendor() · setVendor(BaseEntity vendor)
getId()
Returns: long
The database identifier of this receipt.
setOrganisation(Organisation organisation)
Returns: void
Sets the account the receipt was issued under.
| Parameter | Description |
|---|---|
organisation | the owning account |
getInvoice()
Returns: Invoice
The invoice this receipt settles. Optional, so it can be null even where the invoice number field is filled in.
setInvoice(Invoice invoice)
Returns: void
Sets the invoice this receipt settles.
| Parameter | Description |
|---|---|
invoice | the invoice being paid, or null for none |
getAmount()
Returns: BigDecimal
How much was actually paid in this transaction, which can be less than the invoice total for a part payment. Never null.
setAmount(BigDecimal amount)
Returns: void
Sets how much was actually paid in this transaction.
| Parameter | Description |
|---|---|
amount | the amount paid |
getTotal()
Returns: BigDecimal
The full amount owing on the invoice, against which the paid amount is set. Never null.
setTotal(BigDecimal total)
Returns: void
Sets the full amount owing on the invoice.
| Parameter | Description |
|---|---|
total | the total the payment was made against |
getInvoiceNumber()
Returns: String
The number of the invoice being paid, kept as text on the receipt itself so it survives independently of the invoice relationship. May be null.
setInvoiceNumber(String invoiceNumber)
Returns: void
Sets the number of the invoice being paid.
| Parameter | Description |
|---|---|
invoiceNumber | the invoice number |
getCustomer()
Returns: BaseEntity
Who made the payment. A base entity, so it can be either a profile or an organisation. Never null.
setCustomer(BaseEntity customer)
Returns: void
Sets who made the payment.
| Parameter | Description |
|---|---|
customer | the paying customer, a profile or an organisation |
getVendor()
Returns: BaseEntity
Who received the payment. A base entity, so it can be either a profile or an organisation. Never null.
setVendor(BaseEntity vendor)
Returns: void
Sets who received the payment.
| Parameter | Description |
|---|---|
vendor | the paid vendor, a profile or an organisation |