Urtzi Alfaro
dd79e6d85e
Fix procurement data structure and add price trends
Fixed critical structural issues in procurement fixture:
1. **Removed duplicate nested items** (32 items):
- Previous enhancement script incorrectly added 'items' arrays
inside purchase_orders
- Procurement service uses separate purchase_order_items table
- Removed all nested 'items' to match PurchaseOrderItem model
2. **Added price trends to existing PO items** (10 items updated):
- Harina T55: +8% (€0.85 → €0.92)
- Harina T65: +6% (€0.95 → €1.01)
- Mantequilla: +12% (€6.50 → €7.28) - highest increase
- Leche: -3% (€0.95 → €0.92) - seasonal surplus
- Levadura: +4% (€4.20 → €4.37)
- Azúcar: +2% (€1.10 → €1.12) - stable
3. **Recalculated PO totals** based on updated item prices
This enables procurement AI insights:
- Price trend analysis and alerts
- Supplier performance comparison
- Cost optimization recommendations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 11:01:43 +01:00
..
2025-12-16 11:01:43 +01:00
2025-12-13 23:57:54 +01:00
2025-12-13 23:57:54 +01:00