Skip to content

Commit e77e6ca

Browse files
committed
pass through max_amount value rather than hardcode
1 parent ad9d24c commit e77e6ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Http/Controllers/Consumables/ConsumableCheckoutController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function store(Request $request, $consumableId)
7979
// attaching large amounts of checkouts can exhaust memory.
8080
if($quantity > 10000){
8181
return redirect()->back()
82-
->with('error', trans('admin/consumables/message.checkout.large_quantity_error', ['requested' => $quantity, 'remaining' => $consumable->numRemaining() ]));
82+
->with('error', trans('admin/consumables/message.checkout.large_quantity_error', ['max_amount' => 10000]));
8383
}
8484

8585
// Make sure there is at least one available to checkout

resources/lang/en-US/admin/consumables/message.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
'user_does_not_exist' => 'That user is invalid. Please try again.',
2929
'unavailable' => 'There are not enough consumables for this checkout. Please check the quantity left. ',
3030
'checkout_error' => 'Something went wrong with your Checkout',
31-
'large_quantity_error' => '10,000 is the max quantity per checkout.',
31+
'large_quantity_error' => ':max_amount is the max quantity per checkout.',
3232
),
3333

3434
'checkin' => array(

0 commit comments

Comments
 (0)