From 1302d6b348dcebf04505782bdf7815f279631945 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Fri, 17 Aug 2012 11:05:38 -0500 Subject: [PATCH] =?UTF-8?q?IDEMPIERE-376=20Limit=20charges=20to=20use=20ju?= =?UTF-8?q?st=20one=20account=20/=20Thanks=20to=20David=20Pe=C3=B1uela?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oracle/879_IDEMPIERE-376.sql | 111 ++++++++++++++++++ .../postgresql/879_IDEMPIERE-376.sql | 110 +++++++++++++++++ .../process/AcctSchemaDefaultCopy.java | 5 +- .../org/compiere/FA/CreateInvoicedAsset.java | 10 +- .../src/org/compiere/acct/Doc.java | 5 +- .../src/org/compiere/acct/DocLine.java | 2 +- .../src/org/compiere/acct/Doc_Payment.java | 4 +- .../model/I_C_AcctSchema_Default.java | 36 +++--- .../org/compiere/model/I_C_Charge_Acct.java | 38 +++--- .../src/org/compiere/model/MCharge.java | 22 ++-- .../src/org/compiere/model/MSetup.java | 6 +- .../model/X_C_AcctSchema_Default.java | 54 ++++----- .../org/compiere/model/X_C_Charge_Acct.java | 58 ++++----- .../data/import/AccountingUS.csv | 2 +- .../data/import/AccountingUS.xls | Bin 79360 -> 79360 bytes .../src/org/compiere/apps/form/Charge.java | 1 - 16 files changed, 325 insertions(+), 139 deletions(-) create mode 100644 migration/360lts-release/oracle/879_IDEMPIERE-376.sql create mode 100644 migration/360lts-release/postgresql/879_IDEMPIERE-376.sql diff --git a/migration/360lts-release/oracle/879_IDEMPIERE-376.sql b/migration/360lts-release/oracle/879_IDEMPIERE-376.sql new file mode 100644 index 0000000000..24aa89630e --- /dev/null +++ b/migration/360lts-release/oracle/879_IDEMPIERE-376.sql @@ -0,0 +1,111 @@ +-- Aug 16, 2012 11:44:05 AM COT +-- IDEMPIERE-879 Change to one account +UPDATE AD_Element SET Name='Charge Revenue (Deprecated)',Updated=TO_DATE('2012-08-16 11:44:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1388 +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1388 +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Column SET ColumnName='Ch_Revenue_Acct', Name='Charge Revenue (Deprecated)', Description='Charge Revenue Account', Help='The Charge Revenue Account identifies the account to use when recording charges paid by customers.' WHERE AD_Element_ID=1388 +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Process_Para SET ColumnName='Ch_Revenue_Acct', Name='Charge Revenue (Deprecated)', Description='Charge Revenue Account', Help='The Charge Revenue Account identifies the account to use when recording charges paid by customers.', AD_Element_ID=1388 WHERE UPPER(ColumnName)='CH_REVENUE_ACCT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Process_Para SET ColumnName='Ch_Revenue_Acct', Name='Charge Revenue (Deprecated)', Description='Charge Revenue Account', Help='The Charge Revenue Account identifies the account to use when recording charges paid by customers.' WHERE AD_Element_ID=1388 AND IsCentrallyMaintained='Y' +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Field SET Name='Charge Revenue (Deprecated)', Description='Charge Revenue Account', Help='The Charge Revenue Account identifies the account to use when recording charges paid by customers.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=1388) AND IsCentrallyMaintained='Y' +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_PrintFormatItem pi SET PrintName='Charge Revenue', Name='Charge Revenue (Deprecated)' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=1388) +; + +-- Aug 17, 2012 9:37:01 AM COT +UPDATE AD_Element SET Help='The Charge Account identifies the account to use when recording charges', Name='Charge Account', Description='Charge Account', PrintName='Charge Account',Updated=TO_DATE('2012-08-17 09:37:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1387 +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1387 +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Column SET ColumnName='Ch_Expense_Acct', Name='Charge Account', Description='Charge Account', Help='The Charge Account identifies the account to use when recording charges' WHERE AD_Element_ID=1387 +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Process_Para SET ColumnName='Ch_Expense_Acct', Name='Charge Account', Description='Charge Account', Help='The Charge Account identifies the account to use when recording charges', AD_Element_ID=1387 WHERE UPPER(ColumnName)='CH_EXPENSE_ACCT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Process_Para SET ColumnName='Ch_Expense_Acct', Name='Charge Account', Description='Charge Account', Help='The Charge Account identifies the account to use when recording charges' WHERE AD_Element_ID=1387 AND IsCentrallyMaintained='Y' +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Field SET Name='Charge Account', Description='Charge Account', Help='The Charge Account identifies the account to use when recording charges' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=1387) AND IsCentrallyMaintained='Y' +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_PrintFormatItem pi SET PrintName='Charge Account', Name='Charge Account' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=pi.AD_Column_ID AND c.AD_Element_ID=1387) +; + +-- Aug 17, 2012 9:39:00 AM COT +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-08-17 09:39:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4871 +; + +-- Aug 17, 2012 9:39:05 AM COT +ALTER TABLE C_AcctSchema_Default MODIFY Ch_Revenue_Acct NUMBER(10) DEFAULT NULL +; + +-- Aug 17, 2012 9:39:05 AM COT +ALTER TABLE C_AcctSchema_Default MODIFY Ch_Revenue_Acct NULL +; + +-- Aug 17, 2012 9:39:11 AM COT +UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-08-17 09:39:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4871 +; + +-- Aug 17, 2012 9:39:47 AM COT +UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2012-08-17 09:39:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3852 +; + +-- Aug 17, 2012 9:40:09 AM COT +UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2012-08-17 09:40:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5013 +; + +-- Aug 17, 2012 9:40:13 AM COT +ALTER TABLE C_Charge_Acct MODIFY Ch_Revenue_Acct NUMBER(10) DEFAULT NULL +; + +-- Aug 17, 2012 9:40:13 AM COT +ALTER TABLE C_Charge_Acct MODIFY Ch_Revenue_Acct NULL +; + +-- Aug 17, 2012 9:40:18 AM COT +UPDATE AD_Column SET IsActive='N',Updated=TO_DATE('2012-08-17 09:40:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5013 +; + +-- Aug 17, 2012 9:40:38 AM COT +UPDATE AD_Field SET IsActive='N',Updated=TO_DATE('2012-08-17 09:40:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4064 +; + +update c_charge_acct set ch_revenue_acct=NULL WHERE AD_Client_ID=11; + +update c_acctschema_default set ch_revenue_acct=NULL WHERE AD_Client_ID=11; + +ALTER TABLE c_charge_acct DROP CONSTRAINT vc_chrevenue_ccharge; + +ALTER TABLE c_acctschema_default DROP CONSTRAINT vc_chrevenue_cschemadefault; + +UPDATE AD_System + SET LastMigrationScriptApplied='879_IDEMPIERE-376.sql' +WHERE LastMigrationScriptApplied<'879_IDEMPIERE-376.sql' + OR LastMigrationScriptApplied IS NULL +; + diff --git a/migration/360lts-release/postgresql/879_IDEMPIERE-376.sql b/migration/360lts-release/postgresql/879_IDEMPIERE-376.sql new file mode 100644 index 0000000000..e0494d1773 --- /dev/null +++ b/migration/360lts-release/postgresql/879_IDEMPIERE-376.sql @@ -0,0 +1,110 @@ +-- Aug 16, 2012 11:44:05 AM COT +-- IDEMPIERE-879 Change to one account +UPDATE AD_Element SET Name='Charge Revenue (Deprecated)',Updated=TO_TIMESTAMP('2012-08-16 11:44:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Element_ID=1388 +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1388 +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Column SET ColumnName='Ch_Revenue_Acct', Name='Charge Revenue (Deprecated)', Description='Charge Revenue Account', Help='The Charge Revenue Account identifies the account to use when recording charges paid by customers.' WHERE AD_Element_ID=1388 +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Process_Para SET ColumnName='Ch_Revenue_Acct', Name='Charge Revenue (Deprecated)', Description='Charge Revenue Account', Help='The Charge Revenue Account identifies the account to use when recording charges paid by customers.', AD_Element_ID=1388 WHERE UPPER(ColumnName)='CH_REVENUE_ACCT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Process_Para SET ColumnName='Ch_Revenue_Acct', Name='Charge Revenue (Deprecated)', Description='Charge Revenue Account', Help='The Charge Revenue Account identifies the account to use when recording charges paid by customers.' WHERE AD_Element_ID=1388 AND IsCentrallyMaintained='Y' +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_Field SET Name='Charge Revenue (Deprecated)', Description='Charge Revenue Account', Help='The Charge Revenue Account identifies the account to use when recording charges paid by customers.' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=1388) AND IsCentrallyMaintained='Y' +; + +-- Aug 16, 2012 11:44:05 AM COT +UPDATE AD_PrintFormatItem SET PrintName='Charge Revenue', Name='Charge Revenue (Deprecated)' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=1388) +; + +-- Aug 17, 2012 9:37:01 AM COT +UPDATE AD_Element SET Help='The Charge Account identifies the account to use when recording charges', Name='Charge Account', Description='Charge Account', PrintName='Charge Account',Updated=TO_TIMESTAMP('2012-08-17 09:37:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=1387 +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Element_Trl SET IsTranslated='N' WHERE AD_Element_ID=1387 +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Column SET ColumnName='Ch_Expense_Acct', Name='Charge Account', Description='Charge Account', Help='The Charge Account identifies the account to use when recording charges' WHERE AD_Element_ID=1387 +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Process_Para SET ColumnName='Ch_Expense_Acct', Name='Charge Account', Description='Charge Account', Help='The Charge Account identifies the account to use when recording charges', AD_Element_ID=1387 WHERE UPPER(ColumnName)='CH_EXPENSE_ACCT' AND IsCentrallyMaintained='Y' AND AD_Element_ID IS NULL +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Process_Para SET ColumnName='Ch_Expense_Acct', Name='Charge Account', Description='Charge Account', Help='The Charge Account identifies the account to use when recording charges' WHERE AD_Element_ID=1387 AND IsCentrallyMaintained='Y' +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_Field SET Name='Charge Account', Description='Charge Account', Help='The Charge Account identifies the account to use when recording charges' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=1387) AND IsCentrallyMaintained='Y' +; + +-- Aug 17, 2012 9:37:02 AM COT +UPDATE AD_PrintFormatItem SET PrintName='Charge Account', Name='Charge Account' WHERE IsCentrallyMaintained='Y' AND EXISTS (SELECT * FROM AD_Column c WHERE c.AD_Column_ID=AD_PrintFormatItem.AD_Column_ID AND c.AD_Element_ID=1387) +; + +-- Aug 17, 2012 9:39:00 AM COT +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-08-17 09:39:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4871 +; + +-- Aug 17, 2012 9:39:05 AM COT +INSERT INTO t_alter_column values('c_acctschema_default','Ch_Revenue_Acct','NUMERIC(10)',null,'NULL') +; + +-- Aug 17, 2012 9:39:05 AM COT +INSERT INTO t_alter_column values('c_acctschema_default','Ch_Revenue_Acct',null,'NULL',null) +; + +-- Aug 17, 2012 9:39:11 AM COT +UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-17 09:39:11','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=4871 +; + +-- Aug 17, 2012 9:39:47 AM COT +UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-17 09:39:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=3852 +; + +-- Aug 17, 2012 9:40:09 AM COT +UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2012-08-17 09:40:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5013 +; + +-- Aug 17, 2012 9:40:13 AM COT +INSERT INTO t_alter_column values('c_charge_acct','Ch_Revenue_Acct','NUMERIC(10)',null,'NULL') +; + +-- Aug 17, 2012 9:40:13 AM COT +INSERT INTO t_alter_column values('c_charge_acct','Ch_Revenue_Acct',null,'NULL',null) +; + +-- Aug 17, 2012 9:40:18 AM COT +UPDATE AD_Column SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-17 09:40:18','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=5013 +; + +-- Aug 17, 2012 9:40:38 AM COT +UPDATE AD_Field SET IsActive='N',Updated=TO_TIMESTAMP('2012-08-17 09:40:38','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=4064 +; + +update c_charge_acct set ch_revenue_acct=NULL WHERE AD_Client_ID=11; + +update c_acctschema_default set ch_revenue_acct=NULL WHERE AD_Client_ID=11; + +ALTER TABLE c_charge_acct DROP CONSTRAINT vc_chrevenue_ccharge; + +ALTER TABLE c_acctschema_default DROP CONSTRAINT vc_chrevenue_cschemadefault; + +UPDATE AD_System + SET LastMigrationScriptApplied='879_IDEMPIERE-376.sql' +WHERE LastMigrationScriptApplied<'879_IDEMPIERE-376.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java index 516d46e93a..49b0f8ed10 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java @@ -484,7 +484,6 @@ public class AcctSchemaDefaultCopy extends SvrProcess { sql = "UPDATE C_Charge_Acct a " + "SET Ch_Expense_Acct=" + acct.getCh_Expense_Acct() - + ", Ch_Revenue_Acct=" + acct.getCh_Revenue_Acct() + ", Updated=SysDate, UpdatedBy=0 " + "WHERE a.C_AcctSchema_ID=" + p_C_AcctSchema_ID + " AND EXISTS (SELECT * FROM C_Charge_Acct x " @@ -497,10 +496,10 @@ public class AcctSchemaDefaultCopy extends SvrProcess sql = "INSERT INTO C_Charge_Acct " + "(C_Charge_ID, C_AcctSchema_ID," + " AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy," - + " Ch_Expense_Acct, Ch_Revenue_Acct) " + + " Ch_Expense_Acct) " + "SELECT x.C_Charge_ID, acct.C_AcctSchema_ID," + " x.AD_Client_ID, x.AD_Org_ID, 'Y', SysDate, 0, SysDate, 0," - + " acct.Ch_Expense_Acct, acct.Ch_Revenue_Acct " + + " acct.Ch_Expense_Acct " + "FROM C_Charge x" + " INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) " + "WHERE acct.C_AcctSchema_ID=" + p_C_AcctSchema_ID diff --git a/org.adempiere.base/src/org/compiere/FA/CreateInvoicedAsset.java b/org.adempiere.base/src/org/compiere/FA/CreateInvoicedAsset.java index b9bca2721c..ffde8c307c 100644 --- a/org.adempiere.base/src/org/compiere/FA/CreateInvoicedAsset.java +++ b/org.adempiere.base/src/org/compiere/FA/CreateInvoicedAsset.java @@ -594,14 +594,8 @@ public class CreateInvoicedAsset extends SvrProcess int invoiceAcct =0; if (M_Product_ID == 0 && C_Charge_ID != 0) { - if(lineAmt.signum() > 0){ - String sqlb = "SELECT CH_Expense_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? and C_AcctSchema_ID=?"; - invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,C_Charge_ID,C_AcctSchema_ID); - } - else{ - String sqlb = "SELECT CH_Revenue_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? and C_AcctSchema_ID=?"; - invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,C_Charge_ID,C_AcctSchema_ID); - } + String sqlb = "SELECT CH_Expense_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? and C_AcctSchema_ID=?"; + invoiceAcct = DB.getSQLValue(get_TrxName(),sqlb,C_Charge_ID,C_AcctSchema_ID); } else if(M_Product_ID != 0){ diff --git a/org.adempiere.base/src/org/compiere/acct/Doc.java b/org.adempiere.base/src/org/compiere/acct/Doc.java index 6421e3ed4f..8f2f5077c0 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc.java @@ -1187,10 +1187,9 @@ public abstract class Doc int cmp = getAmount(AMTTYPE_Charge).compareTo(Env.ZERO); if (cmp == 0) return 0; - else if (cmp < 0) - sql = "SELECT CH_Expense_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? AND C_AcctSchema_ID=?"; else - sql = "SELECT CH_Revenue_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? AND C_AcctSchema_ID=?"; + sql = "SELECT CH_Expense_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? AND C_AcctSchema_ID=?"; + para_1 = getC_Charge_ID(); } else if (AcctType == ACCTTYPE_V_Liability) diff --git a/org.adempiere.base/src/org/compiere/acct/DocLine.java b/org.adempiere.base/src/org/compiere/acct/DocLine.java index cd498ce7ee..c2729ee0c5 100644 --- a/org.adempiere.base/src/org/compiere/acct/DocLine.java +++ b/org.adempiere.base/src/org/compiere/acct/DocLine.java @@ -441,7 +441,7 @@ public class DocLine int C_Charge_ID = getC_Charge_ID(); if (C_Charge_ID == 0) return null; - return MCharge.getAccount(C_Charge_ID, as, amount); + return MCharge.getAccount(C_Charge_ID, as); } // getChargeAccount /** diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java b/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java index 03dd905649..c888349eac 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Payment.java @@ -127,7 +127,7 @@ public class Doc_Payment extends Doc // MAccount acct = null; if (getC_Charge_ID() != 0) - acct = MCharge.getAccount(getC_Charge_ID(), as, getAmount()); + acct = MCharge.getAccount(getC_Charge_ID(), as); else if (m_Prepayment) acct = getAccount(Doc.ACCTTYPE_C_Prepayment, as); else @@ -143,7 +143,7 @@ public class Doc_Payment extends Doc { MAccount acct = null; if (getC_Charge_ID() != 0) - acct = MCharge.getAccount(getC_Charge_ID(), as, getAmount()); + acct = MCharge.getAccount(getC_Charge_ID(), as); else if (m_Prepayment) acct = getAccount(Doc.ACCTTYPE_V_Prepayment, as); else diff --git a/org.adempiere.base/src/org/compiere/model/I_C_AcctSchema_Default.java b/org.adempiere.base/src/org/compiere/model/I_C_AcctSchema_Default.java index 8fe06b7932..d7e238c951 100644 --- a/org.adempiere.base/src/org/compiere/model/I_C_AcctSchema_Default.java +++ b/org.adempiere.base/src/org/compiere/model/I_C_AcctSchema_Default.java @@ -31,7 +31,7 @@ public interface I_C_AcctSchema_Default public static final String Table_Name = "C_AcctSchema_Default"; /** AD_Table_ID=315 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); + public static final int Table_ID = 315; KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -242,6 +242,15 @@ public interface I_C_AcctSchema_Default public I_C_ValidCombination getB_Unidentified_A() throws RuntimeException; + /** Column name C_AcctSchema_Default_UU */ + public static final String COLUMNNAME_C_AcctSchema_Default_UU = "C_AcctSchema_Default_UU"; + + /** Set C_AcctSchema_Default_UU */ + public void setC_AcctSchema_Default_UU (String C_AcctSchema_Default_UU); + + /** Get C_AcctSchema_Default_UU */ + public String getC_AcctSchema_Default_UU(); + /** Column name C_AcctSchema_ID */ public static final String COLUMNNAME_C_AcctSchema_ID = "C_AcctSchema_ID"; @@ -255,7 +264,7 @@ public interface I_C_AcctSchema_Default */ public int getC_AcctSchema_ID(); - public I_C_AcctSchema getC_AcctSchema() throws RuntimeException; + public org.compiere.model.I_C_AcctSchema getC_AcctSchema() throws RuntimeException; /** Column name CB_Asset_Acct */ public static final String COLUMNNAME_CB_Asset_Acct = "CB_Asset_Acct"; @@ -335,33 +344,18 @@ public interface I_C_AcctSchema_Default /** Column name Ch_Expense_Acct */ public static final String COLUMNNAME_Ch_Expense_Acct = "Ch_Expense_Acct"; - /** Set Charge Expense. - * Charge Expense Account + /** Set Charge Account. + * Charge Account */ public void setCh_Expense_Acct (int Ch_Expense_Acct); - /** Get Charge Expense. - * Charge Expense Account + /** Get Charge Account. + * Charge Account */ public int getCh_Expense_Acct(); public I_C_ValidCombination getCh_Expense_A() throws RuntimeException; - /** Column name Ch_Revenue_Acct */ - public static final String COLUMNNAME_Ch_Revenue_Acct = "Ch_Revenue_Acct"; - - /** Set Charge Revenue. - * Charge Revenue Account - */ - public void setCh_Revenue_Acct (int Ch_Revenue_Acct); - - /** Get Charge Revenue. - * Charge Revenue Account - */ - public int getCh_Revenue_Acct(); - - public I_C_ValidCombination getCh_Revenue_A() throws RuntimeException; - /** Column name C_Prepayment_Acct */ public static final String COLUMNNAME_C_Prepayment_Acct = "C_Prepayment_Acct"; diff --git a/org.adempiere.base/src/org/compiere/model/I_C_Charge_Acct.java b/org.adempiere.base/src/org/compiere/model/I_C_Charge_Acct.java index 421f7eff4d..1c2cce411b 100644 --- a/org.adempiere.base/src/org/compiere/model/I_C_Charge_Acct.java +++ b/org.adempiere.base/src/org/compiere/model/I_C_Charge_Acct.java @@ -31,7 +31,7 @@ public interface I_C_Charge_Acct public static final String Table_Name = "C_Charge_Acct"; /** AD_Table_ID=396 */ - public static final int Table_ID = MTable.getTable_ID(Table_Name); + public static final int Table_ID = 396; KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name); @@ -75,7 +75,16 @@ public interface I_C_Charge_Acct */ public int getC_AcctSchema_ID(); - public I_C_AcctSchema getC_AcctSchema() throws RuntimeException; + public org.compiere.model.I_C_AcctSchema getC_AcctSchema() throws RuntimeException; + + /** Column name C_Charge_Acct_UU */ + public static final String COLUMNNAME_C_Charge_Acct_UU = "C_Charge_Acct_UU"; + + /** Set C_Charge_Acct_UU */ + public void setC_Charge_Acct_UU (String C_Charge_Acct_UU); + + /** Get C_Charge_Acct_UU */ + public String getC_Charge_Acct_UU(); /** Column name C_Charge_ID */ public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID"; @@ -90,38 +99,23 @@ public interface I_C_Charge_Acct */ public int getC_Charge_ID(); - public I_C_Charge getC_Charge() throws RuntimeException; + public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException; /** Column name Ch_Expense_Acct */ public static final String COLUMNNAME_Ch_Expense_Acct = "Ch_Expense_Acct"; - /** Set Charge Expense. - * Charge Expense Account + /** Set Charge Account. + * Charge Account */ public void setCh_Expense_Acct (int Ch_Expense_Acct); - /** Get Charge Expense. - * Charge Expense Account + /** Get Charge Account. + * Charge Account */ public int getCh_Expense_Acct(); public I_C_ValidCombination getCh_Expense_A() throws RuntimeException; - /** Column name Ch_Revenue_Acct */ - public static final String COLUMNNAME_Ch_Revenue_Acct = "Ch_Revenue_Acct"; - - /** Set Charge Revenue. - * Charge Revenue Account - */ - public void setCh_Revenue_Acct (int Ch_Revenue_Acct); - - /** Get Charge Revenue. - * Charge Revenue Account - */ - public int getCh_Revenue_Acct(); - - public I_C_ValidCombination getCh_Revenue_A() throws RuntimeException; - /** Column name Created */ public static final String COLUMNNAME_Created = "Created"; diff --git a/org.adempiere.base/src/org/compiere/model/MCharge.java b/org.adempiere.base/src/org/compiere/model/MCharge.java index ad1b1f5643..838a60839d 100644 --- a/org.adempiere.base/src/org/compiere/model/MCharge.java +++ b/org.adempiere.base/src/org/compiere/model/MCharge.java @@ -39,25 +39,33 @@ public class MCharge extends X_C_Charge /** * */ - private static final long serialVersionUID = 630271473830196435L; - + private static final long serialVersionUID = 8246481667219415012L; /** * Get Charge Account * @param C_Charge_ID charge * @param as account schema - * @param amount amount for expense(+)/revenue(-) + * @param amount amount NOT USED * @return Charge Account or null + * @deprecated use getAccount(Charge, as) instead */ public static MAccount getAccount (int C_Charge_ID, MAcctSchema as, BigDecimal amount) + { + return getAccount (C_Charge_ID, as); + } // getAccount + + /** + * Get Charge Account + * @param C_Charge_ID charge + * @param as account schema + * @return Charge Account or null + */ + public static MAccount getAccount (int C_Charge_ID, MAcctSchema as) { if (C_Charge_ID == 0 || as == null) return null; - String acctName = X_C_Charge_Acct.COLUMNNAME_Ch_Expense_Acct; // Expense (positive amt) - if (amount != null && amount.signum() < 0) - acctName = X_C_Charge_Acct.COLUMNNAME_Ch_Revenue_Acct; // Revenue (negative amt) - String sql = "SELECT "+acctName+" FROM C_Charge_Acct WHERE C_Charge_ID=? AND C_AcctSchema_ID=?"; + String sql = "SELECT Ch_Expense_Acct FROM C_Charge_Acct WHERE C_Charge_ID=? AND C_AcctSchema_ID=?"; int Account_ID = DB.getSQLValueEx(null, sql, C_Charge_ID, as.get_ID()); // No account if (Account_ID <= 0) diff --git a/org.adempiere.base/src/org/compiere/model/MSetup.java b/org.adempiere.base/src/org/compiere/model/MSetup.java index ce6bbff582..d187c631e6 100644 --- a/org.adempiere.base/src/org/compiere/model/MSetup.java +++ b/org.adempiere.base/src/org/compiere/model/MSetup.java @@ -553,7 +553,7 @@ public final class MSetup sqlCmd.append(getAD_Org_ID()).append(" WHERE C_AcctSchema_Element_ID=").append(C_AcctSchema_Element_ID); no = DB.executeUpdate(sqlCmd.toString(), m_trx.getTrxName()); if (no != 1) - log.log(Level.SEVERE, "Default Org in AcctSchamaElement NOT updated"); + log.log(Level.SEVERE, "Default Org in AcctSchemaElement NOT updated"); } if (ElementType.equals("AC")) { @@ -562,7 +562,7 @@ public final class MSetup sqlCmd.append(" WHERE C_AcctSchema_Element_ID=").append(C_AcctSchema_Element_ID); no = DB.executeUpdate(sqlCmd.toString(), m_trx.getTrxName()); if (no != 1) - log.log(Level.SEVERE, "Default Account in AcctSchamaElement NOT updated"); + log.log(Level.SEVERE, "Default Account in AcctSchemaElement NOT updated"); } } } @@ -777,6 +777,8 @@ public final class MSetup MColumn[] cols = table.getColumns(false); for (MColumn c : cols) { + if (!c.isActive()) + continue; String columnName = c.getColumnName(); if (c.isStandardColumn()) { } diff --git a/org.adempiere.base/src/org/compiere/model/X_C_AcctSchema_Default.java b/org.adempiere.base/src/org/compiere/model/X_C_AcctSchema_Default.java index 3fdee14bfc..1e7bce2396 100644 --- a/org.adempiere.base/src/org/compiere/model/X_C_AcctSchema_Default.java +++ b/org.adempiere.base/src/org/compiere/model/X_C_AcctSchema_Default.java @@ -30,7 +30,7 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default /** * */ - private static final long serialVersionUID = 20100614L; + private static final long serialVersionUID = 20120817L; /** Standard Constructor */ public X_C_AcctSchema_Default (Properties ctx, int C_AcctSchema_Default_ID, String trxName) @@ -57,7 +57,6 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default setCB_Expense_Acct (0); setCB_Receipt_Acct (0); setCh_Expense_Acct (0); - setCh_Revenue_Acct (0); setC_Prepayment_Acct (0); setC_Receivable_Acct (0); setC_Receivable_Services_Acct (0); @@ -442,9 +441,23 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default return ii.intValue(); } - public I_C_AcctSchema getC_AcctSchema() throws RuntimeException + /** Set C_AcctSchema_Default_UU. + @param C_AcctSchema_Default_UU C_AcctSchema_Default_UU */ + public void setC_AcctSchema_Default_UU (String C_AcctSchema_Default_UU) + { + set_Value (COLUMNNAME_C_AcctSchema_Default_UU, C_AcctSchema_Default_UU); + } + + /** Get C_AcctSchema_Default_UU. + @return C_AcctSchema_Default_UU */ + public String getC_AcctSchema_Default_UU () + { + return (String)get_Value(COLUMNNAME_C_AcctSchema_Default_UU); + } + + public org.compiere.model.I_C_AcctSchema getC_AcctSchema() throws RuntimeException { - return (I_C_AcctSchema)MTable.get(getCtx(), I_C_AcctSchema.Table_Name) + return (org.compiere.model.I_C_AcctSchema)MTable.get(getCtx(), org.compiere.model.I_C_AcctSchema.Table_Name) .getPO(getC_AcctSchema_ID(), get_TrxName()); } /** Set Accounting Schema. @@ -608,17 +621,17 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) .getPO(getCh_Expense_Acct(), get_TrxName()); } - /** Set Charge Expense. + /** Set Charge Account. @param Ch_Expense_Acct - Charge Expense Account + Charge Account */ public void setCh_Expense_Acct (int Ch_Expense_Acct) { set_Value (COLUMNNAME_Ch_Expense_Acct, Integer.valueOf(Ch_Expense_Acct)); } - /** Get Charge Expense. - @return Charge Expense Account + /** Get Charge Account. + @return Charge Account */ public int getCh_Expense_Acct () { @@ -628,31 +641,6 @@ public class X_C_AcctSchema_Default extends PO implements I_C_AcctSchema_Default return ii.intValue(); } - public I_C_ValidCombination getCh_Revenue_A() throws RuntimeException - { - return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) - .getPO(getCh_Revenue_Acct(), get_TrxName()); } - - /** Set Charge Revenue. - @param Ch_Revenue_Acct - Charge Revenue Account - */ - public void setCh_Revenue_Acct (int Ch_Revenue_Acct) - { - set_Value (COLUMNNAME_Ch_Revenue_Acct, Integer.valueOf(Ch_Revenue_Acct)); - } - - /** Get Charge Revenue. - @return Charge Revenue Account - */ - public int getCh_Revenue_Acct () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Ch_Revenue_Acct); - if (ii == null) - return 0; - return ii.intValue(); - } - public I_C_ValidCombination getC_Prepayment_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) diff --git a/org.adempiere.base/src/org/compiere/model/X_C_Charge_Acct.java b/org.adempiere.base/src/org/compiere/model/X_C_Charge_Acct.java index e266d1462d..d53152f0c0 100644 --- a/org.adempiere.base/src/org/compiere/model/X_C_Charge_Acct.java +++ b/org.adempiere.base/src/org/compiere/model/X_C_Charge_Acct.java @@ -29,7 +29,7 @@ public class X_C_Charge_Acct extends PO implements I_C_Charge_Acct, I_Persistent /** * */ - private static final long serialVersionUID = 20100614L; + private static final long serialVersionUID = 20120817L; /** Standard Constructor */ public X_C_Charge_Acct (Properties ctx, int C_Charge_Acct_ID, String trxName) @@ -40,7 +40,6 @@ public class X_C_Charge_Acct extends PO implements I_C_Charge_Acct, I_Persistent setC_AcctSchema_ID (0); setC_Charge_ID (0); setCh_Expense_Acct (0); - setCh_Revenue_Acct (0); } */ } @@ -72,9 +71,9 @@ public class X_C_Charge_Acct extends PO implements I_C_Charge_Acct, I_Persistent return sb.toString(); } - public I_C_AcctSchema getC_AcctSchema() throws RuntimeException + public org.compiere.model.I_C_AcctSchema getC_AcctSchema() throws RuntimeException { - return (I_C_AcctSchema)MTable.get(getCtx(), I_C_AcctSchema.Table_Name) + return (org.compiere.model.I_C_AcctSchema)MTable.get(getCtx(), org.compiere.model.I_C_AcctSchema.Table_Name) .getPO(getC_AcctSchema_ID(), get_TrxName()); } /** Set Accounting Schema. @@ -100,9 +99,23 @@ public class X_C_Charge_Acct extends PO implements I_C_Charge_Acct, I_Persistent return ii.intValue(); } - public I_C_Charge getC_Charge() throws RuntimeException + /** Set C_Charge_Acct_UU. + @param C_Charge_Acct_UU C_Charge_Acct_UU */ + public void setC_Charge_Acct_UU (String C_Charge_Acct_UU) + { + set_Value (COLUMNNAME_C_Charge_Acct_UU, C_Charge_Acct_UU); + } + + /** Get C_Charge_Acct_UU. + @return C_Charge_Acct_UU */ + public String getC_Charge_Acct_UU () + { + return (String)get_Value(COLUMNNAME_C_Charge_Acct_UU); + } + + public org.compiere.model.I_C_Charge getC_Charge() throws RuntimeException { - return (I_C_Charge)MTable.get(getCtx(), I_C_Charge.Table_Name) + return (org.compiere.model.I_C_Charge)MTable.get(getCtx(), org.compiere.model.I_C_Charge.Table_Name) .getPO(getC_Charge_ID(), get_TrxName()); } /** Set Charge. @@ -133,17 +146,17 @@ public class X_C_Charge_Acct extends PO implements I_C_Charge_Acct, I_Persistent return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) .getPO(getCh_Expense_Acct(), get_TrxName()); } - /** Set Charge Expense. + /** Set Charge Account. @param Ch_Expense_Acct - Charge Expense Account + Charge Account */ public void setCh_Expense_Acct (int Ch_Expense_Acct) { set_Value (COLUMNNAME_Ch_Expense_Acct, Integer.valueOf(Ch_Expense_Acct)); } - /** Get Charge Expense. - @return Charge Expense Account + /** Get Charge Account. + @return Charge Account */ public int getCh_Expense_Acct () { @@ -152,29 +165,4 @@ public class X_C_Charge_Acct extends PO implements I_C_Charge_Acct, I_Persistent return 0; return ii.intValue(); } - - public I_C_ValidCombination getCh_Revenue_A() throws RuntimeException - { - return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) - .getPO(getCh_Revenue_Acct(), get_TrxName()); } - - /** Set Charge Revenue. - @param Ch_Revenue_Acct - Charge Revenue Account - */ - public void setCh_Revenue_Acct (int Ch_Revenue_Acct) - { - set_Value (COLUMNNAME_Ch_Revenue_Acct, Integer.valueOf(Ch_Revenue_Acct)); - } - - /** Get Charge Revenue. - @return Charge Revenue Account - */ - public int getCh_Revenue_Acct () - { - Integer ii = (Integer)get_Value(COLUMNNAME_Ch_Revenue_Acct); - if (ii == null) - return 0; - return ii.intValue(); - } } \ No newline at end of file diff --git a/org.adempiere.server-feature/data/import/AccountingUS.csv b/org.adempiere.server-feature/data/import/AccountingUS.csv index 7a346aea2a..6f5b458db4 100644 --- a/org.adempiere.server-feature/data/import/AccountingUS.csv +++ b/org.adempiere.server-feature/data/import/AccountingUS.csv @@ -333,7 +333,7 @@ 79400,"Cash book expense","Default other expense for petty cash transactions","Expense",,"Yes","No","CB_EXPENSE_ACCT",79,,,,,,,,,, 79500,"Cash book receipts","Default other revenue for petty cash transactions","Revenue",,"Yes","No","CB_RECEIPT_ACCT",79,,,,,,,,,, 79600,"Charge expense","Default other expense","Expense",,"Yes","No","CH_EXPENSE_ACCT",79,,,,,,,,,, -79700,"Charge revenue","Default other revenue","Revenue",,"Yes","No","CH_REVENUE_ACCT",79,,,,,,,,,, +79700,"Charge revenue","Default other revenue","Revenue",,"Yes","No",,79,,,,,,,,,, ,,,,,,,,,,,,,"79_","Total Operating Expenses",,,, ,,,,,,,,,,,,,"79__","Operating Income",,,, 80,"Other Income",,"Revenue",,,"Yes",,,,,,,80,"Other Income",,,, diff --git a/org.adempiere.server-feature/data/import/AccountingUS.xls b/org.adempiere.server-feature/data/import/AccountingUS.xls index 2fde4fc4ca30187a57b4774c3286ad0b4fc7e679..fc8ced345b7c3ed77e3da5cc7fb9acd6c819e77a 100644 GIT binary patch delta 1561 zcmY+ETTEP46o%J-m@^j~W`F@&Zgse}(-|&OkXlBe&{k_HcLa*i0SdiC!2}9YN*Y^D zHIc}}GBIgVWBOuknoQz6m^2N>H=Foid>}@fG);__hZ+Jtq|5|&m zv(GF)aV$S^-2L8ZJw*Hm=Q~-rxjLA?1n=s4{!u&ANi-9W6chyEjUSHQ3B)}eS6y~l zC(+OG)xM6KRvzMy|BAY~3W(GNEuw!Yl{(;~7!}D1mXkVR)4bL@kw(X<*kpC;tP)-U z@=?mSfu5k2N+sbQ`KSwi8lh1dlfO(_vQnx0OAD}yh#KjmM-E-H8z4WGnVQ|OWL3`1 z4%A~OFE|h?+$Btzd!T&9kCVP0?F;dJ2hL(QM{Kks%!{_{CBh%8RR#ZIV_ZU;6BYhS z)1hB?sN(BR=}^sUPK5j~7&f3;4L?(C57)Sa)f#q8vpPQG680j0s#v{YgPQH-b;Vxd zOgBQ<$5FRzqJck9p_G4AA<7XC1`thL^WY21|FZGNwEq=u_KLre7ra|eJ)%!N>ag{+ zM)awh_`X-F?dS9~3C$c!hP!EU_!j;)O-|jyH9k4@0n=ezcR0wCKIw3XZ~0{RuNpR? zSq=ZB*lV2Q7k1dNlbY3Wn_t-Ld`+<$x2@&tQDva=&1plZhHme(raWEV8y(dh~S-9nb{#SEWK9)l?zG+aO)P%{L)7>Xc_c`7D zq{*B^itObS-_Az2|FjV=ir6HgF9-YmXN)*+#NnJRBUmuvXG%P4GT$~ef6bAa=Zv^$ zGF!KyK78JYmy+V<%1KR>N69H&f=fQmNxriUq41PRS^A%030nal|*9*S70@Ozut|iq6T?+^7}{)P)~(27;2Z}Dyd!Wi_67V@i~dL61@_eB&JDh<=!fMp6!;$v5}c`Q*Q-nhdj&lsGf7H n5phm^_+WYQ0n5CyR#zNliREfsw2+zjy9Sqm_Y(89co+WyTJ$dN delta 1585 zcmY+ETTEPK5Xa|#cF)4%E(cg><$jTi%Ux)pRcJvjwv__Qa)-*Lg%(P=HFBwTi%rqQ zpf-|p9!yM&i7#H#WRq^vn8p_qW8bvtL*KM9@c|pEiP{IFbH4p-@SNmKzWL36X1+P! zIcwX_wQc9kdoF_<;rp&D$p~)_rHA0%e2{+J^tp)6hf6aua*!21TKA7Y$gUI%F zBA!MmPgXEo6o5&q${&E2M(8;m6;M(6JP)L!fH#2dTLxe>+TsEUxgc^-7apXnE7>$;UL@8_tlTj`4Vx)Wzn z!X6VHDCJ>OS}EfddsWWgnwSt%?n0SWp)2&O3Y9$Vk_s>ImJ5EXO0xmQs`-J<_Hj~- zu>G11DpteCVuaQ5Wt$z)Y)G+#eA{L(@^8ZM5@*Cp6Lmaen*#pIHudarV*vG$NjJVQ ztV3Eqs`Q6B&m;N<9`x+m^_bfAxYJbA8dJM&E_A>9-rimN8%3Srz=9~F*uk5;+ zlj3F9ExN*ls?f^q@lxRxemh>eKcd;BV%2=dW=HuCn;p~av|=?}ZV7vpCoN%Znw?SX zAb)JL<9y#{?V3#~*1_=!!aBJ%K_(L5`2^{+i@&x_Jtrih1wrmjl!*lSW}>v)t>v>y z-ox98BJbt=B-C1cn$0QJ&(q?>0B_lBP_uc(hWHno4RekU)g>o1TTrL5`nd-1(%|NNZPZ=hM532y~}}I_#%N+l*8Rdplc2{eHwLs zlqOM*62r~8exyXcPe&n4r{SiDQJ#>AbHGj{l!XPzk1g^z8$&RI4j(l{B<(uPZF%n$ zjeeAeZ{Qdvo$YQuPQXkvJd_&c4TTto`9yls>2DX|6!1YL+mFjIK>SHDDstt$$pv*2 zWy%jrUr`{{elNzaw@R^N$RT`Oj;7okL2(jQD)t$%2gG{BHjDL&?c|;ce3ojvn#LAq z=FaDIy*_n;vSclDqZ&@BM5*h&8;Nb}cUdNtym{4`8(FKwih-)glPX*SHX^J0@DBb3 D0(CN7 diff --git a/org.adempiere.ui/src/org/compiere/apps/form/Charge.java b/org.adempiere.ui/src/org/compiere/apps/form/Charge.java index 1db75fce76..626e3029ef 100644 --- a/org.adempiere.ui/src/org/compiere/apps/form/Charge.java +++ b/org.adempiere.ui/src/org/compiere/apps/form/Charge.java @@ -297,7 +297,6 @@ public class Charge { StringBuffer sql = new StringBuffer("UPDATE C_Charge_Acct "); sql.append("SET CH_Expense_Acct=").append(account.getC_ValidCombination_ID()); - sql.append(", CH_Revenue_Acct=").append(account.getC_ValidCombination_ID()); sql.append(" WHERE C_Charge_ID=").append(charge.getC_Charge_ID()); sql.append(" AND C_AcctSchema_ID=").append(m_C_AcctSchema_ID);