コード例 #1
0
ファイル: orders_posintz.class.php プロジェクト: GGF/baza4
 public function action_edit($id)
 {
     if (!Auth::getInstance()->getRights($this->getName(), 'edit')) {
         return $this->view->getMessage('Нет прав на редактирование');
     }
     extract($_SESSION[Auth::$lss]);
     // тут данные выбранных до сих пор заказа и тз
     if (empty($id)) {
         // добавить плату в ТЗ
         if (empty($tz_id)) {
             return $this->getMessage('Не известно куда добавлять выбери ТЗ!');
         } else {
             return parent::action_edit($id);
         }
     } else {
         // выбрана плата - вывести предложение создать рассчет
         $url = $this->model->getFileLinkForRaschet(array(id => $id));
         if ($url) {
             $rec[rasslink] = $url;
         } else {
             $rec[createlink] = $this->actUri('createras', $id)->url();
         }
         return $this->getMessage($this->view->showbutton($rec));
     }
 }
コード例 #2
0
ファイル: orders_boards.class.php プロジェクト: GGF/baza4
 public function action_index($all = '', $order = '', $find = '', $idstr = '')
 {
     //        $customer = $this->model->getCustomer($_SESSION[customer_id]);
     //        $customer = $customer[customer];
     //        $this->title = empty($_SESSION[customer_id]) ? "Выберите заказчика" : "Заказчик - {$customer}";
     return parent::action_index($all, $order, $find, $idstr);
 }
コード例 #3
0
ファイル: setting_show.class.php プロジェクト: GGF/baza4
 public function action_edit($id)
 {
     if (!empty($id)) {
         $rec = $this->model->getRecord($id);
         $out = $this->view->showrec($rec);
         return $this->view->getMessage($out);
     } else {
         return parent::action_edit($id);
     }
 }
コード例 #4
0
ファイル: storage_moves.class.php プロジェクト: GGF/baza4
 public function action_index($all = '', $order = '', $find = '', $idstr = '')
 {
     $tovar = $this->model->getTovar($_SESSION[Auth::$lss][tovarid]);
     $ost = $this->model->getOst($_SESSION[Auth::$lss][tovarid]);
     $ost = $ost[ost];
     $edizm = $tovar[edizm];
     $nazv = $tovar[nazv];
     $this->title = empty($_SESSION[Auth::$lss][tovarid]) ? "" : "Движения - {$nazv} - остаток - {$ost} {$edizm}";
     return parent::action_index($all, $order, $find, $idstr);
 }
コード例 #5
0
ファイル: orders_tz.class.php プロジェクト: GGF/baza4
 public function action_index($all = '', $order = '', $find = '', $idstr = '')
 {
     extract($_SESSION[Auth::$lss]);
     $customer = $this->model->getCustomer($customer_id);
     $customer = $customer[customer];
     $orderarr = $this->model->getOrder($order_id);
     $date = $orderarr[orderdate];
     $orderstr = $orderarr[number];
     $this->title = empty($customer_id) ? "" : "Заказчик - {$customer} ";
     $this->title .= empty($order_id) ? "" : "Заказ - {$orderstr} от {$date} ";
     return parent::action_index($all, $order, $find, $idstr);
 }
コード例 #6
0
ファイル: storage_request.class.php プロジェクト: GGF/baza4
 public function action_index($all = '', $order = '', $find = '', $idstr = '')
 {
     $data[dates] = $this->model->getDates();
     $idstr = empty($_REQUEST[ddate]) ? $data[dates][0][ddate] : $_REQUEST[ddate];
     $data[ddate] = $idstr;
     $this->title = $this->view->getTitle($data);
     $out = '';
     $out .= '<form class="lego" name=requestform action="' . $this->actUri('print')->ajaxurl($this->getName()) . '" >';
     $this->findbutton = false;
     $out .= parent::action_index($all, $order, $find, $idstr);
     $out .= '</form>';
     //$out .= $this->getHeaderBlock();
     return $out;
 }
コード例 #7
0
 public function action_index($all = '', $order = '', $find = '', $idstr = '')
 {
     $month = $_REQUEST[selectmonth];
     $sdate = $_REQUEST[sdate];
     $edate = $_REQUEST[edate];
     $idstr = !empty($month) ? "month:{$month}" : (!empty($sdate) ? "range:{$sdate}:{$edate}" : '');
     $this->title = "";
     if (empty($idstr) || !empty($month)) {
         $this->title .= '<form method=get action=' . $this->actUri('index')->url() . ' name="monthform">';
         $this->title .= 'Отчет за месяц:<select id=month name=selectmonth>';
         $res = $this->model->getMonths();
         foreach ($res as $rs) {
             $this->title .= "<option value=" . ($rs["dmonth"] * 10000 + $rs["dyear"]) . " " . (floor($month / 10000) == $rs["dmonth"] && $month % 10000 == $rs["dyear"] ? "SELECTED" : "") . ">" . sprintf("%02d", $rs["dmonth"]) . "-" . $rs["dyear"] . "</option>";
         }
         $this->title .= "</select><input type=button id=monthbutton class='noprint' value='Отчет'></form>";
     }
     if (empty($idstr) || !empty($sdate)) {
         if (empty($sdate)) {
             $sdate = date("d.m.Y");
         }
         if (empty($edate)) {
             $edate = date("d.m.Y");
         }
         $this->title .= "<form method=get name=peroidreport id=form_peroidreport action='" . $this->actUri('index')->url() . "'>";
         $this->title .= "Отчет за период: с ";
         $this->title .= "<input size=10 datepicker=1  name='sdate' value='{$sdate}' type=text >";
         $this->title .= " по ";
         $this->title .= "<input size=10 datepicker=1 name='edate' value='{$edate}' type=text >";
         $this->title .= "<input type=button id=rangebutton class='noprint' value='Отчет'>";
         $this->title .= "</form>";
     }
     if (!empty($idstr)) {
         $this->title .= '<input type="button" class="noprint" value="Скопировать для  excel" id="copytable" onclick="copytable();$(\'#copytable\').val(\'Готово\')">';
     }
     //$this->title.= $this->getHeaderBlock();
     return parent::action_index($all, $order, $find, $idstr);
 }
コード例 #8
0
ファイル: lanch_mp.class.php プロジェクト: GGF/baza4
 public function init()
 {
     parent::init();
     $this->addbutton = false;
 }