refs #1753 Fixed: Incorrect next number for a new document in the module
This commit is contained in:
parent
703dcd0170
commit
c50c8acd75
@ -550,7 +550,17 @@ abstract class DocumentForm extends Base
|
|||||||
return $document->document_number;
|
return $document->document_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$next = $type;
|
||||||
|
|
||||||
|
if ($alias = config('type.' . $type . '.alias')) {
|
||||||
|
$next = $alias . '.' . $type;
|
||||||
|
}
|
||||||
|
|
||||||
|
$document_number = $this->getNextDocumentNumber($next);
|
||||||
|
|
||||||
|
if (empty($document_number)) {
|
||||||
$document_number = $this->getNextDocumentNumber($type);
|
$document_number = $this->getNextDocumentNumber($type);
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($document_number)) {
|
if (empty($document_number)) {
|
||||||
$document_number = $this->getNextDocumentNumber(Document::INVOICE_TYPE);
|
$document_number = $this->getNextDocumentNumber(Document::INVOICE_TYPE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user