Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -137,13 +137,13 @@ def hook():
|
|
137 |
trans_type = parsed_trans_data[0]['transaction_type'].lower()
|
138 |
if intent == 'create':
|
139 |
if trans_type == 'purchase':
|
140 |
-
if create_inventory(
|
141 |
firestore_msg = "Transaction recorded successfully!"
|
142 |
else:
|
143 |
firestore_msg = "Sorry, could not record transaction!"
|
144 |
|
145 |
elif trans_type == 'sale':
|
146 |
-
if create_sale(
|
147 |
firestore_msg = "Transaction recorded successfully!"
|
148 |
else:
|
149 |
firestore_msg = "Sorry, could not record transaction!"
|
|
|
137 |
trans_type = parsed_trans_data[0]['transaction_type'].lower()
|
138 |
if intent == 'create':
|
139 |
if trans_type == 'purchase':
|
140 |
+
if create_inventory(mobile, parsed_trans_data):
|
141 |
firestore_msg = "Transaction recorded successfully!"
|
142 |
else:
|
143 |
firestore_msg = "Sorry, could not record transaction!"
|
144 |
|
145 |
elif trans_type == 'sale':
|
146 |
+
if create_sale(mobile, parsed_trans_data):
|
147 |
firestore_msg = "Transaction recorded successfully!"
|
148 |
else:
|
149 |
firestore_msg = "Sorry, could not record transaction!"
|