2024-07-29 16:00:14.6242
SELECT name, value FROM 0_sys_prefs

2024-07-29 16:00:14.77726
SELECT db_name FROM group_companies 
                WHERE default_company = 1 LIMIT 1

2024-07-29 16:00:14.81100
SELECT * FROM uke_db.0_employee_master WHERE employee_code='1062'

2024-07-29 16:00:14.87751
SELECT * FROM 0_fiscal_year WHERE id='16'

2024-07-29 16:00:14.106419
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-07-29 16:00:14.150738
SELECT DISTINCT iou.employee_code, iou.company_code  
            FROM 0_i_owe_you iou   
            WHERE iou.tran_date >='2024-07-01' 
                    AND iou.tran_date <='2024-07-31'
                    AND iou.approval_status IN (30,130) AND iou.batch_complete = 0  AND iou.employee_code ='1062'  GROUP BY iou.employee_code  UNION SELECT DISTINCT pet.employee_code, pet.company_code   
                FROM 0_petty_cash_header pet  
                WHERE pet.tran_date >='2024-07-01' 
                    AND pet.tran_date <='2024-07-31' AND pet.employee_code ='1062' GROUP BY pet.employee_code 
                   ORDER BY employee_code 

2024-07-29 16:00:14.185313
SELECT db_name FROM group_companies 
                WHERE company_code = 'UKE'

2024-07-29 16:00:14.187371
SELECT * FROM uke_db.0_employee_master WHERE employee_code='1062'

2024-07-29 16:00:14.192626
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-07-29 16:00:14.197874
SELECT DISTINCT iou.batch_no  
            FROM 0_i_owe_you iou
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code    
            WHERE iou.batch_no > 0 
                    AND iou.tran_date >= '1970-01-01' 
                    AND iou.tran_date <= '2024-06-30'
                    AND iou.approval_status IN (30,130) AND iou.batch_complete = 0  AND iou.employee_code = '1062' AND iou.type = '951' ORDER BY iou.batch_no

2024-07-29 16:00:14.200905
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1857'

2024-07-29 16:00:19.35973
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1857'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1857'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1857'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:19.99009
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1862'

2024-07-29 16:00:29.112342
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1862'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1862'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1862'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:29.132261
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1863'

2024-07-29 16:00:41.6586
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1863'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1863'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1863'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.26418
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1865'

2024-07-29 16:00:41.38642
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1865'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1865'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1865'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.57465
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1871'

2024-07-29 16:00:41.59929
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1871'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1871'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1871'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.79716
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1872'

2024-07-29 16:00:41.82250
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1872'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1872'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1872'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.106008
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1879'

2024-07-29 16:00:41.108202
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1879'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1879'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1879'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.126909
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1880'

2024-07-29 16:00:41.135255
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1880'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1880'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1880'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.159411
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1889'

2024-07-29 16:00:41.168011
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1889'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1889'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1889'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.189020
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1890'

2024-07-29 16:00:41.191173
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1890'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1890'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1890'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.225000
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1892'

2024-07-29 16:00:41.228758
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1892'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1892'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1892'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.249544
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1899'

2024-07-29 16:00:41.255085
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1899'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1899'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1899'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.275309
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1903'

2024-07-29 16:00:41.277459
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1903'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1903'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1903'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.295713
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1904'

2024-07-29 16:00:41.297794
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1904'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1904'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1904'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.315790
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1905'

2024-07-29 16:00:41.317792
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1905'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1905'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1905'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.339530
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1906'

2024-07-29 16:00:41.341665
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1906'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1906'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1906'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.362799
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1907'

2024-07-29 16:00:41.365205
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1907'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1907'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1907'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.383603
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1909'

2024-07-29 16:00:41.387989
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1909'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1909'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1909'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.406134
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1910'

2024-07-29 16:00:41.408213
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1910'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1910'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1910'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.426375
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1914'

2024-07-29 16:00:41.428428
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1914'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1914'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1914'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.446526
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1920'

2024-07-29 16:00:41.448650
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1920'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1920'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1920'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.492360
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1921'

2024-07-29 16:00:41.494511
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1921'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1921'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1921'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.512584
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1923'

2024-07-29 16:00:41.514697
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1923'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1923'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1923'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.532925
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1924'

2024-07-29 16:00:41.579797
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1924'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1924'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1924'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.605368
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1925'

2024-07-29 16:00:41.607464
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1925'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1925'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1925'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.634514
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1931'

2024-07-29 16:00:41.636772
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1931'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1931'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1931'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.656569
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1933'

2024-07-29 16:00:41.668040
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1933'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1933'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1933'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.695122
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1934'

2024-07-29 16:00:41.698303
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1934'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1934'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1934'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.717464
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1942'

2024-07-29 16:00:41.719551
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1942'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1942'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1942'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.740133
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1943'

2024-07-29 16:00:41.742749
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1943'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1943'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1943'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.780517
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1947'

2024-07-29 16:00:41.783391
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1947'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1947'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1947'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.806776
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1958'

2024-07-29 16:00:41.812951
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1958'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1958'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1958'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.833796
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1959'

2024-07-29 16:00:41.835977
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1959'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1959'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1959'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.854583
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1960'

2024-07-29 16:00:41.856812
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1960'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1960'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1960'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.874823
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1961'

2024-07-29 16:00:41.877414
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1961'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1961'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1961'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.934816
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1962'

2024-07-29 16:00:41.937301
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1962'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1962'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1962'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:41.958150
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1963'

2024-07-29 16:00:41.963345
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1963'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1963'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1963'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.17447
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1964'

2024-07-29 16:00:42.29430
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1964'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1964'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1964'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.53760
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1973'

2024-07-29 16:00:42.56110
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1973'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1973'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1973'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.78864
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1975'

2024-07-29 16:00:42.81758
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1975'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1975'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1975'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.107765
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1976'

2024-07-29 16:00:42.113017
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1976'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1976'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1976'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.165160
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1983'

2024-07-29 16:00:42.178647
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1983'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1983'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1983'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.196955
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1984'

2024-07-29 16:00:42.216373
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1984'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1984'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1984'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.236854
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1985'

2024-07-29 16:00:42.276278
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1985'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1985'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1985'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.307180
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1986'

2024-07-29 16:00:42.310714
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1986'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1986'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1986'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.338061
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1987'

2024-07-29 16:00:42.341216
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1987'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1987'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1987'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.365761
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1988'

2024-07-29 16:00:42.368302
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1988'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1988'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1988'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.389067
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1992'

2024-07-29 16:00:42.398395
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1992'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1992'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1992'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.417204
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1994'

2024-07-29 16:00:42.431554
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1994'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1994'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1994'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.464108
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1995'

2024-07-29 16:00:42.467784
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1995'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1995'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1995'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.497387
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1998'

2024-07-29 16:00:42.512432
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1998'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1998'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1998'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.535362
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1999'

2024-07-29 16:00:42.548805
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1999'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1999'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '1999'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.569165
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2002'

2024-07-29 16:00:42.579119
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2002'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2002'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2002'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.598545
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2007'

2024-07-29 16:00:42.600742
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2007'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2007'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2007'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.674306
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2008'

2024-07-29 16:00:42.688572
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2008'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2008'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2008'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.707315
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2009'

2024-07-29 16:00:42.719805
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2009'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2009'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2009'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.738616
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2013'

2024-07-29 16:00:42.741150
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2013'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2013'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2013'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.762379
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2037'

2024-07-29 16:00:42.765756
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2037'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2037'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2037'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.794897
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2038'

2024-07-29 16:00:42.798991
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2038'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2038'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2038'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.819000
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2040'

2024-07-29 16:00:42.828882
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2040'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2040'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2040'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.850479
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2043'

2024-07-29 16:00:42.853496
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2043'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2043'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2043'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.880662
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2044'

2024-07-29 16:00:42.883532
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2044'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2044'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2044'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.902042
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2045'

2024-07-29 16:00:42.944594
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2045'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2045'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2045'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:42.993864
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2047'

2024-07-29 16:00:42.996400
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2047'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2047'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2047'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.15010
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2048'

2024-07-29 16:00:43.17168
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2048'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2048'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2048'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.41048
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2049'

2024-07-29 16:00:43.43208
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2049'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2049'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2049'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.61919
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2050'

2024-07-29 16:00:43.64105
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2050'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2050'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2050'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.82521
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2051'

2024-07-29 16:00:43.84657
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2051'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2051'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2051'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.103026
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2056'

2024-07-29 16:00:43.105399
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2056'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2056'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2056'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.129767
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2067'

2024-07-29 16:00:43.132290
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2067'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2067'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2067'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.152015
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2068'

2024-07-29 16:00:43.155380
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2068'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2068'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2068'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.176672
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2071'

2024-07-29 16:00:43.186633
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2071'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2071'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2071'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.213527
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2072'

2024-07-29 16:00:43.216193
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2072'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2072'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2072'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.246634
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2075'

2024-07-29 16:00:43.250408
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2075'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2075'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2075'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.379006
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2076'

2024-07-29 16:00:43.381075
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2076'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2076'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2076'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.405379
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2077'

2024-07-29 16:00:43.470513
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2077'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2077'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2077'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.489259
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2083'

2024-07-29 16:00:43.491462
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2083'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2083'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2083'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.510113
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2084'

2024-07-29 16:00:43.512304
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2084'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2084'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2084'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.531394
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2085'

2024-07-29 16:00:43.533624
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2085'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2085'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2085'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.551997
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2087'

2024-07-29 16:00:43.554195
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2087'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2087'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2087'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.572881
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2100'

2024-07-29 16:00:43.575126
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2100'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2100'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2100'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.593389
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2101'

2024-07-29 16:00:43.595573
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2101'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2101'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2101'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.615807
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2113'

2024-07-29 16:00:43.618717
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2113'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2113'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2113'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.642409
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2118'

2024-07-29 16:00:43.644467
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2118'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2118'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2118'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.663316
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2121'

2024-07-29 16:00:43.665488
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2121'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2121'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2121'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.699957
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2122'

2024-07-29 16:00:43.701975
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2122'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2122'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2122'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.734682
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2123'

2024-07-29 16:00:43.736781
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2123'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2123'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2123'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.798134
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2125'

2024-07-29 16:00:43.817727
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2125'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2125'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2125'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.840765
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2126'

2024-07-29 16:00:43.843148
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2126'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2126'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2126'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.862939
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2128'

2024-07-29 16:00:43.865076
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2128'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2128'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2128'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.883270
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2129'

2024-07-29 16:00:43.885478
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2129'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2129'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2129'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.903772
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2130'

2024-07-29 16:00:43.906183
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2130'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2130'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2130'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.924183
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2135'

2024-07-29 16:00:43.926408
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2135'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2135'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2135'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.944621
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2136'

2024-07-29 16:00:43.947000
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2136'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2136'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2136'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.965687
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2142'

2024-07-29 16:00:43.967846
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2142'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2142'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2142'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:43.985908
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2165'

2024-07-29 16:00:43.988063
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2165'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2165'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2165'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.6262
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2166'

2024-07-29 16:00:44.8468
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2166'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2166'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2166'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.26784
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2167'

2024-07-29 16:00:44.29010
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2167'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2167'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2167'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.256278
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2168'

2024-07-29 16:00:44.272622
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2168'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2168'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2168'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.291104
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2169'

2024-07-29 16:00:44.293261
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2169'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2169'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2169'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.311791
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2170'

2024-07-29 16:00:44.314020
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2170'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2170'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2170'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.332430
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2173'

2024-07-29 16:00:44.334563
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2173'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2173'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2173'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.352720
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2174'

2024-07-29 16:00:44.354999
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2174'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2174'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2174'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.373376
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2181'

2024-07-29 16:00:44.375637
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2181'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2181'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2181'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.484571
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2189'

2024-07-29 16:00:44.486826
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2189'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2189'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2189'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.506312
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2191'

2024-07-29 16:00:44.508584
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2191'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2191'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2191'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.527669
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2194'

2024-07-29 16:00:44.530002
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2194'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2194'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2194'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.548269
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2196'

2024-07-29 16:00:44.550475
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2196'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2196'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2196'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.568740
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2197'

2024-07-29 16:00:44.570907
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2197'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2197'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2197'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.592405
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2198'

2024-07-29 16:00:44.594878
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2198'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2198'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2198'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.617160
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2202'

2024-07-29 16:00:44.630141
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2202'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2202'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2202'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.662948
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2209'

2024-07-29 16:00:44.666583
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2209'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2209'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2209'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.686423
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2210'

2024-07-29 16:00:44.689380
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2210'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2210'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2210'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.719282
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2223'

2024-07-29 16:00:44.721763
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2223'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2223'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2223'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.747105
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2243'

2024-07-29 16:00:44.749818
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2243'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2243'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2243'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.768348
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2244'

2024-07-29 16:00:44.857263
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2244'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2244'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2244'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.879798
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2245'

2024-07-29 16:00:44.884198
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2245'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2245'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2245'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.902965
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2260'

2024-07-29 16:00:44.906206
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2260'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2260'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2260'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.926818
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2261'

2024-07-29 16:00:44.929315
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2261'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2261'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2261'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.955142
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2262'

2024-07-29 16:00:44.957914
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2262'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2262'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2262'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:44.980443
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2264'

2024-07-29 16:00:44.994222
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2264'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2264'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2264'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.13482
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2265'

2024-07-29 16:00:45.15735
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2265'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2265'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2265'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.34251
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2270'

2024-07-29 16:00:45.42415
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2270'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2270'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2270'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.62558
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2272'

2024-07-29 16:00:45.77742
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2272'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2272'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2272'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.96920
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2273'

2024-07-29 16:00:45.104439
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2273'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2273'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2273'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.123958
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2275'

2024-07-29 16:00:45.128184
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2275'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2275'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2275'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.158878
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2276'

2024-07-29 16:00:45.164687
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2276'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2276'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2276'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.183247
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2277'

2024-07-29 16:00:45.185480
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2277'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2277'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2277'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.205488
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2278'

2024-07-29 16:00:45.207868
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2278'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2278'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2278'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.228746
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2279'

2024-07-29 16:00:45.244509
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2279'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2279'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2279'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.266707
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2280'

2024-07-29 16:00:45.269574
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2280'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2280'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2280'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.288466
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2281'

2024-07-29 16:00:45.304363
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2281'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2281'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2281'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.324245
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2284'

2024-07-29 16:00:45.337434
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2284'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2284'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2284'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.356183
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2285'

2024-07-29 16:00:45.372061
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2285'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2285'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2285'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.391030
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2287'

2024-07-29 16:00:45.393389
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2287'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2287'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2287'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.412001
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2290'

2024-07-29 16:00:45.414376
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2290'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2290'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2290'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.433392
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2291'

2024-07-29 16:00:45.435762
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2291'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2291'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2291'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.454563
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2293'

2024-07-29 16:00:45.456944
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2293'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2293'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2293'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.478435
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2307'

2024-07-29 16:00:45.509353
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2307'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2307'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2307'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.590459
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2314'

2024-07-29 16:00:45.594037
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2314'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2314'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2314'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.612622
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2316'

2024-07-29 16:00:45.643039
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2316'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2316'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2316'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.666394
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2319'

2024-07-29 16:00:45.669603
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2319'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2319'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2319'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.699970
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2327'

2024-07-29 16:00:45.703097
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2327'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2327'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2327'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:45.925480
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2329'

2024-07-29 16:00:45.982290
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2329'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2329'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2329'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.11943
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2337'

2024-07-29 16:00:46.15876
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2337'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2337'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2337'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.48940
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2343'

2024-07-29 16:00:46.52550
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2343'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2343'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2343'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.83406
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2344'

2024-07-29 16:00:46.97100
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2344'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2344'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2344'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.116067
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2347'

2024-07-29 16:00:46.120554
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2347'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2347'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2347'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.145163
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2348'

2024-07-29 16:00:46.147467
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2348'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2348'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2348'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.172221
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2349'

2024-07-29 16:00:46.193813
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2349'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2349'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2349'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.218762
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2350'

2024-07-29 16:00:46.224307
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2350'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2350'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2350'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.250575
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2351'

2024-07-29 16:00:46.253076
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2351'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2351'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2351'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.272150
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2354'

2024-07-29 16:00:46.281755
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2354'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2354'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2354'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.303226
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2357'

2024-07-29 16:00:46.305335
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2357'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2357'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2357'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.337628
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2359'

2024-07-29 16:00:46.340113
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2359'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2359'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2359'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.358513
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2361'

2024-07-29 16:00:46.360753
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2361'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2361'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2361'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.380433
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2362'

2024-07-29 16:00:46.382862
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2362'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2362'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2362'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.402472
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2363'

2024-07-29 16:00:46.405010
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2363'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2363'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2363'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.428706
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2364'

2024-07-29 16:00:46.452931
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2364'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2364'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2364'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.474105
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2366'

2024-07-29 16:00:46.477071
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2366'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2366'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2366'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.496559
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2370'

2024-07-29 16:00:46.499524
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2370'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2370'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2370'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.518468
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2376'

2024-07-29 16:00:46.520908
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2376'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2376'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2376'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.540013
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2380'

2024-07-29 16:00:46.542476
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2380'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2380'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2380'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.560668
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2381'

2024-07-29 16:00:46.563009
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2381'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2381'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2381'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.587382
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2384'

2024-07-29 16:00:46.595116
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2384'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2384'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2384'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.614191
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2385'

2024-07-29 16:00:46.616656
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2385'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2385'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2385'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.643709
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2386'

2024-07-29 16:00:46.648969
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2386'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2386'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2386'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.688591
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2388'

2024-07-29 16:00:46.690998
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2388'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2388'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2388'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.711670
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2390'

2024-07-29 16:00:46.715361
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2390'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2390'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2390'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.734711
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2391'

2024-07-29 16:00:46.737212
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2391'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2391'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2391'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.760713
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2392'

2024-07-29 16:00:46.808727
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2392'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2392'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2392'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.829285
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2397'

2024-07-29 16:00:46.833469
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2397'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2397'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2397'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.851785
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2398'

2024-07-29 16:00:46.853975
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2398'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2398'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2398'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.914417
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2399'

2024-07-29 16:00:46.917611
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2399'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2399'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2399'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.938415
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2400'

2024-07-29 16:00:46.941946
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2400'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2400'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2400'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:46.964131
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2401'

2024-07-29 16:00:47.13919
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2401'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2401'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2401'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.38962
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2402'

2024-07-29 16:00:47.45949
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2402'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2402'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2402'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.65927
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2403'

2024-07-29 16:00:47.84489
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2403'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2403'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2403'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.113521
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2405'

2024-07-29 16:00:47.116529
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2405'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2405'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2405'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.135265
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2406'

2024-07-29 16:00:47.140660
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2406'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2406'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2406'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.174996
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2407'

2024-07-29 16:00:47.180496
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2407'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2407'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2407'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.210414
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2408'

2024-07-29 16:00:47.213628
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2408'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2408'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2408'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.239014
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2409'

2024-07-29 16:00:47.241984
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2409'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2409'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2409'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.264407
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2413'

2024-07-29 16:00:47.278260
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2413'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2413'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2413'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.307079
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2415'

2024-07-29 16:00:47.309660
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2415'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2415'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2415'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.355403
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2416'

2024-07-29 16:00:47.511444
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2416'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2416'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2416'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.661493
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2417'

2024-07-29 16:00:47.802097
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2417'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2417'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2417'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.820841
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2418'

2024-07-29 16:00:47.823090
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2418'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2418'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2418'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.865060
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2419'

2024-07-29 16:00:47.874195
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2419'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2419'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2419'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.897772
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2421'

2024-07-29 16:00:47.900086
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2421'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2421'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2421'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.929756
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2424'

2024-07-29 16:00:47.944049
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2424'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2424'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2424'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.972402
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2425'

2024-07-29 16:00:47.975489
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2425'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2425'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2425'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:47.993908
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2429'

2024-07-29 16:00:48.8131
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2429'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2429'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2429'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.38919
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2430'

2024-07-29 16:00:48.165835
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2430'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2430'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2430'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.191666
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2431'

2024-07-29 16:00:48.194479
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2431'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2431'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2431'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.212873
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2435'

2024-07-29 16:00:48.226916
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2435'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2435'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2435'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.278097
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2439'

2024-07-29 16:00:48.404410
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2439'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2439'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2439'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.449012
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2444'

2024-07-29 16:00:48.454576
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2444'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2444'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2444'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.500610
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2445'

2024-07-29 16:00:48.502977
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2445'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2445'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2445'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.526326
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2446'

2024-07-29 16:00:48.528692
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2446'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2446'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2446'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.751608
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2449'

2024-07-29 16:00:48.764095
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2449'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2449'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2449'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:48.811501
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2450'

2024-07-29 16:00:48.855819
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2450'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2450'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2450'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.316597
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2455'

2024-07-29 16:00:49.319408
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2455'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2455'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2455'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.339600
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2456'

2024-07-29 16:00:49.378803
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2456'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2456'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2456'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.405428
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2457'

2024-07-29 16:00:49.421958
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2457'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2457'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2457'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.443858
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2458'

2024-07-29 16:00:49.446451
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2458'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2458'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2458'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.465022
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2459'

2024-07-29 16:00:49.467185
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2459'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2459'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2459'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.486216
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2460'

2024-07-29 16:00:49.488246
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2460'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2460'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2460'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.508530
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2461'

2024-07-29 16:00:49.510653
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2461'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2461'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2461'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.529121
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2462'

2024-07-29 16:00:49.531269
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2462'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2462'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2462'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.549668
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2463'

2024-07-29 16:00:49.551782
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2463'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2463'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2463'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.578108
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2465'

2024-07-29 16:00:49.580624
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2465'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2465'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2465'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.612481
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2466'

2024-07-29 16:00:49.615690
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2466'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2466'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2466'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.655231
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2467'

2024-07-29 16:00:49.657638
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2467'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2467'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2467'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.679733
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2519'

2024-07-29 16:00:49.681989
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2519'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2519'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2519'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.720922
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2523'

2024-07-29 16:00:49.723112
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2523'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2523'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2523'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.745606
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2547'

2024-07-29 16:00:49.781114
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2547'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2547'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2547'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.878236
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-07-29 16:00:49.883681
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no = 0   ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no = 0   ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '01/01/1970' 
                AND iou.tran_date <= '06/30/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no = 0   ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.902791
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='PETTY_CASH'

2024-07-29 16:00:49.904098
SELECT pet.*,dp.value_name department, bt.amount batch_total, bt.approval_status, bt.complete, 
                        pm.description project_name, ft.name float_name   
            FROM 0_petty_cash_header pet
                JOIN 0_i_owe_you_batches bt  
                    ON pet.batch_no = bt.batch_no 
                JOIN 0_projects_master pm 
                    ON pm.project_id = pet.project_id
                JOIN 0_list_values dp 
                    ON dp.id = pm.department_id 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON pet.float_id = ft.id      
            WHERE pet.employee_code = '1062'         
                AND pet.type = '950'            
                AND pet.tran_date >='1970-01-01' AND pet.tran_date <='2024-06-30' AND pet.batch_complete = 0  ORDER BY pet.id, pet.batch_no 

2024-07-29 16:00:49.935073
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-07-29 16:00:49.937281
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no = 0   ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no = 0   ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no = 0   ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.955795
SELECT DISTINCT iou.batch_no  
            FROM 0_i_owe_you iou
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code    
            WHERE iou.batch_no > 0 
                    AND iou.tran_date >= '2024-07-01' 
                    AND iou.tran_date <= '2024-07-31'
                    AND iou.approval_status IN (30,130) AND iou.batch_complete = 0  AND iou.employee_code = '1062' AND iou.type = '951' ORDER BY iou.batch_no

2024-07-29 16:00:49.960716
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2518'

2024-07-29 16:00:49.962648
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2518'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2518'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2518'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:49.980786
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2552'

2024-07-29 16:00:49.982848
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2552'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2552'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2552'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:50.1579
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2553'

2024-07-29 16:00:50.3616
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2553'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2553'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2553'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:50.36214
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2555'

2024-07-29 16:00:50.38506
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2555'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2555'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2555'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:50.56584
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2567'

2024-07-29 16:00:50.58624
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.project_name, al.type, al.trans_no, al.pay_date, 
                    al.pay_amount, al.run_id, al.float_name 
                FROM ( (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, 0 type, 
                0 trans_no, '' pay_date, 0 pay_amount, 0 run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id IS NULL AND bt.trans_no IS NULL  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2567'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, p.expense_source type, 
                p.id trans_no, p.payment_date pay_date, p.amount pay_amount, p.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = iou.id 
                        AND p.expense_source = '107' 
                        AND p.paid = 1 
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id 
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND p.id > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2567'  ORDER BY iou.batch_no, iou.id ) UNION (SELECT iou.id, iou.batch_no, iou.tran_date, iou.amount, iou.batch_complete, pm.description project_name, bt.type, 
                bt.trans_no, bt.trans_date pay_date, bt.amount*-1 pay_amount, bt.id run_id, ft.name float_name  
            FROM 0_i_owe_you iou 
                LEFT JOIN 0_bank_trans bt 
                    ON iou.id = bt.person_id 
                        AND bt.type IN('230', '232')  
                LEFT JOIN 0_projects_master pm 
                    ON pm.project_id = iou.project_id
                LEFT JOIN 0_list_values dp 
                    ON dp.id = pm.department_id
                LEFT JOIN 0_employee_master em 
                    ON em.employee_code = iou.employee_code 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON iou.float_id = ft.id     
            WHERE iou.approval_status = '30' 
                AND iou.tran_date >= '07/01/2024' 
                AND iou.tran_date <= '07/31/2024'
                AND iou.approval_status IN (30, 130)
                AND bt.trans_no > 0  AND iou.batch_complete = 0  AND iou.employee_code ='1062' AND iou.type ='951' AND iou.batch_no > 0 AND iou.batch_no = '2567'  ORDER BY iou.batch_no, iou.id ) ) al 
                WHERE 1 = 1 
                ORDER BY al.id, al.tran_date, al.pay_date, al.run_id, al.trans_no

2024-07-29 16:00:50.78491
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='PETTY_CASH'

2024-07-29 16:00:50.79826
SELECT pet.*,dp.value_name department, bt.amount batch_total, bt.approval_status, bt.complete, 
                        pm.description project_name, ft.name float_name   
            FROM 0_petty_cash_header pet
                JOIN 0_i_owe_you_batches bt  
                    ON pet.batch_no = bt.batch_no 
                JOIN 0_projects_master pm 
                    ON pm.project_id = pet.project_id
                JOIN 0_list_values dp 
                    ON dp.id = pm.department_id 
                LEFT JOIN 0_petty_cash_floats ft  
                    ON pet.float_id = ft.id      
            WHERE pet.employee_code = '1062'         
                AND pet.type = '950'            
                AND pet.tran_date >='2024-07-01' AND pet.tran_date <='2024-07-31' AND pet.batch_complete = 0  ORDER BY pet.id, pet.batch_no 

2024-07-29 16:00:50.278550
SELECT printer FROM 0_print_profiles WHERE profile='' AND report='991263'

2024-07-29 16:00:50.281175
SELECT printer FROM 0_print_profiles WHERE profile='' AND report=''

