psdi.app.invoice

Interface InvoiceRemote

    • Method Detail

      • totalInclusiveTax

        double totalInclusiveTax()
                          throws MXException,
                                 java.rmi.RemoteException
        Calculates the total tax based on the inclusive tax flags.
        Returns:
        double The total inclusive tax.
        Throws:
        MXException
        java.rmi.RemoteException
      • createInvoiceForReceipt

        MboRemote createInvoiceForReceipt(MboRemote receipt)
                                   throws MXException,
                                          java.rmi.RemoteException
        Create InvoiceLine, InvoiceCost, InvoiceMatch for receipt. It will be called by matrectrans and servrectrans when pay on receiptis true or Y. The method returns an InvoiceLine MboRemote.
        Parameters:
        receipt - Receipt which needs an invoice line to be created for.
        Returns:
        MboRemote The invoice line remote created.
        Throws:
        MXException
        java.rmi.RemoteException
      • getAllUninvoicedMatReceipts

        java.util.Vector getAllUninvoicedMatReceipts(java.lang.String poNum,
                                                     java.lang.String poLineNum,
                                                     java.lang.String siteID,
                                                     boolean isNegativeLine,
                                                     java.lang.String receiptID)
                                              throws MXException,
                                                     java.rmi.RemoteException
        Get all the uninvoiced material receipts.
        Parameters:
        poNum - PO number for this invoice line
        poLineNum - The POLine number.
        siteID - The site identifier.
        Returns:
        Vector Vector of all uninvoiced material receipts.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        #getAllUninvoicedReceipts(String, int)
      • getAllUninvoicedServReceipts

        java.util.Vector getAllUninvoicedServReceipts(java.lang.String poNum,
                                                      java.lang.String poLineNum,
                                                      java.lang.String siteID,
                                                      boolean isNegativeLine,
                                                      java.lang.String receiptID)
                                               throws MXException,
                                                      java.rmi.RemoteException
        Get all the uninvoiced service receipts.
        Parameters:
        poNum - PO number for this invoice line
        poLineNum - The POLine number.
        siteID - The site identifier.
        Returns:
        Vector Vector of all uninvoiced service receipts.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        #getAllUninvoicedReceipts(String, int)
      • confirmMatch

        void confirmMatch(MboRemote invoiceLine,
                          java.util.Vector matchReceipts)
                   throws MXException,
                          java.rmi.RemoteException
        This method confirms that a previously found match by findMatch() is being confirmed. The result of the match will update the in-memory representation of the uninvoiced receipts information. From now on, and future match operation will not consider the qty or cost of the receipt which are already confirmed. It calls method update() of inner class UninvoicedReceiptInfo. Don't try to perform invoice match between the calls of findMatch() and confirmMatch() because in between the unInvoicedReceiptsInfo hasn't been updated. We don't want to combine these two calls together because there might be possibilities that a found match will not be confirmed, such as during a trial match. Within a single invoice instance, it will not be possible to have a match before the previous match is confirmed or ignored.
        Parameters:
        invoiceLine - The invoice line for which the invoice match is being confirmed.
        matchReceipt - A vector of the receipt and the matched qty or cost needs to be updated.
        Throws:
        MXException
        java.rmi.RemoteException
      • findMatch

        java.util.Vector findMatch(boolean exactFirst,
                                   java.util.Vector uninvoicedReceipts,
                                   double value,
                                   boolean byCost,
                                   InvoiceLineRemote invoiceLine,
                                   POLineRemote poline)
                            throws MXException,
                                   java.rmi.RemoteException
        A simplified format of findMatch() method. It is meant to be used by the invoice matching for each individual invoice line.
        Parameters:
        Vector - A vector of uninvoiceReceipts with their uninvoiced cost and qty. The match will be conducted from those receipts.They have to be ordered by their transaction date.
        value - The quantity or cost the matched receipts have to have. If it is a quantity, it should be in issue unit.
        byCost - If the match is based on cost or quantity.
        invoiceLine - Invoice line to be matched. It is null when invoice line is not involved such as during trial match.
        Returns:
        Vector A vector containing MatchResult, which is receiptRemote and the matched qty or matched cost. It returns null, if no match is found.
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        findMatch(Vector, Vector, double, double, boolean, boolean, boolean, InvoiceLineRemote)
      • createInvoiceTransAfterAppr

        void createInvoiceTransAfterAppr(MboRemote invoice,
                                         double currencyVariance,
                                         double priceVariance)
                                  throws MXException,
                                         java.rmi.RemoteException
        This method is to be used to create invoice variance transactions after approval. Mainly to be used by the ERP group. If you are calling this method in the same transaction in which the approval was done just pass in the invoice remote along with the variances. Can only be done if the invoice status is approved.
        Parameters:
        invoice - The MboRemote of the invoice.
        currencyVariance - The currency variance.
        priceVariance - The price variance.
        Throws:
        MXException
        java.rmi.RemoteException
      • createInvoiceTransAfterAppr

        void createInvoiceTransAfterAppr(java.lang.String invoicenum,
                                         double currencyVariance,
                                         double priceVariance)
                                  throws MXException,
                                         java.rmi.RemoteException
        This method is to be used to create invoice variance transactions after approval. Mainly to be used by the ERP group. If you are not calling this method in the same transaction in which the approval was done pass in the invoicenum along with the variances. Can only be done if the invoice status is approved.
        Parameters:
        invoice - The invoicenum of the invoice.
        currencyVariance - The currency variance.
        priceVariance - The price variance.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyPOLineToInvoiceLine

        MboSetRemote copyPOLineToInvoiceLine(MboSetRemote poLineSet)
                                      throws MXException,
                                             java.rmi.RemoteException
        Create the invoice lines based on the passed in PO Line set and copy over the related info. This method will be used by the GUI for the Copy PO Line action.
        Parameters:
        poLineSet - The PO Line set from which the invoice lines are to be created.
        Returns:
        MboSetRemote The newly created invoice line set.
        Throws:
        MXException
        java.rmi.RemoteException
      • copyReceiptToInvoiceLine

        MboSetRemote copyReceiptToInvoiceLine(MboSetRemote receiptSet)
                                       throws MXException,
                                              java.rmi.RemoteException
        Create the invoice lines based on the passed in receipts set and copy over the related info. This method will be used by the GUI for the Copy PO Line action, when Materials or Service tab is selected.
        Parameters:
        receiptSet - The receipt set from which the invoice lines are to be created.
        Returns:
        MboSetRemote The newly created invoice line set.
        Throws:
        MXException
        java.rmi.RemoteException
      • changeStatus

        void changeStatus(java.lang.String status,
                          java.util.Date date,
                          java.lang.String memo,
                          boolean autoClosePo)
                   throws MXException,
                          java.rmi.RemoteException
        This method is to be called by the UI change status page. If the user wants the PO to be closed, the PO object is asked to close the PO after doing all the necessary checks.
        Parameters:
        status - The desired status.
        date - The current date.
        memo - Any notes by the user.
        autoClosePO - Indicates if the PO is to be closed.
        Throws:
        MXException
        java.rmi.RemoteException
      • resetTotalAllocated

        void resetTotalAllocated(InvoiceLineSetRemote lineSet)
                          throws MXException,
                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice.Invoice#resetTotalAllocated()
      • checkForOpenStatus

        void checkForOpenStatus()
                         throws MXException,
                                java.rmi.RemoteException
        This method overwrites the method in the super class StateFulMbo. Called by the UI when changing invoice status. Checks to see if it is a history record with a status of PAID. We need to do this as an invoice with APPR status is also a history record, but should be allowed to change status to PAID.
        Specified by:
        checkForOpenStatus in interface StatefulMboRemote
        Throws:
        MXApplicationException - (system, historyrecord) is thrown if the record is history with status of PAID.
        MXException
        java.rmi.RemoteException
        See Also:
        StatefulMbo.checkForOpenStatus()
      • getCopyPOLineSet

        MboSetRemote getCopyPOLineSet(java.lang.String tbName)
                               throws MXException,
                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice.Invoice#getCopyPOLineSet()
      • copyTerms

        void copyTerms(MboSetRemote termsSet)
                throws MXException,
                       java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice.Invoice#copyTerms()
      • createInvoiceForLabTrans

        MboRemote createInvoiceForLabTrans(MboRemote labTrans,
                                           double quantity,
                                           double lineCost,
                                           boolean lineByLine)
                                    throws MXException,
                                           java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice.Invoice#createInvoiceForLabTrans()
      • createInvoiceForLeaseSched

        MboRemote createInvoiceForLeaseSched(MboRemote scheduleLine,
                                             double quantity,
                                             double lineCost,
                                             boolean singleLine)
                                      throws MXException,
                                             java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice.Invoice#createInvoiceForLeaseSched()
      • changeVendorTaxInfo

        void changeVendorTaxInfo(MboRemote mboRemote)
                          throws MXException,
                                 java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice.Invoice#changeVendorTaxInfo()
      • createInvoiceForWarrSched

        MboRemote createInvoiceForWarrSched(MboRemote schedule,
                                            double quantity,
                                            double lineCost)
                                     throws MXException,
                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice.Invoice#createInvoiceForWarrSched()
      • createReverseInvoice

        void createReverseInvoice(java.lang.String invoiceNum,
                                  java.lang.String description,
                                  java.lang.String revReason,
                                  java.util.Date glPostdate,
                                  java.lang.String status)
                           throws MXException,
                                  java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice
      • createInvoiceLineForCons

        void createInvoiceLineForCons(java.util.ArrayList consTransByVendorList)
                               throws MXException,
                                      java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        psdi.app.invoice