diff --git a/app/Models/Credit.php b/app/Models/Credit.php index 5dd699799426..e4dfe6e5f79b 100644 --- a/app/Models/Credit.php +++ b/app/Models/Credit.php @@ -450,9 +450,9 @@ class Credit extends BaseModel /** * Access the invoice calculator object. * - * @return \stdClass The invoice calculator object getters + * @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters */ - public function calc() + public function calc(): InvoiceSumInclusive | InvoiceSum { $credit_calc = null; diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 9af728560543..34e7fe888ebf 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -666,7 +666,7 @@ class Invoice extends BaseModel * * @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters */ - public function calc() + public function calc(): InvoiceSumInclusive | InvoiceSum { $invoice_calc = null; diff --git a/app/Models/PurchaseOrder.php b/app/Models/PurchaseOrder.php index 11c5b1bce146..01ad73b4c3b7 100644 --- a/app/Models/PurchaseOrder.php +++ b/app/Models/PurchaseOrder.php @@ -353,19 +353,14 @@ class PurchaseOrder extends BaseModel switch ($status) { case self::STATUS_DRAFT: return '
'.ctrans('texts.draft').'
'; - break; case self::STATUS_SENT: return '
'.ctrans('texts.sent').'
'; - break; case self::STATUS_ACCEPTED: return '
'.ctrans('texts.accepted').'
'; - break; case self::STATUS_CANCELLED: return '
'.ctrans('texts.cancelled').'
'; - break; default: - // code... - break; + return '
'.ctrans('texts.sent').'
'; } } @@ -491,7 +486,12 @@ class PurchaseOrder extends BaseModel return $this->morphMany(Document::class, 'documentable'); } - public function calc() + /** + * Access the invoice calculator object. + * + * @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters + */ + public function calc(): InvoiceSumInclusive | InvoiceSum { $purchase_order_calc = null; diff --git a/app/Models/Quote.php b/app/Models/Quote.php index 4cb81f8b7e41..89e4462de56c 100644 --- a/app/Models/Quote.php +++ b/app/Models/Quote.php @@ -393,9 +393,9 @@ class Quote extends BaseModel /** * Access the quote calculator object. * - * @return \stdClass The quote calculator object getters + * @return InvoiceSumInclusive | InvoiceSum The quote calculator object getters */ - public function calc() + public function calc(): InvoiceSumInclusive | InvoiceSum { $quote_calc = null; diff --git a/app/Models/RecurringInvoice.php b/app/Models/RecurringInvoice.php index 0067e1d09c66..5fef18662143 100644 --- a/app/Models/RecurringInvoice.php +++ b/app/Models/RecurringInvoice.php @@ -697,7 +697,12 @@ class RecurringInvoice extends BaseModel } } - public function calc() + /** + * Access the invoice calculator object. + * + * @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters + */ + public function calc(): InvoiceSumInclusive | InvoiceSum { $invoice_calc = null; diff --git a/app/Models/RecurringQuote.php b/app/Models/RecurringQuote.php index 3df3e46d1b86..2ed560f2026e 100644 --- a/app/Models/RecurringQuote.php +++ b/app/Models/RecurringQuote.php @@ -604,7 +604,12 @@ class RecurringQuote extends BaseModel } } - public function calc() + /** + * Access the invoice calculator object. + * + * @return InvoiceSumInclusive | InvoiceSum The invoice calculator object getters + */ + public function calc(): InvoiceSumInclusive | InvoiceSum { $invoice_calc = null;