diff --git a/src/Bazar.php b/src/Bazar.php index 2a05bf7c..954c3472 100644 --- a/src/Bazar.php +++ b/src/Bazar.php @@ -12,7 +12,7 @@ abstract class Bazar * * @var string */ - public const VERSION = '1.1.0'; + public const VERSION = '1.1.1'; /** * The currency in use. diff --git a/src/Fields/Items.php b/src/Fields/Items.php index b0ba853c..807ab3c5 100644 --- a/src/Fields/Items.php +++ b/src/Fields/Items.php @@ -76,6 +76,12 @@ public function fields(Request $request): array ->default(1) ->rules(['required', 'numeric', 'gt:0']) ->min(0), + + Number::make(__('Total'), function (Request $request, Model $model): float { + return $model->getTotal(); + })->format(static function (Request $request, Model $model, float $value): string { + return (new Currency($value, $model->checkoutable->currency))->format(); + }), ]; } }