- if ($doctype == ST_PURCHORDER || $doctype == ST_SUPPAYMENT)
- $this->TextWrap($col, $this->row, $width, $this->formData['supp_account_no'], 'C');
- elseif ($doctype == ST_WORKORDER)
- $this->TextWrap($col, $this->row, $width, $this->formData['wo_ref'], 'C');
- elseif (isset($this->formData["customer_ref"]))
- $this->TextWrap($col, $this->row, $width, $this->formData["customer_ref"], 'C');
- elseif (isset($this->formData["debtor_ref"]))
- $this->TextWrap($col, $this->row, $width, $this->formData["debtor_ref"], 'C');
- $col += $width;
- if (isset($this->formData['salesman']))
- {
- $id = $this->formData['salesman'];
- //$sql = "SELECT salesman_name FROM ".TB_PREF."salesman WHERE salesman_code='$id'";
- //$result = db_query($sql,"could not get sales person");
- //$row = db_fetch($result);
- //$this->TextWrap($col, $this->row, $width, $row['salesman_name'], 'C');
- $this->TextWrap($col, $this->row, $width, get_salesman_name($id), 'C');
- }
- elseif ($doctype == ST_SUPPAYMENT || $doctype == ST_CUSTPAYMENT)
- $this->TextWrap($col, $this->row, $width, $systypes_array[$this->formData["type"]], 'C');
- elseif ($doctype == ST_WORKORDER)
- $this->TextWrap($col, $this->row, $width, $wo_types_array[$this->formData["type"]], 'C');
- $col += $width;
- if ($doctype == ST_WORKORDER)
- $this->TextWrap($col, $this->row, $width, $this->formData["StockItemName"], 'C');
- elseif ($doctype != ST_PURCHORDER && isset($this->formData['tax_id']))
- $this->TextWrap($col, $this->row, $width, $this->formData['tax_id'], 'C');
- $col += $width;
- if ($doctype == ST_SALESINVOICE)
- {
- $deliveries = get_sales_parent_numbers(ST_SALESINVOICE, $this->formData['trans_no']);
- if ($print_invoice_no == 0)
- {
- foreach($deliveries as $n => $delivery) {
- $deliveries[$n] = get_reference(ST_CUSTDELIVERY, $delivery);
- }
- }
- $this->TextWrap($col, $this->row, $width, implode(',', $deliveries), 'C');
- }
- elseif ($doctype == ST_CUSTDELIVERY)