Merge pull request #2346 from oeoeaio/subs-totals

Subs: totals in backend are consistent and include fee breakdown
This commit is contained in:
Maikel
2018-08-07 18:17:13 +10:00
committed by GitHub
8 changed files with 43 additions and 9 deletions

View File

@@ -19,7 +19,7 @@
%div{ ng: { bind: "::orderCycleCloses(proxyOrder.order_cycle_id)" } }
%td.text-center
%span.state{ ng: { class: "proxyOrder.state", bind: 'stateText(proxyOrder.state)' } }
%td.text-center{ ng: { bind: 'proxyOrder.total | currency' } }
%td.text-center{ ng: { bind: '(proxyOrder.total || subscription.estimatedTotal()) | currency' } }
%td.actions
%a.edit-order.icon-edit.no-text{ href: '{{::proxyOrder.edit_path}}', target: '_blank', 'ofn-with-tip' => t(:edit_order), confirm_order_edit: true }
%a.cancel-order.icon-remove.no-text{ href: 'javascript:void(0)', ng: { hide: "proxyOrder.state == 'canceled'", click: "cancelOrder(proxyOrder)" }, 'ofn-with-tip' => t(:cancel_order) }

View File

@@ -91,3 +91,5 @@
\:
%td.total.align-center
%span#order_form_total {{ subscription.estimatedTotal() | currency }}
%p.notice
= t "this_is_an_estimate", scope: 'admin.subscriptions.subscription_line_items'

View File

@@ -29,7 +29,16 @@
= t(:subtotal)
\:
%td.total.align-center
%span {{ subscription.estimatedSubtotal() | currency }}
%span#order_subtotal {{ subscription.estimatedSubtotal() | currency }}
%td.actions
%tbody#fees.no-border-top{ ng: { show: "subscription.estimatedFees() > 0" } }
%tr#fees-row
%td{:colspan => "3"}
%b
= t(:fees)
\:
%td.total.align-center
%span#order_fees {{ subscription.estimatedFees() | currency }}
%td.actions
%tbody#order-total.grand-total.no-border-top{"data-hook" => "admin_order_form_total"}
%tr
@@ -40,3 +49,5 @@
%td.total.align-center
%span#order_form_total {{ subscription.estimatedTotal() | currency }}
%td.actions
%p.notice
= t ".this_is_an_estimate"

View File

@@ -14,7 +14,7 @@
.steps
%div
= t('.enable_subscriptions_step_1_html',
enterprises_link: link_to(t('admin.enterprises.title'), main_app.admin_enterprises_path, target: '_blank'))
enterprises_link: link_to(t('admin.enterprises.index.title'), main_app.admin_enterprises_path, target: '_blank'))
%div= t('.enable_subscriptions_step_2')
.row.margin-bottom-20.todo{ class: shipping_and_payment_methods_ok?(@shop) ? 'done' : '' }