web: start and end date only compared to current date and not selected one

This commit is contained in:
Grégory Soutadé 2018-05-07 17:23:04 +02:00
parent 1628b29a35
commit fe6bb52c52

View File

@ -223,7 +223,8 @@ function toggleOperations(parent, operations)
<?php
foreach($_SESSION["user"]->accounts as $i => $account)
{
if ($account["hidden"] == "1" || $account["end"] < (date("Y-m") . "-01") || $account["start"] > (date("Y-m") . "-30")) continue;
$cur_date = $_SESSION["cur_year"] . "-" . $_SESSION["cur_month"];
if ($account["hidden"] == "1" || $account["end"] < ($cur_date . "-01") || $account["start"] > ($cur_date . "-30")) continue;
$val = GetAccountAmount($account["id"], $_SESSION["cur_month"], $_SESSION["cur_year"]);
echo "<tr class='bordered'>";
if ($account["shared"] == "1")