decouple document number generation
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\Models\Document;
|
||||
|
||||
use App\Abstracts\Model;
|
||||
use App\Interfaces\Service\DocumentNumberService;
|
||||
use App\Models\Common\Media as MediaModel;
|
||||
use App\Models\Setting\Tax;
|
||||
use App\Scopes\Document as Scope;
|
||||
@ -251,7 +252,7 @@ class Document extends Model
|
||||
}
|
||||
|
||||
$this->status = 'draft';
|
||||
$this->document_number = $this->getNextDocumentNumber($type);
|
||||
$this->document_number = app(DocumentNumberService::class)->getNextDocumentNumber($type, $src->contact);
|
||||
}
|
||||
|
||||
public function getSentAtAttribute(string $value = null)
|
||||
|
Reference in New Issue
Block a user