Skip to content

Commit

Permalink
payment types
Browse files Browse the repository at this point in the history
  • Loading branch information
qinmingyuan committed Jan 27, 2025
1 parent b77fe7d commit 02ab221
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 35 deletions.
26 changes: 13 additions & 13 deletions app/views/trade/admin/orders/_base/_payment_types_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
<section class="modal-card-body">
<table class="table is-fullwidth is-borderless as-show">
<tbody>
<tr>
<td class="text-right"><%= Trade::Order.human_attribute_name(:unreceived_amount) %></td>
<td class="text-danger"><%= @order.unreceived_amount.to_money.format.html_safe %></td>
</tr>
<% @order.payment_orders.select(&:new_record?).each do |payment_order| %>
<% if payment_order.payment.is_a?(Trade::WalletPayment) && payment_order.payment.wallet.wallet_template %>
<%= render partial: 'payment_wallet', locals: { payment_order: payment_order, f: f } %>
<% elsif payment_order.payment.is_a?(Trade::WalletPayment) %>
<%= render partial: 'payment_lawful_wallet', locals: { payment_order: payment_order, f: f } %>
<% elsif payment_order.payment.is_a?(Trade::HandPayment) %>
<%= render partial: 'payment_hand', locals: { payment_order: payment_order, f: f } %>
<tr>
<td class="text-right"><%= Trade::Order.human_attribute_name(:unreceived_amount) %></td>
<td class="text-danger"><%= @order.unreceived_amount.to_money.format.html_safe %></td>
</tr>
<% @order.payment_orders.select(&:new_record?).each do |payment_order| %>
<% if payment_order.payment.is_a?(Trade::WalletPayment) && payment_order.payment.wallet.wallet_template %>
<%= render partial: 'payment_wallet', locals: { payment_order: payment_order, f: f } %>
<% elsif payment_order.payment.is_a?(Trade::WalletPayment) %>
<%= render partial: 'payment_lawful_wallet', locals: { payment_order: payment_order, f: f } %>
<% elsif payment_order.payment.is_a?(Trade::HandPayment) %>
<%= render partial: 'payment_hand', locals: { payment_order: payment_order, f: f } %>
<% end %>
<% end %>
<% end %>
</tbody>
</tbody>
</table>
</section>
<%= f.submit %>
19 changes: 19 additions & 0 deletions app/views/trade/my/orders/_payment_types_form.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<%= render 'modal_header' %>
<section class="modal-card-body">
<table class="table is-fullwidth is-borderless as-show">
<tbody>
<tr>
<td class="text-right"><%= Trade::Order.human_attribute_name(:unreceived_amount) %></td>
<td class="text-danger"><%= @order.unreceived_amount.to_money.format.html_safe %></td>
</tr>
<% @order.payment_orders.select(&:new_record?).each do |payment_order| %>
<% if payment_order.payment.is_a?(Trade::WalletPayment) && payment_order.payment.wallet.wallet_template %>
<%= render partial: 'payment_wallet', locals: { payment_order: payment_order, f: f } %>
<% elsif payment_order.payment.is_a?(Trade::WalletPayment) %>
<%= render partial: 'payment_lawful_wallet', locals: { payment_order: payment_order, f: f } %>
<% end %>
<% end %>
</tbody>
</table>
</section>
<%= f.submit %>
22 changes: 0 additions & 22 deletions app/views/trade/my/orders/payment_types.html.erb

This file was deleted.

0 comments on commit 02ab221

Please sign in to comment.