<?php

return [

    /*
    |--------------------------------------------------------------------------
    | QAD Integration Settings
    |--------------------------------------------------------------------------
    |
    | Configuration for QAD ERP integration including warehouse codes,
    | transport IDs, and other settings for CSV export.
    |
    */

    // Warehouse Configuration
    'warehouse_code' => env('QAD_WAREHOUSE_CODE', '101'),
    'warehouse_name' => env('QAD_WAREHOUSE_NAME', 'Warehouse GMS'),

    // Transport Configuration
    'transport_id' => env('QAD_TRANSPORT_ID', 'INTGMS'),
    'transport_name' => env('QAD_TRANSPORT_NAME', 'Internal GMS'),

    // Default Supplier
    'default_supplier_code' => env('QAD_DEFAULT_SUPPLIER', 'GMS'),

    // Default Site
    'default_site_code' => env('QAD_DEFAULT_SITE', '0A111'),

    // Currency
    'default_currency' => env('QAD_DEFAULT_CURRENCY', 'IDR'),

    // CSV Export Settings
    'csv_delimiter' => '|',
    'csv_export_path' => 'exports/csv',
    'csv_date_format' => 'n/j/Y', // QAD date format: 7/1/2025

    // Document Number Prefixes
    'do_prefix' => 'DM',
    'po_prefix' => 'PR',
    'pr_prefix' => 'RQ',

    // API Settings (if using API instead of CSV)
    'api_enabled' => env('QAD_API_ENABLED', false),
    'api_base_url' => env('QAD_API_BASE_URL', ''),
    'api_key' => env('QAD_API_KEY', ''),
    'api_timeout' => env('QAD_API_TIMEOUT', 30),

    // Sync Settings
    'sync_enabled' => env('QAD_SYNC_ENABLED', true),
    'sync_frequency' => env('QAD_SYNC_FREQUENCY', 'daily'), // daily, hourly, manual
    'sync_time' => env('QAD_SYNC_TIME', '02:00'), // Time for daily sync

];
