projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0001503: Request - fee account included in bank account table
[fa-stable.git]
/
reporting
/
rep409.php
diff --git
a/reporting/rep409.php
b/reporting/rep409.php
index 24d2cd82deb3f191c46e194677dbe268e85a4a5b..57ed978d603d8d340024bc2518df4f4ed7d1c292 100644
(file)
--- a/
reporting/rep409.php
+++ b/
reporting/rep409.php
@@
-12,12
+12,7
@@
$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ?
'SA_MANUFTRANSVIEW' : 'SA_MANUFBULKREP';
// ----------------------------------------------------------------
$page_security = $_POST['PARAM_0'] == $_POST['PARAM_1'] ?
'SA_MANUFTRANSVIEW' : 'SA_MANUFBULKREP';
// ----------------------------------------------------------------
-// $ Revision: 2.0 $
-// Creator: Janusz Dobrowolski
-// date_: 2008-01-14
-// Title: Print Workorders
-// draft version!
-// ----------------------------------------------------------------
+// Title: Work Orders
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
@@
-33,7
+28,7
@@
print_workorders();
function print_workorders()
{
function print_workorders()
{
- global $path_to_root, $SysPrefs;
+ global $path_to_root, $SysPrefs
, $dflt_lang
;
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
include_once($path_to_root . "/reporting/includes/pdf_report.inc");
@@
-42,14
+37,12
@@
function print_workorders()
$email = $_POST['PARAM_2'];
$comments = $_POST['PARAM_3'];
$email = $_POST['PARAM_2'];
$comments = $_POST['PARAM_3'];
- if ($from == null)
- $from = 0;
- if ($to == null)
- $to = 0;
- $dec = user_price_dec();
+ if (!$from || !$to) return;
$fno = explode("-", $from);
$tno = explode("-", $to);
$fno = explode("-", $from);
$tno = explode("-", $to);
+ $from = min($fno[0], $tno[0]);
+ $to = max($fno[0], $tno[0]);
$cols = array(4, 60, 190, 255, 320, 385, 450, 515);
$cols = array(4, 60, 190, 255, 320, 385, 450, 515);
@@
-69,12
+62,12
@@
function print_workorders()
$rep->Info($params, $cols, null, $aligns);
}
$rep->Info($params, $cols, null, $aligns);
}
- for ($i = $f
no[0]; $i <= $tno[0]
; $i++)
+ for ($i = $f
rom; $i <= $to
; $i++)
{
$myrow = get_work_order($i);
if ($myrow === false)
continue;
{
$myrow = get_work_order($i);
if ($myrow === false)
continue;
- $date_ = sql2date($myrow["date_"]);
+ $date_ = sql2date($myrow["date_"]);
if ($email == 1)
{
$rep = new FrontReport("", "", user_pagesize());
if ($email == 1)
{
$rep = new FrontReport("", "", user_pagesize());
@@
-82,12
+75,16
@@
function print_workorders()
$rep->currency = $cur;
$rep->Font();
$rep->title = _('WORK ORDER');
$rep->currency = $cur;
$rep->Font();
$rep->title = _('WORK ORDER');
- $rep->filename = "WorkOrder" . $myrow['
reference
'] . ".pdf";
+ $rep->filename = "WorkOrder" . $myrow['
wo_ref
'] . ".pdf";
$rep->Info($params, $cols, null, $aligns);
}
else
$rep->title = _('WORK ORDER');
$rep->Info($params, $cols, null, $aligns);
}
else
$rep->title = _('WORK ORDER');
- $rep->SetCommonData($myrow, null, null, '', 26);
+
+ $contact[] = array('email' =>$myrow['email'],'lang' => $dflt_lang,
+ 'name' => $myrow['contact'], 'name2' => '', 'contact');
+
+ $rep->SetCommonData($myrow, null, null, '', 26, $contact);
$rep->NewPage();
$result = get_wo_requirements($i);
$rep->NewPage();
$result = get_wo_requirements($i);
@@
-134,12
+131,18
@@
function print_workorders()
$rep->NewLine(1);
$rep->TextCol(0, 5," *** = "._("Insufficient stock"), -2);
$rep->NewLine(1);
$rep->TextCol(0, 5," *** = "._("Insufficient stock"), -2);
- $
comments = get_comments
(ST_WORKORDER, $i);
- if ($
comments && db_num_rows($comments)
)
+ $
memo = get_comments_string
(ST_WORKORDER, $i);
+ if ($
memo != ""
)
{
$rep->NewLine();
{
$rep->NewLine();
- while ($comment=db_fetch($comments))
- $rep->TextColLines(0, 6, $comment['memo_'], -2);
+ $rep->TextColLines(1, 5, $memo, -2);
+ }
+
+ if ($email == 1)
+ {
+ $myrow['DebtorName'] = $myrow['contact'];
+ $myrow['reference'] = $myrow['wo_ref'];
+ $rep->End($email);
}
}
if ($email == 0)
}
}
if ($email == 0)