Browse Source

Change monthId helper name to month_id

pull/20/head
Nafies Luthfi 7 years ago
parent
commit
2a89fceeab
  1. 2
      app/Helpers/date_time.php
  2. 8
      resources/views/reports/sales/yearly.blade.php

2
app/Helpers/date_time.php

@ -22,7 +22,7 @@ function month_number($number)
return str_pad($number, 2, '0', STR_PAD_LEFT); return str_pad($number, 2, '0', STR_PAD_LEFT);
} }
function monthId($month_number)
function month_id($month_number)
{ {
if (is_null($month_number)) { if (is_null($month_number)) {
return $month_number; return $month_number;

8
resources/views/reports/sales/yearly.blade.php

@ -38,7 +38,7 @@
$omzet = $any ? $reports[$month_number]->omzet : 0 $omzet = $any ? $reports[$month_number]->omzet : 0
@endphp @endphp
<tr> <tr>
<td class="text-center">{{ monthId($month_number) }}</td>
<td class="text-center">{{ month_id($month_number) }}</td>
<td class="text-center">{{ $any ? $reports[$month_number]->count : 0 }}</td> <td class="text-center">{{ $any ? $reports[$month_number]->count : 0 }}</td>
<td class="text-right">{{ format_rp($omzet) }}</td> <td class="text-right">{{ format_rp($omzet) }}</td>
<td class="text-center"> <td class="text-center">
@ -48,14 +48,14 @@
['month' => $month_number, 'year' => $year], ['month' => $month_number, 'year' => $year],
[ [
'class' => 'btn btn-info btn-xs', 'class' => 'btn btn-info btn-xs',
'title' => __('report.monthly', ['year_month' => monthId($month_number)]),
'title' => __('report.monthly', ['year_month' => monthId($month_number).' '.$year]),
'title' => __('report.monthly', ['year_month' => month_id($month_number)]),
'title' => __('report.monthly', ['year_month' => month_id($month_number).' '.$year]),
] ]
) }} ) }}
</td> </td>
</tr> </tr>
@php @php
$chartData[] = ['month' => monthId($month_number), 'value' => $omzet];
$chartData[] = ['month' => month_id($month_number), 'value' => $omzet];
@endphp @endphp
@endforeach @endforeach
</tbody> </tbody>

Loading…
Cancel
Save