Author: jacopoc
Date: Thu Apr 24 07:39:46 2014
New Revision: 1589623

URL: http://svn.apache.org/r1589623
Log:
Usability improvement for management of manual Gl transactions (OFBIZ-5559): 
thanks to Anahita Goljahani for the patch and to Pierre Smits for the tests and 
review.
Main changes introduced:
* new "Not available" data types that can be applied when transaction, account 
and resource type are not specified
* fixed some screens that were still displaying the account pk rather than the 
account code
* misc enhancements to the editing of manual transactions and chart of accounts
 


Modified:
    ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
    ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
    ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
    ofbiz/trunk/applications/accounting/widget/AccountingTrees.xml
    ofbiz/trunk/applications/accounting/widget/GlForms.xml
    ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml

Modified: ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml?rev=1589623&r1=1589622&r2=1589623&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml (original)
+++ ofbiz/trunk/applications/accounting/data/AccountingTypeData.xml Thu Apr 24 
07:39:46 2014
@@ -18,6 +18,7 @@ specific language governing permissions 
 under the License.
 -->
 <entity-engine-xml>
+    <AcctgTransType acctgTransTypeId="_NA_" description="Not Applicable" 
hasTable="N" parentTypeId=""/>
     <AcctgTransType acctgTransTypeId="INTERNAL_ACCTG_TRANS" 
description="Internal" hasTable="Y" parentTypeId=""/>
     <AcctgTransType acctgTransTypeId="AMORTIZATION" description="Amortization" 
hasTable="N" parentTypeId="INTERNAL_ACCTG_TRANS"/>
     <AcctgTransType acctgTransTypeId="DEPRECIATION" description="Depreciation" 
hasTable="Y" parentTypeId="INTERNAL_ACCTG_TRANS"/>
@@ -301,6 +302,7 @@ under the License.
     <GlAccountClass description="Accumulated Amortization" 
glAccountClassId="ACCUM_AMORTIZATION" parentClassId="CONTRA_ASSET"/>
     <GlAccountClass description="Non-Posting" glAccountClassId="NON_POSTING" 
parentClassId="DEBIT"/>
 
+    <GlAccountType description="Not Applicable" glAccountTypeId="_NA_" 
hasTable="N" parentTypeId=""/>
     <GlAccountType description="Accounts Receivable" 
glAccountTypeId="ACCOUNTS_RECEIVABLE" hasTable="N" parentTypeId=""/>
     <GlAccountType description="Accounts Payable" 
glAccountTypeId="ACCOUNTS_PAYABLE" hasTable="N" parentTypeId=""/>
     <GlAccountType description="Balance" glAccountTypeId="BALANCE_ACCOUNT" 
hasTable="N" parentTypeId=""/>
@@ -368,6 +370,7 @@ under the License.
     <GlAccountType description="Foreign Exchange Gain" 
glAccountTypeId="FX_GAIN_ACCOUNT" hasTable="N" 
parentTypeId="FX_GAIN_LOSS_ACCT"/>
     <GlAccountType description="Foreign Exchange Loss" 
glAccountTypeId="FX_LOSS_ACCOUNT" hasTable="N" 
parentTypeId="FX_GAIN_LOSS_ACCT"/>
 
+    <GlResourceType description="Not Applicable" glResourceTypeId="_NA_"/>
     <GlResourceType description="Money" glResourceTypeId="MONEY"/>
     <GlResourceType description="Raw Materials" 
glResourceTypeId="RAW_MATERIALS"/>
     <GlResourceType description="Labor" glResourceTypeId="LABOR"/>

Modified: ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml?rev=1589623&r1=1589622&r2=1589623&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/accounting/entitydef/entitymodel.xml Thu Apr 24 
07:39:46 2014
@@ -1917,6 +1917,7 @@ under the License.
       <alias entity-alias="ATR" name="workEffortId"/>
       <alias entity-alias="ATR" name="fixedAssetId"/>
       <alias entity-alias="ATR" name="physicalInventoryId"/>
+      <alias entity-alias="ATR" name="description"/>
       <alias entity-alias="ATE" name="acctgTransId"/>
       <alias entity-alias="ATE" name="acctgTransEntrySeqId"/>
       <alias entity-alias="ATE" name="glAccountId"/>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml?rev=1589623&r1=1589622&r2=1589623&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml 
(original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_ledger.xml Thu Apr 
24 07:39:46 2014
@@ -31,8 +31,8 @@ under the License.
             
location="component://accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml"
 invoke="createGlAccount" auth="true">
         <description>Create a GlAccount record</description>
         <permission-service service-name="basicGeneralLedgerPermissionCheck" 
main-action="CREATE"/>
-        <auto-attributes include="pk" mode="INOUT" optional="false"/>
-        <auto-attributes include="nonpk" mode="IN" optional="true"/>
+        <auto-attributes include="pk" mode="OUT" optional="false"/>
+        <auto-attributes include="all" mode="IN" optional="true"/>
         <override name="glAccountTypeId" optional="false"/>
         <override name="glAccountClassId" optional="false"/>
         <override name="glResourceTypeId" optional="false"/>

Modified: ofbiz/trunk/applications/accounting/widget/AccountingTrees.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AccountingTrees.xml?rev=1589623&r1=1589622&r2=1589623&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/AccountingTrees.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/AccountingTrees.xml Thu Apr 24 
07:39:46 2014
@@ -25,20 +25,20 @@ under the License.
             <sub-node node-name="node-body">
                 <entity-and entity-name="GlAccount">
                     <field-map field-name="parentGlAccountId" 
from-field="null"/>
-                    <order-by field-name="glAccountId"/>
+                    <order-by field-name="accountCode"/>
                 </entity-and>
             </sub-node>
         </node>
         <node name="node-body">
             <entity-one entity-name="GlAccount" 
value-field="glAccount"></entity-one>
-            <link target="GlAccountNavigate" text="${glAccountId} 
${glAccount.accountName}">
+            <link target="GlAccountNavigate" text="${glAccount.accountCode} 
${glAccount.accountName}">
                 <parameter param-name="glAccountId"/>
                 <parameter param-name="trail"/>
             </link>
             <sub-node node-name="node-body">
                 <entity-and entity-name="GlAccount">
                     <field-map field-name="parentGlAccountId" 
from-field="glAccountId"/>
-                    <order-by field-name="glAccountId"/>
+                    <order-by field-name="accountCode"/>
                 </entity-and>
             </sub-node>
         </node>
@@ -48,20 +48,20 @@ under the License.
             <sub-node node-name="node-body">
                 <entity-and entity-name="GlAccount">
                     <field-map field-name="parentGlAccountId" 
from-field="null"/>
-                    <order-by field-name="glAccountId"/>
+                    <order-by field-name="accountCode"/>
                 </entity-and>
             </sub-node>
         </node>
         <node name="node-body">
             <entity-one entity-name="GlAccount" 
value-field="glAccount"></entity-one>
-            <link target="GlAccountNavigate" text="${glAccountId} 
${glAccount.accountName}">
+            <link target="GlAccountNavigate" text="${glAccount.accountCode} 
${glAccount.accountName}">
                 <parameter param-name="glAccountId"/>
                 <parameter param-name="trail"/>
             </link>
             <sub-node node-name="node-body">
                 <entity-and entity-name="GlAccount">
                     <field-map field-name="parentGlAccountId" 
from-field="glAccountId"/>
-                    <order-by field-name="glAccountId"/>
+                    <order-by field-name="accountCode"/>
                 </entity-and>
             </sub-node>
         </node>

Modified: ofbiz/trunk/applications/accounting/widget/GlForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlForms.xml?rev=1589623&r1=1589622&r2=1589623&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/GlForms.xml Thu Apr 24 07:39:46 
2014
@@ -88,6 +88,7 @@ under the License.
                 <select-field field-name="acctgTransId"/>
                 <select-field field-name="transactionDate"/>
                 <select-field field-name="acctgTransTypeId"/>
+                <select-field field-name="description"/>
                 <select-field field-name="glFiscalTypeId"/>
                 <select-field field-name="invoiceId"/>
                 <select-field field-name="paymentId"/>
@@ -107,6 +108,7 @@ under the License.
         </field>
         <field name="transactionDate"><display/></field>
         <field name="acctgTransTypeId" 
title="${uiLabelMap.FormFieldTitle_acctgTransType}"><display-entity 
entity-name="AcctgTransType"/></field>
+        <field name="description"><display/></field>
         <field name="glFiscalTypeId" 
title="${uiLabelMap.FormFieldTitle_glFiscalType}"><display-entity 
entity-name="GlFiscalType"/></field>
         <field name="invoiceId" use-when="invoiceId!=null" 
widget-style="buttontext">
             <hyperlink also-hidden="false" description="${invoiceId}" 
target="editInvoice">
@@ -563,8 +565,7 @@ under the License.
         <field name="updateButton" title="${uiLabelMap.CommonUpdate}"><submit 
button-type="button"/></field>
     </form>
 
-    <form name="EditAcctgTransEntry" type="single" 
target="updateAcctgTransEntry" default-map-name="acctgTransEntry" 
default-entity-name="AcctgTransEntry">
-        <alt-target use-when="acctgTransEntry==null" 
target="createAcctgTransEntry"/>
+    <form name="EditAcctgTransEntry" type="single" 
target="createAcctgTransEntry" default-entity-name="AcctgTransEntry">
         <field name="organizationPartyId"><hidden/></field>
         <field name="acctgTransId"><hidden/></field>
         <field name="acctgTransEntrySeqId"><hidden/></field>
@@ -576,7 +577,7 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
-        <field name="glAccountId" position="2">
+        <field name="glAccountId" position="2" entry-name="resetFieldValue">
             <drop-down allow-empty="true">
                 <entity-options entity-name="GlAccountOrganizationAndClass" 
key-field-name="glAccountId" description="${accountCode} - ${accountName} 
[${glAccountId}]">
                     <entity-constraint name="organizationPartyId" 
operator="equals" env-name="parameters.organizationPartyId"/>
@@ -584,14 +585,14 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
-        <field name="debitCreditFlag" position="1">
+        <field name="debitCreditFlag" position="1" 
entry-name="resetFieldValue">
             <drop-down current="selected">
                 <option description="${uiLabelMap.FormFieldTitle_credit}" 
key="C"/>
                 <option description="${uiLabelMap.FormFieldTitle_debit}" 
key="D"/>
             </drop-down>
         </field>
         <field name="partyId" position="2"><text size="30"/></field>
-        <field name="origAmount" position="1"><text size="30"/></field>
+        <field name="origAmount" position="1" 
entry-name="resetFieldValue"><text size="30"/></field>
         <field name="origCurrencyUomId" position="2">
             <drop-down allow-empty="true" 
no-current-selected-key="${defaultOrganizationPartyCurrencyUomId}">
                 <entity-options key-field-name="uomId" 
description="${description} - ${abbreviation}" entity-name="Uom">
@@ -610,12 +611,18 @@ under the License.
         </field>
         <field name="voucherRef" position="2"><text size="30"/></field>
         <field name="productId" position="1"><text size="20"/></field>
-        <field name="reconcileStatusId" position="2"><text size="30"/></field>
+        <field name="reconcileStatusId" position="2" 
title="${uiLabelMap.FormFieldTitle_reconcileStatus}">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="StatusItem" 
key-field-name="statusId" description="${description}">
+                    <entity-constraint name="statusTypeId" operator="equals" 
value="ACCTG_ENREC_STATUS"/>
+                    <entity-order-by field-name="statusId"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="settlementTermId" position="1"><text size="20"/></field>
         <field name="isSummary" position="2"><text size="10"/></field>
-        <field name="description" position="1"><text size="30"/></field>
-        <field use-when="acctgTransEntry!=null" name="updateButton" 
title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" ><submit 
button-type="text-link"/></field>
-        <field use-when="acctgTransEntry==null" name="createButton" 
title="${uiLabelMap.CommonCreate}" widget-style="buttontext" ><submit 
button-type="text-link"/></field>
+        <field name="description" position="1" 
entry-name="resetFieldValue"><text size="30"/></field>
+        <field name="createButton" title="${uiLabelMap.CommonCreate}" 
widget-style="buttontext" ><submit button-type="text-link"/></field>
     </form>
     <form name="ListAcctgTransEntries" type="list" 
list-name="acctgTransEntries" default-entity-name="AcctgTransEntry" 
target="updateAcctgTransEntry"
         odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
@@ -686,7 +693,7 @@ under the License.
         <auto-fields-service service-name="createAcctgTrans"/>
         <field name="organizationPartyId"><hidden 
value="${organizationPartyId}"/></field>
         <field name="acctgTransTypeId" 
title="${uiLabelMap.FormFieldTitle_acctgTransType}" position="1">
-            <drop-down>
+            <drop-down no-current-selected-key="_NA_">
                 <entity-options entity-name="AcctgTransType" 
description="${description}">
                     <entity-order-by field-name="description"/>
                 </entity-options>

Modified: ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml?rev=1589623&r1=1589622&r2=1589623&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml 
(original)
+++ ofbiz/trunk/applications/accounting/widget/GlobalGlAccountsForms.xml Thu 
Apr 24 07:39:46 2014
@@ -104,13 +104,12 @@ under the License.
         <alt-target use-when="glAccount==null" target="createGlAccount"/>
         <auto-fields-service service-name="updateGlAccount" map-name=""/>
 
-        <field use-when="glAccount!=null" name="glAccountId" 
tooltip="${uiLabelMap.AccountingNotModificationRecrationGlAccount}"><display/></field>
-        <field use-when="glAccount==null&amp;&amp;glAccountId!=null" 
name="glAccountId" tooltip="${uiLabelMap.AccountingCouldNotFindGlAccount} 
[${glAccountId}]"><text size="20" maxlength="20"/></field>
+        <field name="glAccountId"><display/></field>
+        <field use-when="glAccount==null&amp;&amp;glAccountId!=null" 
name="glAccountId" tooltip="${uiLabelMap.AccountingCouldNotFindGlAccount} 
[${glAccountId}]"><display/></field>
         <!-- this to be taken care of with auto-fields-service as soon as it 
uses entity field info too -->
-        <field use-when="glAccount==null&amp;&amp;glAccountId==null" 
name="glAccountId"><text size="20" maxlength="20"/></field>
 
         <field name="glAccountTypeId">
-            <drop-down allow-empty="false">
+            <drop-down allow-empty="false" no-current-selected-key="_NA_">
                 <entity-options entity-name="GlAccountType" 
description="${description}">
                     <entity-order-by field-name="description"/>
                 </entity-options>
@@ -124,7 +123,7 @@ under the License.
             </drop-down>
         </field>
         <field name="glResourceTypeId">
-            <drop-down allow-empty="false">
+            <drop-down allow-empty="false" no-current-selected-key="_NA_">
                 <entity-options entity-name="GlResourceType" 
description="${description}">
                     <entity-order-by field-name="description"/>
                 </entity-options>


Reply via email to