
DELETE FROM adjustments;
DELETE FROM tax_rates;
DELETE FROM tax_types;

INSERT INTO tax_types (tax_type_id, org_id, account_id, tax_type_name, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, active, use_key, details) VALUES (1, 0, NULL, 'PAYE', 'Get_Employee_Tax(employee_tax_type_id, 2)', 0, 1, false, 0, false, true, true, 0, 0, NULL, true, 1, NULL);
INSERT INTO tax_types (tax_type_id, org_id, account_id, tax_type_name, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, active, use_key, details) VALUES (3, 0, NULL, 'Local Service Tax', 'Get_Employee_Tax(employee_tax_type_id, 1)', 0, 0, false, 0, false, false, false, 0, 0, NULL, true, 1, NULL);
INSERT INTO tax_types (tax_type_id, org_id, account_id, tax_type_name, formural, tax_relief, tax_type_order, in_tax, tax_rate, tax_inclusive, linear, percentage, employer, employer_ps, account_number, active, use_key, details) VALUES (2, 0, NULL, 'NSSF', 'Get_Employee_Tax(employee_tax_type_id, 1)', 0, 0, false, 0, false, true, true, 0, 200, NULL, true, 1, NULL);

SELECT pg_catalog.setval('tax_types_tax_type_id_seq', 6, true);

INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (8, 3, 0, 100000, 0, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (9, 3, 0, 200000, 5000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (10, 3, 0, 300000, 10000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (11, 3, 0, 400000, 20000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (12, 3, 0, 500000, 30000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (13, 3, 0, 600000, 40000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (14, 3, 0, 700000, 60000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (15, 3, 0, 800000, 70000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (16, 3, 0, 900000, 80000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (17, 3, 0, 1000000, 90000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (18, 3, 0, 1000000000, 100000, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (5, 1, 0, 10000000, 30, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (7, 2, 0, 100000000, 5, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (1, 1, 0, 235000, 0, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (2, 1, 0, 335000, 10, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (3, 1, 0, 410000, 20, NULL);
INSERT INTO tax_rates (tax_rate_id, tax_type_id, org_id, tax_range, tax_rate, narrative) VALUES (4, 1, 0, 100000000, 10, NULL);

SELECT pg_catalog.setval('tax_rates_tax_rate_id_seq', 25, true);

INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (33, 0, 'Annual Leave', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (34, 0, 'Arrears', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (35, 0, 'Bonus/Incentive Award', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (36, 0, 'Commission', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (37, 0, 'Facilitation', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (38, 0, 'Leave Allowance', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (39, 0, 'Lunch Allowance', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (40, 0, 'Pay in lieu', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (41, 0, 'Public Holiday All-ce', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (42, 0, 'Rig Amount', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (43, 0, 'Rig Bonus All-ce', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (44, 0, 'Shop Amount', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (45, 0, 'Telephone Allowance', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (46, 0, 'Training Allowance', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (47, 0, 'Transport Allowace', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (48, 0, 'Travel Allowance', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (49, 0, 'Up-Country Travel', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (50, 0, 'Weekend Allowance', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (51, 0, 'Food Allowance', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (52, 0, 'Maternity Allowance', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (53, 0, 'Any other that may arise', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (2, 0, 'Bonus', 1, 0, NULL, NULL, true, true, true, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (11, 0, 'SACCO', 2, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (12, 0, 'HELB', 2, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (13, 0, 'Rent Payment', 2, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (21, 0, 'Travel', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (22, 0, 'Communcation', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (23, 0, 'Tools', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (24, 0, 'Payroll Cost', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (25, 0, 'Health Insurance', 3, 0, NULL, NULL, true, true, false, false, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (26, 0, 'GPA Insurance', 3, 0, NULL, NULL, true, true, false, false, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (27, 0, 'Accomodation', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (28, 0, 'Avenue Health Care', 3, 0, NULL, NULL, true, true, false, false, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (29, 0, 'Maternety Cost', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (30, 0, 'Health care claims', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (31, 0, 'Trainining', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);
INSERT INTO adjustments (adjustment_id, org_id, adjustment_name, adjustment_type, adjustment_order, earning_code, formural, monthly_update, in_payroll, in_tax, visible, running_balance, reduce_balance, tax_relief_ps, tax_max_allowed, account_number, details) VALUES (32, 0, 'per diem', 3, 0, NULL, NULL, true, true, false, true, false, false, 0, 0, NULL, NULL);

SELECT pg_catalog.setval('adjustments_adjustment_id_seq', 53, true);


