 --
 ALTER TABLE `tbl_users`
   ADD CONSTRAINT `tbl_users_ibfk_1` FOREIGN KEY (`id`) REFERENCES `tbl_profiles` (`user_id`);
-COMMIT;

  `account_parent_id` int(11) DEFAULT NULL,
  `firm_id` int(11) NOT NULL,
  `level` int(11) NOT NULL DEFAULT '1',
  `code` varchar(16) CHARACTER SET utf8 NOT NULL,
  `is_selectable` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `account_parent_id` (`account_parent_id`),
  KEY `firm_id` (`firm_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=13 ;

--
-- Dump dei dati per la tabella `tbl_account`
--

INSERT INTO `tbl_account` (`id`, `account_parent_id`, `firm_id`, `level`, `code`, `is_selectable`) VALUES
(1, NULL, 1, 1, '01', 0),
(2, NULL, 1, 1, '02', 0),
(3, NULL, 1, 1, '03', 0),
(4, 1, 1, 2, '01.01', 1),
(5, 1, 1, 2, '01.02', 1),
(6, 1, 1, 2, '01.10', 0),
(7, 2, 1, 2, '02.01', 0),
(8, 3, 1, 2, '03.01', 1),
(9, 6, 1, 3, 'CUST01', 1),
(10, 6, 1, 3, 'CUST02', 1),
(11, 7, 1, 1, 'SUPPL01', 1),
(12, 7, 1, 1, 'SUPPL02', 1);

-- --------------------------------------------------------


(9, 1, 'Customer One'),
(10, 1, 'Customer Two'),
(11, 1, 'Supplier One'),
(12, 1, 'Supplier Two'),
(13, 1, 'Expenses'),
(13, 2, 'Costi'),
(14, 1, 'Revenues'),
(14, 2, 'Ricavi'),
(15, 1, 'Purchases'),
(15, 2, 'Merci c/acquisti'),
(16, 1, 'Sales'),
(16, 2, 'Merci c/vendite');

-- --------------------------------------------------------

