handle last deposit in month
This commit is contained in:
@@ -667,8 +667,13 @@ class user_kid extends user_parent {
|
||||
$nonZero = $_de->get_de_money_deposit()->get_mod_non_zero();
|
||||
$_de->set_de_transaction($_de->get_de_money_deposit()->get_mod_money_income()->get_mi_sum());
|
||||
|
||||
$lastEntryInMonth = false;
|
||||
if (isset($_de_obj_array[$i+1])) {
|
||||
$lastEntryInMonth = date('m', strtotime($_de_obj_array[$i+1]->get_de_date())) !== date('m', strtotime($_de->get_de_date()));
|
||||
}
|
||||
//var_dump($i < (count($_de_obj_array) -1 ) || !$_de->get_de_expired() || !$lastEntryInMonth);
|
||||
//ha ez a befizetés az utolsó és lejárt, akkor ne adjuk hozzá a balancehoz
|
||||
if ($i < (count($_de_obj_array) -1 ) || !$_de->get_de_expired()) {
|
||||
if ($i < (count($_de_obj_array) -1 ) || !$_de->get_de_expired() || !$lastEntryInMonth) {
|
||||
$_de->set_de_balance($_de->get_de_balance()+$_de->get_de_transaction());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user