IDEMPIERE-2135 Payment Term not applied for Direct Debit invoices
This commit is contained in:
parent
062f2a8ca6
commit
5975348a61
|
@ -1450,7 +1450,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( getGrandTotal().signum() != 0
|
if ( getGrandTotal().signum() != 0
|
||||||
&& PAYMENTRULE_OnCredit.equals(getPaymentRule()))
|
&& (PAYMENTRULE_OnCredit.equals(getPaymentRule()) || PAYMENTRULE_DirectDebit.equals(getPaymentRule())))
|
||||||
{
|
{
|
||||||
if (!createPaySchedule())
|
if (!createPaySchedule())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1369,7 +1369,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( getGrandTotal().signum() != 0
|
if ( getGrandTotal().signum() != 0
|
||||||
&& PAYMENTRULE_OnCredit.equals(getPaymentRule()))
|
&& (PAYMENTRULE_OnCredit.equals(getPaymentRule()) || PAYMENTRULE_DirectDebit.equals(getPaymentRule())))
|
||||||
{
|
{
|
||||||
if (!createPaySchedule())
|
if (!createPaySchedule())
|
||||||
{
|
{
|
||||||
|
|
|
@ -203,7 +203,7 @@ public class MPaymentTerm extends X_C_PaymentTerm
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not apply payment term if the invoice is not on credit or if total is zero
|
// do not apply payment term if the invoice is not on credit or if total is zero
|
||||||
if ( (! MInvoice.PAYMENTRULE_OnCredit.equals(invoice.getPaymentRule()) )
|
if ( (! (MInvoice.PAYMENTRULE_OnCredit.equals(invoice.getPaymentRule()) || MInvoice.PAYMENTRULE_DirectDebit.equals(invoice.getPaymentRule())))
|
||||||
|| invoice.getGrandTotal().signum() == 0)
|
|| invoice.getGrandTotal().signum() == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -308,7 +308,7 @@ public class MPaymentTerm extends X_C_PaymentTerm
|
||||||
}
|
}
|
||||||
|
|
||||||
// do not apply payment term if the order is not on credit or if total is zero
|
// do not apply payment term if the order is not on credit or if total is zero
|
||||||
if ( (! MOrder.PAYMENTRULE_OnCredit.equals(order.getPaymentRule()) )
|
if ( (! (MOrder.PAYMENTRULE_OnCredit.equals(order.getPaymentRule()) || MOrder.PAYMENTRULE_DirectDebit.equals(order.getPaymentRule())) )
|
||||||
|| order.getGrandTotal().signum() == 0)
|
|| order.getGrandTotal().signum() == 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue