Framework updates and minor cosmetic fixes

This commit is contained in:
Deon George 2021-09-28 10:09:56 +10:00
parent ccd6a11c8a
commit 7277d7407a
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
9 changed files with 918 additions and 496 deletions

View File

@ -22,6 +22,7 @@ class Handler extends ExceptionHandler
* @var array * @var array
*/ */
protected $dontFlash = [ protected $dontFlash = [
'current_password',
'password', 'password',
'password_confirmation', 'password_confirmation',
]; ];

View File

@ -48,7 +48,6 @@ class AdminController extends Controller
} }
foreach ($validation['invoices'] as $id => $amount) { foreach ($validation['invoices'] as $id => $amount) {
// See if we already have a payment item that we need to update // See if we already have a payment item that we need to update
$items = $o->items->filter(function($item) use ($id) { return $item->invoice_id == $id; }); $items = $o->items->filter(function($item) use ($id) { return $item->invoice_id == $id; });

View File

@ -2,10 +2,10 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController class Controller extends BaseController
{ {

View File

@ -97,7 +97,7 @@ class SearchController extends Controller
->whereIN('account_id',$accounts) ->whereIN('account_id',$accounts)
->limit(10)->get() as $o) ->limit(10)->get() as $o)
{ {
$result->push(['name'=>sprintf('%s ($%s)',$o->id,number_format($o->total,2)),'value'=>'/a/payment/edit'.$o->id,'category'=>'Payments']); $result->push(['name'=>sprintf('%s ($%s)',$o->id,number_format($o->total,2)),'value'=>'/a/payment/addedit/'.$o->id,'category'=>'Payments']);
} }
} }

View File

@ -11,7 +11,7 @@ define('LARAVEL_START', microtime(true));
| Composer provides a convenient, automatically generated class loader | Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it | for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the | into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax. | loading of any of our classes manually. It's great to relax.
| |
*/ */

1393
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -226,6 +226,7 @@ return [
'Password' => Illuminate\Support\Facades\Password::class, 'Password' => Illuminate\Support\Facades\Password::class,
'PDF' => Barryvdh\Snappy\Facades\SnappyPdf::class, 'PDF' => Barryvdh\Snappy\Facades\SnappyPdf::class,
'Queue' => Illuminate\Support\Facades\Queue::class, 'Queue' => Illuminate\Support\Facades\Queue::class,
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class, 'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class, 'Request' => Illuminate\Support\Facades\Request::class,

View File

@ -57,7 +57,7 @@
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-fw fa-dollar-sign"></i></span> <span class="input-group-text"><i class="fas fa-fw fa-dollar-sign"></i></span>
</div> </div>
<input type="text" class="text-right form-control @error('total_amt') is-invalid @enderror" id="total_amt" name="total_amt" value="{{ old('total_amt',$o->exists ? $o->total_amt : 0) }}" required> <input type="text" class="text-right form-control @error('total_amt') is-invalid @enderror" id="total_amt" name="total_amt" value="{{ number_format(old('total_amt',$o->exists ? $o->total_amt : 0),2) }}" required>
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@error('total_amt') @error('total_amt')
{{ $message }} {{ $message }}
@ -104,7 +104,7 @@
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-fw fa-dollar-sign"></i></span> <span class="input-group-text"><i class="fas fa-fw fa-dollar-sign"></i></span>
</div> </div>
<input type="text" class="text-right form-control @error('fees_amt') is-invalid @enderror" id="fees_amt" name="fees_amt" value="{{ old('fees_amt',$o->exists ? $o->fees_amt : 0) }}"> <input type="text" class="text-right form-control @error('fees_amt') is-invalid @enderror" id="fees_amt" name="fees_amt" value="{{ number_format(old('fees_amt',$o->exists ? $o->fees_amt : 0),2) }}">
<span class="invalid-feedback" role="alert"> <span class="invalid-feedback" role="alert">
@error('fees_amt') @error('fees_amt')
{{ $message }} {{ $message }}
@ -153,7 +153,7 @@
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text"><i class="fas fa-fw fa-dollar-sign"></i></span> <span class="input-group-text"><i class="fas fa-fw fa-dollar-sign"></i></span>
</div> </div>
<input type="text" class="text-right form-control @error('fees_amt') is-invalid @enderror" value="{{ $o->exists ? $o->balance : 0 }}" disabled> <input type="text" class="text-right form-control @error('fees_amt') is-invalid @enderror" value="{{ number_format($o->exists ? $o->balance : 0,2) }}" disabled>
</div> </div>
</div> </div>
</div> </div>

View File

@ -27,7 +27,7 @@
<td>{{ number_format($io->total,2) }}</td> <td>{{ number_format($io->total,2) }}</td>
<td>{{ number_format($io->due,2) }}</td> <td>{{ number_format($io->due,2) }}</td>
<td class="text-right"> <td class="text-right">
<input type="text" class="text-right" name="invoices[{{ $io->id }}]" value="{{ ($x=$io->paymentitems->filter(function($item) use ($pid) { return $item->payment_id == $pid; })) ? $x->sum('alloc_amt') : 0}}"> <input type="text" class="text-right" name="invoices[{{ $io->id }}]" value="{{ number_format(($x=$io->paymentitems->filter(function($item) use ($pid) { return $item->payment_id == $pid; })) ? $x->sum('alloc_amt') : 0,2) }}">
</td> </td>
</tr> </tr>
@endforeach @endforeach