! -> Note
$ -> Affected files
+26-Nov-2009 Joe Hunt
+# Round to nearest value of 0 produced a division by zero error
+$ /admin/company_preferences.php
+# When printing reference numbers instead of internal numbers on documents
+ it should also refer to reference numbers in deliveries and orders.
+$ /reporting/includes/header2.inc
+
25-Nov-2009 Joe Hunt/Tom Hallman
# Fixed so total amount cannot be 0 in Bank Payments/Deposits
$ /gl/gl_bank.php
}
if ($_POST['add_pct'] == "")
$_POST['add_pct'] = -1;
+ if ($_POST['round_to'] <= 0)
+ $_POST['round_to'] = 1;
if ($input_error != 1)
{
update_company_setup($_POST['coy_name'], $_POST['coy_no'],
$col += $width;
if ($doctype == 10)
{
- $deliveries = get_parent_trans(10,$myrow['trans_no']);
+ $deliveries = get_parent_trans(ST_SALESINVOICE, $myrow['trans_no']);
$line = "";
foreach ($deliveries as $delivery)
{
+ if ($print_invoice_no == 0)
+ {
+ $ref = get_reference(ST_CUSTDELIVERY, $delivery);
+ if ($ref)
+ $delivery = $ref;
+ else
+ continue;
+ }
if ($line == "")
$line .= "$delivery";
else
}
$this->TextWrap($col, $this->row, $width, $line, 'C');
}
+ elseif ($doctype == 13)
+ {
+ $ref = $myrow['order_'];
+ if ($print_invoice_no == 0)
+ {
+ $ref = get_reference(ST_SALESORDER, $myrow['order_']);
+ if (!$ref)
+ $ref = "";
+ }
+ $this->TextWrap($col, $this->row, $width, $ref, 'C');
+ }
elseif ($doctype == 26)
$this->TextWrap($col, $this->row, $width, $myrow["location_name"], 'C');
elseif (isset($myrow['order_']))