Ejemplo n.º 1
0
 public static function DropDown($IsEntrantDocument = 0)
 {
     $res = array();
     foreach (PersonDocumentTypes::model()->findAll("IsEntrantDocument = :IsEntrantDocument", array(":IsEntrantDocument" => $IsEntrantDocument)) as $record) {
         $res[$record->idPersonDocumentTypes] = $record->PersonDocumentTypesName;
     }
     return $res;
 }
Ejemplo n.º 2
0
<!--            <div class ="span12">-->
                <?php 
echo $form->errorSummary($model);
?>
<!--            </div>-->
</div>
<div class="row-fluid">
    <div class ="span5">
        <?php 
echo $form->hiddenField($model, '[persondoc]edboID');
?>
        <?php 
echo $form->labelEx($model, '[persondoc]TypeID');
?>
        <?php 
echo $form->dropDownList($model, '[persondoc]TypeID', PersonDocumentTypes::DropDown(2), array('class' => 'span12', 'disabled' => !empty($model->edboID)));
?>
    </div>    
    <div class ="span2">
        <?php 
echo $form->labelEx($model, '[persondoc]Series');
?>
        <?php 
echo $form->textField($model, '[persondoc]Series', array('class' => 'span12 series', 'maxlength' => 10, 'disabled' => !empty($model->edboID)));
?>
    </div>    
    <div class ="span3">
        <?php 
echo $form->labelEx($model, '[persondoc]Numbers');
?>
        <?php 
Ejemplo n.º 3
0
?>
	</div>
    <div class="span4">
        <?php 
echo $form->labelEx($model, 'PersonID');
?>
		<?php 
echo $form->dropDownList($model, 'PersonID', Person::DropDown(), array('class' => 'span12'));
?>
	</div>
    <div class="span4">
        <?php 
echo $form->labelEx($model, 'TypeID');
?>
		<?php 
echo $form->dropDownList($model, 'TypeID', PersonDocumentTypes::DropDown1(), array('class' => 'span12'));
?>
	</div>
</div>
<?php 
php;
?>
<div class="row-fluid">
    <div class="span4">
		<?php 
echo $form->label($model, 'Series');
?>
		<?php 
echo $form->textField($model, 'Series', array('class' => 'span12', 'size' => 10, 'maxlength' => 10));
?>
	</div>
Ejemplo n.º 4
0
echo $form->errorSummary($model);
?>
 
    <?php 
echo $form->hiddenField($model, "PersonID");
echo $form->hiddenField($model, "idDocuments");
echo $form->hiddenField($model, "TypeID");
?>
 
    <div class="row-fluid">
        <div class ="span12">
            <?php 
echo $form->labelEx($model, 'TypeID');
?>
            <?php 
echo $form->dropDownList($model, 'TypeID', CHtml::listData(PersonDocumentTypes::model()->findAll("display = 1"), 'idPersonDocumentTypes', 'PersonDocumentTypesName'), array('onchange' => "PSN.changeDocType(this, '{$formtype_url}')", "disabled" => $model->isNewRecord ? "" : "disabled", 'class' => 'span12'));
?>
        </div> 
    </div>
    <div class="row-fluid">
        <div class ="span6">
            <?php 
echo $form->labelEx($model, 'CopyType');
echo $form->dropDownList($model, 'CopyType', array("" => "", "Фотокомп'ютерні" => "Фотокомп'ютерні", "Поліграфічні" => "Поліграфічні"), array('class' => 'span12'));
?>
        </div> 
        <div class ="span6">
            <?php 
echo $form->labelEx($model, 'CountryID');
echo $form->dropDownList($model, 'CountryID', CHtml::listData(Country::model()->findAll(), 'idCountry', 'CountryName'), array("empty" => "", 'class' => 'span12'));
?>
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = PersonDocumentTypes::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Ejemplo n.º 6
0
<?php

//echo $form->errorSummary($model);
?>
<div class="row-fluid">
    <div class ="span5">
        <?php 
//echo $form->hiddenField($model,'[entrantdoc]idDocuments');
?>
        <?php 
echo $form->labelEx($model, '[entrantdoc]TypeID');
?>
        <?php 
echo $form->dropDownList($model, '[entrantdoc]TypeID', PersonDocumentTypes::DropDown(1), array('class' => 'span12'));
?>
    </div>    
    <div class ="span1">
        <?php 
echo $form->labelEx($model, '[entrantdoc]Series');
?>
        <?php 
echo $form->textField($model, '[entrantdoc]Series', array('class' => 'span12', 'maxlength' => 10));
?>
    </div>    
    <div class ="span2">
        <?php 
echo $form->labelEx($model, '[entrantdoc]Numbers');
?>
        <?php 
echo $form->textField($model, '[entrantdoc]Numbers', array('class' => 'span12', 'maxlength' => 15));
?>
Ejemplo n.º 7
0
 public function actionDocsendproc()
 {
     if (isset($_REQUEST["idPerson"])) {
         try {
             $res = WebServices::updatePersonDoc($_REQUEST["idPerson"]);
             $msg = "<ul>";
             $res = CJSON::decode($res);
             foreach ($res as $item) {
                 $item = (object) $item;
                 $doc = PersonDocumentTypes::model()->find("idPersonDocumentTypes = " . $item->idType);
                 $msg .= "<li>" . $doc->PersonDocumentTypesName . " - ";
                 if ($item->editStatus == 1) {
                     $msg .= "ок!";
                 } else {
                     $msg .= "error! - " . $item->message;
                 }
                 $msg .= "</li>";
             }
             $msg .= "</ul>";
             echo $msg;
         } catch (Exception $ex) {
             echo $ex->getMessage();
         }
     } else {
         echo "Необхыдно вказати ідентифікатор персони.";
     }
 }
Ejemplo n.º 8
0
 public function getTypeGroup()
 {
     $rerult = PersonDocumentTypes::model()->findByPk($this->TypeID);
     return $rerult->IsEntrantDocument;
 }
Ejemplo n.º 9
0
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'benefit-form', 'enableAjaxValidation' => false));
?>
    <div class="well">
    <div class="row-fluid">
        <div class="span3">
               <?php 
$url = Yii::app()->createUrl("personbenefits/newbenefit", array('personid' => $personid));
$this->widget('bootstrap.widgets.TbButton', array('label' => 'Додати пільгу', 'type' => 'primary', 'size' => null, 'loadingText' => 'Зачекайте...', 'htmlOptions' => array('id' => 'addBenefits', 'onclick' => "PSN.addBenefit(this,'{$url}');")));
?>
           
        </div>
    </div>
    <hr>    
    <?php 
$arr = PersonDocumentTypes::DropDown(1);
foreach ($models as $i => $model) {
    ?>
       
    <div class="row-fluid">    
         <div class="span11">
             
            <?php 
    echo $form->hiddenField($model, "[{$i}]idPersonBenefits");
    ?>
            <?php 
    echo $form->dropDownList($model, "[{$i}]BenefitID", Benefit::DropDown(4), array('class' => "span12", 'disabled' => "disabled"));
    ?>
            <?php 
    //var_dump($arr);
    foreach ($model->items as $j => $item) {
Ejemplo n.º 10
0
 /**
  * loadDocumentsFromJSON - загружает документы персоны из результата поиска в edbo по codeu персоны
  * @param type $json_string
  * @return type
  */
 public function loadDocumentsFromJSON($json_string)
 {
     //$json_string = preg_replace("/[+-]?\d+\.\d+/", '"\0"', $json_string );
     $objarr = CJSON::decode($json_string);
     Yii::log($json_string);
     Yii::log(print_r($objarr, 1));
     if (!empty($this->codeU)) {
         Yii::app()->session[$this->codeU . "-documents"] = serialize($objarr);
     }
     if (trim($json_string) == "0" && empty($json_string) && count($objarr) == 0) {
         return;
     }
     foreach ($objarr as $item) {
         $val = (object) $item;
         $model = $this;
         $types = PersonDocumentTypes::model()->findAll("IsEntrantDocument = 1");
         foreach ($types as $obj) {
             if ($obj->idPersonDocumentTypes == $val->id_Type) {
                 $doc = new Documents();
                 $doc->TypeID = $val->id_Type;
                 $doc->edboID = $val->id_Document;
                 $doc->AtestatValue = $val->attestatValue;
                 $doc->Numbers = $val->number;
                 $doc->Series = $val->series;
                 $doc->DateGet = date("d.m.Y", mktime(0, 0, 0, $val->dateGet['month'] + 1, $val->dateGet['dayOfMonth'], $val->dateGet['year']));
                 $doc->ZNOPin = $val->znoPin;
                 $doc->Issued = $val->issued;
                 $model->allentrantdocs[] = $doc;
             }
         }
         //2	Атестат про повну загальну середню освіту	1
         //3	Паспорт	2
         //4	Сертифікат ЗНО	0
         //5	Індивідуальний податковий номер	0
         //6	Медична довідка	0
         //7	Cвідоцтво про базову середню освіту	1
         //8	Cвідоцтво кваліфікованого робітника	1
         //9	Диплом кваліфікованого робітника	1
         //10	Диплом молодшого спеціаліста	1
         //11	Диплом бакалавра	1
         //12	Диплом спеціаліста	1
         //13	Диплом магістра	1
         //14	Академічна довідка	1
         //15	Витяг із заліково-екзаменаційних відомостей	1
         //16	Студентський квиток	0
         //17	Посвідка на постійне проживання в Україні
         if ($val->id_Type == 7) {
             $model->entrantdoc = new Documents();
             $model->entrantdoc->TypeID = $val->id_Type;
             $model->entrantdoc->edboID = $val->id_Document;
             $model->entrantdoc->AtestatValue = $val->attestatValue;
             $model->entrantdoc->Numbers = $val->number;
             $model->entrantdoc->Series = $val->series;
             $model->entrantdoc->DateGet = date("d.m.Y", mktime(0, 0, 0, $val->dateGet['month'] + 1, $val->dateGet['dayOfMonth'], $val->dateGet['year']));
             $model->entrantdoc->ZNOPin = $val->znoPin;
             $model->entrantdoc->Issued = $val->issued;
         }
         if ($val->id_Type == 2) {
             $model->entrantdoc = new Documents();
             $model->entrantdoc->TypeID = $val->id_Type;
             $model->entrantdoc->edboID = $val->id_Document;
             $model->entrantdoc->AtestatValue = $val->attestatValue;
             $model->entrantdoc->Numbers = $val->number;
             $model->entrantdoc->Series = $val->series;
             $model->entrantdoc->DateGet = date("d.m.Y", mktime(0, 0, 0, $val->dateGet['month'] + 1, $val->dateGet['dayOfMonth'], $val->dateGet['year']));
             $model->entrantdoc->ZNOPin = $val->znoPin;
             $model->entrantdoc->Issued = $val->issued;
         }
         if ($val->id_Type == 11) {
             $model->entrantdoc = new Documents();
             $model->entrantdoc->TypeID = $val->id_Type;
             $model->entrantdoc->edboID = $val->id_Document;
             $model->entrantdoc->AtestatValue = $val->attestatValue;
             $model->entrantdoc->Numbers = $val->number;
             $model->entrantdoc->Series = $val->series;
             $model->entrantdoc->DateGet = date("d.m.Y", mktime(0, 0, 0, $val->dateGet['month'] + 1, $val->dateGet['dayOfMonth'], $val->dateGet['year']));
             $model->entrantdoc->ZNOPin = $val->znoPin;
             $model->entrantdoc->Issued = $val->issued;
         }
         if ($val->id_Type == 12) {
             $model->entrantdoc = new Documents();
             $model->entrantdoc->TypeID = $val->id_Type;
             $model->entrantdoc->edboID = $val->id_Document;
             $model->entrantdoc->AtestatValue = $val->attestatValue;
             $model->entrantdoc->Numbers = $val->number;
             $model->entrantdoc->Series = $val->series;
             $model->entrantdoc->DateGet = date("d.m.Y", mktime(0, 0, 0, $val->dateGet['month'] + 1, $val->dateGet['dayOfMonth'], $val->dateGet['year']));
             $model->entrantdoc->ZNOPin = $val->znoPin;
             $model->entrantdoc->Issued = $val->issued;
         }
         if ($val->id_Type == 1) {
             $model->persondoc = new Documents();
             $model->persondoc->TypeID = $val->id_Type;
             $model->persondoc->edboID = $val->id_Document;
             $model->persondoc->AtestatValue = $val->attestatValue;
             $model->persondoc->Numbers = $val->number;
             $model->persondoc->Series = $val->series;
             $model->persondoc->DateGet = date("d.m.Y", mktime(0, 0, 0, $val->dateGet['month'] + 1, $val->dateGet['dayOfMonth'], $val->dateGet['year']));
             $model->persondoc->ZNOPin = $val->znoPin;
             $model->persondoc->Issued = $val->issued;
         }
         if ($val->id_Type == 3 || $val->id_Type == 17) {
             $model->persondoc = new Documents();
             $model->persondoc->TypeID = $val->id_Type;
             $model->persondoc->edboID = $val->id_Document;
             $model->persondoc->AtestatValue = $val->attestatValue;
             $model->persondoc->Numbers = $val->number;
             $model->persondoc->Series = $val->series;
             $model->persondoc->DateGet = date("d.m.Y", mktime(0, 0, 0, $val->dateGet['month'] + 1, $val->dateGet['dayOfMonth'], $val->dateGet['year']));
             $model->persondoc->ZNOPin = $val->znoPin;
             $model->persondoc->Issued = $val->issued;
         }
         if ($val->id_Type == 5) {
             $model->inndoc = new Documents();
             $model->inndoc->TypeID = $val->id_Type;
             $model->inndoc->Numbers = $val->number;
             $model->inndoc->edboID = $val->id_Document;
         }
         if ($val->id_Type == 6) {
             $model->hospdoc = new Documents();
             $model->hospdoc->TypeID = $val->id_Type;
             $model->hospdoc->edboID = $val->id_Document;
             $model->hospdoc->DateGet = date("d.m.Y", mktime(0, 0, 0, $val->dateGet['month'] + 1, $val->dateGet['dayOfMonth'], $val->dateGet['year']));
         }
     }
 }
Ejemplo n.º 11
0
 /**
  * Метод асинхронно повертає список типів документів
  */
 public function actionDoctypes()
 {
     $models = PersonDocumentTypes::model()->findAll('1 ORDER BY PersonDocumentTypesName ASC');
     $result = array();
     foreach ($models as $model) {
         /* @var $model PersonDocumentTypes */
         $result[] = array('text' => $model->PersonDocumentTypesName, 'id' => $model->idPersonDocumentTypes);
     }
     echo CJSON::encode($result);
 }
Ejemplo n.º 12
0
$form = $this->beginWidget('CActiveForm', array('id' => 'doc-form-modal', 'enableAjaxValidation' => false));
echo $form->errorSummary($model);
?>
 
    <?php 
echo $form->hiddenField($model, "PersonID");
echo $form->hiddenField($model, "idDocuments");
?>
 
    <div class="row-fluid">
        <div class ="span6">
            <?php 
echo $form->labelEx($model, 'TypeID');
?>
            <?php 
echo $form->dropDownList($model, 'TypeID', CHtml::listData(PersonDocumentTypes::model()->findAll("display = 1"), 'idPersonDocumentTypes', 'PersonDocumentTypesName'), array('class' => 'span12'));
?>
        </div>    
        <div class ="span2">
            <?php 
echo $form->labelEx($model, 'Series');
?>
            <?php 
echo $form->textField($model, 'Series', array('class' => 'span12'));
?>
        </div>   
        <div class ="span4">
            <?php 
echo $form->labelEx($model, 'Numbers');
?>
            <?php 
Ejemplo n.º 13
0
 public static function getPersonDocTypes()
 {
     //типи документів персони
     if (empty(Personspeciality::model()->DocTypeNames)) {
         Personspeciality::model()->DocTypeNames = CHtml::ListData(PersonDocumentTypes::model()->findAll(), 'idPersonDocumentTypes', 'PersonDocumentTypesName');
     }
     return Personspeciality::model()->DocTypeNames;
 }