SET FOREIGN_KEY_CHECKS = 0;

INSERT IGNORE INTO `master_departments` (`id`, `company_id`, `name`, `code`, `description`, `status`) VALUES
(1, 1, 'Fabric Store', 'FAB', 'Fabric receiving, inspection and storage', 'active'),
(2, 1, 'Sewing', 'SEW', 'Garment sewing and assembly operations', 'active'),
(3, 1, 'Finishing', 'FIN', 'Final finishing, trimming and packing preparation', 'active'),
(4, 1, 'Production', 'PROD', 'Production planning and control', 'active'),
(5, 1, 'QA', 'QA', 'Quality assurance and inspection', 'active'),
(6, 1, 'Printing', 'PRN', 'Screen printing and heat transfer', 'active'),
(7, 1, 'Washing', 'WSH', 'Garment washing and wet processing', 'active'),
(8, 1, 'Packing', 'PKG', 'Final packing and carton sealing', 'active'),
(9, 1, 'Cutting', 'CUT', 'Fabric spreading and cutting', 'active'),
(10, 1, 'Embroidery', 'EMB', 'Embroidery and embellishment', 'active'),
(11, 1, 'Trims', 'TRM', 'Trims and accessories store', 'active'),
(12, 1, 'Maintenance', 'MNT', 'Machine maintenance and repair', 'active'),
(13, 1, 'Purchase', 'PUR', 'Procurement and purchasing', 'active'),
(14, 1, 'Sales', 'SAL', 'Sales and marketing', 'active'),
(15, 1, 'IT', 'IT', 'Information technology', 'active'),
(16, 1, 'HR', 'HR', 'Human resources and training', 'active'),
(17, 1, 'Safety', 'SFT', 'Health, safety and environment', 'active'),
(18, 1, 'Industrial Eng', 'IE', 'Industrial engineering and method study', 'active'),
(19, 1, 'Engineering', 'ENG', 'Facility and civil engineering', 'active');

INSERT IGNORE INTO `master_vendors` (`id`, `company_id`, `name`, `code`, `type`, `contact_person`, `email`, `phone`, `status`) VALUES
(1, 1, 'XYZ Trims Ltd', 'XYZ-001', 'trim', 'Mr. Rahman', 'rahman@xyztrims.com', '+880-2-1234567', 'active'),
(2, 1, 'ABC Trims Bangladesh', 'ABC-001', 'trim', 'Mr. Hossain', 'hossain@abctrims.com', '+880-2-7654321', 'active'),
(3, 1, 'Global Fabric Mills', 'GFM-001', 'fabric', 'Ms. Sultana', 'sultana@globalfabric.com', '+880-2-5551234', 'active'),
(4, 1, 'Premier Dyeing Ltd', 'PDL-001', 'fabric', 'Mr. Karim', 'karim@premierdyeing.com', '+880-2-5555678', 'active'),
(5, 1, 'ChemiColor Ltd', 'CCL-001', 'chemical', 'Mr. Islam', 'islam@chemicolor.com', '+880-2-5559012', 'active'),
(6, 1, 'PackRight Solutions', 'PRS-001', 'packaging', 'Ms. Akter', 'akter@packright.com', '+880-2-5553456', 'active'),
(7, 1, 'FastCargo Logistics', 'FCL-001', 'logistics', 'Mr. Chowdhury', 'chowdhury@fastcargo.com', '+880-2-5557890', 'active');

INSERT IGNORE INTO `master_buyers` (`id`, `company_id`, `name`, `code`, `contact_person`, `email`, `country`, `status`) VALUES
(1, 1, 'H&M Hennes & Mauritz', 'H&M-001', 'Mr. Andersson', 'andersson@hm.com', 'Sweden', 'active'),
(2, 1, 'Zara (Inditex)', 'ZAR-001', 'Ms. Garcia', 'garcia@zara.com', 'Spain', 'active'),
(3, 1, 'Nike Inc.', 'NIK-001', 'Mr. Johnson', 'johnson@nike.com', 'USA', 'active'),
(4, 1, 'Adidas AG', 'ADI-001', 'Ms. Schmidt', 'schmidt@adidas.com', 'Germany', 'active'),
(5, 1, 'Uniqlo (Fast Retailing)', 'UNI-001', 'Mr. Tanaka', 'tanaka@uniqlo.com', 'Japan', 'active'),
(6, 1, 'Target Corporation', 'TAR-001', 'Ms. Brown', 'brown@target.com', 'USA', 'active');

INSERT IGNORE INTO `master_styles` (
  `id`, `company_id`, `buyer_id`, `style_no`, `buyer_style_no`, `name`, `description`,
  `brand`, `division`, `department`, `product_type`, `gender`, `category`, `fabric_type`, `size_range`,
  `season`, `season_id`, `collection`, `year`,
  `factory_id`, `merchandiser`, `product_developer`,
  `dev_status`, `version`, `status`,
  `fob_target`, `margin_target`, `currency_code`,
  `fit`, `sleeve`, `construction`, `wash`, `print_type`, `embroidery`
) VALUES
-- 1. H&M Basic Cotton T-Shirt
(1, 1, 1, 'HM-101', 'HM-BSS-4420', 'Basic Cotton T-Shirt',
 'Classic crew-neck short sleeve tee in 100% combed cotton jersey. Relaxed fit with reinforced shoulder seams.',
 'H&M Basics', 'H&M Divided', 'Casualwear', 'T-Shirt', 'Unisex', 'Knit', 'Cotton Jersey 180gsm', 'S/M/L/XL/XXL',
 'Summer', 1, 'Basics Collection', 2025,
 3, 'Rahim Uddin', 'Sara Ahmed',
 'approved', 'V3', 'active',
 4.50, 42.00, 'USD',
 'Relaxed Fit', 'Short Sleeve', 'Single needle stitch, reinforced shoulders', 'None', 'None', 'None'),
-- 2. H&M Slim Fit Chino Pants
(2, 1, 1, 'HM-102', 'HM-CHN-8812', 'Slim Fit Chino Pants',
 'Tailored slim-fit chinos in cotton-elastane twill. Flat front, zip fly, back welt pockets.',
 'H&M-divided', 'H&M Man', 'Casualwear', 'Pants', 'Mens', 'Woven', 'Cotton Twill 230gsm', '28/30/32/34/36',
 'Fall/Winter', 2, 'Urban Essentials', 2025,
 1, 'Karim Hassan', 'Sara Ahmed',
 'approved', 'V2', 'active',
 6.80, 38.00, 'USD',
 'Slim Fit', 'Full Length', 'Flat fell seam, reinforced pockets', 'Garment Dyed', 'None', 'None'),
-- 3. Zara Wool Blend Blazer
(3, 1, 2, 'ZR-201', 'ZR-BLZ-2205', 'Wool Blend Blazer',
 'Structured single-breasted blazer in wool-poly blend. Notch lapel, two-button closure, fully lined.',
 'Zara Studio', 'Zara Man', 'Fashionwear', 'Blazer', 'Mens', 'Woven', 'Wool/Poly Blend 280gsm', '38/40/42/44/46',
 'Fall/Winter', 2, 'Studio Collection', 2025,
 1, 'Maria Garcia', 'Luca Bianchi',
 'approved', 'V2', 'active',
 28.00, 55.00, 'USD',
 'Slim Fit', 'Long Sleeve', 'Princess seam, notch collar, full canvas', 'Dry Clean Only', 'None', 'None'),
-- 4. Zara Cashmere Crew Neck Sweater
(4, 1, 2, 'ZR-202', 'ZR-SWR-3310', 'Cashmere Crew Neck Sweater',
 'Luxurious 100% cashmere crew neck sweater in 12-gauge knit. Ribbed cuffs, hem, and collar.',
 'Zara Premium', 'Zara Woman', 'Fashionwear', 'Sweater', 'Womens', 'Sweater', '100% Cashmere 12gg', 'XS/S/M/L/XL',
 'Fall/Winter', 2, 'Premium Essentials', 2025,
 1, 'Maria Garcia', 'Luca Bianchi',
 'sampling', 'V1', 'active',
 38.00, 62.00, 'USD',
 'Regular Fit', 'Long Sleeve', 'Fully fashioned, linking stitch', 'Hand Wash', 'None', 'None'),
-- 5. Nike Dri-FIT Running Shorts
(5, 1, 3, 'NK-301', 'NK-RSH-5501', 'Dri-FIT Running Shorts',
 'Lightweight moisture-wicking running shorts with inner brief. Side pockets and reflective logo.',
 'Nike', 'Nike Running', 'Activewear', 'Shorts', 'Mens', 'Activewear', 'Dri-FIT Polyester 130gsm', 'S/M/L/XL',
 'Spring/Summer', 3, 'Running Series', 2025,
 3, 'Ahmed Khan', 'David Park',
 'approved', 'V4', 'active',
 5.20, 48.00, 'USD',
 'Athletic', 'Short', 'Flatlock seam, split side', 'None', 'Reflective Heat Transfer', 'None'),
-- 6. Nike Air Max Lifestyle Hoodie
(6, 1, 3, 'NK-302', 'NK-HDY-7708', 'Air Max Lifestyle Hoodie',
 'Premium fleece hoodie with kangaroo pocket and embossed Air Max branding. Brushed interior.',
 'Nike Sportswear', 'Nike Lifestyle', 'Knit', 'Hoodie', 'Unisex', 'Knit', 'Cotton/Poly Fleece 320gsm', 'S/M/L/XL/XXL',
 'Fall/Winter', 2, 'Sportswear Essential', 2025,
 3, 'Ahmed Khan', 'David Park',
 'approved', 'V2', 'active',
 8.50, 52.00, 'USD',
 'Regular Fit', 'Long Sleeve', 'Set-in sleeve, rib cuffs and hem', 'None', 'Embossed Logo Print', 'None'),
-- 7. Adidas Ultraboost Running Tights
(7, 1, 4, 'AD-401', 'AD-RTG-1103', 'Ultraboost Running Tights',
 'High-performance compression running tights with Primeknit waistband. Moisture management technology.',
 'Adidas', 'Adidas Running', 'Activewear', 'Tights', 'Unisex', 'Activewear', 'Spandex/Polyester 200gsm', 'XS/S/M/L/XL',
 'Spring/Summer', 3, 'Ultraboost Line', 2025,
 1, 'Thomas Schmidt', 'Yuki Tanaka',
 'approved', 'V3', 'active',
 7.80, 45.00, 'USD',
 'Compression', 'Full Length', 'Flatlock seam, bonded hem', 'None', 'Reflective Logo', 'None'),
-- 8. Uniqlo HeatTech Base Layer
(8, 1, 5, 'UQ-501', 'UQ-HTL-6605', 'HeatTech Base Layer',
 'Ultra-thin heat-retention base layer with moisture wicking. Seamless construction for layering comfort.',
 'Uniqlo', 'Uniqlo LifeWear', 'Knit', 'Long Sleeve Tee', 'Unisex', 'Knit', 'HeatTech Synthetic 140gsm', 'XS/S/M/L/XL/XXL',
 'Fall/Winter', 2, 'HeatTech Core', 2025,
 3, 'Akira Tanaka', 'Kenji Yamamoto',
 'production', 'V5', 'active',
 3.50, 50.00, 'USD',
 'Slim Fit', 'Long Sleeve', 'Seamless knit, flatlock', 'None', 'Heat Seal Label', 'None'),
-- 9. Target Denim Jacket
(9, 1, 6, 'TGT-601', 'TGT-DJN-9902', 'Denim Jacket',
 'Classic trucker-style denim jacket with brass button closure. Vintage wash with whisker detail.',
 'Target Original', 'Target Private Label', 'Denim', 'Jacket', 'Unisex', 'Denim', '12oz Raw Denim', 'XS/S/M/L/XL',
 'Fall/Winter', 2, 'Heritage Denim', 2025,
 5, 'Sarah Brown', 'Mike Johnson',
 'approved', 'V2', 'active',
 12.00, 40.00, 'USD',
 'Regular Fit', 'Long Sleeve', 'Triple needle stitch, riveted pockets', 'Stone Wash', 'None', 'Leather Patch');

INSERT IGNORE INTO `master_buyer_pos` (`id`, `company_id`, `style_id`, `po_no`, `buyer_id`, `order_date`, `delivery_date`, `size`, `department`, `description`, `po_type`, `total_qty`, `payment_term_id`, `status`) VALUES
(1, 1, 1, 'PO-HM-2024-001', 1, '2024-06-01', '2024-08-15', 'S/M/L/XL', 'Casualwear', 'Summer collection basic tees', 'Regular', 12000, 1, 'active'),
(2, 1, 2, 'PO-HM-2024-002', 1, '2024-06-10', '2024-09-01', '30/32/34', 'Casualwear', 'Slim fit chinos fall collection', 'Regular', 8000, 1, 'active'),
(3, 1, 3, 'PO-ZR-2024-001', 2, '2024-06-15', '2024-10-15', '38/40/42/44', 'Fashionwear', 'Fall/winter blazer collection', 'Contract', 5000, 3, 'active'),
(4, 1, 5, 'PO-NK-2024-001', 3, '2024-07-01', '2024-09-30', 'S/M/L', 'Activewear', 'Spring activewear line', 'Regular', 20000, 5, 'active'),
(5, 1, 7, 'PO-AD-2024-001', 4, '2024-07-05', '2024-10-01', 'XS/S/M', 'Activewear', 'Performance running tights', 'Spot', 15000, 6, 'active');

INSERT IGNORE INTO `master_buyer_departments` (`id`, `department_code`, `department_name`, `department_group`, `description`, `display_order`, `status`) VALUES
(1, 'ACT', 'Activewear', 'Sports', 'Gym wear, sportswear, performance apparel', 1, 'active'),
(2, 'ATH', 'Athleisure', 'Sports', 'Everyday sports-inspired clothing', 2, 'active'),
(3, 'CAS', 'Casualwear', 'Casual', 'T-shirts, polos, casual shirts, jeans', 3, 'active'),
(4, 'FAS', 'Fashionwear', 'Fashion', 'Trend-based apparel', 4, 'active'),
(5, 'DEN', 'Denim', 'Bottomwear', 'Jeans, jackets, skirts, shorts', 5, 'active'),
(6, 'KNT', 'Knitwear', 'Fabric Type', 'T-shirts, polos, sweatshirts, hoodies', 6, 'active'),
(7, 'WOV', 'Wovenwear', 'Fabric Type', 'Shirts, trousers, dresses', 7, 'active'),
(8, 'OUT', 'Outerwear', 'Outerwear', 'Jackets, coats, windbreakers', 8, 'active'),
(9, 'INN', 'Innerwear', 'Intimate', 'Briefs, boxers, bras, panties', 9, 'active'),
(10, 'LIN', 'Lingerie', 'Intimate', 'Women\'s intimate apparel', 10, 'active'),
(11, 'SLP', 'Sleepwear', 'Home', 'Nightwear, pajamas', 11, 'active'),
(12, 'LOU', 'Loungewear', 'Home', 'Home comfort clothing', 12, 'active'),
(13, 'SWM', 'Swimwear', 'Swim', 'Swim shorts, swimsuits', 13, 'active'),
(14, 'BCH', 'Beachwear', 'Swim', 'Resort and beach apparel', 14, 'active'),
(15, 'RST', 'Resortwear', 'Vacation', 'Vacation clothing', 15, 'active'),
(16, 'FOR', 'Formalwear', 'Formal', 'Office and business clothing', 16, 'active'),
(17, 'BSC', 'Business Casual', 'Formal', 'Smart casual office wear', 17, 'active'),
(18, 'WRK', 'Workwear', 'Uniform', 'Industrial uniforms, safety clothing', 18, 'active'),
(19, 'UNI', 'Uniforms', 'Uniform', 'School, hospital, corporate uniforms', 19, 'active'),
(20, 'MED', 'Medical Apparel', 'Uniform', 'Scrubs, lab coats', 20, 'active'),
(21, 'HOS', 'Hospitality Uniforms', 'Uniform', 'Hotel and restaurant uniforms', 21, 'active'),
(22, 'SCH', 'School Uniforms', 'Uniform', 'School clothing', 22, 'active'),
(23, 'BBY', 'Babywear', 'Kids', 'Infant garments', 23, 'active'),
(24, 'KID', 'Kidswear', 'Kids', 'Children\'s clothing', 24, 'active'),
(25, 'BOY', 'Boyswear', 'Kids', 'Boys\' apparel', 25, 'active'),
(26, 'GRL', 'Girlswear', 'Kids', 'Girls\' apparel', 26, 'active'),
(27, 'MEN', 'Menswear', 'Gender', 'Men\'s garments', 27, 'active'),
(28, 'WOM', 'Womenswear', 'Gender', 'Women\'s garments', 28, 'active'),
(29, 'MAT', 'Maternity Wear', 'Maternity', 'Pregnancy clothing', 29, 'active'),
(30, 'PLS', 'Plus Size', 'Size', 'Extended size range', 30, 'active'),
(31, 'ADA', 'Adaptive Clothing', 'Accessibility', 'Clothing for people with disabilities', 31, 'active'),
(32, 'THR', 'Thermal Wear', 'Weather', 'Winter base layers', 32, 'active'),
(33, 'WIN', 'Winterwear', 'Weather', 'Cold weather garments', 33, 'active'),
(34, 'RAN', 'Rainwear', 'Weather', 'Waterproof garments', 34, 'active'),
(35, 'SKI', 'Skiwear', 'Sports', 'Snow sports apparel', 35, 'active'),
(36, 'CYC', 'Cycling Apparel', 'Sports', 'Cycling jerseys and shorts', 36, 'active'),
(37, 'RUN', 'Running Apparel', 'Sports', 'Running clothing', 37, 'active'),
(38, 'YOG', 'Yoga Wear', 'Sports', 'Yoga apparel', 38, 'active'),
(39, 'CMP', 'Compression Wear', 'Sports', 'Compression garments', 39, 'active'),
(40, 'PPE', 'Protective Clothing', 'Safety', 'PPE, industrial safety apparel', 40, 'active'),
(41, 'SUS', 'Sustainable Collection', 'Eco', 'Eco-friendly garments', 41, 'active'),
(42, 'ORG', 'Organic Collection', 'Eco', 'Organic cotton garments', 42, 'active'),
(43, 'REC', 'Recycled Collection', 'Eco', 'Recycled fabric garments', 43, 'active'),
(44, 'LUX', 'Luxury Collection', 'Premium', 'Premium apparel', 44, 'active'),
(45, 'BAS', 'Basics', 'Casual', 'Everyday essential garments', 45, 'active'),
(46, 'STR', 'Streetwear', 'Fashion', 'Urban fashion', 46, 'active'),
(47, 'PRM', 'Premium Fashion', 'Premium', 'High-end fashion products', 47, 'active');

INSERT IGNORE INTO `master_buyer_dept_links` (`buyer_id`, `buyer_department_id`) VALUES
-- H&M: trend-driven fast fashion, broad categories
(1, 3), (1, 4), (1, 5), (1, 6), (1, 7), (1, 8), (1, 11), (1, 12), (1, 16), (1, 17), (1, 24), (1, 25), (1, 26), (1, 27), (1, 28), (1, 29), (1, 30), (1, 41), (1, 42), (1, 45),
-- Zara: fast fashion, runway-inspired
(2, 3), (2, 4), (2, 5), (2, 6), (2, 7), (2, 8), (2, 11), (2, 12), (2, 16), (2, 17), (2, 27), (2, 28), (2, 30), (2, 46),
-- Nike: sports and active lifestyle
(3, 1), (3, 2), (3, 8), (3, 13), (3, 27), (3, 28), (3, 30), (3, 35), (3, 36), (3, 37), (3, 38), (3, 39), (3, 41),
-- Adidas: sportswear and athleisure
(4, 1), (4, 2), (4, 8), (4, 13), (4, 27), (4, 28), (4, 30), (4, 35), (4, 36), (4, 37), (4, 38), (4, 39), (4, 41), (4, 43),
-- Uniqlo: basics and casual essentials
(5, 3), (5, 6), (5, 7), (5, 8), (5, 9), (5, 11), (5, 12), (5, 23), (5, 24), (5, 27), (5, 28), (5, 32), (5, 33), (5, 41), (5, 42), (5, 45),
-- Target: mass-market retail, family-oriented
(6, 3), (6, 5), (6, 6), (6, 7), (6, 8), (6, 9), (6, 11), (6, 12), (6, 16), (6, 23), (6, 24), (6, 25), (6, 26), (6, 27), (6, 28), (6, 29), (6, 30), (6, 45);

INSERT IGNORE INTO `master_contractors` (`id`, `company_id`, `contractor_code`, `contractor_name`, `unit_type`, `contact_person`, `email`, `phone`, `address`, `status`) VALUES
(1, 1, 'DGL-001', 'Dhaka Garments Ltd', 'internal', 'Mr. Hasan', 'hasan@dhakagarments.com', '+880-2-1111111', 'Gazipur, Dhaka, Bangladesh', 'active'),
(2, 1, 'CEPZ-001', 'Chattogram Export Processing Zone', 'internal', 'Ms. Nasrin', 'nasrin@cepz.com', '+880-2-2222222', 'CEPZ, Chattogram, Bangladesh', 'active'),
(3, 1, 'KCL-001', 'Knit Concern Ltd', 'internal', 'Mr. Rahman', 'rahman@knitconcern.com', '+880-2-3333333', 'Savar, Dhaka, Bangladesh', 'active'),
(4, 1, 'WDS-001', 'Wash & Dye Solutions', 'internal', 'Mr. Kabir', 'kabir@washdye.com', '+880-2-4444444', 'Narayanganj, Bangladesh', 'active'),
(5, 1, 'PRG-001', 'PackRight Garments', 'internal', 'Ms. Akhter', 'akhter@packright.com', '+880-2-5555555', 'Tongi, Gazipur, Bangladesh', 'active');

INSERT IGNORE INTO `master_production_types` (`id`, `name`, `code`, `description`, `sort_order`, `status`) VALUES
(1, 'Cutting', 'CUTTING', 'Fabric cutting and spreading', 1, 'active'),
(2, 'CMT', 'CMT', 'Cut-Make-Trim full package', 2, 'active'),
(3, 'CMPT', 'CMPT', 'Cut-Make-Pack-Trim full package', 3, 'active'),
(4, 'Sewing', 'SEWING', 'Garment sewing and assembly', 4, 'active'),
(5, 'Packing', 'PACKING', 'Final packing and cartoning', 5, 'active'),
(6, 'Washing', 'WASHING', 'Garment washing and finishing', 6, 'active'),
(7, 'Dyeing', 'DYEING', 'Fabric or garment dyeing', 7, 'active');

INSERT IGNORE INTO `master_cities` (`id`, `company_id`, `city`, `country`, `continent`, `status`) VALUES
(1, 1, 'Dhaka', 'Bangladesh', 'Asia', 'active'),
(2, 1, 'Chattogram', 'Bangladesh', 'Asia', 'active'),
(3, 1, 'Shanghai', 'China', 'Asia', 'active'),
(4, 1, 'Guangzhou', 'China', 'Asia', 'active'),
(5, 1, 'Shenzhen', 'China', 'Asia', 'active'),
(6, 1, 'Ho Chi Minh City', 'Vietnam', 'Asia', 'active'),
(7, 1, 'Hanoi', 'Vietnam', 'Asia', 'active'),
(8, 1, 'Jakarta', 'Indonesia', 'Asia', 'active'),
(9, 1, 'Mumbai', 'India', 'Asia', 'active'),
(10, 1, 'Bangalore', 'India', 'Asia', 'active'),
(11, 1, 'Colombo', 'Sri Lanka', 'Asia', 'active'),
(12, 1, 'Karachi', 'Pakistan', 'Asia', 'active'),
(13, 1, 'Istanbul', 'Turkey', 'Asia', 'active'),
(14, 1, 'Izmire', 'Turkey', 'Asia', 'active'),
(15, 1, 'Phnom Penh', 'Cambodia', 'Asia', 'active'),
(16, 1, 'Manila', 'Philippines', 'Asia', 'active'),
(17, 1, 'Bangkok', 'Thailand', 'Asia', 'active'),
(18, 1, 'Tokyo', 'Japan', 'Asia', 'active'),
(19, 1, 'Seoul', 'South Korea', 'Asia', 'active'),
(20, 1, 'Los Angeles', 'United States', 'North America', 'active'),
(21, 1, 'New York', 'United States', 'North America', 'active'),
(22, 1, 'Mexico City', 'Mexico', 'North America', 'active'),
(23, 1, 'San Pedro Sula', 'Honduras', 'North America', 'active'),
(24, 1, 'Port-au-Prince', 'Haiti', 'North America', 'active'),
(25, 1, 'London', 'United Kingdom', 'Europe', 'active'),
(26, 1, 'Milan', 'Italy', 'Europe', 'active'),
(27, 1, 'Paris', 'France', 'Europe', 'active'),
(28, 1, 'Barcelona', 'Spain', 'Europe', 'active'),
(29, 1, 'Lisbon', 'Portugal', 'Europe', 'active'),
(30, 1, 'Bucharest', 'Romania', 'Europe', 'active'),
(31, 1, 'Istanbul', 'Turkey', 'Europe', 'active'),
(32, 1, 'Casablanca', 'Morocco', 'Africa', 'active'),
(33, 1, 'Tunis', 'Tunisia', 'Africa', 'active'),
(34, 1, 'Cairo', 'Egypt', 'Africa', 'active'),
(35, 1, 'Addis Ababa', 'Ethiopia', 'Africa', 'active'),
(36, 1, 'Nairobi', 'Kenya', 'Africa', 'active'),
(37, 1, 'Johannesburg', 'South Africa', 'Africa', 'active'),
(38, 1, 'Lagos', 'Nigeria', 'Africa', 'active'),
(39, 1, 'Sydney', 'Australia', 'Australia/Oceania', 'active'),
(40, 1, 'Auckland', 'New Zealand', 'Australia/Oceania', 'active');

INSERT IGNORE INTO `master_buyer_po_costing` (`po_id`, `type`, `pcs`, `extra_pct`, `total_pcs`, `rate`, `currency_id`, `exchange_rate`, `total_value`, `factory_id`, `display_order`) VALUES
(1, 'fabric', 1250, 3, 1287.50, 2.4500, 1, 1, 3154.3750, 3, 1),
(1, 'trim', 1250, 2, 1275.00, 0.8500, 1, 1, 1083.7500, 1, 2),
(1, 'accessory', 1250, 1, 1262.50, 0.3200, 1, 1, 404, 6, 3),
(1, 'packaging', 1250, 0, 1250.00, 0.1500, 1, 1, 187.50, 6, 4),
(2, 'fabric', 800, 3, 824, 2.6500, 1, 1, 2183.60, 4, 1),
(2, 'trim', 800, 2, 816, 0.9200, 1, 1, 750.72, 1, 2);

INSERT IGNORE INTO `master_payment_terms` (`id`, `company_id`, `name`, `code`, `description`, `status`) VALUES
(1, 1, 'Net 30', 'NET30', 'Payment due within 30 days of invoice', 'active'),
(2, 1, 'Net 60', 'NET60', 'Payment due within 60 days of invoice', 'active'),
(3, 1, 'LC at Sight', 'LCS', 'Letter of Credit payable at sight', 'active'),
(4, 1, 'LC Deferred', 'LCD', 'Deferred Letter of Credit', 'active'),
(5, 1, 'TT Advance', 'TTADV', 'Telegraphic Transfer in advance', 'active'),
(6, 1, 'TT After Shipment', 'TTAFT', 'Telegraphic Transfer after shipment', 'active'),
(7, 1, 'Cash Against Docs', 'CAD', 'Cash against shipping documents', 'active'),
(8, 1, 'Cheque', 'CHQ', 'Payment by cheque', 'active');

INSERT IGNORE INTO `master_packing_terms` (`id`, `company_id`, `name`, `code`, `instructions`, `status`) VALUES
(1, 1, 'Flat Pack', 'FLAT', 'Garments folded flat, tissue paper between every 2 pieces, 12 pcs per polybag. Use standard export carton 40x30x20 cm.', 'active'),
(2, 1, 'Hanger Pack', 'HANG', 'Garments on hangers, 6 pcs per polybag, hanger locked with plastic clip. Carton size 60x40x25 cm with hanging bar.', 'active'),
(3, 1, 'Folded with Insert', 'FOLD', 'Garments folded with cardboard insert at every fold point. Tissue paper between each piece. 6 pcs per polybag.', 'active'),
(4, 1, 'Polybag Only', 'POLY', 'Individual polybag for each garment. No carton packing. Barcode sticker on polybag. Suitable for local delivery.', 'active'),
(5, 1, 'Bulk Pack', 'BULK', '20 pcs per polybag, no individual folding. Carton inner with divider. For wholesale/bulk orders only.', 'active'),
(6, 1, 'Gift Box Pack', 'GIFT', 'Each garment in individual gift box with tissue paper, ribbon, and branded sticker. Premium packing for retail display.', 'active');

SET FOREIGN_KEY_CHECKS = 1;
