private function getFormData($cdrequest = "0") { $gslabSession = Zend_Session::namespaceGet('Gslab_Session'); /* Usado para a edição de uma requisição * Remover quando criar a tela de controle de requisição * Maikon.Deletar * if($cdrequest > 0) { $requestModel = new RequestModel(); $requestData = $requestModel->fetchRow($requestModel->getRequestByCdRequest($cdrequest)); $this->view->cdrequest = $requestData->cdrequest; $this->view->cdclient = $requestData->cdclient; $this->view->cdcovenant = $requestData->cdcovenant; $this->view->cdforward = $requestData->cdforward; $this->view->idcovenantcard = $requestData->idcovenantcard; $this->view->fgpriority = $requestData->fgpriority; //$this->view->fgcollection = $requestData->fgcollection; // Completar aqui com as novas colunas da tabela 'request' // Tratar variável de data vinda do banco para colocar no formulário $dtrequestdb = $requestData->dtrequest; $date = new Zend_Date($dtrequestdb, 'YYYY-MM-dd HH:mm:ss'); $dtrequest = $date->toString('dd-MM-YYYY'); $hrrequest = $date->toString('HH:mm:ss'); $this->view->dtrequest = $dtrequest; $this->view->hrrequest = $hrrequest; //die("feshow, cdrequest: " . $cdrequest .", cdclient: ". $requestData->cdclient .", dtbirth: ". $requestData->dtbirth .", nrage: ". $this->view->nrage); } */ // Busca todos os Clientes/Pacientes, Ativos e Inativos. $clientModel = new ClientModel(); $this->view->clientData = $clientModel->fetchAll(null, 'client.nmclient'); // Busca os Guichês ativos e relacionados ao posto de coleta . $cashdeskModel = new CashdeskModel(); $cdcompany = $gslabSession['user']->cdcompany; $this->view->cashdeskData = $cashdeskModel->fetchAll("cashdesk.cdcompany = {$cdcompany} AND cashdesk.fgactive = 1", 'cashdesk.nmcashdesk'); // Busca todas as empresas, Ativas e Inativas. $companyModel = new CompanyModel(); $this->view->companyData = $companyModel->fetchAll('company.cdcompany = ' . $gslabSession['user']->cdcompany . ' OR company.cdcompanyparent = ' . $gslabSession['user']->cdcompany, 'company.nmcompany'); // Busca todos os médicos que enviaram o paciente $forwardModel = new ForwardModel(); $this->view->forwardData = $forwardModel->fetchAll(null, 'forward.nmforward'); // Busca apenas Exames Ativos(fgactive = 1) $opernatureModel = new OpernatureModel(); $this->view->opernature = $opernatureModel->fetchAll(); // Busca apenas suprimentos Ativos(fgactive = 1) $supplyModel = new SupplyModel(); $this->view->supplyData = $supplyModel->fetchAll('supply.fgactive = 1', 'supply.nmsupply'); // Busca todos os Logradouros. $addressTypeModel = new AddresstypeModel(); $this->view->addressTypeData = $addressTypeModel->getAllAddressType(); $medicinesModel = new MedicineModel(); $this->view->medicineData = $medicinesModel->fetchAll("cdsupply IS NOT NULL", 'medicine.nmmedicine'); $cashdeskModel = new CashdeskModel(); $this->view->cashdeskData = $cashdeskModel->fetchAll(null, 'cashdesk.nmcashdesk'); }
private function getFormData($cdrequest = "0") { // Busca todos os Postos de Coleta. $companyModel = new CompanyModel(); $this->view->companyData = $companyModel->fetchAll(null, 'company.nmcompany'); // Busca todos os Setores. $departmentModel = new DepartmentModel(); $this->view->departmentData = $departmentModel->fetchAll(null, 'department.nmdepartment'); }
public function indexAction() { $centerCompanyModel = new CompanyModel(); $physicallocationModel = new PhysicallocationModel(); $physicallocationData = $physicallocationModel->fetchAll(); $this->view->physicallocationData = $physicallocationData; $centerDadosArray = $centerCompanyModel->fetchAll(); $this->view->centerDadosArray = $centerDadosArray; $controllerName = $this->getRequest()->getControllerName(); $actionName = $this->getRequest()->getActionName(); $cdwindow = $this->getCdWindow($controllerName, $actionName); $_SESSION['cdwindow'] = $cdwindow; }
private function getFormData($cdrequest = "0") { /* Usado para a edição de uma requisição * Remover quando criar a tela de controle de requisição * Maikon.Deletar * if($cdrequest > 0) { $requestModel = new RequestModel(); $requestData = $requestModel->fetchRow($requestModel->getRequestByCdRequest($cdrequest)); $this->view->cdrequest = $requestData->cdrequest; $this->view->cdclient = $requestData->cdclient; $this->view->cdcovenant = $requestData->cdcovenant; $this->view->cdforward = $requestData->cdforward; $this->view->idcovenantcard = $requestData->idcovenantcard; $this->view->fgpriority = $requestData->fgpriority; //$this->view->fgcollection = $requestData->fgcollection; // Completar aqui com as novas colunas da tabela 'request' // Tratar variável de data vinda do banco para colocar no formulário $dtrequestdb = $requestData->dtrequest; $date = new Zend_Date($dtrequestdb, 'YYYY-MM-dd HH:mm:ss'); $dtrequest = $date->toString('dd-MM-YYYY'); $hrrequest = $date->toString('HH:mm:ss'); $this->view->dtrequest = $dtrequest; $this->view->hrrequest = $hrrequest; //die("feshow, cdrequest: " . $cdrequest .", cdclient: ". $requestData->cdclient .", dtbirth: ". $requestData->dtbirth .", nrage: ". $this->view->nrage); } * * * public function getPatientSituationCdRequest($cdrequest) { /////// $select = $this->select() ->from("request") ->join("client", "request.cdclient = client.cdclient") //faz a união das tabelas ->where("client.cdclient = ?", $cdrequest) //apresenta os parametros ->setIntegrityCheck(false); echo $select;die; return $select; } */ // Busca todos os Clientes/Pacientes, Ativos e Inativos. $clientModel = new ClientModel(); $this->view->clientData = $clientModel->fetchAll(null, array('client.cdclient', 'client.nmclient')); // Busca todas as empresas, Ativas e Inativas. $companyModel = new CompanyModel(); $this->view->companyData = $companyModel->fetchAll(null, 'company.nmcompany'); // Busca apenas Exames Ativos(fgactive = 1) $examinationModel = new ExaminationModel(); $this->view->examinationData = $examinationModel->fetchAll('examination.fgactive = 1', 'examination.nmexamination'); }
public function indexAction() { $covenantModel = new CovenantModel(); $selectCovenant = $covenantModel->fetchAll(); $company = new CompanyModel(); $selectCompany = $company->fetchAll('cdcompanyparent IS NULL'); $_SESSION['cdbilling'] = ''; $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $clientModel = new ClientModel(); $clientData = $clientModel->fetchAll(); $this->view->selectCovenant = $selectCovenant; $this->view->selectCompany = $selectCompany; $this->view->selectDepartment = $selectDepartment; $this->view->clientData = $clientData; }
public function __construct() { parent::__construct(); $companyModel = new CompanyModel(); $selectCompany = $companyModel->fetchAll(); $arraycompany = array(); $arraycompany['0'] = "Selecione"; foreach ($selectCompany as $selCp) { $arraycompany[$selCp->cdcompany] = $selCp->nmcompany; } $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $arraydepartment = array(); $arraydepartment['0'] = "Selecione"; foreach ($selectDepartment as $selDp) { $arraydepartment[$selDp->cddepartment] = $selDp->nmdepartment; } //Form Dados de Cadastro $this->_cdcashdesk = new Zend_Form_Element_Hidden('cdcashdesk'); $this->_cdcashdesk->setAttrib("id", "cashdesk_cdcashdesk"); $this->_idcashdesk = new Zend_Form_Element_Text('_idcashdesk'); $this->_idcashdesk->setAttrib("id", "cashdesk_idcashdesk"); $this->_idcashdesk->setLabel("Cód. Guichê *"); $this->_idcashdesk->setDecorators($this->_decoratorsDefault); $this->_idcashdesk->setRequired(true); $this->_nmcashdesk = new Zend_Form_Element_Text('nmcashdesk'); $this->_nmcashdesk->setAttrib("id", "cashdesk_nmcashdesk"); $this->_nmcashdesk->setLabel("Nome/Descrição do Guichê de Atendimento *"); $this->_nmcashdesk->setDecorators($this->_decoratorsDefault); $this->_nmcashdesk->setRequired(false); $this->_branch = new Zend_Form_Element_Select('branch'); $this->_branch->setAttrib("id", "cashdesk_branch"); $this->_branch->setAttrib("class", "multiple_select"); $this->_branch->setMultiOptions($arraycompany); $this->_branch->setLabel("Filial/Posto de Coleta *"); $this->_branch->setDecorators($this->_decoratorsDefault); $this->_branch->setRegisterInArrayValidator(true); $this->_branch->setRequired(true); $this->_department = new Zend_Form_Element_Select('department'); $this->_department->setAttrib("id", "cashdesk_department"); $this->_department->setAttrib("class", "multiple_select"); $this->_department->setMultiOptions($arraydepartment); $this->_department->setLabel("Setor *"); $this->_department->setDecorators($this->_decoratorsDefault); $this->_department->setRegisterInArrayValidator(true); $this->_department->setRequired(true); }
public function getFormCadastre() { $departmentModel = new DepartmentModel(); $departmentData = $departmentModel->fetchAll($departmentModel->getAllActiveDepartment()); $roleModel = new RoleModel(); $roleData = $roleModel->fetchAll($roleModel->select()); $departmentSupervisorModel = new DepartmentsupervisorModel(); $departmentSupervisorData = $departmentSupervisorModel->fetchAll($departmentSupervisorModel->getAllSupervisor()); $companyModel = new CompanyModel(); $companyData = $companyModel->fetchAll(); $Arraycompany = array(); $Arraycompany['0'] = 'Selecione'; foreach ($companyData as $company) { $Arraycompany[$company->cdcompany] = $company->nmfantasyname; } $this->_nmagenda = new Zend_Form_Element_Text('nmagenda'); $this->_nmagenda->setLabel("Nome da Agenda"); $this->_nmagenda->setRequired(true); $this->_nmagenda->setDecorators($this->_decoratorsRequired); $this->_nmagenda->setAttrib("id", "agenda_nmagendas"); $this->_nmagenda->setAttrib("class", "alpha nameagenda"); $this->_nmagenda->setRequired(true); $this->_cdcompany = new Zend_Form_Element_Select('cdcompany'); $this->_cdcompany->setRegisterInArrayValidator(false); $this->_cdcompany->addMultiOptions($Arraycompany); $this->_cdcompany->setLabel("Empresa"); $this->_cdcompany->setDecorators($this->_decoratorsRequired); $this->_cdcompany->setAttrib("id", "user_cdcompany"); $this->_cdcompany->setAttrib("class", "alpha"); $this->_cdcompany->setRequired(true); $this->_cdphysicallocation = new Zend_Form_Element_Select('cdphysicallocation'); $this->_cdphysicallocation->setRegisterInArrayValidator(false); $this->_cdphysicallocation->setLabel("Localização Física"); $this->_cdphysicallocation->addMultiOptions(array('0' => 'Selecione')); $this->_cdphysicallocation->setDecorators($this->_decoratorsRequired); $this->_cdphysicallocation->setAttrib("id", "company_physicallocation"); $this->_cdphysicallocation->setAttrib("class", "alpha"); $this->_cdphysicallocation->setRequired(true); $this->_gridhours = new Zend_Form_Element_Select('gridhours'); $this->_gridhours->setRegisterInArrayValidator(false); $this->_gridhours->addMultiOptions(array('1' => 'Sim', '2' => 'Não')); $this->_gridhours->setLabel("Grade de Horário"); $this->_gridhours->setDecorators($this->_decoratorsDefault); $this->_gridhours->setAttrib("id", "user_gridhours"); $this->_gridhours->setRequired(false); }
public function __construct() { parent::__construct(); $physicallocationModel = new PhysicallocationModel(); $physicallocationData = $physicallocationModel->fetchAll(); $physicallocationArray = $physicallocationData; $centerModel = new CompanyModel(); $centerDadosArray = $centerModel->fetchAll(); $this->_cdsupplycentre = new Zend_Form_Element_Text('cdsupplycentre'); $this->_cdsupplycentre->setLabel("Código"); $this->_cdsupplycentre->setDecorators($this->_decoratorsDefault); $this->_cdsupplycentre->setAttrib("id", "center_cdsupplycentre"); $this->_cdsupplycentre->setRequired(false); $this->_idsupplycentre = new Zend_Form_Element_Text('idsupplycentre'); $this->_idsupplycentre->setLabel("Nome"); $this->_idsupplycentre->setDecorators($this->_decoratorsDefault); $this->_idsupplycentre->setAttrib("id", "center_idsupplycentre"); $this->_idsupplycentre->setRequired(false); $this->_fgsupplycentretype = new Zend_Form_Element_Select('fgsupplycentretype'); $this->_fgsupplycentretype->setLabel("Tipo"); $this->_fgsupplycentretype->addMultiOptions(array("" => "Selecione", "1" => "Consumo", "2" => "Empréstimo", "3" => "Devolução", "4" => "Estocagem", "5" => "Descarte")); $this->_fgsupplycentretype->setDecorators($this->_decoratorsDefault); $this->_fgsupplycentretype->setRequired(false); $this->_fgsupplycentretype->setAttrib("id", "center_fgsupplycentretype"); $this->_cdcompany = new Zend_Form_Element_Select('cdcompany'); $this->_cdcompany->setLabel("Unidade"); $this->_cdcompany->addMultiOption("", "Selecione"); foreach ($centerDadosArray as $centerDado) { $this->_cdcompany->addMultiOption($centerDado->cdcompany, $centerDado->nmcompany); } $this->_cdcompany->setAttrib("id", "center_cdcompany"); $this->_cdcompany->setDecorators($this->_decoratorsDefault); $this->_cdcompany->setRequired(false); $this->_cdphysicallocation = new Zend_Form_Element_Select('cdphysicallocation'); $this->_cdphysicallocation->setLabel("Localização Física"); $this->_cdphysicallocation->addMultiOption("", "Selecione"); foreach ($physicallocationArray as $arrayphysicallocation) { $this->_cdphysicallocation->addMultiOption($arrayphysicallocation->cdphysicallocation, $arrayphysicallocation->nmphysicallocation); } $this->_cdphysicallocation->setDecorators($this->_decoratorsRequired); $this->_cdphysicallocation->setAttrib("id", "center_cdphysicallocation"); $this->_cdphysicallocation->setAttrib("class", "alpha"); $this->_cdphysicallocation->setRequired(false); }
public function __construct() { parent::__construct(); $covenantModel = new CovenantModel(); $selectCovenant = $covenantModel->fetchAll(); $company = new CompanyModel(); $selectCompany = $company->fetchAll('cdcompanyparent IS NULL'); $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $nmcollectionplaceModel = new CompanyModel(); $selectCompany = $nmcollectionplaceModel->fetchAll(); $clientModel = new ClientModel(); $clientData = $clientModel->fetchAll(); $this->_cdcovenant = new Zend_Form_Element_Select('cdcovenant'); $this->_cdcovenant->setAttrib("id", "covenantbilling_cdcovenant"); $this->_cdcovenant->setAttrib("class", "check_multiple_select"); foreach ($selectCovenant as $value) { //$this->_cdcovenant->addMultiOption($value->cdcovenant, $value->nmcovenant); } $this->_cdcovenant->setLabel("Convênio"); $this->_cdcovenant->setDecorators($this->_decoratorsDefault); $this->_cdcovenant->setRegisterInArrayValidator(false); $this->_cdcovenant->setRequired(false); $this->_cdcompanyparent = new Zend_Form_Element_Select('cdcompanyparent'); $this->_cdcompanyparent->setAttrib("id", "controltbilling_cdcompanyparent"); foreach ($selectCompany as $value) { $this->_cdcompanyparent->addMultiOption($value->cdcompany, $value->nmcompany); } $this->_cdcompanyparent->setLabel("Posto de Coleta"); $this->_cdcompanyparent->setDecorators($this->_decoratorsDefault); $this->_cdcompanyparent->setRegisterInArrayValidator(false); $this->_cdcompanyparent->setRequired(false); $this->_cddepartment = new Zend_Form_Element_Select('cddepartment'); $this->_cddepartment->setAttrib("id", "covenantbilling_ceddepartment"); $this->_cddepartment->setAttrib("class", "check_multiple_select"); foreach ($selectDepartment as $value) { $this->_cddepartment->addMultiOption($value->cddepartment, $value->nmdepartment); } $this->_cddepartment->setLabel("Setor"); $this->_cddepartment->setDecorators($this->_decoratorsDefault); $this->_cddepartment->setRegisterInArrayValidator(false); $this->_cddepartment->setRequired(false); $this->_fgstatus = new Zend_Form_Element_Select('fgstatus'); $this->_fgstatus->setAttrib("id", "covenantbilling_fgstatus"); $this->_fgstatus->setMultiOptions(array("0" => "Selecione", "1" => "Ativo", "2" => "Inativo")); $this->_fgstatus->setLabel("Status"); $this->_fgstatus->setDecorators($this->_decoratorsDefault); $this->_fgstatus->setRegisterInArrayValidator(false); $this->_fgstatus->setRequired(false); //$clientData $this->_cdclient = new Zend_Form_Element_Text('cdclient'); $this->_cdclient->setAttrib("id", "covenantbilling_cdclient"); $this->_cdclient->setAttrib("onkeyup", "lookup(this.value);"); $this->_cdclient->setAttrib("onblur", "fill();"); $this->_cdclient->setAttrib("autocomplete", "off"); $this->_cdclient->setAttrib("size", "50"); // foreach ($clientData as $value) { // $this->_cdclient->addMultiOption($value->cdclient, $value->nmclient); // } $this->_cdclient->setLabel("Paciente"); $this->_cdclient->setDecorators($this->_decoratorsDefault); $this->_cdclient->setRequired(false); $this->_dtstart = new Zend_Form_Element_Text('dtstart'); $this->_dtstart->setAttrib("id", "covenantbilling_dtstart"); $this->_dtstart->setAttrib("class", "datepicker"); $this->_dtstart->setLabel("Data Inicio"); $this->_dtstart->setDecorators($this->_decoratorsDefault); $this->_dtstart->setRequired(false); $this->_hrend = new Zend_Form_Element_Text('dtenddate'); $this->_hrend->setLabel("Hora Início"); $this->_hrend->setDecorators($this->_decoratorsDefault); $this->_hrend->setAttrib("id", "covenantbilling_hrend"); $this->_hrend->setAttrib("class", "mask_time"); $this->_dtend = new Zend_Form_Element_Text('dtend'); $this->_dtend->setAttrib("id", "covenantbilling_dtenddate"); $this->_dtend->setAttrib("class", "datepicker"); $this->_dtend->setLabel("Data Fim"); $this->_dtend->setDecorators($this->_decoratorsDefault); $this->_dtend->setRequired(false); $this->_hrstart = new Zend_Form_Element_Text('hrstart'); $this->_hrstart->setLabel("Hora Fim"); $this->_hrstart->setDecorators($this->_decoratorsDefault); $this->_hrstart->setAttrib("id", "covenantbilling_hrstart"); $this->_hrstart->setAttrib("class", "mask_time"); $this->_nrbatch = new Zend_Form_Element_Text('nrlot'); $this->_nrbatch->setAttrib("id", "covenantbilling_nrbatch"); $this->_nrbatch->setLabel("Número do Lote"); $this->_nrbatch->setDecorators($this->_decoratorsDefault); $this->_nrbatch->setRequired(false); $this->_dtduedate = new Zend_Form_Element_Text('dtduedate'); $this->_dtduedate->setAttrib("id", "covenantbilling_dtduedate"); $this->_dtduedate->setAttrib("class", "datepicker"); $this->_dtduedate->setLabel("Vencimento"); $this->_dtduedate->setDecorators($this->_decoratorsDefault); $this->_dtduedate->setRequired(false); }
public function listAction() { $companyModel = new CompanyModel(); $departmentModel = new DepartmentModel(); $companyAffiliatesData = $companyModel->getAfilliatesByCompany(); $companyParentData = $companyModel->getCompanyMatriz(); $this->view->companyParentData = $companyParentData; $this->view->companyAffiliatesData = $companyAffiliatesData; $departmentparentData = $departmentModel->getAllParent(); $this->view->departmentparentData = $departmentparentData; $departmentfilliatestData = $departmentModel->getDepartmentAfilliates(); $this->view->departmentfilliatestData = $departmentfilliatestData; $controllerName = $this->getRequest()->getControllerName(); $actionName = $this->getRequest()->getActionName(); $cdwindow = $this->getCdWindow($controllerName, $actionName); $_SESSION['cdwindow'] = $cdwindow; $company = $this->_request->getParam("company"); $department = $this->_request->getParam("department"); $nmdepartment = $this->_request->getParam("nmdepartament"); $this->view->company = $company; $this->view->department = $department; $this->view->nmdepartment = $nmdepartment; $userDataDepartamenData = new CompanyModel(); $userDataCompanyDepartment = $userDataDepartamenData->fetchAll(); $this->view->userDataCompanyDepartment = $userDataCompanyDepartment; $userDataDepartamentByCompany = $this->_model->fetchAll($this->_model->getAllDepartmentCompany()); $this->view->userDataDepartamentByCompany = $userDataDepartamentByCompany; }
public function __construct() { parent::__construct(); $arrayPriority = array('1' => 'Normal', '2' => 'Urgente'); $covenantModel = new CovenantModel(); $selectCovenant = $covenantModel->fetchAll(); $arrayCovenant = array(); $arrayCovenant['0'] = "0"; foreach ($selectCovenant as $selCv) { $arrayCovenant[$selCv->cdcovenant] = $selCv->nmcovenant; } $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $arrayDepartment = array(); $arrayDepartment['0'] = "0"; foreach ($selectDepartment as $selDP) { $arrayDepartment[$selDP->cddepartment] = $selDP->nmdepartment; } $uncollectionModel = new CompanyModel(); $selectCompany = $uncollectionModel->fetchAll("cdcompanyparent IS NOT NULL"); $arrayuncollection = array(); $arrayuncollection['0'] = "0"; foreach ($selectCompany as $cdplace) { $arrayuncollection[$cdplace->cdcompany] = $cdplace->nmfantasyname; } $fgstatusModel = new RequestexaminationModel(); $selectstatus = $fgstatusModel->fetchAll(); $arrayfgstatus = array(); $arrayfgstatus['0'] = "Selecione"; foreach ($selectstatus as $cdstatus) { $arrayfgstatus[$cdstatus->cdrequestexamination] = $cdstatus->fgstatus; } //Novas... $this->_departament = new Zend_Form_Element_Select('departament'); $this->_departament->setAttrib("id", "maps_departament"); $this->_departament->setAttrib("class", "check_multiple_select"); $this->_departament->setMultiOptions($arrayDepartment); $this->_departament->setLabel("Setor"); $this->_departament->setDecorators($this->_decoratorsDefault); $this->_departament->setRegisterInArrayValidator(true); $this->_departament->setRequired(true); $this->_covenant = new Zend_Form_Element_Select('covenant'); $this->_covenant->setAttrib("id", "maps_covenant"); $this->_covenant->setAttrib("class", "check_multiple_select"); $this->_covenant->setMultiOptions($arrayCovenant); $this->_covenant->setLabel("Convênio"); $this->_covenant->setDecorators($this->_decoratorsDefault); $this->_covenant->setRegisterInArrayValidator(true); $this->_covenant->setRequired(true); $this->_uncollection = new Zend_Form_Element_Select('uncollection'); $this->_uncollection->setAttrib("id", "maps_uncollection"); $this->_uncollection->setAttrib("class", "check_multiple_select"); $this->_uncollection->setMultiOptions($arrayuncollection); $this->_uncollection->setLabel("Unidade de Coleta"); $this->_uncollection->setDecorators($this->_decoratorsDefault); $this->_uncollection->setRegisterInArrayValidator(true); $this->_uncollection->setRequired(true); $this->_stsample = new Zend_Form_Element_Select('stsample'); $this->_stsample->setAttrib("id", "maps_stsample"); $this->_stsample->setAttrib("class", "multiple_select"); $this->_stsample->setMultiOptions($arrayfgstatus); $this->_stsample->setLabel("Status Amostra"); $this->_stsample->setDecorators($this->_decoratorsDefault); $this->_stsample->setRegisterInArrayValidator(true); $this->_stsample->setRequired(true); $this->_priority = new Zend_Form_Element_Select('priority'); $this->_priority->setAttrib("id", "maps_priority"); $this->_priority->setAttrib("class", "check_multiple_select"); $this->_priority->setMultiOptions($arrayPriority); $this->_priority->setLabel("Prioridade"); $this->_priority->setDecorators($this->_decoratorsDefault); $this->_priority->setRegisterInArrayValidator(true); $this->_priority->setRequired(true); $this->_dtstart = new Zend_Form_Element_Text('dtstart'); $this->_dtstart->setAttrib("id", "maps_dtstart"); $this->_dtstart->setAttrib("class", "datepicker"); $this->_dtstart->setLabel("Data Inicial"); $this->_dtstart->setDecorators($this->_decoratorsDefault); $this->_dtstart->setRequired(false); $this->_dtend = new Zend_Form_Element_Text('dtend'); $this->_dtend->setAttrib("id", "maps_dtend"); $this->_dtend->setAttrib("class", "datepicker"); $this->_dtend->setLabel("Data Final"); $this->_dtend->setDecorators($this->_decoratorsDefault); $this->_dtend->setRequired(false); }
public function __construct() { parent::__construct(); $covenantModel = new CovenantModel(); $selectCovenant = $covenantModel->fetchAll(); $arrayCovenant = array(); $arrayCovenant['0'] = "Selecione"; foreach ($selectCovenant as $selCVNT) { $arrayCovenant[$selCVNT->cdcovenant] = $selCVNT->nmcovenant; } $responsibleModel = new UserModel(); $selectUser = $responsibleModel->fetchAll(); $arrayResponsible = array(); $userInfo = Zend_Auth::getInstance()->getStorage()->read(); $nmcollectionplaceModel = new CompanyModel(); $selectCompany = $nmcollectionplaceModel->fetchAll(); $arraynmcollectionplace = array(); $arraynmcollectionplace['0'] = "Selecione"; foreach ($selectCompany as $cdplace) { $arraynmcollectionplace[$cdplace->cdcompanyparent] = $cdplace->nmfantasyname; } // $departmentModel = new DepartmentModel(); // $selectDepartment = $departmentModel->fetchAll(); // $arrayDepartment = array(); // $arrayDepartment['0'] = "Selecione"; // foreach($selectDepartment as $selDP){ // $arrayDepartment[$selDP->cddepartment] = $selDP->nmdepartment; // } $departmentModel = new DepartmentModel(); $selectDepartment = $departmentModel->fetchAll(); $arrayDepartment = array(); $arrayDepartment['0'] = "Selecione"; foreach ($selectDepartment as $selDP) { $arrayDepartment[$selDP->cddepartment] = $selDP->nmdepartment; } $this->_fgcdcovenant = new Zend_Form_Element_Select('cdcovenant'); $this->_fgcdcovenant->setAttrib("id", "controltbilling_select"); // $this->_fgcdcovenant->setAttrib("class", "check_multiple_select"); $this->_fgcdcovenant->setMultiOptions($arrayCovenant); $this->_fgcdcovenant->setLabel("Convênio"); $this->_fgcdcovenant->setDecorators($this->_decoratorsDefault); $this->_fgcdcovenant->setRegisterInArrayValidator(true); $this->_fgcdcovenant->setRequired(true); // select do convenio para a página biilingdata $this->_fgcdcovenantdata = new Zend_Form_Element_Select('fgcdcovenantdata'); $this->_fgcdcovenantdata->setAttrib("id", "controltbillingdata_fgcdcovenantdata"); $this->_fgcdcovenantdata->setAttrib("class", "nmbillingcss"); $this->_fgcdcovenantdata->setMultiOptions($arrayCovenant); $this->_fgcdcovenantdata->setLabel("Convênios"); $this->_fgcdcovenantdata->setDecorators($this->_decoratorsDefault); $this->_fgcdcovenantdata->setRegisterInArrayValidator(true); $this->_fgcdcovenantdata->setRequired(true); $this->_nmcollectionplace = new Zend_Form_Element_Select('nmcollectionplace'); $this->_nmcollectionplace->setAttrib("id", "controltbilling_select"); // $this->_nmcollectionplace->setMultiOptions($arrayDocumentData); $this->_nmcollectionplace->setMultiOptions($arraynmcollectionplace); $this->_nmcollectionplace->setLabel("Posto de Coleta"); $this->_nmcollectionplace->setDecorators($this->_decoratorsDefault); $this->_nmcollectionplace->setRegisterInArrayValidator(true); $this->_nmcollectionplace->setRequired(true); $this->_nmdepartment = new Zend_Form_Element_Select('nmdepartment'); $this->_nmdepartment->setAttrib("id", "controltbilling_select"); // $this->_nmdepartment->setAttrib("class", "check_multiple_select"); $this->_nmdepartment->setMultiOptions($arrayDepartment); $this->_nmdepartment->setLabel("Setor"); $this->_nmdepartment->setDecorators($this->_decoratorsDefault); $this->_nmdepartment->setRegisterInArrayValidator(true); $this->_nmdepartment->setRequired(true); $this->_fgstatus = new Zend_Form_Element_Select('fgstatus'); $this->_fgstatus->setAttrib("id", "controltbilling_select"); $this->_fgstatus->setMultiOptions(array("0" => "Selecione", "1" => "Ativo", "2" => "Inativo")); $this->_fgstatus->setLabel("Status"); $this->_fgstatus->setDecorators($this->_decoratorsDefault); $this->_fgstatus->setRegisterInArrayValidator(true); $this->_fgstatus->setRequired(true); $this->_nmpacient = new Zend_Form_Element_Text('nmpacient'); $this->_nmpacient->setAttrib("id", "controllbilling_nmpacient"); $this->_nmpacient->setAttrib("onkeyup", "lookup(this.value);"); $this->_nmpacient->setAttrib("onblur", "fill();"); $this->_nmpacient->setAttrib("autocomplete", "off"); $this->_nmpacient->setAttrib("size", "50"); $this->_nmpacient->setLabel("Paciente"); $this->_nmpacient->setDecorators($this->_decoratorsDefault); $this->_nmpacient->setRequired(false); $this->_responsible = new Zend_Form_Element_Select('responsible'); $this->_responsible->setAttrib("id", "controltbilling_select"); $this->_responsible->setAttrib("class", "controlbilling_responsible"); // $this->_fgcdcovenant->setAttrib("class", "check_multiple_select"); $this->_responsible->setLabel("Responsável"); $arrayResponsible['0'] = "Selecione"; foreach ($selectUser as $userLog) { /* if ($userInfo->idusergslab == $userLog->idusergslab) { $arrayResponsible[$userLog->idusergslab] = $userLog->nmusergslab; } */ $arrayResponsible[$userLog->idusergslab] = $userLog->nmusergslab; } $this->_responsible->setMultiOptions($arrayResponsible); $this->_responsible->setValue($userInfo); $this->_responsible->setDecorators($this->_decoratorsDefault); $this->_responsible->setRegisterInArrayValidator(true); $this->_responsible->setRequired(true); $this->_responsibledata = new Zend_Form_Element_Select('responsibledata'); $this->_responsibledata->setAttrib("id", "controltbilling_responsible"); $this->_responsibledata->setAttrib("class", "controlbillingdata_responsibledata"); // $this->_fgcdcovenant->setAttrib("class", "check_multiple_select"); $this->_responsibledata->setMultiOptions($arrayResponsible); $this->_responsibledata->setLabel("Responsável"); $this->_responsibledata->setDecorators($this->_decoratorsDefault); $this->_responsibledata->setRegisterInArrayValidator(true); $this->_responsibledata->setRequired(true); $this->_dtbegindate = new Zend_Form_Element_Text('dtbegindate'); $this->_dtbegindate->setAttrib("id", "controltbilling_dtbegindate"); $this->_dtbegindate->setAttrib("class", "datepicker"); $this->_dtbegindate->setLabel("Data Início"); $this->_dtbegindate->setDecorators($this->_decoratorsDefault); $this->_dtbegindate->setRequired(false); $this->_timebeginhour = new Zend_Form_Element_Text('timebeginhour'); $this->_timebeginhour->setLabel("Horário"); $this->_timebeginhour->setDecorators($this->_decoratorsDefault); $this->_timebeginhour->setAttrib("id", "controltbilling_timebeginhour"); $this->_timebeginhour->setAttrib("class", "mask_time"); $this->_dtenddate = new Zend_Form_Element_Text('dtenddate'); $this->_dtenddate->setAttrib("id", "controltbilling_dtenddate"); $this->_dtenddate->setAttrib("class", "datepicker"); $this->_dtenddate->setLabel("Data Fim"); $this->_dtenddate->setDecorators($this->_decoratorsDefault); $this->_dtenddate->setRequired(false); $this->_timeendhour = new Zend_Form_Element_Text('timeendhour'); $this->_timeendhour->setLabel("Horário"); $this->_timeendhour->setDecorators($this->_decoratorsDefault); $this->_timeendhour->setAttrib("id", "controltbilling_timeendhour"); $this->_timeendhour->setAttrib("class", "mask_time"); ////////////////// $this->_dtbegindatedata = new Zend_Form_Element_Text('dtbegindatedata'); $this->_dtbegindatedata->setAttrib("id", "controltbillingdata_dtbegindatedata"); $this->_dtbegindatedata->setAttrib("class", "datepicker"); $this->_dtbegindatedata->setLabel("Data Início"); $this->_dtbegindatedata->setDecorators($this->_decoratorsDefault); $this->_dtbegindatedata->setRequired(false); $this->_timebeginhourdata = new Zend_Form_Element_Text('timebeginhourdata'); $this->_timebeginhourdata->setAttrib("id", "controltbillingdata_timebeginhourdata"); $this->_timebeginhourdata->setLabel("Hora Início"); $this->_timebeginhourdata->setDecorators($this->_decoratorsDefault); $this->_timebeginhourdata->setRequired(false); $this->_dtenddatedata = new Zend_Form_Element_Text('dtenddatedata'); $this->_dtenddatedata->setAttrib("id", "controltbillingdata_dtenddatedata"); $this->_dtenddatedata->setAttrib("class", "datepicker"); $this->_dtenddatedata->setLabel("Data Fim"); $this->_dtenddatedata->setDecorators($this->_decoratorsDefault); $this->_dtenddatedata->setRequired(false); $this->_timeendhourdata = new Zend_Form_Element_Text('timeendhourdata'); $this->_timeendhourdata->setAttrib("id", "controltbillingdata_timeendhourdata"); $this->_timeendhourdata->setLabel("Hora Fim"); $this->_timeendhourdata->setDecorators($this->_decoratorsDefault); $this->_timeendhourdata->setRequired(false); ////////////// $this->_nrlot = new Zend_Form_Element_Text('nrlot'); $this->_nrlot->setAttrib("id", "controltbilling_nrlot"); $this->_nrlot->setLabel("Número do Lote"); $this->_nrlot->setDecorators($this->_decoratorsDefault); $this->_nrlot->setRequired(false); $this->_statusbilling = new Zend_Form_Element_Text('statusbilling'); $this->_statusbilling->setAttrib("id", "controltbillingdata_statusbilling"); $this->_statusbilling->setLabel("Status Faturamento"); $this->_statusbilling->setDecorators($this->_decoratorsDefault); $this->_statusbilling->setRequired(false); // Numero da fatura $this->_nmbilling = new Zend_Form_Element_Text('nmbilling'); $this->_nmbilling->setAttrib("id", "controltbillingdata_nmbilling"); $this->_nmbilling->setAttrib("class", "nmbillingcss"); $this->_nmbilling->setLabel("# Fatura"); $this->_nmbilling->setDecorators($this->_decoratorsDefault); $this->_nmbilling->setRequired(false); // Numero da Fatura $this->_nmlotbilling = new Zend_Form_Element_Text('nmlotbilling'); $this->_nmlotbilling->setAttrib("id", "controltbilling__nmlotbilling"); $this->_nmlotbilling->setAttrib("class", "nmlotbillingcss"); $this->_nmlotbilling->setLabel("Nº Lote Fatura"); $this->_nmlotbilling->setDecorators($this->_decoratorsDefault); $this->_nmlotbilling->setRequired(false); $this->_dtmaturity = new Zend_Form_Element_Text('dtmaturity'); $this->_dtmaturity->setAttrib("id", "controltbilling_dtmaturity"); $this->_dtmaturity->setAttrib("class", "datepicker"); $this->_dtmaturity->setLabel("Vencimento"); $this->_dtmaturity->setDecorators($this->_decoratorsDefault); $this->_dtmaturity->setRequired(false); $this->_dtmaturitydata = new Zend_Form_Element_Text('dtmaturitydata'); $this->_dtmaturitydata->setAttrib("id", "controltbillingdata_dtmaturitydata"); $this->_dtmaturitydata->setAttrib("class", "datepicker"); $this->_dtmaturitydata->setLabel("Vencimento"); $this->_dtmaturitydata->setDecorators($this->_decoratorsDefault); $this->_dtmaturitydata->setRequired(false); $this->_accountsreceivable = new Zend_Form_Element_MultiCheckbox('accountsreceivable'); $this->_accountsreceivable->addMultiOption('accountsreceivable', ' Enviar para Contas à Receber'); $this->_accountsreceivable->setAttrib("id", "accountsreceivable"); $this->_accountsreceivable->setAttrib("class", "standartchecklabel"); $this->_accountsreceivable->AddDecorator('HtmlTag', array('tag' => 'li', 'openOnly' => true)); $this->_accountsreceivable->setDecorators(array(array('ViewHelper'), array('HtmlTag', array('tag' => 'li')))); }