fixed tax

This commit is contained in:
Edward Yang 2022-08-24 17:19:21 +08:00
parent aecc9a547a
commit 5f9fae29b4
1 changed files with 6 additions and 1 deletions

View File

@ -17,8 +17,13 @@ use Beike\Shop\Services\TotalService;
class TaxService
{
public static function getTotal(TotalService $totalService)
public static function getTotal(TotalService $totalService): ?array
{
$taxEnabled = system_setting('base.tax', false);
if (!$taxEnabled) {
return null;
}
$taxes = $totalService->taxes;
$totalItems = [];