projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed amibiguity in few text messages to make translations easier, updated gettext...
[fa-stable.git]
/
reporting
/
includes
/
doctext.inc
diff --git
a/reporting/includes/doctext.inc
b/reporting/includes/doctext.inc
index de3082a9e1eadd6dfe906313b37786ac1219ccad..439d7b8f0e11f44297aea5b74774ec5310b6d92c 100644
(file)
--- a/
reporting/includes/doctext.inc
+++ b/
reporting/includes/doctext.inc
@@
-14,6
+14,8
@@
* Set document type dependent elements of common page layout.
*
*/
* Set document type dependent elements of common page layout.
*
*/
+ global $SysPrefs;
+
$Addr1 = array(
'title' => _("Charge To"),
'name' => @$this->formData['br_name'] ? $this->formData['br_name'] : @$this->formData['DebtorName'],
$Addr1 = array(
'title' => _("Charge To"),
'name' => @$this->formData['br_name'] ? $this->formData['br_name'] : @$this->formData['DebtorName'],
@@
-34,10
+36,7
@@
if (!in_array($this->formData['doctype'], array(ST_STATEMENT, ST_WORKORDER)))
{
if (!in_array($this->formData['doctype'], array(ST_STATEMENT, ST_WORKORDER)))
{
- $id = $this->formData['payment_terms'];
- $sql = "SELECT terms, days_before_due FROM ".TB_PREF."payment_terms WHERE terms_indicator=".db_escape($id);
- $result = db_query($sql,"could not get paymentterms");
- $row = db_fetch($result);
+ $row = get_payment_terms($this->formData['payment_terms']);
$Payment_Terms = _("Payment Terms") . ': ' . $row["terms"];
if ($this->formData['doctype'] == ST_SALESINVOICE && $this->formData['prepaid'])
$this->formData['prepaid'] = ($row['days_before_due'] >= 0) ? 'final' : 'partial';
$Payment_Terms = _("Payment Terms") . ': ' . $row["terms"];
if ($this->formData['doctype'] == ST_SALESINVOICE && $this->formData['prepaid'])
$this->formData['prepaid'] = ($row['days_before_due'] >= 0) ? 'final' : 'partial';