2018-08-30 16:32:49 +02:00

90 lines
3.4 KiB
Plaintext

-if @order
.clear
%h2
=qit("orders-new-h2-coordonnées", "Vos coordonnées")
-if !current_annonce_account.pro
=current_annonce_account.firstname
=current_annonce_account.name
-else
=current_annonce_account.organisation
%p
=current_annonce_account.address
-if current_annonce_account.address2?
%br
current_annonce_account.address2
%br
=current_annonce_account.cp
=current_annonce_account.city
%br
=current_annonce_account.country
=link_to qit("orders-new-facturation", "modifier mes infos de facturation"), billing_public_orders_path(:credit_product_id => params[:credit_product_id]), :remote => true
%h3
=qit("orders-new-h3-récap", "Récapitulatif")
%p
=qit("orders-new-p1", "Commande de")
= @order.credit_product.nbr_credits_final(current_annonce_account)
crédits
=qit("orders-new-p2", "pour un montant de")
%strong
=number_to_currency @order.credit_product.price_ttc_final(current_annonce_account), :unit => @order.devise.icon
TTC
(
=number_to_currency @order.credit_product.price_ht_final(current_annonce_account), :unit => @order.devise.icon
HT
)
-if current_annonce_account.commissions.sum(:amount) > 0.0 and !@order.with_com
%p=link_to "Utiliser mon solde de commission (#{number_to_currency(current_annonce_account.solde_commissions(@order.devise_id), :unit => @order.devise.icon)}) et re-calculer le total", new_public_order_path(:credit_product_id => @order.credit_product.id, :with_com => true), :class => "btn btn-primary", :remote => true
-if @order.with_com
%p
=qit("orders-new-p3", "Utilisation de mes commissions :")
%strong=number_to_currency @order.evaluate_use_coms, :unit => @order.devise.icon
(
=qit("orders-new-p4", "votre solde de commission passera à")
=number_to_currency @order.evaluate_solde_coms, :unit => @order.devise.icon
)
%p
=qit("orders-new-p5", "Il vous restera à payer :")
%strong
=number_to_currency @order.evaluate_price_with_coms_ttc, :unit => @order.devise.icon
TTC
(
=number_to_currency @order.evaluate_price_with_coms_ht, :unit => @order.devise.icon
HT
)
%p
-if @order.with_com
%p=link_to "Ne pas utiliser mon solde de commissions", new_public_order_path(:credit_product_id => @order.credit_product.id), :class => "btn btn-primary", :remote => true
%p
=qit("orders-new-p6", "Il vous restera à payer :")
%strong
=number_to_currency @order.evaluate_price_with_coms_ttc, :unit => @order.devise.icon
TTC
(
=number_to_currency @order.evaluate_price_with_coms_ht, :unit => @order.devise.icon
HT
)
%h3
=qit("orders-new-h3-commande", "Valider ma commande")
=semantic_form_for [:public, @order], :remote => true do |f|
=hidden_field_tag :credit_product_id, params[:credit_product_id]
=hidden_field_tag :with_com, params[:with_com]
=f.input :cgv, :as => :boolean, :label => "J'ai lu et j'accepte les conditions générales de vente."
=f.input :retractation, :as => :boolean, :label => "Comme indiqué dans les conditions générales de vente, j'accepte de renoncer à mon droit de rétractation, mon compte étant crédité dès la validation de mon paiement."
=f.submit "Valider ma commande et choisir le mode de paiement", :commit => "cb", :class => "btn btn-primary btn-large"