forked from idempiere/idempiere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IDEMPIERE-5329: Adding support to tag Payment into batch to bank stat…
…ement line and added document workflow support for payment into batch. (idempiere#2457) * IDEMPIERE-5329: Adding support to tag Payment into batch to bank statement line and added document workflow support for payment into batch. * IDEMPIERE-5329: Fixing Unit tests * IDEMPIERE-5329: Fixing as per code review comments * IDEMPIERE-5329: Fixing as per code review comments * IDEMPIERE-5329: Fixing as per code review comments * IDEMPIERE-5329: Applying patch from Carlos * IDEMPIERE-5329: Correcting comments * IDEMPIERE-5329: Added validation so that if Deposit batch is on bank statement line then it do not reactivated or voided. Fixed dynamic validation on Deposit batch field to not show closed and reconcilled old deposit batch. Added Create line per payment flag on create from deposit batch form
- Loading branch information
1 parent
e0e9893
commit e050878
Showing
28 changed files
with
1,769 additions
and
322 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
309 changes: 309 additions & 0 deletions
309
migration/iD12/postgresql/202404301200_IDEMPERIE-5329.sql
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
org.adempiere.base.callout/src/org/compiere/model/CalloutDepositBatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/****************************************************************************** | ||
* Copyright (C) 2016 Logilite Technologies LLP * | ||
* This program is free software; you can redistribute it and/or modify it * | ||
* under the terms version 2 of the GNU General Public License as published * | ||
* by the Free Software Foundation. This program is distributed in the hope * | ||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * | ||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * | ||
* See the GNU General Public License for more details. * | ||
* You should have received a copy of the GNU General Public License along * | ||
* with this program; if not, write to the Free Software Foundation, Inc., * | ||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * | ||
*****************************************************************************/ | ||
package org.compiere.model; | ||
|
||
import java.util.Properties; | ||
|
||
public class CalloutDepositBatch extends CalloutEngine | ||
{ | ||
|
||
/** | ||
* Bank Account Changed. | ||
* Update Currency | ||
* @param ctx context | ||
* @param WindowNo window no | ||
* @param mTab tab | ||
* @param mField field | ||
* @param value value | ||
* @return null or error message | ||
*/ | ||
public String bankAccount (Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) | ||
{ | ||
if (value == null) | ||
return ""; | ||
int C_BankAccount_ID = ((Integer)value).intValue(); | ||
MBankAccount ba = MBankAccount.get(ctx, C_BankAccount_ID); | ||
mTab.setValue(MCurrency.COLUMNNAME_C_Currency_ID, ba.getC_Currency_ID()); | ||
return ""; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
91 changes: 0 additions & 91 deletions
91
org.adempiere.base/src/org/adempiere/process/DepositBatchClose.java
This file was deleted.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
org.adempiere.base/src/org/compiere/acct/DocLine_DepositBatch.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package org.compiere.acct; | ||
|
||
import org.compiere.model.MBankStatement; | ||
import org.compiere.model.MPayment; | ||
import org.compiere.util.DB; | ||
|
||
/** | ||
* Deposit Batch Line | ||
* @author Deepak Pansheriya | ||
* | ||
*/ | ||
public class DocLine_DepositBatch extends DocLine { | ||
|
||
public DocLine_DepositBatch(MPayment line, Doc_BankStatement doc, Boolean isReversal) { | ||
super(line, doc); | ||
|
||
MPayment payment = new MPayment(line.getCtx(), line.getC_Payment_ID(), line.get_TrxName()); | ||
|
||
m_C_Payment_ID = line.getC_Payment_ID(); | ||
m_IsReversal = isReversal; | ||
|
||
// | ||
setDateDoc(payment.getDateTrx()); | ||
setDateAcct(MBankStatement.isPostWithDateFromLine(doc.getAD_Client_ID()) ? line.getDateAcct() : doc.getDateAcct()); | ||
setC_BPartner_ID(payment.getC_BPartner_ID()); | ||
} | ||
|
||
/** Reversal Flag */ | ||
private boolean m_IsReversal = false; | ||
/** Payment */ | ||
private int m_C_Payment_ID = 0; | ||
|
||
/** | ||
* Get Payment | ||
* | ||
* @return C_Paymnet_ID | ||
*/ | ||
public int getC_Payment_ID() { | ||
return m_C_Payment_ID; | ||
} // getC_Payment_ID | ||
|
||
/** | ||
* Get AD_Org_ID | ||
* | ||
* @param payment | ||
* if true get Org from payment | ||
* @return org | ||
*/ | ||
public int getAD_Org_ID(boolean payment) { | ||
if (payment && getC_Payment_ID() != 0) { | ||
String sql = "SELECT AD_Org_ID FROM C_Payment WHERE C_Payment_ID=?"; | ||
int id = DB.getSQLValue(null, sql, getC_Payment_ID()); | ||
if (id > 0) | ||
return id; | ||
} | ||
return super.getAD_Org_ID(); | ||
} // getAD_Org_ID | ||
|
||
/** | ||
* Is Reversal | ||
* | ||
* @return true if reversal | ||
*/ | ||
public boolean isReversal() { | ||
return m_IsReversal; | ||
} // isReversal | ||
|
||
} // DocLine_DepositBatch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.