-- Migration: Add partial receive support to GRN/Stock Receiving
-- Run: mysql -u root dms_db < dms_partial_receive_migration.sql

ALTER TABLE purchase_items
    ADD COLUMN dblReceivedQty DECIMAL(18,2) DEFAULT 0 AFTER dblCost;

ALTER TABLE purchase_orders
    MODIFY COLUMN strStatus ENUM('PENDING','APPROVED','PARTIALLY_RECEIVED','RECEIVED');
