Add taxableFlag to product updates, QUO-Narrative quote fallback, and orphan reconciliation

- Add taxableFlag boolean field to product update schema and forecast patch
- Fall back to QUO-Narrative product customerDescription for quote narrative
- Reconcile orphaned local opportunity records not found in CW during refresh
- Invalidate caches for removed orphaned opportunities
- Add reconciled event and orphanedCount to refresh events
- Update API_ROUTES.md with taxableFlag field documentation
This commit is contained in:
2026-03-09 17:48:47 -05:00
parent ee3e0a7377
commit 5afda8cb34
5 changed files with 67 additions and 13 deletions
@@ -18,6 +18,7 @@ const updateProductSchema = z
customerDescription: z.string().nullable().optional(),
productNarrative: z.string().nullable().optional(),
procurementNotes: z.string().nullable().optional(),
taxableFlag: z.boolean().optional(),
})
.strict()
.refine(
@@ -108,6 +109,9 @@ export default createRoute(
(input.unitCost * effectiveQuantity).toFixed(2),
);
}
if (input.taxableFlag !== undefined) {
forecastPatch.taxableFlag = input.taxableFlag;
}
const existingProcurement =
await opportunity.fetchProcurementProductByForecastItem(productId);