~singpolyma/sgx-jmp

Add a note when billing account
Merge branch 'activate-with-balance'

* activate-with-balance:
  If customer already has enough balance, just bill them and finish
  New BillPay registration step
  Save plan to DB as soon as it is selected
  Move credit_to lookup into relevant class
If customer already has enough balance, just bill them and finish
New BillPay registration step

Assumes they have enough balance (anyone using this step must be sure of this)
and then does the billing before proceeding to finish.
Save plan to DB as soon as it is selected

Customer will appear as instantly expired (having been active for 1 second in
the immediate past).

This can replace the pending_plan key for BTC activations. It also serves as a
record for mail-in activation of what plan they had selected.

Once the account is really activated the tiny row is removed.
Move credit_to lookup into relevant class
Merge branch 'monthly-billing'

* monthly-billing:
  Allow the DB to notify us to bill a customer
  Command.execution setter
  Bill plan command
  Clearer name for lock bypass factory
Allow the DB to notify us to bill a customer
Command.execution setter
Bill plan command

Implements the full logic of the billing_monthly_cronjob for one customer by
reusing code that has been written more robustly in sgx-jmp for some time.  This
will allow the cronjob to just execute this command once a day for each expiring
customer to get all the correct billing behaviours.
Clearer name for lock bypass factory
Declines should be an Int

Previously this retured a string and everywhere that used it had to
convert it into an it, or handle it if it's nil.

That's dumb.
Now it's always an int, and `nil.to_i` is 0 anyway so I don't have to
check that either.
Do not allow nil tndetails
LazyObject is not nil, so safenav doesn't work
Support older ruby
Order Transactions by Date

In my testing the natural order just happened to be the date order
because I had so little data.

But in the real world we should probably be more explicit!
Do not get CNAM during admin command

Since this is used by the billing cronjob and hitting BW so much is too expensive.
Refactor CustomerInfoForm to use find_by_format
Unused dead code
Shunt call to voicemail on exception
Next