You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Mike Voytovich (JIRA)" <ji...@apache.org> on 2010/02/24 19:49:28 UTC

[jira] Updated: (OFBIZ-3504) possible null exception in CompanyHeader.groovy due to incorrect check (fix included)

     [ https://issues.apache.org/jira/browse/OFBIZ-3504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Voytovich updated OFBIZ-3504:
----------------------------------

    Attachment: CompanyHeader.groovy.patch

Patch to fix minor bug that was checking the wrong condition for null.


> possible null exception in CompanyHeader.groovy due to incorrect check (fix included)
> -------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-3504
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3504
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Mike Voytovich
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: CompanyHeader.groovy.patch
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> There's a minor bug in applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy which can cause a null exception.
> It should be checking orh.getBillFromParty() for null, instead of orh.getBillToParty(). 
> Here's the fix:
> Index: repos/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy
> ===================================================================
> --- repos/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy	(revision 73)
> +++ repos/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/order/CompanyHeader.groovy	(revision 74)
> @@ -67,7 +67,7 @@
>      orh = new OrderReadHelper(orderHeader);
>      // for sales order, the logo party is the "BILL_FROM_VENDOR" of the order.  If that's not available, we'll use the OrderHeader's ProductStore's payToPartyId
>      if ("SALES_ORDER".equals(orderHeader.orderTypeId)) {
> -        if (orh.getBillToParty()) {
> +        if (orh.getBillFromParty()) {
>              partyId = orh.getBillFromParty().partyId;
>          } else {
>              productStore = orderHeader.getRelatedOne("ProductStore");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.