psdi.app.mr

Class FldMRCostQuantity

  • All Implemented Interfaces:
    MboConstants, MboValueListener


    public class FldMRCostQuantity
    extends MboValueAdapter
    Validation class for MR Cost Quantity. The quantity entered must not be greater than the MR line quantity. If the MR quantity is 0 the percentage is always 100%, otherwise it is equal to the MR cost quantity as a percentage of the MR line quantity. If the cost line quantity is less than 0, the percentage is negative. Also if the MR cost quantity is not null, the MR cost linecost is calculated and set.
    • Method Detail

      • action

        public void action()
                    throws MXException,
                           java.rmi.RemoteException
        If the MR quantity is 0 the percentage is always 100%, otherwise it is equal to the MR cost quantity as a percentage of the MR line quantity. If the cost line quantity is less than 0, the percentage is negative. Also if the MR cost quantity is not null, the MR cost linecost is calculated and set; the percentage attribute's field validation does not calculate linecost.
        Conditions:
        1. If the quantity is set to zero, set the percentage to zero.
        2. If the sum of the quantities on the mrcost lines is equal to the quantity on the MRline then round off the percentage so that the sum of the percentages on the lines is 100.
        3. If the sum of the quantities on the mrcost lines is NOT equal to the quantity on the MRline, then calculate percentage = (MR cost quantity/MRline quantity) * 100.
        4. If the quantity on the MR cost line is less than zero negate the percentage
        5. If the quantity and the unit cost on the MR cost line are not null set the MR cost linecost =(MRline linecost * mrcost percentage) /100
        Specified by:
        action in interface MboValueListener
        Overrides:
        action in class MboValueAdapter
        Throws:
        MXException
        java.rmi.RemoteException