psdi.app.po

Class FldPOCostPercentage

  • All Implemented Interfaces:
    MboConstants, MboValueListener


    public class FldPOCostPercentage
    extends MboValueAdapter
    This is the field validation class for percentage field of the POCost object. Updates the PO cost quantity and linecost based on the percentage entered. If the PO line quantity is null, then the percentage applies to the linecost, otherwise it applies to the quantity. While calculating these values, PO cost lines totals must be kept equal to the PO line values.
    • Method Detail

      • action

        public void action()
                    throws MXException,
                           java.rmi.RemoteException
        Updates the PO cost quantity and linecost based on the percentage entered. If the PO line quantity is null, then the percentage applies to the linecost, otherwise it applies to the quantity. While calculating these values, PO cost lines totals are kept equal to the PO line values. Conditions :
        1. If the sum of the percentages is 100, set the quantity on the PO cost line as the difference between the quantity on the PO line and the sum of quantities on the other PO cost lines; set the linecost as the difference between the linecost on the PO line and the sum of the PO cost linecosts of the other POcost lines set the loadedcost as the difference between the loadedcost on the PO line and the sum of the PO cost loadedcost of the other POcost lines
        2. If the sum of the percentages is not 100, set the PO cost quantity = quantity * percentage/100; set the POcost linecost=linecost * percentage/100
        Specified by:
        action in interface MboValueListener
        Overrides:
        action in class MboValueAdapter
        Throws:
        MXException
        java.rmi.RemoteException