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

minor fixes

This commit is contained in:
David Bomba 2021-09-04 15:51:31 +10:00
parent f996da294d
commit fa635a7ef0
3 changed files with 6 additions and 4 deletions

View File

@ -84,8 +84,6 @@ class TemplateEmail extends Mailable
else
$email_from_name = $this->company->present()->name();
nlog($email_from_name);
$this->from(config('mail.from.address'), $email_from_name);
if (strlen($settings->bcc_email) > 1)

View File

@ -89,6 +89,8 @@ class AutoBillInvoice extends AbstractService
return $this->invoice;
}
nlog("Gateway present - adding gateway fee");
/* $gateway fee */
$this->invoice = $this->invoice->service()->addGatewayFee($gateway_token->gateway, $gateway_token->gateway_type_id, $amount)->save();
@ -105,6 +107,8 @@ class AutoBillInvoice extends AbstractService
'fee_invoice_id' => $this->invoice->id,
]);
nlog("Payment hash created => {$payment_hash->id}");
$payment = $gateway_token->gateway
->driver($this->client)
->setPaymentHash($payment_hash)

View File

@ -82,6 +82,8 @@ class DeletePayment
$net_deletable = $paymentable_invoice->pivot->amount - $paymentable_invoice->pivot->refunded;
nlog("net deletable amount - refunded = {$net_deletable}");
$paymentable_invoice->service()
->updateBalance($net_deletable)
->updatePaidToDate($net_deletable * -1)
@ -103,8 +105,6 @@ class DeletePayment
$paymentable_invoice->service()->setStatus(Invoice::STATUS_PARTIAL)->save();
}
//fire event for this credit
//
});
}