Add Yoco processing fee tracking to payments, settings, and reports
Estimates and snapshots the Yoco card-processing fee (always church-borne) on every card payment, lets the admin configure in-person/online fee % per plan in Settings -> Payments, and surfaces the fee alongside gross revenue across the Finance/Profit reports, Master Orders, Revenue Detailed, and the full cashup reconciliation flow (close-out screen, Cashup report, and audit trail) so payout figures match what actually lands in the bank.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Payment" ADD COLUMN "feeAmount" DOUBLE PRECISION,
|
||||
ADD COLUMN "feeChannel" TEXT,
|
||||
ADD COLUMN "feePayer" TEXT,
|
||||
ADD COLUMN "feeRate" DOUBLE PRECISION;
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Event" ADD COLUMN "feePayerOnline" TEXT;
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `feePayerOnline` on the `Event` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `feePayer` on the `Payment` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE "Event" DROP COLUMN "feePayerOnline";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "Payment" DROP COLUMN "feePayer";
|
||||
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "EventCashupLine" ADD COLUMN "feeAmount" DOUBLE PRECISION;
|
||||
@@ -221,6 +221,9 @@ model Payment {
|
||||
externalId String? @unique
|
||||
status String?
|
||||
originalPaymentId String?
|
||||
feeAmount Float?
|
||||
feeRate Float?
|
||||
feeChannel String?
|
||||
createdAt DateTime @default(now())
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Restrict)
|
||||
registration Registration? @relation(fields: [registrationId], references: [id], onDelete: SetNull)
|
||||
@@ -461,6 +464,7 @@ model EventCashupLine {
|
||||
cashup EventCashup @relation(fields: [cashupId], references: [id], onDelete: Cascade)
|
||||
method String
|
||||
expectedAmount Float @default(0)
|
||||
feeAmount Float?
|
||||
actualAmount Float?
|
||||
variance Float?
|
||||
notes String?
|
||||
|
||||
Reference in New Issue
Block a user