- vat_mode = ::Dorsale::BillingMachine.vat_mode #billing_machine-show .row .col-md-6 .well = info document, :label = info document, :date .col-md-6 .well - if document.customer.present? = document.customer br - if document.customer.address.street.present? = document.customer.address.street br - if document.customer.address.street_bis.present? = document.customer.address.street_bis br - if document.customer.address.zip.present? || document.customer.address.city.present? = document.customer.address.zip = " " = document.customer.address.city - if document.customer.address.country.present? = document.customer.address.country table#lines-table thead tr th.line-label = Dorsale::BillingMachine::InvoiceLine.t(:label) th.line-quantity = Dorsale::BillingMachine::InvoiceLine.t(:quantity) th.line-unit = Dorsale::BillingMachine::InvoiceLine.t(:unit) - if vat_mode == :multiple th.line-vat_rate = Dorsale::BillingMachine::InvoiceLine.t(:vat_rate) th.line-unit_price = Dorsale::BillingMachine::InvoiceLine.t(:unit_price) th.line-total = Dorsale::BillingMachine::InvoiceLine.t(:total) tbody - document.lines.each do |line| = render "dorsale/billing_machine/commons/line_details", line: line .row .col-sm-6 .well = info document, :payment_term br - if document.document_type == :invoice = info document, :due_date - if document.document_type == :quotation = info document, :expires_at br - if document.comments.present? = info document, :comments, text2html(document.comments), separator: " :
".html_safe br .col-sm-6 table#totals-table tbody - if document.commercial_discount.nonzero? tr th.commercial_discount-label = document.class.t(:commercial_discount) td.commercial_discount = " - #{bm_currency document.commercial_discount}" tr th.total_excluding_taxes-label = document.class.t(:total_excluding_taxes) td.total_excluding_taxes = bm_currency document.total_excluding_taxes - if vat_mode == :single tr th.vat_rate-label = document.class.t(:vat_rate) td.vat_rate = percentage document.vat_rate tr th.vat_amount-label = document.class.t(:vat_amount) td.vat_amount = bm_currency document.vat_amount tr th.total_including_taxes-label = document.class.t(:total_including_taxes) td.total_including_taxes = bm_currency document.total_including_taxes - if document.respond_to?(:advance) - document.advance.present? tr th.advance-label = document.class.t(:advance) td.advance = bm_currency document.advance tr th.balance-label = document.class.t(:balance) td.balance = bm_currency document.balance