diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index d0dd842cd7c..7c47c25409d 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -347,6 +347,10 @@ if ($id > 0)
print '
';
if ($action == 'editmode')
{
+ if (empty($object->mode_reglement_id))
+ {
+ $object->mode_reglement_id=$conf->global->MAIN_PAYMENT_MODE_DEFAULT;
+ }
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->mode_reglement_id,'mode_reglement_id');
}
else
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 3e234af68cd..30c55c7b130 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -232,6 +232,10 @@ if ($object->fetch($id))
print ' | ';
if ($action == 'editmode')
{
+ if (empty($object->mode_reglement_supplier_id))
+ {
+ $object->mode_reglement_supplier_id=$conf->global->MAIN_PAYMENT_MODE_DEFAULT;
+ }
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->mode_reglement_supplier_id,'mode_reglement_supplier_id');
}
else
|