Odyssey
globals.i
1 <?php
2 /**
3  * File: globals.i
4  * Purpose: Provides list of literals in billing.
5  */
6 
7 /**
8  * function GetBillingURL()
9  * @return the base url. (Navigation links are prepended with the $infourl.)
10  */
11 function GetBillingURL() {
12  return "/billing/index.prg";
13 }
14 
15 /**
16  * function GetIsInEditList($dbh, $Hu)
17  * @return true if the monitor logged in user can edit contracts and sales items.
18  */
19 function GetIsInEditList($dbh, $Hu) {
20  return CheckPerm($dbh, $Hu, "billing_edit", $_SERVER['REMOTE_ADDR']);
21 }
22 
23 /**
24  * function GetAbleToRunBilling($dbh, $Hu)
25  * @return true if the monitor logged in user can run billing.
26  */
27 function GetAbleToRunBilling($dbh, $Hu) {
28  return CheckPerm($dbh, $Hu, "billing_runBilling", $_SERVER['REMOTE_ADDR']);
29 }
30 
31 /**
32  * function GetBillingEmailFlag()
33  * @return the flag for email.
34  * This corresponds to the flags column in the cubillsalesorder table.
35  */
36 function GetBillingEmailFlag() {
37  return 1;
38 }
39 
40 /**
41  * function GetStartFile()
42  * @return the file to store sid and other info for starting billing.
43  * This file will be removed at the end so it also functions as a lockfile.
44  */
45 function GetStartFile() {
46  return "/home/homecu/tmp/.runBillingStart";
47 }
48 
49 /**
50  * function GetContractFile()
51  * @return the file to store the results of the query for feature items to bill.
52  * Normally, this is locally to the container.
53  * However, there is an option to get this from my.homecu.net when on localhost.
54  */
55 function GetContractFile() {
56  return "/home/homecu/tmp/.runBillingContractSpecs";
57 }
58 
59 /**
60  * function GetEstatementCountFile()
61  * @return the file to store the estatement counts.
62  * This is an aggregation of estatements in www3, www5, www6, and my.homecu.net.
63  */
64 function GetEstatementCountFile() {
65  return "/home/homecu/tmp/.runBillingEstatementCounts";
66 }
67 
68 /**
69  * function GetIVRCountFile()
70  * @return the file to store the IVR counts.
71  * The counts come from ivr.homecu.net.
72  */
73 function GetIVRCountFile() {
74  return "/home/homecu/tmp/.runBillingIVRCounts";
75 }
76 
77 /**
78  * function GetIPayCountFile()
79  * @return the file to store the iPay counts.
80  * The counts come from an iPay file on my.homecu.net.
81  */
82 function GetIPayCountFile() {
83  return "/home/homecu/tmp/.runBillingIPayCounts";
84 }
85 
86 /**
87  * function GetTimeTrackCountFile()
88  * @return the file to store the timetrack counts.
89  * The counts come from the timetrack application on www.homecu.net.
90  */
91 function GetTimeTrackCountFile() {
92  return "/home/homecu/tmp/.runBillingTimeTrackCounts";
93 }
94 
95 /**
96  * function CheckRunBillingInterval()
97  * The length of time to wait before checking to see if all counts are completed.
98  * Time is in milliseconds.
99  */
100 function CheckRunBillingInterval() {
101  return 1000;
102 }
103