feat(purchase,sale,ticket): expose refunded total summary in admin sales and tickets
This commit is contained in:
@@ -163,6 +163,7 @@ class AdminAppSaleControllerTest extends TestCase
|
||||
'cantidad' => 3,
|
||||
'precio_unitario' => '10000.00',
|
||||
'total' => '30000.00',
|
||||
'refunded_amount' => '1250.00',
|
||||
]);
|
||||
|
||||
$pendingCart = Cart::query()->create([
|
||||
@@ -203,6 +204,7 @@ class AdminAppSaleControllerTest extends TestCase
|
||||
'cantidad' => 2,
|
||||
'precio_unitario' => '10000.00',
|
||||
'total' => '20000.00',
|
||||
'refunded_amount' => '2500.00',
|
||||
]);
|
||||
|
||||
$supersededPurchase = Purchase::query()->create([
|
||||
@@ -237,7 +239,8 @@ class AdminAppSaleControllerTest extends TestCase
|
||||
->assertJsonPath('data.2.status_label', 'Confirmado')
|
||||
->assertJsonPath('data.3.id', $supersededPurchase->id)
|
||||
->assertJsonPath('data.3.admin_status', Purchase::ADMIN_STATUS_CANCELLED)
|
||||
->assertJsonPath('data.3.status_label', 'Anulado');
|
||||
->assertJsonPath('data.3.status_label', 'Anulado')
|
||||
->assertJsonPath('refunded_total', '3750.00');
|
||||
|
||||
$this->getJson('/api/v1/adminapp/tenant/sales?status='.Purchase::STATUS_SUPERSEDED)
|
||||
->assertUnprocessable();
|
||||
|
||||
Reference in New Issue
Block a user