function _makeHeader() { $this->SetFont($this->font, '', 10); // if (count($this->supplier)) { // $this->_orderAttr = $billing->replace_contact_with_supplier($this->_orderAttr, $this->supplier); // } $this->setXY($this->_template['left_col_left'], $this->_template['left_col_top']); $width = $this->_template['right_col_left'] - $this->_template['left_col_left']; $this->SetFont($this->font, 'B', 16); $this->Cell($width, 16, $this->_template['title'], 0, 18); $this->SetFont($this->font, '', 10); $this->MultiCell($width, 12, nl2br($this->_replaceFields($this->_template['left_col'])), 0, 'J', 0, 1, '', '', true, 0, true); $left_col_bottom = $this->GetY(); $this->setXY($this->_template['right_col_left'], $this->_template['right_col_top']); $width = $this->getPageWidth() - $this->_template['right_col_left'] - $this->_template['margin_right']; $this->MultiCell($width, 12, nl2br($this->_replaceFields($this->_template['right_col'])), 0, 'J', 0, 1, '', '', true, 0, true); $right_col_bottom = $this->getY(); $this->setXY($this->lMargin, $left_col_bottom); $keep_old = false; if (strpos($this->_template['left_col'], '%order_data%') === false && strpos($this->_template['right_col'], '%order_data%') === false && strpos($this->_template['right_col'], '%order_id%') === false && strpos($this->_template['left_col'], '%order_id%') === false) { $keep_old = true; } if ($keep_old) { $this->ln(20); if (!empty($this->_template['show_reference']) && !empty($this->_orderAttr['reference'])) { $this->SetFont($this->font, 'B', 10); $this->cell(120, 12, $this->_template['reference_name'] . ':'); $this->SetFont($this->font, '', 10); $this->cell(120, 12, $this->_orderAttr['reference']); $this->ln(); } if (GO::modules()->isInstalled("webshop") && ($linkedOrder = $this->_order->getFirstLinkedOrder())) { $this->SetFont($this->font, 'B', 10); $this->cell(120, 12, 'Order no.:'); $this->SetFont($this->font, '', 10); $this->cell(120, 12, $linkedOrder->order_id); $this->ln(); } $this->SetFont($this->font, 'B', 10); $this->cell(120, 12, $this->_template['number_name'] . ':'); $this->SetFont($this->font, '', 10); $this->cell(120, 12, $this->_orderAttr['order_id']); $this->ln(); $this->SetFont($this->font, 'B', 10); $this->cell(120, 12, $this->_template['date_name'] . ':'); $this->SetFont($this->font, '', 10); $this->cell(120, 12, $this->_orderAttr['btime']); $this->ln(); $date_sent = \GO\Base\Util\Date::get_timestamp(time(), false); if ($this->_template['show_date_sent']) { $this->SetFont($this->font, 'B', 10); $this->cell(120, 12, \GO::t('date_sent', 'billing') . ':'); $this->SetFont($this->font, '', 10); $this->cell(120, 12, $date_sent); $this->ln(); } $left_col_bottom = $this->GetY(); } if ($right_col_bottom > $left_col_bottom) { $this->setY($right_col_bottom); } $this->Ln(20); }