psdi.app.invoice

Class FldInvoiceLineLineCost

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


    public class FldInvoiceLineLineCost
    extends FldMatServLineCost
    InvoiceLine.linecost validation class: The base class FldMatServLineCost sets the invoice line tax that sets the invoice totaltax which in turn sets invoice pretaxtotal and/or totalcost depending on the syscode. While setting values internally to pretaxtotal, totaltax and totalcost on Invoice we have make sure that we don't set the syscode through these fields. To do that we have to post a message to the bulletin board which we check in these fields. If the invoice line linecost changes update the invoice cost linecost and the invoice pretaxtotal.
    See Also:
    BulletinBoardService
    • Constructor Detail

      • FldInvoiceLineLineCost

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

      • init

        public void init()
                  throws MXException,
                         java.rmi.RemoteException
        Invoice line linecost is ready/only if there are more than 1 related invoice costs for this line.
        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
        We are using the base class action to calculate and set the invoice line tax which sets invoice totaltaxand that in turn sets the invoice pretaxtotal and/or totalcost depending on the syscode. While setting values internally to pretaxtotal, totaltax and totalcost on Invoice we have to post a message to the bulletin board which is checked in these fields. If the invoice line linecost changes update the invoice cost linecost and the invoice pretaxtotal. Also if * invoice line's quantity and unitcost are > 0 set unitcost equal to linecost/quantity

        Conditions :
        1. Update the unitcost only if quantity and unitcost on the invoiceline is greater than zero
        2. If the unit cost on the invoice cost is not already null set it to the invoiceline's unit cost.
        3. Update the pretaxtotal of invoice only if the syscode on the pretaxtotal is not already set.
        Specified by:
        action in interface MboValueListener
        Overrides:
        action in class FldMatServLineCost
        Throws:
        MXException
        java.rmi.RemoteException
        See Also:
        BulletinBoardService