From 1a9044df4f23f616c54523cae00ef4d82b6ff7ff Mon Sep 17 00:00:00 2001 From: Juerd Waalboer Date: Tue, 5 Nov 2019 03:26:47 +0100 Subject: [PATCH] repeat: prettier placeholder --- plugins/repeat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/repeat b/plugins/repeat index 7bd4633..5ff2383 100644 --- a/plugins/repeat +++ b/plugins/repeat @@ -45,7 +45,9 @@ sub command { $pre = abs $pre; # withdrawal is negative return REJECT, $err_limit if $pre > $limit; - $cart->add(0, "Next product repeated $pre times", { _repeat => abs $pre }); + $cart + ->add(0, "? (The next thing you add will be multiplied.)", { _repeat => 1 }) + ->quantity($pre); return ACCEPT; } @@ -76,7 +78,7 @@ sub hook_added_entry { return if not @planned; return ABORT, $err_pfand if $cart->entries('is_pfand'); - my $num = $planned[0]->attribute('_repeat'); + my $num = $planned[0]->quantity; $cart->delete($planned[0]); $entries[-1]->quantity($num);