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
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.