truncate table 0p4_item_transaction;
DELETE from 0p4_item; 
ALTER table 0p4_item AUTO_INCREMENT=1;
truncate table 0p4_item_barcode ;
truncate table 0p4_item_selling_price;
truncate table 0p4_item_bom;
truncate table 0p4_item_supplier_listing;
truncate table 0p4_item_block_customer;
truncate table 0p4_item_physical_quantity;
delete from 0p4_item_category;
ALTER table 0p4_item_category AUTO_INCREMENT=1;
truncate table 0p4_pricing_type; 
truncate table 0p4_barcode_type; 
truncate table 0p4_brand;
delete from 0p4_uom;
alter table 0p4_uom AUTO_INCREMENT=1;
truncate table 0p4_customer_group_pricing_detail; 
delete from 0p4_customer_group_pricing; 
alter table 0p4_customer_group_pricing AUTO_INCREMENT=1;
truncate table 0p4_promotion_params;
truncate table 0p4_promotions;
truncate table 0p4_assembly_items;
truncate table 0p4_assembly;
truncate table 0p4_disassembly_items;
truncate table 0p4_disassembly;
truncate table 0p4_goods_receipt_note_detail;
delete from 0p4_good_issue_note_items;
alter table 0p4_good_issue_note_items AUTO_INCREMENT=1;
delete from 0p4_good_issue_note_item_detail;
alter table 0p4_good_issue_note_item_detail AUTO_INCREMENT=1;
delete from 0p4_credit_note_items;
alter table 0p4_credit_note_items AUTO_INCREMENT=1;
delete from 0p4_credit_note;
alter table 0p4_credit_note AUTO_INCREMENT=1;
truncate table 0p4_goods_received_note_detail;
delete from 0p4_goods_received_note;
alter table 0p4_goods_received_note AUTO_INCREMENT=1;
delete from 0p4_invoice_items;
alter table 0p4_invoice_items AUTO_INCREMENT=1;
delete from 0p4_invoice;
alter table 0p4_invoice AUTO_INCREMENT=1;
delete from 0p4_good_issue_note;
alter table 0p4_good_issue_note AUTO_INCREMENT=1;
delete from 0p4_goods_receipt_note;
alter table 0p4_goods_receipt_note AUTO_INCREMENT=1;
truncate table 0p4_misc_issue_detail;
delete from 0p4_misc_issue;
alter table 0p4_misc_issue AUTO_INCREMENT=1;
truncate table 0p4_misc_receipt_detail;
delete from 0p4_misc_receipt;
alter table 0p4_misc_receipt AUTO_INCREMENT=1;
truncate table 0p4_item_transfer_detail;
delete from 0p4_item_transfer;
alter table 0p4_item_transfer AUTO_INCREMENT=1;
truncate table 0p4_inventory_adjustment_detail;
delete from 0p4_inventory_adjustment;
alter table 0p4_inventory_adjustment AUTO_INCREMENT=1;
truncate table 0p4_inventory_stock_take_detail;
delete from 0p4_inventory_stock_take;
alter table 0p4_inventory_stock_take AUTO_INCREMENT=1;
truncate table 0p4_good_issue_note_trade_vendor_detail;
delete from 0p4_good_issue_note_trade_vendor;
alter table 0p4_good_issue_note_trade_vendor AUTO_INCREMENT=1;
truncate table 0p4_good_issue_note_non_trade_vendor_detail;
delete from 0p4_good_issue_note_non_trade_vendor;
alter table 0p4_good_issue_note_non_trade_vendor AUTO_INCREMENT=1;
truncate table 0p4_stock_exchange_in;
truncate table 0p4_stock_exchange_out;
delete from 0p4_stock_exchange;
alter table 0p4_stock_exchange AUTO_INCREMENT=1;
delete from 0p4_quotation_detail;
alter table 0p4_quotation_detail AUTO_INCREMENT=1;
delete from 0p4_quotation;
alter table 0p4_quotation AUTO_INCREMENT=1;
truncate table 0p4_consignment_delivery_order_items;
delete from 0p4_consignment_delivery_order;
alter table 0p4_consignment_delivery_order AUTO_INCREMENT=1;
delete from 0p4_sale_order_detail;
alter table 0p4_sale_order_detail AUTO_INCREMENT=1;
delete from 0p4_sale_order;
alter table 0p4_sale_order AUTO_INCREMENT=1;
truncate table 0p4_carton_label;
truncate table 0p4_temporary_devlivery_order_items;
delete from 0p4_temporary_delivery_order;
alter table 0p4_temporary_delivery_order AUTO_INCREMENT=1;
delete from 0p4_debit_note_items;
alter table 0p4_debit_note_items AUTO_INCREMENT=1;
delete from 0p4_debit_note;
alter table 0p4_debit_note AUTO_INCREMENT=1;
delete from 0p4_purchase_order_items;
alter table 0p4_purchase_order_items AUTO_INCREMENT=1;
delete from 0p4_purchase_order;
alter table 0p4_purchase_order AUTO_INCREMENT=1;
truncate table 0p4_grn_po;
delete from 0p4_costing_detail;
alter table 0p4_costing_detail AUTO_INCREMENT=1;
delete from 0p4_costing;
alter table 0p4_costing AUTO_INCREMENT=1;
delete from 0p4_vendor_credit_note_detail;
alter table 0p4_vendor_credit_note_detail AUTO_INCREMENT=1;
delete from 0p4_vendor_credit_note;
alter table 0p4_vendor_credit_note AUTO_INCREMENT=1;
delete from 0p4_vendor_debit_note_detail;
alter table 0p4_vendor_debit_note_detail AUTO_INCREMENT=1;
delete from 0p4_vendor_debit_note;
alter table 0p4_vendor_debit_note AUTO_INCREMENT=1;

truncate table 0p4_miscellaneous_invoice_items;
delete from 0p4_miscellaneous_invoice;
alter table 0p4_miscellaneous_invoice AUTO_INCREMENT=1;
delete from 0p4_country;
alter table 0p4_country AUTO_INCREMENT=1;
delete from 0p4_state;
alter table 0p4_state AUTO_INCREMENT=1;
delete from 0p4_city;
alter table 0p4_city AUTO_INCREMENT=1;
delete from 0p4_supplier;
alter table 0p4_supplier AUTO_INCREMENT=1;
delete from 0p4_supplier_type;
alter table 0p4_supplier_type AUTO_INCREMENT=1;
delete from 0p4_buying_term;
alter table 0p4_buying_term AUTO_INCREMENT=1;
delete from 0p4_supplier_category;
alter table 0p4_supplier_category AUTO_INCREMENT=1;
delete from 0p4_supplier_group;
alter table 0p4_supplier_group AUTO_INCREMENT=1;
truncate table 0p4_gl_transaction;
delete from 0p4_bank_account;
alter table 0p4_bank_account AUTO_INCREMENT=1;
delete from 0p4_gst;
alter table 0p4_gst AUTO_INCREMENT=1;
truncate table 0p4_item_physical_quantity;
truncate table 0p4_proposal_items;
delete from 0p4_proposal;
alter table 0p4_proposal AUTO_INCREMENT=1;
truncate table 0p4_eorder_items;
delete from 0p4_eorder;
alter table 0p4_eorder AUTO_INCREMENT=1;
truncate table 0p4_eorder_inv;
truncate table 0p4_cash_invoice_items;
delete from 0p4_cash_invoice;
alter table 0p4_cash_invoice AUTO_INCREMENT=1;
truncate table 0p4_pos_receipt_detail;
delete from 0p4_pos_receipt;
alter table 0p4_pos_receipt AUTO_INCREMENT=1;
truncate table 0p4_voucher_detail;
delete from 0p4_voucher;
alter table 0p4_voucher AUTO_INCREMENT=1;
truncate table 0p4_pos_customer_detail;
delete from 0p4_pos_customer;
alter table 0p4_pos_customer AUTO_INCREMENT=1;
truncate table 0p4_point_management_detail;
delete from 0p4_point_management;
alter table 0p4_point_management AUTO_INCREMENT=1;
truncate table 0p4_commission_detail;
delete from 0p4_commission;
alter table 0p4_commission AUTO_INCREMENT=1;
truncate table 0p4_post_dated_cheque;
delete from 0p4_account_receivable_oustanding;
alter table 0p4_account_receivable_oustanding AUTO_INCREMENT=1;
delete from 0p4_account_receivable_details;
alter table 0p4_account_receivable_details AUTO_INCREMENT=1;
delete from 0p4_account_receivable;
alter table 0p4_account_receivable AUTO_INCREMENT=1;

delete from 0p4_account_payable_oustanding;
alter table 0p4_account_payable_oustanding AUTO_INCREMENT=1;
delete from 0p4_account_payable_detail;
alter table 0p4_account_payable_detail AUTO_INCREMENT=1;
delete from 0p4_account_payable;
alter table 0p4_account_payable AUTO_INCREMENT=1;
delete from 0p4_bank_reconciliation_jounral;
alter table 0p4_bank_reconciliation_jounral AUTO_INCREMENT=1;
delete from 0p4_bank_reconciliation_journal_detail;
alter table 0p4_bank_reconciliation_journal_detail AUTO_INCREMENT=1;
delete from 0p4_journal_customer_oustanding;
alter table 0p4_journal_customer_oustanding AUTO_INCREMENT=1;
delete from 0p4_journal_supplier_oustanding;
alter table 0p4_journal_supplier_oustanding AUTO_INCREMENT=1;
delete from 0p4_journal_detail;
alter table 0p4_journal_detail AUTO_INCREMENT=1;
delete from 0p4_journal;
alter table 0p4_journal AUTO_INCREMENT=1;

delete from 0p4_refund_detail;
alter table 0p4_refund_detail AUTO_INCREMENT=1;
delete from 0p4_refund;
alter table 0p4_refund AUTO_INCREMENT=1;

delete from 0p4_petty_cash_detail;
alter table 0p4_petty_cash_detail AUTO_INCREMENT=1;
delete from 0p4_petty_cash;
alter table 0p4_petty_cash AUTO_INCREMENT=1;

delete from 0p4_bank_reconciliation_detail;
alter table 0p4_bank_reconciliation_detail AUTO_INCREMENT=1;
delete from 0p4_bank_reconciliation_deposit;
alter table 0p4_bank_reconciliation_deposit AUTO_INCREMENT=1;
delete from 0p4_bank_reconciliation_payment;
alter table 0p4_bank_reconciliation_payment AUTO_INCREMENT=1;
delete from 0p4_present_unpresent_ar_ap;
alter table 0p4_present_unpresent_ar_ap AUTO_INCREMENT=1;
delete from 0p4_bank_reconciliation;
alter table 0p4_bank_reconciliation AUTO_INCREMENT=1;

truncate table 0p4_closing_stock_detail;
delete from 0p4_closing_stock;
alter table 0p4_closing_stock AUTO_INCREMENT=1;

truncate table 0p4_currency_exchange_rate_detail;
delete from 0p4_currency_exchange_rate;
alter table 0p4_currency_exchange_rate AUTO_INCREMENT=1;
delete from 0p4_currency;
alter table 0p4_currency AUTO_INCREMENT=1;
delete from 0p4_payment_method;
alter table 0p4_payment_method AUTO_INCREMENT=1;
delete from 0p4_department;
alter table 0p4_department AUTO_INCREMENT=1;
delete from 0p4_gst;
alter table 0p4_gst AUTO_INCREMENT=1;
delete from 0p4_task_user;
alter table 0p4_task_user AUTO_INCREMENT=1;
delete from 0p4_task;
alter table 0p4_task AUTO_INCREMENT=1;
delete from 0p4_user where username!='librasunadmin';
delete from 0p4_profile where name!='LIBRASUN ADMIN';
delete from 0p4_warehouse;
alter table 0p4_warehouse AUTO_INCREMENT=1;
delete from 0p4_rest;
alter table 0p4_rest AUTO_INCREMENT=1;
truncate table 0p4_distributor_pricing_detail;
delete from 0p4_distributor_pricing;
alter table 0p4_distributor_pricing AUTO_INCREMENT=1;
delete from 0p4_item_type;
alter table 0p4_item_type AUTO_INCREMENT=1;
delete from 0p4_item_status;
alter table 0p4_item_status AUTO_INCREMENT=1;
TRUNCATE table 0p4_user_checkin;
delete from 0p4_auth_assignment where user_id!=26