making uploads safe
This commit is contained in:
parent
405a037a15
commit
a7db1c528b
2 changed files with 7 additions and 2 deletions
|
@ -31,7 +31,8 @@ Future<LoginModel> submitReceiptAPI(
|
||||||
'transaction_type' : "3",
|
'transaction_type' : "3",
|
||||||
'transaction_value': receipt.amount,
|
'transaction_value': receipt.amount,
|
||||||
'purchase_time': receipt.time,
|
'purchase_time': receipt.time,
|
||||||
'category': receipt.category,
|
// 'category': receipt.category,
|
||||||
|
// 'category': receipt.category,
|
||||||
'essential': receipt.essential,
|
'essential': receipt.essential,
|
||||||
'organisation_name': receipt.organisationName,
|
'organisation_name': receipt.organisationName,
|
||||||
'recurring': receipt.recurring,
|
'recurring': receipt.recurring,
|
||||||
|
|
|
@ -59,11 +59,15 @@ class ReceiptPage2State extends State<ReceiptPage2> {
|
||||||
receipt.postcode = transaction.organisation.postcode;
|
receipt.postcode = transaction.organisation.postcode;
|
||||||
receipt.town = transaction.organisation.town;
|
receipt.town = transaction.organisation.town;
|
||||||
receipt.recurring = transaction.recurring;
|
receipt.recurring = transaction.recurring;
|
||||||
|
|
||||||
|
if (transaction.recurring == "None") {
|
||||||
|
receipt.recurring = "";
|
||||||
|
}
|
||||||
|
|
||||||
receipt.category = transaction.category;
|
receipt.category = transaction.category;
|
||||||
receipt.amount = transaction.amount.text.toString();
|
receipt.amount = transaction.amount.text.toString();
|
||||||
receipt.time = DateFormat("yyyy-MM-dd'T'hh:mm':00.000+01:00'").format(transaction.date).toString();
|
receipt.time = DateFormat("yyyy-MM-dd'T'hh:mm':00.000+01:00'").format(transaction.date).toString();
|
||||||
receipt.essential = transaction.isEssential.toString();
|
receipt.essential = transaction.isEssential.toString();
|
||||||
// receipt.time = dt.format(transaction.date);
|
|
||||||
|
|
||||||
submitReceiptAPI(context, receipt);
|
submitReceiptAPI(context, receipt);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue