One invoice for many orders payed with different billing accounts problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

One invoice for many orders payed with different billing accounts problem

Rashko Rejmer
Hi all,

I was faced with a problem while creating invoice from few orders. I made a research in the ml and found that DB of OFBiz fully supports this functionality. The only problem is that there is no such a implementation. I implemented my own method that creats invoice for all open orders in a billing account. Then I tried to generalize my implementation and to created so functional method that will be able to create one invoice for couple of orders, no matter how they were payed.

And here is the problem. Because of the DB relation between BillingAccount and Invoice entities(invoice.billingAccountId field) there is no possibility to create invoice for 2 orders that are payed with 2 different billing accounts.
I will be glad if someone give me some suggestions how to workarround this problem.

Regards,
Rashko Rejmer