--- Bestelling (VIEW) --- CREATE ALGORITHM=UNDEFINED DEFINER=`sander`@`%` SQL SECURITY DEFINER VIEW `Managementboek_Klanten`.`Bestelling` AS select `Managementboek_Klanten`.`BestellingAll`.`Bestellingid` AS `Bestellingid`,`Managementboek_Klanten`.`BestellingAll`.`Klantid` AS `Klantid`,`Managementboek_Klanten`.`BestellingAll`.`Siteid` AS `Siteid`,`Managementboek_Klanten`.`BestellingAll`.`Opmerkingen` AS `Opmerkingen`,`Managementboek_Klanten`.`BestellingAll`.`Achternaam` AS `Achternaam`,`Managementboek_Klanten`.`BestellingAll`.`Bedrijfsnaam` AS `Bedrijfsnaam`,`Managementboek_Klanten`.`BestellingAll`.`DT` AS `DT`,`Managementboek_Klanten`.`BestellingAll`.`Afleverid` AS `Afleverid`,`Managementboek_Klanten`.`BestellingAll`.`IP` AS `IP`,`Managementboek_Klanten`.`BestellingAll`.`ProcessStatus` AS `ProcessStatus`,`Managementboek_Klanten`.`BestellingAll`.`BatchID` AS `BatchID`,`Managementboek_Klanten`.`BestellingAll`.`AffiliateId` AS `AffiliateId`,`Managementboek_Klanten`.`BestellingAll`.`ReferrerDomain` AS `ReferrerDomain`,`Managementboek_Klanten`.`BestellingAll`.`IsClubOrder` AS `IsClubOrder`,`Managementboek_Klanten`.`BestellingAll`.`Betaalmethode` AS `Betaalmethode`,`Managementboek_Klanten`.`BestellingAll`.`Rekeningnummer` AS `Rekeningnummer`,`Managementboek_Klanten`.`BestellingAll`.`Uwreferentie` AS `Uwreferentie`,`Managementboek_Klanten`.`BestellingAll`.`Afgerond` AS `Afgerond`,`Managementboek_Klanten`.`BestellingAll`.`Herinnering` AS `Herinnering`,`Managementboek_Klanten`.`BestellingAll`.`Hash` AS `Hash`,`Managementboek_Klanten`.`BestellingAll`.`MailedTracktrace` AS `MailedTracktrace`,`Managementboek_Klanten`.`BestellingAll`.`SessionId` AS `SessionId`,`Managementboek_Klanten`.`BestellingAll`.`EersteBestelling` AS `EersteBestelling`,`Managementboek_Klanten`.`BestellingAll`.`StemMailVerzonden` AS `StemMailVerzonden`,`Managementboek_Klanten`.`BestellingAll`.`DTStemMail` AS `DTStemMail`,`Managementboek_Klanten`.`BestellingAll`.`SamengevoegdMet` AS `SamengevoegdMet`,`Managementboek_Klanten`.`BestellingAll`.`Factuurid` AS `Factuurid`,`Managementboek_Klanten`.`BestellingAll`.`Gebruiker` AS `Gebruiker`,`Managementboek_Klanten`.`BestellingAll`.`OpmerkingNegeren` AS `OpmerkingNegeren`,`Managementboek_Klanten`.`BestellingAll`.`AutoClassificatie` AS `AutoClassificatie`,`Managementboek_Klanten`.`BestellingAll`.`ClassificatieRedenKort` AS `ClassificatieRedenKort`,`Managementboek_Klanten`.`BestellingAll`.`ClassificatieReden` AS `ClassificatieReden`,`Managementboek_Klanten`.`BestellingAll`.`Geexporteerd` AS `Geexporteerd`,`Managementboek_Klanten`.`BestellingAll`.`OrigineelBestellingId` AS `OrigineelBestellingId`,`Managementboek_Klanten`.`BestellingAll`.`ProspectId` AS `ProspectId`,`Managementboek_Klanten`.`BestellingAll`.`GeenPortoBerekenen` AS `GeenPortoBerekenen`,`Managementboek_Klanten`.`BestellingAll`.`IdealOpen` AS `IdealOpen`,`Managementboek_Klanten`.`BestellingAll`.`IdealTimeout` AS `IdealTimeout`,`Managementboek_Klanten`.`BestellingAll`.`BetalingsTermijn` AS `BetalingsTermijn`,`Managementboek_Klanten`.`BestellingAll`.`Geannuleerd` AS `Geannuleerd`,`Managementboek_Klanten`.`BestellingAll`.`UitBackorder` AS `UitBackorder`,`Managementboek_Klanten`.`BestellingAll`.`SiteBestelling` AS `SiteBestelling`,`Managementboek_Klanten`.`BestellingAll`.`DeelLevering` AS `DeelLevering`,`Managementboek_Klanten`.`BestellingAll`.`DTFactuur` AS `DTFactuur`,`Managementboek_Klanten`.`BestellingAll`.`DTVerval` AS `DTVerval`,`Managementboek_Klanten`.`BestellingAll`.`TeltAls` AS `TeltAls`,`Managementboek_Klanten`.`BestellingAll`.`IsOmzet` AS `IsOmzet`,`Managementboek_Klanten`.`BestellingAll`.`IsCorrectie` AS `IsCorrectie`,`Managementboek_Klanten`.`BestellingAll`.`IsCredit` AS `IsCredit`,`Managementboek_Klanten`.`BestellingAll`.`IsOpnieuw` AS `IsOpnieuw`,`Managementboek_Klanten`.`BestellingAll`.`ToonBestelling` AS `ToonBestelling`,`Managementboek_Klanten`.`BestellingAll`.`Herkomst` AS `Herkomst`,`Managementboek_Klanten`.`BestellingAll`.`VerstuurCompleteOrder` AS `VerstuurCompleteOrder` from `Managementboek_Klanten`.`BestellingAll` where ((`Managementboek_Klanten`.`BestellingAll`.`Afgerond` = 1) and (`Managementboek_Klanten`.`BestellingAll`.`Geannuleerd` = 0)) --- TABLES --- MariaDB [(none)]> SHOW CREATE TABLE Managementboek_Klanten.`Bestellingen`\G; *************************** 1. row *************************** Table: Bestellingen Create Table: CREATE TABLE `Bestellingen` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `Auteurnaam` varchar(200) CHARACTER SET utf8 DEFAULT NULL, `Aantal` int(11) DEFAULT NULL, `Prijs` int(11) DEFAULT NULL, `Bestellingid` int(11) DEFAULT NULL, `Ean` varchar(13) DEFAULT NULL, `Omschrijving` varchar(200) CHARACTER SET utf8 DEFAULT NULL, `Geexporteerd` tinyint(4) NOT NULL DEFAULT '0', `KortingPercentage` decimal(4,2) NOT NULL DEFAULT '0.00', `KortingForce` tinyint(1) NOT NULL DEFAULT '0', `IsPromo` int(11) NOT NULL DEFAULT '0', `KortingReden` char(3) CHARACTER SET utf8 DEFAULT NULL, `KortingMP` decimal(11,2) DEFAULT '0.00', `KostenMP` decimal(4,2) DEFAULT '0.00', `DTOrderregel` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `VastePrijs` decimal(6,2) DEFAULT '0.00', `ActiePrijs` decimal(6,2) DEFAULT '0.00', `BTWTarief` decimal(3,1) DEFAULT '0.0' COMMENT 'Te *factureren* BTW tarief', `BTWCode` char(1) DEFAULT '0' COMMENT 'Te *factureren* BTW code', `AantalBackorder` int(11) DEFAULT '0', `BackorderOrigineel` int(11) DEFAULT NULL, `BackorderReden` int(11) DEFAULT NULL, `BriefCode` varchar(20) DEFAULT NULL, `DTExactExport` datetime DEFAULT NULL, `KortingBedrag` decimal(10,2) NOT NULL DEFAULT '0.00', `KortingBedragExBtw` decimal(10,2) DEFAULT '0.00', `PrijsExBtwExKorting` decimal(10,2) DEFAULT '0.00', `PrijsExBtwIncKorting` decimal(10,2) DEFAULT '0.00', `BedragExBtwExKorting` decimal(10,2) DEFAULT '0.00', `BedragIncBtwExKorting` decimal(10,2) DEFAULT '0.00', `BedragIncBtwIncKorting` decimal(10,2) DEFAULT '0.00', `BedragExBtwIncKorting` decimal(10,2) DEFAULT '0.00', `BedragBTW` decimal(10,2) DEFAULT '0.00', `LineNr` int(11) NOT NULL DEFAULT '0', `Geannuleerd` tinyint(4) DEFAULT '0', `Bijdrage` decimal(10,2) NOT NULL DEFAULT '0.00', `OmzetExBtwExKorting` decimal(10,2) NOT NULL DEFAULT '0.00', `OmzetExBtwIncKorting` decimal(10,2) NOT NULL DEFAULT '0.00', `OmzetIncBtwExKorting` decimal(10,2) NOT NULL DEFAULT '0.00', `OmzetIncBtwIncKorting` decimal(10,2) NOT NULL DEFAULT '0.00', `StatusId` tinyint(4) DEFAULT '0', `FactuurId` int(11) DEFAULT NULL, `RegelReferentie` varchar(255) CHARACTER SET utf8 DEFAULT NULL, `RegelKostenplaats` varchar(255) CHARACTER SET utf8 DEFAULT NULL, `RegelKostenplaatsID` int(11) DEFAULT NULL, `RegelOrganisatieID` int(11) NOT NULL DEFAULT '0', `RegelAfleverdebiteur` int(11) NOT NULL DEFAULT '0' COMMENT 'Yes, really. :-(', `BoekStatusBijBestelling` tinyint(4) DEFAULT NULL, `PrijsInkoop` decimal(10,2) NOT NULL DEFAULT '0.00', `ICL` tinyint(1) DEFAULT '0', `Verzamelregel` tinyint(1) NOT NULL DEFAULT '0', `AantalGeleverd` int(11) NOT NULL DEFAULT '0', `BTWCodeProduct` char(1) DEFAULT NULL COMMENT 'BTWcode van product.', `BTWTariefProduct` decimal(3,1) DEFAULT NULL COMMENT 'BTW tarief van product.', PRIMARY KEY (`Id`), KEY `Bestellingid` (`Bestellingid`), KEY `Artikelcode` (`Ean`), KEY `NewIndex1` (`Id`,`BackorderOrigineel`), KEY `NewIndex2` (`AantalBackorder`), KEY `backorder` (`BackorderOrigineel`), KEY `NewIndex3` (`StatusId`), KEY `FactuurId` (`FactuurId`), KEY `IsPromo` (`IsPromo`), KEY `Delete` (`Bestellingid`,`IsPromo`), KEY `BesteldVoor` (`RegelAfleverdebiteur`), KEY `RegelKostenplaatsID` (`RegelKostenplaatsID`), KEY `DTOrderregel` (`DTOrderregel`), CONSTRAINT `Bestellingen_ibfk_1` FOREIGN KEY (`RegelKostenplaatsID`) REFERENCES `KostenplaatsLijstRegels` (`KostenplaatsId`), CONSTRAINT `FK_Bestellingen2` FOREIGN KEY (`Ean`) REFERENCES `ExactArtikelen` (`Code`) ) ENGINE=InnoDB AUTO_INCREMENT=50724058 DEFAULT CHARSET=latin1 1 row in set (0.00 sec) MariaDB [(none)]> SHOW CREATE TABLE Managementboek_Klanten.`BestellingenStatus`\G; *************************** 1. row *************************** Table: BestellingenStatus Create Table: CREATE TABLE `BestellingenStatus` ( `Id` int(11) NOT NULL, `InBehandelingOp` datetime DEFAULT NULL, `GereedOp` datetime DEFAULT NULL, `IngepaktOp` datetime DEFAULT NULL, `NageleverdOp` date DEFAULT NULL, `VerzondenOp` date DEFAULT NULL, `BetaaldOp` date DEFAULT NULL, `GeannuleerdOp` datetime DEFAULT NULL, PRIMARY KEY (`Id`), CONSTRAINT `FK_BestellingenStatus` FOREIGN KEY (`Id`) REFERENCES `Bestellingen` (`Id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) MariaDB [(none)]> SHOW CREATE TABLE Managementboek_Boeken.Boeken\G; *************************** 1. row *************************** Table: Boeken Create Table: CREATE TABLE `Boeken` ( `Ean` char(13) NOT NULL, `Uitgever` int(11) DEFAULT NULL, `Auteur1` int(11) DEFAULT NULL, `Auteur2` int(11) DEFAULT NULL, `Auteur3` int(11) DEFAULT NULL, `Enanderen` smallint(6) NOT NULL DEFAULT '0', `Titel` varchar(255) NOT NULL DEFAULT '', `Ondertitel` varchar(255) DEFAULT NULL, `Orgineletitel` varchar(255) DEFAULT NULL, `Naamserie` varchar(255) DEFAULT NULL, `Titelserie` varchar(255) DEFAULT NULL, `Editie` varchar(100) DEFAULT NULL, `Bindwijze` varchar(50) DEFAULT NULL, `Aantalblz` smallint(6) DEFAULT NULL, `Jaaruitgifte` smallint(6) DEFAULT NULL, `Valuta` varchar(4) NOT NULL DEFAULT 'EUR', `Prijs` double NOT NULL DEFAULT '0', `Aanbiedingsprijs` double DEFAULT NULL, `Befprijs` double DEFAULT NULL, `Boekstatus` smallint(6) NOT NULL DEFAULT '0', `Categorie` smallint(6) NOT NULL DEFAULT '0', `Rubriek` varchar(100) DEFAULT NULL, `Mlrubriek` varchar(100) DEFAULT NULL, `Bijzheden` varchar(255) DEFAULT NULL, `Inhoudsopgave` text, `Abstract` text, `Samenvatting` text, `Aanmaakdatum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Laatstgewijzigd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `Isgewist` smallint(6) NOT NULL DEFAULT '0', `Extraaandacht` smallint(6) NOT NULL DEFAULT '0', `Random` smallint(6) NOT NULL DEFAULT '0', `Pw` smallint(6) DEFAULT NULL, `Fem` smallint(6) DEFAULT NULL, `Dga` smallint(6) DEFAULT NULL, `Scope` smallint(6) DEFAULT NULL, `Nive` smallint(6) DEFAULT NULL, `Vink6` smallint(6) DEFAULT NULL, `Vink7` smallint(6) DEFAULT NULL, `Vink8` smallint(6) DEFAULT NULL, `Vink9` smallint(6) DEFAULT NULL, `Vink10` smallint(6) DEFAULT NULL, `Vink11` smallint(6) DEFAULT NULL, `Vink12` smallint(6) DEFAULT NULL, `Vink13` smallint(6) DEFAULT NULL, `Vink14` smallint(6) DEFAULT NULL, `Vink15` smallint(6) DEFAULT NULL, `Vink16` smallint(6) DEFAULT NULL, `Vink17` smallint(6) DEFAULT NULL, `Vink18` smallint(6) DEFAULT NULL, `Vink19` smallint(6) DEFAULT NULL, `Vink20` smallint(6) DEFAULT NULL, `Uploadstatus` char(1) DEFAULT NULL, `Jobnewsrandom` smallint(6) DEFAULT NULL, `Niverandom` smallint(6) DEFAULT NULL, `Scoperandom` smallint(6) DEFAULT NULL, `Pwrandom` smallint(6) DEFAULT NULL, `Random6` smallint(6) DEFAULT NULL, `Random7` smallint(6) DEFAULT NULL, `Random8` smallint(6) DEFAULT NULL, `Random9` smallint(6) DEFAULT NULL, `Random10` smallint(6) DEFAULT NULL, `Random11` smallint(6) DEFAULT NULL, `Random12` smallint(6) DEFAULT NULL, `Random13` smallint(6) DEFAULT NULL, `Random14` smallint(6) DEFAULT NULL, `Random15` smallint(6) DEFAULT NULL, `Vink21` smallint(6) DEFAULT NULL, `Vink22` smallint(6) DEFAULT NULL, `Vink23` smallint(6) DEFAULT NULL, `Vink24` smallint(6) DEFAULT NULL, `Vink25` smallint(6) DEFAULT NULL, `Vink26` smallint(6) DEFAULT NULL, `Vink27` smallint(6) DEFAULT NULL, `Vink28` smallint(6) DEFAULT NULL, `Vink29` smallint(6) DEFAULT NULL, `Vink30` smallint(6) DEFAULT NULL, `Vink31` smallint(6) DEFAULT NULL, `Vink32` smallint(6) DEFAULT NULL, `Vink33` smallint(6) DEFAULT NULL, `Vink34` smallint(6) DEFAULT NULL, `Vink35` smallint(6) DEFAULT NULL, `Vink36` smallint(6) DEFAULT NULL, `Vink37` smallint(6) DEFAULT NULL, `Vink38` smallint(6) DEFAULT NULL, `Vink39` smallint(6) DEFAULT NULL, `Vink40` smallint(6) DEFAULT NULL, `Random21` smallint(6) DEFAULT NULL, `Random22` smallint(6) DEFAULT NULL, `Random23` smallint(6) DEFAULT NULL, `Random24` smallint(6) DEFAULT NULL, `Random25` smallint(6) DEFAULT NULL, `Random26` smallint(6) DEFAULT NULL, `Random27` smallint(6) DEFAULT NULL, `Random28` smallint(6) DEFAULT NULL, `Random29` smallint(6) DEFAULT NULL, `Random30` smallint(6) DEFAULT NULL, `Random31` smallint(6) DEFAULT NULL, `Random32` smallint(6) DEFAULT NULL, `Random33` smallint(6) DEFAULT NULL, `Random34` smallint(6) DEFAULT NULL, `Random35` smallint(6) DEFAULT NULL, `Random36` smallint(6) DEFAULT NULL, `Random37` smallint(6) DEFAULT NULL, `Random38` smallint(6) DEFAULT NULL, `Random39` smallint(6) DEFAULT NULL, `Random40` smallint(6) DEFAULT NULL, `Taalvermelding` varchar(10) DEFAULT NULL, `Artgroep` varchar(4) DEFAULT NULL, `Aanbiedingvanaf` date DEFAULT NULL, `Aanbiedingtotenmet` date DEFAULT NULL, `Cd` smallint(6) DEFAULT NULL, `Laatstemutatiecbart` date DEFAULT NULL, `Laatstemutatiecbbesch` date DEFAULT NULL, `Vink1` smallint(6) DEFAULT NULL, `Vink2` smallint(6) DEFAULT NULL, `Vink3` smallint(6) DEFAULT NULL, `Testimonials` text, `Cbstatus` smallint(6) DEFAULT NULL, `Druk` smallint(6) DEFAULT NULL, `Artgroepid` int(11) DEFAULT NULL, `Btwcode` char(1) DEFAULT NULL, `Boeksoort` char(1) DEFAULT NULL, `Korting_0_9` double DEFAULT NULL, `Korting_10_29` double DEFAULT NULL, `Korting_30_99` double DEFAULT NULL, `Korting_100_249` double DEFAULT NULL, `Korting_250_499` double DEFAULT NULL, `Korting_500_999` double DEFAULT NULL, `Aangepastekorting_0_9` double DEFAULT NULL, `Aangepastekorting_10_29` double DEFAULT NULL, `Aangepastekorting_30_99` double DEFAULT NULL, `Aangepastekorting_100_249` double DEFAULT NULL, `Aangepastekorting_250_499` double DEFAULT NULL, `Aangepastekorting_500_999` double DEFAULT NULL, `Kortingmp` double DEFAULT NULL, `Aangepastekortingmp` double DEFAULT NULL, `Brief` varchar(255) DEFAULT NULL, `Vink4` smallint(6) DEFAULT NULL, `Vink5` smallint(6) DEFAULT NULL, `Btwsplitsing` smallint(6) DEFAULT NULL, `Prijsbtwsplitsing_normaal_nul` double DEFAULT NULL, `Prijsbtwsplitsing_normaal_laag` double DEFAULT NULL, `Prijsbtwsplitsing_normaal_hoog` double DEFAULT NULL, `Prijsbtwsplitsing_aanbieding_nul` double DEFAULT NULL, `Prijsbtwsplitsing_aanbieding_laag` double DEFAULT NULL, `Prijsbtwsplitsing_aanbieding_hoog` double DEFAULT NULL, `Productid` int(11) DEFAULT NULL, `Clubprijs1` double DEFAULT NULL, `Clubprijs2` double DEFAULT NULL, `Btwcode_tbv_export` char(1) DEFAULT NULL, `Magazijnsoort` char(50) DEFAULT NULL, `Verschijningsdatum` date DEFAULT NULL, `Afwijkendbestelpuntid` int(11) DEFAULT NULL, `Afwijkendbestelwijzeid` int(11) DEFAULT NULL, `Isbn` char(10) DEFAULT NULL, `Afwijkendminimalebestelhoeveelheid` int(11) DEFAULT NULL, `Voorraadartikel` smallint(6) DEFAULT NULL, `Bestelpuntuitgeverid` int(11) DEFAULT NULL, `Bestelwijze` char(100) DEFAULT NULL, `Minimalebestelhoeveelheid` int(11) DEFAULT NULL, `Rubriekjuridisch` char(100) DEFAULT NULL, `Magazijnlocatienummer` char(20) CHARACTER SET ascii DEFAULT NULL, `Aangepastemagazijnlocatienummer` char(20) CHARACTER SET ascii DEFAULT NULL, `Hoogte` double DEFAULT NULL, `Breedte` double DEFAULT NULL, `Dikte` double DEFAULT NULL, `Gewicht` double DEFAULT NULL, `Actiesoortid` int(11) DEFAULT NULL, `Geenprijsupdatecb` smallint(6) DEFAULT NULL, `Historieovernemen` smallint(6) DEFAULT NULL, `Herdrukdatum` date DEFAULT NULL, `Nieuw` smallint(6) DEFAULT NULL, `Inpakken` smallint(6) DEFAULT NULL, `Porto` smallint(6) DEFAULT NULL, `Evenement` smallint(6) DEFAULT NULL, `Download` smallint(6) DEFAULT NULL, `Ideal` smallint(6) DEFAULT NULL, `Socialdrm` smallint(6) DEFAULT NULL, `Boeken_inprijsopgeheven` smallint(6) DEFAULT NULL, `Boeken_cvdm_gemaild` smallint(6) DEFAULT NULL, `Boeken_cvdm_datum` date DEFAULT NULL, `Boeken_cvdm_aantal` int(11) DEFAULT NULL, `Boeken_minimalevoorraad` int(11) DEFAULT NULL, `Boeken_nietmeerbestellen` smallint(6) DEFAULT NULL, `Boeken_afbouwen` smallint(6) DEFAULT NULL, `Boeken_geenporto` smallint(6) DEFAULT NULL, `Boeken_verborgenboek` smallint(6) DEFAULT NULL, `Boeken_projectcode` int(11) DEFAULT NULL, `Boeken_levertijd` int(11) DEFAULT NULL, PRIMARY KEY (`Ean`), UNIQUE KEY `i1` (`Ean`), KEY `i2` (`Uitgever`), KEY `i3` (`Auteur1`), KEY `i4` (`Auteur2`), KEY `i5` (`Auteur3`), KEY `i6` (`Jaaruitgifte`), KEY `i7` (`Aanbiedingsprijs`), KEY `i8` (`Boekstatus`), KEY `i9` (`Rubriek`), KEY `i10` (`Aanmaakdatum`), KEY `i11` (`Laatstgewijzigd`), KEY `i12` (`Isgewist`), KEY `i13` (`Extraaandacht`), KEY `i14` (`Random`), KEY `i15` (`Naamserie`), KEY `i16` (`Titelserie`), KEY `Titel` (`Titel`), KEY `Aanbiedingen` (`Aanbiedingvanaf`,`Aanbiedingtotenmet`), KEY `Rubriek` (`Rubriek`,`Boekstatus`), KEY `Bindwijze` (`Bindwijze`), KEY `Taalvermelding` (`Taalvermelding`), CONSTRAINT `Boeken_ibfk_1` FOREIGN KEY (`Bindwijze`) REFERENCES `Bindwijze` (`Bindwijze`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) MariaDB [(none)]> SHOW CREATE TABLE Managementboek_Boeken.`Bindwijze`\G; *************************** 1. row *************************** Table: Bindwijze Create Table: CREATE TABLE `Bindwijze` ( `Bindwijze` char(50) NOT NULL, `Btwcode` char(1) NOT NULL DEFAULT '4', `Artgroepid` int(11) NOT NULL, `Unspsc` char(50) DEFAULT NULL, `Productsoort` char(50) DEFAULT NULL, `Isgewist` int(11) DEFAULT NULL, `Bindwijze_boekstatus` int(11) DEFAULT NULL, `Porto` smallint(6) DEFAULT NULL, `Evenement` smallint(6) DEFAULT NULL, `Download` smallint(6) DEFAULT NULL, `Voorraadartikel` smallint(6) DEFAULT NULL, `Inpakken` smallint(6) DEFAULT NULL, `Ideal` smallint(6) DEFAULT NULL, `Socialdrm` smallint(6) DEFAULT NULL, `Bindwijze_unspsc` char(50) DEFAULT NULL, `Bindwijze_productsoort` char(50) DEFAULT NULL, `Bindwijze_porto` smallint(6) DEFAULT NULL, `Bindwijze_evenement` smallint(6) DEFAULT NULL, `Bindwijze_download` smallint(6) DEFAULT NULL, `Bindwijze_voorraadartikel` smallint(6) DEFAULT NULL, `Bindwijze_inpakken` smallint(6) DEFAULT NULL, `Bindwijze_ideal` smallint(6) DEFAULT NULL, `Bindwijze_socialdrm` smallint(6) DEFAULT NULL, `Bindwijze_url` char(50) DEFAULT NULL, `Bindwijze_producttype` char(100) DEFAULT NULL, `Bindwijze_lidwoord` char(20) DEFAULT NULL, `Bindwijze_enkelvoud` char(100) DEFAULT NULL, `Bindwijze_meervoud` char(100) DEFAULT NULL, `Bindwijze_grootboekrekening` int(11) DEFAULT NULL, `Bindwijze_vertaling` char(50) DEFAULT NULL, `Bindwijze_leesid` tinyint(1) NOT NULL DEFAULT '0', `Bindwijze_periodiek` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`Bindwijze`), KEY `NewIndex1` (`Productsoort`), KEY `Productsoort` (`Bindwijze_productsoort`), KEY `Producttype` (`Bindwijze_producttype`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 1 row in set (0.00 sec) MariaDB [(none)]> SHOW CREATE TABLE Managementboek_Klanten.BestellingAll\G *************************** 1. row *************************** Table: BestellingAll Create Table: CREATE TABLE `BestellingAll` ( `Bestellingid` int(11) NOT NULL AUTO_INCREMENT, `Klantid` int(11) DEFAULT NULL, `Siteid` int(11) DEFAULT '1005', `Opmerkingen` mediumblob, `Achternaam` varchar(200) CHARACTER SET utf8 DEFAULT NULL, `Bedrijfsnaam` varchar(200) CHARACTER SET utf8 DEFAULT NULL, `DT` datetime DEFAULT NULL, `Afleverid` int(11) DEFAULT NULL, `IP` varchar(15) DEFAULT NULL, `ProcessStatus` enum('nieuw','batch','email') NOT NULL DEFAULT 'nieuw', `BatchID` int(11) NOT NULL DEFAULT '0', `AffiliateId` int(11) DEFAULT '0', `ReferrerDomain` varchar(200) DEFAULT NULL, `IsClubOrder` tinyint(4) DEFAULT '0', `Betaalmethode` char(1) DEFAULT 'A', `Rekeningnummer` char(18) DEFAULT NULL, `Uwreferentie` varchar(30) DEFAULT NULL, `Afgerond` tinyint(4) NOT NULL, `Herinnering` tinyint(4) NOT NULL, `Hash` char(64) DEFAULT NULL, `MailedTracktrace` tinyint(4) NOT NULL DEFAULT '0', `SessionId` int(11) DEFAULT NULL, `EersteBestelling` tinyint(1) NOT NULL DEFAULT '0', `StemMailVerzonden` tinyint(4) NOT NULL DEFAULT '0', `DTStemMail` datetime DEFAULT NULL, `SamengevoegdMet` int(11) NOT NULL, `Factuurid` bigint(20) NOT NULL, `Gebruiker` char(2) NOT NULL, `OpmerkingNegeren` tinyint(4) DEFAULT '0', `AutoClassificatie` enum('nieuw','automatisch','handmatig') NOT NULL, `ClassificatieRedenKort` varchar(255) NOT NULL, `ClassificatieReden` varchar(255) NOT NULL, `Geexporteerd` tinyint(4) DEFAULT '0', `OrigineelBestellingId` int(11) NOT NULL, `ProspectId` int(11) NOT NULL, `GeenPortoBerekenen` tinyint(4) NOT NULL, `IdealOpen` tinyint(4) NOT NULL, `IdealTimeout` datetime NOT NULL, `BetalingsTermijn` int(11) NOT NULL DEFAULT '14', `Geannuleerd` tinyint(4) DEFAULT '0', `UitBackorder` tinyint(4) NOT NULL DEFAULT '0', `SiteBestelling` tinyint(4) NOT NULL DEFAULT '0', `DeelLevering` tinyint(4) NOT NULL DEFAULT '0', `DTFactuur` date DEFAULT NULL, `DTVerval` date DEFAULT NULL, `TeltAls` tinyint(4) NOT NULL DEFAULT '1', `IsOmzet` tinyint(4) NOT NULL DEFAULT '0', `IsCorrectie` tinyint(4) NOT NULL DEFAULT '0', `IsCredit` tinyint(4) NOT NULL DEFAULT '0', `IsOpnieuw` tinyint(4) NOT NULL DEFAULT '0', `ToonBestelling` tinyint(4) NOT NULL DEFAULT '1', `Herkomst` enum('Website','MARI','Admin','iOS','Android','NCOI','ABO','Comcol','Plaza','Serie','Mobile','Period','Jong','Events','Comm') NOT NULL DEFAULT 'Website', `VerstuurCompleteOrder` tinyint(4) NOT NULL DEFAULT '0', `ICBestelling` tinyint(4) NOT NULL DEFAULT '0', `KopKostenplaats` varchar(255) DEFAULT NULL, `KopKostenplaatsID` int(11) DEFAULT NULL, PRIMARY KEY (`Bestellingid`), KEY `Klantid` (`Klantid`), KEY `Afleverid` (`Afleverid`), KEY `ReferrerDomain` (`ReferrerDomain`), KEY `AffiliateId` (`AffiliateId`), KEY `BatchID` (`BatchID`,`Afgerond`), KEY `DT_Index` (`DT`,`Afgerond`,`BatchID`), KEY `NewIndex1` (`SessionId`), KEY `NewIndex3` (`OrigineelBestellingId`), KEY `NewIndex4` (`Herkomst`), KEY `NewIndex5` (`Afgerond`,`DT`), KEY `IP` (`IP`(11)), KEY `AutoClassificatie` (`AutoClassificatie`,`Geexporteerd`,`Bestellingid`), KEY `IdealOpen` (`IdealOpen`), KEY `OrigineelBestellingId` (`OrigineelBestellingId`), KEY `ProspectId` (`ProspectId`), KEY `ProcessStatus` (`Afgerond`,`ProcessStatus`,`Geexporteerd`,`DT`), KEY `FactuurID` (`Factuurid`), KEY `Uwreferentie` (`Uwreferentie`) ) ENGINE=InnoDB AUTO_INCREMENT=12919948 DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC