diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php
index 03dee569b84..380ff7a5019 100644
--- a/htdocs/adherents/subscription.php
+++ b/htdocs/adherents/subscription.php
@@ -229,7 +229,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
// Payment informations
$accountid = $_POST["accountid"];
$operation = $_POST["operation"]; // Payment mode
- $num_chq = $_POST["num_chq"];
+ $num_chq = GETPOST("num_chq", "alphanohtml");
$emetteur_nom = $_POST["chqemetteur"];
$emetteur_banque = $_POST["chqbank"];
$option = $_POST["paymentsave"];
diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php
index ad20599ce94..f61082d6211 100644
--- a/htdocs/compta/paiement/class/paiement.class.php
+++ b/htdocs/compta/paiement/class/paiement.class.php
@@ -588,11 +588,12 @@ class Paiement extends CommonObject
* @param string $emetteur_nom Name of transmitter
* @param string $emetteur_banque Name of bank
* @param int $notrigger No trigger
+ * @param string $num_chq Numero of cheque
* @return int <0 if KO, bank_line_id if OK
*/
public function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque, $notrigger = 0)
{
- global $conf,$langs,$user;
+ global $conf, $langs, $user;
$error=0;
$bank_line_id=0;
@@ -612,7 +613,7 @@ class Paiement extends CommonObject
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
- dol_syslog("$user->id,$mode,$label,$this->fk_account,$emetteur_nom,$emetteur_banque");
+ dol_syslog("$user->id, $mode, $label, $this->fk_account, $emetteur_nom, $emetteur_banque");
$acc = new Account($this->db);
$result=$acc->fetch($this->fk_account);
@@ -631,7 +632,7 @@ class Paiement extends CommonObject
$this->paiementid, // Payment mode id or code ("CHQ or VIR for example")
$label,
$totalamount, // Sign must be positive when we receive money (customer payment), negative when you give money (supplier invoice or credit note)
- $this->num_paiement,
+ $this->num_payment,
'',
$user,
$emetteur_nom,
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 21505242b01..f2e6fc14e8b 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2113,7 +2113,7 @@ class Form
}
}
- $selectFields = " p.rowid, p.label, p.ref, p.description, p.barcode, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.duration, p.fk_price_expression";
+ $selectFields = " p.rowid, p.ref, p.label, p.description, p.barcode, p.fk_product_type, p.price, p.price_ttc, p.price_base_type, p.tva_tx, p.duration, p.fk_price_expression";
if (count($warehouseStatusArray))
{
$selectFieldsGrouped = ", sum(".$db->ifsql("e.statut IS NULL", "0", "ps.reel").") as stock"; // e.statut is null if there is no record in stock
@@ -2740,13 +2740,15 @@ class Form
$out = '';
$outarray = array();
+ $maxlengtharticle = (empty($conf->global->PRODUCT_MAX_LENGTH_COMBO) ? 48 : $conf->global->PRODUCT_MAX_LENGTH_COMBO);
+
$langs->load('stocks');
// Units
if ($conf->global->PRODUCT_USE_UNITS) {
$langs->load('other');
}
- $sql = "SELECT p.rowid, p.label, p.ref, p.price, p.duration, p.fk_product_type,";
+ $sql = "SELECT p.rowid, p.ref, p.label, p.price, p.duration, p.fk_product_type,";
$sql .= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.remise_percent, pfp.remise, pfp.unitprice,";
$sql .= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, pfp.fk_soc, s.nom as name,";
$sql .= " pfp.supplier_reputation";
@@ -2754,7 +2756,7 @@ class Form
if ($conf->global->PRODUCT_USE_UNITS) {
$sql .= ", u.label as unit_long, u.short_label as unit_short, p.weight, p.weight_units, p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.surface, p.surface_units, p.volume, p.volume_units";
}
- if (!empty($conf->barcode->enabled)) $sql .= " ,pfp.barcode";
+ if (!empty($conf->barcode->enabled)) $sql .= ", pfp.barcode";
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
if ($socid) $sql .= " AND pfp.fk_soc = ".$socid;
@@ -2817,6 +2819,7 @@ class Form
$outref = $objp->ref;
$outval = '';
+ $outbarcode = $objp->barcode;
$outqty = 1;
$outdiscount = 0;
$outtype = $objp->fk_product_type;
@@ -2867,12 +2870,22 @@ class Form
if ($filterkey && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $label, 1);
$optlabel = $objp->ref;
- if (!empty($objp->idprodfournprice) && ($objp->ref != $objp->ref_fourn))
+ if (!empty($objp->idprodfournprice) && ($objp->ref != $objp->ref_fourn)) {
$optlabel .= ' ('.$objp->ref_fourn.')';
+ }
+ if (!empty($conf->barcode->enabled) && !empty($objp->barcode)) {
+ $optlabel .= ' ('.$outbarcode.')';
+ }
+ $optlabel .= ' - '.dol_trunc($label, $maxlengtharticle);
$outvallabel = $objRef;
- if (!empty($objp->idprodfournprice) && ($objp->ref != $objp->ref_fourn))
+ if (!empty($objp->idprodfournprice) && ($objp->ref != $objp->ref_fourn)) {
$outvallabel .= ' ('.$objRefFourn.')';
+ }
+ if (!empty($conf->barcode->enabled) && !empty($objp->barcode)) {
+ $outvallabel .= ' ('.$outbarcode.')';
+ }
+ $outvallabel .= ' - '.dol_trunc($label, $maxlengtharticle);
// Units
$optlabel .= $outvalUnits;
@@ -2934,12 +2947,6 @@ class Form
$optlabel .= " - ".dol_trunc($objp->name, 8);
$outvallabel .= " - ".dol_trunc($objp->name, 8);
}
- if (!empty($conf->barcode->enabled) && !empty($objp->barcode))
- {
- //$optlabel .= " - ".$objp->barcode;
- $optlabel .= " - ".$objp->barcode;
- $outvallabel .= " - ".$objp->barcode;
- }
if ($objp->supplier_reputation)
{
//TODO dictionary
@@ -3027,7 +3034,7 @@ class Form
$langs->load('stocks');
- $sql = "SELECT p.rowid, p.label, p.ref, p.price, p.duration, pfp.fk_soc,";
+ $sql = "SELECT p.rowid, p.ref, p.label, p.price, p.duration, pfp.fk_soc,";
$sql .= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.remise_percent, pfp.quantity, pfp.unitprice,";
$sql .= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, s.nom as name";
$sql .= " FROM ".MAIN_DB_PREFIX."product as p";
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 3c47bd47765..607b7550f4b 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -4309,6 +4309,9 @@ class Product extends CommonObject
if (!empty($this->label)) {
$label .= '
'.$langs->trans('ProductLabel').': '.$this->label;
}
+ if (!empty($conf->barcode->enabled)) {
+ $label .= '
'.$langs->trans('BarCode').': '.$this->barcode;
+ }
if ($this->type == Product::TYPE_PRODUCT)
{
diff --git a/htdocs/societe/project.php b/htdocs/societe/project.php
index 1ff2c24956e..c6029544c90 100644
--- a/htdocs/societe/project.php
+++ b/htdocs/societe/project.php
@@ -118,14 +118,15 @@ if ($socid)
dol_fiche_end();
+ $params = '';
- $addbutton = ''.$langs->trans("AddProject").'';
+ $newcardbutton .= dolGetButtonTitle($langs->trans("NewProject"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?action=create&socid='.$object->id.'&backtopage='.urlencode($backtopage), '', 1, $params);
print '
';
// Projects list
- $result=show_projects($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id, 1, $addbutton);
+ $result=show_projects($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id, 1, $newcardbutton);
}
// End of page