fix diary (nonzero lease affects next month)

This commit is contained in:
2020-10-05 14:35:51 +02:00
parent 5e49be5362
commit 1eda10d11e

View File

@@ -622,6 +622,11 @@ class user_kid extends user_parent {
//minden lépésben az balance-t be kell állítani az előző lépésben updatelt balance-ra
if (isset($_de_obj_array[$i-1])) {
$_de->set_de_balance($_de_obj_array[$i-1]->get_de_balance());
if (date('m', strtotime($_de_obj_array[$i-1]->get_de_date())) !== date('m', strtotime($_de->get_de_date()))) {
$nonZero = false;
//$dpCountOriginal = 0;
}
}
else {
$_de->set_de_balance($balance);
@@ -744,7 +749,6 @@ class user_kid extends user_parent {
$de_array = array();
foreach ($action_assoc_array as $action) {
if ($action['object_type'] == 'training') {
$new_training = new training();
$new_training->set_training_data_by_id($action['object_id']);