From 63f81e371179d314becd1d38ee633582fbf24bbe Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Tue, 5 Nov 2019 01:32:42 +0100 Subject: [PATCH] Change logging of quantity: replace EUR field --- lib/RevBank/Cart/Entry.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/RevBank/Cart/Entry.pm b/lib/RevBank/Cart/Entry.pm index 258496e..6afa8a7 100644 --- a/lib/RevBank/Cart/Entry.pm +++ b/lib/RevBank/Cart/Entry.pm @@ -125,12 +125,13 @@ sub as_loggable { my $description = $quantity == 1 ? $_->{description} - : sprintf("[%sx %.2f] %s", $quantity, abs($_->{amount}), $_->{description}); + : sprintf("%s [%sx %.2f]", $_->{description}, $quantity, abs($_->{amount})); push @s, sprintf( - "%-12s %4s EUR %5.2f # %s", + "%-12s %4s %3d %5.2f %s", $_->{user}, ($total > 0 ? 'GAIN' : $total < 0 ? 'LOSE' : ''), + $quantity, abs($total), $description );