select * from user_accounts where first_name like '%habiba%'
select vat_percent,company_id,active,under,* from inventory2 where name like '%matjar%'  or under in (2764,3268)
select vat_percent,company_id,active,under,* from inventory2 where  under=3268

select * from appointment_onsite_details 
--where jobcard_id=219
order by appointment_onsite_master_id desc
select * from appointment_onsite_master 
where [entry_date] between '2025-09-01' and '2025-10-30'
order by id desc
--alter table appointment_onsite_master  add paid decimal(10,2),balance decimal(10,2)
--alter table appointment_onsite_details add vehicle_detail_id bigint,isRTA int
--alter table appointment_onsite_details add token_no varchar(7),transaction_no varchar(20)
--alter table appointment_onsite_details add jobcard_group_id bigint,jobcard_id bigint
--alter table appointment_onsite_details add service_type varchar(20)
insert into [appointment_onsite_details] ([appointment_onsite_master_id], [description], [plate_no], [chassis_no], [rate], [qty], [serviceid], [vatamount], 
[discount], [unit], [vehicle_type_id], [subtotal], [vatpercent], [netamount])
values (46, 'Renewal Test (1) On Site', 'C-6777', 'DCFVGB', '170.00', 1, 7255, 0, 0, 1, 1443, 170, 0, 170)

--update appointment_onsite_details set service_type='Pro' where id in (41,42)

select * from listappointment_new where id=71
select [id], [name], [area_name], [zone_name], [vehicle_type], [customer_name], [inspector_id], [reference_no], [client_id], [trn_no], [entry_date], [approved_by], [approved_at], [person_name], [contact_no], [appoint_status_id], [paymentstatus], [starttime], [endtime], [emirates], [zone_id], [gps_location], [area_id], [address], [remarks], [operator_name], [operator_contact_no], [start_trip_time], [arrival_at_location_time], [start_inspection_time], [end_inspection_time], [end_trip_time], [taxable_amount], [vat_amount], [total_amount], [request_type_id], [jobcard_reference_id], [create_by], [create_at], [update_by], [update_at], [delete_by], [delete_at], [company_id], [payment_status], [vehicle_type_id], [plate_no], [chassis_no], [cancel_at], [cancel_by], [keyfield], [paid], [review], [inspector_name], [username], [cancelreasondetail], [approver_name], [serviceidlist]
from [list_onsite_appointment] 
where [entry_date] between '2025-09-01' and '2025-09-30' group by [id], [name], [area_name], [zone_name], [vehicle_type], [customer_name], [inspector_id], [reference_no], [client_id], [trn_no], [entry_date], [approved_by], [approved_at], [person_name], [contact_no], [appoint_status_id], [paymentstatus], [starttime], [endtime], [emirates], [zone_id], [gps_location], [area_id], [address], [remarks], [operator_name], [operator_contact_no], [start_trip_time], [arrival_at_location_time], [start_inspection_time], [end_inspection_time], [end_trip_time], [taxable_amount], [vat_amount], [total_amount], [request_type_id], [jobcard_reference_id], [create_by], [create_at], [update_by], [update_at], [delete_by], [delete_at], [company_id], [payment_status], [vehicle_type_id], [plate_no], [chassis_no], [cancel_at], [cancel_by], [keyfield], [paid], [review], [inspector_name], [username], [cancelreasondetail], [approver_name], [serviceidlist]

select * from jobcard_vehicle_details order by id desc
select * from jobcard_groups where id=225
order by id desc
select * from jobcards  order by id desc
select * from jobcard_services order by id desc


--truncate table jobcard_groups
--truncate table jobcards
--truncate table jobcard_services