projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Record status edition added.
[fa-stable.git]
/
reporting
/
rep705.php
diff --git
a/reporting/rep705.php
b/reporting/rep705.php
index c26a1ebb15ff6d795edc74546fe5de7cb88384fc..699cc28a063b258a87d339ed603e40e29e96c40f 100644
(file)
--- a/
reporting/rep705.php
+++ b/
reporting/rep705.php
@@
-1,13
+1,13
@@
<?php
/**********************************************************************
Copyright (C) FrontAccounting, LLC.
<?php
/**********************************************************************
Copyright (C) FrontAccounting, LLC.
- Released under the terms of the GNU
Affero General Public License,
- AGPL, as published by the Free Software Foundation, either version
-
3
of the License, or (at your option) any later version.
+ Released under the terms of the GNU
General Public License, GPL,
+ as published by the Free Software Foundation, either version 3
+ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- See the License here <http://www.gnu.org/licenses/
a
gpl-3.0.html>.
+ See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
$page_security = 2;
// ----------------------------------------------------------------
***********************************************************************/
$page_security = 2;
// ----------------------------------------------------------------
@@
-25,16
+25,12
@@
include_once($path_to_root . "/gl/includes/gl_db.inc");
//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------
-// trial_inquiry_controls();
print_annual_expense_breakdown();
//----------------------------------------------------------------------------------------------------
function getPeriods($year, $account, $dimension, $dimension2)
{
print_annual_expense_breakdown();
//----------------------------------------------------------------------------------------------------
function getPeriods($year, $account, $dimension, $dimension2)
{
- //$yr = date('Y');
- //$mo = date('m'):
- // from now
$yr = $year;
$mo = 12;
$date13 = date('Y-m-d',mktime(0,0,0,$mo+1,1,$yr));
$yr = $year;
$mo = 12;
$date13 = date('Y-m-d',mktime(0,0,0,$mo+1,1,$yr));
@@
-81,7
+77,6
@@
function print_annual_expense_breakdown()
{
global $path_to_root, $date_system;
{
global $path_to_root, $date_system;
- include_once($path_to_root . "/reporting/includes/pdf_report.inc");
$dim = get_company_pref('use_dimension');
$dimension = $dimension2 = 0;
$dim = get_company_pref('use_dimension');
$dimension = $dimension2 = 0;
@@
-91,18
+86,26
@@
function print_annual_expense_breakdown()
$dimension = $_POST['PARAM_1'];
$dimension2 = $_POST['PARAM_2'];
$comments = $_POST['PARAM_3'];
$dimension = $_POST['PARAM_1'];
$dimension2 = $_POST['PARAM_2'];
$comments = $_POST['PARAM_3'];
+ $destination = $_POST['PARAM_4'];
}
else if ($dim == 1)
{
$year = $_POST['PARAM_0'];
$dimension = $_POST['PARAM_1'];
$comments = $_POST['PARAM_2'];
}
else if ($dim == 1)
{
$year = $_POST['PARAM_0'];
$dimension = $_POST['PARAM_1'];
$comments = $_POST['PARAM_2'];
+ $destination = $_POST['PARAM_3'];
}
else
{
$year = $_POST['PARAM_0'];
$comments = $_POST['PARAM_1'];
}
else
{
$year = $_POST['PARAM_0'];
$comments = $_POST['PARAM_1'];
+ $destination = $_POST['PARAM_2'];
}
}
+ if ($destination)
+ include_once($path_to_root . "/reporting/includes/excel_report.inc");
+ else
+ include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+
$dec = 1;
//$pdec = user_percent_dec();
$dec = 1;
//$pdec = user_percent_dec();
@@
-169,7
+172,7
@@
function print_annual_expense_breakdown()
'to' => ''));
}
'to' => ''));
}
- $rep = new FrontReport(_('Annual Expense Breakdown'), "AnnualBreakDown
.pdf
", user_pagesize());
+ $rep = new FrontReport(_('Annual Expense Breakdown'), "AnnualBreakDown", user_pagesize());
$rep->Font();
$rep->Info($params, $cols, $headers, $aligns);
$rep->Font();
$rep->Info($params, $cols, $headers, $aligns);
@@
-205,27
+208,29
@@
function print_annual_expense_breakdown()
{
if ($group != '')
{
{
if ($group != '')
{
- $rep->Line($rep->row + 6);
- $rep->row -= 6;
+ $rep->row += 6;
+ $rep->Line($rep->row);
+ $rep->NewLine();
$rep->TextCol(0, 2, _('Total') . " " . $group);
for ($i = 1; $i <= 12; $i++)
$rep->TextCol(0, 2, _('Total') . " " . $group);
for ($i = 1; $i <= 12; $i++)
- $rep->
TextCol($i + 1, $i + 2, number_format2($total[$i], $dec)
);
+ $rep->
AmountCol($i + 1, $i + 2, $total[$i], $dec
);
$total = Array(1 => 0,0,0,0,0,0,0,0,0,0,0,0);
$total = Array(1 => 0,0,0,0,0,0,0,0,0,0,0,0);
- $rep->
row -= ($rep->lineHeight + 4
);
+ $rep->
NewLine(
);
if ($closeclass)
{
if ($closeclass)
{
- $rep->Line($rep->row + 6);
- $rep->row -= 6;
+ $rep->row += 6;
+ $rep->Line($rep->row);
+ $rep->NewLine();
$rep->Font('bold');
$rep->TextCol(0, 2, _('Total') . " " . $classname);
for ($i = 1; $i <= 12; $i++)
{
$rep->Font('bold');
$rep->TextCol(0, 2, _('Total') . " " . $classname);
for ($i = 1; $i <= 12; $i++)
{
- $rep->
TextCol($i + 1, $i + 2, number_format2($total2[$i], $dec)
);
+ $rep->
AmountCol($i + 1, $i + 2, $total2[$i], $dec
);
$sales[$i] += $total2[$i];
}
$rep->Font();
$total2 = Array(1 => 0,0,0,0,0,0,0,0,0,0,0,0);
$sales[$i] += $total2[$i];
}
$rep->Font();
$total2 = Array(1 => 0,0,0,0,0,0,0,0,0,0,0,0);
- $rep->NewLine(
3
);
+ $rep->NewLine(
2
);
$closeclass = false;
}
}
$closeclass = false;
}
}
@@
-234,19
+239,21
@@
function print_annual_expense_breakdown()
$rep->Font('bold');
$rep->TextCol(0, 5, $account['AccountClassName']);
$rep->Font();
$rep->Font('bold');
$rep->TextCol(0, 5, $account['AccountClassName']);
$rep->Font();
- $rep->
row -= ($rep->lineHeight + 4
);
+ $rep->
NewLine(
);
}
$group = $account['AccountTypeName'];
}
$group = $account['AccountTypeName'];
+ $rep->row -= 4;
$rep->TextCol(0, 5, $account['AccountTypeName']);
$rep->TextCol(0, 5, $account['AccountTypeName']);
- $rep->Line($rep->row - 4);
- $rep->row -= ($rep->lineHeight + 4);
+ $rep->row -= 4;
+ $rep->Line($rep->row);
+ $rep->NewLine();
}
$classname = $account['AccountClassName'];
$rep->TextCol(0, 1, $account['account_code']);
$rep->TextCol(1, 2, $account['account_name']);
for ($i = 1; $i <= 12; $i++)
{
}
$classname = $account['AccountClassName'];
$rep->TextCol(0, 1, $account['account_code']);
$rep->TextCol(1, 2, $account['account_name']);
for ($i = 1; $i <= 12; $i++)
{
- $rep->
TextCol($i + 1, $i + 2, number_format2($balance[$i], $dec)
);
+ $rep->
AmountCol($i + 1, $i + 2, $balance[$i], $dec
);
$total[$i] += $balance[$i];
$total2[$i] += $balance[$i];
}
$total[$i] += $balance[$i];
$total2[$i] += $balance[$i];
}
@@
-270,29
+277,31
@@
function print_annual_expense_breakdown()
{
if ($group != '')
{
{
if ($group != '')
{
- $rep->Line($rep->row + 6);
- $rep->row -= 6;
+ $rep->row += 6;
+ $rep->Line($rep->row);
+ $rep->NewLine();
$rep->TextCol(0, 2, _('Total') . " " . $group);
for ($i = 1; $i <= 12; $i++)
$rep->TextCol(0, 2, _('Total') . " " . $group);
for ($i = 1; $i <= 12; $i++)
- $rep->
TextCol($i + 1, $i + 2, number_format2($total[$i], $dec)
);
- $rep->
row -= ($rep->lineHeight + 4
);
+ $rep->
AmountCol($i + 1, $i + 2, $total[$i], $dec
);
+ $rep->
NewLine(
);
if ($closeclass)
{
if ($closeclass)
{
- $rep->Line($rep->row + 6);
- $rep->row -= 6;
+ $rep->row += 6;
+ $rep->Line($rep->row);
+ $rep->NewLine();
$rep->Font('bold');
$rep->TextCol(0, 2, _('Total') . " " . $classname);
for ($i = 1; $i <= 12; $i++)
{
$rep->Font('bold');
$rep->TextCol(0, 2, _('Total') . " " . $classname);
for ($i = 1; $i <= 12; $i++)
{
- $rep->
TextCol($i + 1, $i + 2, number_format2($total2[$i], $dec)
);
+ $rep->
AmountCol($i + 1, $i + 2, $total2[$i], $dec
);
$calc[$i] = $sales[$i] + $total2[$i];
}
$calc[$i] = $sales[$i] + $total2[$i];
}
- $rep->
row -= ($rep->lineHeight + 8
);
+ $rep->
NewLine(2
);
$rep->TextCol(0, 2, _('Calculated Return'));
for ($i = 1; $i <= 12; $i++)
$rep->TextCol(0, 2, _('Calculated Return'));
for ($i = 1; $i <= 12; $i++)
- $rep->
TextCol($i + 1, $i + 2, number_format2($calc[$i], $dec)
);
+ $rep->
AmountCol($i + 1, $i + 2, $calc[$i], $dec
);
$rep->Font();
$rep->NewLine();
$rep->Font();
$rep->NewLine();