# Configuration

# Settings

Every time you instantiate a new EracuniOrder class you must a provide a ISO country code as the first parameter. The paramater must be a string.

// $order = new EracuniOrder({ ISO Country Code });
$order = new EracuniOrder('IT');

This is used to automatically inject different settings for each country in the background (documentLanguage, businessUnit, costPosition, currency, etc). The plugin already comes preinstalled with settings for a few countries. The list of all available countries can be found under bsmart_plugins/src/Bsmart/Eracuni/Traits/Settings.php. Here you can create new country settings or edit existing ones.

Below is a full example of Settings.php from the current version:

    private $countrySettings = [

        'SI' => [
            'timezone' => 'Europe/Ljubljana',
            'currency' => 'EUR',
            'countryCode' => 'SI',
            'documentLanguage' => 'Slovene',
            'costPosition' => 'SI',
            'businessUnit' => '02',
            'warehouseCode' => '0000',
            'vatTransactionType' => '0',
        ],

        'IT' => [
            'timezone' => 'Europe/Rome',
            'currency' => 'EUR',
            'countryCode' => 'IT',
            'documentLanguage' => 'Italian',
            'costPosition' => '01',
            'businessUnit' => '02',
            'warehouseCode' => '0000',
            'vatTransactionType' => '8',
        ],

        'HU' => [
            'timezone' => 'Europe/Budapest',
            'currency' => 'HUF',
            'countryCode' => 'IT',
            'documentLanguage' => 'Hungarian',
            'costPosition' => 'HUDDV',
            'businessUnit' => '02',
            'warehouseCode' => '0000',
            'vatTransactionType' => '8'
        ],

        'PL' => [
            'timezone' => 'Europe/Warsaw',
            'currency' => 'PLN',
            'countryCode' => 'PL',
            'documentLanguage' => 'Polish',
            'costPosition' => 'PLDDV',
            'businessUnit' => '02',
            'warehouseCode' => '0000',
            'vatTransactionType' => '8'
        ],

        'SK' => [
            'timezone' => 'Europe/Bratislava',
            'currency' => 'EUR',
            'countryCode' => 'SK',
            'documentLanguage' => 'Slovak',
            'costPosition' => 'SKDDV',
            'businessUnit' => '02',
            'warehouseCode' => '0000',
            'vatTransactionType' => '8'
        ],

        'RO' => [
            'timezone' => 'Europe/Bucharest',
            'currency' => 'RON',
            'countryCode' => 'RO',
            'documentLanguage' => 'Slovene',
            'costPosition' => 'RO',
            'businessUnit' => '02',
            'warehouseCode' => '0000',
            'vatTransactionType' => '0'
        ],

        'CZ' => [
            'timezone' => 'Europe/Prague',
            'currency' => 'CZK',
            'countryCode' => 'CZ',
            'documentLanguage' => 'Czech',
            'costPosition' => 'CZDDV',
            'businessUnit' => '02',
            'warehouseCode' => '0000',
            'vatTransactionType' => '8'
        ],
    ];

# Adding New Settings Codes

# Fields reference