show mod sum
This commit is contained in:
@@ -227,6 +227,23 @@ class money_deposit {
|
|||||||
return $expireDate;
|
return $expireDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function get_month_mod_sum($_year, $_month) {
|
||||||
|
global $sql;
|
||||||
|
|
||||||
|
return $sql->single_variable("
|
||||||
|
SELECT
|
||||||
|
SUM(mi_sum)
|
||||||
|
FROM
|
||||||
|
money_deposit
|
||||||
|
JOIN
|
||||||
|
money_income ON mi_id = mod_money_income_mi_id
|
||||||
|
WHERE
|
||||||
|
mi_date LIKE '%{$_year}-{$_month}%'
|
||||||
|
AND mi_deleted = 0
|
||||||
|
AND mod_deleted = 0
|
||||||
|
");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -748,6 +748,11 @@ form#auto_filters > div > label {
|
|||||||
background-color: #f6625c;
|
background-color: #f6625c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mod_sum {
|
||||||
|
float: right;
|
||||||
|
margin-right: 4vw;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: 680px) {
|
@media (min-width: 680px) {
|
||||||
|
|
||||||
.categories {
|
.categories {
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
<span onclick="block_action('block_{$mod->get_mod_money_income()->get_mi_date()|substr:0:4}{$mod->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
<span onclick="block_action('block_{$mod->get_mod_money_income()->get_mi_date()|substr:0:4}{$mod->get_mod_money_income()->get_mi_date()|substr:5:2}');" class="date_separator clickable">{$mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:0:4}.
|
||||||
{$months[$mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
{$months[$mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:5:2]}
|
||||||
<img src="/_image/open_folder.png">
|
<img src="/_image/open_folder.png">
|
||||||
|
{assign var="sum" value=money_deposit::get_month_mod_sum($mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:0:4, $mod_array[$mod@index]->get_mod_money_income()->get_mi_date()|substr:5:2)}
|
||||||
|
<span class="mod_sum">{if sum != null}{$sum|number_format:0:'':' '}{else}0{/if} Ft</span>
|
||||||
</span>
|
</span>
|
||||||
<div id="block_{$mod->get_mod_money_income()->get_mi_date()|substr:0:4}{$mod->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
<div id="block_{$mod->get_mod_money_income()->get_mi_date()|substr:0:4}{$mod->get_mod_money_income()->get_mi_date()|substr:5:2}" class="month_block">
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user