psdi.app.invoice

Class FldInvoicePONum

  • All Implemented Interfaces:
    MboConstants, MboValueListener


    public class FldInvoicePONum
    extends FldPONum
    Invoice.ponum validation class: The base class FldPONnum checks if the entered ponum is valid. If the PO is canceled or waiting for approval and is of blanket or pricing agreement type, it cannot be used here. If the invoice has a vendor, the entered PO's vendor should be the same as the invoice vendor or its branches. The PO information is then carried over to the invoice. In case this field is set to null and the invoice has a vendor the currencycode is set to the vendor's currencycode.
    See Also:
    FldPONum
    • Constructor Detail

      • FldInvoicePONum

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

      • validate

        public void validate()
                      throws MXException,
                             java.rmi.RemoteException
        The base class FldPONum checks to see if a valid PO has been entered. The entered PO should not be internal and the status should be waiting for approval(WAPPR) or canceled(CAN). The PO's type should not be blanket(BLANK) or pricing(PRICE). Also if the invoice has a vendor, the entered PO's vendor should be the same as the invoice vendor or its branches.
        Specified by:
        validate in interface MboValueListener
        Overrides:
        validate in class MAXTableDomain
        Throws:
        MXApplicationException
        MXException
        java.rmi.RemoteException
      • action

        public void action()
                    throws MXException,
                           java.rmi.RemoteException
        Set the invoice currencycode to the vendor's currencycode if this field is cleared and the invoice has a vendor. Also set the invoice vendor editable. If a ponum is entered here copy the PO information to the invoice.



        Conditions:
        1. The exchangerate,exchangerate2,exchangedate reflect their corresponding values from the PO only if it is a buyahead(buyahead='Y')
        2. If the vendor is set to null set both contact and payment terms to null
        3. If the ponum is null set the currency code of the invoice to the company's currency code
          Specified by:
          action in interface MboValueListener
          Overrides:
          action in class MAXTableDomain
          Throws:
          MXException
          java.rmi.RemoteException
        • getList

          public MboSetRemote getList()
                               throws MXException,
                                      java.rmi.RemoteException
          Return list of APPR, INPRG and CLOSE status POs from the PO table. POs should not be internal and cannot have a status of WAPPR and CAN. Blanket(BLANK) and price(PRICE) agreement POs are also not allowed to be used on an invoice. Also if the invoice has a vendor, the entered PO's vendor should be the same as the invoice vendor or its branches. This method is used by the lookup on the PO field on invoice header.
          Specified by:
          getList in interface MboValueListener
          Overrides:
          getList in class MAXTableDomain
          Throws:
          MXException
          java.rmi.RemoteException