Added support for saving receipts.

This commit is contained in:
2016-05-29 18:31:46 +02:00
parent 9707ec7c66
commit facaf98cf0
14 changed files with 128 additions and 32 deletions
+6 -20
View File
@@ -20,7 +20,12 @@
\"price\" INTEGER NOT NULL,
\"refId\" INTEGER NOT NULL,
\"itemPlugin\" TEXT NULL,
\"vatType\" INTEGER NOT NULL);
\"vatType\" INTEGER NOT NULL,
\"voucher\" INTEGER NOT NULL,
CONSTRAINT \"voucher_fk\"
FOREIGN KEY (\"voucher\")
REFERENCES \"Voucher\" (\"id\")
DEFERRABLE INITIALLY DEFERRED);
CREATE TABLE \"Voucher\" (
\"id\" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
@@ -44,25 +49,6 @@ CREATE TABLE \"Voucher\" (
FOREIGN KEY (\"contact\")
REFERENCES \"AddressbookData\" (\"id\")
DEFERRABLE INITIALLY DEFERRED);
CREATE TABLE \"Voucher_items\" (
\"object_id\" INTEGER NOT NULL,
\"index\" INTEGER NOT NULL,
\"value\" INTEGER NULL,
CONSTRAINT \"object_id_fk\"
FOREIGN KEY (\"object_id\")
REFERENCES \"Voucher\" (\"id\")
ON DELETE CASCADE,
CONSTRAINT \"value_fk\"
FOREIGN KEY (\"value\")
REFERENCES \"VoucherItem\" (\"id\")
DEFERRABLE INITIALLY DEFERRED);
CREATE INDEX \"Voucher_items_object_id_i\"
ON \"Voucher_items\" (\"object_id\");
CREATE INDEX \"Voucher_items_index_i\"
ON \"Voucher_items\" (\"index\");
"
],
"dependencies" : [ "ADDRESSBOOK" ]