Fixed errors

This commit is contained in:
2024-04-04 16:37:57 -04:00
parent 6fab39bf86
commit 2a4804ecb2
8 changed files with 103 additions and 65 deletions

View File

@@ -36,9 +36,9 @@ class Delivery_Delivery(db.Model):
# finalized = 10
delivery_status = db.Column(db.INTEGER)
# when the call to order took place
when_ordered = db.Column(db.TIMESTAMP(), default=datetime.utcnow())
when_ordered = db.Column(db.DATE(), default=datetime.utcnow())
# when the delivery date happened
when_delivered = db.Column(db.TIMESTAMP(), default=None)
when_delivered = db.Column(db.DATE(), default=None)
# when the delivery is expected ie what day
expected_delivery_date = db.Column(db.DATE(), default=None)
# automatic delivery

25
app/classes/printing.py Normal file
View File

@@ -0,0 +1,25 @@
from app import db, ma, login_manager
from datetime import datetime
class Printer_jobs(db.Model):
__tablename__ = "printer_jobs"
id = db.Column(db.Integer,
primary_key=True,
autoincrement=True,
unique=False)
delivery_id = db.Column(db.Integer)
date_added = db.Column(db.Date(), default=datetime.utcnow())
date_completed = db.Column(db.Date(), default=datetime.utcnow())
employee_id = db.Column(db.Integer)
#0 = waiting
#1 = printing
#2 = printed
#3 = error
status = db.Column(db.Integer)