Maximo Open Forum

 View Only
  • 1.  Storeroom Issue Surcharge on Work Orders

    Posted 06-02-2020 07:15
    Hi All, 

    When Items are issued from the Storeroom,  we need to apply a Surcharge of 3 % on the work order. I do not want to show the surcharge on the issue line cost (Matusetrans) but rather only add it to the Actual Material Cost of the work order. 

    I wrote an automation script on Work Order Object, initialize method and had to supress access control of the actmatcost to make it work.

    totalmatcost =0
    if v_totalmatuse is not None:
    if len(v_totalmatuse)>0:
    for value in v_totalmatuse:
    if value is not None and value !=0:
    totalmatcost += value
    v_actmatcost = v_actmatcost + (0.03 * totalmatcost)

    This updates the individual work order costs in the View Costs window. However does not update the field in the DB and which is preventing it from rolling up to the parent.

    Any help will be appreciated. Thanks.
    #Customizations

    ------------------------------
    Thanks,
    Megha Tatiya

    ------------------------------


  • 2.  RE: Storeroom Issue Surcharge on Work Orders

    Posted 06-02-2020 15:47

    In general, markup related scenarios are honestly best handled by Service Provider (which is an add-on to Maximo), though I definitely understand it being overkill in this situation. Updating the ACTMAT cost itself seems tricky to do correctly without potentially corrupting the cost information. If you did this as some sort of background process, you wouldn't know if you had incorporated your increase and as new materials were added it would be an issue. Plus since you only want it when issues came from a storeroom, a direct issue PO would need to not be increased but it would unless you separated that out somehow. Are you able to do this as two non-persistent attributes that look at the transactions recorded and summarize without adjusting the core fields? 

    Assuming you cannot, the launch point that makes the most sense is probably related on MATUSETRANS (probably an object launch point on MATUSETRANS save) so you have the necessary metadata (is it coming from a storeroom for example, what type of transaction is being recorded, how much is the cost information changing, etc.). But if you use that, you also need to ensure that you don't get record updated by another user error when you update the work order which would occur if you had multiple transactions being issued to same work order at once (such as when you complete an inventory usage document). 

    You also have to be prepared for multiple types of transactions. Some examples off the top of my head are issue transactions that might be split using LIFO/FIFO, handling inventory returns, and the many different ways a material transaction can be recorded from an inventory usage document to a direct issue inside of the Inventory application to receiving a PO that is issue on receipt (though based on your use case, this wouldn't apply since you want it to do it only when it comes from a storeroom).

    The MATUSETRANS record when it is saved executes a private method updateWorkOrder() which evaluates the logic to determine what to provide to the WO public method incrActMatCost(double incrAmount, boolean isOutsideCost). I would look at this code (using a java decompiler like JD-GUI) before implementing to try your best to mimic the existing process (especially around how they retrieve the same work order MBO to avoid record updated by another user error). 



    ------------------------------
    Steven Shull
    Projetech
    ------------------------------