diff --git a/htdocs/don/card.php b/htdocs/don/card.php
index a0a795e9c8b..91a13a93093 100644
--- a/htdocs/don/card.php
+++ b/htdocs/don/card.php
@@ -487,7 +487,8 @@ if ($action == 'create') {
// Payment mode
print "
| ".$langs->trans("PaymentMode")." | \n";
$selected = GETPOST('modepayment', 'int');
- $form->select_types_paiements($selected, 'modepayment', 'CRDT', 0, 1);
+ print img_picto('', 'payment', 'class="pictofixedwidth"');
+ print $form->select_types_paiements($selected, 'modepayment', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1);
print " |
\n";
// Public note
@@ -516,7 +517,8 @@ if ($action == 'create') {
if (isModEnabled('project')) {
print "| ".$langs->trans("Project")." | ";
- $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500');
+ print img_picto('', 'project', 'class="pictofixedwidth"');
+ print $formproject->select_projects(-1, $projectid, 'fk_project', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500');
print " |
\n";
}
diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php
index e4928ac9363..b42f5fb4e4d 100644
--- a/htdocs/don/class/paymentdonation.class.php
+++ b/htdocs/don/class/paymentdonation.class.php
@@ -65,7 +65,7 @@ class PaymentDonation extends CommonObject
public $amounts = array(); // Array of amounts
public $fk_typepayment; // Payment mode ID
- public $paymenttype; // Payment mode ID
+ public $paymenttype; // Payment mode ID or Code. TODO Use only the code in this field.
public $num_payment;
@@ -188,12 +188,12 @@ class PaymentDonation extends CommonObject
$sql = "INSERT INTO ".MAIN_DB_PREFIX."payment_donation (fk_donation, datec, datep, amount,";
$sql .= " fk_typepayment, num_payment, note, ext_payment_id, ext_payment_site,";
$sql .= " fk_user_creat, fk_bank)";
- $sql .= " VALUES ($this->chid, '".$this->db->idate($now)."',";
+ $sql .= " VALUES (".((int) $this->chid).", '".$this->db->idate($now)."',";
$sql .= " '".$this->db->idate($this->datepaid)."',";
- $sql .= " ".price2num($totalamount).",";
+ $sql .= " ".((float) price2num($totalamount)).",";
$sql .= " ".((int) $this->paymenttype).", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note_public)."', ";
$sql .= " ".($this->ext_payment_id ? "'".$this->db->escape($this->ext_payment_id)."'" : "null").", ".($this->ext_payment_site ? "'".$this->db->escape($this->ext_payment_site)."'" : "null").",";
- $sql .= " ".$user->id.", 0)";
+ $sql .= " ".((int) $user->id).", 0)";
dol_syslog(get_class($this)."::create", LOG_DEBUG);
$resql = $this->db->query($sql);
@@ -269,8 +269,8 @@ class PaymentDonation extends CommonObject
$this->tms = $this->db->jdate($obj->tms);
$this->datep = $this->db->jdate($obj->datep);
$this->amount = $obj->amount;
- $this->fk_typepayment = $obj->fk_typepayment; // For backward compatibility
- $this->paymenttype = $obj->fk_typepayment;
+ $this->fk_typepayment = $obj->fk_typepayment; // Id on type of payent
+ $this->paymenttype = $obj->fk_typepayment; // Id on type of payment. We should store the code into paymenttype.
$this->num_payment = $obj->num_payment;
$this->note_public = $obj->note_public;
$this->fk_bank = $obj->fk_bank;
diff --git a/htdocs/langs/en_US/receptions.lang b/htdocs/langs/en_US/receptions.lang
index 5b51f5ba071..7324f14f2e0 100644
--- a/htdocs/langs/en_US/receptions.lang
+++ b/htdocs/langs/en_US/receptions.lang
@@ -32,6 +32,7 @@ StatusReceptionDraftShort=Draft
StatusReceptionValidatedShort=Validated
StatusReceptionProcessedShort=Processed
ReceptionSheet=Reception sheet
+ValidateReception=Validate reception
ConfirmDeleteReception=Are you sure you want to delete this reception?
ConfirmValidateReception=Are you sure you want to validate this reception with reference %s?
ConfirmCancelReception=Are you sure you want to cancel this reception?