<?php
// $Id: netherlands_528_1.cif,v 1.9 2010-04-14 14:20:56 islandusurper Exp $

function netherlands_install() {
  // Make the entry in the country table.
  // VALUES = Country ID, Country Name, 2-digit Code, 3-digit Code, File Version
  db_insert('uc_countries')
    ->fields(array(
      'country_id' => 528,
      'country_name' => 'Netherlands',
      'country_iso_code_2' => 'NL',
      'country_iso_code_3' => 'NLD',
      'version' => 1,
    ))
    ->execute();

  // Make the entries in the zones table.
  $zones = array(
    array(528, 'ZHL', 'Zuid-Holland'),
    array(528, 'NHL', 'Noord-Holland'),
    array(528, 'NBR', 'Noord-Brabant'),
    array(528, 'GLD', 'Gelderland'),
    array(528, 'UTR', 'Utrecht'),
    array(528, 'LIM', 'Limburg'),
    array(528, 'OVE', 'Overijssel'),
    array(528, 'FRL', 'Friesland'),
    array(528, 'GRO', 'Groningen'),
    array(528, 'DRE', 'Drenthe'),
    array(528, 'ZLD', 'Zeeland'),
    array(528, 'FLD', 'Flevoland'),
  );

  $query = db_insert('uc_zones')->fields(array('zone_country_id', 'zone_code', 'zone_name'));
  foreach ($zones as $zone) {
    $query->values($zone);
  }
  $query->execute();

  // Set address format
  uc_set_address_format(
    528,
    "!company\r\n".
    "!first_name !last_name\r\n".
    "!street1\r\n".
    "!street2\r\n".
    "!postal_code !city\r\n".
    "!country_name_if"
  );
}
