psdi.app.invoice

Class FldInvoiceLinePOLineNum

  • All Implemented Interfaces:
    MboConstants, MboValueListener


    public class FldInvoiceLinePOLineNum
    extends FldPOLineNum
    InvoiceLine.polinenum validation class: The base class FldPOLineNum checks that the ponum/polinenum combination entered is valid. In case the polinenum field is nulled the copied information from poline is also cleared. Also the related invoice cost lines and invoice match lines are deleted and a new invoice cost with defaults is added. The same is done if a diffrent polinenum is entered but in addition we also have to copy all the related info. from the poline for the invoice line, and from the pocost for the invoice cost.
    See Also:
    FldPOLineNum
    • Constructor Detail

      • FldInvoiceLinePOLineNum

        public FldInvoiceLinePOLineNum(MboValue mbv)
                                throws MXException,
                                       java.rmi.RemoteException
        Construct and attach to the mbo value
        Throws:
        MXException
        java.rmi.RemoteException
    • Method Detail

      • init

        public void init()
                  throws MXException,
                         java.rmi.RemoteException
        Set invoice line description and line type editable if polinenum is null and the invoice line is just added.
        Specified by:
        init in interface MboValueListener
        Overrides:
        init in class MboValueAdapter
        Throws:
        MXException
        java.rmi.RemoteException
      • validate

        public void validate()
                      throws MXException,
                             java.rmi.RemoteException
        Validate to check if this poline has a condition enabled item. This check is only done here if the user enters a poline number in this field. If this validation is called as result of copying the poline from the PO Line tab of the Copy PO Lines dialog, no need to do this validation again.
        Specified by:
        validate in interface MboValueListener
        Overrides:
        validate in class MAXTableDomain
        Throws:
        MXException
        java.rmi.RemoteException
      • action

        public void action()
                    throws MXException,
                           java.rmi.RemoteException
        If the polinenum is cleared we have to clear all the related information copied from the poline. Also delete the related invoice cost lines and the invoice match lines, and add a new invoice cost with defaults before returning. If a different polinenum is entered do the same as above but instead of returning copy the new polinenum info. to the invoice line and create the invoice cost based on the pocost for the related polinenum. The invoice line ponum is editable if the invoice ponum is null.

        Conditions :
        1. Set the invoice quantity only if the POLine is not by cost
        2. Set the linecost only if the POLine is by cost and not by quantity
        Specified by:
        action in interface MboValueListener
        Overrides:
        action in class MAXTableDomain
        Throws:
        MXException
        java.rmi.RemoteException