- @clients_browser = @client.name+' '+@client.last_name %p#notice= notice .col-md-12.col-sm-12.col-xs-12 %b Name: = @client.name .col-md-12.col-sm-12.col-xs-12 %b Last name: = @client.last_name .col-md-12.col-sm-12.col-xs-12 %b E mail: = @client.e_mail .col-md-12.col-sm-12.col-xs-12 %b Tel num: = @client.tel_num .col-md-12.col-sm-12.col-xs-12 %br %b Note: = raw(@client.note) = link_to 'Edit', edit_client_path(@client) \| = link_to 'Back', clients_path .row .container %h1.text-center Payments = link_to 'New Payment', new_payment_path(client: @client.id ), class: 'btn btn-success btn-block btn-lg', data: { 'no-turbolink'=>true} %table.table.table-bordered.table-hover %thead %tr %th Title %th Link to Pay %th Price %th Status %th Date paid %th %th %th %tbody - @client.payments.each do |payment| - if payment.cod_response == nil %tr.tr-waiting %td = payment.title %br %em.order_loc_payments_n = " nº: " + payment.order_loc.to_s + " " %td Sabadell: %br = url_field_tag(value = "PaymentURLSabadell", value = "https://pay.traveltgs.com/payments/sabadell/?order="+payment.order_loc.to_s, :readonly => true, :onclick => 'this.select();') %br //BBVA: //%br //= url_field_tag(value = "PaymentURLBBVA", value = "https://www.thegrandselection.com/payments/bbva/?order="+payment.order_loc.to_s, :readonly => true, :onclick => 'this.select();') %td= number_to_currency((payment.price.to_f/100 * payment.iva.to_f/100 + payment.price.to_f/100) * payment.payment_fee.to_f/100 + (payment.price.to_f/100 * payment.iva.to_f/100 + payment.price.to_f/100), precision: 2, separator: ",", delimiter: ".") %td= 'waiting...' %td - if payment.date_paid != nil = payment.date_paid.to_datetime.strftime("%d/%m/%Y - %H:%M") %td= link_to 'Show', payment, class: 'btn btn-primary' %td= link_to 'Edit', edit_payment_path(payment), class: 'btn btn-warning' %td= link_to 'Destroy', payment, :method => :delete, :data => { confirm: 'Are you sure?' }, class: 'btn btn-danger' - else - if payment.cod_response >= 0 and payment.cod_response <= 99 %tr.tr-paid %td = payment.title %br %em.order_loc_payments_n = " nº: " + payment.order_loc.to_s + " " %td Sabadell: %br = url_field_tag(value = "PaymentURLSabadell", value = "https://pay.traveltgs.com/payments/sabadell/?order="+payment.order_loc.to_s, :readonly => true, :onclick => 'this.select();') %br //BBVA: //%br //= url_field_tag(value = "PaymentURLBBVA", value = "https://www.thegrandselection.com/payments/bbva/?order="+payment.order_loc.to_s, :readonly => true, :onclick => 'this.select();') %td= number_to_currency((payment.price.to_f/100 * payment.iva.to_f/100 + payment.price.to_f/100) * payment.payment_fee.to_f/100 + (payment.price.to_f/100 * payment.iva.to_f/100 + payment.price.to_f/100), precision: 2, separator: ",", delimiter: ".") %td= 'paid' %td - if payment.date_paid != nil = payment.date_paid.to_datetime.strftime("%d/%m/%Y - %H:%M") %td= link_to 'Show', payment, class: 'btn btn-primary' %td= link_to 'Edit', edit_payment_path(payment), class: 'btn btn-warning' %td= link_to 'Destroy', payment, :method => :delete, :data => { confirm: 'Are you sure?' }, class: 'btn btn-danger' - else %tr.tr-error %td = payment.title %br %em.order_loc_payments_n = " nº: " + payment.order_loc.to_s + " " %td Sabadell: %br = url_field_tag(value = "PaymentURLSabadell", value = "https://pay.traveltgs.com/payments/sabadell/?order="+payment.order_loc.to_s, :readonly => true, :onclick => 'this.select();') %br //BBVA: //%br //= url_field_tag(value = "PaymentURLBBVA", value = "https://www.thegrandselection.com/payments/bbva/?order="+payment.order_loc.to_s, :readonly => true, :onclick => 'this.select();') %td= number_to_currency((payment.price.to_f/100 * payment.iva.to_f/100 + payment.price.to_f/100) * payment.payment_fee.to_f/100 + (payment.price.to_f/100 * payment.iva.to_f/100 + payment.price.to_f/100), precision: 2, separator: ",", delimiter: ".") %td= "Error("+payment.cod_response.to_s+")" %td - if payment.date_paid != nil = payment.date_paid.to_datetime.strftime("%d/%m/%Y - %H:%M") %td= link_to 'Show', payment, class: 'btn btn-primary' %td= link_to 'Edit', edit_payment_path(payment), class: 'btn btn-warning' %td= link_to 'Destroy', payment, :method => :delete, :data => { confirm: 'Are you sure?' }, class: 'btn btn-danger' %br