Author: mor
Date: Wed Apr 23 07:24:22 2008 New Revision: 650883 URL: http://svn.apache.org/viewvc?rev=650883&view=rev Log: Applied patch for UI: Review/Improve/Cleanup the /accounting/control/EditAcctgTrans screen part of Jira issue OFBIZ-1440 (https://issues.apache.org/jira/browse/OFBIZ-1440), Thanks to Brajesh Patel for providing patch and special thanks to Ashish and Jacopo for help and review Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml ofbiz/trunk/applications/accounting/widget/GlForms.xml ofbiz/trunk/applications/accounting/widget/GlScreens.xml Modified: ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml?rev=650883&r1=650882&r2=650883&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml (original) +++ ofbiz/trunk/applications/accounting/config/AccountingUiLabels.xml Wed Apr 23 07:24:22 2008 @@ -5660,6 +5660,9 @@ <value xml:lang="en">Total excl. tax</value> <value xml:lang="th">Total excl. tax</value> </property> + <property key="AccountingTransactionHasBeenAlreadyPosted"> + <value xml:lang="en">Transaction has been already posted</value> + </property> <property key="AccountingTransactionTotals"> <value xml:lang="en">Transaction Totals</value> <value xml:lang="it">Totali Prime Note</value> @@ -8144,6 +8147,9 @@ <value xml:lang="th">à¹à¸à¸´à¹à¸¡à¸à¸±à¸à¸£à¸²à¸ าษีสิà¸à¸à¹à¸²</value> <value xml:lang="zh">æ°å»ºç¨å¡æºå ³äº§åç¨ç</value> </property> + <property key="PageTitleAddTransactionEntry"> + <value xml:lang="en">Add Transaction Entry</value> + </property> <property key="PageTitleCopyAgreement"> <value xml:lang="en">Copy Agreement</value> <value xml:lang="it">Copia Contratto</value> @@ -8494,6 +8500,12 @@ <value xml:lang="th">à¹à¸à¹à¹à¸à¸à¸±à¸à¸£à¸²à¸ าษีสิà¸à¸à¹à¸²</value> <value xml:lang="zh">ç¼è¾ç¨å¡æºå ³äº§åç¨ç</value> </property> + <property key="PageTitleEditTransaction"> + <value xml:lang="en">Edit Transaction</value> + </property> + <property key="PageTitleEditTransactionEntries"> + <value xml:lang="en">Edit Transaction Entries</value> + </property> <property key="PageTitleFinAccount"> <value xml:lang="en">Financial Account</value> <value xml:lang="fr">Compte financier</value> @@ -8961,6 +8973,12 @@ <value xml:lang="th">à¹à¸ªà¸à¸à¸à¸±à¸à¸à¸µà¹à¸¢à¸à¸à¸£à¸°à¹à¸ à¸à¸à¸±à¹à¸§à¹à¸</value> <value xml:lang="zh">æµè§æ»è´¦è´¦æ·è®°å½</value> </property> + <property key="PageTitleViewTransaction"> + <value xml:lang="en">View Transaction</value> + </property> + <property key="PageTitleViewTransactionEntries"> + <value xml:lang="en">View Transaction Entries</value> + </property> <property key="PartyPartyId"> <value xml:lang="en">Party ID</value> <value xml:lang="es">Id Grupo</value> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml?rev=650883&r1=650882&r2=650883&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml Wed Apr 23 07:24:22 2008 @@ -37,6 +37,10 @@ </simple-method> <simple-method method-name="updateAcctgTrans" short-description="Update an AcctgTrans"> <entity-one entity-name="AcctgTrans" value-name="lookedUpValue"/> + <if-compare field-name="lookedUpValue.isPosted" operator="equals" value="Y"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingTransactionHasBeenAlreadyPosted"/></add-error> + <check-errors/> + </if-compare> <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/> <set from-field="userLogin.userLoginId" field="lookedUpValue.lastModifiedByUserLogin"/> @@ -45,6 +49,10 @@ </simple-method> <simple-method method-name="deleteAcctgTrans" short-description="Delete an AcctgTrans"> <entity-one entity-name="AcctgTrans" value-name="lookedUpValue"/> + <if-compare field-name="lookedUpValue.isPosted" operator="equals" value="Y"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingTransactionHasBeenAlreadyPosted"/></add-error> + <check-errors/> + </if-compare> <remove-value value-name="lookedUpValue"/> </simple-method> <simple-method method-name="updateAcctgTransLastModified" short-description="Update AcctgTrans LastModified Info"> @@ -59,6 +67,11 @@ <make-value entity-name="AcctgTransEntry" value-name="newEntity"/> <set-nonpk-fields map-name="parameters" value-name="newEntity"/> <set-pk-fields map-name="parameters" value-name="newEntity"/> + <entity-one entity-name="AcctgTrans" value-name="acctgTrans"/> + <if-compare field-name="acctgTrans.isPosted" operator="equals" value="Y"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingTransactionHasBeenAlreadyPosted"/></add-error> + <check-errors/> + </if-compare> <make-next-seq-id value-name="newEntity" seq-field-name="acctgTransEntrySeqId" numeric-padding="5"/> <field-to-result field-name="newEntity.acctgTransEntrySeqId" result-name="acctgTransEntrySeqId"/> @@ -82,6 +95,11 @@ <!-- call-simple-method method-name="updateAcctgTransLastModified"/ --> </simple-method> <simple-method method-name="updateAcctgTransEntry" short-description="Update Entry To AcctgTrans"> + <entity-one entity-name="AcctgTrans" value-name="acctgTrans"/> + <if-compare field-name="acctgTrans.isPosted" operator="equals" value="Y"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingTransactionHasBeenAlreadyPosted"/></add-error> + <check-errors/> + </if-compare> <entity-one entity-name="AcctgTransEntry" value-name="lookedUpValue"/> <set-nonpk-fields map-name="parameters" value-name="lookedUpValue"/> <store-value value-name="lookedUpValue"/> @@ -90,6 +108,11 @@ <call-simple-method method-name="updateAcctgTransLastModified"/> </simple-method> <simple-method method-name="deleteAcctgTransEntry" short-description="Remove Entry From AcctgTrans"> + <entity-one entity-name="AcctgTrans" value-name="acctgTrans"/> + <if-compare field-name="acctgTrans.isPosted" operator="equals" value="Y"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingTransactionHasBeenAlreadyPosted"/></add-error> + <check-errors/> + </if-compare> <entity-one entity-name="AcctgTransEntry" value-name="lookedUpValue"/> <remove-value value-name="lookedUpValue"/> Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml?rev=650883&r1=650882&r2=650883&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml (original) +++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/GeneralLedgerServices.xml Wed Apr 23 07:24:22 2008 @@ -265,6 +265,10 @@ <!-- ========== GL Posting Services ========== --> <simple-method method-name="completeAcctgTransEntries" short-description="Completes, if possible, the AcctgTransEntries using the mappings defined in the gl setup"> <entity-one entity-name="AcctgTrans" value-name="acctgTrans"/> + <if-compare field-name="acctgTrans.isPosted" operator="equals" value="Y"> + <add-error><fail-property resource="AccountingUiLabels" property="AccountingTransactionHasBeenAlreadyPosted"/></add-error> + <check-errors/> + </if-compare> <get-related value-name="acctgTrans" relation-name="AcctgTransEntry" list-name="acctgTransEntries"/> <iterate list-name="acctgTransEntries" entry-name="acctgTransEntry"> <!-- if the glAccountId is empty, but we have a glAccountTypeId, then we will determine the Modified: ofbiz/trunk/applications/accounting/widget/GlForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlForms.xml?rev=650883&r1=650882&r2=650883&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlForms.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlForms.xml Wed Apr 23 07:24:22 2008 @@ -733,4 +733,51 @@ <field name="organizationPartyId"><display/></field> <field name="reconciledBalance"><display/></field> </form> + <form name="ViewAcctgTrans" type="single" default-map-name="acctgTrans" + default-table-style="basic-table"> + <auto-fields-service service-name="updateAcctgTrans" default-field-type="display"/> + <field name="acctgTransTypeId" title="${uiLabelMap.AccountingTransactionType}"> + <display-entity entity-name="AcctgTransType" description="${description}"/> + </field> + <field name="glFiscalTypeId"> + <display-entity entity-name="GlFiscalType" description="${description}"/> + </field> + <field name="roleTypeId"> + <display-entity entity-name="RoleType" description="${description}"/> + </field> + <field name="groupStatusId"> + <display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/> + </field> + </form> + <form name="ViewAcctgTransEntries" type="list" list-name="acctgTransEntries" default-entity-name="AcctgTransEntry" + default-table-style="basic-table"> + <field name="organizationPartyId"><hidden/></field> + <field name="acctgTransId"><hidden/></field> + <field name="acctgTransEntrySeqId"><display/></field> + <field name="glAccountTypeId"> + <display-entity entity-name="GlAccountType" description="${description}"/> + </field> + <field name="glAccountId"> + <display-entity entity-name="GlAccount" description="${glAccountId} ${accountName}"/> + </field> + <field name="description"><display/></field> + <field name="voucherRef"><display/></field> + <field name="partyId" widget-style="buttontext"> + <display-entity entity-name="PartyNameView" description="${firstName} ${middleName} ${lastName} ${groupName}"> + <sub-hyperlink target="/partymgr/control/viewprofile?partyId=${partyId}" target-type="inter-app" description="${partyId}" link-style="buttontext"/> + </display-entity> + </field> + <field name="productId" widget-style="buttontext"> + <display-entity entity-name="Product" description="${internalName}"> + <sub-hyperlink target="/catalog/control/EditProduct?productId=${productId}" target-type="inter-app" description="${productId}" link-style="buttontext"/> + </display-entity> + </field> + <field name="reconcileStatusId"> + <display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/> + </field> + <field name="isSummary"><display/></field> + <field name="debitCreditFlag"><display/></field> + <field name="origAmount"><display type="currency" currency="${origCurrencyUomId}"/></field> + <field name="amount"><display type="currency" currency="${currencyUomId}"/></field> + </form> </forms> Modified: ofbiz/trunk/applications/accounting/widget/GlScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/GlScreens.xml?rev=650883&r1=650882&r2=650883&view=diff ============================================================================== --- ofbiz/trunk/applications/accounting/widget/GlScreens.xml (original) +++ ofbiz/trunk/applications/accounting/widget/GlScreens.xml Wed Apr 23 07:24:22 2008 @@ -240,27 +240,64 @@ <container style="screenlet"> <container style="screenlet-title-bar"> <container style="h3"> - <label text="${uiLabelMap.PageTitleEditTransaction}"/> + <section> + <condition> + <if-compare field-name="acctgTrans.isPosted" operator="equals" value="Y"/> + </condition> + <widgets> + <label text="${uiLabelMap.PageTitleViewTransaction}"/> + </widgets> + <fail-widgets> + <label text="${uiLabelMap.PageTitleEditTransaction}"/> + </fail-widgets> + </section> </container> </container> <container style="screenlet-body"> <link text="${uiLabelMap.AccountingDuplicateAccountingTransaction}" style="buttontext" target="copyAcctgTransAndEntries?revert=N&fromAcctgTransId=${acctgTransId}&organizationPartyId=${organizationPartyId}"/> <link text="${uiLabelMap.AccountingRevertAccountingTransaction}" style="buttontext" target="copyAcctgTransAndEntries?revert=Y&fromAcctgTransId=${acctgTransId}&organizationPartyId=${organizationPartyId}"/> - <include-form name="EditAcctgTrans" location="component://accounting/widget/GlForms.xml"/> + <section> + <condition> + <if-compare field-name="acctgTrans.isPosted" operator="equals" value="Y"/> + </condition> + <widgets> + <include-form name="ViewAcctgTrans" location="component://accounting/widget/GlForms.xml"/> + </widgets> + <fail-widgets> + <include-form name="EditAcctgTrans" location="component://accounting/widget/GlForms.xml"/> + </fail-widgets> + </section> </container> </container> </container> <container> <container style="screenlet"> - <container style="screenlet-title-bar"> - <container style="h3"> - <label text="${uiLabelMap.PageTitleEditTransactionEntries}"/> - </container> - </container> - <container style="screenlet-body"> - <include-form name="ListAcctgTransEntries" location="component://accounting/widget/GlForms.xml"/> - </container> - </container> + <section> + <condition> + <if-compare field-name="acctgTrans.isPosted" operator="equals" value="Y"/> + </condition> + <widgets> + <container style="screenlet-title-bar"> + <container style="h3"> + <label text="${uiLabelMap.PageTitleViewTransactionEntries}"/> + </container> + </container> + <container style="screenlet-body"> + <include-form name="ViewAcctgTransEntries" location="component://accounting/widget/GlForms.xml"/> + </container> + </widgets> + <fail-widgets> + <container style="screenlet-title-bar"> + <container style="h3"> + <label text="${uiLabelMap.PageTitleEditTransactionEntries}"/> + </container> + </container> + <container style="screenlet-body"> + <include-form name="ListAcctgTransEntries" location="component://accounting/widget/GlForms.xml"/> + </container> + </fail-widgets> + </section> + </container> </container> </widgets> </section> |
Free forum by Nabble | Edit this page |