diff --git a/app/Notifications/Sale/Invoice.php b/app/Notifications/Sale/Invoice.php index 2f6fd0777..ea9e60206 100644 --- a/app/Notifications/Sale/Invoice.php +++ b/app/Notifications/Sale/Invoice.php @@ -90,7 +90,7 @@ class Invoice extends Notification public function getTagsReplacement() { return [ - $this->invoice->invoice_number, + $this->invoice->document_number, money($this->invoice->amount, $this->invoice->currency_code, true), company_date($this->invoice->due_at), URL::signedRoute('signed.invoices.show', [$this->invoice->id, 'company_id' => $this->invoice->company_id]), diff --git a/app/Widgets/TotalExpenses.php b/app/Widgets/TotalExpenses.php index 0c90ab6e6..345cde9c7 100644 --- a/app/Widgets/TotalExpenses.php +++ b/app/Widgets/TotalExpenses.php @@ -18,7 +18,7 @@ class TotalExpenses extends Widget { $current = $open = $overdue = 0; - $this->applyFilters(Transaction::expense()->isNotTransfer())->each(function ($transaction) use (&$current) { + $this->applyFilters(Transaction::expense()->isNotDocument()->isNotTransfer())->each(function ($transaction) use (&$current) { $current += $transaction->getAmountConvertedToDefault(); }); diff --git a/app/Widgets/TotalIncome.php b/app/Widgets/TotalIncome.php index 0d41eb06d..38d8007a9 100644 --- a/app/Widgets/TotalIncome.php +++ b/app/Widgets/TotalIncome.php @@ -18,7 +18,7 @@ class TotalIncome extends Widget { $current = $open = $overdue = 0; - $this->applyFilters(Transaction::income()->isNotTransfer())->each(function ($transaction) use (&$current) { + $this->applyFilters(Transaction::income()->isNotDocument()->isNotTransfer())->each(function ($transaction) use (&$current) { $current += $transaction->getAmountConvertedToDefault(); }); diff --git a/app/Widgets/TotalProfit.php b/app/Widgets/TotalProfit.php index 5aa30ca94..8aa6e6256 100644 --- a/app/Widgets/TotalProfit.php +++ b/app/Widgets/TotalProfit.php @@ -19,7 +19,7 @@ class TotalProfit extends Widget $current_income = $open_invoice = $overdue_invoice = 0; $current_expenses = $open_bill = $overdue_bill = 0; - $this->applyFilters(Transaction::isNotTransfer())->each(function ($transaction) use (&$current_income, &$current_expenses) { + $this->applyFilters(Transaction::isNotDocument()->isNotTransfer())->each(function ($transaction) use (&$current_income, &$current_expenses) { $amount = $transaction->getAmountConvertedToDefault(); if ($transaction->type == 'income') {