bitel.billing.server.bill.bean

## Class InvoiceManager

- java.lang.Object
- - bitel.billing.server.bill.bean.AbstractManager
  - - bitel.billing.server.bill.bean.InvoiceManager

-     public class InvoiceManager
      extends AbstractManager

- - ### Field Summary

    - ### Fields inherited from class bitel.billing.server.bill.bean.AbstractManager

      `BILL_ALL, BILL_NEW, BILL_PAYED, con, contractManager, DT_CREATED, DT_PAYED, log, mid, moduleSetup, setup, table, USER_ADMIN, USER_ALL, USER_USER, UT_ALL, UT_NOTUNLOADED, UT_UNLOADED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvoiceManager(Setup setup, java.sql.Connection con, int mid, Preferences moduleSetup)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `addBillDoc(int userId, BillDoc billDoc, java.util.List<PositionValue> posList, java.util.List<BillDoc> subList, boolean checkPast)`
    `protected BillDoc` | `getBillDoc(org.xml.sax.Attributes attributes)`
    `protected BillDoc` | `getBillDoc(XMLUtils.BGXMLEventReader reader, javax.xml.stream.events.StartElement element)`
    `BillDoc` | `getInvoice(int id)`
    `java.util.List<Invoice>` | `getInvoiceList(Page page, int cid, boolean onlyReady)` Возвращает список PayInvoice
    `java.util.List<Invoice>` | `getInvoiceList(Page page, int yy, int mm, java.util.Calendar from, java.util.Calendar until, int unloadType, java.lang.String groups, java.lang.String groupMode, java.lang.String contractTitle, java.lang.String billNumber, boolean getXml, java.lang.String type, int packageParamId, int packageId, int addressSortParam, java.lang.String nameSortParam, int sortMode, int secondarySortMode, boolean forRegister)`
    `java.util.List<Invoice>` | `getInvoiceList(java.lang.String idcids)` Возвращает список Invoice по id и contractID
    `protected void` | `publishEvent(int userID, BillDoc billDoc, int billId)`
    `void` | `setShowReady(java.lang.String ids, boolean ready)`
    `void` | `updateDocTypeId(java.util.List<java.lang.Integer> documentIds, int documentTypeId)`

    - ### Methods inherited from class bitel.billing.server.bill.bean.AbstractManager

      `addBillDoc, addBillDocData, addBillDocs, addBillDocs, addNameCol, addNameJoin, addPackageFilterJoin, addSortMode, addStreetCol, addStreetJoin, delete, delete, getBillDocInfo, getNextNumbers, getXMLData, getXMLData, updateNumber, updatePositions, updatePositions, updatePositions`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InvoiceManager

          public InvoiceManager(Setup setup,
                                java.sql.Connection con,
                                int mid,
                                Preferences moduleSetup)

  - ### Method Detail

    - #### getInvoice

          public BillDoc getInvoice(int id)

    - #### getInvoiceList

          public java.util.List<Invoice> getInvoiceList(Page page,
                                                        int yy,
                                                        int mm,
                                                        java.util.Calendar from,
                                                        java.util.Calendar until,
                                                        int unloadType,
                                                        java.lang.String groups,
                                                        java.lang.String groupMode,
                                                        java.lang.String contractTitle,
                                                        java.lang.String billNumber,
                                                        boolean getXml,
                                                        java.lang.String type,
                                                        int packageParamId,
                                                        int packageId,
                                                        int addressSortParam,
                                                        java.lang.String nameSortParam,
                                                        int sortMode,
                                                        int secondarySortMode,
                                                        boolean forRegister)

    - #### getInvoiceList

          public java.util.List<Invoice> getInvoiceList(java.lang.String idcids)

      Возвращает список Invoice по id и contractID
      Parameters:
        `idcids` - строка "id:cid;id:cid..."
      Returns:
        List

    - #### getInvoiceList

          public java.util.List<Invoice> getInvoiceList(Page page,
                                                        int cid,
                                                        boolean onlyReady)

      Возвращает список PayInvoice
      Parameters:
        `cid` - - ContractID
      Returns:

    - #### addBillDoc

          public int addBillDoc(int userId,
                                BillDoc billDoc,
                                java.util.List<PositionValue> posList,
                                java.util.List<BillDoc> subList,
                                boolean checkPast)

      Specified by:
        `addBillDoc` in class `AbstractManager`

    - #### setShowReady

          public void setShowReady(java.lang.String ids,
                                   boolean ready)

    - #### updateDocTypeId

          public void updateDocTypeId(java.util.List<java.lang.Integer> documentIds,
                                      int documentTypeId)
                               throws ru.bitel.bgbilling.common.BGException

      Throws:
        `ru.bitel.bgbilling.common.BGException`

    - #### getBillDoc

          protected BillDoc getBillDoc(org.xml.sax.Attributes attributes)

      Specified by:
        `getBillDoc` in class `AbstractManager`

    - #### getBillDoc

          protected BillDoc getBillDoc(XMLUtils.BGXMLEventReader reader,
                                       javax.xml.stream.events.StartElement element)

      Specified by:
        `getBillDoc` in class `AbstractManager`

    - #### publishEvent

          protected void publishEvent(int userID,
                                      BillDoc billDoc,
                                      int billId)
                               throws ru.bitel.bgbilling.common.BGException

      Specified by:
        `publishEvent` in class `AbstractManager`
      Throws:
        `ru.bitel.bgbilling.common.BGException`