This commit is contained in:
Nicolas Bally 2019-09-12 10:35:51 +02:00
parent 83b2c83252
commit 4ced707635
2 changed files with 22 additions and 22 deletions

View File

@ -1,26 +1,28 @@
%tr#p_customer_sheet{:id => p_customer_sheet.id}
%td="##{p_customer_sheet.id}"
%td=l p_customer_sheet.created_at, :format => :date
-if !@p_customer
%td= p_customer_sheet.p_customer.show_name if p_customer_sheet.p_customer
%td= p_customer_sheet.sheet_lines_not_shiped.count
%td= p_customer_sheet.sheet_lines_shiped.count
-if (p_customer_sheet.state != "panier" or p_customer_sheet.p_sheet_lines.count > 0)
%tr#p_customer_sheet{:id => p_customer_sheet.id}
%td="##{p_customer_sheet.id}"
%td=l p_customer_sheet.created_at, :format => :date
-if !@p_customer
%td= p_customer_sheet.p_customer.show_name if p_customer_sheet.p_customer
%td= p_customer_sheet.sheet_lines_not_shiped.count
%td= p_customer_sheet.sheet_lines_shiped.count
%td
-totals = PSheetLine.totals(p_customer_sheet.p_sheet_lines)
=number_to_currency totals[:total]
%td
-totals = PSheetLine.totals(p_customer_sheet.p_sheet_lines)
=number_to_currency totals[:total]
%td
=number_to_currency totals[:total_ttc]
%td
=number_to_currency totals[:total_ttc]
%td=raw p_customer_sheet.state_html
%td
=raw p_customer_sheet.state_html
%td.actions
-if p_customer_sheet.state == "brouillon"
= link_to i(:"trash-o"), [:admin, p_customer_sheet], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet auteur ? ' } , :remote => true
= link_to i(:pencil), edit_admin_p_customer_sheet_path(p_customer_sheet), :remote => false
= link_to i(:eye), admin_p_customer_sheet_path(p_customer_sheet), :remote => false
%td.actions
-if p_customer_sheet.state == "brouillon"
= link_to i(:"trash-o"), [:admin, p_customer_sheet], method: :delete, data: { confirm: 'Voulez-vous vraiment supprimer cet auteur ? ' } , :remote => true
= link_to i(:pencil), edit_admin_p_customer_sheet_path(p_customer_sheet), :remote => false
= link_to i(:eye), admin_p_customer_sheet_path(p_customer_sheet), :remote => false

View File

@ -18,10 +18,8 @@
%table.table.table-striped
-p_contacts = @p_customer.p_contacts
-p_contacts = p_contacts + @p_document.particular_send.p_contacts if @p_document.particular_send
-p_contacts = p_contacts + @p_document.particular_bill.p_contacts if @p_document.particular_bill
-@p_customer.particulars.each do |p|
-p_contacts = p_contacts + p.p_contacts
-p_contacts.uniq.each do |p_c|