databases/Metier/schema/facturation.facture.sql

20 lines
967 B
MySQL
Raw Permalink Normal View History

CREATE TABLE `facture` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`num` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
`clientCode` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
`label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
`type` enum('facture','avoir') COLLATE utf8mb4_unicode_ci NOT NULL,
`paiement` enum('none','virement','cheque') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'none',
`date` date NOT NULL,
`dateDue` date NOT NULL,
`periodBegin` date NOT NULL,
`periodEnd` date NOT NULL,
`mtHT` decimal(10,2) NOT NULL DEFAULT '0.00',
`mtTTC` decimal(10,2) NOT NULL DEFAULT '0.00',
`valid` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`sent` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Factures';