svn commit: r883641 - in /ofbiz/trunk/applications/accounting: src/org/ofbiz/accounting/invoice/InvoiceWorker.java webapp/accounting/invoice/PrintInvoices.fo.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r883641 - in /ofbiz/trunk/applications/accounting: src/org/ofbiz/accounting/invoice/InvoiceWorker.java webapp/accounting/invoice/PrintInvoices.fo.ftl

ashish-18
Author: ashish
Date: Tue Nov 24 09:54:34 2009
New Revision: 883641

URL: http://svn.apache.org/viewvc?rev=883641&view=rev
Log:
Applied patch from jira issue OFBIZ-3242 - Add new feature to Bulk Print Invoices.

-- It Applies to findInvoices screen in AR and AP. User selects items from findInvoice search results. Selects Print action and clicks on Run.

For now  only supported for purchase invoice, for sales invoice we will provide patch shortly.

Thanks Awdesh & Sumit for the contribution.

Modified:
    ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
    ofbiz/trunk/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl

Modified: ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java?rev=883641&r1=883640&r2=883641&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java (original)
+++ ofbiz/trunk/applications/accounting/src/org/ofbiz/accounting/invoice/InvoiceWorker.java Tue Nov 24 09:54:34 2009
@@ -332,7 +332,7 @@
             if (invoice.getString("invoiceTypeId").equals("SALES_INVOICE"))
                 destinationPartyId = invoice.getString("partyId");
             if (invoice.getString("invoiceTypeId").equals("PURCHASE_INVOICE"))
-                destinationPartyId = "partyFrom";
+                destinationPartyId = invoice.getString("partyId");
             try {
                 locations = EntityUtil.filterByDate(delegator.findByAnd("PartyContactMechPurpose",
                         UtilMisc.toMap("partyId", destinationPartyId, "contactMechPurposeTypeId", contactMechPurposeTypeId)));

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl?rev=883641&r1=883640&r2=883641&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/invoice/PrintInvoices.fo.ftl Tue Nov 24 09:54:34 2009
@@ -32,6 +32,7 @@
         <#assign invoice = invoiceDetail.invoice />
         <#if invoiceDetail.billingParty?has_content>
           <#assign billingParty = invoiceDetail.billingParty />
+          <#assign partyName = delegator.findOne("PartyNameView", {"partyId" : billingParty.partyId}, true)>
         </#if>
         <fo:page-sequence master-reference="main">
           <fo:flow flow-name="xsl-region-body" font-family="Helvetica">
@@ -65,7 +66,7 @@
                               <fo:table-cell><fo:block>${uiLabelMap.AccountingCustNr}:</fo:block></fo:table-cell>
                               <fo:table-cell>
                                 <fo:block>
-                                  ${billingParty.partyId?if_exists}
+                                  <#if partyName?has_content>${partyName.firstName?if_exists} ${partyName.lastName?if_exists} ${partyName.groupName?if_exists}</#if>
                                 </fo:block>
                               </fo:table-cell>
                             </fo:table-row>
@@ -113,9 +114,12 @@
                           <#if billingAddress.address2?exists>
                             <fo:block>${billingAddress.address2}</fo:block>
                           </#if>
-                          <fo:block>${billingAddress.city?if_exists} ${billingAddress.stateProvinceGeoId?if_exists} ${billingAddress.postalCode?if_exists}</fo:block>
+                          <fo:block>
+                            <#assign stateGeo = (delegator.findOne("Geo", {"geoId", billingAddress.stateProvinceGeoId?if_exists}, false))?if_exists />
+                            ${billingAddress.city?if_exists} <#if stateGeo?has_content>${stateGeo.geoName?if_exists}</#if> ${billingAddress.postalCode?if_exists}
+                          </fo:block>
                         <#else>
-                          <fo:block>${uiLabelMap.AccountingNoGenBilAddressFound}${billingParty.partyId?if_exists}</fo:block>
+                          <fo:block>${uiLabelMap.AccountingNoGenBilAddressFound} <#if partyName?has_content>${partyName.firstName?if_exists} ${partyName.lastName?if_exists} ${partyName.groupName?if_exists}</#if></fo:block>
                         </#if>
                       </fo:table-cell>
                     </fo:table-row>