diff --git a/htdocs/don/card.php b/htdocs/don/card.php
index 6f90eb7bcc3..727394cb5b3 100644
--- a/htdocs/don/card.php
+++ b/htdocs/don/card.php
@@ -332,7 +332,7 @@ if ($action == 'create')
print '
| ' . $langs->trans('Ref') . ' | ' . $langs->trans('Draft') . ' |
';
// Company
- if (! empty($conf->societe->enabled))
+ if (! empty($conf->societe->enabled) && ! empty($conf->global->DONATION_USE_THIRDPARTIES))
{
// Thirdparty
print '' . $langs->trans('Customer') . ' | ';
@@ -377,7 +377,21 @@ if ($action == 'create')
print '' . "\n";
}
- else
+
+ // Date
+ print '| '.$langs->trans("Date").' | ';
+ $form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
+ print ' | ';
+
+ // Amount
+ print "
".'| '.$langs->trans("Amount").' | '.$langs->trans("Currency".$conf->currency).' |
';
+
+ // Public donation
+ print '| '.$langs->trans("PublicDonation")." | ";
+ print $form->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1);
+ print " |
\n";
+
+ if (empty($conf->societe->enabled) || empty($conf->global->DONATION_USE_THIRDPARTIES))
{
print "".'| '.$langs->trans("Company").' | |
';
print "".'| '.$langs->trans("Lastname").' | |
';
@@ -401,19 +415,6 @@ if ($action == 'create')
print "".'| '.$langs->trans("EMail").' | |
';
}
- // Date
- print '| '.$langs->trans("Date").' | ';
- $form->select_date($donation_date?$donation_date:-1,'','','','',"add",1,1);
- print ' | ';
-
- // Amount
- print "
".'| '.$langs->trans("Amount").' | '.$langs->trans("Currency".$conf->currency).' |
';
-
- // Public donation
- print '| '.$langs->trans("PublicDonation")." | ";
- print $form->selectyesno("public",isset($_POST["public"])?$_POST["public"]:1,1);
- print " |
\n";
-
// Payment mode
print "| ".$langs->trans("PaymentMode")." | \n";
$selected = GETPOST('modepayment','int');
diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php
index f712ef8b60f..dc178e4a7d5 100644
--- a/htdocs/don/class/don.class.php
+++ b/htdocs/don/class/don.class.php
@@ -423,8 +423,8 @@ class Don extends CommonObject
if (!$error && !empty($conf->global->MAIN_DISABLEDRAFTSTATUS))
{
- $res = $this->setValid($user);
- if ($res < 0) $error++;
+ //$res = $this->setValid($user);
+ //if ($res < 0) $error++;
}
if (!$error)
|