projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83e3bca
)
Profit and Loss Statement. Compensate for to-date = leap-year in period compare.
author
Joe Hunt
<joe.hunt.consulting@gmail.com>
Sat, 9 Sep 2017 11:58:40 +0000
(13:58 +0200)
committer
Joe Hunt
<joe.hunt.consulting@gmail.com>
Sat, 9 Sep 2017 11:58:40 +0000
(13:58 +0200)
reporting/rep707.php
patch
|
blob
|
history
diff --git
a/reporting/rep707.php
b/reporting/rep707.php
index 267636dac66b11b573b9214f12c6a6d787e0184e..19a01cabbfe64952f350729c9a8839aa75d77319 100644
(file)
--- 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');
}