Don't create refunds for payments with negative amounts
Fixes #5257
Merge pull request #89 from bonobos/2-2-dev-refund-negative-payments

Don't create refunds for payments with negative amounts
Always include "confirm" step
Disable transition to "complete" via "next"
Revert "explicit complete" commits

Until we get some testing done on them.

Revert "Disable transition to "complete" via "next""
This reverts commit ed01c51bc5b90d0d8e56a9a51855fcef0c14ccfa.

Revert "Always include "confirm" step"
This reverts commit bf6b2d750b6923f34ae4fe03085449dce56f7ef2.
Restore "explicit complete" work

This reverts commit b279ea4f685071ddb1e78a3cb8dd62caa5f67dfb, which restores "explicit complete".
Restore "Default credit card per user"

This reverts commit 728cb21433d0870dfe7df594f1172386c21a6629, which restores default credit cards

Closes #91
Add "advance" endpoint to admin orders controller

For when the admin goes to "confirm" page when the order is not in the "confirm" state.

Closes #91
Automatically check the return item checkbox when interacting with settings for returning the item
Add remibursement credits to admin panel under refunds

Closes #5283
Don't allow creating a new reimbursement if there are any pending ones on the customer return

Closes #5287
Allow orders to be canceled
Have reimbursements touch their customer returns

For example, completing a reimbursement may mean that a customer return is now fully reimbursed, etc.

cherry-picked from d07e0f41e9eae66fbf0ea12596c9031ff451fd35 in spree master
Fix AvailabilityValidator for saved records

Previously availability only considered inventory_units on the
target_shipment of a line_item. Since target_shipment is not persisted,
a saved line_item would become invalid when its variant ran out of
available inventory even if the inventory_units were already reserved.

Fixes #5208
Merge pull request #95 from bonobos/fix-line-item-availability-validator

Fix AvailabilityValidator for saved records
Detect old-style order refunds

In the `Spree::Order#has_non_reimbursement_related_refunds?` method.

The old style was not migrated due to not enough information being stored and because of potential ambiguities, but we still need to account for it here.

Conflicts:
	core/app/models/spree/payment.rb

Cherry-picked from c0c2ff82a597e5c9f7688d6f871b1e3f744d589a in spree master

Closes #96
Hide payment capture button prior to order completion

Just because you can doesn't mean you should. :)
Hide admin "ship" button in production

Shipment status updates should come from QL in production.
Restrict rails to 4.0.9
Merge pull request #100 from bonobos/rails-version

Restrict rails to 4.0.9