-- Slice 8O-ManualCostMargin · schema
-- When bid_price_source = MANUAL, capture how the bid was reached so the audit trail can reconstruct it:
--   submission_amount = manual_cost × (1 + manual_margin_pct / 100)
-- All existing rows are backfilled to 0/0 (the current submission_amount stays as authoritative).

ALTER TABLE tender_tracker
    ADD COLUMN manual_cost       DECIMAL(20,2) NOT NULL DEFAULT 0.00 AFTER bid_price_source,
    ADD COLUMN manual_margin_pct DECIMAL(6,3)  NOT NULL DEFAULT 0.000 AFTER manual_cost;
