mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Bug fixes
This commit is contained in:
parent
35bb36fd34
commit
debc22d7d2
@ -54,7 +54,7 @@ class PublicClientController extends BaseController
|
||||
|
||||
return Datatable::query($query)
|
||||
->addColumn('activities.id', function ($model) { return Utils::timestampToDateTimeString(strtotime($model->created_at)); })
|
||||
->addColumn('message', function ($model) {
|
||||
->addColumn('activity_type_id', function ($model) {
|
||||
$data = [
|
||||
'client' => Utils::getClientDisplayName($model),
|
||||
'user' => $model->is_system ? ('<i>' . trans('texts.system') . '</i>') : ($model->user_first_name . ' ' . $model->user_last_name),
|
||||
|
@ -24,21 +24,18 @@ class CreatePaymentRequest extends Request
|
||||
public function rules()
|
||||
{
|
||||
$input = $this->input();
|
||||
$invoice = Invoice::scope($input['invoice'])->firstOrFail();
|
||||
|
||||
$rules = array(
|
||||
'client' => 'required',
|
||||
'invoice' => 'required',
|
||||
'amount' => 'required',
|
||||
'amount' => 'required|less_than:{$invoice->balance}|positive',
|
||||
);
|
||||
|
||||
if ($input['payment_type_id'] == PAYMENT_TYPE_CREDIT) {
|
||||
$rules['payment_type_id'] = 'has_credit:'.$input['client'].','.$input['amount'];
|
||||
}
|
||||
|
||||
if (isset($input['invoice']) && $input['invoice']) {
|
||||
$invoice = Invoice::scope($input['invoice'])->firstOrFail();
|
||||
$rules['amount'] .= "|less_than:{$invoice->balance}";
|
||||
}
|
||||
|
||||
return $rules;
|
||||
}
|
||||
}
|
||||
|
@ -214,6 +214,7 @@ class Utils
|
||||
'user_id' => Auth::check() ? Auth::user()->id : 0,
|
||||
'account_id' => Auth::check() ? Auth::user()->account_id : 0,
|
||||
'user_name' => Auth::check() ? Auth::user()->getDisplayName() : '',
|
||||
'method' => Request::method(),
|
||||
'url' => Input::get('url', Request::url()),
|
||||
'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '',
|
||||
'ip' => Request::getClientIp(),
|
||||
|
@ -380,6 +380,7 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
|
||||
$this->account->setVisible([
|
||||
'name',
|
||||
'website',
|
||||
'id_number',
|
||||
'vat_number',
|
||||
'address1',
|
||||
|
@ -9,7 +9,7 @@
|
||||
<div class="container" style="min-height:400px">
|
||||
<h3>Something went wrong...</h3>
|
||||
<h4>{{ $error }}</h4>
|
||||
<h4>If you'd like help please email us at contact@invoiceninja.com.</h4>
|
||||
<h4>If you'd like help please email us at {{ env('MAIL_USERNAME') }}.</h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user