amended transactionlist code

This commit is contained in:
Finn 2018-03-15 13:06:50 +00:00
parent 551a40a9a0
commit 60438ea51c

View file

@ -42,16 +42,16 @@ sub post_transaction_list_purchases {
purchase_time => $c->format_iso_datetime($_->purchase_time), purchase_time => $c->format_iso_datetime($_->purchase_time),
}} $transactions->all }} $transactions->all
); );
my @recurring_transaction_list = ( my @recurring_transaction_list = (
map {{ map {{
id => $_->id, id => $_->id,
seller => $_->seller->name, seller => $_->seller->name,
value => $_->value / 100000, value => $_->value / 100000,
start_time => $c->format_iso_datetime($_->start_time), 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, essential => $_->essential,
category => ( defined $_->category ? $_->category->name : 'Uncategorised' ), category => $_->category_id,
recurring_period => $_->recurring_period, recurring_period => $_->recurring_period,
}} $recurring_transactions->all }} $recurring_transactions->all
); );