@@ -381,6 +381,9 @@ |
||
381 | 381 | return $this->sendPayload($msg); |
382 | 382 | } |
383 | 383 | |
384 | + /** |
|
385 | + * @param XML_RPC_Message $msg |
|
386 | + */ |
|
384 | 387 | function sendPayload($msg) |
385 | 388 | { |
386 | 389 | $fp = @fsockopen($this->server, $this->port, $this->errno, $this->errstr, $this->timeout); |
@@ -250,7 +250,8 @@ |
||
250 | 250 | // Insert callee cdr entry for DID calls |
251 | 251 | /** |
252 | 252 | * |
253 | - * @param boolean $flag_parent |
|
253 | + * @param boolean $flag_parent |
|
254 | + * @param string $provider_cost |
|
254 | 255 | */ |
255 | 256 | function insert_extra_receiver_entry($dataVariable, $origination_rate, $termination_rate, $account_type, $actual_duration, $provider_cost, $parentid, $flag_parent, $accountid, $logger, $db, $decimal_points) { |
256 | 257 | $localVariable = $dataVariable; |
@@ -113,6 +113,11 @@ |
||
113 | 113 | $updateBalance->process_DID_charges ( $account_value, $start_date, $end_date, TRUE ); |
114 | 114 | $this->process_invoice ( $account_value, $start_date, $end_date ); |
115 | 115 | } |
116 | + |
|
117 | + /** |
|
118 | + * @param string $start_date |
|
119 | + * @param string $end_date |
|
120 | + */ |
|
116 | 121 | function process_invoice($accountdata, $start_date, $end_date) { |
117 | 122 | // Get Invoice configuration using single query instead of multiple queries. |
118 | 123 | $invoice_conf = array (); |
@@ -55,6 +55,10 @@ discard block |
||
55 | 55 | * BillAccountCharges is custom method which we use to manage instant billing for any type of services at the time of delete or release the services before the invoice process for prepaid or postpaid both type of customers. |
56 | 56 | * We define different different cases to manage it you can add it more if needed. |
57 | 57 | */ |
58 | + |
|
59 | + /** |
|
60 | + * @param string $BillType |
|
61 | + */ |
|
58 | 62 | function BillAccountCharges($BillType, $params) { |
59 | 63 | switch ($BillType) { |
60 | 64 | |
@@ -179,6 +183,10 @@ discard block |
||
179 | 183 | /* |
180 | 184 | * process_subscriptions method use to manage subscription charges associated with accounts. |
181 | 185 | */ |
186 | + |
|
187 | + /** |
|
188 | + * @param string $NowDate |
|
189 | + */ |
|
182 | 190 | function process_subscriptions($AccountData, $StartDate, $EndDate, $InvocieID, $NowDate) { |
183 | 191 | if ($this->Error_flag) { |
184 | 192 | echo ":::::::::::::::::::::::: SUBSCRIPTION BILLING START ::::::::::::::::::::::::\n"; |
@@ -235,6 +243,10 @@ discard block |
||
235 | 243 | /* |
236 | 244 | * process_subscriptions method use to manage subscription charges associated with accounts. |
237 | 245 | */ |
246 | + |
|
247 | + /** |
|
248 | + * @param string $NowDate |
|
249 | + */ |
|
238 | 250 | function process_DID_charges($AccountData, $StartDate, $EndDate, $InvocieID, $NowDate, $ManualFlag = false) { |
239 | 251 | if ($this->Error_flag) { |
240 | 252 | echo ":::::::::::::::::::::::: DIDs BILLING START ::::::::::::::::::::::::\n"; |
@@ -322,6 +334,10 @@ discard block |
||
322 | 334 | echo ":::::::::::::::::::::::: DIDs BILLING END ::::::::::::::::::::::::\n"; |
323 | 335 | } |
324 | 336 | } |
337 | + |
|
338 | + /** |
|
339 | + * @param string $billing_cycle |
|
340 | + */ |
|
325 | 341 | function Get_Date_Range_Array($billing_cycle, $itemArr, $StartDate, $EndDate) { |
326 | 342 | $last_invoice_date = $itemArr ['LastBillDate']; |
327 | 343 | |
@@ -528,6 +544,11 @@ discard block |
||
528 | 544 | |
529 | 545 | return $ItemEndDate; |
530 | 546 | } |
547 | + |
|
548 | + /** |
|
549 | + * @param string $select |
|
550 | + * @param string $table |
|
551 | + */ |
|
531 | 552 | function get_table_data($select, $table, $where) { |
532 | 553 | $query = $this->db_model->getSelect ( $select, $table, $where ); |
533 | 554 | if ($query->num_rows > 0) { |
@@ -551,6 +572,10 @@ discard block |
||
551 | 572 | } |
552 | 573 | |
553 | 574 | // Build an array for different services. |
575 | + |
|
576 | + /** |
|
577 | + * @param string $Type |
|
578 | + */ |
|
554 | 579 | function Build_ItemArr($description, $ItemID, $Type, $Cycle, $AssignDate, $BillDate, $NowDate) { |
555 | 580 | $ItemArr = array ( |
556 | 581 | 'Description' => $description, |
@@ -128,6 +128,11 @@ discard block |
||
128 | 128 | /* |
129 | 129 | * Process daily invoices. |
130 | 130 | */ |
131 | + |
|
132 | + /** |
|
133 | + * @param string $StartDate |
|
134 | + * @param string $EndDate |
|
135 | + */ |
|
131 | 136 | function Generate_Daily_Invoice($AccountData, $StartDate, $EndDate) { |
132 | 137 | if ($this->Error_flag) { |
133 | 138 | // Print Start date and End Date |
@@ -172,6 +177,11 @@ discard block |
||
172 | 177 | /* |
173 | 178 | * Process monthly invoices. |
174 | 179 | */ |
180 | + |
|
181 | + /** |
|
182 | + * @param string $StartDate |
|
183 | + * @param string $EndDate |
|
184 | + */ |
|
175 | 185 | function Generate_Monthly_Invoice($AccountData, $StartDate, $EndDate) { |
176 | 186 | if ($this->Error_flag) { |
177 | 187 | // Print Start date and End Date |
@@ -267,6 +277,10 @@ discard block |
||
267 | 277 | /* |
268 | 278 | * Process subscription and other charges like DIDs etc... |
269 | 279 | */ |
280 | + |
|
281 | + /** |
|
282 | + * @param string $NowDate |
|
283 | + */ |
|
270 | 284 | function ProcessCharges($AccountData, $StartDate, $EndDate, $InvocieID, $NowDate) { |
271 | 285 | if ($this->Error_flag) { |
272 | 286 | $this->PrintLogger ( "CHARGES CALCULATION PROCESS START" ); |
@@ -384,6 +398,11 @@ discard block |
||
384 | 398 | /* |
385 | 399 | * Send an email notification methid which log the invoice email notification in mail details table. |
386 | 400 | */ |
401 | + |
|
402 | + /** |
|
403 | + * @param string $FilePath |
|
404 | + * @param string $Filenm |
|
405 | + */ |
|
387 | 406 | function send_email_notification($FilePath, $Filenm, $AccountData, $invoice_conf, $invData) { |
388 | 407 | $TemplateData = array (); |
389 | 408 | $where = array ( |
@@ -41,6 +41,11 @@ discard block |
||
41 | 41 | $this->process_DID_charges ( $account_val, gmdate ( "Y-m-d H:i:s" ), gmdate ( "Y-m-d H:i:s" ) ); |
42 | 42 | } |
43 | 43 | } |
44 | + |
|
45 | + /** |
|
46 | + * @param string $startdate |
|
47 | + * @param string $enddate |
|
48 | + */ |
|
44 | 49 | function process_subscriptions($accountinfo, $startdate, $enddate, $Manualflg = false) { |
45 | 50 | // Defined Original Sweep it for calculation start date for first time. |
46 | 51 | $accountinfo ['original_sweep_id'] = $accountinfo ['sweep_id']; |
@@ -107,6 +112,11 @@ discard block |
||
107 | 112 | } |
108 | 113 | } |
109 | 114 | } |
115 | + |
|
116 | + /** |
|
117 | + * @param string $startdate |
|
118 | + * @param string $enddate |
|
119 | + */ |
|
110 | 120 | function process_DID_charges($AccountDATA, $startdate, $enddate, $Manualflg = false) { |
111 | 121 | $dids_data = $this->get_table_data ( "*", "dids", array ( |
112 | 122 | "status" => "0", |
@@ -263,7 +273,8 @@ discard block |
||
263 | 273 | |
264 | 274 | /** |
265 | 275 | * |
266 | - * @param string $todate |
|
276 | + * @param string $todate |
|
277 | + * @param string $invoicedate |
|
267 | 278 | */ |
268 | 279 | function Manage_invoice_item($AccountData, $description, $item_id, $charge, $type, $fromdate, $todate, $invoicedate) { |
269 | 280 | $invoiceid = 0; |
@@ -1416,6 +1416,11 @@ |
||
1416 | 1416 | ); |
1417 | 1417 | return $status_array; |
1418 | 1418 | } |
1419 | + |
|
1420 | + /** |
|
1421 | + * @param string $select |
|
1422 | + * @param string $table |
|
1423 | + */ |
|
1419 | 1424 | function build_concat_string($select, $table, $id_where = '') { |
1420 | 1425 | $select_params = explode ( ',', $select ); |
1421 | 1426 | $where = array ( |
@@ -649,6 +649,10 @@ |
||
649 | 649 | } |
650 | 650 | redirect ( base_url () . "user/user_refill_coupon_list/" ); |
651 | 651 | } |
652 | + |
|
653 | + /** |
|
654 | + * @param string $select |
|
655 | + */ |
|
652 | 656 | function user_invoice_date($select, $accountid) { |
653 | 657 | $query = $this->db_model->select ( $select, "invoices", '', "id", "DESC", "1", "0" ); |
654 | 658 | if ($query->num_rows > 0) { |
@@ -41,6 +41,9 @@ |
||
41 | 41 | */ |
42 | 42 | if ( ! function_exists('singular')) |
43 | 43 | { |
44 | + /** |
|
45 | + * @param string $str |
|
46 | + */ |
|
44 | 47 | function singular($str) |
45 | 48 | { |
46 | 49 | $result = strval($str); |