>>>>CREATE TABLE `pihdr` ( >>>> `refno` char(8) DEFAULT '', >>>> `date` date NOT NULL, >>>> `supplierid` char(5) DEFAULT '', >>>> `suprefno` char(15) DEFAULT '', >>>> `terms` tinyint DEFAULT '0', >>>> `isvat` tinyint DEFAULT '0', >>>> `vatrate` decimal(6,2) DEFAULT '0.00', >>>> `isewtax` tinyint DEFAULT '0', >>>> `ewtaxid` char(5) DEFAULT '', >>>> `ewtaxrate` decimal(6,2) DEFAULT '0.00', >>>> `dtlcnt` decimal(3,0) DEFAULT '0', >>>> `totqty` decimal(12,2) DEFAULT '0.00', >>>> `amtgross` decimal(15,2) DEFAULT '0.00', >>>> `amtvat` decimal(12,2) DEFAULT '0.00', >>>> `amtpurch` decimal(15,2) DEFAULT '0.00', >>>> `amtewtax` decimal(12,2) DEFAULT '0.00', >>>> `amtpayable` decimal(15,2) DEFAULT '0.00', >>>> `jrnlcnt` decimal(3,0) DEFAULT '0', >>>> `amtdebit` decimal(15,2) DEFAULT '0.00', >>>> `amtcredit` decimal(15,2) DEFAULT '0.00', >>>> `istemplate` tinyint DEFAULT '0', >>>> `jthdrid` char(32) DEFAULT '', >>>> `notes` text, >>>> `posted` tinyint DEFAULT '0', >>>> `cancelled` tinyint DEFAULT '0', >>>> `printctr` tinyint DEFAULT '0', >>>> `uidcreate` char(20) DEFAULT '', >>>> `uidedit` char(20) DEFAULT '', >>>> `uidprint` char(20) DEFAULT '', >>>> `uidpost` char(20) DEFAULT '', >>>> `id` char(32) NOT NULL DEFAULT '', >>>> PRIMARY KEY (`id`), >>>> UNIQUE KEY `REFNO` (`refno`), >>>> KEY `SUPPLIERID` (`supplierid`), >>>> KEY `EWTAXID` (`ewtaxid`), >>>> KEY `JTHDRID` (`jthdrid`) >>>>) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3; >>>>>>>>