X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=reporting%2Frep707.php;h=19a01cabbfe64952f350729c9a8839aa75d77319;hb=1c502501a16dbb08e3f031e3c3a3038540c8b296;hp=267636dac66b11b573b9214f12c6a6d787e0184e;hpb=95ff74b5722826544743a01daf527aa3c9efe11a;p=fa-stable.git diff --git a/reporting/rep707.php b/reporting/rep707.php index 267636da..19a01cab 100644 --- a/reporting/rep707.php +++ b/reporting/rep707.php @@ -252,6 +252,8 @@ function print_profit_and_loss_statement() { $begin = add_months($from, -12); $end = add_months($to, -12); + if (date_comp($to, end_month($to)) == 0) // compensate for leap years. If to-date equal end month + $end = end_month($end); // then the year-1 should also be end month $headers[3] = _('Period Y-1'); }