remove next in custom_import
This commit is contained in:
parent
b57ed75754
commit
2abba273a9
@ -692,7 +692,7 @@ class PCustomer < ApplicationRecord
|
||||
particular_bill.fax = value
|
||||
|
||||
when "mode_reglement"
|
||||
next if value.nil?
|
||||
if value.present?
|
||||
if value == "VIR" || "VIR COM" || "VIR 60 J NET" || "VIR 30 J NET"
|
||||
n.p_payment_type_id = PPaymentType.find_or_create_by(name: "Virement").id
|
||||
elsif value == "TRAITE"
|
||||
@ -700,6 +700,7 @@ class PCustomer < ApplicationRecord
|
||||
else
|
||||
n.p_payment_type_id = PPaymentType.find_or_create_by(name: value).id
|
||||
end
|
||||
end
|
||||
|
||||
when "libelle_mode_reglement"
|
||||
case value
|
||||
@ -722,8 +723,9 @@ class PCustomer < ApplicationRecord
|
||||
end
|
||||
|
||||
when "nom_banque"
|
||||
next if value.nil?
|
||||
if value.present?
|
||||
bank = PBank.find_or_create_by(name: value)
|
||||
end
|
||||
|
||||
when "adresse_banque_1"
|
||||
bank_particular.address_1 = value
|
||||
@ -766,19 +768,20 @@ class PCustomer < ApplicationRecord
|
||||
particular_bill.civilite = value
|
||||
|
||||
when "fonction_contact"
|
||||
next if value.nil?
|
||||
if value.present?
|
||||
contact.p_contact_types << PContactType.find_or_create_by(name: value)
|
||||
|
||||
end
|
||||
when "telephone_contact"
|
||||
contact.tel = value
|
||||
|
||||
when "portable_contact"
|
||||
next if value.nil?
|
||||
if value.present?
|
||||
if contact.tel.nil?
|
||||
contact.tel = value
|
||||
else
|
||||
contact_2 = PContact.new(tel: value)
|
||||
end
|
||||
end
|
||||
|
||||
when "email_contact"
|
||||
contact.email = value
|
||||
|
@ -63,7 +63,7 @@ class PFournisseur < ApplicationRecord
|
||||
when "tva_intracom"
|
||||
n.tva_num = value
|
||||
when "delai_paiement"
|
||||
next if value.nil?
|
||||
if value.present?
|
||||
case value
|
||||
when "A la commande"
|
||||
n.payment_delais = 0
|
||||
@ -90,6 +90,7 @@ class PFournisseur < ApplicationRecord
|
||||
else
|
||||
n.payment_delais = value
|
||||
end
|
||||
end
|
||||
when "interlocuteur"
|
||||
contact_1.name = value
|
||||
when "fonction"
|
||||
|
Reference in New Issue
Block a user