Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Sep 26, 2024
1 parent 6cb8ebf commit b4f8fff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bazar.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions src/Fields/Items.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}),
];
}
}

0 comments on commit b4f8fff

Please sign in to comment.