-- Adds a flat, non-taxable "extra charge" (packing/delivery/misc fee) to
-- orders, and the discount/coupon+extra-charge "reprice" capability that
-- lets a cashier apply/change a coupon or extra charge on an order that
-- already has a KOT sent (billing no longer had to happen before payment).
-- Only needed if your `orders` table predates this change — a fresh
-- `mysql -u root -p < schema.sql` import already includes it.
--
-- Usage: mysql -u root -p petzy_pos < add_extra_charge.sql

ALTER TABLE orders
    ADD COLUMN extra_amount DECIMAL(12,2) NOT NULL DEFAULT 0.00 COMMENT 'flat non-taxable addition, e.g. packing/delivery charge' AFTER tax_amount,
    ADD COLUMN extra_charge_label VARCHAR(100) NULL AFTER extra_amount;
