Improved quick entries.
[fa-stable.git] / sql / alter2.1.sql
index fcb785c35a39289316cc385e733b2320438796fc..8e5b45f1fb03a181f2ce09b6f5e8ed267a543cee 100644 (file)
@@ -104,35 +104,35 @@ DROP TABLE IF EXISTS `0_quick_entries`;
 
 CREATE TABLE `0_quick_entries` (
   `id` smallint(6) UNSIGNED NOT NULL auto_increment,
+  `type` tinyint(1) NOT NULL default '0',
   `description` varchar(60) NOT NULL,
-  `deposit` tinyint(1) NOT NULL default '0',
-  `bank_only` tinyint(1) NOT NULL default '0',
+  `base_amount` double NOT NULL default '0',
+  `base_desc` varchar(60) NULL,
   PRIMARY KEY  (`id`),
   KEY `description` (`description`)
 ) TYPE=MyISAM AUTO_INCREMENT=1;
 
-INSERT INTO `0_quick_entries` VALUES ('1', 'Maintenance', '0', '1');
-INSERT INTO `0_quick_entries` VALUES ('2', 'Phone', '0', '1');
-INSERT INTO `0_quick_entries` VALUES ('3', 'Cash Sales', '1', '1');
+INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
+INSERT INTO `0_quick_entries` VALUES ('2', '1', 'Phone', '0', 'Amount');
+INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
 
 DROP TABLE IF EXISTS `0_quick_entry_lines`;
 
 CREATE TABLE `0_quick_entry_lines` (
   `id` smallint(6) UNSIGNED NOT NULL auto_increment,
   `qid` smallint(6) UNSIGNED NOT NULL,
-  `account` varchar(11) NOT NULL,
-  `tax_acc` tinyint(1) NOT NULL default '0',
-  `pct` tinyint(1) NOT NULL default '0',
   `amount` double default NULL default '0',
+  `action` varchar(2) NOT NULL,
+  `dest_id` varchar(11) NOT NULL,
   `dimension_id` smallint(6) UNSIGNED NULL default NULL,
   `dimension2_id` smallint(6) UNSIGNED NULL default NULL,
   PRIMARY KEY  (`id`),
   KEY `qid` (`qid`)
 ) TYPE=MyISAM AUTO_INCREMENT=1;
 
-INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '6600', '1', '0', 0, '0', '0');
-INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '6730', '1', '0', 0, '0', '0');
-INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '3000', '1', '0', 0, '0', '0');
+INSERT INTO `0_quick_entry_lines` VALUES ('1', '1','0','=', '6600', '0', '0');
+INSERT INTO `0_quick_entry_lines` VALUES ('2', '2','0','=', '6730', '0', '0');
+INSERT INTO `0_quick_entry_lines` VALUES ('3', '3','0','=', '3000', '0', '0');
 
 ALTER TABLE `0_users` DROP COLUMN `print_profile`;
 ALTER TABLE `0_users` ADD `print_profile` VARCHAR(30) NOT NULL DEFAULT '1';