The entire order/payment/bililng account implementation is quite a bit more complicated than it needs to be. I think the following rational is the reason.
OFBiz associates a payment method with an order. I think it would be much more transparent and more correct if payment methods were only associated with invoices. (ie you pay invoices, you don't pay orders). This would require the creation of a "CheckoutMethod" (which is not a payment method) which would be associated with orders instead of payment methods. Instead of OrderPaymentPreferences, you would have OrderCheckoutPreferences and all of the routines run against that. This way you're never confusing charging to a billing account as a payment. This helps solve your issue here by having different services for different folks instead of a flag as this issue is a bit more complex depending on a company's actual policies. --- Si Chen <[EMAIL PROTECTED]> wrote: > Hi. > > We just noticed that if an order had a billing > account > (OrderHeader.billingAccountId) and a credit card > associated with it, > only the credit card should be charged. This should > be the right > behavior if the billing account is used for > wholesale customers as a > line of credit, but if the billing account is a > retail consumer's > store credit (arising from a return), then most > retailers would want > the store credit used up first. > > So, how about we add a ProductStore field to control > whether the > billing account should be used before other payment > methods? > > Si >
