1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Minor fixes for credit_payments in CP

This commit is contained in:
David Bomba 2021-01-07 10:18:57 +11:00
parent e42cb6f4d3
commit 2cd5d2d68a
2 changed files with 4 additions and 1 deletions

View File

@ -227,7 +227,7 @@ class CreateSingleAccount extends Command
$settings = $client->settings;
$settings->currency_id = "1";
$settings->use_credits_payment = "always";
// $settings->use_credits_payment = "always";
$client->settings = $settings;

View File

@ -205,6 +205,9 @@ class PaymentController extends Controller
$credit_totals = $first_invoice->client->getSetting('use_credits_payment') == 'off' ? 0 : $first_invoice->client->service()->getCreditBalance();
$starting_invoice_amount = $first_invoice->amount;
nlog($credit_totals);
nlog($first_invoice->client->getSetting('use_credits_payment'));
if ($gateway) {
$first_invoice->service()->addGatewayFee($gateway, $payment_method_id, $invoice_totals)->save();
}