small bugfixes

This commit is contained in:
Nicolas Bally 2021-11-18 00:54:55 +01:00
parent 40f1a8db0b
commit a2a2ad5d65
2 changed files with 5 additions and 3 deletions

View File

@ -103,7 +103,9 @@ class PCustomerSheet < ApplicationRecord
end
def ca_particular_infos
self.price_line_block.particular_bill.organisation + self.price_line_block.particular_bill.firstname + self.price_line_block.particular_bill.name
if self.price_line_block.particular_bill
self.price_line_block.particular_bill.organisation + self.price_line_block.particular_bill.firstname + self.price_line_block.particular_bill.name
end
end

View File

@ -160,7 +160,7 @@
#customer_adresses
=render(:partial => "admin/particulars/customer_preview", :locals => {:p_customer => @p_customer}) if !@p_customer.p_customer_cat.name == "Plateforme"
=render(:partial => "admin/particulars/customer_preview", :locals => {:p_customer => @p_customer}) if !@p_customer.p_customer_cat&.name == "Plateforme"
@ -179,7 +179,7 @@
%li.nav-item=link_to "Factures & Avoirs", "?tab=bills#tabs", :class => "nav-link"+(" active" if params[:tab] == "bills").to_s
-if current_admin.has_permission?("payments")
%li.nav-item=link_to "Paiements", "?tab=payments#tabs", :class => "nav-link"+(" active" if params[:tab] == "payments").to_s
-if current_admin.has_permission?("payments") and @p_customer.p_customer_cat.name == "Plateforme"
-if current_admin.has_permission?("payments") and @p_customer.p_customer_cat&.name == "Plateforme"
%li.nav-item=link_to "Adresses", "?tab=adresses#tabs", :class => "nav-link"+(" active" if params[:tab] == "adresses").to_s