This is fix that tries to resolve problem described at this thread: http://red1.org/forum/viewtopic.php?t=167
Affected files are:
org.compiere.grid.VPayment
org.compiere.model.MCash
I will try to describe changes:
org.compiere.grid.VPayment
-Changed method: private boolean saveChanges()
Here I made just one modification:
// Trifon. Fixed to use newC_CashBook_ID
MCash cash = MCash.get (Env.getCtx(), m_AD_Org_ID, newDateAcct, C_Currency_ID, newC_CashBook_ID);
The aim is to get proper Cash Journal etc. Cash Journal that is for choosen by user CashBook.
org.compiere.model.MCash
-Added new method: MCash get(Properties ctx, int AD_Org_ID, Timestamp dateAcct, int C_Currency_ID, int C_CashBook_ID)
The aim of this method is to return Cash Journal for given Currency, CashBook, Org and Date. The old method did not contain CashBook.
So when user change Cashbook of given SalesOrder or Invoice, Compiere will be able to choose proper CashBook.
In these method I have changed only 3 lines which are commented with "// Added by Trifon".
(The codes are here: http://compiere.red1.org/Sales-Order-Cashbook.zip )