\PrintReceipt
Receipts/Bills printing
Synopsis
class PrintReceipt
{
- // constants
- const TEMPLATE_PATH = 'content/documents/receipt_template/';
- const URL_ME = '?module=printreceipts';
- // members
- protected array $receiptAllUserStatuses = ;
- protected array $receiptAllFrozenStatuses = ;
- protected array $receiptAllCities = ;
- protected array $receiptAllStreets = ;
- protected array $receiptAllBuilds = ;
- public bool $receiptsHistoryOn = false;
- public bool $extenAddressOn = false;
- protected $ubConfig = NULL;
- protected array $receiptTemplateFolders = ;
- // methods
- public void __construct()
- protected void getAllCities()
- protected void getAllStreets()
- protected void getAllBuilds()
- protected void saveToDB()
- public array getAllTariffs()
- public array getAllTags()
- public mixed getInvoicesData()
- public void reloadCitiesStreetsBuilds()
- public array getUsersPrintData()
- public string printReceipts()
- public mixed replaceMainTemplateMacro()
- public string renderWebForm()
- public string renderWebFormForProfile()
- public string renderJQDT()
- public void renderJSON()
Constants
Name | Value |
---|---|
TEMPLATE_PATH | 'content/documents/receipt_template/' |
URL_ME | '?module=printreceipts' |
Members
protected
- $receiptAllBuilds
—
array
Contains array of all builds represented as cityname + streetname + buildnum => buildnum - $receiptAllCities
—
array
Contains array of all cities represented as cityname => cityname - $receiptAllFrozenStatuses
—
array
Contains array user freeze statuses. Possible values: "frozen" / "unfrozen" / "all" - $receiptAllStreets
—
array
Contains array of all streets represented as cityname + streetname => streetname - $receiptAllUserStatuses
—
array
Contains array user statuses. Possible values: "debt" / "debtasbalance" / "undebt" / "all" - $receiptTemplateFolders
—
array
Contains receipt folders to use different templates - $ubConfig
—
null
Placeholder for UbillingConfig object
public
Methods
protected
- getAllBuilds() — Fills $receiptAllBuilds placeholder
- getAllCities() — Fills $receiptAllStreets placeholder
- getAllStreets() — Fills $receiptAllStreets placeholder
- saveToDB() — Saves receipt to DB
public
- __construct()
- getAllTags() — Returns all tags list as tagid => tagname
- getAllTariffs() — Returns all tags list as: Inet service: tariffname => tariffname . tarifffee . tariffperiod UKV service: tariffid => tariffname . tarifffee
- getInvoicesData() — Returns receipts data
- getUsersPrintData() — Returns users print data considering filters values
- printReceipts() — Returns macro substituted, ready to print template filled with data from $usersDataToPrint
- reloadCitiesStreetsBuilds() — Fires updating of $receiptAllStreets and $receiptAllBuilds placeholder
- renderJQDT() — Renders JQDT and returns it
- renderJSON() — Renders JSON for JQDT
- renderWebForm() — Returns receipts print web form
- renderWebFormForProfile() — Returns button with modal form attached for user profile
- replaceMainTemplateMacro() — Replaces macro in given main receipt template