63 lines
1.4 KiB
Plaintext
63 lines
1.4 KiB
Plaintext
%tr
|
|
|
|
|
|
%td
|
|
=l p_document.created_at, :format => :date
|
|
|
|
-if @p_documents
|
|
%td
|
|
=link_to "##{p_document.element.id}", admin_p_customer_sheet_path(p_document.element)
|
|
%td
|
|
=p_document.element.p_customer.show_name if p_document.element and p_document.element.p_customer
|
|
|
|
|
|
|
|
%td
|
|
=p_document.label
|
|
%td
|
|
=link_to p_document.d_number, admin_p_document_path(p_document.token)
|
|
|
|
-totals = PSheetLine.totals(p_document.p_sheet_lines)
|
|
%td
|
|
= number_to_currency totals[:total]
|
|
HT
|
|
|
|
%td
|
|
= number_to_currency totals[:total_ttc]
|
|
TTC
|
|
|
|
-if params[:p_document_type_id].to_i == 4
|
|
%th
|
|
="oui" if p_document.theo_paid
|
|
%th
|
|
="oui" if p_document.paid
|
|
|
|
|
|
-if false
|
|
%table
|
|
%tr
|
|
%td
|
|
Paid
|
|
%td
|
|
=p_document.paid
|
|
%tr
|
|
%td
|
|
TH Paid
|
|
%td
|
|
=p_document.theo_paid
|
|
-p_document.p_payment_documents.each do |pp|
|
|
%tr
|
|
%td
|
|
=pp.amount
|
|
%td
|
|
=pp.paid
|
|
=pp.p_payment.paid
|
|
|
|
|
|
|
|
%td.actions
|
|
-if p_document.label == "Facture" and !@relances
|
|
-#if p_document.relative_docs.where(:label => "Avoir").count == 0
|
|
=link_to "Créer un avoir", create_avoir_admin_p_document_path(p_document) #, :data => {:confirm => "Voulez-vous vraiment créer un avoir ?"}
|
|
|
|
|