mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Fix for enabling autobilling
This commit is contained in:
parent
0cc0bcbdcf
commit
6dfd50bddd
@ -776,8 +776,8 @@ class ClientPortalController extends BaseController
|
||||
|
||||
$publicId = Input::get('public_id');
|
||||
$enable = Input::get('enable');
|
||||
$invoice = $client->invoices->where('public_id', intval($publicId))->first();
|
||||
|
||||
$invoice = $client->invoices()->where('public_id', intval($publicId))->first();
|
||||
|
||||
if ($invoice && $invoice->is_recurring && ($invoice->auto_bill == AUTO_BILL_OPT_IN || $invoice->auto_bill == AUTO_BILL_OPT_OUT)) {
|
||||
$invoice->client_enable_auto_bill = $enable ? true : false;
|
||||
$invoice->save();
|
||||
|
Loading…
Reference in New Issue
Block a user