FR [ 1876984 ] Make payment numbering configurable

This commit is contained in:
Carlos Ruiz 2008-01-22 04:35:32 +00:00
parent 50d096b84e
commit c19b550ae7
3 changed files with 41 additions and 14 deletions

View File

@ -1021,34 +1021,41 @@ public final class MPayment extends X_C_Payment
}
documentNo = "";
// globalqss - read configuration to assign credit card or check number number for Payments
// Credit Card
if (TENDERTYPE_CreditCard.equals(getTenderType()))
{
documentNo = getCreditCardType()
+ " " + Obscure.obscure(getCreditCardNumber())
+ " " + getCreditCardExpMM()
+ "/" + getCreditCardExpYY();
if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD", true, getAD_Client_ID())) {
documentNo = getCreditCardType()
+ " " + Obscure.obscure(getCreditCardNumber())
+ " " + getCreditCardExpMM()
+ "/" + getCreditCardExpYY();
}
}
// Own Check No
else if (TENDERTYPE_Check.equals(getTenderType())
&& !isReceipt()
&& getCheckNo() != null && getCheckNo().length() > 0)
{
documentNo = getCheckNo();
if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT", true, getAD_Client_ID())) {
documentNo = getCheckNo();
}
}
// Customer Check: Routing: Account #Check
else if (TENDERTYPE_Check.equals(getTenderType())
&& isReceipt())
{
if (getRoutingNo() != null)
documentNo = getRoutingNo() + ": ";
if (getAccountNo() != null)
documentNo += getAccountNo();
if (getCheckNo() != null)
{
if (documentNo.length() > 0)
documentNo += " ";
documentNo += "#" + getCheckNo();
if (MSysConfig.getBooleanValue("PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT", true, getAD_Client_ID())) {
if (getRoutingNo() != null)
documentNo = getRoutingNo() + ": ";
if (getAccountNo() != null)
documentNo += getAccountNo();
if (getCheckNo() != null)
{
if (documentNo.length() > 0)
documentNo += " ";
documentNo += "#" + getCheckNo();
}
}
}

View File

@ -0,0 +1,10 @@
-- Jan 21, 2008 11:13:10 PM COT
-- 1876984 - Make payment numbering configurable
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,50011,'C',TO_DATE('2008-01-21 23:13:07','YYYY-MM-DD HH24:MI:SS'),100,'Y/N - Define if the payment document number must be overwritten with the check number','D','Y','PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT',TO_DATE('2008-01-21 23:13:07','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,50012,'C',TO_DATE('2008-01-21 23:13:30','YYYY-MM-DD HH24:MI:SS'),100,'Y/N - Define if the payment document number must be overwritten with the credit card','D','Y','PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD',TO_DATE('2008-01-21 23:13:30','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,50013,'C',TO_DATE('2008-01-21 23:19:48','YYYY-MM-DD HH24:MI:SS'),100,'Y/N - Define if the payment (receipt) document number must be overwritten with the check number','D','Y','PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT',TO_DATE('2008-01-21 23:19:48','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;

View File

@ -0,0 +1,10 @@
-- Jan 21, 2008 11:13:10 PM COT
-- 1876984 - Make payment numbering configurable
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,50011,'C',TO_TIMESTAMP('2008-01-21 23:13:07','YYYY-MM-DD HH24:MI:SS'),100,'Y/N - Define if the payment document number must be overwritten with the check number','D','Y','PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_PAYMENT',TO_TIMESTAMP('2008-01-21 23:13:07','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,50012,'C',TO_TIMESTAMP('2008-01-21 23:13:30','YYYY-MM-DD HH24:MI:SS'),100,'Y/N - Define if the payment document number must be overwritten with the credit card','D','Y','PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CREDIT_CARD',TO_TIMESTAMP('2008-01-21 23:13:30','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;
INSERT INTO AD_SysConfig (AD_Client_ID,AD_Org_ID,AD_SysConfig_ID,ConfigurationLevel,Created,CreatedBy,Description,EntityType,IsActive,Name,Updated,UpdatedBy,Value) VALUES (0,0,50013,'C',TO_TIMESTAMP('2008-01-21 23:19:48','YYYY-MM-DD HH24:MI:SS'),100,'Y/N - Define if the payment (receipt) document number must be overwritten with the check number','D','Y','PAYMENT_OVERWRITE_DOCUMENTNO_WITH_CHECK_ON_RECEIPT',TO_TIMESTAMP('2008-01-21 23:19:48','YYYY-MM-DD HH24:MI:SS'),100,'Y')
;