From bf812ad19e5effff2a6efc456028e7f41a221658 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 21 May 2021 22:08:56 +1000 Subject: [PATCH] Add auto bill enabled to transformer --- app/Models/Invoice.php | 1 + app/Transformers/InvoiceTransformer.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 43f63cefc6..6febb5876f 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -92,6 +92,7 @@ class Invoice extends BaseModel 'assigned_user_id', 'exchange_rate', 'subscription_id', + 'auto_bill_enabled', ]; protected $casts = [ diff --git a/app/Transformers/InvoiceTransformer.php b/app/Transformers/InvoiceTransformer.php index 21487a63c0..83266c1f6b 100644 --- a/app/Transformers/InvoiceTransformer.php +++ b/app/Transformers/InvoiceTransformer.php @@ -154,7 +154,7 @@ class InvoiceTransformer extends EntityTransformer 'reminder_last_sent' => $invoice->reminder_last_sent ?: '', 'paid_to_date' => (float) $invoice->paid_to_date, 'subscription_id' => $this->encodePrimaryKey($invoice->subscription_id), - + 'auto_bill_enabled' => (bool) $invoice->auto_bill_enabled, ]; } }