Orders, Taxes, Billing, Payment
Orders are represented by OrderHeader. OrderHeader can have many OrderItems.
Quotes have many QuoteItems. Quote could be for service. OrderItem could be due to a QuoteItem.
There may be returns. Each 'return' is represented by a ReturnHeader entity.
ReturnHeader may have many ReturnItems. Each ReturnItem would be asociated with an OrderHeader.
OrderHeader, Quote, ReturnHeader may have adjustments. Adjustments are needed before billing to include Taxes and any other Adjusment reasons.
Tax adjustments would depend on applicable TaxAuthority, Rates applicables to product and Party Tax information
Billing is done based on OrderItems, ReturnItems and Adjustments made.
Invoice is created to fulfill billing. Invoice would have one or more InvoiceItems.
Invoices are raised against a BillingAccount. BilingAccount is also referenced by OrderHeader and ReturnHeader.
PaymentApplication is application of a Payment to a BillingAccount for an Invoice.