2024-08-04 18:12:12.130732
SELECT name, value FROM 0_sys_prefs

2024-08-04 18:12:12.242444
SELECT db_name FROM group_companies 
                WHERE default_company = 1 LIMIT 1

2024-08-04 18:12:12.251964
SELECT * FROM uke_db.0_employee_master WHERE employee_code='1062'

2024-08-04 18:12:12.270916
SELECT * FROM 0_fiscal_year WHERE id='16'

2024-08-04 18:12:12.319965
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:12:12.396493
SELECT DISTINCT iou.employee_code, iou.company_code  
            FROM 0_i_owe_you iou   
            WHERE iou.tran_date >='2024-01-01' 
                    AND iou.tran_date <='2024-03-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-01-01' 
                    AND pet.tran_date <='2024-03-31' AND pet.employee_code ='1062' GROUP BY pet.employee_code 
                   ORDER BY employee_code 

2024-08-04 18:12:12.408346
SELECT db_name FROM group_companies 
                WHERE company_code = 'UKE'

2024-08-04 18:12:12.445842
SELECT * FROM uke_db.0_employee_master WHERE employee_code='1062'

2024-08-04 18:12:12.457960
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-08-04 18:12:12.459546
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 <= '2023-12-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-08-04 18:12:12.462464
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1857'

2024-08-04 18:12:12.463919
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.471890
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1862'

2024-08-04 18:12:12.473404
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.479290
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1863'

2024-08-04 18:12:12.480766
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.486124
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1865'

2024-08-04 18:12:12.490574
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.498948
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1871'

2024-08-04 18:12:12.501198
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.511220
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1872'

2024-08-04 18:12:12.517582
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.531580
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1879'

2024-08-04 18:12:12.549510
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.557041
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1880'

2024-08-04 18:12:12.573848
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.592778
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1889'

2024-08-04 18:12:12.604192
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.623353
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1890'

2024-08-04 18:12:12.639889
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.669620
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1892'

2024-08-04 18:12:12.675833
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.689542
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1899'

2024-08-04 18:12:12.707996
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.724540
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1903'

2024-08-04 18:12:12.740002
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.745345
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1904'

2024-08-04 18:12:12.748794
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.754811
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1905'

2024-08-04 18:12:12.756518
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.761677
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1906'

2024-08-04 18:12:12.763009
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.768083
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1907'

2024-08-04 18:12:12.769448
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.779260
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1909'

2024-08-04 18:12:12.780656
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.786245
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1910'

2024-08-04 18:12:12.788256
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.793632
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1914'

2024-08-04 18:12:12.795583
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.801025
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1920'

2024-08-04 18:12:12.803336
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.808965
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1921'

2024-08-04 18:12:12.810739
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.815888
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1923'

2024-08-04 18:12:12.817338
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.822410
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1924'

2024-08-04 18:12:12.823756
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.828801
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1925'

2024-08-04 18:12:12.830127
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.835114
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1931'

2024-08-04 18:12:12.836929
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.842720
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1933'

2024-08-04 18:12:12.844510
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.849595
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1934'

2024-08-04 18:12:12.850921
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.855978
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1942'

2024-08-04 18:12:12.857287
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.862695
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1943'

2024-08-04 18:12:12.864587
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.869668
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1947'

2024-08-04 18:12:12.871057
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.877181
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1958'

2024-08-04 18:12:12.879126
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.884357
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1959'

2024-08-04 18:12:12.886219
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.891465
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1960'

2024-08-04 18:12:12.897852
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.917285
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1961'

2024-08-04 18:12:12.919135
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.924455
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1962'

2024-08-04 18:12:12.933226
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.940134
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1963'

2024-08-04 18:12:12.941838
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.948358
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1964'

2024-08-04 18:12:12.957525
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.964872
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1973'

2024-08-04 18:12:12.968699
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:12.990540
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1975'

2024-08-04 18:12:13.16493
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.34411
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1976'

2024-08-04 18:12:13.49309
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.72817
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1983'

2024-08-04 18:12:13.88640
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.105495
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1984'

2024-08-04 18:12:13.118267
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.125501
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1985'

2024-08-04 18:12:13.150060
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.176230
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1986'

2024-08-04 18:12:13.199871
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.218751
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1987'

2024-08-04 18:12:13.230085
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.247478
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1988'

2024-08-04 18:12:13.251890
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.264920
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1992'

2024-08-04 18:12:13.283935
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.295399
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1994'

2024-08-04 18:12:13.299805
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.314365
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1995'

2024-08-04 18:12:13.323772
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.354363
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1998'

2024-08-04 18:12:13.370241
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.392948
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1999'

2024-08-04 18:12:13.406030
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.415476
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2002'

2024-08-04 18:12:13.434075
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.441615
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2007'

2024-08-04 18:12:13.457211
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.480585
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2008'

2024-08-04 18:12:13.495323
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.516693
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2009'

2024-08-04 18:12:13.539500
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.556144
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2013'

2024-08-04 18:12:13.585621
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.599763
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2037'

2024-08-04 18:12:13.625735
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.642075
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2038'

2024-08-04 18:12:13.650625
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.668029
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2040'

2024-08-04 18:12:13.680374
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.708390
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2043'

2024-08-04 18:12:13.727815
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.746212
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2044'

2024-08-04 18:12:13.753917
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.760336
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2045'

2024-08-04 18:12:13.761685
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.766737
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2047'

2024-08-04 18:12:13.768110
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.773188
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2048'

2024-08-04 18:12:13.774529
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.779599
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2049'

2024-08-04 18:12:13.780924
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.786083
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2050'

2024-08-04 18:12:13.787440
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.792751
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2051'

2024-08-04 18:12:13.794152
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.799189
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2056'

2024-08-04 18:12:13.800515
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.805598
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2077'

2024-08-04 18:12:13.806955
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.812110
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2118'

2024-08-04 18:12:13.813517
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.819084
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2126'

2024-08-04 18:12:13.823392
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.828657
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-08-04 18:12:13.829978
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-12-31'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 18:12:13.835486
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='PETTY_CASH'

2024-08-04 18:12:13.842071
SELECT pet.*,dp.value_name department, bt.amount batch_total, bt.approval_status, bt.complete, 
                pm.description project_name, ft.name float_name, p.expense_source type, p.id trans_no, p.payment_date pay_date, bt.approved_on 
            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      
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = pet.id 
                        AND p.expense_source = '168' 
                        AND p.paid = 1 
            WHERE pet.employee_code = '1062'         
                AND pet.type = '950'            
                AND pet.tran_date >='1970-01-01' AND pet.tran_date <='2023-12-31' AND pet.batch_complete = 0  ORDER BY pet.id, pet.batch_no 

2024-08-04 18:12:13.852410
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-08-04 18:12:27.32628
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.118271
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-01-01' 
                    AND iou.tran_date <= '2024-03-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-08-04 18:19:46.131075
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2067'

2024-08-04 18:19:46.133228
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.194631
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:46.283180
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2068'

2024-08-04 18:19:46.286171
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.365452
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2071'

2024-08-04 18:19:46.368146
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.434706
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:46.476840
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2072'

2024-08-04 18:19:46.479114
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.538952
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2075'

2024-08-04 18:19:46.541959
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.600539
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2076'

2024-08-04 18:19:46.603521
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.667896
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2083'

2024-08-04 18:19:46.670404
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.729460
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2084'

2024-08-04 18:19:46.732664
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.798755
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:46.842227
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2085'

2024-08-04 18:19:46.844533
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.922541
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2087'

2024-08-04 18:19:46.924791
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:46.982916
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2100'

2024-08-04 18:19:46.985133
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.43124
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2101'

2024-08-04 18:19:47.45378
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.111772
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:47.160226
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2113'

2024-08-04 18:19:47.163228
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.223113
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2118'

2024-08-04 18:19:47.225585
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.281975
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2121'

2024-08-04 18:19:47.285053
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.343485
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2122'

2024-08-04 18:19:47.346673
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.404598
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2123'

2024-08-04 18:19:47.406824
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.473064
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:47.515528
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2125'

2024-08-04 18:19:47.517682
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.575460
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2126'

2024-08-04 18:19:47.578495
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.645752
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2128'

2024-08-04 18:19:47.658499
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.721704
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2129'

2024-08-04 18:19:47.743842
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.802118
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2130'

2024-08-04 18:19:47.804375
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.871655
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:47.914006
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2135'

2024-08-04 18:19:47.916262
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:47.977449
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2136'

2024-08-04 18:19:47.979977
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:48.219846
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2142'

2024-08-04 18:19:48.232014
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:48.367694
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:48.431413
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2165'

2024-08-04 18:19:48.434267
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:48.499937
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2166'

2024-08-04 18:19:48.502812
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:48.569376
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2167'

2024-08-04 18:19:48.571635
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:48.633717
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2168'

2024-08-04 18:19:48.635968
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:48.732632
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:48.794852
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2169'

2024-08-04 18:19:48.799227
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:48.887358
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2170'

2024-08-04 18:19:48.890246
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:48.977457
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2173'

2024-08-04 18:19:48.980382
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:49.48335
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:49.115785
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2174'

2024-08-04 18:19:49.130890
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:49.197962
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2181'

2024-08-04 18:19:49.201542
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:49.309371
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:49.378033
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2189'

2024-08-04 18:19:49.399393
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:49.481113
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2191'

2024-08-04 18:19:49.483508
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:49.542382
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2194'

2024-08-04 18:19:49.544566
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:49.612949
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:49.711836
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2196'

2024-08-04 18:19:49.714034
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:49.801128
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2197'

2024-08-04 18:19:49.803992
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:49.878549
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:49.919992
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2198'

2024-08-04 18:19:49.922162
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:50.3340
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2202'

2024-08-04 18:19:50.5578
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:50.92609
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2209'

2024-08-04 18:19:50.95288
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:50.185546
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:50.233943
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2210'

2024-08-04 18:19:50.265741
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:50.377026
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2223'

2024-08-04 18:19:50.380810
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:50.474893
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:50.521927
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2243'

2024-08-04 18:19:50.532900
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:50.749699
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2244'

2024-08-04 18:19:50.755396
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:50.870210
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:50.911820
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2245'

2024-08-04 18:19:50.913995
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:50.974100
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2260'

2024-08-04 18:19:50.985116
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.45629
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2261'

2024-08-04 18:19:51.56885
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.117247
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2262'

2024-08-04 18:19:51.133132
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.153882
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2264'

2024-08-04 18:19:51.164529
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.224918
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2265'

2024-08-04 18:19:51.236235
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.300496
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:51.388752
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2270'

2024-08-04 18:19:51.392397
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.482695
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2272'

2024-08-04 18:19:51.493630
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.561068
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:51.602213
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2273'

2024-08-04 18:19:51.604908
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.683101
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2275'

2024-08-04 18:19:51.685891
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.772163
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2276'

2024-08-04 18:19:51.774647
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.841342
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2277'

2024-08-04 18:19:51.844518
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:51.911483
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:51.977652
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2278'

2024-08-04 18:19:51.981174
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:52.48904
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2279'

2024-08-04 18:19:52.51282
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:52.160600
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2280'

2024-08-04 18:19:52.168822
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:52.238414
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:52.289692
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2281'

2024-08-04 18:19:52.292012
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:52.378919
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2284'

2024-08-04 18:19:52.382267
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:52.497293
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:52.549223
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2285'

2024-08-04 18:19:52.551792
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:52.638519
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2287'

2024-08-04 18:19:52.655148
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:52.772596
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:52.815178
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2290'

2024-08-04 18:19:52.830776
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:52.947258
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2291'

2024-08-04 18:19:52.960061
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:53.64394
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:53.106736
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2293'

2024-08-04 18:19:53.108878
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:53.187463
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2307'

2024-08-04 18:19:53.190319
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:53.276710
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2314'

2024-08-04 18:19:53.288925
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:53.401774
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:53.452685
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2316'

2024-08-04 18:19:53.460211
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:53.584596
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2319'

2024-08-04 18:19:53.594516
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:53.684290
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:53.726917
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2327'

2024-08-04 18:19:53.729244
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:53.878991
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:53.968755
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2329'

2024-08-04 18:19:53.971672
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:54.99990
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:54.143366
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2337'

2024-08-04 18:19:54.147894
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:54.274611
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2343'

2024-08-04 18:19:54.277216
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:54.357633
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:54.409602
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2344'

2024-08-04 18:19:54.411941
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:54.509570
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2347'

2024-08-04 18:19:54.521518
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:54.614441
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '2350'

2024-08-04 18:19:54.626638
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2024-01-01' 
                AND iou.tran_date <= '2024-03-31'
                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-08-04 18:19:54.744895
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 18:19:54.789814
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='PETTY_CASH'

2024-08-04 18:19:54.800167
SELECT pet.*,dp.value_name department, bt.amount batch_total, bt.approval_status, bt.complete, 
                pm.description project_name, ft.name float_name, p.expense_source type, p.id trans_no, p.payment_date pay_date, bt.approved_on 
            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      
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = pet.id 
                        AND p.expense_source = '168' 
                        AND p.paid = 1 
            WHERE pet.employee_code = '1062'         
                AND pet.type = '950'            
                AND pet.tran_date >='2024-01-01' AND pet.tran_date <='2024-03-31' AND pet.batch_complete = 0  ORDER BY pet.id, pet.batch_no 

2024-08-04 18:19:54.828366
SELECT printer FROM 0_print_profiles WHERE profile='' AND report='991263'

2024-08-04 18:19:54.830426
SELECT printer FROM 0_print_profiles WHERE profile='' AND report=''

2024-08-04 19:37:15.462336
SELECT name, value FROM 0_sys_prefs

2024-08-04 19:37:15.552422
SELECT db_name FROM group_companies 
                WHERE default_company = 1 LIMIT 1

2024-08-04 19:37:15.555318
SELECT * FROM uke_db.0_employee_master WHERE employee_code='1062'

2024-08-04 19:37:15.559696
SELECT * FROM 0_fiscal_year WHERE id='16'

2024-08-04 19:37:15.586950
SELECT value FROM 0_sys_prefs WHERE name='website'

2024-08-04 19:37:15.631097
SELECT DISTINCT iou.employee_code, iou.company_code  
            FROM 0_i_owe_you iou   
            WHERE iou.tran_date >='2023-10-17' 
                    AND iou.tran_date <='2023-10-17'
                    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 >='2023-10-17' 
                    AND pet.tran_date <='2023-10-17' AND pet.employee_code ='1062' GROUP BY pet.employee_code 
                   ORDER BY employee_code 

2024-08-04 19:37:15.648378
SELECT db_name FROM group_companies 
                WHERE company_code = 'UKE'

2024-08-04 19:37:15.650529
SELECT * FROM uke_db.0_employee_master WHERE employee_code='1062'

2024-08-04 19:37:15.657124
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-08-04 19:37:15.664447
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 <= '2023-10-16'
                    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-08-04 19:37:15.671066
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-08-04 19:37:15.673954
SELECT iou.*,dp.value_name department,CONCAT('[',em.employee_code,']-',em.initials,' ',em.last_name,'(',em.first_name,')') emp_name,
                        pm.description project_name, ft.name float_name  
            FROM 0_i_owe_you iou
                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 >='1970-01-01' 
                    AND iou.tran_date <='2023-10-16'
                    AND iou.approval_status IN (30,130) 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 

2024-08-04 19:37:15.689698
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='PETTY_CASH'

2024-08-04 19:37:15.693796
SELECT pet.*,dp.value_name department, bt.amount batch_total, bt.approval_status, bt.complete, 
                pm.description project_name, ft.name float_name, p.expense_source type, p.id trans_no, p.payment_date pay_date, bt.approved_on 
            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      
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = pet.id 
                        AND p.expense_source = '168' 
                        AND p.paid = 1 
            WHERE pet.employee_code = '1062'         
                AND pet.type = '950'            
                AND pet.tran_date >='1970-01-01' AND pet.tran_date <='2023-10-16' AND pet.batch_complete = 0  ORDER BY pet.id, pet.batch_no 

2024-08-04 19:37:15.707105
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='I_OWE_YOU'

2024-08-04 19:37:15.709822
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2023-10-17' 
                AND iou.tran_date <= '2023-10-17'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2023-10-17' 
                AND iou.tran_date <= '2023-10-17'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2023-10-17' 
                AND iou.tran_date <= '2023-10-17'
                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-08-04 19:37:15.744018
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 >= '2023-10-17' 
                    AND iou.tran_date <= '2023-10-17'
                    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-08-04 19:37:15.755178
SELECT * 
            FROM 0_i_owe_you_batches 
            WHERE batch_no = '1865'

2024-08-04 19:37:34.739013
SELECT DISTINCT al.id, al.batch_no, al.tran_date, al.amount, al.batch_complete, al.payments_total, al.advance_amount, al.bank_payments, 
                    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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2023-10-17' 
                AND iou.tran_date <= '2023-10-17'
                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,  iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2023-10-17' 
                AND iou.tran_date <= '2023-10-17'
                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, iou.payments_total, iou.advance_amount, iou.bank_payments, 
                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 >= '2023-10-17' 
                AND iou.tran_date <= '2023-10-17'
                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-08-04 20:00:10.680081
SELECT id, value_code, value_name FROM 0_list_values  
		WHERE list_code= 'PETTY_CASH_TYPES' AND value_code='PETTY_CASH'

2024-08-04 20:00:10.682932
SELECT pet.*,dp.value_name department, bt.amount batch_total, bt.approval_status, bt.complete, 
                pm.description project_name, ft.name float_name, p.expense_source type, p.id trans_no, p.payment_date pay_date, bt.approved_on 
            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      
                LEFT JOIN 0_i_owe_you_payments p  
                    ON p.iou_id = pet.id 
                        AND p.expense_source = '168' 
                        AND p.paid = 1 
            WHERE pet.employee_code = '1062'         
                AND pet.type = '950'            
                AND pet.tran_date >='2023-10-17' AND pet.tran_date <='2023-10-17' AND pet.batch_complete = 0  ORDER BY pet.id, pet.batch_no 

2024-08-04 20:00:10.697208
SELECT printer FROM 0_print_profiles WHERE profile='' AND report='991263'

2024-08-04 20:00:10.700455
SELECT printer FROM 0_print_profiles WHERE profile='' AND report=''

