projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup
[fa-stable.git]
/
reporting
/
rep202.php
diff --git
a/reporting/rep202.php
b/reporting/rep202.php
index 2245ae01ca0bab5d52d2163da985b3e0094dbf8a..3f68bb5adcbe094115247a67361dd382baeef146 100644
(file)
--- a/
reporting/rep202.php
+++ b/
reporting/rep202.php
@@
-37,7
+37,7
@@
function get_invoices($supplier_id, $to)
// Revomed allocated from sql
$value = "(".TB_PREF."supp_trans.ov_amount + ".TB_PREF."supp_trans.ov_gst + ".TB_PREF."supp_trans.ov_discount)";
// Revomed allocated from sql
$value = "(".TB_PREF."supp_trans.ov_amount + ".TB_PREF."supp_trans.ov_gst + ".TB_PREF."supp_trans.ov_discount)";
- $due = "IF (".TB_PREF."supp_trans.type=
20 OR ".TB_PREF."supp_trans.type=21
,".TB_PREF."supp_trans.due_date,".TB_PREF."supp_trans.tran_date)";
+ $due = "IF (".TB_PREF."supp_trans.type=
".ST_SUPPINVOICE." OR ".TB_PREF."supp_trans.type=".ST_SUPPCREDIT."
,".TB_PREF."supp_trans.due_date,".TB_PREF."supp_trans.tran_date)";
$sql = "SELECT ".TB_PREF."supp_trans.type,
".TB_PREF."supp_trans.reference,
".TB_PREF."supp_trans.tran_date,
$sql = "SELECT ".TB_PREF."supp_trans.type,
".TB_PREF."supp_trans.reference,
".TB_PREF."supp_trans.tran_date,
@@
-137,10
+137,10
@@
function print_aged_supplier_analysis()
$pastdue1 = $PastDueDays1 + 1 . "-" . $PastDueDays2 . " " . _('Days');
$pastdue2 = _('Over') . " " . $PastDueDays2 . " " . _('Days');
$pastdue1 = $PastDueDays1 + 1 . "-" . $PastDueDays2 . " " . _('Days');
$pastdue2 = _('Over') . " " . $PastDueDays2 . " " . _('Days');
- $sql = "SELECT supplier_id, supp_name AS name, curr_code FROM ".TB_PREF."suppliers
";
+ $sql = "SELECT supplier_id, supp_name AS name, curr_code FROM ".TB_PREF."suppliers";
if ($fromsupp != ALL_NUMERIC)
if ($fromsupp != ALL_NUMERIC)
- $sql .= "
WHERE supplier_id=$fromsupp "
;
- $sql .= "ORDER BY supp_name";
+ $sql .= "
WHERE supplier_id=".db_escape($fromsupp)
;
+ $sql .= "
ORDER BY supp_name";
$result = db_query($sql, "The suppliers could not be retrieved");
while ($myrow=db_fetch($result))
$result = db_query($sql, "The suppliers could not be retrieved");
while ($myrow=db_fetch($result))