This commit is contained in:
Nicolas Bally 2019-07-04 15:37:22 +02:00
parent f642bb86db
commit f9238ea184
2 changed files with 11 additions and 4 deletions

View File

@ -127,6 +127,7 @@
:coffeescript
tva = 1.2
@update_sheet_line_tot = ->
tot_sheet = 0.0
$(".p_sheet_lines_form").find(".product_stock_form").each ->
tot = 0.0
@ -134,9 +135,13 @@
tot_sheet += tot
$(".p_sheet_lines_tot_ht").html(accounting.formatMoney(tot_sheet))
tot_sheet_fdp = (tot_sheet + parseFloat($("#fdp_value").val()))
fdp = parseFloat($("#fdp_value").val())
fdp = fdp || 0.0
tot_sheet_fdp = (tot_sheet + fdp)
$(".p_sheet_lines_tot_ht_fdp").html(accounting.formatMoney(tot_sheet_fdp))

View File

@ -78,10 +78,12 @@
-p_product.p_product_stocks.each do |ps|
%td
-if ps
-p_sheet_line_line = form.object.p_sheet_line_lines.where(:p_product_stock_id => ps.id).first
-p_sheet_line_line = nil
-form.object.p_sheet_line_lines.each do |a|
-if a.p_product_stock_id == ps.id
-p_sheet_line_line = a
-if p_sheet_line_line
=form.fields_for(:p_sheet_line_lines, p_sheet_line_line) do |builder|
=builder.hidden_field :p_product_stock_id,:label => false, :as => :string