mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
minor fixes
This commit is contained in:
parent
540dd2f43e
commit
18e0ced89c
@ -122,7 +122,12 @@ class PaymentController extends Controller
|
|||||||
/** @var \App\Models\CompanyGateway $gateway **/
|
/** @var \App\Models\CompanyGateway $gateway **/
|
||||||
$gateway = CompanyGateway::findOrFail($request->input('company_gateway_id'));
|
$gateway = CompanyGateway::findOrFail($request->input('company_gateway_id'));
|
||||||
$payment_hash = PaymentHash::where('hash', $request->payment_hash)->firstOrFail();
|
$payment_hash = PaymentHash::where('hash', $request->payment_hash)->firstOrFail();
|
||||||
$invoice = Invoice::with('client')->find($payment_hash->fee_invoice_id);
|
|
||||||
|
if($payment_hash)
|
||||||
|
$invoice = $payment_hash->fee_invoice;
|
||||||
|
else
|
||||||
|
$invoice = Invoice::with('client')->where('id',$payment_hash->fee_invoice_id)->orderBy('id','desc');
|
||||||
|
|
||||||
$client = $invoice ? $invoice->client : auth()->guard('contact')->user()->client;
|
$client = $invoice ? $invoice->client : auth()->guard('contact')->user()->client;
|
||||||
|
|
||||||
// 09-07-2022 catch duplicate responses for invoices that already paid here.
|
// 09-07-2022 catch duplicate responses for invoices that already paid here.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user