mirror of
https://github.com/renee-png/acmcc.git
synced 2026-06-21 09:50:01 +00:00
Reassign payments_received when merging homeowners
mergeHomeownersByAddress reassigned invoices/transactions/work_orders/ estimates but missed payments_received, orphaning payment references on the deleted duplicate. Add it to the FK reassignment list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { accounting } from "@/lib/accountingClient";
|
||||
|
||||
// Tables that reference a homeowner via customer_id — reassigned to the survivor on merge
|
||||
const CUSTOMER_FK_TABLES = ["estimates", "invoices", "transactions", "work_orders"] as const;
|
||||
const CUSTOMER_FK_TABLES = ["estimates", "invoices", "payments_received", "transactions", "work_orders"] as const;
|
||||
|
||||
// Fields copied onto the survivor from a duplicate when the survivor's value is blank
|
||||
const FILLABLE_FIELDS = [
|
||||
|
||||
Reference in New Issue
Block a user