Split refurbished (margin scheme) items into their own order at placement
Refurbished lines are invoiced on the RF- series, but only the partner checkout path
split them out. Internal POs and bulk orders raised a single mixed transaction, which
billed as one invoice on whichever series its first line happened to resolve to
(NSPJB2757, NSPJB3212, NSUPDL3898/3899/4365/4366).
- PurchaseOrderServiceImpl: split a mixed internal PO into a regular PO and a margin
scheme PO, each with its own PO number, PDF and internal transaction. External vendor
POs raise no transaction, so they are left intact.
- BulkOrderService: raise one transaction per billing group, each with its own loan
sized to the wallet balance left to it. Pricing, combo, credit availability and the
first-PO gates still validate the order as a whole, so a split first PO cannot block
its own second half.
- TransactionServiceImpl: drop the float narrowing of walletUsed in
createTransactionForCartLines - the field is a double and the cart total is validated
within 0.001, so any total carrying paise was rejected.