section.invoice.m1 div.invoice_div.back-dark-background .invoice-wrapper.preview .invoice-details.with_scroll iframe src=company_invoice_path(@invoice, format: :pdf) footer.navbar-fixed-bottom.footer.mt50 .text-center.inspectio-buttons = link_to 'Back', request.referer || company_invoices_path(tab: :inbound), class: 'btn btn-cancel-default pull-left' - if loyalty(@invoice).edit? - url = (request.referer.present? and request.referer.include?('work_orders')) ? edit_company_invoice_path(@invoice, wo: true) : edit_company_invoice_path(@invoice) = link_to 'Edit', url, class: 'btn btn-continue pull-right btn-continue-second'