Merge pull request #2146 from cuneytsenturk/master

Added Revenue/Payment show page [#mdbaet]
This commit is contained in:
Cüneyt Şentürk
2021-06-27 13:06:52 +03:00
committed by GitHub
53 changed files with 3732 additions and 152 deletions

View File

@ -371,11 +371,11 @@ class Transaction extends Model
}
if ($this->isIncome()) {
return !empty($this->document_id) ? 'invoices.show' : 'revenues.edit';
return !empty($this->document_id) ? 'invoices.show' : 'revenues.show';
}
if ($this->isExpense()) {
return !empty($this->document_id) ? 'bills.show' : 'payments.edit';
return !empty($this->document_id) ? 'bills.show' : 'payments.show';
}
return 'transactions.index';
@ -391,6 +391,11 @@ class Transaction extends Model
return !empty($value) ? $value : (!empty($this->document_id) ? $this->document_id : $this->id);
}
public function getTemplatePathAttribute($value = null)
{
return $value ?: 'sales.revenues.print_default';
}
/**
* Create a new factory instance for the model.
*