Fix for API payment rounding

This commit is contained in:
Hillel Coren 2018-04-08 10:49:54 +03:00
parent f98a4deeff
commit 2943fe3d0c

View File

@ -198,7 +198,7 @@ class InvoiceApiController extends BaseAPIController
$payment = $this->paymentRepo->save([ $payment = $this->paymentRepo->save([
'invoice_id' => $invoice->id, 'invoice_id' => $invoice->id,
'client_id' => $client->id, 'client_id' => $client->id,
'amount' => $data['paid'], 'amount' => round($data['paid'], 2),
]); ]);
} }
} }