Commit 59663239e997b4330cfc3fa796049a67602a6bd3

Authored by Lucas Schmoeller da Silva
1 parent 8269ca6a
Exists in master

Alterado cadastro de exemplares

Removido obrigatoriedade dos campos preço e data de aquisição;

portabilis/ieducar#106
ieducar/intranet/educar_exemplar_cad.php
... ... @@ -132,7 +132,7 @@ class indice extends clsCadastro
132 132 $this->campoLista( "permite_emprestimo", "Permite Emprestimo", $opcoes, $this->permite_emprestimo );
133 133  
134 134 $this->preco = is_numeric($this->preco) ? number_format($this->preco, 2, ",", ".") : "";
135   - $this->campoMonetario( "preco", "Preco", $this->preco, 10, 20, true );
  135 + $this->campoMonetario( "preco", "Preco", $this->preco, 10, 20, false );
136 136  
137 137 $this->inputsHelper()->dynamic('bibliotecaPesquisaObra', array('required' => true));
138 138  
... ... @@ -140,7 +140,7 @@ class indice extends clsCadastro
140 140 if(!$this->data_aquisicao)
141 141 $this->data_aquisicao = date("d/m/Y");
142 142  
143   - $this->campoData( "data_aquisicao", "Data Aquisicão", $this->data_aquisicao, true );
  143 + $this->campoData( "data_aquisicao", "Data Aquisicão", $this->data_aquisicao, false );
144 144  
145 145 $this->campoNumero("tombo", "Tombo", $this->tombo, 10, 10, false);
146 146  
... ...
ieducar/intranet/include/pmieducar/clsPmieducarExemplar.inc.php
... ... @@ -333,6 +333,9 @@ class clsPmieducarExemplar
333 333 */
334 334 function cadastra()
335 335 {
  336 + if(!is_numeric( $this->preco ))
  337 + $this->preco = 0.00;
  338 +
336 339 if( is_numeric( $this->ref_cod_fonte ) && is_numeric( $this->ref_cod_acervo ) && is_numeric( $this->ref_cod_situacao ) && is_numeric( $this->ref_usuario_cad ) && is_numeric( $this->permite_emprestimo ) && is_numeric( $this->preco ) )
337 340 {
338 341 $db = new clsBanco();
... ...