From 3dea1fd68f1d09990c635bce5c67e5618c32a011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 18 Nov 2014 22:53:39 +0100 Subject: [PATCH 01/16] #1695 SQL error on task creation --- htdocs/projet/tasks.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index eaec5ae0816..f89a7e3398f 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -300,7 +300,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third print ''; print ''.$langs->trans("AffectedTo").''; - $contactsofproject=$object->getListContactId('internal'); + $contactsofproject=(! empty($object->id)?$object->getListContactId('internal'):''); $form->select_users($user->id,'userid',0,'',0,'',$contactsofproject); print ''; From 93ed5875d3e8060dbac84936632894d3184a6d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 19 Nov 2014 15:50:18 +0100 Subject: [PATCH 02/16] #1650 Can't display supplier products in it's card I think error is in sql request for last supplier invoice list because there is no sql request in supplier products To avoid error in mysql strict mode sql-mode="STRICT_ALL_TABLES,ONLY_FULL_GROUP_BY,NO_ZERO_DATE" --- htdocs/fourn/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 1f7f7fc079d..3e234af68cd 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -400,7 +400,7 @@ if ($object->fetch($id)) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON f.rowid=pf.fk_facturefourn'; $sql.= ' WHERE f.fk_soc = '.$object->id; $sql.= " AND f.entity =".$conf->entity; - $sql.= ' GROUP BY f.rowid,f.libelle,f.ref_supplier,f.fk_statut,f.datef,f.total_ttc,f.paye'; + $sql.= ' GROUP BY f.rowid,f.libelle,f.ref,f.ref_supplier,f.fk_statut,f.datef,f.total_ttc,f.paye'; $sql.= ' ORDER BY f.datef DESC'; $resql=$db->query($sql); if ($resql) From 22640092479ef86029a93324df3dc68a05792cd9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 11:24:06 +0100 Subject: [PATCH 03/16] Fix: css --- htdocs/theme/eldy/style.css.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 9f4e6abe24c..5ac8a76fb53 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1976,18 +1976,6 @@ div.tabBar .noborder { * Boxes */ -.tdboxstats { - - background: -o-linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - background: -ms-linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - background: linear-gradient(bottom, rgb() 85%, rgb() 120%) !important; - - background: #ffffff !important; - -} - .boxstats { margin: 3px; From 76b8ff9416cee8034f275d37943b05765edf4118 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 11:34:43 +0100 Subject: [PATCH 04/16] Fix: css --- htdocs/public/demo/index.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 5c2efc4a0ac..8ee00d83515 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -259,9 +259,7 @@ color: #444444 !important; margin: 8px 0px 8px 2px; -border-left: 1px solid #DDD; -border-right: 1px solid #DDD; -border-bottom: 1px solid #EEE; +border: 1px solid #bbb; border-radius: 8px; -moz-border-radius: 8px; @@ -269,11 +267,7 @@ border-radius: 8px; -webkit-box-shadow: 4px 4px 4px #EEE; box-shadow: 4px 4px 4px #EEE; -background-image: linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); -background-image: -o-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); -background-image: -moz-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); -background-image: -webkit-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); -background-image: -ms-linear-gradient(bottom, rgb(246,248,250) 15%, rgb(235,235,238) 100%); +background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,255) 100%); } From ea02bdf85e902ec097f4e94cabbebe69200fd1b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 13:06:05 +0100 Subject: [PATCH 05/16] Fix: duplicate function --- htdocs/core/class/extrafields.class.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index a4396624f86..30c97e9f1ef 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -510,17 +510,6 @@ class ExtraFields } - /** - * Load array of labels - * - * @return void - */ - function fetch_optionals() - { - $this->fetch_name_optionals_label(); - } - - /** * Load array this->attribute_xxx like attribute_label, attribute_type, ... * @@ -528,7 +517,7 @@ class ExtraFields * @param boolean $forceload Force load of extra fields whatever is option MAIN_EXTRAFIELDS_DISABLED * @return array Array of attributes for all extra fields */ - function fetch_name_optionals_label($elementtype='adherent',$forceload=false) + function fetch_name_optionals_label($elementtype,$forceload=false) { global $conf; From d462facf6d8a71d541a6d5826543ff30ffc6fae5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 14:44:49 +0100 Subject: [PATCH 06/16] Fixed: [ bug #1653 ] Can't access task notes --- htdocs/core/class/commonobject.class.php | 12 ++++++++---- htdocs/projet/card.php | 2 +- htdocs/projet/tasks/note.php | 6 +++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 98bee3e052c..87ee2f1a1d2 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -601,18 +601,22 @@ abstract class CommonObject /** * Load the third party of object, from id $this->socid or $this->fk_soc, into this->thirdparty * - * @return int <0 if KO, >0 if OK + * @param int $force_thirdparty_id Force thirdparty id + * @return int <0 if KO, >0 if OK */ - function fetch_thirdparty() + function fetch_thirdparty($force_thirdparty_id=0) { global $conf; - if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty)) return 0; + if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty) && empty($force_thirdparty_id)) return 0; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + $idtofetch=isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty); + if ($force_thirdparty_id) $idtofetch=$force_thirdparty_id; + $thirdparty = new Societe($this->db); - $result=$thirdparty->fetch(isset($this->socid)?$this->socid:(isset($this->fk_soc)?$this->fk_soc:$this->fk_thirdparty)); + $result=$thirdparty->fetch($idtofetch); $this->client = $thirdparty; // deprecated $this->thirdparty = $thirdparty; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index df67d9d8fa1..f60d56cb633 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -260,7 +260,7 @@ if (empty($reshook)) { $db->commit(); - if (GETPOST('socid','int') > 0) $object->thirdparty->fetch(GETPOST('socid','int')); + if (GETPOST('socid','int') > 0) $object->fetch_thirdparty(GETPOST('socid','int')); else unset($object->thirdparty); } } diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 04e92c7c7f2..30e6c3fe291 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -51,7 +51,7 @@ if ($id > 0 || ! empty($ref)) if ($object->fetch($id,$ref) > 0) { $projectstatic->fetch($object->fk_project); - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + if (! empty($projectstatic->socid)) $projectstatic->fetch_thirdparty(); $object->project = dol_clone($projectstatic); } @@ -134,7 +134,7 @@ if ($object->id > 0) // Company print ''.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); + if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; print ''; @@ -196,7 +196,7 @@ if ($object->id > 0) // Third party print ''.$langs->trans("ThirdParty").''; - if ($projectstatic->societe->id > 0) print $projectstatic->societe->getNomUrl(1); + if ($projectstatic->thirdparty->id > 0) print $projectstatic->thirdparty->getNomUrl(1); else print' '; print ''; } From 0f5203b384ef0639ca68dbafed805481c318331f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 15:08:13 +0100 Subject: [PATCH 07/16] Edit vat --- htdocs/admin/dict.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 4d33723a947..72b7c8fe549 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -453,8 +453,8 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) $ok=1; foreach ($listfield as $f => $value) { + if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryVAT','DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory if ($value == 'country' && in_array($tablib[$id],array('DictionaryCanton','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory - if ($value == 'country_id' && in_array($tablib[$id],array('DictionaryRegion','DictionaryCompanyType'))) continue; // For some pages, country is not mandatory if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue; if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; if ($value == 'color' && empty($_POST['color'])) continue; @@ -1361,14 +1361,18 @@ function fieldList($fieldlist,$obj='',$tabname='') continue; } // For state page, we do not show the country input (we link to region, not country) print ''; - print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), 'country', '', 28); + $fieldname='country'; + print $form->select_country((! empty($obj->country_code)?$obj->country_code:(! empty($obj->country)?$obj->country:'')), $fieldname, '', 28); print ''; } elseif ($fieldlist[$field] == 'country_id') { - $country_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0); - print ''; - print ''; - print ''; + if (! in_array('country',$fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) + { + $country_id = (! empty($obj->$fieldlist[$field]) ? $obj->$fieldlist[$field] : 0); + print ''; + print ''; + print ''; + } } elseif ($fieldlist[$field] == 'region') { print ''; From 95de38e102aef3f21bb060ba9d54c0411247f43c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 15:32:10 +0100 Subject: [PATCH 08/16] =?UTF-8?q?Start=20to=20fix=20[=20bug=20#1711=20]=20?= =?UTF-8?q?Projet=20clotur=C3=A9=20toujours=20visible=20dans=20les=20autre?= =?UTF-8?q?s=20module=20pour=20affectation=20but=20it=20is=20a=20too=20imp?= =?UTF-8?q?ortant=20change.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/html.form.class.php | 9 ++++----- htdocs/core/class/html.formprojet.class.php | 11 +++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ba597dd4d57..99529fec524 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3102,7 +3102,7 @@ class Form * @param string $htmlname Name of select field * @return void */ - function form_project($page, $socid, $selected='', $htmlname='projectid') + function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0) { global $langs; @@ -3119,8 +3119,7 @@ class Form print ''; print ''; print ''; print ''; print '
'; - //print "$socid,$selected,$htmlname"; - $formproject->select_projects($socid,$selected,$htmlname); + $formproject->select_projects($socid,$selected,$htmlname,20,0,1,$discard_closed); print '
'; @@ -4103,7 +4102,7 @@ class Form if ($value_as_key) $array=array_combine($array, $array); $out=''; - + // Add code for jquery to use multiselect if (empty($conf->dol_use_jmobile) && (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) { @@ -4116,7 +4115,7 @@ class Form }); '; } - + $out.=''; @@ -4182,13 +4182,13 @@ class Form // Add code for jquery to use multiselect if (! empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { - $tmpplugin=empty($conf->global->MAIN_USE_JQUERY_MULTISELECT)?constant('REQUIRE_JQUERY_MULTISELECT'):$conf->global->MAIN_USE_JQUERY_MULTISELECT; - print ' - '; } From b644075faae980139baa46d2b3f73d8c42f4cc98 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Nov 2014 23:41:58 +0100 Subject: [PATCH 10/16] Fix: doxygen --- htdocs/core/class/html.form.class.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ae46a33d31c..a4d491683b5 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3096,10 +3096,11 @@ class Form /** * Show a form to select a project * - * @param int $page Page - * @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) - * @param int $selected Id pre-selected project - * @param string $htmlname Name of select field + * @param int $page Page + * @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id) + * @param int $selected Id pre-selected project + * @param string $htmlname Name of select field + * @param int $discard_closed Hide all closed projects * @return void */ function form_project($page, $socid, $selected='', $htmlname='projectid', $discard_closed=0) From 32f4db259cdbcd3cc41e07cfbbb43b3537728652 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 21 Nov 2014 23:39:02 +0100 Subject: [PATCH 11/16] Fix: [ bug #1651 ] Can't display margins in thirdparty card --- htdocs/margin/tabs/thirdpartyMargins.php | 30 +++++++++--------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index cc7a5fb1c75..144246f154a 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -128,10 +128,10 @@ if ($socid > 0) $sql = "SELECT distinct s.nom, s.rowid as socid, s.code_client,"; $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht,"; - $sql.= " f.datef, f.paye, f.fk_statut as statut,"; - $sql.= " sum(d.total_ht) as selling_price,"; - $sql.= " ".$db->ifsql('f.type =2','sum(d.qty * d.buy_price_ht *-1)','sum(d.qty * d.buy_price_ht)')." as buying_price,"; - $sql.= " ".$db->ifsql('f.type =2','sum(-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty)))','sum(d.total_ht - (d.buy_price_ht * d.qty))')." as marge"; + $sql.= " f.datef, f.paye, f.fk_statut as statut, f.type,"; + $sql.= " sum(d.total_ht) as selling_price,"; // may be negative or positive + $sql.= " sum(d.qty * d.buy_price_ht) as buying_price,"; // always positive + $sql.= " sum(abs(d.total_ht) - (d.buy_price_ht * d.qty)) as marge"; // always positive $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= ", ".MAIN_DB_PREFIX."facturedet as d"; @@ -140,9 +140,9 @@ if ($socid > 0) $sql.= " AND s.entity = ".$conf->entity; $sql.= " AND d.fk_facture = f.rowid"; $sql.= " AND f.fk_soc = $socid"; - $sql .= " AND d.buy_price_ht IS NOT NULL"; + $sql.= " AND d.buy_price_ht IS NOT NULL"; if (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1) $sql .= " AND d.buy_price_ht <> 0"; - $sql.= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut"; + $sql.= " GROUP BY s.nom, s.rowid, s.code_client, f.rowid, f.facnumber, f.total, f.datef, f.paye, f.fk_statut, f.type"; $sql.= " ORDER BY ".$sortfield." ".$sortorder; // TODO: calculate total to display then restore pagination //$sql.= $db->plimit($conf->liste_limit +1, $offset); @@ -153,7 +153,7 @@ if ($socid > 0) { $num = $db->num_rows($result); - print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&socid=$societe->id",$sortfield,$sortorder,'',0,0,''); + print_barre_liste($langs->trans("MarginDetails"),$page,$_SERVER["PHP_SELF"],"&socid=".$societe->id,$sortfield,$sortorder,'',0,0,''); $i = 0; print ""; @@ -183,16 +183,8 @@ if ($socid > 0) { $objp = $db->fetch_object($result); - if ($objp->marge < 0) - { - $marginRate = ($objp->buying_price != 0)?-1*(100 * $objp->marge / $objp->buying_price):'' ; - $markRate = ($objp->selling_price != 0)?-1*(100 * $objp->marge / $objp->selling_price):'' ; - } - else - { - $marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ; - $markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ; - } + $marginRate = ($objp->buying_price != 0)?(100 * $objp->marge / $objp->buying_price):'' ; + $markRate = ($objp->selling_price != 0)?(100 * $objp->marge / $objp->selling_price):'' ; $var=!$var; @@ -205,7 +197,7 @@ if ($socid > 0) print ""; print "\n"; - print "\n"; + print "\n"; print "\n"; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) print "\n"; @@ -214,7 +206,7 @@ if ($socid > 0) print ''; print "\n"; $i++; - $cumul_achat += $objp->buying_price; + $cumul_achat += (($objp->type == 2 ? -1 : 1) * $objp->buying_price); $cumul_vente += $objp->selling_price; } } From ce98036725d920b79f1e9ac01f9bf884135c7ddf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 21 Nov 2014 23:45:56 +0100 Subject: [PATCH 12/16] Fixed: [ bug #1648 ] Can't see turnover report by product/services --- htdocs/compta/stats/cabyprodserv.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index e995ee45d54..8263dc76cb8 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -132,6 +132,8 @@ $tableparams = array_merge($commonparams, $tableparams); foreach($allparams as $key => $value) { $paramslink .= '&' . $key . '=' . $value; } + + /* * View */ @@ -174,12 +176,12 @@ report_header($nom,$nomlink,$period,$periodlink,$description,$builddate,$exportl // SQL request $catotal=0; -if ($modecompta == 'CREANCES-DETTES') +if ($modecompta == 'CREANCES-DETTES') { $sql = "SELECT DISTINCT p.rowid as rowid, p.ref as ref, p.label as label,"; $sql.= " sum(l.total_ht) as amount, sum(l.total_ttc) as amount_ttc"; $sql.= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as l, ".MAIN_DB_PREFIX."product as p"; - if ($selected_cat === -2) // Without any category + if ($selected_cat === -2) // Without any category { $sql.= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; } @@ -198,7 +200,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($date_start && $date_end) { $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; } - if ($selected_cat === -2) // Without any category + if ($selected_cat === -2) // Without any category { $sql.=" AND cp.fk_product is null"; } @@ -209,7 +211,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql.= " AND cp.fk_categorie = c.rowid AND cp.fk_product = p.rowid"; } $sql.= " AND f.entity = ".$conf->entity; - $sql.= " GROUP BY p.rowid"; + $sql.= " GROUP BY p.rowid, p.ref, p.label"; $sql.= " ORDER BY p.ref"; dol_syslog("cabyprodserv", LOG_DEBUG); @@ -390,7 +392,7 @@ if ($modecompta == 'CREANCES-DETTES') // $modecompta != 'CREANCES-DETTES' // "Calculation of part of each product for accountancy in this mode is not possible. When a partial payment (for example 5 euros) is done on an // invoice with 2 product (product A for 10 euros and product B for 20 euros), what is part of paiment for product A and part of paiment for product B ? - // Because there is no way to know this, this report is not relevant. + // Because there is no way to know this, this report is not relevant. print '
'.$langs->trans("TurnoverPerProductInCommitmentAccountingNotRelevant") . '
'; } From 5acdce0b9f45700dc3a0b267203af08d2c19261d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 21 Nov 2014 23:52:12 +0100 Subject: [PATCH 13/16] Fixed: [ bug #1647 ] Can't list tax payments --- htdocs/compta/tva/reglement.php | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index 8babbd58f7d..ebba3888004 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -97,7 +97,6 @@ if ($filtre) { if ($typeid) { $sql .= " AND t.fk_typepayment=".$typeid; } -$sql.= " GROUP BY t.rowid, t.fk_typepayment, t.amount, t.datev, t.label"; $sql.= $db->order($sortfield,$sortorder); $sql.= $db->plimit($limit+1,$offset); @@ -111,7 +110,7 @@ if ($result) $param=''; if ($typeid) $param.='&typeid='.$typeid; - + print_barre_liste($langs->trans("VATPayments"),$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$totalnboflines); print '
'; @@ -125,7 +124,7 @@ if ($result) print_liste_field_titre($langs->trans("PayedByThisPayment"),$_SERVER["PHP_SELF"],"t.amount","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre(""); print "\n"; - + print '
'; print ''; print ''; @@ -138,21 +137,21 @@ if ($result) print '\n"; - + while ($i < min($num,$limit)) { $obj = $db->fetch_object($result); $var=!$var; - + if ($obj->payment_code <> '') { - $type = ''; + $type = ''; } else { $type = ''; } - + print ""; $tva_static->id=$obj->rowid; @@ -172,12 +171,12 @@ if ($result) } print ''; print ""; - print ""; + print ""; print "
"; print dol_print_date($db->jdate($objp->datef),'day')."".price($objp->selling_price, null, null, null, null, $rounding)."".price($objp->buying_price, null, null, null, null, $rounding)."".price(($objp->type == 2 ? -1 : 1) * $objp->buying_price, null, null, null, null, $rounding)."".price($objp->marge, null, null, null, null, $rounding)."".(($marginRate === '')?'n/a':price($marginRate, null, null, null, null, $rounding)."%")."'.$invoicestatic->LibStatut($objp->paye,$objp->statut,5).'
'; print ''; print "
'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.' 
'.$langs->trans("Total").'".price($total)." 
 
"; - + print ''; - + $db->free($result); } else @@ -186,6 +185,6 @@ else } -$db->close(); - llxFooter(); + +$db->close(); From 95d7dc484104f57a189ce667df3904bfb7f9c407 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 00:08:06 +0100 Subject: [PATCH 14/16] Fixed: [ bug #1565 ] Customer order label for status 2 is not coherent in french --- htdocs/commande/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index ea17d895b95..b152a38db02 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -229,7 +229,7 @@ if ($resql) if ($viewstatut == 1) $title.=' - '.$langs->trans('StatusOrderValidatedShort'); if ($viewstatut == 2) - $title.=' - '.$langs->trans('StatusOrderOnProcessShort'); + $title.=' - '.$langs->trans('StatusOrderSentShort'); if ($viewstatut == 3) $title.=' - '.$langs->trans('StatusOrderToBillShort'); if ($viewstatut == 4) @@ -295,7 +295,7 @@ if ($resql) print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Status'),$_SERVER["PHP_SELF"],'c.fk_statut','',$param,'align="right"',$sortfield,$sortorder); print ''; - + print ''; print ''; print ''; From 068c7fdb2d7e4bb788d15cc89d5afce5d5c6267b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 00:31:19 +0100 Subject: [PATCH 15/16] Fixed: [ bug #1635 ] le tiers n'apparait plus sur la fiche tache --- htdocs/projet/tasks/contact.php | 4 ++-- htdocs/projet/tasks/document.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index da002ef72d2..efec0f68223 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -188,7 +188,7 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("Label").''.$projectstatic->title.''; print ''.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->thridparty->id)) print $projectstatic->thridparty->getNomUrl(1); + if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; print ''; @@ -259,7 +259,7 @@ if ($id > 0 || ! empty($ref)) // Customer print "".$langs->trans("ThirdParty").""; print ''; - if ($projectstatic->thridparty->id > 0) print $projectstatic->thridparty->getNomUrl(1); + if ($projectstatic->thirdparty->id > 0) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; } diff --git a/htdocs/projet/tasks/document.php b/htdocs/projet/tasks/document.php index 03ca7bae452..e75278e9631 100644 --- a/htdocs/projet/tasks/document.php +++ b/htdocs/projet/tasks/document.php @@ -121,7 +121,7 @@ llxHeader('',$langs->trans('Task')); if ($object->id > 0) { - if (! empty($projectstatic->socid)) $projectstatic->societe->fetch($projectstatic->socid); + $projectstatic->fetch_thirdparty(); $userWrite = $projectstatic->restrictedProjectArea($user,'write'); @@ -152,7 +152,7 @@ if ($object->id > 0) print ''.$langs->trans("Label").''.$projectstatic->title.''; print ''.$langs->trans("ThirdParty").''; - if (! empty($projectstatic->societe->id)) print $projectstatic->societe->getNomUrl(1); + if (! empty($projectstatic->thirdparty->id)) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; print ''; @@ -225,7 +225,7 @@ if ($object->id > 0) // Third party print ''.$langs->trans("ThirdParty").''; - if ($projectstatic->societe->id) print $projectstatic->societe->getNomUrl(1); + if ($projectstatic->thirdparty->id) print $projectstatic->thirdparty->getNomUrl(1); else print ' '; print ''; } From a2d4046f50b0d0f9f26becffa8eeb336c5288673 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 22 Nov 2014 00:45:04 +0100 Subject: [PATCH 16/16] Fixed: Untranslatable tokens --- htdocs/admin/salaries.php | 10 +++++----- htdocs/langs/en_US/admin.lang | 3 ++- htdocs/langs/en_US/donations.lang | 5 +++++ htdocs/langs/en_US/paybox.lang | 3 +++ htdocs/langs/en_US/resource.lang | 2 ++ 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index d7027d8a1dd..99651a4f4f3 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -23,7 +23,7 @@ */ require '../main.inc.php'; - + // Class require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; @@ -45,7 +45,7 @@ $list = array ( /* * Actions */ - + if ($action == 'update') { $error = 0; @@ -72,12 +72,12 @@ if ($action == 'update') * View */ -llxHeader(); +llxHeader('',$langs->trans('SalariesSetup')); $form = new Form($db); $linkback=''.$langs->trans("BackToModuleList").''; -print_fiche_titre($langs->trans('ConfigSalaries'),$linkback,'setup'); +print_fiche_titre($langs->trans('SalariesSetup'),$linkback,'setup'); print '
'; print ''; @@ -98,7 +98,7 @@ foreach ($list as $key) print ''; // Param - $label = $langs->trans($key); + $label = $langs->trans($key); print ''; // Value diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 720da83ccfd..1eeb5a7f443 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1546,6 +1546,7 @@ NbSpeMin=Minimum number of special characters NbSpeMin=Minimum number of special characters NbIteConsecutive=Maximum number of repeating same characters NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation - +SalariesSetup=Setup of module salaries +SortOrder=Sort order Format=Format TypePaymentDesc=0:Customer payment type, 1:Supplier payment type, 2:Both customers and suppliers payment type diff --git a/htdocs/langs/en_US/donations.lang b/htdocs/langs/en_US/donations.lang index 85dfdd8ff4d..02795052fe5 100644 --- a/htdocs/langs/en_US/donations.lang +++ b/htdocs/langs/en_US/donations.lang @@ -31,3 +31,8 @@ DonationRecipient=Donation recipient ThankYou=Thank You IConfirmDonationReception=The recipient declare reception, as a donation, of the following amount MinimumAmount=Minimum amount is %s +FreeTextOnDonations=Free text to show in footer +FrenchOptions=Options for France +DONATION_ART200=Show legacy article 200 +DONATION_ART238=Show legacy article 238 +DONATION_ART885=Show legacy article 885 \ No newline at end of file diff --git a/htdocs/langs/en_US/paybox.lang b/htdocs/langs/en_US/paybox.lang index aa0040afdc8..4e6798a21b6 100644 --- a/htdocs/langs/en_US/paybox.lang +++ b/htdocs/langs/en_US/paybox.lang @@ -35,3 +35,6 @@ MessageKO=Message on canceled payment return page NewPayboxPaymentReceived=New Paybox payment received NewPayboxPaymentFailed=New Paybox payment tried but failed PAYBOX_PAYONLINE_SENDEMAIL=EMail to warn after a payment (success or failed) +PAYBOX_PBX_SITE=Value for PBX SITE +PAYBOX_PBX_RANG=Value for PBX Rang +PAYBOX_PBX_IDENTIFIANT=Value for PBX ID \ No newline at end of file diff --git a/htdocs/langs/en_US/resource.lang b/htdocs/langs/en_US/resource.lang index e0a767cc58a..3fbe6e4fb23 100755 --- a/htdocs/langs/en_US/resource.lang +++ b/htdocs/langs/en_US/resource.lang @@ -34,4 +34,6 @@ ConfirmDeleteResource=Confirm to delete this resource RessourceSuccessfullyDeleted=Resource successfully deleted DictionaryResourceType=Type of resources +DictionaryEMailTemplates=Modèles d'Emails + SelectResource=Select resource