Commit 063b1575 by taufikyu

perbaiki model

1 parent 8738d397
......@@ -134,6 +134,8 @@ class BJBQRIS(KodeModel, Base):
expdate = datetime_from_str(values['expired_date'])
if expdate > datetime.combine(date.today(),time(20,59,59)):
expdate = ymdhms(datetime.combine(date.today(),time(20,59,59)))
else:
expdate = values['expired_date']
data = dict(
client_type = values['client_type'],
invoice_no = str(values['invoice_no']),
......@@ -142,7 +144,7 @@ class BJBQRIS(KodeModel, Base):
customer_name = str(values['customer_name']),
customer_email = str(values['customer_email']),
customer_phone = str(values['customer_phone']),
expired_date = str(values['expired_date']),
expired_date = str(expdate),
amount = str(values['amount'])
)
......
......@@ -121,6 +121,8 @@ class BJBVA(KodeModel, Base):
expdate = datetime_from_str(values['expired_date'])
if expdate > datetime.combine(date.today(),time(20,59,59)):
expdate = ymdhms(datetime.combine(date.today(),time(20,59,59)))
else:
expdate = values['expired_date']
data = dict(
client_type = values['client_type'],
invoice_no = values['invoice_no'],
......@@ -129,7 +131,7 @@ class BJBVA(KodeModel, Base):
customer_name = values['customer_name'],
customer_email = values['customer_email'],
customer_phone = values['customer_phone'],
expired_date = values['expired_date'],
expired_date = expdate,
amount = str(values['amount'])
)
......@@ -155,12 +157,14 @@ class BJBVA(KodeModel, Base):
expdate = datetime_from_str(values['expired_date'])
if expdate > datetime.combine(date.today(),time(20,59,59)):
expdate = ymdhms(datetime.combine(date.today(),time(20,59,59)))
else:
expdate = values['expired_date']
data = dict(
va_number = values['va_number'],
invoice_no = values['invoice_no'],
product_code = values['product_code'],
amount = str(values['amount']),
expired_date = str(values['expired_date']),
expired_date = str(expdate),
customer_name = str(values['customer_name']),
customer_email = str(values['customer_email']),
customer_phone = str(values['customer_phone']),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!