Bonjour a tous,
Vous trouverez en piece jointe les patch pour les bug BUG#33584, BUG#33583
https://savannah.nongnu.org/bugs/index.php?33584
https://savannah.nongnu.org/bugs/index.php?33583
Cordialement
HENRY Florian
-----------------------------------------------------
Hi all,
You can find in attachement the patchs for the bugs BUG#33584, BUG#33583
https://savannah.nongnu.org/bugs/index.php?33584
https://savannah.nongnu.org/bugs/index.php?33583
kind regards
HENRY Florian
diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' /home/bobby/eclipse/workspace/dolibarr3/htdocs/lib/admin.lib.php /home/bobby/eclipse/workspace/dolibarrPatch/htdocs/lib/admin.lib.php
--- /home/bobby/eclipse/workspace/dolibarr3/htdocs/lib/admin.lib.php 2011-04-03 19:15:57.000000000 -0400
+++ /home/bobby/eclipse/workspace/dolibarrPatch/htdocs/lib/admin.lib.php 2011-06-10 08:54:57.000000000 -0400
@@ -144,6 +144,11 @@
// Add line buf to buffer if not a comment
if (! preg_match('/^--/',$buf))
{
+ //remove comment from a line that not start with -- before add it to the buffer
+ if (preg_match('/--/',$buf))
+ {
+ $buf = substr($buf,0,strpos($buf, '-'));
+ }
$buffer .= trim($buf);
}
diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' /home/bobby/eclipse/workspace/dolibarr3/htdocs/commande/class/commande.class.php /home/bobby/eclipse/workspace/dolibarrPatch/htdocs/commande/class/commande.class.php
--- /home/bobby/eclipse/workspace/dolibarr3/htdocs/commande/class/commande.class.php 2011-03-16 07:37:40.000000000 -0400
+++ /home/bobby/eclipse/workspace/dolibarrPatch/htdocs/commande/class/commande.class.php 2011-06-16 14:35:00.000000000 -0400
@@ -24,7 +24,7 @@
* \file htdocs/commande/class/commande.class.php
* \ingroup commande
* \brief Fichier des classes de commandes
- * \version $Id: commande.class.php,v 1.62.2.2 2011/03/16 11:37:40 eldy Exp $
+ * \version $Id: commande.class.php,v 1.62.2.4 2011/04/19 22:16:34 eldy Exp $
*/
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
@@ -812,7 +812,7 @@
if (empty($txtva)) $txtva=0;
if (empty($txlocaltax1)) $txlocaltax1=0;
if (empty($txlocaltax2)) $txlocaltax2=0;
-
+
$remise_percent=price2num($remise_percent);
$qty=price2num($qty);
$pu_ht=price2num($pu_ht);
@@ -1345,15 +1345,18 @@
*/
function nb_expedition()
{
- $sql = 'SELECT count(*) FROM '.MAIN_DB_PREFIX.'expedition as e';
- $sql .=" WHERE e.fk_commande = ".$this->id;
-
- $resql = $this->db->query($sql);
- if ($resql)
- {
- $row = $this->db->fetch_row($resql);
- return $row[0];
- }
+ $sql = 'SELECT count(*)';
+ $sql.= ' FROM '.MAIN_DB_PREFIX.'expedition as e ';
+ $sql.= ' INNER JOIN '.MAIN_DB_PREFIX."element_element as el ON el.fk_target = e.rowid AND el.targettype = 'shipping'";
+ $sql.= " WHERE el.fk_source = ".$this->id;
+
+ $resql = $this->db->query($sql);
+ if ($resql)
+ {
+ $row = $this->db->fetch_row($resql);
+ return $row[0];
+ }
+ else dol_print_error($this->db);
}
/**
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev