mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Show "Apply credits" only
This commit is contained in:
parent
9c581f4b4c
commit
2f17f7011a
@ -544,6 +544,14 @@ class Client extends BaseModel implements HasLocalePreference
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (($this->getSetting('use_credits_payment') == 'option' || $this->getSetting('use_credits_payment') == 'always') && $this->service()->getCreditBalance() > 0) {
|
if (($this->getSetting('use_credits_payment') == 'option' || $this->getSetting('use_credits_payment') == 'always') && $this->service()->getCreditBalance() > 0) {
|
||||||
|
|
||||||
|
// Show credits as only payment option if both statements are true.
|
||||||
|
if (
|
||||||
|
$this->service()->getCreditBalance() > $amount
|
||||||
|
&& $this->getSetting('use_credits_payment') == 'always') {
|
||||||
|
$payment_urls = [];
|
||||||
|
}
|
||||||
|
|
||||||
$payment_urls[] = [
|
$payment_urls[] = [
|
||||||
'label' => ctrans('texts.apply_credit'),
|
'label' => ctrans('texts.apply_credit'),
|
||||||
'company_gateway_id' => CompanyGateway::GATEWAY_CREDIT,
|
'company_gateway_id' => CompanyGateway::GATEWAY_CREDIT,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user