order_total must all reflect the same amount the closing company should bill.order_total, not to Guardian APIs).inspection.total from charges; it does not remove or zero the linked pac_fee Fee row, clear payment.feeAmount, or consistently refresh PAC payment.amount. syncTotalsOnInspection in src/util/functions/forecast/syncTotalsOnInspections.ts can still count the $30 fee in totalFees / totalPaidWithFees when the PAC payment is not excluded as pending. updatePACOrderTotal in src/util/functions/isn/handlePACUpdates.ts can send ISN order_total from inspection.total + Fee.amount (via _feeId), so ISN may match $401.92 while Attik UI and totals still show the waived fee.Backend
src/routes/isnPayments.ts (create order, PUT update-order), src/util/functions/isn/isnPayAtCloseOrderTotal.ts (isnPayAtCloseOrderTotal, payAtClosePaymentAmountTowardJob), src/util/functions/isn/handlePACUpdates.ts (charge-change hook from src/events/streamHandlers/inspectionStream.ts).src/util/functions/forecast/syncTotalsOnInspections.ts (total, totalPaid, totalFees, totalWithFees, totalPaidWithFees, remainingBalance, principalSurplusPaidOverCharges).src/models/feeSchema.ts, src/util/constants/feeTypes.ts (pac_fee), PAC fee creation on create in isnPayments.ts.src/util/functions/isn/validatePACThreshold.ts already falls back to payAtCloseFlatFee when _feeId is missing—updatePACOrderTotal does not; align behavior is in scope.Frontend
src/app/tools/inspections/[id]/components/ServicesPayments.tsx (totals header: total / Payments / Balance; PAC payment rows and fee line via getPaymentFeeAmount).src/app/client/job/[slug]/pay-beta/components/PayAtCloseTab.tsx, PaymentBetaClient.tsx (payAtCloseFlatFee in displayed totals).src/app/client/job/[slug]/pay/PaymentPageClient.tsx (negative remainingBalance).order_total excludes it).src/routes/isnPayments.ts, src/util/functions/isn/handlePACUpdates.ts, src/util/functions/forecast/syncTotalsOnInspections.tsPlease authenticate to join the conversation.
Completed
Main App
About 2 months ago
Linear
Get notified by email when there are changes.
Completed
Main App
About 2 months ago
Linear
Get notified by email when there are changes.