43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
create table Invoice
|
|
(
|
|
OrderID TEXT not null,
|
|
InvoiceNumber TEXT not null,
|
|
DateCreated TEXT not null,
|
|
ProductionCharges REAL not null,
|
|
ShippingCharges REAL not null,
|
|
AdjustmentsBalance REAL not null,
|
|
DuePayment REAL not null,
|
|
ChargeCode TEXT,
|
|
UserLogon TEXT not null,
|
|
UserProfileFirstName TEXT not null,
|
|
UserProfileLastName TEXT not null,
|
|
InvoiceEmailAddress TEXT not null,
|
|
ShippingCompany TEXT,
|
|
ShippingFirstName TEXT not null,
|
|
ShippingLastName TEXT not null,
|
|
ShippingAddress1 TEXT not null,
|
|
ShippingAddress2 TEXT,
|
|
ShippingCity TEXT not null,
|
|
ShippingState TEXT not null,
|
|
ShippingPostalCode TEXT not null,
|
|
InvoiceID INTEGER
|
|
constraint Invoice_pk
|
|
primary key autoincrement,
|
|
InvoiceSent boolean default false
|
|
);
|
|
|
|
create table ItemDetail
|
|
(
|
|
OrderID TEXT not null,
|
|
DocumentID TEXT not null,
|
|
GLIJobNumber TEXT not null,
|
|
ProductName TEXT not null,
|
|
Quantity INT not null,
|
|
ItemPrice REAL not null
|
|
);
|
|
|
|
create table SentInvoices
|
|
(
|
|
InvoiceID INT not null,
|
|
SentDate DATE not null
|
|
); |