Run this SQL in your Supabase SQL Editor to create it:
CREATE TABLE IF NOT EXISTS returns (
id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
created_at timestamptz DEFAULT now() NOT NULL,
return_date date DEFAULT CURRENT_DATE NOT NULL,
product_id bigint,
quantity integer NOT NULL DEFAULT 1,
reason text NOT NULL DEFAULT 'other',
status text NOT NULL DEFAULT 'defective',
refund_amount numeric DEFAULT 0,
original_sale text,
notes text
);
ALTER TABLE returns DISABLE ROW LEVEL SECURITY;
⚠️ Refund tracking not enabled — run: ALTER TABLE returns ADD COLUMN IF NOT EXISTS refund_amount integer DEFAULT 0;
🗑️ Zilizofutwa
⏳ Vitu vilivyofutwa zaidi ya siku 30 vinaondolewa otomatiki.
📝 Rekodi ya Mabadiliko
Mpangilio
📤 Pakia Bidhaa Nyingi (Excel)
Pakia orodha ya bidhaa zako kwa faili la Excel. Pakua fomu kwanza.