mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Fixes for logic surrounding presenting the save payment method details radio buttons
This commit is contained in:
parent
57596ef26f
commit
b67bbdcd7a
@ -112,8 +112,8 @@ class UpdateRecurringInvoiceRequest extends Request
|
||||
$input['line_items'] = isset($input['line_items']) ? $this->cleanItems($input['line_items']) : [];
|
||||
}
|
||||
|
||||
if (array_key_exists('auto_bill', $input) && isset($input['auto_bill']) && $this->setAutoBillFlag($input['auto_bill'])) {
|
||||
$input['auto_bill_enabled'] = true;
|
||||
if (array_key_exists('auto_bill', $input) && isset($input['auto_bill'])) {
|
||||
$input['auto_bill_enabled'] = $this->setAutoBillFlag($input['auto_bill']);
|
||||
}
|
||||
|
||||
if (array_key_exists('documents', $input)) {
|
||||
@ -132,9 +132,9 @@ class UpdateRecurringInvoiceRequest extends Request
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function setAutoBillFlag($auto_bill) :bool
|
||||
private function setAutoBillFlag($auto_bill)
|
||||
{
|
||||
if ($auto_bill == 'always') {
|
||||
if ($auto_bill == 'always' || $auto_bill == 'optout') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -10,8 +10,13 @@
|
||||
$token_billing = false;
|
||||
$token_billing_string = 'false';
|
||||
}
|
||||
|
||||
if($gateway_instance->token_billing == 'optout' || $gateway_instance->token_billing == 'always'){
|
||||
|
||||
if($gateway_instance->token_billing == 'always'){
|
||||
$token_billing = false;
|
||||
$token_billing_string = 'true';
|
||||
}
|
||||
|
||||
if($gateway_instance->token_billing == 'optout'){
|
||||
$checked_on = 'checked';
|
||||
$checked_off = '';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user