mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04: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']) : [];
|
$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'])) {
|
if (array_key_exists('auto_bill', $input) && isset($input['auto_bill'])) {
|
||||||
$input['auto_bill_enabled'] = true;
|
$input['auto_bill_enabled'] = $this->setAutoBillFlag($input['auto_bill']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists('documents', $input)) {
|
if (array_key_exists('documents', $input)) {
|
||||||
@ -132,9 +132,9 @@ class UpdateRecurringInvoiceRequest extends Request
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,13 @@
|
|||||||
$token_billing = false;
|
$token_billing = false;
|
||||||
$token_billing_string = '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_on = 'checked';
|
||||||
$checked_off = '';
|
$checked_off = '';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user