1005028 Payment Term record -- Code should ignore inactive records. Do not pick inactive record as default payment term for order and invoice. (IDEMPIERE-3260)
This commit is contained in:
parent
9dc3388216
commit
6ea08beba8
|
@ -994,7 +994,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
setC_PaymentTerm_ID (ii);
|
||||
else
|
||||
{
|
||||
String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y'";
|
||||
String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y' AND IsActive='Y'";
|
||||
ii = DB.getSQLValue(null, sql, getAD_Client_ID());
|
||||
if (ii != 0)
|
||||
setC_PaymentTerm_ID (ii);
|
||||
|
|
|
@ -1039,7 +1039,7 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
setC_PaymentTerm_ID(ii);
|
||||
else
|
||||
{
|
||||
String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y'";
|
||||
String sql = "SELECT C_PaymentTerm_ID FROM C_PaymentTerm WHERE AD_Client_ID=? AND IsDefault='Y' AND IsActive='Y'";
|
||||
ii = DB.getSQLValue(null, sql, getAD_Client_ID());
|
||||
if (ii != 0)
|
||||
setC_PaymentTerm_ID (ii);
|
||||
|
|
Loading…
Reference in New Issue