Skip to content

Instantly share code, notes, and snippets.

@cachafla
Created November 4, 2008 02:45
Show Gist options
  • Save cachafla/22060 to your computer and use it in GitHub Desktop.
Save cachafla/22060 to your computer and use it in GitHub Desktop.
<h2 id="titulo_2" align="center">Cifras en pesos</h2>
<p style="color: green"><%= flash[:notice] %></p>
<p><%= link_to "Volver a menú principal", :controller => "presupuestos" %></p>
<% form_tag({:action => "update"}, :id => "presupuesto", :onkeypress => "return event.keyCode!=13;") do %>
<p><%= submit_tag "Guardar", :id => "submit", :disabled => true %></p>
<h2>Editando centro de costo: <%= "#{@cc.codigo} - #{@cc.nombre}"%></h2>
<h3>Estado del centro de costo: <span id ="label_completo" class="doc_incompleto">Incompleto</span></h3>
<div id="tabla">
<div style="width:2500px">
<table width="2500">
<thead>
<tr>
<th width="50" id="conceptos" class="numero">Nro</th>
<th width="480" id="conceptos">Concepto</th>
<th width="100">Total 2009</th>
<% @months.each do |month| %>
<th width="100"><%= "#{month[0..2]}/09" %></th>
<% end %>
<th width="70">%</th>
<th width="300">Objeto</th>
<th width="300">Justificacion</th>
</tr>
</thead>
</table>
</div>
<div id="innerb">
<table width="2500">
<% j = 1 %>
<% @cuentas.each do |cuenta| %>
<% javascript_tag do %>
datos.agregar_cuenta(<%= cuenta.id %>);
<% end %>
<% disabled = j == 1 ? false : true %>
<tr>
<td width="50" id='<%= "conceptos_cuenta_#{cuenta.id}_1" %>' class="conceptos normal" style="text-align:center; padding: 0px"><%= j %></td>
<td width="480" id='<%= "conceptos_cuenta_#{cuenta.id}_2" %>' class="conceptos normal">
<%= label_tag cuenta.nombre, "#{cuenta.codigo} - #{cuenta.nombre}", :title => cuenta.definicion %>
</td>
<!-- Año Actual -->
<td width="100"><%= valor_input_tag(@year, nil, cuenta, @cc, true) %></td>
<% i = 1 %>
<!-- Valores mensuales -->
<% 12.times do %>
<td width="100"><%= valor_input_tag(@year, i, cuenta, @cc, false) %></td>
<% i = i + 1%>
<% end %>
<!-- Porcentaje de variacion -->
<td width="70"><%= valor_input_tag(@year, 15, cuenta, @cc, true) %></td>
<!-- Objeto -->
<td width ="300" style="text-align:center">
<%= valor_objeto_tag(cuenta, @cc, false) %>
</td>
<!-- Justificacion -->
<td width ="300" style="text-align:center">
<%= valor_justificacion_tag(cuenta, @cc, false) %>
</td>
</tr>
<% j = j + 1 %>
<% end %>
<!-- Totales -->
<tr>
<td class="conceptos normal" colspan="3" style="padding: 10px; text-align:center"><b>Totales</b></td>
<!-- Total 2009 -->
<td><%= text_field_tag "total_2009", '', :class => "valor", :size => 15, :disabled => true %></td>
<!-- Totales mensuales -->
<% i = 1 %>
<% 12.times do %>
<td width="70"><%= text_field_tag "total_2009_month_#{i}", '', :class => "valor", :size => 15, :disabled => true %></td>
<% i = i + 1%>
<% end %>
</tr>
<tr>
<td class="conceptos normal" colspan="3" style="padding: 10px; text-align:center"><b>% Participación</b></td>
<td><%= text_field_tag "dummy_2009", '100 %', :class => "valor", :size => 15, :disabled => true %></td>
<!-- Totales mensuales -->
<% i = 1 %>
<% 12.times do %>
<td width="70"><%= text_field_tag "porcentaje_2009_month_#{i}", '', :class => "valor", :size => 15, :disabled => true %></td>
<% i = i + 1%>
<% end %>
</tr>
</table>
</div>
</div>
<%= hidden_field_tag 'centro_id', @cc.id %>
<% end -%>
<p><%= link_to "Volver a menú principal", :controller => "presupuestos" %></p>
<% javascript_tag do %>
Cisa.sumar(null);
Cisa.sumar(null);
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment