When multiple PR lines for the same product were merged into a single
PO line, the allocation quantity was incorrectly calculated using
min(existing_po_qty, pr_line_qty) instead of using the actual PR line
quantity. This caused incorrect total quantities in the generated RFQ.
Example: PR with sir01 qty=10 and sir01 qty=7 should produce PO line
with qty=17, but was producing qty=14.
🤖 assisted by claude