DROP TABLE IF EXISTS [finance];

CREATE TABLE `[finance]` (
  `finance_id` int(11) NOT NULL AUTO_INCREMENT,
  `line` varchar(50) NOT NULL,
  `description` text NOT NULL,
  `date` date NOT NULL,
  `amount` double NOT NULL,
  `status` int(11) NOT NULL,
  `invoice` text NOT NULL,
  `currency` varchar(3) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`finance_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8  AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS [finance_currencies];

CREATE TABLE `[finance_currencies]` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(250) NOT NULL,
  `iso_code` varchar(3) NOT NULL,
  `symbol` varchar(10) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

INSERT INTO `[finance_currencies]` (`id`, `name`, `iso_code`, `symbol`) VALUES
(1, 'United Arab Emirates dirham', 'AED', ''),
(2, 'Afghan afghani', 'AFN', ''),
(3, 'Albanian lek', 'ALL', 'L'),
(4, 'Armenian dram', 'AMD', ''),
(5, 'Netherlands Antillean guilder', 'ANG', ''),
(6, 'Angolan kwanza', 'AOA', 'Kz'),
(7, 'Argentine peso', 'ARS', '$'),
(8, 'Australian dollar', 'AUD', '$'),
(9, 'Aruban florin', 'AWG', ''),
(10, 'Azerbaijani manat', 'AZN', ''),
(11, 'Bosnia and Herzegovina convertible mark', 'BAM', 'KM'),
(12, 'Barbadian dollar', 'BBD', '$'),
(13, 'Bangladeshi taka', 'BDT', ''),
(14, 'Bulgarian lev', 'BGN', ''),
(15, 'Bahraini dinar', 'BHD', ''),
(16, 'Burundian franc', 'BIF', 'Fr'),
(17, 'Bermudian dollar', 'BMD', '$'),
(18, 'Brunei dollar', 'BND', '$'),
(19, 'Bolivian boliviano', 'BOB', 'Bs.'),
(20, 'Brazilian real', 'BRL', 'R$'),
(21, 'Bahamian dollar', 'BSD', '$'),
(22, 'Bhutanese ngultrum', 'BTN', 'Nu.'),
(23, 'Botswana pula', 'BWP', 'P'),
(24, 'Belarusian ruble', 'BYR', 'Br'),
(25, 'Belize dollar', 'BZD', '$'),
(26, 'Canadian dollar', 'CAD', '$'),
(27, 'Congolese franc', 'CDF', 'Fr'),
(28, 'Swiss franc', 'CHF', 'Fr'),
(29, 'Chilean peso', 'CLP', '$'),
(30, 'Chinese yuan', 'CNY', '&yen;'),
(31, 'Columbian peso', 'COP', '$'),
(32, 'Costa Rican colon', 'CRC', ''),
(33, 'Cuban convertible peso', 'CUC', '$'),
(34, 'Cuban peso', 'CUP', '$'),
(35, 'Cape Verdean escudo', 'CVE', '$'),
(36, 'Czech koruna', 'CZK', ''),
(37, 'Djiboutian franc', 'DJF', 'Fr'),
(38, 'Danish krone', 'DKK', 'kr'),
(39, 'Dominican peso', 'DOP', '$'),
(40, 'Algerian dinar', 'DZD', ''),
(41, 'Egyptian pound', 'EGP', ''),
(42, 'Eritrean nakfa', 'ERN', 'Nfk'),
(43, 'Ethiopian birr', 'ETB', 'Br'),
(44, 'Euro ', 'EUR', '&euro;'),
(45, 'Fijian dollar', 'FJD', '$'),
(46, 'Falkland Islands pound', 'FKP', '&pound;'),
(47, 'British pound', 'GBP', '&pound;'),
(48, 'Georgian lari', 'GEL', ''),
(49, 'Ghana cedi', 'GHS', ''),
(50, 'Gibraltar pound', 'GIP', '&pound;'),
(51, 'Gambian delasi', 'GMD', 'D'),
(52, 'Guinean franc', 'GNF', 'Fr'),
(53, 'Guatemalan quetzal', 'GTQ', 'Q'),
(54, 'Guyanese dollar', 'GYD', '$'),
(55, 'Hong Kong dollar', 'HKD', '$'),
(56, 'Honduran lempira', 'HNL', 'L'),
(57, 'Croatian kuna', 'HRK', 'kn'),
(58, 'Haitian gourde', 'HTG', 'G'),
(59, 'Hungarian forint', 'HUF', 'Ft'),
(60, 'Indonesian rupiah', 'IDR', 'Rp'),
(61, 'Israeli new shekel', 'ILS', ''),
(62, 'Indian rupee', 'INR', ''),
(63, 'Iraqi dinar', 'IQD', ''),
(64, 'Iranian rial', 'IRR', ''),
(65, 'Icelandic krona', 'ISK', 'kr'),
(66, 'Jamaican dollar', 'JMD', '$'),
(67, 'Jordanian dinar', 'JOD', ''),
(68, 'Japanese yen', 'JPY', '&yen;'),
(69, 'Kenyan shilling', 'KES', 'Sh'),
(70, 'Kyrgyzstani som', 'KGS', ''),
(71, 'Cambodian riel', 'KHR', ''),
(72, 'Comorian franc', 'KMF', 'Fr'),
(73, 'North Korean won', 'KPW', ''),
(74, 'South Korean won', 'KRW', ''),
(75, 'Kuwaiti dinar', 'KWD', ''),
(76, 'Cayman Islands dollar', 'KYD', '$'),
(77, 'Kazakhstani tenge', 'KZT', ''),
(78, 'Lao kip', 'LAK', ''),
(79, 'Lebanese pound', 'LBP', ''),
(80, 'Sri Lankan rupee', 'LKR', 'Rs'),
(81, 'Liberian dollar', 'LRD', '$'),
(82, 'Lesotho loti', 'LSL', 'L'),
(83, 'Lithuanian litas', 'LTL', 'Lt'),
(84, 'Latvian lats', 'LVL', 'Ls'),
(85, 'Libyan dinar', 'LYD', ''),
(86, 'Moroccan dirham', 'MAD', ''),
(87, 'Moldovan leu', 'MDL', 'L'),
(88, 'Malagasy ariary', 'MGA', 'Ar'),
(89, 'Macedonian denar', 'MKD', ''),
(90, 'Burmese kyat', 'MMK', 'K'),
(91, 'Mongolian togrog', 'MNT', ''),
(92, 'Macanese pataca', 'MOP', 'P'),
(93, 'Mauritanian ouguiya', 'MRO', 'UM'),
(94, 'Mauritian rupee', 'MUR', 'Rs'),
(95, 'Maldivian rufiyaa', 'MVR', ''),
(96, 'Malawian kwacha', 'MWK', 'MK'),
(97, 'Mexican peso', 'MXN', '$'),
(98, 'Malaysian ringgit', 'MYR', 'RM'),
(99, 'Mozambican metical', 'MZN', 'MT'),
(100, 'Namibian dollar', 'NAD', '$'),
(101, 'Nigerian naira', 'NGN', ''),
(102, 'Nicaraguan cordoba', 'NIO', 'C$'),
(103, 'Norwegian krone', 'NOK', 'kr'),
(104, 'Nepalese rupee', 'NPR', 'Rs'),
(105, 'New Zealand dollar', 'NZD', '$'),
(106, 'Omani rial', 'OMR', ''),
(107, 'Panamanian balboa', 'PAB', 'B/.'),
(108, 'Peruvian nuevo sol', 'PEN', 'S/.'),
(109, 'Papua New Guinean kina', 'PGK', 'K'),
(110, 'Philippine peso', 'PHP', ''),
(111, 'Pakistani rupee', 'PKR', 'Rs'),
(112, 'Polish zloty', 'PLN', ''),
(113, 'Paraguayan guarani', 'PYG', ''),
(114, 'Qatari riyal', 'QAR', ''),
(115, 'Romanian leu', 'RON', 'L'),
(116, 'Serbian dinar', 'RSD', 'din.'),
(117, 'Russian ruble', 'RUB', 'p.'),
(118, 'Rwandan franc', 'RWF', 'Fr'),
(119, 'Saudi riyal', 'SAR', ''),
(120, 'Solomon Islands dollar', 'SBD', '$'),
(121, 'Seychellois rupee', 'SCR', 'Rs'),
(122, 'Sudanese pound', 'SDG', '&pound;'),
(123, 'Swedish krona', 'SEK', 'kr'),
(124, 'Singapore dollar', 'SGD', '$'),
(125, 'Saint Helena pound', 'SHP', '&pound;'),
(126, 'Sierra Leonean leone', 'SLL', 'Le'),
(127, 'Somali shilling', 'SOS', 'Sh'),
(128, 'Surinamese dollar', 'SRD', '$'),
(129, 'South Sudanese pound', 'SSP', '&pound;'),
(130, 'Sao Tome and Principe dobra', 'STD', 'Db'),
(131, 'Salvadoran colon', 'SVC', ''),
(132, 'Syrian pound', 'SYP', '&pound;'),
(133, 'Swazi lilangeni', 'SZL', 'L'),
(134, 'Thai baht', 'THB', ''),
(135, 'Tajikistani somoni', 'TJS', 'SM'),
(136, 'Turkmenistan manat', 'TMT', 'm'),
(137, 'Tunisian dinar', 'TND', ''),
(138, 'Tongan pa''anga', 'TOP', 'T$'),
(139, 'Turkish lira', 'TRY', ''),
(140, 'Trinidad and Tobago dollar', 'TTD', '$'),
(141, 'New Taiwan dollar', 'TWD', '$'),
(142, 'Tanzanian shilling', 'TZS', 'Sh'),
(143, 'Ukrainoan hryvnia', 'UAH', ''),
(144, 'Ugandan shilling', 'UGX', 'Sh'),
(145, 'United States dollar', 'USD', '$'),
(146, 'Uruguayan peso', 'UYU', '$'),
(147, 'Uzbekistani som', 'UZS', ''),
(148, 'Venezuelan bolivar', 'VEF', 'Bs F'),
(149, 'Vietnamese dong', 'VND', ''),
(150, 'Vanuatu vatu', 'VUV', 'Vt'),
(151, 'Samoan tala', 'WST', 'T'),
(152, 'Central African CFA franc', 'XAF', 'Fr'),
(153, 'East Caribbean dollar', 'XCD', '$'),
(154, 'West African CFA franc', 'XOF', 'Fr'),
(155, 'Yemeni  rial', 'YER', ''),
(156, 'South African rand', 'ZAR', 'R'),
(157, 'Zambian kwacha', 'ZMK', 'ZK'),
(158, 'Zimbabwean dollar', 'ZWL', '$');