projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Accounts entry. We only accept 0-9 and a dot if $accounts_alpha = 0 (default)
[fa-stable.git]
/
reporting
/
rep106.php
diff --git
a/reporting/rep106.php
b/reporting/rep106.php
index bc3889359764e2428ed19688cd4b290f9f3e0ced..c8a5538533278bb0ad3273d03b28881915256d8d 100644
(file)
--- a/
reporting/rep106.php
+++ b/
reporting/rep106.php
@@
-9,12
+9,12
@@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$page_security =
2
;
+$page_security =
'SA_SALESMANREP'
;
// ----------------------------------------------------------------
// $ Revision: 2.0 $
// Creator: Joe Hunt
// date_: 2005-05-19
// ----------------------------------------------------------------
// $ Revision: 2.0 $
// Creator: Joe Hunt
// date_: 2005-05-19
-// Title:
Order Status Lis
t
+// Title:
Salesman Repor
t
// ----------------------------------------------------------------
$path_to_root="..";
// ----------------------------------------------------------------
$path_to_root="..";
@@
-45,7
+45,7
@@
function GetSalesmanTrans($from, $to)
AND ".TB_PREF."sales_orders.branch_code=".TB_PREF."cust_branch.branch_code
AND ".TB_PREF."cust_branch.salesman=".TB_PREF."salesman.salesman_code
AND ".TB_PREF."debtor_trans.debtor_no=".TB_PREF."debtors_master.debtor_no
AND ".TB_PREF."sales_orders.branch_code=".TB_PREF."cust_branch.branch_code
AND ".TB_PREF."cust_branch.salesman=".TB_PREF."salesman.salesman_code
AND ".TB_PREF."debtor_trans.debtor_no=".TB_PREF."debtors_master.debtor_no
- AND (".TB_PREF."debtor_trans.type=
10 OR ".TB_PREF."debtor_trans.type=11
)
+ AND (".TB_PREF."debtor_trans.type=
".ST_SALESINVOICE." OR ".TB_PREF."debtor_trans.type=".ST_CUSTCREDIT."
)
AND ".TB_PREF."debtor_trans.tran_date>='$fromdate'
AND ".TB_PREF."debtor_trans.tran_date<='$todate'
ORDER BY ".TB_PREF."salesman.salesman_code, ".TB_PREF."debtor_trans.tran_date";
AND ".TB_PREF."debtor_trans.tran_date>='$fromdate'
AND ".TB_PREF."debtor_trans.tran_date<='$todate'
ORDER BY ".TB_PREF."salesman.salesman_code, ".TB_PREF."debtor_trans.tran_date";
@@
-63,18
+63,20
@@
function print_salesman_list()
$to = $_POST['PARAM_1'];
$summary = $_POST['PARAM_2'];
$comments = $_POST['PARAM_3'];
$to = $_POST['PARAM_1'];
$summary = $_POST['PARAM_2'];
$comments = $_POST['PARAM_3'];
- $destination = $_POST['PARAM_4'];
+ $orientation = $_POST['PARAM_4'];
+ $destination = $_POST['PARAM_5'];
if ($destination)
include_once($path_to_root . "/reporting/includes/excel_report.inc");
else
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
if ($destination)
include_once($path_to_root . "/reporting/includes/excel_report.inc");
else
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
+ $orientation = ($orientation ? 'L' : 'P');
if ($summary == 0)
$sum = _("No");
else
$sum = _("Yes");
if ($summary == 0)
$sum = _("No");
else
$sum = _("Yes");
- $dec = user_
qty
_dec();
+ $dec = user_
price
_dec();
$cols = array(0, 60, 150, 220, 325, 385, 450, 515);
$cols = array(0, 60, 150, 220, 325, 385, 450, 515);
@@
-90,14
+92,16
@@
function print_salesman_list()
1 => array( 'text' => _('Period'), 'from' => $from, 'to' => $to),
2 => array( 'text' => _('Summary Only'),'from' => $sum,'to' => ''));
1 => array( 'text' => _('Period'), 'from' => $from, 'to' => $to),
2 => array( 'text' => _('Summary Only'),'from' => $sum,'to' => ''));
- $cols2 = $cols;
$aligns2 = $aligns;
$aligns2 = $aligns;
- $rep = new FrontReport(_('Salesman Listing'), "SalesmanListing", user_pagesize());
+ $rep = new FrontReport(_('Salesman Listing'), "SalesmanListing", user_pagesize(), 9, $orientation);
+ if ($orientation == 'L')
+ recalculate_cols($cols);
+ $cols2 = $cols;
$rep->Font();
$rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);
$rep->Font();
$rep->Info($params, $cols, $headers, $aligns, $cols2, $headers2, $aligns2);
- $rep->
Header
();
+ $rep->
NewPage
();
$salesman = 0;
$subtotal = $total = $subprov = $provtotal = 0;
$salesman = 0;
$subtotal = $total = $subprov = $provtotal = 0;
@@
-105,11
+109,6
@@
function print_salesman_list()
while ($myrow=db_fetch($result))
{
while ($myrow=db_fetch($result))
{
- if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight))
- {
- $salesman = 0;
- $rep->Header();
- }
$rep->NewLine(0, 2, false, $salesman);
if ($salesman != $myrow['salesman_code'])
{
$rep->NewLine(0, 2, false, $salesman);
if ($salesman != $myrow['salesman_code'])
{
@@
-152,11
+151,6
@@
function print_salesman_list()
$rep->AmountCol(5, 6, $amt, $dec);
$rep->AmountCol(6, 7, $prov, $dec);
$rep->NewLine();
$rep->AmountCol(5, 6, $amt, $dec);
$rep->AmountCol(6, 7, $prov, $dec);
$rep->NewLine();
- if ($rep->row < $rep->bottomMargin + (2 * $rep->lineHeight))
- {
- $salesman = 0;
- $rep->Header();
- }
}
$subtotal += $amt;
$subprov += $prov;
}
$subtotal += $amt;
$subprov += $prov;