[ 
https://issues.apache.org/jira/browse/OFBIZ-2407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709781#action_12709781
 ] 

Vikas Mayur commented on OFBIZ-2407:
------------------------------------

Thanks Akash,

Few more suggestions on the code.


{code}
+        if (UtilValidate.isNotEmpty(packageLength)) {
+            if (UtilValidate.isEmpty(packageWidth) || 
UtilValidate.isEmpty(packageHeight)) {
+                session.setDimensionAndShipmentBoxType(packageSeqId);
+                return 
ServiceUtil.returnError(UtilProperties.getMessage("ProductErrorUiLabels", 
"ProductErrorNotEnteredAllFieldsInDimension", locale));
+            } else if (UtilValidate.isNotEmpty(shipmentBoxTypeId)) {
+                session.setDimensionAndShipmentBoxType(packageSeqId);
+                return 
ServiceUtil.returnError(UtilProperties.getMessage("ProductErrorUiLabels", 
"ProductErrorEnteredBothDimensionAndPackageInputBoxField", locale));
+            }
+        } else if (UtilValidate.isNotEmpty(packageWidth) || 
UtilValidate.isNotEmpty(packageHeight)) {
+            session.setDimensionAndShipmentBoxType(packageSeqId);
+            return 
ServiceUtil.returnError(UtilProperties.getMessage("ProductErrorUiLabels", 
"ProductErrorNotEnteredAllFieldsInDimension", locale));
+        }
{code}

can be simplified with 

{code} 
if (length || width || height) { // Check if user enter any of the dimensions
    if (boxType) { // check if user also enter box
     // ERROR: Entered Dimension and Package input box, both the fields cannot 
be processed together
   } else if (!(lenght && width && height)) { // check if user does not enter 
all the dimensions 
    // ERROR: Not entered all fields (length, width and height) in Dimension
   }
}
{code}



> Functionality for "Weight Packages Only"  option on pack order screen
> ---------------------------------------------------------------------
>
>                 Key: OFBIZ-2407
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2407
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: product
>    Affects Versions: SVN trunk
>            Reporter: Pranay Pandey
>            Assignee: Vikas Mayur
>            Priority: Minor
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-2407.patch, OFBIZ-2407.patch, OFBIZ-2407.patch
>
>
> Functionality for "Weight Packages Only"  option on pack order screen is to 
> be added.
> # In Facility -> Packing screens when the order entered already has a 
> Shipment that exists in the Picked status: add a  "Weight Packages Only" 
> button.
> # When user clicks on "Weight Packages Only" show a form with Weight input 
> box, optional dimension input boxes (length, width, height), optional 
> drop-down for pre-configured boxes (using data from ShipmentBoxType entity  
> and two buttons: "Next Package" and "Complete" .
> # When the "Complete" button is pressed if the shipping charge is 
> 10%(configure in shipment.properties file, use property name 
> "shipment.default.cost.actual_over_estimated_percent_allowed") above the 
> estimated amount (the amount that would be charged to the customer).
> #* The system will warn user that the shipping amount is too much  there will 
> be a warning form with two buttons: "Ship Now" and "Hold Shipment".
> #* if Ship Now is pressed the system will run as normal
> #* if Hold Shipment is pressed the Shipment will remain in the Picked status, 
> weight/size changes will be retained, no other changes made.

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

Reply via email to