<?php
include_once('c_mo.php') ;
class c_page_cab_mo_template extends c_page_cab_mo
{
 public $h1='Заполнение документа по МО' ;
 public $rec_doc=array();

 function block_main()
 { 
    if ($this->filter['doc_code']) $this->rec_doc=$this->docs[$this->filter['doc_code']]['doc'] ;
     if ($this->filter['doc_id']) $this->rec_doc=DOCS()->get_doc_by_id($this->filter['doc_id']) ;

     if ($this->rec_doc['pkey'])
     {  $this->page_title('Редактирование документа "'.$this->rec_doc['obj_name'].'"') ;
        $report_obj=REPORTS()->get_report_obj_by_code($this->rec_doc['report_code']) ;
        $report_obj->filter['doc_id']=$this->rec_doc['pkey'];
        $report_obj->filter['mo_id']=$this->rec_mo['pkey'];
        $report_obj->content_edit() ;
     }

   
 }

 /*  нужно только на этапе отладки
 function generate_PDF()
 {
 } */

}

?>