Order Outbound Type:
- Marketplace
- Employee Purchase
- Store/Offline
- Website
- Wholesale

Order Inbound Type :
- Retur
- Purchasing

SELECT shipment_id, shipment_type, shipment_status, order_type, create_date, GROUP_CONCAT(ats_sku) AS sku_list FROM T_Shipment LEFT JOIN AT_Shipment ON shipment_id = ats_ref_shipment GROUP BY shipment_id HAVING sku_list LIKE '%a12%'

SELECT shipment_id, shipment_type, shipment_status, order_type, create_date, GROUP_CONCAT(ats_sku) AS sku_list, GROUP_CONCAT(ats_barcode) AS barcode_list FROM T_Shipment LEFT JOIN AT_Shipment ON shipment_id = ats_ref_shipment GROUP BY shipment_id HAVING sku_list LIKE '%12301%' OR barcode_list LIKE '%12301%' 

Role :

- Master
- Warehouse Admin
- Sales

Base on Action

create module role access with action list

//untuk search admin by access
SELECT admin_id, admin_email, admin_name, role_title, access_title FROM T_Admin LEFT JOIN T_Role ON admin_role = role_id LEFT JOIN AT_Access ON ata_ref_role = role_id LEFT JOIN T_Access ON ata_ref_access = access_id WHERE access_slug = 'new_shipment' GROUP BY admin_id

//test
SELECT shipment_id, shipment_type, shipment_status, order_type, order_no, create_date, GROUP_CONCAT(ats_sku) AS sku_list, GROUP_CONCAT(ats_barcode) AS barcode_list, GROUP_CONCAT(ats_ref_shipment) AS shipment_list FROM T_Shipment LEFT JOIN AT_Shipment ON shipment_id = ats_ref_shipment WHERE shipment_type = 'out' GROUP BY shipment_id

SELECT shipment_id, shipment_type, shipment_status, order_type, order_no, create_date, GROUP_CONCAT(ats_sku) AS sku_list, GROUP_CONCAT(ats_barcode) AS barcode_list, GROUP_CONCAT(ats_ref_shipment) AS shipment_list, SUM(ats_qty) AS total_qty, COUNT(ats_sku) AS total_sku FROM T_Shipment LEFT JOIN AT_Shipment ON shipment_id = ats_ref_shipment WHERE shipment_type = 'out' GROUP BY shipment_id

//history by shipment
SELECT history_ref_shipment, history_ref_product, history_type, ats_qty, order_type, history_create_date FROM T_History LEFT JOIN AT_Shipment ON history_ref_shipment = ats_ref_shipment LEFT JOIN T_Shipment ON history_ref_shipment = shipment_id WHERE history_type IN ('in','out') GROUP BY history_ref_shipment ORDER BY history_create_date DESC


// Create Tracking Storage / Place
Tracking by category