diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index 3e3ae6f..b887b36 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -31,6 +31,11 @@ $ap_error:rgb(249,163,166); $ap_warn:rgb(255,192,0); $ap_dark_gray:rgb(76,76,76); +.table-striped{ +tr{ + background:white; +} +} .navbar-inverse .navbar-nav > .open > a, .navbar-inverse .navbar-nav > .open > a:hover, .navbar-inverse .navbar-nav > .open > a:focus{ background:$ap_dark_gray; diff --git a/app/assets/stylesheets/connexion.scss b/app/assets/stylesheets/connexion.scss index 9b4e965..577d205 100644 --- a/app/assets/stylesheets/connexion.scss +++ b/app/assets/stylesheets/connexion.scss @@ -5,9 +5,7 @@ body { padding:10px; - background:url('/connexion.jpg') fixed center center; - - background-size:cover; + font-family: 'Nunito Sans', sans-serif; margin:0px; padding:0px; } diff --git a/app/controllers/admin/p_fournisseurs_controller.rb b/app/controllers/admin/p_fournisseurs_controller.rb index 3b8b041..6c1dbb8 100644 --- a/app/controllers/admin/p_fournisseurs_controller.rb +++ b/app/controllers/admin/p_fournisseurs_controller.rb @@ -38,7 +38,7 @@ class Admin::PFournisseursController < ApplicationController def new - @p_fournisseur = PFournisseur.new + @p_fournisseur = PFournisseur.new(:country => "FR") end diff --git a/app/models/price_line.rb b/app/models/price_line.rb index ed98fed..ac67c6f 100644 --- a/app/models/price_line.rb +++ b/app/models/price_line.rb @@ -32,12 +32,12 @@ class PriceLine < ApplicationRecord def ca_product_no_remise - self.p_product_ref.no_remise + self.p_product_ref.no_remise if self.p_product_ref end def ca_price_calc - self.p_product_ref.p_product.price_calc == "Kg" + self.p_product_ref.p_product.price_calc == "Kg" if self.p_product_ref and self.p_product_ref.p_product end @@ -266,7 +266,7 @@ class PriceLine < ApplicationRecord def ca_product_remise_enrobage_ok if !self.product_no_remise and !self.ct_u_price_ht and self.p_product_ref and self.p_product_ref.p_product and self.p_product_ref.p_product.discount_enrobage - true + false else false end diff --git a/app/models/price_line_block.rb b/app/models/price_line_block.rb index ce06f49..bd6ddd7 100644 --- a/app/models/price_line_block.rb +++ b/app/models/price_line_block.rb @@ -159,31 +159,7 @@ class PriceLineBlock < ApplicationRecord end def ca_tot_fdp_ht - if self.ct_tot_fdp_ht - self.ct_tot_fdp_ht - else - if self.p_customer_cat_id == 2 - if (self.tot_lines_ht + self.tot_discount_ht) > 290.0 - 0.0 - elsif (self.tot_lines_ht + self.tot_discount_ht) >= 150.0 - 15.0 - else - 30.0 - end - else - - if ca_weight_tot > 45 - 0.0 - elsif ca_weight_tot > 30 - 25.0 - else - 40.0 - end - - - end - - end + 0.0 end @@ -191,7 +167,7 @@ class PriceLineBlock < ApplicationRecord if self.accounting_zone_id == 1 20.0 else - 0.0 + 20.0 #force end end diff --git a/app/views/admin/admin_auths/new.haml b/app/views/admin/admin_auths/new.haml index 0849bb8..473007a 100644 --- a/app/views/admin/admin_auths/new.haml +++ b/app/views/admin/admin_auths/new.haml @@ -12,8 +12,8 @@ = label_tag :remember_me, "Se rappeler de moi ?" - %p= submit_tag "Se connecter", :class => "btn btn-large btn-primary" + %p= submit_tag "Se connecter", :class => "btn btn-large btn-primary", :style => "" - %p= link_to "Mot de passe oublié ?", new_admin_password_reset_path + %p= link_to "Mot de passe oublié ?", new_admin_password_reset_path, :style => "color:red;" diff --git a/app/views/admin/admin_spaces/_documents.html.haml b/app/views/admin/admin_spaces/_documents.html.haml index f143975..603c9f3 100644 --- a/app/views/admin/admin_spaces/_documents.html.haml +++ b/app/views/admin/admin_spaces/_documents.html.haml @@ -1,3 +1,3 @@ -%li= link_to "Tous", admin_p_documents_path, :class => ("active" if !params[:price_document_type_id]) +%li= link_to "Tous", admin_p_documents_path, :class => ("active" if false and !params[:price_document_type_id]) - PriceDocumentType.order("id DESC").all.each do |p_document_type| - %li= link_to p_document_type.label, admin_price_documents_path(:price_document_type_id => p_document_type.id), :class => ("active" if p_document_type.id.to_s == params[:price_document_type_id].to_s) + %li= link_to p_document_type.label, admin_price_documents_path(:price_document_type_id => p_document_type.id), :class => ("active" if false and p_document_type.id.to_s == params[:price_document_type_id].to_s) diff --git a/app/views/admin/admin_spaces/_ventes.html.haml b/app/views/admin/admin_spaces/_ventes.html.haml index f7db810..576cfd1 100644 --- a/app/views/admin/admin_spaces/_ventes.html.haml +++ b/app/views/admin/admin_spaces/_ventes.html.haml @@ -3,9 +3,9 @@ - PriceDocumentType.order("id DESC").all.each do |p_document_type| - %li= link_to p_document_type.label, admin_price_documents_path(:price_document_type_id => p_document_type.id), :class => ("active" if p_document_type.id.to_s == params[:price_document_type_id].to_s) + %li= link_to p_document_type.label, admin_price_documents_path(:price_document_type_id => p_document_type.id), :class => ("active" if false and p_document_type.id.to_s == params[:price_document_type_id].to_s) -%li= link_to "Tous documents", admin_price_documents_path, :class => ("active" if !params[:price_document_type_id]) +%li= link_to "Tous documents", admin_price_documents_path, :class => ("active" if false and !params[:price_document_type_id]) =#%li= link_to "Matières premières", admin_p_brut_products_path =#%li= link_to "Normes produits", admin_p_product_specs_path diff --git a/app/views/admin/market_discounts/_form.html.haml b/app/views/admin/market_discounts/_form.html.haml index 017db61..68042a1 100644 --- a/app/views/admin/market_discounts/_form.html.haml +++ b/app/views/admin/market_discounts/_form.html.haml @@ -3,7 +3,7 @@ .content =f.inputs do = f.input :p_customer_cat_id, :label => "Catégorie client", :include_blank => false, :collection => PCustomerCat.order(:name).all, :as => :select - = f.input :min, :label => "Min :" + = f.input :min, :label => "Min annuel (€) :" =# f.input :max, :label => "Max :" = f.input :percent, :label => "Pourcentage de réduction :" diff --git a/app/views/admin/market_discounts/_market_discount.html.haml b/app/views/admin/market_discounts/_market_discount.html.haml index 78e66b8..3b5db97 100644 --- a/app/views/admin/market_discounts/_market_discount.html.haml +++ b/app/views/admin/market_discounts/_market_discount.html.haml @@ -3,6 +3,7 @@ %td =">" = market_discount.min + ="€" %td= market_discount.percent.to_s+"%" %td.actions diff --git a/app/views/admin/market_discounts/index.html.haml b/app/views/admin/market_discounts/index.html.haml index 2d92d61..7e922a0 100644 --- a/app/views/admin/market_discounts/index.html.haml +++ b/app/views/admin/market_discounts/index.html.haml @@ -1,5 +1,5 @@ .qi_header - .right= link_to 'Ajouter une remise', new_admin_market_discount_path(), :class => "btn btn-primary", :remote => true + .right= link_to 'Ajouter une remise', new_admin_market_discount_path(), :class => "btn btn-primary bgbd-clients", :remote => true %h1 Remises marché %span @@ -12,7 +12,7 @@ %table.table %tr %th Catégorie - %th Min + %th Min annuel %th Réduction %th.actions diff --git a/app/views/admin/p_commercial_cats/index.html.haml b/app/views/admin/p_commercial_cats/index.html.haml index 6a0be50..d27f99e 100644 --- a/app/views/admin/p_commercial_cats/index.html.haml +++ b/app/views/admin/p_commercial_cats/index.html.haml @@ -1,5 +1,5 @@ .qi_header - .right= link_to 'Ajouter une catégorie', new_admin_p_commercial_cat_path(), :class => "btn btn-primary", :remote => true + .right= link_to 'Ajouter une catégorie', new_admin_p_commercial_cat_path(), :class => "btn btn-primary bgbd-clients", :remote => true %h1 Commerciaux %span diff --git a/app/views/admin/p_commercials/_form.html.haml b/app/views/admin/p_commercials/_form.html.haml index ebaf9d0..9f2da10 100755 --- a/app/views/admin/p_commercials/_form.html.haml +++ b/app/views/admin/p_commercials/_form.html.haml @@ -23,7 +23,7 @@ = f.input :start_at, :label => "Date d'entrée :", :as => :date = f.input :stop_at, :label => "Date de sortie :", :as => :date - = f.input :avenant, :label => "Avenant ?" + =# f.input :avenant, :label => "Avenant ?" diff --git a/app/views/admin/p_commercials/index.html.haml b/app/views/admin/p_commercials/index.html.haml index 047f406..148c4aa 100644 --- a/app/views/admin/p_commercials/index.html.haml +++ b/app/views/admin/p_commercials/index.html.haml @@ -1,5 +1,5 @@ .qi_header - .right= link_to 'Ajouter un commercial', new_admin_p_commercial_path(), :class => "btn btn-primary", :remote => true + .right= link_to 'Ajouter un commercial', new_admin_p_commercial_path(), :class => "btn btn-primary bgbd-clients", :remote => true %h1 Commerciaux %span diff --git a/app/views/admin/p_customer_cats/index.html.haml b/app/views/admin/p_customer_cats/index.html.haml index a447feb..c59af1f 100644 --- a/app/views/admin/p_customer_cats/index.html.haml +++ b/app/views/admin/p_customer_cats/index.html.haml @@ -1,5 +1,5 @@ .qi_header - .right= link_to 'Ajouter une catégorie', new_admin_p_customer_cat_path(), :class => "btn btn-primary", :remote => true + .right= link_to 'Ajouter une catégorie', new_admin_p_customer_cat_path(), :class => "btn btn-primary bgbd-clients", :remote => true %h1 Produits %span diff --git a/app/views/admin/p_customer_sheets/_form.html.haml b/app/views/admin/p_customer_sheets/_form.html.haml index 68f8f17..0bb6803 100755 --- a/app/views/admin/p_customer_sheets/_form.html.haml +++ b/app/views/admin/p_customer_sheets/_form.html.haml @@ -1,8 +1,10 @@ =semantic_form_for [:admin, @p_customer_sheet], :html => {:class => "qi_price_form"}, :remote => false do |form| .content - -if @p_customer_sheet and @p_customer_sheet.state != "commande" - =form.input :demande_type, :collection => ["Brouillon", "Demande de bon de commande","Demande de devis"], :as => :select, :include_blank => false, :label => "Type de demande :" + + .qi_pannel.qi_plain.padding + -if @p_customer_sheet and @p_customer_sheet.state != "commande" + =form.input :demande_type, :collection => ["Brouillon", "Demande de bon de commande","Demande de devis"], :as => :select, :include_blank => false, :label => "Type de demande :" .price_line_block_form =form.semantic_fields_for :price_line_block do |f| diff --git a/app/views/admin/p_customer_sheets/edit.html.haml b/app/views/admin/p_customer_sheets/edit.html.haml index f1b4f3f..604e1fa 100644 --- a/app/views/admin/p_customer_sheets/edit.html.haml +++ b/app/views/admin/p_customer_sheets/edit.html.haml @@ -6,7 +6,7 @@ %span Modifier une demande -.qi_row - .qi_pannel.qi_plain.padding - = render 'form' + + += render 'form' diff --git a/app/views/admin/p_customer_sheets/index.html.haml b/app/views/admin/p_customer_sheets/index.html.haml index 6f5f84c..c0f908b 100644 --- a/app/views/admin/p_customer_sheets/index.html.haml +++ b/app/views/admin/p_customer_sheets/index.html.haml @@ -1,6 +1,6 @@ .qi_header .right - =link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary btn-ap-add" + =link_to ic(:plus)+" Demande de commande", admin_p_customers_path(:offre => true), :class => "btn btn-primary bgbd-ventes" %h1 Ventes diff --git a/app/views/admin/p_customer_sheets/new.html.haml b/app/views/admin/p_customer_sheets/new.html.haml index fb8e774..d613bb5 100644 --- a/app/views/admin/p_customer_sheets/new.html.haml +++ b/app/views/admin/p_customer_sheets/new.html.haml @@ -9,8 +9,7 @@ Ajouter une demande -.qi_row - .qi_pannel.qi_plain.padding - - = render 'form' + + +.qi_row= render 'form' diff --git a/app/views/admin/p_customer_sheets/show.html.haml b/app/views/admin/p_customer_sheets/show.html.haml index 7fd3b37..d3b513e 100644 --- a/app/views/admin/p_customer_sheets/show.html.haml +++ b/app/views/admin/p_customer_sheets/show.html.haml @@ -24,21 +24,23 @@ -if @p_customer_sheet.p_customer and @p_customer_sheet.p_customer.particular =render :partial => "admin/p_customers/apercu", :locals => {:particular => @p_customer_sheet.p_customer.particular} + + %br + + + %table.table{:style => ""} + %tr{:style => "background:transparent"} + %td{:style => "border:0"} + %h3 Adresse de facturation + =render(:partial => "admin/particulars/particular_detail", :locals => {:particular => @p_customer_sheet.particular_bill}) if @p_customer_sheet.particular_bill - %table.table{:style => ""} - %tr - %td{:style => "border:0"} - %h3 Adresse de facturation - - =render(:partial => "admin/particulars/particular_detail", :locals => {:particular => @p_customer_sheet.particular_bill}) if @p_customer_sheet.particular_bill - - %td{:style => "border:0"} - %h3 Adresse de livraison - - =render(:partial => "admin/particulars/particular_detail", :locals => {:particular => @p_customer_sheet.particular_send}) if @p_customer_sheet.particular_send + %td{:style => "border:0"} + %h3 Adresse de livraison + =render(:partial => "admin/particulars/particular_detail", :locals => {:particular => @p_customer_sheet.particular_send}) if @p_customer_sheet.particular_send + .qi_pannel.qi_plain.padding -price_line_block = @p_customer_sheet.price_line_block %p @@ -72,9 +74,9 @@ %strong Notes pour les demandes de commandes pour ce client : =simple_format @p_customer_sheet.p_customer.p_customer_sheet_note %br - - - %table.table + %br + %div{:style => "overflow:auto;"} + %table.table.table-striped.table-hover.table-bordered %thead %tr %th Référence @@ -114,11 +116,7 @@ %br comptant - -if price_line_block.remise_enrobage_ok - %th - Remise - %br - enrobage + -else %th Remise @@ -171,11 +169,7 @@ %br =number_to_currency price_line.ca_discount_comptant_ht - -if price_line_block.remise_enrobage_ok - %td.numeraire - =price_line.discount_enrobage_percent.to_s+"%" - %br - =number_to_currency price_line.ca_discount_enrobage_ht + -else %td.numeraire =price_line.discount_ecole_percent.to_s+"%" @@ -191,7 +185,7 @@ %td.numeraire =number_to_currency price_line.tot_amount_ht - + .qi_pannel.qi_plain.padding %table.table{:style => "width:auto;float:right;"} %tr %th @@ -222,7 +216,7 @@ %tr %th Frais de port HT - ="(TVA #{price_line_block.fdp_tva_rate}%)" + =#"(TVA #{price_line_block.fdp_tva_rate}%)" %td.numeraire =number_to_currency price_line_block.tot_fdp_ht @@ -292,23 +286,23 @@ =number_to_currency value[:tva] - %table.table{:style => "width:auto;"} - %tr - %th - Échéance - %th Mode de paiement - %th - Montant net - %tr - %td - =price_line_block.payment_delais.to_i - jours - %td - =price_line_block.p_payment_type.name if price_line_block.p_payment_type - %td - =number_to_currency price_line_block.tot_amount_ttc + %table.table{:style => "width:auto;"} + %tr + %th + Échéance + %th Mode de paiement + %th + Montant net + %tr + %td + =price_line_block.payment_delais.to_i + jours + %td + =price_line_block.p_payment_type.name if price_line_block.p_payment_type + %td + =number_to_currency price_line_block.tot_amount_ttc - .clear + .clear %hr diff --git a/app/views/admin/p_customers/_form.html.haml b/app/views/admin/p_customers/_form.html.haml index 4fd74b5..95a5365 100755 --- a/app/views/admin/p_customers/_form.html.haml +++ b/app/views/admin/p_customers/_form.html.haml @@ -92,9 +92,7 @@ -mds = MarketDiscount.order("p_customer_cat_id ASC, min ASC").all = form.input :market_discount_id, :label => "Remise annuelle de marché :", :include_blank => true, :collection => mds, :as => :select, :member_label => :member_label - .col-sm-4 - %br - = form.input :discount_enrobage, :label => "Remise enrobage ?", :as => :boolean + .col-sm-4 %br = form.input :discount_comptant, :label => "Remise paiement comptant ?", :as => :boolean diff --git a/app/views/admin/p_customers/_p_customer.html.haml b/app/views/admin/p_customers/_p_customer.html.haml index 1606734..acb1fc5 100644 --- a/app/views/admin/p_customers/_p_customer.html.haml +++ b/app/views/admin/p_customers/_p_customer.html.haml @@ -35,7 +35,7 @@ %td.actions -if params[:offre].to_s == "true" -if p_customer.enabled - =link_to ic(:"arrow-right")+" Demande de commande", new_admin_p_customer_sheet_path(:p_customer_id => p_customer.id), :class => "btn btn-primary btn-ap-add" + =link_to ic(:"arrow-right")+" Demande de commande", new_admin_p_customer_sheet_path(:p_customer_id => p_customer.id), :class => "btn btn-primary bgbd-ventes" -else .badge.badge-danger =ic :lock diff --git a/app/views/admin/p_customers/index.html.haml b/app/views/admin/p_customers/index.html.haml index e87951e..130dce0 100644 --- a/app/views/admin/p_customers/index.html.haml +++ b/app/views/admin/p_customers/index.html.haml @@ -3,7 +3,7 @@ -if params[:offre].to_s != "true" -if current_admin.has_permission?("customers-c") - .right= link_to ic(:plus)+' Ajouter un client', new_admin_p_customer_path(), :class => "btn btn-primary btn-ap-add", :remote => false + .right= link_to ic(:plus)+' Ajouter un client', new_admin_p_customer_path(), :class => "btn btn-primary bgbd-clients", :remote => false -else .right =link_to "< Retour aux demandes de commande", admin_p_customer_sheets_path diff --git a/app/views/admin/p_customers/show.html.haml b/app/views/admin/p_customers/show.html.haml index 78e009b..0d115d8 100644 --- a/app/views/admin/p_customers/show.html.haml +++ b/app/views/admin/p_customers/show.html.haml @@ -80,7 +80,7 @@ .qi_tab_header .right{:style => "text-align:right;"} -if @p_customer.enabled - =link_to ic(:plus)+" Demande de commande", new_admin_p_customer_sheet_path(:p_customer_id => @p_customer.id), :class => "btn btn-primary btn-ap-add" + =link_to ic(:plus)+" Demande de commande", new_admin_p_customer_sheet_path(:p_customer_id => @p_customer.id), :class => "btn btn-primary bgbd-ventes" diff --git a/app/views/admin/p_fournisseurs/index.html.haml b/app/views/admin/p_fournisseurs/index.html.haml index b3a4a9a..41c23d7 100644 --- a/app/views/admin/p_fournisseurs/index.html.haml +++ b/app/views/admin/p_fournisseurs/index.html.haml @@ -1,5 +1,5 @@ .qi_header - .right= link_to 'Ajouter un fournisseur', new_admin_p_fournisseur_path(), :class => "btn btn-primary", :remote => true + .right= link_to 'Ajouter un fournisseur', new_admin_p_fournisseur_path(), :class => "btn btn-primary bgbd-stocks", :remote => true %h1 Achats %span diff --git a/app/views/admin/p_product_cats/index.html.haml b/app/views/admin/p_product_cats/index.html.haml index 4df21f9..d047328 100644 --- a/app/views/admin/p_product_cats/index.html.haml +++ b/app/views/admin/p_product_cats/index.html.haml @@ -1,7 +1,7 @@ .qi_header - .right= link_to 'Ajouter une catégorie', new_admin_p_product_cat_path(), :class => "btn btn-primary", :remote => true + .right= link_to 'Ajouter une catégorie', new_admin_p_product_cat_path(), :class => "btn btn-primary bgbd-stocks", :remote => true %h1 - Achats + Produits %span Catégories produit diff --git a/app/views/admin/p_product_cats/new.html.haml b/app/views/admin/p_product_cats/new.html.haml index 3b1635e..fe237b2 100644 --- a/app/views/admin/p_product_cats/new.html.haml +++ b/app/views/admin/p_product_cats/new.html.haml @@ -1,4 +1,4 @@ -%h1 Ajouter un distributeur +%h1 Ajouter une catégorie = render 'form' diff --git a/app/views/admin/p_product_sub_cats/_form.html.haml b/app/views/admin/p_product_sub_cats/_form.html.haml index 2262713..98aa754 100644 --- a/app/views/admin/p_product_sub_cats/_form.html.haml +++ b/app/views/admin/p_product_sub_cats/_form.html.haml @@ -4,7 +4,7 @@ =f.inputs do = f.hidden_field :parent_id #, :label => "parent_id :" = f.input :code, :label => "Code :" - = f.input :name, :label => "name :" + = f.input :name, :label => "Nom :" =# f.input :position, :label => "position :" =# f.input :enabled, :label => "enabled :" diff --git a/app/views/admin/p_product_sub_cats/_index_block.html.haml b/app/views/admin/p_product_sub_cats/_index_block.html.haml index ab28edb..9f95c62 100644 --- a/app/views/admin/p_product_sub_cats/_index_block.html.haml +++ b/app/views/admin/p_product_sub_cats/_index_block.html.haml @@ -1,7 +1,7 @@ #p_product_sub_cat_index %ul.breadcrumb - = link_to 'Ajouter une catégorie', new_admin_p_product_sub_cat_path(:parent_id => params[:parent_id]), :class => "btn btn-primary",:remote => true, :style => "float:right;" + = link_to 'Ajouter une catégorie', new_admin_p_product_sub_cat_path(:parent_id => params[:parent_id]), :class => "btn btn-primary bgbd-stocks",:remote => true, :style => "float:right;" %li -if @p_product_sub_cat_parent -@p_product_sub_cat_parent.ancestors.reverse.each do |p_product_sub_cat| diff --git a/app/views/admin/p_product_sub_cats/index.html.haml b/app/views/admin/p_product_sub_cats/index.html.haml index eaccb82..74960c8 100644 --- a/app/views/admin/p_product_sub_cats/index.html.haml +++ b/app/views/admin/p_product_sub_cats/index.html.haml @@ -1,8 +1,7 @@ .qi_header %h1 - Blog - %span - liste des catégories + Produits + %span Sous catégories .qi_row diff --git a/app/views/admin/p_products/_form.html.haml b/app/views/admin/p_products/_form.html.haml index 3ec507d..df60ec2 100755 --- a/app/views/admin/p_products/_form.html.haml +++ b/app/views/admin/p_products/_form.html.haml @@ -86,9 +86,7 @@ .row.qi_cancel_margins .col-sm-4 =f.input :p_product_sub_cats, :label => "Sous catégories :", :collection => PProductSubCat.where(["parent_id is NULL"]).all, :as => :check_boxes, :nested_set=>true, :member_label => :member_label - - .col-sm-4 - = f.input :discount_enrobage, :label => "Remise enrobage ?", :as => :boolean + -if false %p= link_to_add_fields "Ajouter une référence", f, :p_product_refs diff --git a/app/views/admin/p_products/index.html.haml b/app/views/admin/p_products/index.html.haml index f6e98e3..e1b5385 100644 --- a/app/views/admin/p_products/index.html.haml +++ b/app/views/admin/p_products/index.html.haml @@ -2,7 +2,7 @@ .qi_header .right -if current_admin.has_permission?("products-c") - = link_to ic(:plus)+' Ajouter un produit', new_admin_p_product_path(), :class => "btn btn-primary btn-ap-add", :remote => false + = link_to ic(:plus)+' Ajouter un produit', new_admin_p_product_path(), :class => "btn btn-primary bgbd-stocks", :remote => false %h1 Achats %span diff --git a/app/views/admin/price_documents/print.html.haml b/app/views/admin/price_documents/print.html.haml index bcab638..a288bf5 100644 --- a/app/views/admin/price_documents/print.html.haml +++ b/app/views/admin/price_documents/print.html.haml @@ -170,11 +170,7 @@ %br comptant - -if price_line_block.remise_enrobage_ok - %th - Remise - %br - enrobage + -else %th Remise @@ -225,11 +221,7 @@ %br =number_to_currency price_line.ca_discount_comptant_ht - -if price_line_block.remise_enrobage_ok - %td.numeraire - =price_line.discount_enrobage_percent.to_s+"%" - %br - =number_to_currency price_line.ca_discount_enrobage_ht + -else %td.numeraire =price_line.discount_ecole_percent.to_s+"%" @@ -276,7 +268,7 @@ %tr %th Frais de port HT - ="(TVA #{price_line_block.fdp_tva_rate}%)" + =#"(TVA #{price_line_block.fdp_tva_rate}%)" %td.numeraire =number_to_currency price_line_block.tot_fdp_ht diff --git a/app/views/admin/price_line_blocks/_form.html.haml b/app/views/admin/price_line_blocks/_form.html.haml index 0dc106d..a91e646 100644 --- a/app/views/admin/price_line_blocks/_form.html.haml +++ b/app/views/admin/price_line_blocks/_form.html.haml @@ -3,60 +3,61 @@ -if !@p_customer_sheet or (@p_customer_sheet and @p_customer_sheet.state != "commande") - = f.input :p_commercial_id, :label => "Commercial :", :collection => PCommercial.order(:name).all, :as => :select, :member_label => :long_name if f.object.id + .qi_pannel.qi_plain.padding{:style => "margin:20px 0;"} + = f.input :p_commercial_id, :label => "Commercial :", :collection => PCommercial.order(:name).all, :as => :select, :member_label => :long_name if f.object.id - = f.hidden_field :p_customer_id, :class => "p_customer_id" + = f.hidden_field :p_customer_id, :class => "p_customer_id" - .p_customer_sheet_customer + .p_customer_sheet_customer - -if f.object.p_customer and f.object.p_customer.particular - =render :partial => "admin/p_customers/apercu", :locals => {:particular => f.object.p_customer.particular} + -if f.object.p_customer and f.object.p_customer.particular + =render :partial => "admin/p_customers/apercu", :locals => {:particular => f.object.p_customer.particular} - .addresses.row - .columns.span_6 - %h3 Adresse de facturation + .addresses.row + .columns.span_6 + %h3 Adresse de facturation - -if f.object.p_customer - =f.inputs do - = f.input :particular_bill_id, :collection => f.object.p_customer.particulars.all, :as => :select, :member_label => :address_line, :include_blank => false, :label => "Adresse de facturation" - -else - =f.inputs do - = f.input :particular_bill_id, :collection => [], :as => :select, :include_blank => false, :label => "Adresse de facturation" + -if f.object.p_customer + =f.inputs do + = f.input :particular_bill_id, :collection => f.object.p_customer.particulars.all, :as => :select, :member_label => :address_line, :include_blank => false, :label => "Adresse de facturation" + -else + =f.inputs do + = f.input :particular_bill_id, :collection => [], :as => :select, :include_blank => false, :label => "Adresse de facturation" - .columns.span_6 - %h3 Adresse de livraison + .columns.span_6 + %h3 Adresse de livraison - -if f.object.p_customer - =f.inputs do - = f.input :particular_send_id, :collection => f.object.p_customer.particulars.all, :as => :select, :member_label => :address_line, :include_blank => false, :label => "Adresse de livraison" - -else - =f.inputs do - = f.input :particular_send_id, :collection => [], :as => :select, :include_blank => false, :label => "Adresse de facturation" + -if f.object.p_customer + =f.inputs do + = f.input :particular_send_id, :collection => f.object.p_customer.particulars.all, :as => :select, :member_label => :address_line, :include_blank => false, :label => "Adresse de livraison" + -else + =f.inputs do + = f.input :particular_send_id, :collection => [], :as => :select, :include_blank => false, :label => "Adresse de facturation" - .clear + .clear - %table{:style => "width:100%;"} - %tr - %td{:style => "width:50%;"} - = f.input :wish_date, :label => "Date de livraison souhaitée :", :as => :date + %table{:style => "width:100%;"} + %tr + %td{:style => "width:50%;"} + = f.input :wish_date, :label => "Date de livraison souhaitée :", :as => :date - %td{:style => "width:50%;"} - = f.input :ct_creation_date, :label => "Date de commande (si différente de la date de création) :", :as => :date + %td{:style => "width:50%;"} + = f.input :ct_creation_date, :label => "Date de commande (si différente de la date de création) :", :as => :date - = f.input :customer_ref, :label => "Référence commande client :" - -if current_admin.has_permission?("customer-sheets-bl") - = f.input :bl_comment, :label => "Commentaire à mettre sur le BL :", :input_html => {:style => "min-height:50px;height:50px;"} + = f.input :customer_ref, :label => "Référence commande client :" + -if current_admin.has_permission?("customer-sheets-bl") + = f.input :bl_comment, :label => "Commentaire à mettre sur le BL :", :input_html => {:style => "min-height:50px;height:50px;"} - -if @p_customer_sheet and @p_customer_sheet.p_customer and @p_customer_sheet.p_customer.p_customer_sheet_note? - %div - %strong Notes pour les demandes de commandes pour ce client : - =simple_format @p_customer_sheet.p_customer.p_customer_sheet_note - %br + -if @p_customer_sheet and @p_customer_sheet.p_customer and @p_customer_sheet.p_customer.p_customer_sheet_note? + %div + %strong Notes pour les demandes de commandes pour ce client : + =simple_format @p_customer_sheet.p_customer.p_customer_sheet_note + %br @@ -68,7 +69,7 @@ %p= link_to_add_fields "Ajouter une ligne", f, :price_lines, {:class => "btn btn-primary"} - .price_line_block_footer + .qi_pannel.qi_plain.padding.price_line_block_footer{:style => "margin:20px 0;"} -if !@p_customer_sheet or (@p_customer_sheet and @p_customer_sheet.state != "commande") = f.input :ct_tot_discount_percent, :label => "Réduction pied de page (%) :", :input_html => {:class => "input_price_line_block_ct_tot_discount_percent"} = f.input :ct_tot_fdp_ht, :label => "Frais de port personnalisés :" @@ -79,23 +80,22 @@ -if current_admin.has_permission?("payments") -if !@p_customer_sheet or (@p_customer_sheet and @p_customer_sheet.state != "commande") - if f.object.id + .qi_pannel.qi_plain.padding{:style => "margin:20px 0;"} + %h4 Paiements - %hr - %h4 Paiements - - = f.input :p_payment_type_id, :label => "Type de paiement :", :include_blank => false, :collection => PPaymentType.order(:name).all, :as => :select, :input_html => {:id => "payment_type_id_select"} + = f.input :p_payment_type_id, :label => "Type de paiement :", :include_blank => false, :collection => PPaymentType.order(:name).all, :as => :select, :input_html => {:id => "payment_type_id_select"} - = f.input :ct_payment_comptant, :label => "Paiement comptant nécessaire ?" + = f.input :ct_payment_comptant, :label => "Paiement comptant nécessaire ?" - -if false - = f.input :ct_acompte, :label => "Acompte nécessaire ?" - = f.input :ct_acompte_percent, :label => "Pourcentage d'acompte :" + -if false + = f.input :ct_acompte, :label => "Acompte nécessaire ?" + = f.input :ct_acompte_percent, :label => "Pourcentage d'acompte :" - = f.input :ct_payment_delais, :label => "Délais jour de paiement :" + = f.input :ct_payment_delais, :label => "Délais jour de paiement :" - -if false - = f.input :ct_payment_month_end, :label => "Fin de mois ?" + -if false + = f.input :ct_payment_month_end, :label => "Fin de mois ?" diff --git a/app/views/admin/price_lines/_form.html.haml b/app/views/admin/price_lines/_form.html.haml index 589d4f0..8d7557e 100644 --- a/app/views/admin/price_lines/_form.html.haml +++ b/app/views/admin/price_lines/_form.html.haml @@ -1,5 +1,5 @@ -.price_line_form.field{:style =>"border-left:4px solid gray;margin-bottom:10px;padding-left:5px;"} +.qi_pannel.qi_plain.padding.price_line_form.field{:style =>"border-left:4px solid gray;margin-bottom:10px;padding-left:5px;"} %table{:style => "width:100%;"} %tr %td{:style => "width:30px;"} diff --git a/app/views/admin/s_brands/index.html.haml b/app/views/admin/s_brands/index.html.haml index 164cd26..81aa8d6 100644 --- a/app/views/admin/s_brands/index.html.haml +++ b/app/views/admin/s_brands/index.html.haml @@ -1,5 +1,5 @@ .qi_header - .right= link_to 'Ajouter une marque', new_admin_s_brand_path(), :class => "btn btn-primary", :remote => true + .right= link_to 'Ajouter une marque', new_admin_s_brand_path(), :class => "btn btn-primary bgbd-stocks", :remote => true %h1 Marques %span diff --git a/app/views/layouts/connexion.html.haml b/app/views/layouts/connexion.html.haml index a93a86b..ebd64ba 100644 --- a/app/views/layouts/connexion.html.haml +++ b/app/views/layouts/connexion.html.haml @@ -8,16 +8,48 @@ = csrf_meta_tags = stylesheet_link_tag :connexion = javascript_include_tag :connexion + - %body + %body{:style => "background:center center url('/login_background.jpg?a=#{Time.now.to_s.to_slug}') black fixed;background-size:100%;background-size:cover;"} :coffeescript $ -> $.backstretch("/login_background.jpg") #flashs= bootstrap_flash - .form-signin.content= yield + + .form-signin.content + =link_to image_tag("/logo-demo3.png"), "/", :id => "logo" + = yield + =image_tag("/logo-basic-intelligence.png", :id => "logo-basic") - \ No newline at end of file + :scss + .btn-primary{ + background:red; + border-color:red; + &:hover{ + background:darken(#c01717, 10%); + border-color:darken(#c01717, 10%); + } + + + } + .form-signin.content{ + position:relative; + } + #logo{ + img{width:50px; + position:absolute; + top:-60px; + left:5px; + } + } + + #logo-basic{ + position:fixed; + bottom:10px; + left:25px; + width:120px; + } \ No newline at end of file diff --git a/public/cedric-vt-Q73vCFJLegI-unsplash.jpg b/public/cedric-vt-Q73vCFJLegI-unsplash.jpg new file mode 100644 index 0000000..08047a8 Binary files /dev/null and b/public/cedric-vt-Q73vCFJLegI-unsplash.jpg differ diff --git a/public/login_background.jpg b/public/login_background.jpg new file mode 100644 index 0000000..89d29e8 Binary files /dev/null and b/public/login_background.jpg differ diff --git a/public/perry-grone-lbLgFFlADrY-unsplash.jpg b/public/perry-grone-lbLgFFlADrY-unsplash.jpg new file mode 100644 index 0000000..9cc1d48 Binary files /dev/null and b/public/perry-grone-lbLgFFlADrY-unsplash.jpg differ