[OFBiz] SVN: r7225 - in trunk/applications/accounting: webapp/accounting/WEB-INF/actions/invoice webapp/accounting/invoice webapp/accounting/payment widget

hansbak@svn.ofbiz.org hansbak at svn.ofbiz.org
Thu Apr 6 22:36:02 CDT 2006


Author: hansbak
Date: 2006-04-06 22:35:40 -0500 (Thu, 06 Apr 2006)
New Revision: 7225

Modified:
   trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh
   trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
   trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml
   trunk/applications/accounting/widget/InvoiceScreens.xml
Log:
added currencies to screens, make screens fit and not overflow

Modified: trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh
===================================================================
--- trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh	2006-04-07 02:17:11 UTC (rev 7224)
+++ trunk/applications/accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh	2006-04-07 03:35:40 UTC (rev 7225)
@@ -63,6 +63,7 @@
            paymentMap.put("paymentId", payment.getString("paymentId"));
            paymentMap.put("effectiveDate", payment.getString("effectiveDate").substring(0,10)); // list as YYYY-MM-DD
            paymentMap.put("amount", payment.getBigDecimal("amount").setScale(decimals,rounding).toString());
+           paymentMap.put("currencyUomId", payment.getString("currencyUomId"));
            paymentMap.put("paymentApplied", paymentApplied.toString());
            BigDecimal paymentToApply = payment.getBigDecimal("amount").setScale(decimals,rounding).subtract(paymentApplied);
            if (paymentToApply.compareTo(invoiceToApply) < 0 ) {

Modified: trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml
===================================================================
--- trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml	2006-04-07 02:17:11 UTC (rev 7224)
+++ trunk/applications/accounting/webapp/accounting/invoice/InvoiceForms.xml	2006-04-07 03:35:40 UTC (rev 7225)
@@ -115,20 +115,23 @@
         <field position="1" name="invoiceDate" title="${uiLabelMap.AccountingInvoiceDate}"><display/></field>
         <field position="2" name="dueDate" title="${uiLabelMap.AccountingDueDate}"><display/></field>
         <field position="1" name="paidDate" title="${uiLabelMap.AccountingPaidDate}"><display/></field>
-        <field position="1" name="invoiceAmount"><display description="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)}" type="currency" currency="${invoice.currencyUomId}" also-hidden="false"/></field>
+        <field position="1" name="invoiceAmount" ><display description="${bsh:org.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotalBd(delegator,invoiceId)}" type="currency" currency="${invoice.currencyUomId}" also-hidden="false"/></field>
         <field position="2" name="currencyUomId" title="${uiLabelMap.CommonCurrencyUom}"><display/></field>
     </form>
 
     <form name="invoiceItems" default-title-style="tableheadtext"
         default-tooltip-style="tabletext" default-widget-style="tabletext" list-name="invoiceItems"
         target="" paginate-target="InvoiceItems" title="" type="list" separate-columns="true">
+        <row-actions>
+            <set field="total" value="${bsh:if(quantity == null) quantity = 1;if(amount==null) amount = 0;return(quantity*amount);}"/>
+        </row-actions>
         <auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/>
         <field name="invoiceId"><hidden/></field>
         <field name="invoiceItemSeqId" title="Item No."><display/></field>
         <field name="invoiceItemTypeId" title="ItemType"><display-entity description="${description}" entity-name="InvoiceItemType"/></field>
         <field name="inventoryItemId" widget-area-style="tabletextright"><display/></field>
         <field name="quantity" widget-area-style="tabletextright"><display/></field>
-        <field name="amount" title="Amount" widget-area-style="tabletextright"><display type="currency" currency="${invoice.currencyUomId}"/></field>
+        <field name="amount" title="Amount" widget-area-style="tabletextright"><display type="currency" currency="${invoice.currencyUomId}" description="${amount}"/></field>
         <field name="total" title="Line Total" widget-area-style="tabletextright"><display type="currency" currency="${invoice.currencyUomId}"/></field>
         <field name="productId" widget-style="linktext"><hyperlink target="EditProduct?productId=${productId}" description="${productId}"/></field>
         <field name="overrideGlAccountId" title="Override GlAccount" widget-area-style="tabletextright"><hyperlink target="GlAccountNavigate?glAccountId=${overrideGlAccountId}" description="${overrideGlAccountId}"/></field>
@@ -225,10 +228,10 @@
     
    <form name="EditInvoiceItems" type="list"  list-name="invoiceItems" default-entity-name="InvoiceItem"
         target="updateInvoiceItem" title="Edit Invoice Items" default-title-style="tableheadtext"
-        default-widget-style="inputBox" default-tooltip-style="tabletext" separate-columns="true">
-       <actions>
-           <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/createItemList.bsh"/>
-       </actions>
+        default-widget-style="inputBox" default-tooltip-style="tabletext">
+       <row-actions>
+           <set field="total" value="${bsh:if(quantity==null||quantity==1) quantity = 1; total=quantity*amount;}"/>
+       </row-actions>
        <field name="invoiceId"><hidden/></field>
        <field name="invoiceItemSeqId" title="Item No." widget-style="buttontext"><hyperlink target="listInvoiceItems?invoiceId=${invoiceId}&amp;invoiceItemSeqId=${invoiceItemSeqId}" description="${invoiceItemSeqId}"/></field>
        <field name="quantity"><text size="3"/></field>
@@ -252,24 +255,12 @@
        </field>
        <!--field name="overrideGlAccountId"><text size="10"/></field-->
        <field name="amount"><text size="7"/></field>
-       <field name="total" title="Line Total" widget-style="tabletext"><display type="currency" currency="${uomId}"/></field>  <!-- this should not look like something you can modify, hence "tabletext" -->
+       <field name="total" title="Line Total" widget-style="tabletext" use-when="uomId!=null"><display type="currency" currency="${uomId}"/></field>  <!-- this should not look like something you can modify, hence "tabletext" -->
+       <field name="total" title="Line Total" widget-style="tabletext" use-when="uomId==null"><display type="currency" currency="${invoice.currencyUomId}"/></field>  <!-- this should not look like something you can modify, hence "tabletext" -->
        <field name="uomId"><hidden/></field>
-       <!--field position="2" name="uomId" title="${uiLabelMap.CommonUom}">
-           <drop-down allow-empty="true" current="selected" no-current-selected-key="${invoice.currencyUomId}">
-               <entity-options key-field-name="uomId" description="${abbreviation}" entity-name="Uom">
-                   <entity-order-by field-name="abbreviation"/>
-               </entity-options>            
-           </drop-down>
-       </field-->
        <field name="taxableFlag"><hidden/></field>
-       <!--field name="taxableFlag">
-          <drop-down allow-empty="false" current="selected">
-              <option key="Y" description="Yes"/>
-              <option key="N" description="No"/>
-          </drop-down>
-       </field-->
-       <field name="Update" widget-style="buttontext"><submit button-type="text-link"/></field>
-       <field name="Remove" widget-style="buttontext">
+       <field name="Update" widget-style="buttontext" ><submit button-type="text-link"/></field>
+       <field name="Remove"  widget-style="buttontext">
             <hyperlink description="${uiLabelMap.CommonRemove}" target="removeInvoiceItem?invoiceId=${invoiceId}&amp;invoiceItemSeqId=${invoiceItemSeqId}"/>
        </field>
     </form>
@@ -343,7 +334,8 @@
         <field name="invoiceItemSeqId" title="ItemNr"><display/></field>
         <field name="productId"><display/></field>
         <field name="description"><display/></field>
-        <field name="total" title="Amt"><display/></field>
+        <field name="total" title="Line Total" widget-style="tabletext" use-when="uomId!=null"><display type="currency" currency="${uomId}"/></field>  <!-- this should not look like something you can modify, hence "tabletext" -->
+        <field name="total" title="Line Total" widget-style="tabletext" use-when="uomId==null"><display type="currency" currency="${invoice.currencyUomId}"/></field>  <!-- this should not look like something you can modify, hence "tabletext" -->
         <field name="invoiceId"><hidden/></field>
         <field name="paymentId" widget-style="inputBox"><lookup target-form-name="LookupPayment"/></field>
         <field name="billingAccountId"><hidden/></field>
@@ -368,15 +360,15 @@
 
     <form name="ListPaymentsNotApplied" type="list" list-name="payments"
         target="updateInvoiceApplication" title=""
-        default-title-style="tableheadtext" default-widget-style="inputBox" default-tooltip-style="tabletext">
+        default-title-style="tableheadtext" default-widget-style="tabletext" default-tooltip-style="tabletext">
         <actions>
             <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/listNotAppliedPayments.bsh"/>
         </actions>
         <field name="invoiceId"><hidden/></field>
         <field name="paymentId" widget-style="buttontext"><hyperlink target="paymentOverview?paymentId=${paymentId}" description="[${paymentId}]"/></field>
-        <field name="amount"><display/></field>
+        <field name="amount"><display type="currency" currency="${currencyUomId}"/></field>
         <field name="effectiveDate"><display/></field>
-        <field name="paymentApplied" title="Already Applied"><display/></field>
+        <field name="paymentApplied" title="Already Applied"><display type="currency" currency="${currencyUomId}"/></field>
         <field name="amountToApply" title="to apply now" parameter-name="amountApplied"><text size="10"/></field>
         <field name="submitButton" title="Submit" widget-style="smallSubmit">
             <submit button-type="button"/>

Modified: trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml
===================================================================
--- trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml	2006-04-07 02:17:11 UTC (rev 7224)
+++ trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml	2006-04-07 03:35:40 UTC (rev 7225)
@@ -262,7 +262,7 @@
         <field name="partyIdTo" position="2"><hyperlink target="/partymgr/control/viewprofile?partyId=${payment.partyIdTo}" target-type="inter-app" description="${partyNameResultTo.fullName} [${payment.partyIdFrom}]"/></field>
         <field name="paymentRefNum" position="1"><display/></field>
         <field name="paymentPreferenceId" position="2"><display/></field>
-        <field name="amount" position="1"><display/></field>
+        <field name="amount" position="1"><display type="currency" currency="${payment.currencyUomId}"/></field>
         <field name="currencyUomId" position="2"><display/></field>
         <field name="effectiveDate" position="1"><display/></field>
         <field name="comments" position="2"><display/></field>

Modified: trunk/applications/accounting/widget/InvoiceScreens.xml
===================================================================
--- trunk/applications/accounting/widget/InvoiceScreens.xml	2006-04-07 02:17:11 UTC (rev 7224)
+++ trunk/applications/accounting/widget/InvoiceScreens.xml	2006-04-07 03:35:40 UTC (rev 7225)
@@ -80,7 +80,10 @@
                     <field-map env-name="parameters.invoiceId" field-name="invoiceId"/>
                 </entity-and>
                 <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/createApplicationList.bsh"/>
-                <script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/createItemList.bsh"/>
+                <entity-and entity-name="InvoiceItem" list-name="invoiceItems">
+                    <field-map field-name="invoiceId" value="${parameters.invoiceId}"/>
+                </entity-and>
+                <!--script location="component://accounting/webapp/accounting/WEB-INF/actions/invoice/createItemList.bsh"/-->
             </actions>
             <widgets>
                 <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
@@ -195,6 +198,9 @@
                 <set field="invoiceItemSeqd" from-field="parameters.invoiceItemSeqId"/>
                 <entity-one entity-name="Invoice" value-name="invoice"/>
                 <entity-one entity-name="InvoiceItem" value-name="invoiceItem"/>
+                <entity-and entity-name="InvoiceItem" list-name="invoiceItems">
+                    <field-map field-name="invoiceId" env-name="parameters.invoiceId"/>
+                </entity-and>
             </actions>
             <widgets>
                 <decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">



More information about the Svn mailing list