Andrew Wallo před 6 měsíci
rodič
revize
68661b6e2b
1 změnil soubory, kde provedl 1 přidání a 3 odebrání
  1. 1
    3
      app/Casts/DocumentMoneyCast.php

+ 1
- 3
app/Casts/DocumentMoneyCast.php Zobrazit soubor

@@ -33,14 +33,12 @@ class DocumentMoneyCast implements CastsAttributes
33 33
      */
34 34
     public function set(Model $model, string $key, mixed $value, array $attributes): mixed
35 35
     {
36
-        $currency_code = $attributes['currency_code'] ?? CurrencyAccessor::getDefaultCurrency();
37
-
38 36
         if (is_numeric($value)) {
39 37
             $value = (string) $value;
40 38
         } elseif (! is_string($value)) {
41 39
             throw new UnexpectedValueException('Expected string or numeric value for money cast');
42 40
         }
43 41
 
44
-        return CurrencyConverter::prepareForAccessor($value, $currency_code);
42
+        return CurrencyConverter::prepareForAccessor($value, 'USD');
45 43
     }
46 44
 }

Načítá se…
Zrušit
Uložit