making uploads safe

This commit is contained in:
Felix 2019-08-12 11:54:13 +01:00
parent 405a037a15
commit a7db1c528b
2 changed files with 7 additions and 2 deletions

View file

@ -31,7 +31,8 @@ Future<LoginModel> submitReceiptAPI(
'transaction_type' : "3",
'transaction_value': receipt.amount,
'purchase_time': receipt.time,
'category': receipt.category,
// 'category': receipt.category,
// 'category': receipt.category,
'essential': receipt.essential,
'organisation_name': receipt.organisationName,
'recurring': receipt.recurring,

View file

@ -59,11 +59,15 @@ class ReceiptPage2State extends State<ReceiptPage2> {
receipt.postcode = transaction.organisation.postcode;
receipt.town = transaction.organisation.town;
receipt.recurring = transaction.recurring;
if (transaction.recurring == "None") {
receipt.recurring = "";
}
receipt.category = transaction.category;
receipt.amount = transaction.amount.text.toString();
receipt.time = DateFormat("yyyy-MM-dd'T'hh:mm':00.000+01:00'").format(transaction.date).toString();
receipt.essential = transaction.isEssential.toString();
// receipt.time = dt.format(transaction.date);
submitReceiptAPI(context, receipt);
}