From 51506724efe5539f2ecd2ad43b5b3f1aaf9d8104 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Jun 2019 23:36:52 +0200 Subject: [PATCH 01/15] FIX Do no record log in archived log for draft documents. --- ...rface_50_modBlockedlog_ActionsBlockedLog.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index 03d26b931b6..a72baaeff12 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -76,17 +76,18 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers // Event/record is qualified $qualified = 0; $amounts = 0; - if ($action==='BILL_VALIDATE' || $action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL' - || $action==='BILL_SUPPLIER_VALIDATE' || $action==='BILL_SUPPLIER_DELETE' || $action === 'BILL_SUPPLIER_SENTBYMAIL' + if ($action==='BILL_VALIDATE' || (($action==='BILL_DELETE' || $action === 'BILL_SENTBYMAIL') && $object->statut != 0) + || $action==='BILL_SUPPLIER_VALIDATE' || (($action==='BILL_SUPPLIER_DELETE' || $action === 'BILL_SUPPLIER_SENTBYMAIL') && $object->statut != 0) || $action==='MEMBER_SUBSCRIPTION_CREATE' || $action==='MEMBER_SUBSCRIPTION_MODIFY' || $action==='MEMBER_SUBSCRIPTION_DELETE' - || $action==='DON_VALIDATE' || $action==='DON_MODIFY' || $action==='DON_DELETE' + || $action==='DON_VALIDATE' || (($action==='DON_MODIFY' || $action==='DON_DELETE') && $object->statut != 0) || $action==='CASHCONTROL_VALIDATE' - || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_DOWNLOAD') || (in_array($object->element, array('facture','suplier_invoice')) && $action === 'DOC_PREVIEW') + || (in_array($object->element, array('facture','supplier_invoice')) && $action === 'DOC_DOWNLOAD' && $object->statut != 0) + || (in_array($object->element, array('facture','supplier_invoice')) && $action === 'DOC_PREVIEW' && $object->statut != 0) ) { $qualified++; -if (in_array($action, array( + if (in_array($action, array( 'MEMBER_SUBSCRIPTION_CREATE','MEMBER_SUBSCRIPTION_MODIFY','MEMBER_SUBSCRIPTION_DELETE', 'DON_VALIDATE','DON_MODIFY','DON_DELETE'))) $amounts = (double) $object->amount; elseif ($action == 'CASHCONTROL_VALIDATE') From 74f61b3b9ae0b0cda7715a66faf500543dc9ef4d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 10:12:24 +0200 Subject: [PATCH 02/15] Fix status not loaded --- htdocs/adherents/subscription/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index a55aadfe9cb..5caece3c3ba 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -142,7 +142,7 @@ $accountstatic=new Account($db); $now=dol_now(); // List of subscriptions -$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo,"; +$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,"; $sql.= " c.rowid as crowid, c.fk_type, c.subscription,"; $sql.= " c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,"; $sql.= " c.fk_bank as bank, c.note,"; From 732fd8a04ba6437bfa845346ebea251e2e5cf71c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 10:28:58 +0200 Subject: [PATCH 03/15] Fix look and feel v10 --- htdocs/adherents/subscription/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 5caece3c3ba..c93e4184325 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -298,33 +298,33 @@ if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) if (! empty($arrayfields['d.ref']['checked'])) { print ''; - print ''; + print ''; } // Type if (! empty($arrayfields['d.fk_type']['checked'])) { print ''; - print ''; + print ''; print''; } if (! empty($arrayfields['d.lastname']['checked'])) { print ''; - print ''; + print ''; } if (! empty($arrayfields['d.firstname']['checked'])) { print ''; - print ''; + print ''; } if (! empty($arrayfields['d.login']['checked'])) { print ''; - print ''; + print ''; } if (! empty($arrayfields['t.libelle']['checked'])) From ca3988ca7301dfc0a2c42180d19028f4bbd7266c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 10:58:44 +0200 Subject: [PATCH 04/15] Fix backward compatibility for type of members --- htdocs/adherents/subscription/card.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 31cf3020765..1b6e5813774 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -313,8 +313,9 @@ if ($rowid && $action != 'edit') print ''; print ''.$langs->trans("Type").''; print ''; - if (! empty($object->fk_type) ) { - $adht->fetch($object->fk_type); + if ($object->fk_type > 0 || $adh->typeid > 0) { + $typeid = ($object->fk_type > 0 ? $object->fk_type : $adh->typeid); + $adht->fetch($typeid); print $adht->getNomUrl(1); } else { print $langs->trans("NoType"); From 36f1527f763fc476c39bceb6d8c773e922bbab19 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:06:10 +0200 Subject: [PATCH 05/15] Fix backward compatibility for type of members --- htdocs/adherents/subscription.php | 14 +++++++++----- htdocs/adherents/subscription/card.php | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index eeeb821c223..fef89da8754 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -667,7 +667,7 @@ if ($rowid > 0) */ if ($action != 'addsubscription' && $action != 'create_thirdparty') { - $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe,"; + $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.type,"; $sql.= " c.rowid as crowid, c.subscription,"; $sql.= " c.datec, c.fk_type as cfk_type,"; $sql.= " c.dateadh as dateh,"; @@ -705,26 +705,30 @@ if ($rowid > 0) print "\n"; $accountstatic=new Account($db); + $adh = new Adherent($db); $adht = new AdherentType($db); while ($i < $num) { $objp = $db->fetch_object($result); + $adh->id = $objp->rowid; + $adh->type = $obj->type; + $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; - if ($objp->cfk_type > 0) + $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid); + if ($typeid > 0) { - $adht->fetch($objp->cfk_type); + $adht->fetch($typeid); } print ''; print ''.$subscriptionstatic->getNomUrl(1).''; print ''.dol_print_date($db->jdate($objp->datec), 'dayhour')."\n"; print ''; - if ($objp->cfk_type > 0) - { + if ($typeid > 0) { print $adht->getNomUrl(1); } print ''; diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 1b6e5813774..a8478f35e88 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -346,7 +346,7 @@ if ($rowid && $action != 'edit') // Amount print ''.$langs->trans("Amount").''.price($object->amount).''; - // Amount + // Label print ''.$langs->trans("Label").''.$object->note.''; // Bank line From e6b643e0734d5b6a4737e0b0d465f26416efcca4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:07:14 +0200 Subject: [PATCH 06/15] Fix syntax error --- htdocs/adherents/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index fef89da8754..6d2889d02bb 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -667,7 +667,7 @@ if ($rowid > 0) */ if ($action != 'addsubscription' && $action != 'create_thirdparty') { - $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.type,"; + $sql = "SELECT d.rowid, d.firstname, d.lastname, d.societe, d.fk_adherent_type as type,"; $sql.= " c.rowid as crowid, c.subscription,"; $sql.= " c.datec, c.fk_type as cfk_type,"; $sql.= " c.dateadh as dateh,"; From 4ed2db6d21ee71ac7e47d1fef2d34c1b21e03e0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:08:14 +0200 Subject: [PATCH 07/15] Fix bad id --- htdocs/adherents/subscription.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 6d2889d02bb..d637c6ee252 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -713,12 +713,12 @@ if ($rowid > 0) $objp = $db->fetch_object($result); $adh->id = $objp->rowid; - $adh->type = $obj->type; + $adh->typeid = $obj->type; $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; - $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid); + $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $objp->typeid); if ($typeid > 0) { $adht->fetch($typeid); From 27be93f5355d7fc2965bd0280b19e6d6fbede2be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:08:42 +0200 Subject: [PATCH 08/15] Fix bad id --- htdocs/adherents/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index d637c6ee252..ba1fd781504 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -713,7 +713,7 @@ if ($rowid > 0) $objp = $db->fetch_object($result); $adh->id = $objp->rowid; - $adh->typeid = $obj->type; + $adh->typeid = $objp->type; $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; From 5f17cfe4622b1b743dc5cfeede49c2d2f1209898 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:09:13 +0200 Subject: [PATCH 09/15] Fix bad id --- htdocs/adherents/subscription.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index ba1fd781504..ab8206c66b8 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -718,7 +718,7 @@ if ($rowid > 0) $subscriptionstatic->ref=$objp->crowid; $subscriptionstatic->id=$objp->crowid; - $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $objp->typeid); + $typeid = ($objp->cfk_type > 0 ? $objp->cfk_type : $adh->typeid); if ($typeid > 0) { $adht->fetch($typeid); From 5031b6c06bf7c69cba1343850e5f6ac16fd4d9c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:18:31 +0200 Subject: [PATCH 10/15] Fix bad id --- htdocs/adherents/subscription/list.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index c93e4184325..f7790a36d00 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -142,7 +142,7 @@ $accountstatic=new Account($db); $now=dol_now(); // List of subscriptions -$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,"; +$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut, d.fk_adherent_type as type,"; $sql.= " c.rowid as crowid, c.fk_type, c.subscription,"; $sql.= " c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,"; $sql.= " c.fk_bank as bank, c.note,"; @@ -225,7 +225,7 @@ $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); if ($statut != '') $param.="&statut=".urlencode($statut); -if ($search_type) $param.="&search_type=".urlencode($search_type); +if ($search_type) $param.="&search_type=".urlencode($search_type); if ($date_select) $param.="&date_select=".urlencode($date_select); if ($search_lastname) $param.="&search_lastname=".urlencode($search_lastname); if ($search_login) $param.="&search_login=".urlencode($search_login); @@ -457,9 +457,11 @@ while ($i < min($num, $limit)) $adherent->statut=$obj->statut; $adherent->login=$obj->login; $adherent->photo=$obj->photo; + $adherent->typeid=$obj->type; + $typeid = ($obj->fk_type > 0 ? $obj->fk_type : $adherent->typeid); $adht = new AdherentType($db); - $adht->fetch($obj->fk_type); + $adht->fetch($typeid); print ''; @@ -473,7 +475,10 @@ while ($i < min($num, $limit)) if (! empty($arrayfields['d.fk_type']['checked'])) { print ''; - if ( ! empty($obj->fk_type) ) print $adht->getNomUrl(1); + if ($typeid > 0) + { + print $adht->getNomUrl(1); + } print ''; if (! $i) $totalarray['nbfield']++; } From b8b0ad0d27ad9bef4054b0ceabf3727d24ac41c0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:22:35 +0200 Subject: [PATCH 11/15] Fix migration --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 1270b8b279a..bf08e794a65 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -96,6 +96,8 @@ ALTER TABLE llx_adherent ADD gender VARCHAR(10); ALTER TABLE llx_adherent_type ADD morphy VARCHAR(3); ALTER TABLE llx_subscription ADD fk_type integer; +UPDATE llx_subscription as s SET fk_type = (SELECT fk_adherent_type FROM llx_adherent as a where a.rowid = s.fk_adherent) where fk_type IS NULL; + -- Add url_id into unique index of bank_url ALTER TABLE llx_bank_url DROP INDEX uk_bank_url; ALTER TABLE llx_bank_url ADD UNIQUE INDEX uk_bank_url (fk_bank, url_id, type); From b6ad78fdd93584b7b7045ba8675294d57b7ffc91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:25:36 +0200 Subject: [PATCH 12/15] Fix sort --- htdocs/adherents/subscription/list.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index f7790a36d00..e3eb9b595ee 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -409,23 +409,23 @@ if (! empty($arrayfields['d.login']['checked'])) } if (! empty($arrayfields['t.libelle']['checked'])) { - print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.note", $param, "", 'align="left"', $sortfield, $sortorder); + print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.note", $param, "", '', $sortfield, $sortorder); } if (! empty($arrayfields['d.bank']['checked'])) { - print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "b.fk_account", $pram, "", "", $sortfield, $sortorder); + print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "b.fk_account", $param, "", "", $sortfield, $sortorder); } if (! empty($arrayfields['c.dateadh']['checked'])) { - print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("DateStart", $_SERVER["PHP_SELF"], "c.dateadh", $param, "", '', $sortfield, $sortorder, 'center nowraponall '); } if (! empty($arrayfields['c.datef']['checked'])) { - print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "c.datef", $param, "", 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("DateEnd", $_SERVER["PHP_SELF"], "c.datef", $param, "", '', $sortfield, $sortorder, 'center nowraponall '); } if (! empty($arrayfields['d.amount']['checked'])) { - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "c.subscription", $param, "", 'class="right"', $sortfield, $sortorder); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "c.subscription", $param, "", '', $sortfield, $sortorder, 'right '); } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; From 560f145a32a0d38c348a32e7f6b0de85dfed43b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 11:35:40 +0200 Subject: [PATCH 13/15] Fix css --- htdocs/theme/eldy/global.inc.php | 9 +++++---- htdocs/theme/md/style.css.php | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index f44d8da8a69..15b986d4bff 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -158,6 +158,7 @@ div.buttonpayment input { border-bottom: unset; font-weight: bold; text-transform: uppercase; + cursor: pointer; } input.buttonpaymentcb { background-image: url(); @@ -627,20 +628,20 @@ select.flat.selectlimit { .amountpaymentcomplete { color: #008800; font-weight: bold; - font-size: 1.4em; + font-size: 1.2em; } .amountremaintopay { color: #880000; font-weight: bold; - font-size: 1.4em; + font-size: 1.2em; } .amountremaintopayback { font-weight: bold; - font-size: 1.4em; + font-size: 1.2em; } .amountpaymentneutral { font-weight: bold; - font-size: 1.4em; + font-size: 1.2em; } .savingdocmask { margin-top: 6px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 8020a490181..6fd50fa42b3 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -374,6 +374,7 @@ div.buttonpayment input { font-weight: bold; text-transform: uppercase; color: #333; + cursor: pointer; } input.buttonpaymentcb { background-image: url(); From 1c924ef17ea93b7c197f7935c341d2db51f1b675 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 12:53:23 +0200 Subject: [PATCH 14/15] Fix bad label on supplier invoice --- .../fourn/class/fournisseur.facture.class.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 4e861cd146a..daba64e2e39 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -91,6 +91,9 @@ class FactureFournisseur extends CommonInvoice */ public $ref; + public $label; + public $libelle; // @deprecated + public $product_ref; public $ref_supplier; public $socid; @@ -112,7 +115,6 @@ class FactureFournisseur extends CommonInvoice public $paye; public $author; - public $libelle; /** * Date creation record (datec) @@ -645,7 +647,7 @@ class FactureFournisseur extends CommonInvoice $this->date = $this->db->jdate($obj->datef); $this->datep = $this->db->jdate($obj->datef); $this->tms = $this->db->jdate($obj->tms); - $this->libelle = $obj->libelle; + $this->libelle = $obj->libelle; // deprecated $this->label = $obj->libelle; $this->paye = $obj->paye; $this->amount = $obj->amount; @@ -849,7 +851,8 @@ class FactureFournisseur extends CommonInvoice if (isset($this->entity)) $this->entity=trim($this->entity); if (isset($this->type)) $this->type=trim($this->type); if (isset($this->fk_soc)) $this->fk_soc=trim($this->fk_soc); - if (isset($this->libelle)) $this->libelle=trim($this->libelle); + if (isset($this->label)) $this->label=trim($this->label); + if (isset($this->libelle)) $this->libelle=trim($this->libelle); // deprecated if (isset($this->paye)) $this->paye=trim($this->paye); if (isset($this->amount)) $this->amount=trim($this->amount); if (isset($this->remise)) $this->remise=trim($this->remise); @@ -2280,8 +2283,8 @@ class FactureFournisseur extends CommonInvoice $label .= '
' . $langs->trans('Ref') . ': ' . $this->ref; if (! empty($this->ref_supplier)) $label.= '
' . $langs->trans('RefSupplier') . ': ' . $this->ref_supplier; - if (! empty($this->libelle)) - $label.= '
' . $langs->trans('Label') . ': ' . $this->libelle; + if (! empty($this->label)) + $label.= '
' . $langs->trans('Label') . ': ' . $this->label; if (! empty($this->date)) $label .= '
' . $langs->trans('Date') . ': ' . dol_print_date($this->date, 'day'); if (! empty($this->total_ht)) @@ -2857,10 +2860,10 @@ class SupplierInvoiceLine extends CommonObjectLine */ public function fetch($rowid) { - $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx'; + $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.libelle as label, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.tva_tx,'; $sql.= ', f.localtax1_type, f.localtax2_type, f.localtax1_tx, f.localtax2_tx, f.total_localtax1, f.total_localtax2 '; $sql.= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_facture_fourn, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; - $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc'; + $sql.= ', p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc'; $sql.= ', f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, multicurrency_total_ttc'; $sql.= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f'; $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; @@ -2909,7 +2912,7 @@ class SupplierInvoiceLine extends CommonObjectLine $this->total_ttc = $obj->total_ttc; $this->fk_product = $obj->fk_product; $this->product_type = $obj->product_type; - $this->product_label = $obj->label; + $this->product_label = $obj->product_label; $this->info_bits = $obj->info_bits; $this->tva_npr = ($obj->info_bits & 1 == 1) ? 1 : 0; $this->fk_parent_line = $obj->fk_parent_line; From def94b55c007aa676389eb5fab5701cd81bdcc9e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 25 Jun 2019 13:02:11 +0200 Subject: [PATCH 15/15] CSS --- htdocs/projet/element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index a2c2ea36f7d..08351fc752f 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -776,7 +776,7 @@ foreach ($listofreferent as $key => $value) if (empty($conf->global->PROJECT_CREATE_ON_OVERVIEW_DISABLED) && $urlnew) { $addform.='
'; - if ($testnew) $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).''; + if ($testnew) $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).''; elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { $addform.=''.($buttonnew?$langs->trans($buttonnew):$langs->trans("Create")).''; }