vendorId) { $this->data['vendor_id'] = $this->vendorId; if ($currencyCode = Vendor::find($this->vendorId)?->currency_code) { $this->data['currency_code'] = $currencyCode; } } } public function getMaxContentWidth(): MaxWidth | string | null { return MaxWidth::Full; } protected function handleRecordCreation(array $data): Model { /** @var Bill $record */ $record = parent::handleRecordCreation($data); $this->handleLineItems($record, collect($data['lineItems'] ?? [])); $totals = $this->updateDocumentTotals($record, $data); $record->updateQuietly($totals); if (! $record->initialTransaction) { $record->createInitialTransaction(); } return $record; } }