Cannot create create-test-data

ErrorException

Attempt to read property “precision” on null

at app/Helpers/Invoice/InvoiceSum.php:65
61▕ {
62▕ $this->invoice = $invoice;
63▕
64▕ if ($this->invoice->client) {
➜ 65▕ $this->precision = $this->invoice->client->currency()->precision;
66▕ } else {
67▕ $this->precision = $this->invoice->vendor->currency()->precision;
68▕ }
69▕

1 app/Helpers/Invoice/InvoiceSum.php:65
Illuminate\Foundation\Bootstrap\HandleExceptions::Illuminate\Foundation\Bootstrap{closure}()

2 app/Console/Commands/CreateTestData.php:527
App\Helpers\Invoice\InvoiceSum::__construct()

Hi,

I see the same issue mentioned in a discussion on GitHub but it doesn’t have an answer yet.

it’s work for me after I clear cache

1 Like

Glad to hear it, thanks for sharing the solution!