     result = _.compact result
 
     if _.isEmpty result
-      return callback()
+      return callback account
 
     modifier =
       $set: {}

      modifier.$set["billing.last_billing_at.#{item.name}"] = item.last_billing_at
      modifier.$inc['billing.balance'] += item.amount_inc

    mAccount.findAndModify {_id: account._id}, null, modifier, new: true, (err, account) ->
      mBalance.create account, 'billing', modifier.$inc['billing.balance'],
        plans: _.pluck result, 'name'
        billing_time: billing_time_hour
        is_force: is_force
        last_billing_at: account.attribute.last_billing_at
      , ->
        callback account

    callback()

exports.forceBilling = (account, plan_name, callback) ->


exports.checkBilling = (account, callback) ->
  if Date.now() > account.attribute.last_billing_at.getTime() + config.billing.daily_billing_cycle
    exports.calcBilling account,
      is_force: false
    , callback
  else
    callback account

exports.checkExpired = (account, callback) ->
  modifier =

    unless last_billing_at and next_billing_at > new Date()
      return callback()

    billing_unit_count = (Date.now() - last_billing_at.getTime()) / plan_info.billing_by_time.unit

    if is_force
      billing_unit_count = Math.ceil billing_unit_count
      new_last_billing_at = new Date()
    else
      billing_unit_count = Math.floor billing_unit_count
      new_last_billing_at = new Date last_billing_at.getTime() + billing_unit_count * plan_info.billing_by_time.unit

    amount = billing_unit_count * plan_info.billing_by_time.price

    callback null,
      name: plan_name
      billing_unit_count: billing_unit_count
      last_billing_at: new_last_billing_at
      amount_inc: -amount

