|
Description
Martin Renvoize (ashimema)
2021-11-01 14:20:43 UTC
Created attachment 127173 [details] [review] Bug 29385: Catch register_id for payments against fees This patch adds the missing cash_register definition in the call to pay with a set of lines defined. Created attachment 127178 [details] [review] Bug 29385: Catch register_id for payments against fees This patch adds the missing cash_register definition in the call to pay with a set of lines defined. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 128159 [details] [review] Bug 29385: [ALTERNATIVE] Catch register_id for payments against fees To prevent such problems from happening again I would prefer a version that will not duplicate code. But hard to provide patch and be confident in it as this code is not covered by tests. Created attachment 129583 [details] [review] Bug 29385: Catch register_id for payments against fees This patch refactors the pay method in SIP FeePayment such that we consistently pass parameters to both invocations of Koha::Account->pay. It ensure the missing cash_register definition is passed when a set of account lines to pay is defined. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Jonathan's patch is much better.. I've replaced my own and signed off. Created attachment 130469 [details] [review] Bug 29385: Catch register_id for payments against fees This patch refactors the pay method in SIP FeePayment such that we consistently pass parameters to both invocations of Koha::Account->pay. It ensure the missing cash_register definition is passed when a set of account lines to pay is defined. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Sorry maybe silly question : With patch $register_id is not used anymore. Is it on purpose ? Created attachment 130595 [details] [review] Bug 29385: Catch register_id for payments against fees This patch refactors the pay method in SIP FeePayment such that we consistently pass parameters to both invocations of Koha::Account->pay. It ensure the missing cash_register definition is passed when a set of account lines to pay is defined. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> (In reply to Fridolin Somers from comment #8) > Sorry maybe silly question : > With patch $register_id is not used anymore. > Is it on purpose ? Absolutely not! That was the point of the patch and it got lost! I've amended the patch to reintroduce it. Pushed to master for 22.05, thanks to everybody involved [U+1F984] Pushed to 21.11.x for 21.11.03 Pushed to 21.05.x for 21.05.11 Backported: Pushed to 20.11.x branch for 20.11.17 Does this need to be backported to 19.11.x? (In reply to wainuiwitikapark from comment #16) > Does this need to be backported to 19.11.x? I bet not. Depends on Bug 24828 only in >= 20.05 Not backported to 19.11.x |