While cleaning up some code related to returns, I've noticed the PartyAcctgPreferences.useInvoiceIdForReturns flag: if set to Y then the returnId is generated using the id sequence of the invoices. Does this make sense? My guess is that this code is there as an hack to use the return as a "credit invoice"... however in my opinion we should get rid of this because it seems more suited for a customization and not worth of a flag/field in the data model.
I'd suggest to:
1) remove the PartyAcctgPreferences.useInvoiceIdForReturns field
2) remove the code that uses it (in the createReturnHeader service)

There is already some code that creates a real invoice from a return and, even if it needs to be enhanced, this is really the way to go: with a real invoice we can use and apply payments etc...

What do you think?

Jacopo


Reply via email to