diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 799ad1376cf..d075111e049 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -1109,8 +1109,7 @@ class Don extends CommonObject { dol_syslog(__METHOD__, LOG_DEBUG); - if (empty($this->id)) - { + if (empty($this->id)) { $this->error = 'Missing object id'; $this->errors[] = $this->error; dol_syslog(__METHOD__.' : '.$this->error, LOG_ERR); @@ -1126,6 +1125,5 @@ class Don extends CommonObject $sum_amount = (float) $this->db->fetch_object($resql)->sum_amount; return (float) $this->amount - $sum_amount; } - } } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 902bfa29321..530ceb098b3 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -777,7 +777,6 @@ if ($ispaymentok) { $postactionmessages[] = 'Invoice paid '.$tmptag['INV'].' was not found'; $ispostactionok = -1; } - } elseif (array_key_exists('DON', $tmptag) && $tmptag['DON'] > 0) { include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; $don = new Don($db); @@ -815,7 +814,6 @@ if ($ispaymentok) { if ($currencyCodeType == $conf->currency) { $paiement->amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching with donation - } else { // PaymentDonation does not support multi currency $postactionmessages[] = 'Payment donation can\'t be payed with diffent currency than '.$conf->currency;