1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-18 00:53:10 +01:00

Bug fixes

This commit is contained in:
Hillel Coren 2015-06-10 14:38:25 +03:00
parent 11fc506475
commit b0eea1a30f
3 changed files with 3 additions and 21 deletions

View File

@ -49,24 +49,6 @@ class CheckData extends Command {
$today = new DateTime(); $today = new DateTime();
if (!$this->option('client_id')) { if (!$this->option('client_id')) {
// update client deletion activities with the client's current balance
$activities = DB::table('activities')
->join('clients', 'clients.id', '=', 'activities.client_id')
->where('activities.activity_type_id', '=', ACTIVITY_TYPE_DELETE_CLIENT)
->where('activities.balance', '=', 0)
->where('clients.balance', '!=', 0)
->get(['activities.id', 'clients.balance']);
$this->info(count($activities) . ' delete client activities with zero balance');
if ($this->option('fix') == 'true') {
foreach ($activities as $activity) {
DB::table('activities')
->where('id', $activity->id)
->update(['balance' => $activity->balance]);
}
}
// update client paid_to_date value // update client paid_to_date value
$clients = DB::table('clients') $clients = DB::table('clients')
->join('payments', 'payments.client_id', '=', 'clients.id') ->join('payments', 'payments.client_id', '=', 'clients.id')

View File

@ -39,7 +39,7 @@
'required_class' => 'required', 'required_class' => 'required',
// A facultative text to append to the labels of required fields // A facultative text to append to the labels of required fields
'required_text' => '<sup>*</sup>', 'required_text' => '',
// Translations // Translations
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

View File

@ -28,7 +28,7 @@
<div class="panel-body"> <div class="panel-body">
{!! Former::open()->addClass('warn-on-exit') !!} {!! Former::open()->rules(['start_date' => 'required', 'end_date' => 'required'])->addClass('warn-on-exit') !!}
<div style="display:none"> <div style="display:none">
{!! Former::text('action') !!} {!! Former::text('action') !!}