From e75cc907f942fcfd4154845bd275b03c3787af8d Mon Sep 17 00:00:00 2001 From: Finn Date: Thu, 15 Mar 2018 13:06:50 +0000 Subject: [PATCH] amended transactionlist code --- lib/Pear/LocalLoop/Controller/Api/Transactions.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Pear/LocalLoop/Controller/Api/Transactions.pm b/lib/Pear/LocalLoop/Controller/Api/Transactions.pm index 8f4f2d0..a2458d6 100644 --- a/lib/Pear/LocalLoop/Controller/Api/Transactions.pm +++ b/lib/Pear/LocalLoop/Controller/Api/Transactions.pm @@ -42,16 +42,16 @@ sub post_transaction_list_purchases { purchase_time => $c->format_iso_datetime($_->purchase_time), }} $transactions->all ); - + my @recurring_transaction_list = ( map {{ id => $_->id, seller => $_->seller->name, value => $_->value / 100000, start_time => $c->format_iso_datetime($_->start_time), - last_updated => $c->format_iso_datetime($_->last_updated), + last_updated => $c->format_iso_datetime($_->last_updated) || undef, essential => $_->essential, - category => ( defined $_->category ? $_->category->name : 'Uncategorised' ), + category => $_->category_id, recurring_period => $_->recurring_period, }} $recurring_transactions->all );