.card %div{id: "heading-#{payment.id}", class: "card-header"} %h5.mb-0 %button.btn.btn-link{"aria-controls" => "collapse-#{payment.id}", "aria-expanded" => "false", "data-target" => "#collapse-#{payment.id}", "data-toggle" => "collapse"} Pagamento - Data de criação: #{payment.created_at.to_date} %a - if !payment.transactions.empty? = link_to 'Gerar Recibo', admin_receipt_path(payment.id), method: :get, class: "btn btn-warning orange", target: "_blank" - if payment.nil? || payment.awaiting_payment? = link_to manual_pay_payments_path(payment), method: :get, data:{confirm: "Deseja mesmo aprovar esse pagamento manualmente?"} do %img{:alt => "Aprovar pagamento manualmente", :title => "Aprovar pagamento manualmente", :src => asset_path("icons/payment-needed.png")}/ = link_to '', 'data-target': "#myModal", 'data-toggle': "modal" do %img{:alt => "Alterar valor do pagamento manualmente", :title => "Alterar Valor do pagamento", :src => asset_path("icons/edit.png")}/ - if flash['error'] != nil .alert.alert-danger %dt Não foi possível efetuar o pagamento por inconsistencia no cadastro: %br/ %dd %lu - flash[:error].each do |name, message| %li= 'O campo ' + t('simple_form.labels.errors.'+ name) + " " + message[0] %div{"aria-labelledby" => "heading-#{payment.id}", :class => "collapse col-12", "data-parent" => "#accordion", :id => "collapse-#{payment.id}"} .card-body.row .col-3 %dt %span.label.user-info-tit.name_field.string_type ID %dd.well.user-info = payment.id .col-3 %dt %span.label.user-info-tit.name_field.string_type Data de criação %dd.well.user-info #{payment.created_at.to_date} .col-3 %dt %span.label.user-info-tit.name_field.string_type Preço %dd.well.user-info = "R$#{ payment.price}" .col-3 %dt %span.label.user-info-tit.name_field.string_type Tipo %dd.well.user-info #{t('activerecord.models.payment.'+payment.payable_type.downcase, :default => payment.payable_type).titleize} .col-3 %dt %span.label.user-info-tit.name_field.string_type Descrição %dd.well.user-info #{t('activerecord.models.payment.'+payment.name.to_s, :default => payment.name).titleize} .col-3 %dt %span.label.user-info-tit.name_field.string_type #{t('simple_form.labels.defaults.payment_origin').titleize} %dd.well.user-info = payment.origin .col-3 %dt %span.label.user-info-tit.name_field.string_type Data de pagamento %dd.well.user-info - if payment.paid? || payment.manual_paid? - if !payment.pay_date.blank? %spam #{payment.pay_date.to_date} - else %spam - - else %spam - .col-3 %dt %span.label.user-info-tit.name_field.string_type Situação %dd.well.user-info #{t('activerecord.models.payment.'+payment.status.to_s, :default => payment.status).titleize} .col-3 %dt %span.label.user-info-tit.name_field.string_type #{t('simple_form.labels.defaults.payment_notification_data').titleize} %dd.well.user-info = payment.notification_data - if !payment.transactions.blank? .col-12.h5.pt-4.pb-2.grey Dados do pagamento #accordion2.col-12 = render partial: "/users/transaction_card_admin", collection: payment.transactions, as: :transaction #myModal.modal.fade{"aria-labelledby" => "myModalLabel", :role => "dialog", :tabindex => "-1"} .modal-dialog{:role => "document"} .modal-content .modal-header %h4#myModalLabel.modal-title Editor de valor do pagamento %button.close{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"} %span{"aria-hidden" => "true"} × .modal-body %form#rejectMessageForm{:action => change_pay_payments_path(payment), :method => "get"} .form-group %input{:name => "value", :type =>'number', :class => 'form-control', :required => ""} .col-12 %input.btn.btn-primary{:type => "submit"}/ %button.btn.btn-secondary{"aria-label" => "Close", "data-dismiss" => "modal", :type => "button"} %span{"aria-hidden" => "true"} Cancelar