Merge branch 'ui' into dev
This commit is contained in:
@@ -36,15 +36,15 @@ function formatAmount(float $amount, $cash = true, $text = false,
|
||||
$euro = ($cash) ? ' €' : '';
|
||||
if (!$text) {
|
||||
$sign = ($amount < 0) ? '- ' : '';
|
||||
|
||||
|
||||
$left = '<span style=\'float: left;\'>';
|
||||
$right = '<span style=\'float: right;\'>';
|
||||
$span = '</span>';
|
||||
|
||||
|
||||
if ($amount == 0) {
|
||||
return $right . '- ' . $euro . $span;
|
||||
return $right . '- ' . $euro . $span;
|
||||
}
|
||||
|
||||
|
||||
return $left . $sign . $span . $right .
|
||||
number_format(abs($amount), $decimals, ',', '.') . $euro . $span;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ function formatDate($date, $format='d.m.Y')
|
||||
*
|
||||
* @param string $year
|
||||
* @param string $month
|
||||
* @return string
|
||||
* @return string
|
||||
*/
|
||||
function startOfMonth($year, $month, $format='d.m.Y')
|
||||
{
|
||||
@@ -99,7 +99,7 @@ function startOfMonth($year, $month, $format='d.m.Y')
|
||||
*
|
||||
* @param string $year
|
||||
* @param string $month
|
||||
* @return string
|
||||
* @return string
|
||||
*/
|
||||
function endOfMonth($year, $month, $format='d.m.Y') {
|
||||
return Carbon\Carbon::createFromDate($year, $month)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Return nav-here if current path begins with this path.
|
||||
*
|
||||
* @param string $path
|
||||
* @return string
|
||||
*/
|
||||
function setActive($path)
|
||||
{
|
||||
return Request::is($path . '*') ? ' active' : '';
|
||||
}
|
||||
Reference in New Issue
Block a user