formatting
This commit is contained in:
parent
678bc84603
commit
d2109f4fce
@ -267,7 +267,6 @@ abstract class Form extends Component
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
protected DocumentNumber $documentNumberUtility,
|
|
||||||
string $type, $model = false, $document = false, $currencies = false, $currency = false, $currency_code = false,
|
string $type, $model = false, $document = false, $currencies = false, $currency = false, $currency_code = false,
|
||||||
string $formId = 'document', $formRoute = '', $formMethod = '',
|
string $formId = 'document', $formRoute = '', $formMethod = '',
|
||||||
bool $hideCompany = false, string $textSectionCompaniesTitle = '', string $textSectionCompaniesDescription = '',
|
bool $hideCompany = false, string $textSectionCompaniesTitle = '', string $textSectionCompaniesDescription = '',
|
||||||
@ -817,12 +816,14 @@ abstract class Form extends Component
|
|||||||
return $document->document_number;
|
return $document->document_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
$contact = ($this->contact instanceof \stdClass) ? null : $this->contact;
|
$contact = ($this->contact instanceof Contact) ? $this->contact : null;
|
||||||
|
|
||||||
$document_number = $this->documentNumberUtility->getNextNumber($type, $contact);
|
$utility = app(DocumentNumber::class);
|
||||||
|
|
||||||
|
$document_number = $utility->getNextNumber($type, $contact);
|
||||||
|
|
||||||
if (empty($document_number)) {
|
if (empty($document_number)) {
|
||||||
$document_number = $this->documentNumberUtility->getNextNumber(Document::INVOICE_TYPE, $contact);
|
$document_number = $utility->getNextNumber(Document::INVOICE_TYPE, $contact);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $document_number;
|
return $document_number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user