diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c9fffcc..0d72570 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -168,7 +168,7 @@ class ApplicationController < ActionController::Base end - set_sub_menu :documents, :"p_document_type_reponse_fournisseur", "Réponses fournisseurs", admin_price_documents_path(:price_document_type_id => 2) + set_sub_menu :documents, :"p_document_type_reponse_fournisseur", "Réponses fournisseurs", admin_price_documents_path(:price_document_type_id => 9) diff --git a/app/models/price_document.rb b/app/models/price_document.rb index 07c348c..9b8b83d 100644 --- a/app/models/price_document.rb +++ b/app/models/price_document.rb @@ -25,7 +25,7 @@ class PriceDocument < ApplicationRecord has_many :avoir_p_payment_documents, :dependent => :destroy, :foreign_key => :avoir_id, :class_name => "PPaymentDocument" accepts_nested_attributes_for :avoir_p_payment_documents, allow_destroy: true - PURCHASES = ["Demande prix", "Commande achat", "Facture d'achat"] + PURCHASES = ["Demande de prix", "Commande achat", "Facture d'achat"] SALES = ["Bon de commande", "Devis", "Bon de livraison", "Facture", "Avoir"] # AVANCEMENT = ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"] AVANCEMENT = ["0%", "25%", "50%", "75%", "100"] diff --git a/app/views/admin/price_documents/_price_document.html.haml b/app/views/admin/price_documents/_price_document.html.haml index 1422646..21b2a88 100644 --- a/app/views/admin/price_documents/_price_document.html.haml +++ b/app/views/admin/price_documents/_price_document.html.haml @@ -22,7 +22,7 @@ -tr[:p_fournisseur] = capture do %td - - if price_document.price_document_type_id == 2 + - if price_document.price_document_type.label == "Réponse fournisseur" -if price_document.p_fournisseur.present? = price_document.p_fournisseur.name - else @@ -135,7 +135,7 @@ -tr[:actions] = capture do %td.actions - -if price_document.price_document_type_id == 1 + -if price_document.price_document_type.label == "Demande de prix" =link_to i("bar-chart"), analyse_reponses_admin_price_document_path(price_document) -if !price_document.imported -if current_admin.has_permission?("payments")