[jira] [Commented] (OFBIZ-11115) Production Run Job is not created for product type MARKETING_PKG_AUTO

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

[jira] [Commented] (OFBIZ-11115) Production Run Job is not created for product type MARKETING_PKG_AUTO

Nicolas Malin (Jira)

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

Shikha Jaiswal commented on OFBIZ-11115:
----------------------------------------

For creating a job, createProductionRunForMktgPkg service runs which calculate the quantity to produce.

The condition qtyToProduce = qtyRequired.min(mktgPackagesAvailable) does not work for MARKETING_PKG_AUTO product as here qtyRequired is BigDecimal.ZERO.subtract(ATP of product) and mktgPackagesAvailable returned by service getMktgPackagesAvailable is ATP of product. So the above condition always returns the qtyToProduce as a negative value which does not allow to create production run.

In the present state of getMktgPackagesAvailable service, if product type is MARKETING_PKG_AUTO then return it's own ATP instead of returning its component ATP which causes this issue as earlier it was returning the component ATP.

I have provided the patch for a fix in which I have set qtyToProduce = qtyRequired in case of MARKETING_PKG_AUTO product so that it creates the production run for the order.


> Production Run Job is not created for product type MARKETING_PKG_AUTO
> ---------------------------------------------------------------------
>
>                 Key: OFBIZ-11115
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11115
>             Project: OFBiz
>          Issue Type: Bug
>          Components: manufacturing
>    Affects Versions: Trunk, Release Branch 16.11, Release Branch 17.12, Release Branch 18.12
>            Reporter: Shikha Jaiswal
>            Assignee: Shikha Jaiswal
>            Priority: Major
>
> *Steps to regenerate:*
> # Create the order for product GZ-BASKET
> # Job should be created automatically for this product as it is of type MARKETING_PKG_AUTO
> *Actual:*
> Job is not created and the order goes in the backorder status.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)