fixed split transaction duplicate issue

This commit is contained in:
Cihan Şentürk 2024-07-18 12:44:26 +03:00 committed by GitHub
parent 1ee31eb12b
commit 86d52b52d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -571,7 +571,10 @@ class Transaction extends Model
} catch (\Exception $e) {}
try {
if (empty($this->document_id) && $this->isNotTransferTransaction()) {
if (empty($this->document_id)
&& $this->isNotTransferTransaction()
&& $this->isNotSplitTransaction()
) {
$actions[] = [
'title' => trans('general.duplicate'),
'icon' => 'file_copy',

View File

@ -44,7 +44,7 @@ class TransactionNumber implements TransactionNumberInterface
}
if (Str::endsWith($type, '-split')) {
$number_exists = $number_exists->isSplitTransaction();
$number_exists = $number_exists->isSplit();
}
$number_exists = $number_exists->where('number', $number);