Author: jleroux
Date: Sat Feb 10 09:18:34 2018 New Revision: 1823737 URL: http://svn.apache.org/viewvc?rev=1823737&view=rev Log: Improved: Add seqId to GlAccountClass table to support the sorting of GLAccount sub classes (OFBIZ-10209) Arun: Most "liquid" assets should be first (i.e Bank/Cash before Inventory) so need to provide support to sort GLAccount classes. Add seqId to GlAccountClass entity to support the sorting of GLAccount sub classes. Suraj: Also rearranged GlAccountClass data in a logical grouping for better readability Jacques: I counted 35 lines GlAccountClass moved, did not check each line Thanks: Arun Patidar for report and Suraj Khurana for the patch Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FieldLookupForms.xml ofbiz/ofbiz-framework/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/AccountingSeedData.xml ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/accounting-entitymodel.xml Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FieldLookupForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FieldLookupForms.xml?rev=1823737&r1=1823736&r2=1823737&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FieldLookupForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/widget/FieldLookupForms.xml Sat Feb 10 09:18:34 2018 @@ -127,7 +127,7 @@ under the License. <field name="glAccountClassId" title="${uiLabelMap.AccountingGlAccountClass}"> <drop-down allow-empty="true"> <entity-options entity-name="GlAccountClass"> - <entity-order-by field-name="description"/> + <entity-order-by field-name="sequenceNum"/> </entity-options> </drop-down> </field> Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml?rev=1823737&r1=1823736&r2=1823737&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml Sat Feb 10 09:18:34 2018 @@ -127,7 +127,7 @@ under the License. <field name="glAccountClassId"> <drop-down allow-empty="false"> <entity-options entity-name="GlAccountClass"> - <entity-order-by field-name="description"/> + <entity-order-by field-name="sequenceNum"/> </entity-options> </drop-down> </field> Modified: ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/AccountingSeedData.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/AccountingSeedData.xml?rev=1823737&r1=1823736&r2=1823737&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/AccountingSeedData.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/datamodel/data/seed/AccountingSeedData.xml Sat Feb 10 09:18:34 2018 @@ -263,44 +263,47 @@ under the License. RESOURCE --> - <GlAccountClass description="Debit" glAccountClassId="DEBIT" parentClassId=""/> - <GlAccountClass description="Credit" glAccountClassId="CREDIT" parentClassId=""/> - <GlAccountClass description="Resource" glAccountClassId="RESOURCE" parentClassId=""/> - <GlAccountClass description="Asset" glAccountClassId="ASSET" parentClassId="DEBIT"/> - <GlAccountClass description="Current Asset" glAccountClassId="CURRENT_ASSET" parentClassId="ASSET"/> - <GlAccountClass description="Cash and Equivalent" glAccountClassId="CASH_EQUIVALENT" parentClassId="CURRENT_ASSET"/> - <GlAccountClass description="Inventory Asset" glAccountClassId="INVENTORY_ASSET" parentClassId="CURRENT_ASSET"/> - <GlAccountClass description="Long Term Asset" glAccountClassId="LONGTERM_ASSET" parentClassId="ASSET"/> - <GlAccountClass description="Liability" glAccountClassId="LIABILITY" parentClassId="CREDIT"/> - <GlAccountClass description="Current Liability" glAccountClassId="CURRENT_LIABILITY" parentClassId="LIABILITY"/> - <GlAccountClass description="Long Term Liability" glAccountClassId="LONGTERM_LIABILITY" parentClassId="LIABILITY"/> - <GlAccountClass description="Equity" glAccountClassId="EQUITY" parentClassId="CREDIT"/> - <GlAccountClass description="Owners Equity" glAccountClassId="OWNERS_EQUITY" parentClassId="EQUITY"/> - <GlAccountClass description="Retained Earnings" glAccountClassId="RETAINED_EARNINGS" parentClassId="EQUITY"/> - <GlAccountClass description="Equity Distribution" glAccountClassId="DISTRIBUTION" parentClassId="DEBIT"/> - <GlAccountClass description="Return of Capital" glAccountClassId="RETURN_OF_CAPITAL" parentClassId="DISTRIBUTION"/> - <GlAccountClass description="Dividends" glAccountClassId="DIVIDEND" parentClassId="DISTRIBUTION"/> - <GlAccountClass description="Revenue" glAccountClassId="REVENUE" parentClassId="CREDIT"/> - <GlAccountClass description="Contra Revenue" glAccountClassId="CONTRA_REVENUE" parentClassId="DEBIT"/> - <GlAccountClass description="Income" glAccountClassId="INCOME" parentClassId="CREDIT"/> - <GlAccountClass description="Cash Income" glAccountClassId="CASH_INCOME" parentClassId="INCOME"/> - <GlAccountClass description="Non-Cash Income" glAccountClassId="NON_CASH_INCOME" parentClassId="INCOME"/> - <GlAccountClass description="Expense" glAccountClassId="EXPENSE" parentClassId="DEBIT"/> - <GlAccountClass description="Cash Expense" glAccountClassId="CASH_EXPENSE" parentClassId="EXPENSE"/> - <GlAccountClass description="Interest Expense" glAccountClassId="INTEREST_EXPENSE" parentClassId="CASH_EXPENSE"/> <!-- useful for EBITDA, coverage ratios, etc. --> - <GlAccountClass description="Cost of Goods Sold Expense" glAccountClassId="COGS_EXPENSE" parentClassId="CASH_EXPENSE"/> <!-- used for Gross Profit --> - <GlAccountClass description="Selling, General, and Administrative Expense" glAccountClassId="SGA_EXPENSE" parentClassId="CASH_EXPENSE"/> - <GlAccountClass description="Non-Cash Expense" glAccountClassId="NON_CASH_EXPENSE" parentClassId="EXPENSE"/> - <GlAccountClass description="Depreciation" glAccountClassId="DEPRECIATION" parentClassId="NON_CASH_EXPENSE"/> - <GlAccountClass description="Amortization" glAccountClassId="AMORTIZATION" parentClassId="NON_CASH_EXPENSE"/> - <!-- a special class for non-cash inventory adjustment expenses to avoid duplicating operating cash flow adjustments for inventory - account transactions, which adjust operating cash flows --> - <GlAccountClass description="Inventory Adjustment" glAccountClassId="INVENTORY_ADJUST" parentClassId="NON_CASH_EXPENSE"/> + <GlAccountClass description="Debit" glAccountClassId="DEBIT" parentClassId="" sequenceNum="100"/> + <GlAccountClass description="Credit" glAccountClassId="CREDIT" parentClassId="" sequenceNum="200"/> + <GlAccountClass description="Resource" glAccountClassId="RESOURCE" parentClassId="" sequenceNum="300"/> + + <GlAccountClass description="Asset" glAccountClassId="ASSET" parentClassId="DEBIT" sequenceNum="110"/> + <GlAccountClass description="Equity Distribution" glAccountClassId="DISTRIBUTION" parentClassId="DEBIT" sequenceNum="130"/> + <GlAccountClass description="Expense" glAccountClassId="EXPENSE" parentClassId="DEBIT" sequenceNum="150"/> + <GlAccountClass description="Contra Revenue" glAccountClassId="CONTRA_REVENUE" parentClassId="DEBIT" sequenceNum="170"/> + <GlAccountClass description="Non-Posting" glAccountClassId="NON_POSTING" parentClassId="DEBIT" sequenceNum="190"/> + + <GlAccountClass description="Liability" glAccountClassId="LIABILITY" parentClassId="CREDIT" sequenceNum="210"/> + <GlAccountClass description="Equity" glAccountClassId="EQUITY" parentClassId="CREDIT" sequenceNum="230"/> + <GlAccountClass description="Revenue" glAccountClassId="REVENUE" parentClassId="CREDIT" sequenceNum="250"/> + <GlAccountClass description="Contra Asset" glAccountClassId="CONTRA_ASSET" parentClassId="CREDIT" sequenceNum="270"/> + <GlAccountClass description="Income" glAccountClassId="INCOME" parentClassId="CREDIT" sequenceNum="290"/> + + <GlAccountClass description="Current Asset" glAccountClassId="CURRENT_ASSET" parentClassId="ASSET" sequenceNum="115"/> + <GlAccountClass description="Long Term Asset" glAccountClassId="LONGTERM_ASSET" parentClassId="ASSET" sequenceNum="125"/> + <GlAccountClass description="Cash and Equivalent" glAccountClassId="CASH_EQUIVALENT" parentClassId="CURRENT_ASSET" sequenceNum="120"/> + <GlAccountClass description="Inventory Asset" glAccountClassId="INVENTORY_ASSET" parentClassId="CURRENT_ASSET" sequenceNum="122"/> + <GlAccountClass description="Return of Capital" glAccountClassId="RETURN_OF_CAPITAL" parentClassId="DISTRIBUTION" sequenceNum="135"/> + <GlAccountClass description="Dividends" glAccountClassId="DIVIDEND" parentClassId="DISTRIBUTION" sequenceNum="145"/> + <GlAccountClass description="Cash Expense" glAccountClassId="CASH_EXPENSE" parentClassId="EXPENSE" sequenceNum="155"/> + <GlAccountClass description="Non-Cash Expense" glAccountClassId="NON_CASH_EXPENSE" parentClassId="EXPENSE" sequenceNum="165"/> + <GlAccountClass description="Interest Expense" glAccountClassId="INTEREST_EXPENSE" parentClassId="CASH_EXPENSE" sequenceNum="160"/> <!-- useful for EBITDA, coverage ratios, etc. --> + <GlAccountClass description="Cost of Goods Sold Expense" glAccountClassId="COGS_EXPENSE" parentClassId="CASH_EXPENSE" sequenceNum="162"/> <!-- used for Gross Profit --> + <GlAccountClass description="Selling, General, and Administrative Expense" glAccountClassId="SGA_EXPENSE" parentClassId="CASH_EXPENSE" sequenceNum="165"/> + <GlAccountClass description="Depreciation" glAccountClassId="DEPRECIATION" parentClassId="NON_CASH_EXPENSE" sequenceNum="166"/> + <GlAccountClass description="Amortization" glAccountClassId="AMORTIZATION" parentClassId="NON_CASH_EXPENSE" sequenceNum="168"/> + <!-- a special class for non-cash inventory adjustment expenses to avoid duplicating operating cash flow adjustments for inventory account transactions, which adjust operating cash flows --> + <GlAccountClass description="Inventory Adjustment" glAccountClassId="INVENTORY_ADJUST" parentClassId="NON_CASH_EXPENSE" sequenceNum="169"/> + + <GlAccountClass description="Current Liability" glAccountClassId="CURRENT_LIABILITY" parentClassId="LIABILITY" sequenceNum="215"/> + <GlAccountClass description="Long Term Liability" glAccountClassId="LONGTERM_LIABILITY" parentClassId="LIABILITY" sequenceNum="225"/> + <GlAccountClass description="Owners Equity" glAccountClassId="OWNERS_EQUITY" parentClassId="EQUITY" sequenceNum="235"/> + <GlAccountClass description="Retained Earnings" glAccountClassId="RETAINED_EARNINGS" parentClassId="EQUITY" sequenceNum="245"/> <!-- same idea: these avoid double counting of depreciation & amortization --> - <GlAccountClass description="Contra Asset" glAccountClassId="CONTRA_ASSET" parentClassId="CREDIT"/> - <GlAccountClass description="Accumulated Depreciation" glAccountClassId="ACCUM_DEPRECIATION" parentClassId="CONTRA_ASSET"/> - <GlAccountClass description="Accumulated Amortization" glAccountClassId="ACCUM_AMORTIZATION" parentClassId="CONTRA_ASSET"/> - <GlAccountClass description="Non-Posting" glAccountClassId="NON_POSTING" parentClassId="DEBIT"/> + <GlAccountClass description="Accumulated Depreciation" glAccountClassId="ACCUM_DEPRECIATION" parentClassId="CONTRA_ASSET" sequenceNum="275"/> + <GlAccountClass description="Accumulated Amortization" glAccountClassId="ACCUM_AMORTIZATION" parentClassId="CONTRA_ASSET" sequenceNum="285"/> + <GlAccountClass description="Cash Income" glAccountClassId="CASH_INCOME" parentClassId="INCOME" sequenceNum="295"/> + <GlAccountClass description="Non-Cash Income" glAccountClassId="NON_CASH_INCOME" parentClassId="INCOME" sequenceNum="298"/> <GlAccountType description="Not Applicable" glAccountTypeId="_NA_" hasTable="N" parentTypeId=""/> <GlAccountType description="Accounts Receivable" glAccountTypeId="ACCOUNTS_RECEIVABLE" hasTable="N" parentTypeId=""/> Modified: ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/accounting-entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/accounting-entitymodel.xml?rev=1823737&r1=1823736&r2=1823737&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/accounting-entitymodel.xml (original) +++ ofbiz/ofbiz-framework/trunk/applications/datamodel/entitydef/accounting-entitymodel.xml Sat Feb 10 09:18:34 2018 @@ -2104,6 +2104,7 @@ under the License. <field name="parentClassId" type="id"></field> <field name="description" type="description"></field> <field name="isAssetClass" type="indicator"></field> + <field name="sequenceNum" type="numeric"></field> <prim-key field="glAccountClassId"/> <relation type="one" fk-name="GLACTCLS_PAR" title="Parent" rel-entity-name="GlAccountClass"> <key-map field-name="parentClassId" rel-field-name="glAccountClassId"/> |
Free forum by Nabble | Edit this page |