psdi.app.invoice

Class FldInvoiceLineQty

  • All Implemented Interfaces:
    MboConstants, MboValueListener
    Direct Known Subclasses:
    FldInvoiceLineQtyForUI


    public class FldInvoiceLineQty
    extends FldMatServToleranceQuantityCost
    InvoiceLine.invoiceqty validation class: Sets the invoice line unitcost and linecost depending the quantity value entered. Also update the related invoice cost quanitity if there is only one invoice cost line for this invoice line.
    • Constructor Detail

      • FldInvoiceLineQty

        public FldInvoiceLineQty(MboValue mbv)
        Construct and attach to the mbo value
    • Method Detail

      • init

        public void init()
                  throws MXException,
                         java.rmi.RemoteException
        Set the field to read/only if there are multiple invoice cost lines else editable. If the invoice line is a service and has a PO and the poline orderqty and unitcost are equal to 0, set invoice line quantity read/only
        Specified by:
        init in interface MboValueListener
        Overrides:
        init in class MboValueAdapter
        Throws:
        MXException
        java.rmi.RemoteException
      • action

        public void action()
                    throws MXException,
                           java.rmi.RemoteException
        If the invoice line quantity and unitcost are not null set linecost equal to unitcost * quantity. Else if quantity is not 0 and unitcost is null and linecost is not null, set unitcost equal to linecost / quantity. Also update the related invoice cost quanitity if there is only one invoice cost line. If the polinenum is not null call FindMatchedReceipts <>

        Conditions :
        1. Set the unit cost if the quantity is not null and the unit cost is not null.
        2. Set the linecost if the quantity is not zero and if the unit cost is null and linecost is not null.
        3. If the invoicecost line is not to be deleted then copy the value of invoiceline's quantity to invoicecost's quantity
        Specified by:
        action in interface MboValueListener
        Overrides:
        action in class MboValueAdapter
        Throws:
        MXException
        java.rmi.RemoteException