INSERT INTO systemsettings (type, value, description, active, created, createdById, updated, updatedById)
VALUES ('allow_billing_type_on_po', '0', 'Allow to choose billing type on creating PO', '1', UTC_TIMESTAMP, '10', UTC_TIMESTAMP, '10');

ALTER TABLE `purchaseorder` ADD COLUMN `billingType` varchar(10) NOT NULL DEFAULT '' AFTER `totalPaid`;
ALTER TABLE `purchaseorder` ADD COLUMN `depositInvoiceNo` varchar(30) NOT NULL DEFAULT '' AFTER `billingType`;
ALTER TABLE `purchaseorder` ADD COLUMN `depositInvoiceDate` date DEFAULT '0001-01-01' AFTER `depositInvoiceNo`;
ALTER TABLE `purchaseorder` ADD COLUMN `syncedWithXero` tinyint(1) NOT NULL DEFAULT 0 AFTER `depositInvoiceDate`;
CREATE INDEX `billingType` ON `purchaseorder`(`billingType`) USING BTREE;
CREATE INDEX `depositInvoiceNo` ON `purchaseorder`(`depositInvoiceNo`) USING BTREE;
CREATE INDEX `depositInvoiceDate` ON `purchaseorder`(`depositInvoiceDate`) USING BTREE;
CREATE INDEX `syncedWithXero` ON `purchaseorder`(`syncedWithXero`) USING BTREE;
