projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
PHP 7.X produces A non-numeric value encountered in \includes\date_functions.inc...
[fa-stable.git]
/
reporting
/
rep707.php
diff --git
a/reporting/rep707.php
b/reporting/rep707.php
index bd13ff9b218e4da2092999b2e7dad996b65cf397..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);
{
$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');
}
$headers[3] = _('Period Y-1');
}
@@
-330,7
+332,7
@@
function print_profit_and_loss_statement()
$pg->skin = $SysPrefs->graph_skin;
$pg->built_in = false;
$pg->latin_notation = ($SysPrefs->decseps[user_dec_sep()] != ".");
$pg->skin = $SysPrefs->graph_skin;
$pg->built_in = false;
$pg->latin_notation = ($SysPrefs->decseps[user_dec_sep()] != ".");
- $filename = company_path(). "/pdf_files/".
uniqid(""
).".png";
+ $filename = company_path(). "/pdf_files/".
random_id(
).".png";
$pg->display($filename, true);
$w = $pg->width / 1.5;
$h = $pg->height / 1.5;
$pg->display($filename, true);
$w = $pg->width / 1.5;
$h = $pg->height / 1.5;