From d2d84c3e486db42c22a84f2764a1af47c55ba73a Mon Sep 17 00:00:00 2001 From: philippe Date: Sun, 12 Jan 2014 21:26:44 +0100 Subject: [PATCH 1/9] Fix: path to image must not be hardcoded but use dol_buildpath or img_picto with param src=1. --- htdocs/fourn/liste.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/liste.php b/htdocs/fourn/liste.php index f59e692fb87..5ce488939b3 100644 --- a/htdocs/fourn/liste.php +++ b/htdocs/fourn/liste.php @@ -183,7 +183,7 @@ if ($resql) print ''; print ''; - print ''; + print ''; $parameters=array(); $formconfirm=$hookmanager->executeHooks('printFieldListOption',$parameters); // Note that $action and $object may have been modified by hook From 938f31f383fee3ce8690db7baece739ae8a1f252 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Sun, 12 Jan 2014 21:45:52 +0100 Subject: [PATCH 2/9] Fix: path to image must not be hardcoded but use dol_buildpath or img_picto with param src=1. --- htdocs/contact/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 2b1c5e982df..1c735d787b4 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -343,9 +343,9 @@ if ($result) print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print ''; print ''; - print ''; + print ''; print '  '; - print ''; + print ''; print ''; print ''; From e7f7dd49a5e128bdf6964152e49f86333e64eb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Fri, 10 Jan 2014 10:41:19 +0100 Subject: [PATCH 3/9] add a method to check for the presence of an object in a category --- htdocs/categories/class/categorie.class.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 9f4be55eb40..1a68fc93999 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -571,6 +571,27 @@ class Categorie } } + /** + * check for the presence of an object in a category + * @param string $field table field + * @param string $category_table category table name + * @param int $object_id id of the object to search + * @return int nb number of occurrences + */ + function object_exists($field, $category_table, $object_id) + { + $sql = "SELECT COUNT(*) as nb FROM " . MAIN_DB_PREFIX . "categorie_" . $category_table; + $sql .= " WHERE fk_categorie = " . $this->id . " AND fk_" . $field . " = " . $object_id; + dol_syslog(get_class($this)."::product_exists sql=".$sql); + $resql = $this->db->query($sql); + if ($resql) { + return $this->db->fetch_object($resql)->nb; + } else { + $this->error=$this->db->error().' sql='.$sql; + dol_syslog(get_class($this)."::get_type ".$this->error, LOG_ERR); + return -1; + } + } /** * Return childs of a category From abe76708de0d8610b6ff14e14c69756981c2466e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Fri, 10 Jan 2014 11:06:16 +0100 Subject: [PATCH 4/9] renamed object_exists --- htdocs/categories/class/categorie.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 1a68fc93999..3040ed3176c 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -578,7 +578,7 @@ class Categorie * @param int $object_id id of the object to search * @return int nb number of occurrences */ - function object_exists($field, $category_table, $object_id) + function is_in_cat($field, $category_table, $object_id) { $sql = "SELECT COUNT(*) as nb FROM " . MAIN_DB_PREFIX . "categorie_" . $category_table; $sql .= " WHERE fk_categorie = " . $this->id . " AND fk_" . $field . " = " . $object_id; From ecfff5636baeb86086ab7b24fb884c8d6a4cf269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Mon, 13 Jan 2014 09:27:10 +0100 Subject: [PATCH 5/9] rename is_in_cat to containsObject --- htdocs/categories/class/categorie.class.php | 31 +++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 3040ed3176c..7e990e602c9 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -573,22 +573,43 @@ class Categorie /** * check for the presence of an object in a category - * @param string $field table field - * @param string $category_table category table name + * @param string $type object type * @param int $object_id id of the object to search * @return int nb number of occurrences */ - function is_in_cat($field, $category_table, $object_id) + function containsObject($type, $object_id) { + $field = ''; $classname = ''; $category_table = ''; $object_table = ''; + if ($type == 'product') { + $field = 'product'; + } + if ($type == 'customer') { + $field = 'societe'; + } + if ($type == 'supplier') { + $field = 'societe'; + $category_table = 'fournisseur'; + } + if ($type == 'member') { + $field = 'member'; + $category_table = ''; + } + if ($type == 'contact') { + $field = 'socpeople'; + $category_table = 'contact'; + } + if (empty($category_table)) { + $category_table = $field; + } $sql = "SELECT COUNT(*) as nb FROM " . MAIN_DB_PREFIX . "categorie_" . $category_table; $sql .= " WHERE fk_categorie = " . $this->id . " AND fk_" . $field . " = " . $object_id; - dol_syslog(get_class($this)."::product_exists sql=".$sql); + dol_syslog(get_class($this)."::containsObject sql=".$sql); $resql = $this->db->query($sql); if ($resql) { return $this->db->fetch_object($resql)->nb; } else { $this->error=$this->db->error().' sql='.$sql; - dol_syslog(get_class($this)."::get_type ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::containsObject ".$this->error, LOG_ERR); return -1; } } From c5689b86b46fbd6d8d1edcd5f21331c7edb8409a Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Mon, 13 Jan 2014 09:43:21 +0100 Subject: [PATCH 6/9] Fix: path to image must not be hardcoded but use dol_buildpath or img_picto with param src=1 --- htdocs/adherents/liste.php | 4 ++-- htdocs/admin/tools/listevents.php | 2 +- htdocs/comm/contact.php | 2 +- htdocs/comm/list.php | 4 ++-- htdocs/comm/mailing/cibles.php | 4 ++-- htdocs/comm/mailing/liste.php | 2 +- htdocs/comm/propal/list.php | 2 +- htdocs/comm/prospect/list.php | 2 +- htdocs/commande/customer.php | 2 +- htdocs/commande/liste.php | 2 +- htdocs/commande/orderstoinvoice.php | 2 +- htdocs/compta/bank/account.php | 2 +- htdocs/compta/bank/search.php | 2 +- htdocs/compta/deplacement/list.php | 2 +- htdocs/compta/dons/liste.php | 2 +- htdocs/compta/facture/impayees.php | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/adherents/liste.php b/htdocs/adherents/liste.php index d4beb3ecdd9..a4b9bdb7a5a 100644 --- a/htdocs/adherents/liste.php +++ b/htdocs/adherents/liste.php @@ -256,9 +256,9 @@ if ($resql) print ' '; print ''; - print ''; + print ''; print '  '; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index ac5b825b421..d733182f054 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -188,7 +188,7 @@ if ($result) print ''; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 5c85f745def..7f9d7ede440 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -141,7 +141,7 @@ if ($resql) print ''; print ''; print ' '; - print ''; + print ''; print "\n"; print ''; diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index ed12edd032a..4e6ac38c810 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -233,9 +233,9 @@ if ($result) print $form->selectarray('search_status', array('0'=>$langs->trans('ActivityCeased'),'1'=>$langs->trans('InActivity')),$search_status); print ''; - print ''; + print ''; print '  '; - print ''; + print ''; print ''; $parameters=array(); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index 5b3ec5bfc1d..916a6163668 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -434,9 +434,9 @@ if ($object->fetch($id) >= 0) print ''; // Source print ''; - print ''; + print ''; print '  '; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/comm/mailing/liste.php b/htdocs/comm/mailing/liste.php index 41a4e57a7ac..81af4f4f6e6 100644 --- a/htdocs/comm/mailing/liste.php +++ b/htdocs/comm/mailing/liste.php @@ -121,7 +121,7 @@ if ($result) print ' '; if (! $filteremail) print ' '; print ' '; - print ''; + print ''; print ""; print "\n"; print ''; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 262ccbfe91e..7a652631d67 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -309,7 +309,7 @@ if ($result) print ''; $formpropal->select_propal_statut($viewstatut,1); print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 18038d3ed44..767a29f0b88 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -378,7 +378,7 @@ if ($resql) // Print the search button print ''; - print ''; + print ''; print ''; $parameters=array(); diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 35a5891d604..373775a0da0 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -142,7 +142,7 @@ if ($resql) print ''; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index aaf6b5312ae..c4a416f1898 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -301,7 +301,7 @@ if ($resql) print ' '; print ' '; print ''; - print ''; + print ''; print ''; $var=true; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index 806fd95a957..aa2883ccb96 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -603,7 +603,7 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs)) //SEARCH BUTTON print ''; - print ''; + print ''; //ALL/NONE print ''; diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php index 319ba7ab9d9..d85d6ff3b27 100644 --- a/htdocs/compta/bank/account.php +++ b/htdocs/compta/bank/account.php @@ -422,7 +422,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ''; print ' '; - print ''; + print ''; print "\n"; diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 650733dbb9c..a94e2fc5cd0 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -184,7 +184,7 @@ if ($resql) print ''; print ''; if (! empty($_REQUEST['bid'])) print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 330f493e6ba..94a3a26a0f3 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -119,7 +119,7 @@ if ($resql) print ''; print ' '; print ''; - print ''; + print ''; print "\n"; $var=true; diff --git a/htdocs/compta/dons/liste.php b/htdocs/compta/dons/liste.php index 56c66d4fdce..f045e82be71 100644 --- a/htdocs/compta/dons/liste.php +++ b/htdocs/compta/dons/liste.php @@ -144,7 +144,7 @@ if ($resql) print ''; print ' '; print ''; - print ''; + print ''; print "\n"; $var=True; diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index 3d792e343f0..d1750755835 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -299,7 +299,7 @@ if ($resql) print ' '; print ' '; print ''; - print ''; + print ''; print ''; print ''; if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; From 462f65614d134bdc1e6039f098ad5aaa1fb544d5 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Mon, 13 Jan 2014 10:10:17 +0100 Subject: [PATCH 7/9] Fix: path to image must not be hardcoded but use dol_buildpath or img_picto with param src=1 --- htdocs/comm/mailing/fiche.php | 2 +- htdocs/compta/clients.php | 2 +- htdocs/compta/facture/list.php | 2 +- htdocs/compta/paiement/cheque/liste.php | 2 +- htdocs/compta/paiement/liste.php | 2 +- htdocs/compta/prelevement/bons.php | 2 +- htdocs/compta/prelevement/demandes.php | 2 +- htdocs/compta/prelevement/liste.php | 2 +- htdocs/compta/sociales/index.php | 2 +- htdocs/compta/stats/cabyprodserv.php | 2 +- htdocs/compta/stats/casoc.php | 2 +- htdocs/compta/ventilation/lignes.php | 2 +- htdocs/contrat/liste.php | 2 +- htdocs/contrat/services.php | 2 +- htdocs/core/lib/company.lib.php | 2 +- htdocs/cron/list.php | 4 ++-- htdocs/fichinter/list.php | 2 +- htdocs/fourn/commande/liste.php | 2 +- htdocs/fourn/facture/list.php | 2 +- htdocs/fourn/facture/paiement.php | 2 +- htdocs/fourn/product/liste.php | 4 ++-- htdocs/holiday/index.php | 2 +- htdocs/product/stock/mouvement.php | 4 ++-- htdocs/product/stock/replenish.php | 6 ++---- 24 files changed, 28 insertions(+), 30 deletions(-) diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 3510df7339e..8d7f3ea988a 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -1080,7 +1080,7 @@ else { $out.= '
'; $out.= img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name']; - $out.= ' '; + $out.= ' '; $out.= '
'; } } diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index f54f893d79c..4f6719adb14 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -173,7 +173,7 @@ if ($resql) print ''; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 83b9fd30945..42d08c3b02c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -317,7 +317,7 @@ if ($resql) print ' '; print ''; print ' '; - print ''; + print ''; print "\n"; if ($num > 0) diff --git a/htdocs/compta/paiement/cheque/liste.php b/htdocs/compta/paiement/cheque/liste.php index 1c1cf71b11c..7f656a75c79 100644 --- a/htdocs/compta/paiement/cheque/liste.php +++ b/htdocs/compta/paiement/cheque/liste.php @@ -102,7 +102,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php index 5e1653b3ec3..16a6c1410e6 100644 --- a/htdocs/compta/paiement/liste.php +++ b/htdocs/compta/paiement/liste.php @@ -167,7 +167,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) { diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index d5c140be91e..cd460f1aac2 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -88,7 +88,7 @@ if ($result) print '
'; print ''; print ' '; - print ''; + print ''; print '
'; print ''; diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index 3ae2b850aac..e4889645869 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -114,7 +114,7 @@ if ($resql) print '
'; print ''; print ''; - print ''; + print ''; print ''; print '
'; diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/liste.php index 5ed627dee58..2cd859969a9 100644 --- a/htdocs/compta/prelevement/liste.php +++ b/htdocs/compta/prelevement/liste.php @@ -129,7 +129,7 @@ if ($result) print ''; print ' '; print ' '; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 54cb9fc0c42..e96c5389529 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -162,7 +162,7 @@ if ($resql) print ' '; print ' '; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index e24ca5dd56b..ac82e2e342a 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -252,7 +252,7 @@ if ($modecompta == 'CREANCES-DETTES') } print '>'; print ''; - print ''; + print ''; print ''; // Array header print ""; diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index 97333f1758c..9745ef16290 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -322,7 +322,7 @@ if ($subcat) { } print'>'; print ''; -print ''; +print ''; print ''; print ''; // Array titles diff --git a/htdocs/compta/ventilation/lignes.php b/htdocs/compta/ventilation/lignes.php index e8578e7dcf0..fbc86557178 100644 --- a/htdocs/compta/ventilation/lignes.php +++ b/htdocs/compta/ventilation/lignes.php @@ -90,7 +90,7 @@ if ($result) print ' '; print ' '; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/contrat/liste.php b/htdocs/contrat/liste.php index 40a6811e41b..38576f7e764 100644 --- a/htdocs/contrat/liste.php +++ b/htdocs/contrat/liste.php @@ -129,7 +129,7 @@ if ($resql) print ''; print ' '; //print ' '; - print ''; + print ''; print ""; print "\n"; print ''; diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index ea42df9e01d..2f42fc39c77 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -184,7 +184,7 @@ if ($resql) $filter_date2=dol_mktime(0,0,0,$op2month,$op2day,$op2year); print $form->select_date($filter_date2,'op2',0,0,1); print ''; - print ''; + print ''; print ""; print "\n"; print ''; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index bcd6c53d489..a81eff0e5c3 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -630,7 +630,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='') // Edit print ''; - print ''; + print ''; print ''; print ""; diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 8d27450eaf8..19a0d5cc3b1 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -182,9 +182,9 @@ print ''; print $form->selectarray('status', array('0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")), $status, 1); print ''; print ' '; -print ''; +print ''; print '  '; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 93142ed2dc3..2a037a07563 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -124,7 +124,7 @@ if ($result) print ' '; print ' '; print ' '; - print ''; + print ''; print "\n"; $companystatic=new Societe($db); diff --git a/htdocs/fourn/commande/liste.php b/htdocs/fourn/commande/liste.php index bc4004e4fc1..d6c4bb9427d 100644 --- a/htdocs/fourn/commande/liste.php +++ b/htdocs/fourn/commande/liste.php @@ -152,7 +152,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index bc7632350c1..dd8d778d63a 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -235,7 +235,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index f625cead27c..8f3f2909832 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -463,7 +463,7 @@ if (empty($action)) print ''; print ''; print ''; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/fourn/product/liste.php b/htdocs/fourn/product/liste.php index 7806fdab1bd..76c34be7034 100644 --- a/htdocs/fourn/product/liste.php +++ b/htdocs/fourn/product/liste.php @@ -200,9 +200,9 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print '  '; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index 34443bfaa98..e7c4b0a3d50 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -326,7 +326,7 @@ print ''; // ACTION print ''; -print ''; +print ''; print ''; print "\n"; diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index eb9391c8698..f8135b69566 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -452,9 +452,9 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print '  '; - print ''; + print ''; print ''; print "\n"; print ''; diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 788bd8fee09..45c3b3bf7b3 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -412,10 +412,8 @@ print ' '. ' '. ' '. ''. - ''. - ''. + ''. + ''. ''. ''; From b61ccb823477f7003912e9e1c6581d6fbbda5e12 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Mon, 13 Jan 2014 10:15:07 +0100 Subject: [PATCH 8/9] Fix: path to image must not be hardcoded but use dol_buildpath or img_picto with param src=1 --- htdocs/product/liste.php | 4 ++-- htdocs/product/reassort.php | 4 ++-- htdocs/projet/liste.php | 2 +- htdocs/projet/tasks/index.php | 2 +- htdocs/societe/consumption.php | 4 ++-- htdocs/societe/societe.php | 4 ++-- htdocs/user/index.php | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index e9fe0b60a03..28330586070 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -370,8 +370,8 @@ else print ''; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 00793b2ff8a..fcbcd780fb6 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -274,8 +274,8 @@ if ($resql) print ' '; print ' '; print ''; - print ''; - print ''; + print ''; + print ''; print ''; print ''; diff --git a/htdocs/projet/liste.php b/htdocs/projet/liste.php index a81a21c6c9b..974f7f5ef00 100644 --- a/htdocs/projet/liste.php +++ b/htdocs/projet/liste.php @@ -142,7 +142,7 @@ if ($resql) print ''; print ''; print ' '; - print ''; + print ''; print "\n"; while ($i < $num) diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index 8795cf98486..8c626175d3d 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -116,7 +116,7 @@ print ''; print ''; print ' '; print ''; -print ''; +print ''; print "\n"; // Show all lines in taskarray (recursive function to go down on tree) diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index 03036f36a04..d7c8616a273 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -269,8 +269,8 @@ print ''; print ''; print ''; print ''; -print ''; -print ''; +print ''; +print ''; print ''; print ''; diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index bf21bfecfa7..7d3e2e1a78d 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -389,9 +389,9 @@ if ($resql) print ''; // Status print ''; - print ''; + print ''; print '  '; - print ''; + print ''; print ''; print "\n"; diff --git a/htdocs/user/index.php b/htdocs/user/index.php index 62ead1935eb..baa704509cc 100644 --- a/htdocs/user/index.php +++ b/htdocs/user/index.php @@ -126,7 +126,7 @@ if ($result) print ''; print ''; - print ''; + print ''; print ''; print "\n"; From 6d4a9833e2e6175517264bdae796fe2a33157e31 Mon Sep 17 00:00:00 2001 From: Cedric GROSS Date: Mon, 13 Jan 2014 19:46:23 +0100 Subject: [PATCH 9/9] Fix bug on stock calculation for replenishment: wrong order in ifsql. --- htdocs/product/stock/replenish.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 788bd8fee09..27bab21d2e8 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -176,7 +176,7 @@ $sql = 'SELECT p.rowid, p.ref, p.label, p.price,'; $sql.= ' p.price_ttc, p.price_base_type,p.fk_product_type,'; $sql.= ' p.tms as datem, p.duration, p.tobuy, p.seuil_stock_alerte,'; $sql.= ' p.desiredstock,'; -$sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "s.reel", "0").') as stock_physique'; +$sql.= ' SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') as stock_physique'; $sql.= ' FROM ' . MAIN_DB_PREFIX . 'product as p'; $sql.= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s'; $sql.= ' ON p.rowid = s.fk_product'; @@ -219,7 +219,7 @@ $sql.= ' HAVING p.desiredstock > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel $sql.= ' AND p.desiredstock > 0'; if ($salert == 'on') // Option to see when stock is lower than alert { - $sql .= ' AND SUM('.$db->ifsql("s.reel IS NULL", "s.reel", "0").') < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL'; + $sql .= ' AND SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') < p.seuil_stock_alerte AND p.seuil_stock_alerte is not NULL'; $alertchecked = 'checked="checked"'; } $sql.= $db->order($sortfield,$sortorder);