Fixed debtor_trans primary key to allow multiply AR accounts in journal transactions.
[fa-stable.git] / sql / en_US-demo.sql
index dd13f532831b5a97d3172823e3cd52bfc909027e..a5f1b4653d7a92a3c24209ddbed915b2f52aacb3 100644 (file)
@@ -718,7 +718,7 @@ CREATE TABLE IF NOT EXISTS `0_debtor_trans` (
   `dimension2_id` int(11) NOT NULL DEFAULT '0',
   `payment_terms` int(11) DEFAULT NULL,
   `tax_included` tinyint(1) unsigned NOT NULL DEFAULT '0',
-  PRIMARY KEY (`type`,`trans_no`),
+  PRIMARY KEY (`type`,`trans_no`,`debtor_no`),
   KEY `debtor_no` (`debtor_no`,`branch_code`),
   KEY `tran_date` (`tran_date`),
   KEY `order_` (`order_`)