Ejemplo n.º 1
0
 public function Draw($data)
 {
     parent::Draw($data);
     $template_file = ConfigHelper::getConfig('notes.template_file');
     if (!$this->smarty->templateExists($template_file)) {
         $template_file = 'note' . DIRECTORY_SEPARATOR . $template_file;
     }
     $this->smarty->assign('note', $this->data);
     $this->contents .= $this->smarty->fetch($template_file);
 }
Ejemplo n.º 2
0
 public function Draw($data)
 {
     parent::Draw($data);
     $template_file = ConfigHelper::getConfig('receipts.template_file');
     if (!$this->smarty->templateExists('file:' . $template_file)) {
         $template_file = 'receipt' . DIRECTORY_SEPARATOR . $template_file;
     }
     $this->smarty->assign('type', $this->data['which']);
     $this->smarty->assign('receipt', $this->data);
     $this->contents .= $this->smarty->fetch('file:' . $template_file);
 }
Ejemplo n.º 3
0
 public function Draw($data)
 {
     parent::Draw($data);
     if (isset($this->data['invoice'])) {
         $template_file = ConfigHelper::getConfig('invoices.cnote_template_file');
     } else {
         $template_file = ConfigHelper::getConfig('invoices.template_file');
     }
     if (!$this->smarty->templateExists('file:' . $template_file)) {
         $template_file = 'invoice' . DIRECTORY_SEPARATOR . $template_file;
     }
     $this->smarty->assign('type', $this->data['type']);
     $this->smarty->assign('duplicate', $this->data['type'] == trans('DUPLICATE'));
     $this->smarty->assign('invoice', $this->data);
     $this->contents .= $this->smarty->fetch('file:' . $template_file);
 }