mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Merge pull request #7643 from turbo124/v5-develop
Minor fixes for rendering payments
This commit is contained in:
commit
5642e7b779
@ -97,8 +97,20 @@ class PaymentController extends Controller
|
||||
$client = $invoice ? $invoice->client : auth()->guard('contact')->user()->client;
|
||||
|
||||
// 09-07-2022 catch duplicate responses for invoices that already paid here.
|
||||
if($invoice && $invoice->status_id == Invoice::STATUS_PAID)
|
||||
abort(400, 'Invoice paid. Duplicate submission');
|
||||
if($invoice && $invoice->status_id == Invoice::STATUS_PAID){
|
||||
|
||||
$data = [
|
||||
'invoice' => $invoice,
|
||||
'key' => false
|
||||
];
|
||||
|
||||
if ($request->query('mode') === 'fullscreen') {
|
||||
return render('invoices.show-fullscreen', $data);
|
||||
}
|
||||
|
||||
return $this->render('invoices.show', $data);
|
||||
|
||||
}
|
||||
|
||||
return $gateway
|
||||
->driver($client)
|
||||
|
@ -123,7 +123,7 @@ class Request extends FormRequest
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($input['invitations'])) {
|
||||
if (isset($input['invitations']) && is_array($input['invitations'])) {
|
||||
foreach ($input['invitations'] as $key => $value) {
|
||||
if (isset($input['invitations'][$key]['id']) && is_numeric($input['invitations'][$key]['id'])) {
|
||||
unset($input['invitations'][$key]['id']);
|
||||
|
@ -204,4 +204,9 @@ class BaseModel extends Model
|
||||
return $formatted_number;
|
||||
}
|
||||
|
||||
public function translate_entity()
|
||||
{
|
||||
return ctrans('texts.item');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -271,4 +271,8 @@ class PurchaseOrder extends BaseModel
|
||||
return $purchase_order_calc->build();
|
||||
}
|
||||
|
||||
public function translate_entity()
|
||||
{
|
||||
return ctrans('texts.purchase_order');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user