Class PBillDetailsPage

All Implemented Interfaces:
PAccountViewPage, PCCPage, BalanceImpactListener, PSpreadSheetListener, PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ActionListener, ContainerListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, ListSelectionListener

Panel for viewing the details of a bill. This same panel will be used for a bill as well as a pending bill.
Author:
pashok
See Also:
  • Field Details

  • Constructor Details

    • PBillDetailsPage

      public PBillDetailsPage()
  • Method Details

    • initPendingPage

      public void initPendingPage(PModelHandle bmh, int iIncludeChildrenAmounts)
      Initializes the pending bill page
      Parameters:
      bmh - The model handle of the pending bill
      iIncludeChildrenAmounts - Indicates if rolled up totals or individual totals will be displayed.
    • initPendingPage

      public void initPendingPage(PModelHandle bmh, int iIncludeChildrenAmounts, boolean mbShowPrevLife)
      Initializes the pending bill page
      Parameters:
      bmh - The model handle of the pending bill
      iIncludeChildrenAmounts - Indicates if rolled up totals or individual totals will be displayed.
      mbShowPrevLife - Indicates weather to show previous bills of nonpaying child.
    • initBillDetailsPage

      public void initBillDetailsPage(PModelHandle bmh, int iBillIndex, int iIncludeChildrenAmounts)
      Initializes the bill details page
      Parameters:
      bmh - The model handle of the list of bills
      iBillIndex - The index of the currently selected bill in the Balance tab or from the list of bills from bill search
      iIncludeChildrenAmounts - Indicates if rolled up totals or individual totals will be displayed.
    • setSelectedBillIndex

      public void setSelectedBillIndex(int intSelectedBillIndex)
      Sets the selected bill's index to variable mCurrBillIndex
      Parameters:
      intSelectedBillIndex -
    • initBillDetailsPage

      public void initBillDetailsPage(PModelHandle bmh, int iBillIndex, int iIncludeChildrenAmounts, boolean mbShowPrevLife)
      Initializes the bill details page
      Parameters:
      bmh - The model handle of the list of bills
      iBillIndex - The index of the currently selected bill in the Balance tab or from the list of bills from bill search
      iIncludeChildrenAmounts - Indicates if rolled up totals or individual totals will be displayed.
      mbShowPrevLife - Indicates weather to show previous bills of nonpaying child.
    • clearListOfBills

      public void clearListOfBills()
      Clears the list of bills. Anytine the bill search criteria in the Balance page is changed then this list is cleared.
    • refresh

      public void refresh()
      Called by "refresh" button click
      Specified by:
      refresh in interface PAccountViewPage
      Overrides:
      refresh in class PMaintenancePage
    • unregister

      public void unregister() throws RemoteException
      Description copied from class: PIACustomizablePanel
      Used to disconnect the controller from the component for all child widgets contained within this panel.
      Specified by:
      unregister in interface PClientComponent
      Overrides:
      unregister in class PIACustomizablePanel
      Throws:
      RemoteException
    • updatePageFromCache

      public void updatePageFromCache(int iBillIndex)
      Updates the bill details page from the cache instead of fetching data from Portal. If the data for a bill has been fetched we can show the data from the cahche instead of fetching the data from Portal, unless any actions have been performed on the bill.
    • setBillMode

      protected void setBillMode(int intBillMode)
      Sets the bill mode to any one of the following. 0 to indicate REGULAR_BILL 1 to indicate CORRECTIVE_BILL 2 to indicate BILL_IN_PROGRESS This method must be called before showHideSummaryFields()/ showHideItemChargesFields() / showHideARActionFields() is called.
      Parameters:
      intBillMode -
    • hasUnbilledARActions

      protected boolean hasUnbilledARActions()
      Returns whether the bill has any unbilled A/R actions.
      Returns:
    • isShowAllVisible

      protected boolean isShowAllVisible()
      Returns whether "Show All" is visible.
      Returns:
    • setShowAllVisible

      protected void setShowAllVisible(boolean isShowAllVisible)
      Sets whether "Show All" is visible.
      Parameters:
      isShowAllVisible -
    • showHideSummaryFields

      protected void showHideSummaryFields()
      This method shows/hides the fields in bill summary section based on the bill type (regular bill/corrective bill).
    • showHideItemChargesFields

      protected void showHideItemChargesFields()
      This method shows/hides the fields in item charges table based on the bill type (regular bill/corrective bill).
    • showHideARActionFields

      protected void showHideARActionFields()
      This method shows/hides the fields in A/R actions table based on the bill type (regular bill/corrective bill).
    • enableShowAllorShowCorrectionsOnly

      protected void enableShowAllorShowCorrectionsOnly(int mode)
      This method is used to show/hide "Show All" and "Show Corrections Only" operations.
      Parameters:
      pass - mode as 1, during initial page load. pass mode as 2, for refreshing from cache.
    • enableordisableproduceCorrective

      protected void enableordisableproduceCorrective()
      This utility method is used to enable or disable "Produce Corrective Bill" action.
    • resetActionMenu

      public void resetActionMenu()
      Resets the menu items to be disabled in the Action dropdown in the Item Charges section.
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Description copied from class: PIACustomizablePanel
      Retrieves the class name of this component's controller, in this case, null.
      Specified by:
      getControllerClassName in interface PComponent
      Overrides:
      getControllerClassName in class PIACustomizablePanel
      Returns:
      A null String.
      Throws:
      RemoteException - thrown for errors
    • enteringPage

      public void enteringPage()
      Description copied from class: PMaintenancePage
      This method will be called right after a page is made visible via a drilldown. The default implementation inspects the currency being used to display data for the client at large and compares it to the currency used by the panel. If they differ primaryToSecondary() is called.
      This implementation also looks at the internal refresh flag to determine if a subclass has indicated the page is out of date. If it is, this method invokes the setModelHandle() method with the current PModelHandle.

      Subclasses that override this method should call super.enteringPage()
      Specified by:
      enteringPage in interface PCCPage
      Overrides:
      enteringPage in class PMaintenancePage
    • setBillsMap

      protected void setBillsMap(HashMap billsMap)
      Set the billsMap
      Parameters:
      billsMap - HashMap
    • updatePageForPendingBill

      public void updatePageForPendingBill()
      Updates page depending on whether the details of a bill or a pending bill is being viewed
    • updatePageforParentAmountsOnly

      public void updatePageforParentAmountsOnly()
      Hides or shows the header that indicates the amounts shown are not rolled up amounts. Applicable only for A/R accounts
    • selectionChanged

      public void selectionChanged(PSpreadSheetEvent pe)
      Description copied from interface: PSpreadSheetListener
      Called when the user performs some type of gesture in the spreadsheet, for example, a mouse click or pressing the Enter or Return key.
      Specified by:
      selectionChanged in interface PSpreadSheetListener
      Parameters:
      pe - the PSpreadSheetEvent
    • setModelHandle

      public void setModelHandle(PModelHandle data) throws RemoteException
      Description copied from class: PIACustomizablePanel
      Establishes the PModelHandle for this component and all its descendants.
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIACustomizablePanel
      Parameters:
      data - the new PModelHandle from which to extract information
      Throws:
      RemoteException - thrown for errors
    • balanceImpact

      public void balanceImpact(BalanceImpactEvent e)
      Description copied from interface: BalanceImpactListener
      Called when an event is sent out that impacts the balance
      Specified by:
      balanceImpact in interface BalanceImpactListener
      Parameters:
      e - a BalanceImpactEvent encapsulating the event information
    • setBillUnitName

      public void setBillUnitName(String name)
    • addNotify

      public void addNotify()
      Overrides:
      addNotify in class JComponent
    • removeNotify

      public void removeNotify()
      Overrides:
      removeNotify in class JComponent
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • copyBillSummaryData

      protected void copyBillSummaryData()
      Updates the total and due for the current bill.
    • updateBillSummaryData

      protected void updateBillSummaryData()
      Updates the bill summary of a bill with new values.
    • valueChanged

      public void valueChanged(ListSelectionEvent e)
      Specified by:
      valueChanged in interface ListSelectionListener
    • primaryToSecondary

      public void primaryToSecondary(int from, int to)
      Causes the component to use the BEIDManager to convert its data.
      Specified by:
      primaryToSecondary in interface PAccountViewPage
      Overrides:
      primaryToSecondary in class PMaintenancePage
      Parameters:
      from - The currency currently displayed
      to - The currency to convert to and display
      primary - the current currency ID used to display the data
      secondary - the new currency ID to use to display the data
    • revertToPrimary

      public void revertToPrimary(int primary)
      Causes the component to display its data in the primary currency
      Specified by:
      revertToPrimary in interface PAccountViewPage
      Specified by:
      revertToPrimary in interface PComponentAttribute
      Overrides:
      revertToPrimary in class PMaintenancePage
      Parameters:
      primary - The primary currency ID for an account