sde1000 / quicktill

Figure out where all the money and stock went to
GNU General Public License v3.0
43 stars 8 forks source link

Deferrable payments #212

Closed sde1000 closed 3 years ago

sde1000 commented 4 years ago

Until recently, all the different types of payment we supported could not be deferred from one session to the next along with their transaction. For example, when we take a card payment it's going to show up in the card totals for the day it was taken, even if the transaction it's applied to is deferred to a later day.

For this reason, the "defer transaction" action refunds all payments using the default payment method (usually "cash"), and tells the user to put the payment aside to use towards final payment of the transaction. (In practice, this usually doesn't happen — see #204.)

Since we introduced online payments for bookings and orders, we have a payment method where this is no longer true. The daily total for this payment method is simply the sum of all its payments. Online payments on a deferred transaction will be included in the totals on the day the transaction is closed, not the day the payment was made.

We should have a flag on payment methods that indicates whether they are deferrable, and when deferring transactions only take non-deferrable payments into account when calculating how much to refund using the default payment method.