-
+
+ {!! Former::select('auto_bill')
+ ->data_bind("value: auto_bill, valueUpdate: 'afterkeydown', event:{change:function(){if(auto_bill()==1)client_enable_auto_bill(0);if(auto_bill()==2)client_enable_auto_bill(1)}}")
+ ->options([
+ 0 => trans('texts.off'),
+ 1 => trans('texts.opt_in'),
+ 2 => trans('texts.opt_out'),
+ 3 => trans('texts.always'),
+ ]) !!}
+
+
+
+
diff --git a/resources/views/invoices/knockout.blade.php b/resources/views/invoices/knockout.blade.php
index 5b39703105ca..c7730eae2d22 100644
--- a/resources/views/invoices/knockout.blade.php
+++ b/resources/views/invoices/knockout.blade.php
@@ -188,8 +188,8 @@ function InvoiceModel(data) {
self.tax_rate2 = ko.observable();
self.is_recurring = ko.observable(0);
self.is_quote = ko.observable({{ $entityType == ENTITY_QUOTE ? '1' : '0' }});
- self.auto_bill = ko.observable(false);
- self.enable_auto_bill = ko.observable(0);
+ self.auto_bill = ko.observable(0);
+ self.client_enable_auto_bill = ko.observable(false);
self.invoice_status_id = ko.observable(0);
self.invoice_items = ko.observableArray();
self.documents = ko.observableArray();
diff --git a/resources/views/public_list.blade.php b/resources/views/public_list.blade.php
index d6ee070b50e3..1a5a17171b08 100644
--- a/resources/views/public_list.blade.php
+++ b/resources/views/public_list.blade.php
@@ -35,7 +35,7 @@
-->
- @if($entityType == ENTITY_INVOICE && $account->getTokenGatewayId() && $client->hasAutoBillInvoices())
+ @if($entityType == ENTITY_INVOICE && $account->getTokenGatewayId() && $client->hasAutoBillConfigurableInvoices())
{!! Button::info(trans("texts.manage_auto_bill"))->asLinkTo(URL::to('/client/invoices/recurring'))->appendIcon(Icon::create('repeat')) !!}