fix: rename supplier_cost to cost and add tax/profit fields to product detail API

- Renamed supplier_cost to cost in VendorProductDetail schema
- Added tax_rate_percent, net_price, vat_amount, profit, profit_margin_percent
- Updated vendor_product_service to use new property names

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-20 21:24:08 +01:00
parent 8a2a955c92
commit 6d239c569f
2 changed files with 14 additions and 2 deletions

View File

@@ -193,8 +193,14 @@ class VendorProductService:
# Supplier tracking
"supplier": product.supplier,
"supplier_product_id": product.supplier_product_id,
"supplier_cost": product.supplier_cost,
"cost": product.cost,
"margin_percent": product.margin_percent,
# Tax/profit info
"tax_rate_percent": product.tax_rate_percent,
"net_price": product.net_price,
"vat_amount": product.vat_amount,
"profit": product.profit,
"profit_margin_percent": product.profit_margin_percent,
# Digital fulfillment
"download_url": product.download_url,
"license_type": product.license_type,