Merge 1256cfd5f87f

This commit is contained in:
Heng Sin Low 2013-04-12 16:51:26 +08:00
commit 42f276d3e7
7 changed files with 190 additions and 11 deletions

View File

@ -0,0 +1,89 @@
-- Apr 11, 2013 11:39:53 AM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
INSERT INTO AD_Val_Rule (AD_Client_ID,Code,AD_Val_Rule_ID,EntityType,Name,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,IsActive,AD_Org_ID) VALUES (0,'C_DocType.DocBaseType IN (''ARR'') AND C_DocType.AD_Client_ID=@#AD_Client_ID@',200038,'D','C_DocType Receipts','S','d8daa96e-1130-47a2-8a1e-780910ecca50',100,100,TO_DATE('2013-04-11 11:39:52','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-04-11 11:39:52','YYYY-MM-DD HH24:MI:SS'),'Y',0)
;
-- Apr 11, 2013 11:40:04 AM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET AD_Val_Rule_ID=200038,Updated=TO_DATE('2013-04-11 11:40:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208413
;
-- Apr 11, 2013 11:54:06 AM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
INSERT INTO AD_Val_Rule (AD_Client_ID,Code,AD_Val_Rule_ID,EntityType,Name,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,IsActive,AD_Org_ID) VALUES (0,'C_Payment.IsReconciled=''N'' AND C_Payment.IsReceipt = ''Y'' AND C_Payment.TrxType <> ''X'' AND (C_Payment.C_DepositBatch_ID = 0 OR C_Payment.C_DepositBatch_ID IS NULL)',200039,'D','C_DepositBatchLine C_Payment_ID','S','1c7fa24b-df83-46c8-a455-913dd7690bbc',100,100,TO_DATE('2013-04-11 11:54:05','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-04-11 11:54:05','YYYY-MM-DD HH24:MI:SS'),'Y',0)
;
-- Apr 11, 2013 11:54:15 AM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET AD_Val_Rule_ID=200039,Updated=TO_DATE('2013-04-11 11:54:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208437
;
-- Apr 11, 2013 12:03:49 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET IsToolbarButton='N',Updated=TO_DATE('2013-04-11 12:03:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208421
;
-- Apr 11, 2013 2:59:46 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET AD_Val_Rule_ID=149,Updated=TO_DATE('2013-04-11 14:59:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208413
;
-- Apr 11, 2013 3:00:38 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Window SET Help='The Process Payments Window allows you to enter payments for invoices. If the payment is for a single invoice then it can be processed here.', Name='Payments into Batch', Description='Process Payments',Updated=TO_DATE('2013-04-11 15:00:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=200031
;
-- Apr 11, 2013 3:00:38 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Menu SET Name='Payments into Batch', Description='Process Payments', IsActive='Y',Updated=TO_DATE('2013-04-11 15:00:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=200035
;
-- Apr 11, 2013 3:07:06 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Process SET Value='C_BankStatement CreateFromBatch',Updated=TO_DATE('2013-04-11 15:07:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200032
;
-- Apr 11, 2013 3:07:20 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Element SET ColumnName='CreateFromBatch',Updated=TO_DATE('2013-04-11 15:07:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202201
;
-- Apr 11, 2013 3:07:21 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET ColumnName='CreateFromBatch', Name='Create From Batch', Description=NULL, Help=NULL WHERE AD_Element_ID=202201
;
-- Apr 11, 2013 3:07:22 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Process_Para SET ColumnName='CreateFromBatch', Name='Create From Batch', Description=NULL, Help=NULL, AD_Element_ID=202201 WHERE UPPER(ColumnName)='CREATEFROMBATCH' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Apr 11, 2013 3:07:22 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Process_Para SET ColumnName='CreateFromBatch', Name='Create From Batch', Description=NULL, Help=NULL WHERE AD_Element_ID=202201 AND IsCentrallyMaintained='Y'
;
-- Apr 11, 2013 3:07:22 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_InfoColumn SET ColumnName='CreateFromBatch', Name='Create From Batch', Description=NULL, Help=NULL WHERE AD_Element_ID=202201 AND IsCentrallyMaintained='Y'
;
-- Apr 11, 2013 3:07:45 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
ALTER TABLE C_BankStatement ADD CreateFromBatch CHAR(1) DEFAULT NULL
;
-- Apr 11, 2013 3:09:19 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Val_Rule SET Code='C_Payment.IsReconciled=''N'' AND C_Payment.TrxType <> ''X'' AND (C_Payment.C_DepositBatch_ID = 0 OR C_Payment.C_DepositBatch_ID IS NULL)',Updated=TO_DATE('2013-04-11 15:09:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200039
;
-- Apr 11, 2013 3:21:20 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Val_Rule SET Code='C_Payment.IsReconciled=''N'' AND C_Payment.TrxType <> ''X'' AND (C_Payment.C_DepositBatch_ID = 0 OR C_Payment.C_DepositBatch_ID IS NULL) AND C_Payment.C_DocType_ID=@C_DocType_ID@',Updated=TO_DATE('2013-04-11 15:21:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200039
;
ALTER TABLE C_BankStatement DROP COLUMN X_CreateFromBatch;
SELECT register_migration_script('201304111547_IDEMPIERE-853.sql') FROM dual
;

View File

@ -0,0 +1,89 @@
-- Apr 11, 2013 11:39:53 AM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
INSERT INTO AD_Val_Rule (AD_Client_ID,Code,AD_Val_Rule_ID,EntityType,Name,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,IsActive,AD_Org_ID) VALUES (0,'C_DocType.DocBaseType IN (''ARR'') AND C_DocType.AD_Client_ID=@#AD_Client_ID@',200038,'D','C_DocType Receipts','S','d8daa96e-1130-47a2-8a1e-780910ecca50',100,100,TO_TIMESTAMP('2013-04-11 11:39:52','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-04-11 11:39:52','YYYY-MM-DD HH24:MI:SS'),'Y',0)
;
-- Apr 11, 2013 11:40:04 AM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET AD_Val_Rule_ID=200038,Updated=TO_TIMESTAMP('2013-04-11 11:40:04','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208413
;
-- Apr 11, 2013 11:54:06 AM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
INSERT INTO AD_Val_Rule (AD_Client_ID,Code,AD_Val_Rule_ID,EntityType,Name,Type,AD_Val_Rule_UU,CreatedBy,UpdatedBy,Updated,Created,IsActive,AD_Org_ID) VALUES (0,'C_Payment.IsReconciled=''N'' AND C_Payment.IsReceipt = ''Y'' AND C_Payment.TrxType <> ''X'' AND (C_Payment.C_DepositBatch_ID = 0 OR C_Payment.C_DepositBatch_ID IS NULL)',200039,'D','C_DepositBatchLine C_Payment_ID','S','1c7fa24b-df83-46c8-a455-913dd7690bbc',100,100,TO_TIMESTAMP('2013-04-11 11:54:05','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-04-11 11:54:05','YYYY-MM-DD HH24:MI:SS'),'Y',0)
;
-- Apr 11, 2013 11:54:15 AM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET AD_Val_Rule_ID=200039,Updated=TO_TIMESTAMP('2013-04-11 11:54:15','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208437
;
-- Apr 11, 2013 12:03:49 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET IsToolbarButton='N',Updated=TO_TIMESTAMP('2013-04-11 12:03:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208421
;
-- Apr 11, 2013 2:59:46 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET AD_Val_Rule_ID=149,Updated=TO_TIMESTAMP('2013-04-11 14:59:46','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=208413
;
-- Apr 11, 2013 3:00:38 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Window SET Help='The Process Payments Window allows you to enter payments for invoices. If the payment is for a single invoice then it can be processed here.', Name='Payments into Batch', Description='Process Payments',Updated=TO_TIMESTAMP('2013-04-11 15:00:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Window_ID=200031
;
-- Apr 11, 2013 3:00:38 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Menu SET Name='Payments into Batch', Description='Process Payments', IsActive='Y',Updated=TO_TIMESTAMP('2013-04-11 15:00:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=200035
;
-- Apr 11, 2013 3:07:06 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Process SET Value='C_BankStatement CreateFromBatch',Updated=TO_TIMESTAMP('2013-04-11 15:07:06','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_ID=200032
;
-- Apr 11, 2013 3:07:20 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Element SET ColumnName='CreateFromBatch',Updated=TO_TIMESTAMP('2013-04-11 15:07:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202201
;
-- Apr 11, 2013 3:07:21 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Column SET ColumnName='CreateFromBatch', Name='Create From Batch', Description=NULL, Help=NULL WHERE AD_Element_ID=202201
;
-- Apr 11, 2013 3:07:22 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Process_Para SET ColumnName='CreateFromBatch', Name='Create From Batch', Description=NULL, Help=NULL, AD_Element_ID=202201 WHERE UPPER(ColumnName)='CREATEFROMBATCH' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL
;
-- Apr 11, 2013 3:07:22 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Process_Para SET ColumnName='CreateFromBatch', Name='Create From Batch', Description=NULL, Help=NULL WHERE AD_Element_ID=202201 AND IsCentrallyMaintained='Y'
;
-- Apr 11, 2013 3:07:22 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_InfoColumn SET ColumnName='CreateFromBatch', Name='Create From Batch', Description=NULL, Help=NULL WHERE AD_Element_ID=202201 AND IsCentrallyMaintained='Y'
;
-- Apr 11, 2013 3:07:45 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
ALTER TABLE C_BankStatement ADD COLUMN CreateFromBatch CHAR(1) DEFAULT NULL
;
-- Apr 11, 2013 3:09:19 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Val_Rule SET Code='C_Payment.IsReconciled=''N'' AND C_Payment.TrxType <> ''X'' AND (C_Payment.C_DepositBatch_ID = 0 OR C_Payment.C_DepositBatch_ID IS NULL)',Updated=TO_TIMESTAMP('2013-04-11 15:09:19','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200039
;
-- Apr 11, 2013 3:21:20 PM SGT
-- IDEMPIERE-853 Improvement to Deposit Batch functionality
UPDATE AD_Val_Rule SET Code='C_Payment.IsReconciled=''N'' AND C_Payment.TrxType <> ''X'' AND (C_Payment.C_DepositBatch_ID = 0 OR C_Payment.C_DepositBatch_ID IS NULL) AND C_Payment.C_DocType_ID=@C_DocType_ID@',Updated=TO_TIMESTAMP('2013-04-11 15:21:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Val_Rule_ID=200039
;
ALTER TABLE C_BankStatement DROP COLUMN X_CreateFromBatch;
SELECT register_migration_script('201304111547_IDEMPIERE-853.sql') FROM dual
;

View File

@ -135,8 +135,10 @@ import org.compiere.util.Env;
{ {
String sql = "UPDATE C_Payment p SET C_DepositBatch_ID=? WHERE p.C_Payment_ID=?"; String sql = "UPDATE C_Payment p SET C_DepositBatch_ID=? WHERE p.C_Payment_ID=?";
DB.executeUpdateEx(sql, new Object[] {getC_DepositBatch_ID(), getC_Payment_ID()}, get_TrxName()); DB.executeUpdateEx(sql, new Object[] {getC_DepositBatch_ID(), getC_Payment_ID()}, get_TrxName());
MPayment payment = new MPayment(getCtx(), getC_Payment_ID(), get_TrxName());
setPayment(payment); // set payment amount
} }
//
return true; return true;
} // beforeSave } // beforeSave

View File

@ -62,7 +62,7 @@ public class VStatementCreateFromBatch extends StatementCreateFromBatch implemen
public void init (int WindowNo, FormFrame frame) public void init (int WindowNo, FormFrame frame)
{ {
form = new VCreateFromForm(this, frame); form = new VCreateFromForm(this, frame);
p_WindowNo = WindowNo; p_WindowNo = frame.getGridTab().getWindowNo();;
m_frame = frame; m_frame = frame;
initForm(); initForm();
} }

View File

@ -68,7 +68,7 @@ public class WStatementCreateFromBatch extends StatementCreateFromBatch implemen
public WStatementCreateFromBatch() public WStatementCreateFromBatch()
{ {
form = new WCreateFromForm(this); form = new WCreateFromForm(this);
p_WindowNo = form.getWindowNo(); p_WindowNo = form.getGridTab().getWindowNo();
} }
public void initForm() public void initForm()

View File

@ -191,7 +191,6 @@ public abstract class StatementCreateFromBatch extends CreateFromForm
sql.append(" INNER JOIN C_DepositBatch db ON (py.C_DepositBatch_ID = db.C_DepositBatch_ID) "); sql.append(" INNER JOIN C_DepositBatch db ON (py.C_DepositBatch_ID = db.C_DepositBatch_ID) ");
sql.append(getSQLWhere(BPartner, DocumentNo, DateFrom, DateTo, AmtFrom, AmtTo, DocType, TenderType, AuthCode)); sql.append(getSQLWhere(BPartner, DocumentNo, DateFrom, DateTo, AmtFrom, AmtTo, DocType, TenderType, AuthCode));
sql.append(" AND p.IsReceipt = 'Y'");
sql.append(" AND py.C_DepositBatch_ID <> 0"); sql.append(" AND py.C_DepositBatch_ID <> 0");
sql.append(" AND db.Processed = 'Y'"); sql.append(" AND db.Processed = 'Y'");
@ -247,7 +246,7 @@ public abstract class StatementCreateFromBatch extends CreateFromForm
{ {
// fixed values // fixed values
int C_BankStatement_ID = ((Integer) gridTab.getValue("C_BankStatement_ID")).intValue(); int C_BankStatement_ID = ((Integer) gridTab.getValue("C_BankStatement_ID")).intValue();
MBankStatement bs = new MBankStatement (Env.getCtx(), C_BankStatement_ID, null); MBankStatement bs = new MBankStatement (Env.getCtx(), C_BankStatement_ID, trxName);
if (log.isLoggable(Level.CONFIG)) log.config(bs.toString()); if (log.isLoggable(Level.CONFIG)) log.config(bs.toString());
StringBuilder sql = new StringBuilder(); StringBuilder sql = new StringBuilder();
@ -260,7 +259,6 @@ public abstract class StatementCreateFromBatch extends CreateFromForm
sql.append(" INNER JOIN C_DepositBatch db ON (py.C_DepositBatch_ID = db.C_DepositBatch_ID)"); sql.append(" INNER JOIN C_DepositBatch db ON (py.C_DepositBatch_ID = db.C_DepositBatch_ID)");
sql.append(" LEFT OUTER JOIN C_BPartner bp ON (p.C_BPartner_ID=bp.C_BPartner_ID)"); sql.append(" LEFT OUTER JOIN C_BPartner bp ON (p.C_BPartner_ID=bp.C_BPartner_ID)");
sql.append(" WHERE p.Processed='Y' AND p.IsReconciled='N'"); sql.append(" WHERE p.Processed='Y' AND p.IsReconciled='N'");
sql.append(" AND p.IsReceipt = 'Y'");
sql.append(" AND py.C_DepositBatch_ID = ?"); sql.append(" AND py.C_DepositBatch_ID = ?");
sql.append(" AND p.DocStatus IN ('CO','CL','RE','VO') AND p.PayAmt<>0"); sql.append(" AND p.DocStatus IN ('CO','CL','RE','VO') AND p.PayAmt<>0");
sql.append(" AND p.C_BankAccount_ID=?"); sql.append(" AND p.C_BankAccount_ID=?");
@ -289,7 +287,7 @@ public abstract class StatementCreateFromBatch extends CreateFromForm
ResultSet rs = null; ResultSet rs = null;
try try
{ {
pstmt = DB.prepareStatement(sql.toString(), null); pstmt = DB.prepareStatement(sql.toString(), trxName);
pstmt.setTimestamp(1, ts); pstmt.setTimestamp(1, ts);
pstmt.setInt(2, C_DepositBatch_ID); pstmt.setInt(2, C_DepositBatch_ID);
pstmt.setInt(3, C_BankAccount_ID); pstmt.setInt(3, C_BankAccount_ID);
@ -304,7 +302,7 @@ public abstract class StatementCreateFromBatch extends CreateFromForm
// //
MBankStatementLine bsl = new MBankStatementLine (bs); MBankStatementLine bsl = new MBankStatementLine (bs);
bsl.setStatementLineDate(trxDate); bsl.setStatementLineDate(trxDate);
bsl.setPayment(new MPayment(Env.getCtx(), C_Payment_ID, null)); bsl.setPayment(new MPayment(Env.getCtx(), C_Payment_ID, trxName));
if (!bsl.save()) if (!bsl.save())
log.log(Level.SEVERE, "Line not created #" + i); log.log(Level.SEVERE, "Line not created #" + i);

View File

@ -67,7 +67,8 @@ public abstract class CreateFromDepositBatch extends CreateFromBatch
sql.append(" LEFT OUTER JOIN C_BPartner bp ON (p.C_BPartner_ID=bp.C_BPartner_ID) "); sql.append(" LEFT OUTER JOIN C_BPartner bp ON (p.C_BPartner_ID=bp.C_BPartner_ID) ");
sql.append(getSQLWhere(BPartner, DocumentNo, DateFrom, DateTo, AmtFrom, AmtTo, DocType, TenderType, AuthCode)); sql.append(getSQLWhere(BPartner, DocumentNo, DateFrom, DateTo, AmtFrom, AmtTo, DocType, TenderType, AuthCode));
sql.append(" AND p.IsReceipt = 'Y'"); sql.append(" AND py.IsReconciled = 'N'");
sql.append(" AND py.TrxType <> 'X'");
sql.append(" AND (py.C_DepositBatch_ID = 0 OR py.C_DepositBatch_ID IS NULL)"); sql.append(" AND (py.C_DepositBatch_ID = 0 OR py.C_DepositBatch_ID IS NULL)");
sql.append(" ORDER BY p.DateTrx"); sql.append(" ORDER BY p.DateTrx");
@ -124,7 +125,7 @@ public abstract class CreateFromDepositBatch extends CreateFromBatch
{ {
// fixed values // fixed values
int C_DepositBatch_ID = ((Integer) getGridTab().getValue("C_DepositBatch_ID")).intValue(); int C_DepositBatch_ID = ((Integer) getGridTab().getValue("C_DepositBatch_ID")).intValue();
MDepositBatch db = new MDepositBatch(Env.getCtx(), C_DepositBatch_ID, null); MDepositBatch db = new MDepositBatch(Env.getCtx(), C_DepositBatch_ID, trxName);
if (log.isLoggable(Level.CONFIG)) log.config(db.toString()); if (log.isLoggable(Level.CONFIG)) log.config(db.toString());
// Lines // Lines
@ -144,7 +145,7 @@ public abstract class CreateFromDepositBatch extends CreateFromBatch
// //
MDepositBatchLine dbl = new MDepositBatchLine(db); MDepositBatchLine dbl = new MDepositBatchLine(db);
// dbl.setStatementLineDate(trxDate); // dbl.setStatementLineDate(trxDate);
dbl.setPayment(new MPayment(Env.getCtx(), C_Payment_ID, null)); dbl.setPayment(new MPayment(Env.getCtx(), C_Payment_ID, trxName));
if(!dbl.save()) if(!dbl.save())
log.log(Level.SEVERE, "Line not created #" + i); log.log(Level.SEVERE, "Line not created #" + i);
} // if selected } // if selected