From dfd14f44304c8e1ed761c026287b677ad7d25dd2 Mon Sep 17 00:00:00 2001 From: simnandez Date: Tue, 27 Aug 2013 09:44:00 +0200 Subject: [PATCH 01/13] Fix: [ bug #1043 ] Bad interventions ref numbering --- ChangeLog | 1 + htdocs/core/modules/fichinter/mod_arctic.php | 3 ++- htdocs/core/modules/fichinter/mod_pacific.php | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e927ee706d9..d780fc61e52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,7 @@ Fix: User group name do not display in card (view or edit mode) Fix: Link "Show all supplier invoice" on suplier card not working Fix: [ bug #1039 ] Pre-defined invoices conversion Fix: If only service module is activated, it's impossible to delete service +Fix: [ bug #1043 ] Bad interventions ref numbering ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index d9def0fc01f..f2d89bf63c6 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) + * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -119,7 +120,7 @@ class mod_arctic extends ModeleNumRefFicheinter return 0; } - $numFinal=get_next_value($db,$mask,'fichinter','ref','',$objsoc->code_client,$object->date); + $numFinal=get_next_value($db,$mask,'fichinter','ref','',$objsoc->code_client,$object->datec); return $numFinal; } diff --git a/htdocs/core/modules/fichinter/mod_pacific.php b/htdocs/core/modules/fichinter/mod_pacific.php index 352cab82307..227d04f5ba5 100644 --- a/htdocs/core/modules/fichinter/mod_pacific.php +++ b/htdocs/core/modules/fichinter/mod_pacific.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -121,7 +122,7 @@ class mod_pacific extends ModeleNumRefFicheinter } //$date=time(); - $date=$object->date; + $date=$object->datec; $yymm = strftime("%y%m",$date); $num = sprintf("%04s",$max+1); From b39046ca7e7fd33c431694a9ffac74427cf2861d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Aug 2013 13:05:14 +0200 Subject: [PATCH 02/13] Fix: Add missing syslog --- htdocs/compta/journal/purchasesjournal.php | 5 +++-- htdocs/compta/journal/sellsjournal.php | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 2269c0035b9..887e9b85b6b 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -111,6 +111,7 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql.= " AND f.t else $sql.= " AND f.type IN (0,1,2,3)"; if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; +dol_syslog("sql=".$sql); $result = $db->query($sql); if ($result) { @@ -147,7 +148,7 @@ if ($result) $compta_localtax1= (! empty($account_localtax1[2])?$account_localtax1[2]:$langs->trans("CodeNotDef")); $account_localtax2=getLocalTaxesFromRate($obj->tva_tx, 2, $mysoc); $compta_localtax2= (! empty($account_localtax2[2])?$account_localtax2[2]:$langs->trans("CodeNotDef")); - + $tabfac[$obj->rowid]["date"] = $obj->datef; $tabfac[$obj->rowid]["ref"] = $obj->ref_supplier; $tabfac[$obj->rowid]["type"] = $obj->type; @@ -239,7 +240,7 @@ foreach ($tabfac as $key => $val) print ''.($mt>=0?price($mt):'').""; print ''.($mt<0?price(-$mt):'').""; } - + print ""; } } diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 859c1ff2ea5..f502cb79e94 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -116,6 +116,7 @@ $sql.= " AND fd.product_type IN (0,1)"; if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql.= " ORDER BY f.rowid"; +dol_syslog("sql=".$sql); $result = $db->query($sql); if ($result) { @@ -151,7 +152,7 @@ if ($result) $compta_localtax1= (! empty($account_localtax1[3])?$account_localtax1[3]:$langs->trans("CodeNotDef")); $account_localtax2=getLocalTaxesFromRate($obj->tva_tx, 2, $mysoc); $compta_localtax2= (! empty($account_localtax2[3])?$account_localtax2[3]:$langs->trans("CodeNotDef")); - + //la ligne facture $tabfac[$obj->rowid]["date"] = $obj->datef; $tabfac[$obj->rowid]["ref"] = $obj->facnumber; @@ -225,7 +226,7 @@ foreach ($tabfac as $key => $val) array( 'var' => $tablocaltax2[$key], 'label' => $langs->transcountry('LT2', $mysoc->country_code) - ) + ) ); foreach ($lines as $line) From cc90c92cc06812d07254a2c2e30b313b57bd6cd2 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Wed, 28 Aug 2013 16:33:21 +0200 Subject: [PATCH 03/13] Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted --- ChangeLog | 1 + htdocs/core/modules/mailings/contacts1.modules.php | 3 ++- htdocs/core/modules/mailings/contacts2.modules.php | 3 ++- htdocs/core/modules/mailings/contacts3.modules.php | 3 ++- htdocs/core/modules/mailings/fraise.modules.php | 3 ++- htdocs/core/modules/mailings/pomme.modules.php | 3 ++- htdocs/core/modules/mailings/thirdparties.modules.php | 9 ++++++--- .../mailings/thirdparties_services_expired.modules.php | 1 + 8 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index d780fc61e52..7495e293743 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ Fix: Link "Show all supplier invoice" on suplier card not working Fix: [ bug #1039 ] Pre-defined invoices conversion Fix: If only service module is activated, it's impossible to delete service Fix: [ bug #1043 ] Bad interventions ref numbering +Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: diff --git a/htdocs/core/modules/mailings/contacts1.modules.php b/htdocs/core/modules/mailings/contacts1.modules.php index f45969ea564..fd0f2e3ddf6 100644 --- a/htdocs/core/modules/mailings/contacts1.modules.php +++ b/htdocs/core/modules/mailings/contacts1.modules.php @@ -202,8 +202,9 @@ class mailing_contacts1 extends MailingTargets $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as c"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = c.fk_soc"; $sql.= " WHERE c.entity IN (".getEntity('societe', 1).")"; - $sql.= " AND c.email != ''"; + $sql.= " AND c.email <> ''"; $sql.= " AND c.no_email = 0"; + $sql.= " AND c.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; foreach($filtersarray as $key) { if ($key == 'prospects') $sql.= " AND s.client=2"; diff --git a/htdocs/core/modules/mailings/contacts2.modules.php b/htdocs/core/modules/mailings/contacts2.modules.php index 5a25a11e590..0b13c9ec7ef 100644 --- a/htdocs/core/modules/mailings/contacts2.modules.php +++ b/htdocs/core/modules/mailings/contacts2.modules.php @@ -84,9 +84,10 @@ class mailing_contacts2 extends MailingTargets $sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc"; $sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")"; - $sql.= " AND sp.email != ''"; // Note that null != '' is false + $sql.= " AND sp.email <> ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; //$sql.= " AND sp.poste != ''"; + $sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$this->db->escape($filtersarray[0])."'"; $sql.= " ORDER BY sp.lastname, sp.firstname"; $resql = $this->db->query($sql); diff --git a/htdocs/core/modules/mailings/contacts3.modules.php b/htdocs/core/modules/mailings/contacts3.modules.php index 21dbb3e94f7..6262d4c9fe5 100644 --- a/htdocs/core/modules/mailings/contacts3.modules.php +++ b/htdocs/core/modules/mailings/contacts3.modules.php @@ -83,9 +83,10 @@ class mailing_contacts3 extends MailingTargets $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc"; if ($filtersarray[0] <> 'all') $sql.= ", ".MAIN_DB_PREFIX."categorie as c"; if ($filtersarray[0] <> 'all') $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs"; - $sql.= " WHERE sp.email != ''"; // Note that null != '' is false + $sql.= " WHERE sp.email <> ''"; // Note that null != '' is false $sql.= " AND sp.no_email = 0"; $sql.= " AND sp.entity IN (".getEntity('societe', 1).")"; + $sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_categorie = c.rowid"; if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_societe = sp.fk_soc"; if ($filtersarray[0] <> 'all') $sql.= " AND c.label = '".$this->db->escape($filtersarray[0])."'"; diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php index 75ae555b792..7daaea1ab01 100644 --- a/htdocs/core/modules/mailings/fraise.modules.php +++ b/htdocs/core/modules/mailings/fraise.modules.php @@ -169,7 +169,8 @@ class mailing_fraise extends MailingTargets $sql.= " a.lastname, a.firstname,"; $sql.= " a.datefin, a.civilite, a.login, a.societe"; // Other fields $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a"; - $sql.= " WHERE a.email IS NOT NULL"; + $sql.= " WHERE a.email <> ''"; // Note that null != '' is false + $sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1"; if (isset($_POST["filter"]) && $_POST["filter"] == '1a') $sql.= " AND a.statut=1 AND a.datefin >= '".$this->db->idate($now)."'"; if (isset($_POST["filter"]) && $_POST["filter"] == '1b') $sql.= " AND a.statut=1 AND (a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."')"; diff --git a/htdocs/core/modules/mailings/pomme.modules.php b/htdocs/core/modules/mailings/pomme.modules.php index 30c7c63da60..17d211dd06c 100644 --- a/htdocs/core/modules/mailings/pomme.modules.php +++ b/htdocs/core/modules/mailings/pomme.modules.php @@ -150,8 +150,9 @@ class mailing_pomme extends MailingTargets $sql = "SELECT u.rowid as id, u.email as email, null as fk_contact,"; $sql.= " u.lastname as name, u.firstname as firstname, u.login, u.office_phone"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql.= " WHERE u.email != ''"; // u.email IS NOT NULL est implicite dans ce test + $sql.= " WHERE u.email <> ''"; // u.email IS NOT NULL est implicite dans ce test $sql.= " AND u.entity IN (0,".$conf->entity.")"; + $sql.= " AND u.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; foreach($filtersarray as $key) { if ($key == '1') $sql.= " AND u.statut=1"; diff --git a/htdocs/core/modules/mailings/thirdparties.modules.php b/htdocs/core/modules/mailings/thirdparties.modules.php index 0858c02cc16..1d955e65ddc 100644 --- a/htdocs/core/modules/mailings/thirdparties.modules.php +++ b/htdocs/core/modules/mailings/thirdparties.modules.php @@ -63,23 +63,26 @@ class mailing_thirdparties extends MailingTargets { $sql = "SELECT s.rowid as id, s.email as email, s.nom as name, null as fk_contact, null as firstname, null as label"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql.= " WHERE s.email != ''"; + $sql.= " WHERE s.email <> ''"; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; + $sql.= " AND s.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; } else { $sql = "SELECT s.rowid as id, s.email as email, s.nom as name, null as fk_contact, null as firstname, c.label as label"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."categorie_societe as cs, ".MAIN_DB_PREFIX."categorie as c"; - $sql.= " WHERE s.email != ''"; + $sql.= " WHERE s.email <> ''"; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; + $sql.= " AND s.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; $sql.= " AND cs.fk_societe = s.rowid"; $sql.= " AND c.rowid = cs.fk_categorie"; $sql.= " AND c.rowid='".$this->db->escape($_POST['filter'])."'"; $sql.= " UNION "; $sql.= "SELECT s.rowid as id, s.email as email, s.nom as name, null as fk_contact, null as firstname, c.label as label"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."categorie_fournisseur as cs, ".MAIN_DB_PREFIX."categorie as c"; - $sql.= " WHERE s.email != ''"; + $sql.= " WHERE s.email <> ''"; $sql.= " AND s.entity IN (".getEntity('societe', 1).")"; + $sql.= " AND s.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; $sql.= " AND cs.fk_societe = s.rowid"; $sql.= " AND c.rowid = cs.fk_categorie"; $sql.= " AND c.rowid='".$this->db->escape($_POST['filter'])."'"; diff --git a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php index 450773a2566..f3d0e4cc476 100644 --- a/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php +++ b/htdocs/core/modules/mailings/thirdparties_services_expired.modules.php @@ -100,6 +100,7 @@ class mailing_thirdparties_services_expired extends MailingTargets $sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."contrat as c"; $sql.= ", ".MAIN_DB_PREFIX."contratdet as cd, ".MAIN_DB_PREFIX."product as p"; $sql.= " WHERE s.entity IN (".getEntity('societe', 1).")"; + $sql.= " AND s.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")"; $sql.= " AND s.rowid = c.fk_soc AND cd.fk_contrat = c.rowid AND s.email != ''"; $sql.= " AND cd.statut= 4 AND cd.fk_product=p.rowid AND p.ref = '".$product."'"; $sql.= " AND cd.date_fin_validite < '".$this->db->idate($now)."'"; From fa4a9c73c49b083e90312abe74e67b4c39e80302 Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 29 Aug 2013 09:58:07 +0200 Subject: [PATCH 04/13] Fix: Localtaxes balance not showing --- ChangeLog | 1 + htdocs/core/lib/tax.lib.php | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7495e293743..1cc21b1266d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,7 @@ Fix: [ bug #1039 ] Pre-defined invoices conversion Fix: If only service module is activated, it's impossible to delete service Fix: [ bug #1043 ] Bad interventions ref numbering Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted +Fix: Localtaxes balance not showing ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index 507f6f615b2..a368561d8af 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2006-2007 Yannick Warnier * Copyright (C) 2011 Regis Houssin + * Copyright (C) 2012 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -372,8 +373,8 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, { if (! isset($list[$assoc['rate']]['totalht'])) $list[$assoc['rate']]['totalht']=0; if (! isset($list[$assoc['rate']]['vat'])) $list[$assoc['rate']]['vat']=0; - if (! isset($list[$assoc['rate']]['locatax1'])) $list[$assoc['rate']]['localtax1']=0; - if (! isset($list[$assoc['rate']]['locatax2'])) $list[$assoc['rate']]['localtax2']=0; + if (! isset($list[$assoc['rate']]['localtax1'])) $list[$assoc['rate']]['localtax1']=0; + if (! isset($list[$assoc['rate']]['localtax2'])) $list[$assoc['rate']]['localtax2']=0; if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid { @@ -536,8 +537,8 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction, { if (! isset($list[$assoc['rate']]['totalht'])) $list[$assoc['rate']]['totalht']=0; if (! isset($list[$assoc['rate']]['vat'])) $list[$assoc['rate']]['vat']=0; - if (! isset($list[$assoc['rate']]['locatax1'])) $list[$assoc['rate']]['localtax1']=0; - if (! isset($list[$assoc['rate']]['locatax2'])) $list[$assoc['rate']]['localtax2']=0; + if (! isset($list[$assoc['rate']]['localtax1'])) $list[$assoc['rate']]['localtax1']=0; + if (! isset($list[$assoc['rate']]['localtax2'])) $list[$assoc['rate']]['localtax2']=0; if ($assoc['rowid'] != $oldrowid) // Si rupture sur d.rowid { From b86e20f0e6d38f05b31b1c16b1a8f1ca51c1e547 Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 29 Aug 2013 12:05:29 +0200 Subject: [PATCH 05/13] Fix: Intervention box links to contracts id --- ChangeLog | 1 + htdocs/core/boxes/box_ficheinter.php | 11 ++++++----- htdocs/langs/ca_ES/boxes.lang | 1 + htdocs/langs/en_US/boxes.lang | 1 + htdocs/langs/es_ES/boxes.lang | 1 + htdocs/langs/fr_FR/boxes.lang | 1 + 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1cc21b1266d..3225203c90c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ Fix: If only service module is activated, it's impossible to delete service Fix: [ bug #1043 ] Bad interventions ref numbering Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted Fix: Localtaxes balance not showing +Fix: Intervention box links to contracts id ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index 765224baccc..c821989bf4f 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -1,5 +1,6 @@ + * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +26,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; /** - * Class to manage the box to show last contracts + * Class to manage the box to show last interventions */ class box_ficheinter extends ModeleBoxes { @@ -95,11 +96,11 @@ class box_ficheinter extends ModeleBoxes $this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"', 'logo' => $this->boximg, - 'url' => DOL_URL_ROOT."/ficheinter/fiche.php?id=".$objp->rowid); + 'url' => DOL_URL_ROOT."/fichinter/fiche.php?id=".$objp->rowid); $this->info_box_contents[$i][1] = array('td' => 'align="left"', - 'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some contracts have no ref - 'url' => DOL_URL_ROOT."/contrat/fiche.php?id=".$objp->rowid); + 'text' => ($objp->ref?$objp->ref:$objp->rowid), // Some interventions have no ref + 'url' => DOL_URL_ROOT."/fichinter/fiche.php?id=".$objp->rowid); $this->info_box_contents[$i][2] = array('td' => 'align="left" width="16"', 'logo' => 'company', @@ -120,7 +121,7 @@ class box_ficheinter extends ModeleBoxes $i++; } - if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedContracts")); + if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInterventions")); } else { diff --git a/htdocs/langs/ca_ES/boxes.lang b/htdocs/langs/ca_ES/boxes.lang index b3bf6593a99..a42a5ccbd0d 100644 --- a/htdocs/langs/ca_ES/boxes.lang +++ b/htdocs/langs/ca_ES/boxes.lang @@ -75,6 +75,7 @@ NoRecordedProducts=Sense productes/serveis registrats NoRecordedProspects=Sense clients potencials registrats NoContractedProducts=Sense productes/serveis contractats NoRecordedContracts=Sense contractes registrats +NoRecordedInterventions=Sense intervencions registrades BoxLatestSupplierOrders=Últimes comandes a proveïdors BoxTitleLatestSupplierOrders=Les %s últimes comandes a proveïdors NoSupplierOrder=Sense comandes a proveïdors diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 817238c9881..28b24d7e29d 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -75,6 +75,7 @@ NoRecordedProducts=No recorded products/services NoRecordedProspects=No recorded prospects NoContractedProducts=No products/services contracted NoRecordedContracts=No recorded contracts +NoRecordedInterventions=No recorded interventions BoxLatestSupplierOrders=Latest supplier orders BoxTitleLatestSupplierOrders=%s latest supplier orders NoSupplierOrder=No recorded supplier order diff --git a/htdocs/langs/es_ES/boxes.lang b/htdocs/langs/es_ES/boxes.lang index d61aa5e023e..4356c354265 100644 --- a/htdocs/langs/es_ES/boxes.lang +++ b/htdocs/langs/es_ES/boxes.lang @@ -75,6 +75,7 @@ NoRecordedProducts=Sin productos/servicios registrados NoRecordedProspects=Sin clientes potenciales registrados NoContractedProducts=Sin productos/servicios contratados NoRecordedContracts=Sin contratos registrados +NoRecordedInterventions=Sin intervenciones registradas BoxLatestSupplierOrders=Últimos pedidos a proveedores BoxTitleLatestSupplierOrders=Los %s últimos pedidos a proveedores NoSupplierOrder=Sin pedidos a proveedores diff --git a/htdocs/langs/fr_FR/boxes.lang b/htdocs/langs/fr_FR/boxes.lang index 3bef5b4b8f3..059ca108836 100644 --- a/htdocs/langs/fr_FR/boxes.lang +++ b/htdocs/langs/fr_FR/boxes.lang @@ -75,6 +75,7 @@ NoRecordedProducts=Pas de produit/service enregistré NoRecordedProspects=Pas de prospect enregistré NoContractedProducts=Pas de produit/service contracté NoRecordedContracts=Pas de contrat enregistré +NoRecordedInterventions=Pas fiche d'intervention enregistrée BoxLatestSupplierOrders=Dernières commandes fournisseur BoxTitleLatestSupplierOrders=Les %s dernières commandes fournisseur enregistrées NoSupplierOrder=Pas de commandes fournisseur enregistrées From b95aa1ac7b3ac2c3861bc41d725ec336b34e9461 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 2 Sep 2013 00:41:14 +0200 Subject: [PATCH 06/13] Fix: select list on external table Conflicts: htdocs/core/class/extrafields.class.php --- htdocs/core/class/extrafields.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 096928d5cbc..a55b76e4ce2 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -677,9 +677,9 @@ class ExtraFields } elseif ($type == 'sellist') { - $out=''; From 83042459a5cd022c4aec26357aba1b6ffd24d854 Mon Sep 17 00:00:00 2001 From: simnandez Date: Mon, 2 Sep 2013 10:07:44 +0200 Subject: [PATCH 07/13] Fix: compatiblity with multicompany module --- ChangeLog | 1 + htdocs/categories/class/categorie.class.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3225203c90c..efdc41b902a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ Fix: [ bug #1043 ] Bad interventions ref numbering Fix: Mailing module : if an email is already in destinaires list all other email from selector was not inserted Fix: Localtaxes balance not showing Fix: Intervention box links to contracts id +Fix: Compatiblity with multicompany module ***** ChangeLog for 3.4 compared to 3.3.* ***** For users: diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index f8091fa8fa6..5a239f5eb21 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2006-2012 Regis Houssin * Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2007 Patrick Raguin + * Copyright (C) 2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -520,8 +521,8 @@ class Categorie $sql = "SELECT fk_parent as id_parent, rowid as id_son"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; $sql.= " WHERE fk_parent != 0"; - $sql.= " AND entity = ".$conf->entity; - + $sql.= " AND entity IN (".getEntity('category',1).")"; + dol_syslog(get_class($this)."::load_motherof sql=".$sql); $resql = $this->db->query($sql); if ($resql) From ec86efaab2a5353f4ff0edad128f8dc66b435bc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20L=C3=A9onard?= Date: Tue, 3 Sep 2013 23:57:36 +0200 Subject: [PATCH 08/13] Fix owner address of company bank account --- htdocs/societe/rib.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index 451209913aa..e85845c6a59 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -65,8 +65,8 @@ if ($_POST["action"] == 'update' && ! $_POST["cancel"]) $account->bic = $_POST["bic"]; $account->iban_prefix = $_POST["iban_prefix"]; $account->domiciliation = $_POST["domiciliation"]; - $account->proprio = $_POST["proprio"]; - $account->adresse_proprio = $_POST["adresse_proprio"]; + $account->proprio = $_POST["proprio"]; + $account->owner_address = $_POST["owner_address"]; $result = $account->update($user); if (! $result) @@ -154,7 +154,7 @@ if ($_GET["socid"] && $_GET["action"] != 'edit') print "\n"; print ''.$langs->trans("BankAccountOwnerAddress").''; - print $account->adresse_proprio; + print $account->owner_address; print "\n"; print ''; @@ -236,8 +236,8 @@ if ($_GET["socid"] && $_GET["action"] == 'edit' && $user->rights->societe->creer print "\n"; print ''.$langs->trans("BankAccountOwnerAddress").''; - print ""; print '
'; From 91320ef99ce5492b11c6ba2bc520ad75e31dacf0 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Wed, 4 Sep 2013 05:14:43 +0200 Subject: [PATCH 09/13] Update translation fr_FR --- htdocs/langs/fr_FR/compta.lang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index 227b6b734ad..bca34a344c9 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -113,8 +113,8 @@ RulesResultDue=- Il inclut les factures, charges et tva dues, qu'elles soient pa RulesResultInOut=- Il inclut les règlements effectivement réalisés pour les factures, les charges et la TVA.
- Il se base sur la date de règlement de ces factures, charges et TVA. RulesCADue=- Il inclut les factures clients dues, qu'elles soient payées ou non.
- Il se base sur la date de validation de ces factures.
RulesCAIn=- Il inclut les règlements effectivement reçus des factures clients.
- Il se base sur la date de règlement de ces factures
-DepositsAreNotIncluded=- Les factures d'accomptes ne sont pas incluses -DepositsAreIncluded=- Les factures d'accomptes sont incluses +DepositsAreNotIncluded=- Les factures d'acomptes ne sont pas incluses +DepositsAreIncluded=- Les factures d'acomptes sont incluses LT2ReportByCustomersInInputOutputModeES=Rapport par client des IRPF VATReportByCustomersInInputOutputMode=Rapport par client des TVA collectées et payées (TVA sur encaissement) VATReportByCustomersInDueDebtMode=Rapport par client des TVA collectées et payées (TVA sur débit) @@ -156,7 +156,7 @@ COMPTA_ACCOUNT_CUSTOMER=Compte comptable client par défaut (si non défini sur COMPTA_ACCOUNT_SUPPLIER=Compte comptable fournisseur par défaut (si non défini sur fiche tiers) AddRemind=Ventiler montant disponible RemainToDivide=Reste à répartir : -WarningDepositsNotIncluded=Les factures d'accomptes ne sont pas encore prises en compte dans cette version avec ce module de comptabilité. +WarningDepositsNotIncluded=Les factures d'acomptes ne sont pas encore prises en compte dans cette version avec ce module de comptabilité. DatePaymentTermCantBeLowerThanObjectDate=La date limite de règlement ne peut être inférieure à la date de l'object Pcg_version=Version du plan Pcg_type=Classe de compte From ee0f44c9e3eec548a48e6d7b3294ded50448f34f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Sep 2013 10:45:15 +0200 Subject: [PATCH 10/13] Fix: Try a fix of cloning lines->array --- htdocs/core/class/commonobject.class.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 49f038062ab..27df3ad5c74 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2530,18 +2530,18 @@ abstract class CommonObject $classfile = strtolower($subelement); $classname = ucfirst($subelement); if ($objecttype == 'invoice_supplier') { - $classfile = 'fournisseur.facture'; + $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; $classpath = 'fourn/class'; $module='fournisseur'; } if ($objecttype == 'order_supplier') { - $classfile = 'fournisseur.commande'; + $classfile = 'fournisseur.commande'; $classname='CommandeFournisseur'; $classpath = 'fourn/class'; $module='fournisseur'; } - + if (! empty($conf->$module->enabled)) { $res=dol_include_once('/'.$classpath.'/'.$classfile.'.class.php'); @@ -3232,5 +3232,17 @@ abstract class CommonObject print ''; print ''; } + + function __clone() + { + // Force a copy of this->lines, otherwise it will point to same object. + if (isset($this->lines) && is_array($this->lines)) + { + for($i=0; $i < count($this->lines); $i++) + { + $this->lines[$i] = dol_clone($this->lines[$i]); + } + } + } } ?> From af22d386811459a3bff45272ac4065f8bdc5b32e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Sep 2013 15:07:35 +0200 Subject: [PATCH 11/13] Fix: Bad total without tax --- htdocs/core/class/commondocgenerator.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index a7e92bc463c..4dfdb636814 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -217,8 +217,8 @@ abstract class CommonDocGenerator return $array_other; } - - + + /** * Define array with couple substitution key => substitution value * @@ -245,7 +245,7 @@ abstract class CommonDocGenerator $array_key.'_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement), $array_key.'_payment_term_code'=>$object->cond_reglement_code, $array_key.'_payment_term'=>($outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code)!='PaymentCondition'.$object->cond_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentCondition'.$object->cond_reglement_code):$object->cond_reglement), - $array_key.'_total_ht'=>price($object->total_ht2), + $array_key.'_total_ht'=>price($object->total_ht), $array_key.'_total_vat'=>price($object->total_tva), $array_key.'_total_ttc'=>price($object->total_ttc), $array_key.'_total_discount_ht' => price($object->getTotalDiscount()), From 7229b728a3dd5dd5e77a0d05e0bb8d4640677146 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 4 Sep 2013 23:02:02 +0200 Subject: [PATCH 12/13] Update doc --- build/debian/README.howto | 98 +++++++++++++++++++++++++-------------- 1 file changed, 63 insertions(+), 35 deletions(-) diff --git a/build/debian/README.howto b/build/debian/README.howto index 0e572f7d483..c8f023e0cc6 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -7,6 +7,7 @@ This directory contains files used by makepack-dolibarr.pl script to build a package, ready to be distributed, with format .DEB (for Debian, Ubuntu, ...). + # To build a debian package, you need first # With Ubuntu 12.04 # apt-get install debhelper dpkg-source gpg lintian git-buildpackage pkg-php-tools schroot sbuild @@ -14,17 +15,42 @@ with format .DEB (for Debian, Ubuntu, ...). # apt-get install debhelper dpkg gnupg lintian git-buildpackage pkg-php-tools schroot sbuild -# This is standard command to work on Debian packaging: -# -# gpg --gen-key Generate a GPG key (-> pubring.gpg + secring.gpg) -# +# To generate gpg key for email used into changelog +* Check your existing keys/emails +> gpg --list-key +* Generate a new one, if none exists for email you use as author +> gpg --gen-key Generate a GPG key (-> pubring.gpg + secring.gpg) +Files are saved int .gnupg directory +* Create a file ~/.gpb.conf by +> cat >~/.gbp.conf < sudo sbuild-createchroot --keyring= unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian @@ -70,44 +101,29 @@ Puis pour se connecter > schroot -To create a gpg key for email used into changelog -Check your existing keys/emails -> gpg --list-key -Generate a new one -> gpg --gen-key -Files are saved int .gnupg directory - -To use Alioth.debian.org -* Create a login -* Setup your ssh as described into page: http://wiki.debian.org/Alioth/SSH -* Ask to be included into project collab-maint: http://alioth.debian.org/projects/collab-maint/ +########################################################## To update tcpdf package: * You can git clone tcpdf > git clone git.debian.org:/git/collab-maint/tcpdf.git [tcpdf-debian] +or better +> mkdir gitdebian +> cd gitdebian +> gbp-clone git.debian.org:/git/collab-maint/tcpdf.git + +* You can then create a PHP project from Eclipse called tcpdf-debian +from git clone dir and make link to git. + +* If local branch upstream and pristine-tar does not exists, create it +from origin/upstream and origin/pristine. * Into root dir, launch: > debian/get-orig-source.sh -* Créer un fichier ~/.gpb.conf par -> cat >~/.gbp.conf < git-import-orig -vv ../tcpdf_6.0.020+dfsg.orig.tar.xz +> git-import-orig -vv ../tcpdf_x.y.z+dfsg.orig.tar.xz Note: If there was errors managed manually, you may need to make a git commit @@ -135,8 +151,20 @@ http://packages.qa.debian.org/t/tcpdf.html * Package will be into release when test will be moved as stable. +########################################################## + To update dolibarr debian package * You can git clone debian git repo -git.debian.org:/git/collab-maint/dolibarr.git +> git clone git.debian.org:/git/collab-maint/dolibarr.git [dolibarr-debian] +or better +> mkdir gitdebian +> cd gitdebian +> gbp-clone git.debian.org:/git/collab-maint/dolibarr.git + +* You can then create a PHP project from Eclipse called dolibarr-debian +from git clone dir and make link to git. + +* If local branch upstream and pristine-tar does not exists, create it +from origin/upstream and origin/pristine. From d4e62805ef1810c26bc6643f743a3eba1273a513 Mon Sep 17 00:00:00 2001 From: simnandez Date: Thu, 5 Sep 2013 16:13:30 +0200 Subject: [PATCH 13/13] Fix: service to expire instead invoice unpayed --- scripts/contracts/email_expire_services_to_customers.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/contracts/email_expire_services_to_customers.php b/scripts/contracts/email_expire_services_to_customers.php index 83f71d7e65d..458f0989bb2 100755 --- a/scripts/contracts/email_expire_services_to_customers.php +++ b/scripts/contracts/email_expire_services_to_customers.php @@ -196,8 +196,8 @@ if ($resql) } } else - { - print "No unpaid invoices found\n"; + { + print "No services to expire found\n"; } exit(0); @@ -261,7 +261,7 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang,$oldtarget,$durati $allmessage.=$conf->global->SCRIPT_EMAIL_EXPIRE_SERVICES_CUSTOMERS_HEADER; } else - { + { $allmessage.= "Dear customer".($usehtml?"
\n":"\n").($usehtml?"
\n":"\n"); $allmessage.= "Please, find a summary of the services contracted by you that are about to expire.".($usehtml?"
\n":"\n").($usehtml?"
\n":"\n"); }