mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Minor fixes for checking payment values
This commit is contained in:
parent
dedc689e58
commit
0b2a8eac1a
@ -92,9 +92,7 @@ class PaymentController extends Controller
|
||||
{
|
||||
|
||||
$gateway = CompanyGateway::findOrFail($request->input('company_gateway_id'));
|
||||
|
||||
$payment_hash = PaymentHash::whereRaw('BINARY `hash`= ?', [$request->payment_hash])->first();
|
||||
|
||||
$payment_hash = PaymentHash::where('hash', $request->payment_hash)->first();
|
||||
$invoice = Invoice::with('client')->find($payment_hash->fee_invoice_id);
|
||||
$client = $invoice->client->exists() ? $invoice->client : auth()->user()->client;
|
||||
|
||||
|
@ -74,6 +74,7 @@ class PaymentAppliedValidAmount implements Rule
|
||||
}
|
||||
}
|
||||
|
||||
return $payment_amounts >= $invoice_amounts;
|
||||
// nlog("{round($payment_amounts,3)} >= {round($invoice_amounts,3)}");
|
||||
return round($payment_amounts,3) >= round($invoice_amounts,3);
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ Route::get('error', 'ClientPortal\ContactHashLoginController@errorPage')->name('
|
||||
Route::get('client/payment/{contact_key}/{payment_id}', 'ClientPortal\InvitationController@paymentRouter')->middleware(['domain_db','contact_key_login']);
|
||||
Route::get('client/ninja/{contact_key}/{company_key}', 'ClientPortal\NinjaPlanController@index')->name('client.ninja_contact_login')->middleware(['domain_db']);
|
||||
|
||||
Route::group(['middleware' => ['auth:contact', 'locale', 'check_client_existence','domain_db'], 'prefix' => 'client', 'as' => 'client.'], function () {
|
||||
Route::group(['middleware' => ['auth:contact', 'locale', 'domain_db'], 'prefix' => 'client', 'as' => 'client.'], function () {
|
||||
Route::get('dashboard', 'ClientPortal\DashboardController@index')->name('dashboard'); // name = (dashboard. index / create / show / update / destroy / edit
|
||||
|
||||
Route::get('plan', 'ClientPortal\NinjaPlanController@plan')->name('plan'); // name = (dashboard. index / create / show / update / destroy / edit
|
||||
|
Loading…
x
Reference in New Issue
Block a user