| Número | Núm. da NF | <% if !isVendedor and !isFornecedor %>Tipo | <% end %> <% if !isFornecedor %>Status da Cobrança | Tem Saldo? | <% end %>
|---|---|---|---|---|
| <%= text_field 'form', 'num_pedido', :size => 10 %> | <%= text_field 'form', 'nota_fiscal', :size => 20 %> | <% if !isVendedor and !isFornecedor %><%= select 'form', 'tipo_pedido', Pedido::TIPOS_PEDIDO, :include_blank => true %> | <% else %> <% if isFornecedor %> <%= hidden_field 'form', 'tipo_pedido', :value => 'N' %> <% end %> <% end %> <% if !isFornecedor %><%= select 'form', 'status_parcelas', Pedido::STATUS_PARCELAS, :include_blank => true %> | <%= check_box 'form', 'tem_saldo' %> | <% end %>
| Período Pedido | Período Emissão NF |
|---|---|
| <%= text_field_with_js_mask 'form', 'data_inicio', :size => 12, :class => 'mask_date_br' %> a <%= text_field_with_js_mask 'form', 'data_fim', :size => 12, :class => 'mask_date_br' %> | <%= text_field_with_js_mask 'form', 'data_inicio_nf', :size => 12, :class => 'mask_date_br' %> a <%= text_field_with_js_mask 'form', 'data_fim_nf', :size => 12, :class => 'mask_date_br' %> |
| Cliente | <% if !isFornecedor %>Representante | <% end %>
|---|---|
| <% if isVendedor %> <%= collection_select 'form', 'cliente', Cliente.find(:all, :order => "razao_social", :conditions => "colaborador_id = #{colaborador[0].id} and ativo = 1"), :id, :razao_social, {}, :multiple => true, :size => 10 %> <% else %> <%= collection_select 'form', 'cliente', Cliente.find(:all, :order => "razao_social", :conditions => "ativo = 1"), :id, :razao_social, {}, :multiple => true, :size => 10 %> <% end %> | <% if !isFornecedor %><% if isVendedor %> <%= select 'form', 'colaborador', [[colaborador[0].nome, colaborador[0].id]], :include_blank => false %> <% else %> <%= collection_select 'form', 'colaborador', Colaborador.find(:all, :order => "nome"), :id, :nome, {}, :multiple => true, :size => 10 %> <% end %> | <% end %>
| Fornecedor | Status | <% if !isFornecedor %>Usuário que criou o pedido: |
<% end %>
|---|---|---|
| <% if isFornecedor and fornecedor %> <%= select 'form', 'fornecedor', [[fornecedor[0].razao_social, fornecedor[0].id]], :include_blank => false %> <% else %> <%= collection_select 'form', 'fornecedor', Fornecedor.find(:all, :order => "razao_social", :conditions => "ativo = 1"), :id, :razao_social, {}, :multiple => true, :size => 10 %> <% end %> | <% if !isFornecedor %> | <%= collection_select 'form', 'criador_pedido', @usuarios, :id, :name, {}, :multiple => true, :size => 10 %> | <% end %>
| Produto | <% end %><% unless isVendedor %> Relatório <% end %> |
|---|---|
| <%= collection_select 'form', 'produto', Produto.find(:all, :order => "nome"), :id, :nome, :prompt => '' %> | <% end %><% unless isVendedor %> <% if !isFornecedor %> <%= select 'form', 'tipo_relatorio', Pedido::TIPOS_RELATORIO, :include_blank => true %> <% else %> <%= select 'form', 'tipo_relatorio', Pedido::TIPOS_RELATORIO_FORNECEDOR, :include_blank => true %> <% end %> <% end %> |
| <% if !isVendedor %> <%= submit_tag 'Buscar', :name => "submit" %><%= submit_tag 'Gerar Relatório', :name => "submit" %> <% else %> <%= submit_tag 'Buscar', :name => "submit" %> <% end %> |
|---|