mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 00:14:33 -04:00
Working on Credit payments
This commit is contained in:
parent
4f50dd81c6
commit
68f26d680c
@ -118,7 +118,7 @@ class Handler extends ExceptionHandler
|
|||||||
} elseif ($exception instanceof MethodNotAllowedHttpException && $request->expectsJson()) {
|
} elseif ($exception instanceof MethodNotAllowedHttpException && $request->expectsJson()) {
|
||||||
return response()->json(['message'=>'Method not support for this route'], 404);
|
return response()->json(['message'=>'Method not support for this route'], 404);
|
||||||
} elseif ($exception instanceof ValidationException && $request->expectsJson()) {
|
} elseif ($exception instanceof ValidationException && $request->expectsJson()) {
|
||||||
// info(print_r($exception->validator->getMessageBag(),1));
|
info(print_r($exception->validator->getMessageBag(),1));
|
||||||
return response()->json(['message' => 'The given data was invalid.', 'errors' => $exception->validator->getMessageBag()], 422);
|
return response()->json(['message' => 'The given data was invalid.', 'errors' => $exception->validator->getMessageBag()], 422);
|
||||||
} elseif ($exception instanceof RelationNotFoundException && $request->expectsJson()) {
|
} elseif ($exception instanceof RelationNotFoundException && $request->expectsJson()) {
|
||||||
return response()->json(['message' => $exception->getMessage()], 400);
|
return response()->json(['message' => $exception->getMessage()], 400);
|
||||||
|
@ -77,7 +77,8 @@ class StorePaymentRequest extends Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($input['amount']) || $input['amount'] == 0) {
|
if (!isset($input['amount']) || $input['amount'] == 0) {
|
||||||
$input['amount'] = $invoices_total - $credits_total;
|
//$input['amount'] = $invoices_total - $credits_total;
|
||||||
|
$input['amount'] = $invoices_total;
|
||||||
}
|
}
|
||||||
|
|
||||||
$input['is_manual'] = true;
|
$input['is_manual'] = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user