No description
Find a file
Hardik f4e0d8ae63 feat(catalog): track per-vendor prices; auto-sync catalog on payment
Schema:
- Add ProductVendorPrice table (productId, vendorId, price, updatedAt)
  with unique constraint on (productId, vendorId)

Payment action (markPaid):
- Auto-create Product for any unlinked line item (matched by name
  case-insensitively, or created fresh with auto-generated code)
- Link POLineItem.productId for newly matched/created products
- Upsert ProductVendorPrice for the PO vendor + unit price
- Always update Product.lastPrice / lastVendorId as denormalized cache

Search API:
- Include vendorPrices[] in results (vendorId, vendorName, price)

Editor dropdown:
- Show per-vendor prices below item name when available

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 03:47:39 +05:30
App/pelagia-portal feat(catalog): track per-vendor prices; auto-sync catalog on payment 2026-05-11 03:47:39 +05:30
.gitignore chore: initialize Next.js 15 project with Tailwind, TypeScript and tooling config 2026-05-05 23:23:43 +05:30