mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Working on tests
This commit is contained in:
parent
9e167dabcd
commit
623d75153c
@ -118,27 +118,28 @@ class DeleteInvoiceTest extends TestCase
|
|||||||
$this->assertEquals(0, $invoice->client->balance);
|
$this->assertEquals(0, $invoice->client->balance);
|
||||||
$this->assertEquals(20, $invoice->client->paid_to_date);
|
$this->assertEquals(20, $invoice->client->paid_to_date);
|
||||||
|
|
||||||
/*
|
|
||||||
//partially refund payment
|
//partially refund payment
|
||||||
$payment = $invoice->fresh()->payments()->first();
|
$payment = $invoice->fresh()->payments()->first();
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'id' => $this->encodePrimaryKey($payment->id),
|
'id' => $payment->id,
|
||||||
'amount' => 10,
|
'amount' => 10,
|
||||||
'invoices' => [
|
'invoices' => [
|
||||||
[
|
[
|
||||||
'invoice_id' => $invoice->hashed_id,
|
'invoice_id' => $invoice->id,
|
||||||
'amount' => 10,
|
'amount' => 10,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'date' => '2020/12/12',
|
'date' => '2020/12/12',
|
||||||
|
'gateway_refund' => false
|
||||||
];
|
];
|
||||||
|
|
||||||
$payment->refund($data);
|
$payment->refund($data);
|
||||||
|
|
||||||
$this->assertEquals(10, $payment->fresh()->refunded);
|
$this->assertEquals(10, $payment->fresh()->refunded);
|
||||||
|
|
||||||
*/
|
|
||||||
//test balances
|
//test balances
|
||||||
|
|
||||||
//cancel invoice and paid_to_date
|
//cancel invoice and paid_to_date
|
||||||
|
Loading…
x
Reference in New Issue
Block a user