59 lines
2.8 KiB
SQL
59 lines
2.8 KiB
SQL
CREATE TABLE `llx_askpricesupplier` (
|
|
`rowid` int(11) NOT NULL AUTO_INCREMENT,
|
|
`ref` varchar(30) NOT NULL,
|
|
`entity` int(11) NOT NULL DEFAULT '1',
|
|
`ref_ext` varchar(255) DEFAULT NULL,
|
|
`ref_int` varchar(255) DEFAULT NULL,
|
|
`ref_client` varchar(255) DEFAULT NULL,
|
|
`fk_soc` int(11) DEFAULT NULL,
|
|
`fk_projet` int(11) DEFAULT NULL,
|
|
`tms` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
`datec` datetime DEFAULT NULL,
|
|
`datep` date DEFAULT NULL,
|
|
`fin_validite` datetime DEFAULT NULL,
|
|
`date_valid` datetime DEFAULT NULL,
|
|
`date_cloture` datetime DEFAULT NULL,
|
|
`fk_user_author` int(11) DEFAULT NULL,
|
|
`fk_user_modif` int(11) DEFAULT NULL,
|
|
`fk_user_valid` int(11) DEFAULT NULL,
|
|
`fk_user_cloture` int(11) DEFAULT NULL,
|
|
`fk_statut` smallint(6) NOT NULL DEFAULT '0',
|
|
`price` double DEFAULT '0',
|
|
`remise_percent` double DEFAULT '0',
|
|
`remise_absolue` double DEFAULT '0',
|
|
`remise` double DEFAULT '0',
|
|
`total_ht` double(24,8) DEFAULT '0.00000000',
|
|
`tva` double(24,8) DEFAULT '0.00000000',
|
|
`localtax1` double(24,8) DEFAULT '0.00000000',
|
|
`localtax2` double(24,8) DEFAULT '0.00000000',
|
|
`total` double(24,8) DEFAULT '0.00000000',
|
|
`fk_account` int(11) DEFAULT NULL,
|
|
`fk_currency` varchar(3) DEFAULT NULL,
|
|
`fk_cond_reglement` int(11) DEFAULT NULL,
|
|
`fk_mode_reglement` int(11) DEFAULT NULL,
|
|
`note_private` text,
|
|
`note_public` text,
|
|
`model_pdf` varchar(255) DEFAULT NULL,
|
|
`date_livraison` date DEFAULT NULL,
|
|
`fk_shipping_method` int(11) DEFAULT NULL,
|
|
`fk_availability` int(11) DEFAULT NULL,
|
|
`fk_input_reason` int(11) DEFAULT NULL,
|
|
`import_key` varchar(14) DEFAULT NULL,
|
|
`extraparams` varchar(255) DEFAULT NULL,
|
|
`fk_delivery_address` int(11) DEFAULT NULL,
|
|
PRIMARY KEY (`rowid`),
|
|
UNIQUE KEY `uk_askpricesupplier_ref` (`ref`,`entity`),
|
|
KEY `idx_askpricesupplier_fk_soc` (`fk_soc`),
|
|
KEY `idx_askpricesupplier_fk_user_author` (`fk_user_author`),
|
|
KEY `idx_askpricesupplier_fk_user_valid` (`fk_user_valid`),
|
|
KEY `idx_askpricesupplier_fk_user_cloture` (`fk_user_cloture`),
|
|
KEY `idx_askpricesupplier_fk_projet` (`fk_projet`),
|
|
KEY `idx_askpricesupplier_fk_account` (`fk_account`),
|
|
KEY `idx_askpricesupplier_fk_currency` (`fk_currency`),
|
|
CONSTRAINT `fk_askpricesupplier_fk_projet` FOREIGN KEY (`fk_projet`) REFERENCES `llx_projet` (`rowid`),
|
|
CONSTRAINT `fk_askpricesupplier_fk_soc` FOREIGN KEY (`fk_soc`) REFERENCES `llx_societe` (`rowid`),
|
|
CONSTRAINT `fk_askpricesupplier_fk_user_author` FOREIGN KEY (`fk_user_author`) REFERENCES `llx_user` (`rowid`),
|
|
CONSTRAINT `fk_askpricesupplier_fk_user_cloture` FOREIGN KEY (`fk_user_cloture`) REFERENCES `llx_user` (`rowid`),
|
|
CONSTRAINT `fk_askpricesupplier_fk_user_valid` FOREIGN KEY (`fk_user_valid`) REFERENCES `llx_user` (`rowid`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8
|