mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
fixes for refunds
This commit is contained in:
parent
fe995ca878
commit
1ce5b7ad8e
@ -120,6 +120,7 @@ class AuthorizeCreditCard
|
|||||||
$payment->client_id = $this->authorize->client->id;
|
$payment->client_id = $this->authorize->client->id;
|
||||||
$payment->company_gateway_id = $this->authorize->company_gateway->id;
|
$payment->company_gateway_id = $this->authorize->company_gateway->id;
|
||||||
$payment->status_id = Payment::STATUS_COMPLETED;
|
$payment->status_id = Payment::STATUS_COMPLETED;
|
||||||
|
$payment->gateway_type_id = $this->authorize->payment_method;
|
||||||
$payment->type_id = PaymentType::CREDIT_CARD_OTHER;
|
$payment->type_id = PaymentType::CREDIT_CARD_OTHER;
|
||||||
$payment->currency_id = $this->authorize->client->getSetting('currency_id');
|
$payment->currency_id = $this->authorize->client->getSetting('currency_id');
|
||||||
$payment->date = Carbon::now();
|
$payment->date = Carbon::now();
|
||||||
@ -129,7 +130,6 @@ class AuthorizeCreditCard
|
|||||||
$payment->client->getNextPaymentNumber($this->authorize->client);
|
$payment->client->getNextPaymentNumber($this->authorize->client);
|
||||||
$payment->save();
|
$payment->save();
|
||||||
|
|
||||||
|
|
||||||
$this->authorize->attachInvoices($payment, $request->hashed_ids);
|
$this->authorize->attachInvoices($payment, $request->hashed_ids);
|
||||||
|
|
||||||
$payment->service()->updateInvoicePayment();
|
$payment->service()->updateInvoicePayment();
|
||||||
|
@ -243,9 +243,9 @@ class RefundPayment
|
|||||||
//todo adjust ledger balance here? or after and reference the credit and its total
|
//todo adjust ledger balance here? or after and reference the credit and its total
|
||||||
}
|
}
|
||||||
|
|
||||||
$ledger_string = "Refund for Invoice {$invoice->number} for amount " . $refunded_invoice['amount']; //todo
|
// $ledger_string = "Refund for Invoice {$invoice->number} for amount " . $refunded_invoice['amount']; //todo
|
||||||
|
|
||||||
$this->credit_note->ledger()->updateCreditBalance($adjustment_amount, $ledger_string);
|
// $this->credit_note->ledger()->updateCreditBalance($adjustment_amount, $ledger_string);
|
||||||
|
|
||||||
$client = $this->payment->client->fresh();
|
$client = $this->payment->client->fresh();
|
||||||
$client->paid_to_date -= $this->total_refund;
|
$client->paid_to_date -= $this->total_refund;
|
||||||
|
@ -65,7 +65,7 @@ class UserTest extends TestCase
|
|||||||
$data = [
|
$data = [
|
||||||
'first_name' => 'hey',
|
'first_name' => 'hey',
|
||||||
'last_name' => 'you',
|
'last_name' => 'you',
|
||||||
'email' => 'bob@good.ole.boys.com',
|
'email' => 'bob1@good.ole.boys.com',
|
||||||
'company_user' => [
|
'company_user' => [
|
||||||
'is_admin' => false,
|
'is_admin' => false,
|
||||||
'is_owner' => false,
|
'is_owner' => false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user