added checks and finalize ticket
This commit is contained in:
@@ -36,6 +36,7 @@ class Delivery_Delivery(db.Model):
|
||||
# issue = 5
|
||||
# finalized = 10
|
||||
delivery_status = db.Column(db.INTEGER)
|
||||
emergency = db.Column(db.INTEGER)
|
||||
# when the call to order took place
|
||||
when_ordered = db.Column(db.DATE(), default=datetime.utcnow())
|
||||
# when the delivery date happened
|
||||
@@ -58,6 +59,8 @@ class Delivery_Delivery(db.Model):
|
||||
# cash = 0
|
||||
# credit = 1
|
||||
# credit/cash = 2
|
||||
# check = 3
|
||||
# other = 4
|
||||
payment_type = db.Column(db.INTEGER)
|
||||
payment_card_id = db.Column(db.INTEGER)
|
||||
cash_recieved = db.Column(db.DECIMAL(50, 2))
|
||||
@@ -69,6 +72,7 @@ class Delivery_Delivery(db.Model):
|
||||
pre_charge_amount = db.Column(db.DECIMAL(50, 2))
|
||||
total_price = db.Column(db.DECIMAL(50, 2))
|
||||
final_price = db.Column(db.DECIMAL(50, 2))
|
||||
check_number = db.Column(db.VARCHAR(20))
|
||||
|
||||
class Delivery_Delivery_schema(ma.SQLAlchemyAutoSchema):
|
||||
class Meta:
|
||||
|
||||
21
app/classes/stats_company.py
Normal file
21
app/classes/stats_company.py
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
from app import db, ma
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class Stats_Company(db.Model):
|
||||
__tablename__ = 'stats_company'
|
||||
__bind_key__ = 'eamco'
|
||||
__table_args__ = {"schema": "public"}
|
||||
|
||||
id = db.Column(db.Integer,
|
||||
primary_key=True,
|
||||
autoincrement=True,
|
||||
unique=False)
|
||||
|
||||
total_calls = db.Column(db.BigInteger)
|
||||
|
||||
|
||||
class Stats_Company_schema(ma.SQLAlchemyAutoSchema):
|
||||
class Meta:
|
||||
model = Stats_Company
|
||||
@@ -27,3 +27,6 @@ class Stats_Customer(db.Model):
|
||||
class Stats_Customer_schema(ma.SQLAlchemyAutoSchema):
|
||||
class Meta:
|
||||
model = Stats_Customer
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user