[ 
https://issues.apache.org/jira/browse/OFBIZ-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464767
 ] 

Jonathon Wong commented on OFBIZ-627:
-------------------------------------

I've included the patch. I can't begin to mention how the problems are fixed, 
because the error scenarios are a little convoluted. Easier to say what I did.

At line 701, I added a check to determine the current "mode" of operation 
(hidden variable "finalizeMode" on html). Based on the current "mode", I called 
for the appropriate response. Eg, if user was doing shipping when error 
occurred, go back to shipping screen. Used to go back to "Add Order Item" 
screen.

In function determineNextFinalizeStep(), I had to force checks on customer (web 
variable "finalizeReqCustInfo"), shipping ("finalizeReqShipInfo"), shipping 
options ("finalizeReqOptions"), and additional party 
("finalizeReqAdditionalParty"). For some reason I don't really care to check 
for now, webapp/ordermgr/entry/OrderEntryTabBar.ftl sets checks to false for 
customer, shipping (the cause of my problems initially!), shipping options, and 
payment.

I refactored the checks ("if" clauses) into a more flexible for-loop, so that 
the order of checks can depend on a String array "processOrder". I had to 
change the order of check for terms to 2nd place (was put after shipping 
options), but only when dealing with POs. I left the order of checks untouched 
when not dealing POs, so this bugfix should have minimal footprint and not 
stomp other functions or scenarios.

All in all, the PO screens and process flow should be fixed once and for all by 
this patch. Users can now go back and forth in the process flow without errors.

> Creating a purchase order allows shipping information step to be skipped
> ------------------------------------------------------------------------
>
>                 Key: OFBIZ-627
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-627
>             Project: Apache OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Jonathon Wong
>             Fix For: SVN trunk
>
>         Attachments: CheckOutEvents.java.patch
>
>
> 1. Go to ordermgr/control/orderentry
> 2. Select for Internal Organization a value of "ACCOUNTING" (or some party 
> with
>    no contact mechanism of type "Postal Address" for shipping purposes).
> 3. Select a supplier that has something to sell (say DemoSupplier).
> 4. Add an order item to your PO (say GZ-1000 if using DemoSupplier).
> 5. Click "Finalize Order". And click through till the "Shipping" tab.
> 6. You'll see that there are no shipping addresses to choose from. Click
>    "Continue".
> 7. You're back to the "Add Order Item" screen. You see error message "Please
>    enter a shipping address".
> 8. Click "Finalize Order" again. You've just skipped the "Order" tab (right
>    after "Shipping" tab) and are now on to "Parties" tab!
> 9. Select option "I do not wish to add additional parties". Click
>    "Continue".
> 10. Back to "Shipping" tab. Again, no shipping addresses to choose from. Click
>     "Continue".
> 11. Back to "Add Order Item" screen with same error message as before. Click
>     "Finalize Order" again.
> You're at "Order Confirmation"! There's no shipping information at all for 
> this PO! Go on to create this incomplete PO. You'll see a whole host of 
> problems associated with this PO, including the inability to include shipping 
> information or to correct it otherwise.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to