IDEMPIERE-5856: MOrder.setBPartner is not using IsSOTrx for PaymentRule (#2012)

* IDEMPIERE-5856: MOrder.setBPartner is not using IsSOTrx for PaymentRule

* IDEMPIERE-5856: MOrder.setBPartner is not using IsSOTrx for PaymentRule

serial update

* IDEMPIERE-5856: MOrder.setBPartner is not using IsSOTrx for PaymentRule

 if getPaymentRulePO() is null, we fall back to getPaymentRule()
This commit is contained in:
Nicolas Micoud 2023-09-19 15:04:18 +02:00 committed by GitHub
parent 1d724b00f2
commit 4c4981533e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -82,7 +82,7 @@ public class MOrder extends X_C_Order implements DocAction
/**
* generated serial id
*/
private static final long serialVersionUID = 1298245367836653594L;
private static final long serialVersionUID = 9095740800513665542L;
private static final String BASE_MATCHING_SQL =
"""
@ -746,7 +746,10 @@ public class MOrder extends X_C_Order implements DocAction
ss = bp.getInvoiceRule();
if (ss != null)
setInvoiceRule(ss);
ss = bp.getPaymentRule();
if (isSOTrx())
ss = bp.getPaymentRule();
else
ss = !Util.isEmpty(bp.getPaymentRulePO()) ? bp.getPaymentRulePO() : bp.getPaymentRule();
if (ss != null)
setPaymentRule(ss);
// Sales Rep