diff --git a/_class/class_money_deposit.php b/_class/class_money_deposit.php
index 78a3f7f..4d2af75 100644
--- a/_class/class_money_deposit.php
+++ b/_class/class_money_deposit.php
@@ -227,6 +227,23 @@ class money_deposit {
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
+ ");
+ }
+
}
?>
diff --git a/_css/default.css b/_css/default.css
index 5075b67..b03ba76 100644
--- a/_css/default.css
+++ b/_css/default.css
@@ -748,6 +748,11 @@ form#auto_filters > div > label {
background-color: #f6625c;
}
+.mod_sum {
+ float: right;
+ margin-right: 4vw;
+}
+
@media (min-width: 680px) {
.categories {
diff --git a/template/templates/money_deposit.tpl b/template/templates/money_deposit.tpl
index d6c3800..991a7f0 100644
--- a/template/templates/money_deposit.tpl
+++ b/template/templates/money_deposit.tpl
@@ -18,6 +18,8 @@
{$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]}
+ {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)}
+ {if sum != null}{$sum|number_format:0:'':' '}{else}0{/if} Ft