Exemple #1
0
 public function beforeCommitSubscriberBalance(&$row, &$pricingData, &$query, &$update, $arate, $calculator)
 {
     if ($arate['key'] == 'INTERNET_VF') {
         if (isset($pricingData['arategroup']) && $pricingData['arategroup'] == 'VF_INCLUDED') {
             $query = array('sid' => $query['sid'], 'billrun_month' => $query['billrun_month']);
             $pricingData = array('arategroup' => $pricingData['arategroup'], 'usagesb' => $pricingData['usagesb']);
             $update['$set'] = array('tx.' . $row['stamp'] => $pricingData);
             foreach (array_keys($update['$inc']) as $key) {
                 if (!Billrun_Util::startsWith($key, 'balance.groups')) {
                     unset($update['$inc'][$key]);
                 }
             }
         } else {
             $pricingData = $update = array();
         }
     }
 }