INSERT INTO cash_flows (`start_balance`,`end_balance`, `transaction_amount`, `transaction_type`,`customer_register_id`,`note`)
SELECT promo_balance, 0.00 , promo_balance, 'promo_expired', id,'promotion is expired'
FROM `customer_registers`
WHERE `promo_expire_date` < CURDATE();
UPDATE `customer_registers`
SET `promo_balance`= 0.00
WHERE `promo_expire_date` < CURDATE();