From fb3f1ef667153943d537b88a6fe9d61c5eea20d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Nov 2017 09:49:41 +0100 Subject: [PATCH 01/12] Code comment --- htdocs/api/class/api_login.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php index c6b71e8b25c..d59e0036423 100644 --- a/htdocs/api/class/api_login.class.php +++ b/htdocs/api/class/api_login.class.php @@ -36,7 +36,7 @@ class Login * * Request the API token for a couple username / password. * Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file). - * Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "api_key" into field at the top right of page (Note: "api_key" can be found/set on the user page). + * Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: Tha API key (DOLAPIKEY) can be found/set on the user page. * * @param string $login User login * @param string $password User password From bd68b94411a562862a9573a8349e85b53d0c3684 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 2 Nov 2017 13:27:09 +0100 Subject: [PATCH 02/12] fix : missing hook in accountancy --- htdocs/accountancy/customer/list.php | 52 +++++++++++++++++--------- htdocs/accountancy/supplier/list.php | 55 ++++++++++++++++++---------- 2 files changed, 71 insertions(+), 36 deletions(-) diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 5e78d735523..f675c010b37 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -85,6 +85,9 @@ if ($user->societe_id > 0) if (! $user->rights->accounting->bind->write) accessforbidden(); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('accountancycustomerlist')); + $formaccounting = new FormAccounting($db); $accounting = new AccountingAccount($db); $aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1); @@ -98,26 +101,33 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOU if (GETPOST('cancel')) { $action='list'; $massaction=''; } if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; } -// Purge search criteria -if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +if (empty($reshook)) { - $search_lineid = ''; - $search_ref = ''; - $search_invoice = ''; - $search_label = ''; - $search_desc = ''; - $search_amount = ''; - $search_account = ''; - $search_vat = ''; + // Purge search criteria + if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers + { + $search_lineid = ''; + $search_ref = ''; + $search_invoice = ''; + $search_label = ''; + $search_desc = ''; + $search_amount = ''; + $search_account = ''; + $search_vat = ''; + } + + // Mass actions + $objectclass='AccountingAccount'; + $permtoread = $user->rights->accounting->read; + $permtodelete = $user->rights->accounting->delete; + $uploaddir = $conf->accounting->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } -// Mass actions -$objectclass='Skeleton'; -$objectlabel='Skeleton'; -$permtoread = $user->rights->accounting->read; -$permtodelete = $user->rights->accounting->delete; -$uploaddir = $conf->accounting->dir_output; -include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; if ($massaction == 'ventil') { $msg=''; @@ -182,6 +192,9 @@ $sql = "SELECT f.facnumber, f.rowid as facid, f.datef, f.type as ftype,"; $sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,"; $sql .= " aa.rowid as aarowid"; +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; $sql .= " FROM " . MAIN_DB_PREFIX . "facture as f"; $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; @@ -223,6 +236,11 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { } $sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; + $sql .= $db->order($sortfield, $sortorder); // Count total nb of records diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 84c341400d7..541052ac9c3 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -85,6 +85,9 @@ if ($user->societe_id > 0) if (! $user->rights->accounting->bind->write) accessforbidden(); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('accountancysupplierlist')); + $formaccounting = new FormAccounting($db); $accounting = new AccountingAccount($db); // TODO: we should need to check if result is a really exist accountaccount rowid..... @@ -99,26 +102,32 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUN if (GETPOST('cancel')) { $action='list'; $massaction=''; } if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; } -// Purge search criteria -if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers -{ - $search_lineid = ''; - $search_ref = ''; - $search_invoice = ''; - $search_label = ''; - $search_desc = ''; - $search_amount = ''; - $search_account = ''; - $search_vat = ''; -} +$parameters=array(); +$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -// Mass actions -$objectclass='Skeleton'; -$objectlabel='Skeleton'; -$permtoread = $user->rights->accounting->read; -$permtodelete = $user->rights->accounting->delete; -$uploaddir = $conf->accounting->dir_output; -include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +if (empty($reshook)) +{ + // Purge search criteria + if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers + { + $search_lineid = ''; + $search_ref = ''; + $search_invoice = ''; + $search_label = ''; + $search_desc = ''; + $search_amount = ''; + $search_account = ''; + $search_vat = ''; + } + + // Mass actions + $objectclass='AccountingAccount'; + $permtoread = $user->rights->accounting->read; + $permtodelete = $user->rights->accounting->delete; + $uploaddir = $conf->accounting->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} if ($massaction == 'ventil') { $msg=''; @@ -184,6 +193,9 @@ $sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_lab $sql.= " l.rowid, l.fk_product, l.description, l.total_ht as price, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,"; $sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,"; $sql.= " aa.rowid as aarowid"; +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; $sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f"; $sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn"; $sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product"; @@ -220,6 +232,11 @@ if (strlen(trim($search_vat))) { } $sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy +// Add where from hooks +$parameters=array(); +$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook +$sql.=$hookmanager->resPrint; + $sql .= $db->order($sortfield, $sortorder); // Count total nb of records From b7cf434ebd3e5870db32cfd90add74925cd8f2bc Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 2 Nov 2017 14:58:33 +0100 Subject: [PATCH 03/12] FIX : Filter type on actioncomm with multiselect doesn't work --- htdocs/comm/action/index.php | 9 +++++++-- htdocs/comm/action/listactions.php | 9 +++++++-- htdocs/comm/action/peruser.php | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index bda7dd7a594..ea6c43b89c7 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -297,7 +297,11 @@ if ($status == 'done') $title=$langs->trans("DoneActions"); if ($status == 'todo') $title=$langs->trans("ToDoActions"); $param=''; -if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $param.="&actioncode=".$actioncode; +if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) { + if(is_array($actioncode)) { + foreach($actioncode as $str_action) $param.="&actioncode[]=".$str_action; + } else $param.="&actioncode=".$actioncode; +} if ($resourceid > 0) $param.="&resourceid=".$resourceid; if ($status || isset($_GET['status']) || isset($_POST['status'])) $param.="&status=".$status; if ($filter) $param.="&filter=".$filter; @@ -482,7 +486,8 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND ca.type = 'systemauto'"; else { - $sql.=" AND ca.code IN ('".implode("','", explode(',',$actioncode))."')"; + $TActionCode=(Array)$actioncode; + $sql.=" AND ca.code IN ('".implode("','", $TActionCode)."')"; } } } diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index c77c4279439..d247e78c188 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -169,7 +169,11 @@ $listofextcals=array(); $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; -if ($actioncode != '') $param.="&actioncode=".$actioncode; +if ($actioncode != '') { + if(is_array($actioncode)) { + foreach($actioncode as $str_action) $param.="&actioncode[]=".$str_action; + } else $param.="&actioncode=".$actioncode; +} if ($resourceid > 0) $param.="&resourceid=".$resourceid; if ($status != '' && $status > -1) $param.="&status=".$status; if ($filter) $param.="&filter=".$filter; @@ -227,7 +231,8 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'"; else { - $sql.=" AND c.code IN ('".implode("','", explode(',',$actioncode))."')"; + $TActionCode=(Array)$actioncode; + $sql.=" AND c.code IN ('".implode("','", $TActionCode)."')"; } } } diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 792d4f9760d..3d551b7779b 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -203,7 +203,11 @@ if ($status == 'done') $title=$langs->trans("DoneActions"); if ($status == 'todo') $title=$langs->trans("ToDoActions"); $param=''; -if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $param.="&actioncode=".$actioncode; +if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) { + if(is_array($actioncode)) { + foreach($actioncode as $str_action) $param.="&actioncode[]=".$str_action; + } else $param.="&actioncode=".$actioncode; +} if ($resourceid > 0) $param.="&resourceid=".$resourceid; if ($status || isset($_GET['status']) || isset($_POST['status'])) $param.="&status=".$status; if ($filter) $param.="&filter=".$filter; @@ -394,7 +398,8 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND ca.type = 'systemauto'"; else { - $sql.=" AND ca.code IN ('".implode("','", explode(',',$actioncode))."')"; + $TActionCode=(Array)$actioncode; + $sql.=" AND ca.code IN ('".implode("','", $TActionCode)."')"; } } } From 323a0d7d0d65d6afc5ae996bd8e24f0e5f867cb2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Nov 2017 15:48:24 +0100 Subject: [PATCH 04/12] Update index.php --- htdocs/comm/action/index.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index ea6c43b89c7..87f0e2e6ccb 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -486,8 +486,14 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND ca.type = 'systemauto'"; else { - $TActionCode=(Array)$actioncode; - $sql.=" AND ca.code IN ('".implode("','", $TActionCode)."')"; + if (is_array($actioncode)) + { + $sql.=" AND ca.code IN ('".implode("','", $TActionCode)."')"; + } + else + { + $sql.=" AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; + } } } } From 63a363080e9966415934ba8e13e93acd868f0822 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Nov 2017 15:48:56 +0100 Subject: [PATCH 05/12] Update index.php --- htdocs/comm/action/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 87f0e2e6ccb..e2bb57c3ce4 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -488,7 +488,7 @@ if (! empty($actioncode)) { if (is_array($actioncode)) { - $sql.=" AND ca.code IN ('".implode("','", $TActionCode)."')"; + $sql.=" AND ca.code IN ('".implode("','", $actioncode)."')"; } else { From ec3a07cd52dbd921f86c733b5412a561357a2be5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Nov 2017 15:50:55 +0100 Subject: [PATCH 06/12] Try to restore compatibility when actioncode=CODE1,CODE2,... --- htdocs/comm/action/listactions.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index d247e78c188..b3d92fc8a40 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -231,8 +231,14 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND c.type = 'systemauto'"; else { - $TActionCode=(Array)$actioncode; - $sql.=" AND c.code IN ('".implode("','", $TActionCode)."')"; + if (is_array($actioncode)) + { + $sql.=" AND ca.code IN ('".implode("','", $actioncode)."')"; + } + else + { + $sql.=" AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; + } } } } From 310bf4bde4d96bb0a11d2403dbad217033cc0210 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 2 Nov 2017 15:51:35 +0100 Subject: [PATCH 07/12] Update peruser.php --- htdocs/comm/action/peruser.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 3d551b7779b..05eba093cfd 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -398,8 +398,14 @@ if (! empty($actioncode)) elseif ($actioncode == 'AC_ALL_AUTO') $sql.= " AND ca.type = 'systemauto'"; else { - $TActionCode=(Array)$actioncode; - $sql.=" AND ca.code IN ('".implode("','", $TActionCode)."')"; + if (is_array($actioncode)) + { + $sql.=" AND ca.code IN ('".implode("','", $actioncode)."')"; + } + else + { + $sql.=" AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; + } } } } From 03544f783a2be5c54ebc72611371c3b3d8aab4a6 Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 2 Nov 2017 16:16:29 +0100 Subject: [PATCH 08/12] FIX : Wrong alias sql --- htdocs/comm/action/listactions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index b3d92fc8a40..4540580fed8 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -233,11 +233,11 @@ if (! empty($actioncode)) { if (is_array($actioncode)) { - $sql.=" AND ca.code IN ('".implode("','", $actioncode)."')"; + $sql.=" AND c.code IN ('".implode("','", $actioncode)."')"; } else { - $sql.=" AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; + $sql.=" AND c.code IN ('".implode("','", explode(',', $actioncode))."')"; } } } From b58df17545844cb5f1d0cd2d2be4c101aeab6949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 2 Nov 2017 18:14:55 +0100 Subject: [PATCH 09/12] default currency on propal create --- htdocs/comm/propal/class/propal.class.php | 5 +++-- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 25d488e7316..64997b4c9ea 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -836,8 +836,9 @@ class Propal extends CommonObject if (empty($this->availability_id)) $this->availability_id=0; if (empty($this->demand_reason_id)) $this->demand_reason_id=0; - // Multicurrency - if (!empty($this->multicurrency_code)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $this->date); + // Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate) + if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $this->date); + else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); if (empty($this->fk_multicurrency)) { $this->multicurrency_code = $conf->currency; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index c5271c34744..56a7fe16b43 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -709,7 +709,7 @@ class Commande extends CommonOrder // $date_commande is deprecated $date = ($this->date_commande ? $this->date_commande : $this->date); - // Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate) + // Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate) if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $date); else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); if (empty($this->fk_multicurrency)) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index c0be06da6bd..99665476a8e 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -244,7 +244,7 @@ class Facture extends CommonInvoice $this->brouillon = 1; if (empty($this->entity)) $this->entity = $conf->entity; - // Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate) + // Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate) if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); if (empty($this->fk_multicurrency)) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 50e805f1089..37e2d910224 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1090,7 +1090,7 @@ class CommandeFournisseur extends CommonOrder // Clean parameters if (empty($this->source)) $this->source = 0; - // Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate) + // Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate) if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); if (empty($this->fk_multicurrency)) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 43f2250b508..4b5e2ca83cd 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -229,7 +229,7 @@ class FactureFournisseur extends CommonInvoice $amount = $this->amount; $remise = $this->remise; - // Multicurrency (test on $this->multicurrency_tx because we sould take the default rate only if not using origin rate) + // Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate) if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency,$this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); else $this->fk_multicurrency = MultiCurrency::getIdFromCode($this->db, $this->multicurrency_code); if (empty($this->fk_multicurrency)) From e992e4bea5f13f8972179feaddc67a864d49acfc Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 3 Nov 2017 09:09:07 +0100 Subject: [PATCH 10/12] Fix : type was forced to 0 so service are not in the list --- htdocs/product/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 5561d5778f6..9e100081d4f 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -66,7 +66,7 @@ $search_tobatch = GETPOST("search_tobatch",'int'); $search_accountancy_code_sell = GETPOST("search_accountancy_code_sell",'alpha'); $search_accountancy_code_buy = GETPOST("search_accountancy_code_buy",'alpha'); $optioncss = GETPOST('optioncss','alpha'); -$type=(int) GETPOST("type","int"); +$type=GETPOST("type","int"); //Show/hide child products. Hidden by default if (!$_POST) { From eb4a5f657029f6d3aab26b59c8a1618bd56bae43 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Nov 2017 18:21:29 +0100 Subject: [PATCH 11/12] Fix link can't be a htm link in innosetup --- build/exe/doliwamp/doliwamp.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 2ef8ab32f22..f10fec117a9 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -353,7 +353,7 @@ begin begin // TODO Copy file or ask to install package ? //CustomMessage('YouWillInstallDoliWamp')+#13#13 - MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from http://www.microsoft.com/en-us/download/details.aspx?id=30679 then restart DoliWamp installation/upgrade.',mbInformation,MB_OK); + MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from http://www.microsoft.com/en-us/download/details.aspx?id=30679 then restart DoliWamp installation/upgrade.',mbInformation,MB_OK); end; // Pb seems similar with msvcp110.dll //vcredist_x64.exe From 52421406ce2d8f5be48debea53940b20a399e34f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 5 Nov 2017 18:25:33 +0100 Subject: [PATCH 12/12] FIX #7751 --- build/exe/doliwamp/doliwamp.iss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index f10fec117a9..cf4949fcf40 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -353,7 +353,7 @@ begin begin // TODO Copy file or ask to install package ? //CustomMessage('YouWillInstallDoliWamp')+#13#13 - MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from http://www.microsoft.com/en-us/download/details.aspx?id=30679 then restart DoliWamp installation/upgrade.',mbInformation,MB_OK); + MsgBox('The Visual C++ Redistributable package should be installed, it seems it is not. Please install the 32-bit version from http://www.microsoft.com/en-us/download/details.aspx?id=30679, then restart the DoliWAMP installation/upgrade.',mbInformation,MB_OK); end; // Pb seems similar with msvcp110.dll //vcredist_x64.exe