mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 15:34:37 -04:00
Fixes for refund activity notes
This commit is contained in:
parent
c26a40f842
commit
8f4a164dca
@ -79,7 +79,10 @@ class RefundPayment
|
|||||||
|
|
||||||
TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $this->payment->company->db);
|
TransactionLog::dispatch(TransactionEvent::PAYMENT_REFUND, $transaction, $this->payment->company->db);
|
||||||
|
|
||||||
SystemLogger::dispatch(['user' => auth()->user() ? auth()->user()->email : '', 'paymentables' => $this->payment->paymentables->makeHidden(['id','payment_id', 'paymentable_id','paymentable_type', 'deleted_at'])->toArray(), 'request' => request() ? request()->all() : []], SystemLog::CATEGORY_LOG, SystemLog::EVENT_USER, SystemLog::TYPE_GENERIC, $this->payment->client, $this->payment->company);
|
$notes = ctrans('texts.refunded') . " : {$this->total_refund} - " . ctrans('texts.gateway_refund') . " : ";
|
||||||
|
$notes .= $this->refund_data['gateway_refund'] !== false ? ctrans('texts.yes') : ctrans('texts.no');
|
||||||
|
|
||||||
|
$this->createActivity($notes);
|
||||||
|
|
||||||
return $this->payment;
|
return $this->payment;
|
||||||
}
|
}
|
||||||
@ -98,8 +101,6 @@ class RefundPayment
|
|||||||
|
|
||||||
$this->payment->refunded += $this->total_refund;
|
$this->payment->refunded += $this->total_refund;
|
||||||
|
|
||||||
$this->createActivity($this->payment);
|
|
||||||
|
|
||||||
if ($response['success'] == false) {
|
if ($response['success'] == false) {
|
||||||
$this->payment->save();
|
$this->payment->save();
|
||||||
|
|
||||||
@ -133,7 +134,7 @@ class RefundPayment
|
|||||||
$fields->company_id = $this->payment->company_id;
|
$fields->company_id = $this->payment->company_id;
|
||||||
$fields->activity_type_id = Activity::REFUNDED_PAYMENT;
|
$fields->activity_type_id = Activity::REFUNDED_PAYMENT;
|
||||||
// $fields->credit_id = $this->credit_note->id; // TODO
|
// $fields->credit_id = $this->credit_note->id; // TODO
|
||||||
$fields->notes = json_encode($notes);
|
$fields->notes = $notes;
|
||||||
|
|
||||||
if (isset($this->refund_data['invoices'])) {
|
if (isset($this->refund_data['invoices'])) {
|
||||||
foreach ($this->refund_data['invoices'] as $invoice) {
|
foreach ($this->refund_data['invoices'] as $invoice) {
|
||||||
|
@ -43,6 +43,7 @@ return [
|
|||||||
'password' => env('MAIL_PASSWORD'),
|
'password' => env('MAIL_PASSWORD'),
|
||||||
'timeout' => null,
|
'timeout' => null,
|
||||||
'local_domain' => env('MAIL_EHLO_DOMAIN'),
|
'local_domain' => env('MAIL_EHLO_DOMAIN'),
|
||||||
|
'verify_peer' => env('MAIL_VERIFY_PEER', true),
|
||||||
],
|
],
|
||||||
|
|
||||||
'ses' => [
|
'ses' => [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user