IDEMPIERE-2135 Payment Term not applied for Direct Debit invoices

This commit is contained in:
Carlos Ruiz 2014-08-12 09:52:06 +02:00
parent 062f2a8ca6
commit 5975348a61
3 changed files with 4 additions and 4 deletions

View File

@ -1450,7 +1450,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
}
if ( getGrandTotal().signum() != 0
&& PAYMENTRULE_OnCredit.equals(getPaymentRule()))
&& (PAYMENTRULE_OnCredit.equals(getPaymentRule()) || PAYMENTRULE_DirectDebit.equals(getPaymentRule())))
{
if (!createPaySchedule())
{

View File

@ -1369,7 +1369,7 @@ public class MOrder extends X_C_Order implements DocAction
}
if ( getGrandTotal().signum() != 0
&& PAYMENTRULE_OnCredit.equals(getPaymentRule()))
&& (PAYMENTRULE_OnCredit.equals(getPaymentRule()) || PAYMENTRULE_DirectDebit.equals(getPaymentRule())))
{
if (!createPaySchedule())
{

View File

@ -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
if ( (! MInvoice.PAYMENTRULE_OnCredit.equals(invoice.getPaymentRule()) )
if ( (! (MInvoice.PAYMENTRULE_OnCredit.equals(invoice.getPaymentRule()) || MInvoice.PAYMENTRULE_DirectDebit.equals(invoice.getPaymentRule())))
|| invoice.getGrandTotal().signum() == 0)
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
if ( (! MOrder.PAYMENTRULE_OnCredit.equals(order.getPaymentRule()) )
if ( (! (MOrder.PAYMENTRULE_OnCredit.equals(order.getPaymentRule()) || MOrder.PAYMENTRULE_DirectDebit.equals(order.getPaymentRule())) )
|| order.getGrandTotal().signum() == 0)
return false;