diff --git a/lib/common/apifunctions/submit_receipt_api.dart b/lib/common/apifunctions/submit_receipt_api.dart index 9dbb338..9093cbc 100644 --- a/lib/common/apifunctions/submit_receipt_api.dart +++ b/lib/common/apifunctions/submit_receipt_api.dart @@ -31,7 +31,8 @@ Future 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, diff --git a/lib/pages/receipt_page_2.dart b/lib/pages/receipt_page_2.dart index f23be12..67de152 100644 --- a/lib/pages/receipt_page_2.dart +++ b/lib/pages/receipt_page_2.dart @@ -59,11 +59,15 @@ class ReceiptPage2State extends State { 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); }