Ejemplo n.º 1
0
 public static function restoreCredit($credit)
 {
     $activity = Activity::getBlank();
     $activity->client_id = $credit->client_id;
     $activity->credit_id = $credit->id;
     $activity->activity_type_id = ACTIVITY_TYPE_RESTORE_CREDIT;
     $activity->message = Utils::encodeActivity(Auth::user(), 'restored ' . Utils::formatMoney($credit->balance, $credit->client->getCurrencyId()) . ' credit');
     $activity->balance = $credit->client->balance;
     $activity->save();
 }