Pistonlog has two separate payment-tracking systems on a jobcard. They serve different needs and they live in different tables.
The two systems side by side
| System | Table | Records | Statuses |
|---|---|---|---|
| Manual payments | jobcardPayments | Cash, cheque, bank | (none — just amounts + voided flag) |
| Square payments | payments | All 4 Square methods | PENDING / COMPLETED / FAILED / REFUNDED |
The jobcard's invoice status (unpaid / partial / paid) is calculated from manual payments only.
Why two systems
It's mostly historical, but there's a real reason: Square payments are driven by an external webhook and can flip status asynchronously. The manual system is the one you control — you record what's actually been settled, on your books, in your time. Mixing them risks the invoice status flapping when Square's webhook is slow or delivered out of order.
Reconciling
When you take a card payment via Square and want the jobcard's invoice status to reflect it:
Wait for Square to show COMPLETED
Either via the webhook or by tapping the refresh icon on the payment status display.
Record a matching manual payment
Amount = the Square payment amount. Reference = something like Square — abc12345 so you can match it back to the Square dashboard. This pushes the invoice status forward.
This is a quirk and may be smoothed over in a future release.
A jobcard can be paid by both
There's nothing wrong with a customer paying half by card (Square) and half by bank transfer (manual). Both go on the jobcard, in their respective tables, and you'd record both manually if you want the invoice status to reflect the combined payment.