= render 'shared/filter', filter_form: 'company/invoices/filter', class: 'with-margin' .container-fluid.gray-bg .row .col-sm-12 ul.nav.nav-tabs role='tablist' li role='presentation' class= "#{:active unless params[:tab] == 'outbound'}" = link_to company_invoices_path, role: :tab, aria: {controls: 'inbound'}, class: 'grey' do = fa_icon 'download', text: 'VENDOR', right: true li role='presentation' class= "#{:active if params[:tab] == 'outbound'}" = link_to company_invoices_path(tab: :outbound), role: :tab, aria: {controls: 'outbound'}, class: 'grey' do = fa_icon 'upload', text: 'CLIENT', right: true .container-fluid .panel.panel-grid.panel-default .panel-body style=("padding:10px !important;") .col-md-6 h4.margintop10.text-upper-grey Invoices .col-md-6 .pull-right - if params[:tab] == 'outbound' - if @company.vendor? = link_to 'RECEIVE PAYMENT', new_company_payment_path, class: 'btn btn-addrow p10' span.pl10 = link_to new_company_invoice_path, class: 'btn btn-primary' do = fa_icon :plus, text: 'Create Invoices' span.pl10 = fa_icon('upload') - else = link_to 'MAKE PAYMENT', new_company_bill_payment_path, data: {title: 'Pay Selected Invoices'}, id: 'make_payment_link', class: 'btn btn-addrow p10' - if @company.subdomain == 'rael' - if ReportSetting.enabled?(@company, :invoices, :txt) = link_to company_invoices_path({format: :csv, tab: params[:tab]}.merge!(params.slice(:q).permit!.to_unsafe_h)), class: 'btn btn-primary ml10', target: :_blank do = fa_icon :'file-excel-o' .col-md-12.recently-updated h4.recently-updated-panel Recently Updated .clearfix - if loyalty.create? and params[:tab] == 'outbound' .col-md-2 .panel.new-work.panel-grid.panel-default = link_to new_company_invoice_path do .panel-body.text-center br/ br/ br/ br/ i class='fa fa-plus' aria-hidden='true' span.pl5 | New Invoices - @recent_invoices.each do |invoice| = link_to company_invoice_path(invoice) do .col-md-2 .panel.draft.panel-grid.panel-default .panel-body br/ strong - if params[:tab] == 'outbound' = invoice.company&.name - else = invoice.vendor&.name br/ = invoice.due_date.strftime('%m/%d/%Y') if invoice.due_date .panel-footer = invoice.status.try(:titleize) .clearfix = render 'invoice_list', invoices: @invoices