Creates invoices and purchase orders on behalf of whichever InvoicingApplication is currently active for the organisation, and builds a PaymentAddress from a shopping cart's captured address fields. Payment providers such as the manual payment app build up an InvoiceBean or PurchaseOrderBean and hand it to this service, which delegates persistence to the first active InvoicingApplication rather than persisting invoices itself.


Methods

newPurchaseOrderList()

Returns: PurchaseOrderBean

Creates a new, empty purchase order bean ready to have its fields populated.

newInvoiceList()

Returns: InvoiceBean

Creates a new, empty invoice bean ready to have its fields populated.

createInvoice(BaseEntity customer, BaseEntity vendor, InvoiceBean invoice)

Returns: void

Creates an invoice for the given customer and vendor, using the current Hibernate session.

ParameterDescription
customerthe entity being invoiced
vendorthe entity issuing the invoice
invoicethe invoice details to persist

createPurchaseOrder(BaseEntity customer, BaseEntity vendor, PurchaseOrderBean purchaseOrder)

Returns: void

Creates a purchase order for the given customer and vendor, using the current organisation and Hibernate session.

ParameterDescription
customerthe entity the purchase order is for
vendorthe entity fulfilling the purchase order
purchaseOrderthe purchase order details to persist

createPurchaseOrder(Organisation org, BaseEntity customer, BaseEntity vendor, PurchaseOrderBean purchaseOrderList)

Returns: void

Creates a purchase order for the given customer and vendor within the given organisation, using the current Hibernate session.

ParameterDescription
orgthe organisation the purchase order belongs to
customerthe entity the purchase order is for
vendorthe entity fulfilling the purchase order
purchaseOrderListthe purchase order details to persist

generatePaymentAddress(Cart cart, PaymentAddressType addressType)

Returns: PaymentAddress

Builds a PaymentAddress from a shopping cart's captured address fields, tagged with the given address type.

ParameterDescription
cartthe cart whose address, contact and company fields are copied
addressTypethe type of address being generated, such as billing or delivery
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.