From dd2e43754ef894aa04cce2fbc3b8f0e564c404bc Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 2 Aug 2016 06:02:01 +0200 Subject: [PATCH 01/13] Uniformize presentation in Thirdparty --- htdocs/margin/tabs/thirdpartyMargins.php | 5 ++++- htdocs/societe/note.php | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index 29bdd16b21e..1d4d1f8f0ca 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -50,6 +50,7 @@ if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="f.datef"; $object = new Societe($db); +if ($socid > 0) $object->fetch($socid); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('thirdpartymargins','globalcard')); @@ -72,8 +73,10 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e $invoicestatic=new Facture($db); $form = new Form($db); +$title=$langs->trans("ThirdParty").' - '.$langs->trans("Margins"); +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Files"); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$langs->trans("ThirdParty").' - '.$langs->trans("Margins"),$help_url); +llxHeader('',$title,$help_url); if ($socid > 0) { diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 156a4620634..5c9bc15328f 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -57,8 +57,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, $form = new Form($db); +$title=$langs->trans("ThirdParty").' - '.$langs->trans("Notes"); +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name.' - '.$langs->trans("Files"); $help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('',$langs->trans("ThirdParty").' - '.$langs->trans("Notes"),$help_url); +llxHeader('',$title,$help_url); if ($id > 0) { From f232ae9160c5804faca5c8768ecee45739d2a354 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 2 Aug 2016 07:47:15 +0200 Subject: [PATCH 02/13] Fix Expense report | VAT disable in Dolibarr, traduction of code_libelle & presentation --- htdocs/expensereport/card.php | 28 +++++++++++++++++----------- htdocs/expensereport/info.php | 2 +- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index 25688bf6e6e..df2fe11bfbd 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * * 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 @@ -831,6 +831,7 @@ if ($action == "addline" && $user->rights->expensereport->creer) $object_ligne = new ExpenseReportLine($db); + $vatrate = GETPOST('vatrate'); $object_ligne->comments = GETPOST('comments'); $qty = GETPOST('qty','int'); if (empty($qty)) $qty=1; @@ -843,10 +844,13 @@ if ($action == "addline" && $user->rights->expensereport->creer) $object_ligne->fk_c_type_fees = GETPOST('fk_c_type_fees'); - $object_ligne->fk_c_tva = GETPOST('fk_c_tva'); + // if VAT is not used in Dolibarr, set VAT rate to 0 because VAT rate is necessary. + if (empty($vatrate)) $vatrate = "0.000"; + $object_ligne->vatrate = price2num($vatrate); $object_ligne->fk_projet = $fk_projet; + if (! GETPOST('fk_c_type_fees') > 0) { @@ -854,10 +858,11 @@ if ($action == "addline" && $user->rights->expensereport->creer) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); $action=''; } - if (GETPOST('vatrate') < 0 || GETPOST('vatrate') == '') + + if ($vatrate < 0 || $vatrate == '') { $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Vat")), null, 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("VAT")), null, 'errors'); $action=''; } @@ -1096,7 +1101,7 @@ if ($action == 'create') print ''; print ''; print ''; - print ''; + print ''; print ''; @@ -1211,7 +1216,7 @@ else $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''; @@ -1374,7 +1379,7 @@ else $linkback = ''.$langs->trans("BackToList").''; // Ref - print ''; @@ -1683,7 +1688,8 @@ else } print ''; } - print ''; + // print ''; + print ''; print ''; print ''; print ''; @@ -1789,7 +1795,7 @@ else print ''; if (! empty($conf->projet->enabled)) print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -1807,7 +1813,7 @@ else // Select project if (! empty($conf->projet->enabled)) { - print ''; } @@ -1818,7 +1824,7 @@ else print ''; // Add comments - print ''; diff --git a/htdocs/expensereport/info.php b/htdocs/expensereport/info.php index b4302631c78..a5a3c830975 100644 --- a/htdocs/expensereport/info.php +++ b/htdocs/expensereport/info.php @@ -40,7 +40,7 @@ $result = restrictedArea($user, 'expensereport', $id, ''); * View */ -llxHeader(); +llxHeader('', $langs->trans("ExpenseReport")); if ($id) { From 88dcb279813aa5aa36beb04409b20224040bf2f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2016 21:24:14 +0200 Subject: [PATCH 03/13] Fix option not visible when it should --- htdocs/admin/fckeditor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index e244941ff58..3cb111c4d53 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -56,7 +56,7 @@ $conditions = array( 'SOCIETE' => 1, 'PRODUCTDESC' => (! empty($conf->product->enabled) || ! empty($conf->service->enabled)), 'MAILING' => ! empty($conf->mailing->enabled), -'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)), +'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->supplier_proposal->enabled) || ! empty($conf->fournisseur->enabled)), 'USERSIGN' => 1, 'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)) ); From 216ec6ac4bc2ef5fb7b07dd900f2f5ddb0fd64e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 2 Aug 2016 23:33:31 +0200 Subject: [PATCH 04/13] Label week too long with some language --- htdocs/langs/en_US/main.lang | 1 + htdocs/projet/activity/perweek.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index bb8ffeb6b4f..150abc1b4b8 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -256,6 +256,7 @@ DurationDays=days Year=Year Month=Month Week=Week +WeekShort=Week Day=Day Hour=Hour Minute=Minute diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 53b9ba151b4..4a4a0a27713 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -291,7 +291,7 @@ $param=($mode?'&mode='.$mode:''); // Show navigation bar $nav ="".img_previous($langs->trans("Previous"))."\n"; -$nav.=" ".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("Week")." ".$week." \n"; +$nav.=" ".dol_print_date(dol_mktime(0,0,0,$first_month,$first_day,$first_year),"%Y").", ".$langs->trans("WeekShort")." ".$week." \n"; $nav.="".img_next($langs->trans("Next"))."\n"; $nav.="   (".$langs->trans("Today").")"; $nav.='
'.$form->select_date(-1,'',0,0,2,"addtime",1,0,1).' '; From 6ae8d26a89bc6d5a748c8683504276d2ecaf4bfa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Aug 2016 00:04:38 +0200 Subject: [PATCH 05/13] Fix max width on combo of tasks --- htdocs/core/class/html.formprojet.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index a588fc8f241..4c4c1486d51 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -149,7 +149,7 @@ class FormProjets $resql=$this->db->query($sql); if ($resql) { - $minmax=''; + $minmax='maxwidth500'; // Use select2 selector $nodatarole=''; @@ -314,7 +314,7 @@ class FormProjets $resql=$this->db->query($sql); if ($resql) { - $minmax=''; + $minmax='maxwidth500'; // Use select2 selector $nodatarole=''; @@ -324,7 +324,7 @@ class FormProjets $comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus); $out.=$comboenhancement; $nodatarole=($comboenhancement?' data-role="none"':''); - $minmax='minwidth200'; + $minmax='minwidth200 maxwidth500'; } if (empty($option_only)) { From abbe204c97fb644aa0381e1a41d53491e219d08d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Aug 2016 01:42:05 +0200 Subject: [PATCH 06/13] Fix design of option PROJECT_ADD_SUBTOTAL_LINES --- htdocs/fourn/class/fournisseur.commande.class.php | 2 ++ htdocs/fourn/commande/card.php | 3 ++- htdocs/projet/element.php | 2 +- htdocs/theme/eldy/style.css.php | 3 +++ htdocs/theme/md/style.css.php | 4 +++- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 306dfbbb9a7..5021061ec19 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1078,6 +1078,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ", note_public"; $sql.= ", entity"; $sql.= ", fk_soc"; + $sql.= ", fk_projet"; $sql.= ", date_creation"; $sql.= ", date_livraison"; $sql.= ", fk_user_author"; @@ -1099,6 +1100,7 @@ class CommandeFournisseur extends CommonOrder $sql.= ", '".$this->db->escape($this->note_public)."'"; $sql.= ", ".$conf->entity; $sql.= ", ".$this->socid; + $sql.= ", ".($this->fk_project > 0 ? $this->fk_project : "null"); $sql.= ", '".$this->db->idate($now)."'"; $sql.= ", ".($this->date_livraison?"'".$this->db->idate($this->date_livraison)."'":"null"); $sql.= ", ".$user->id; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 500b240fa16..afaff18734c 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -971,7 +971,8 @@ if (empty($reshook)) $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); $object->multicurrency_tx = GETPOST('originmulticurrency_tx', 'int'); - + $object->fk_project = GETPOST('projectid'); + // Fill array 'array_options' with data from add form if (! $error) { diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 85ffae8b4b6..80b9499ed9e 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -876,7 +876,7 @@ foreach ($listofreferent as $key => $value) if (canApplySubtotalOn($tablename)) { - $breakline='
'; + $breakline=''; $breakline.=''; $breakline.=''; // Date start @@ -510,7 +510,7 @@ if ($action == 'create' && $user->rights->projet->creer) // Opportunity status print ''; print ''; // Opportunity probability From caa987fb613c8643787e06e27029603ba7bc55b7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Aug 2016 10:13:27 +0200 Subject: [PATCH 09/13] Clean obsolete comment --- htdocs/fourn/facture/list.php | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 8ffd81c8ea4..574501276be 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -546,19 +546,7 @@ if ($resql) if (! empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'],$_SERVER["PHP_SELF"],"f.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder); if (! empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'],$_SERVER["PHP_SELF"],"fk_statut,paye","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch '); -/* - print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.ref,f.rowid","",$param,"",$sortfield,$sortorder); - if (empty($conf->global->SUPPLIER_INVOICE_HIDE_REF_SUPPLIER)) print_liste_field_titre($langs->trans("RefSupplier"),$_SERVER["PHP_SELF"],"ref_supplier","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef,f.rowid","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Label"),$_SERVER["PHP_SELF"],"f.libelle","",$param,"",$sortfield,$sortorder); - print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder); - if (! empty($conf->global->PROJECT_SHOW_REF_INTO_LISTS)) print_liste_field_titre($langs->trans("Project"),$_SERVER["PHP_SELF"],"p.ref","",$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountHT"),$_SERVER["PHP_SELF"],"f.total_ht","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye","",$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre('',$_SERVER["PHP_SELF"],"",'','','',$sortfield,$sortorder,'maxwidthsearch '); -*/ print "\n"; + print "\n"; // Line for filters From af150c35fc227fb5e4d2ee32437cdae9ce9d19b9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Aug 2016 10:19:30 +0200 Subject: [PATCH 10/13] Fix no picto on setup pages --- htdocs/admin/supplier_payment.php | 2 +- htdocs/projet/admin/project.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index bc960c7bd2c..b5732d1f1c9 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -94,7 +94,7 @@ dol_fiche_head($head, 'supplierpayment', $langs->trans("Suppliers"), 0, 'company if (empty($conf->global->SUPPLIER_PAYMENT_ADDON)) $conf->global->SUPPLIER_PAYMENT_ADDON = 'mod_supplier_payment_bronan'; -print load_fiche_titre($langs->trans("PaymentsNumberingModule")); +print load_fiche_titre($langs->trans("PaymentsNumberingModule"), '', ''); print '
'.$langs->trans("DateStart").''.$langs->trans("DateStart").''; $form->select_date($date_start?$date_start:-1,'date_debut',0,0,0,'',1,1); print '
'.$langs->trans("Ref").''; + print '
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
'.$langs->trans("Ref").''; + print '
'.$langs->trans("Ref").''; print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); print '
'.$langs->trans("TF_".strtoupper(empty($objp->type_fees_libelle)?'OTHER':$objp->type_fees_libelle)).''.$langs->trans("TF_".strtoupper(empty($objp->type_fees_libelle)?'OTHER':$objp->type_fees_libelle)).''.($langs->trans(($objp->type_fees_code)) == $objp->type_fees_code ? $objp->type_fees_libelle : $langs->trans(($objp->type_fees_code))).''.$objp->comments.''.vatrate($objp->vatrate,true).''.price($objp->value_unit).''.$langs->trans('Date').''.$langs->trans('Project').''.$langs->trans('Type').''.$langs->trans('Description').''.$langs->trans('Description').''.$langs->trans('VAT').''.$langs->trans('PriceUTTC').''.$langs->trans('Qty').''; + print ''; $formproject->select_projects(-1, $fk_projet, 'fk_projet', 0, 0, 1, 1); print ''; + print ''; print ''; print '
'; $breakline.=''; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 570dab7e959..092188f5616 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2760,6 +2760,9 @@ input.liste_titre { form.liste_total div { border-top: 1px solid #DDDDDD; } +tr.liste_sub_total, tr.liste_sub_total td { + border-bottom: 2px solid #aaa; +} .tableforservicepart1 .impair, .tableforservicepart1 .pair, .tableforservicepart2 .impair, .tableforservicepart2 .pair { background: #FFF; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 157beca791f..0a54d06b1ac 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2634,7 +2634,9 @@ input.liste_titre { padding: 4px; height: 20px; } - +tr.liste_sub_total, tr.liste_sub_total td { + border-bottom: 2px solid #aaa; +} .tableforservicepart1 .impair, .tableforservicepart1 .pair, .tableforservicepart2 .impair, .tableforservicepart2 .pair { background: #FFF; From 7c97bf900f26fdaf7c0b58477361d05e4fcd0d3d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 3 Aug 2016 20:52:50 +0200 Subject: [PATCH 07/13] Neutral colors --- htdocs/theme/eldy/img/puce.png | Bin 504 -> 223 bytes htdocs/theme/md/img/puce.png | Bin 193 -> 223 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/htdocs/theme/eldy/img/puce.png b/htdocs/theme/eldy/img/puce.png index 8c116b0dc4218939fcb62ee4087b2f2a353f6d03..55046304094972d0793a1d8d682c201037fafd00 100644 GIT binary patch delta 195 zcmeyte4lZGO1*1(>A_xJZn}AFP21!XtV`F0Fdh=fP-1cm_c}syE0Iru&0Y-2*>s0gaxt>9zIkIZBSxh Y&?sTZjV^6|1(as+boFyt=akR{07{5IGynhq literal 504 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3-p0EYEHRQs)DFLR<~Kq6~wQErX&ggR(87 zvMrN~or02`fMjyDQ#KH_cmYvyk5~1SpzPwH>N!CzK(sU}yE+O;_NzuvkmhQc_^w_<%$Iflt3j)Wk-8%;a*RGwr_x#+w_vfC! zzxMq3wde2e0l{++cn<{MA>jY_{~&Pc%Ss8L*IY}2{DQ#(6cP-Z-fgr18aUb0#W92< zn)P5bS5tsU+r{;d1NWpvIx2j55;5yPgOtNwk=CHDH~-&UyA{LuciPN7uNagJe3hSV zdREhvlTfwf*xkwJ&nI~|lxt}+UdUB3=+)6-NXTdEzHPPcnZ*)u!SJ*PlTOPjwQ@VG z+j2?ZMVZ>kNi!=qsyqFk%c#2fLU;;uWpvGwlr7Vf-C17!Dww`$**fnZ%ym*B!7NOT Rj6mlxc)I$ztaD0e0st>n9KQen diff --git a/htdocs/theme/md/img/puce.png b/htdocs/theme/md/img/puce.png index 9bd70dccb731658e40d16ba29f4c09174d35c5ec..55046304094972d0793a1d8d682c201037fafd00 100644 GIT binary patch literal 223 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3-p0EYEHRQmz3$A+G-!82$qxhyc+*qMiYW zAOwhR0x}sGBqb${jg5VLeA3d=>g(%g&YZbv)21_L&OCkk^#A|=eKS%n0u?cq1o;Is zI6S+N2I3@nySp%Su*!M>Ih+L^k;M!Q+`=Ht$S`Y;1W=H@#M9T6{Q(EFkTHYs9Cu}) tkg%tVV+hCfwJ?4sjygS@*6UV$`p=OU}W|`P`E>nNbW^*u1E}vst(w2g3%gran6&F1} sp;E6RlKqGGbkhXYo-;l?CVRdzXLGLK=BO9b1auRFr>mdKI;Vst0EEX)`Tzg` From da84fac390306ebe5f7c7cadc68c9df89b6b1fb3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Aug 2016 10:08:58 +0200 Subject: [PATCH 08/13] Fix: data were lost if creation failed --- htdocs/langs/en_US/projects.lang | 2 +- htdocs/projet/card.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index fe21b3558ba..8c23135ddbd 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -174,7 +174,7 @@ ProjectOpenedProjectByOppStatus=Open project/lead by opportunity status ProjectsStatistics=Statistics on projects/leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time -YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. +YouCanCompleteRef=If you want to complete the ref with some information (to use it as search filters), it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-ABC. You may also prefer to add search keys into label. But best practice may be to add a dedicated field, also called complementary attributes. OpenedProjectsByThirdparties=Open projects by thirdparties OnlyOpportunitiesShort=Only opportunities OpenedOpportunitiesShort=Open opportunities diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 1b43eb1dd39..dd111b62396 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -492,7 +492,7 @@ if ($action == 'create' && $user->rights->projet->creer) // Public print '
'.$langs->trans("Visibility").''; $array=array(0 => $langs->trans("PrivateProject"),1 => $langs->trans("SharedProject")); - print $form->selectarray('public',$array,$object->public); + print $form->selectarray('public',$array,GETPOST('public')?GETPOST('public'):(isset($conf->global->PROJECT_DEFAULT_PUBLIC)?$conf->global->PROJECT_DEFAULT_PUBLIC:$object->public)); print '
'.$langs->trans("OpportunityStatus").''; - print $formproject->selectOpportunityStatus('opp_status',$object->opp_status); + print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status')?GETPOST('opp_status'):$object->opp_status); print '
'; print ''; diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 5233832ea05..fca5eeb22f6 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011 Laurent Destailleur + * Copyright (C) 2011-2016 Laurent Destailleur * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2011-2015 Philippe Grand * Copyright (C) 2013 Florian Henry @@ -373,7 +373,7 @@ print '
'; * Projects Numbering model */ -print load_fiche_titre($langs->trans("ProjectsNumberingModules")); +print load_fiche_titre($langs->trans("ProjectsNumberingModules"), '', ''); print '
'; print ''; @@ -477,7 +477,7 @@ print '

'; if (empty($conf->global->PROJECT_HIDE_TASKS)) { // Task numbering module - print load_fiche_titre($langs->trans("TasksNumberingModules")); + print load_fiche_titre($langs->trans("TasksNumberingModules"), '', ''); print ''; print ''; @@ -583,7 +583,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) * Document templates generators */ -print load_fiche_titre($langs->trans("ProjectsModelModule")); +print load_fiche_titre($langs->trans("ProjectsModelModule"), '', ''); // Defini tableau def de modele $type='project'; @@ -742,7 +742,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) * Modeles documents for Task */ - print load_fiche_titre($langs->trans("TaskModelModule")); + print load_fiche_titre($langs->trans("TaskModelModule"), '', ''); // Defini tableau def de modele $type='project_task'; @@ -894,7 +894,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS)) } -print load_fiche_titre($langs->trans("Other")); +print load_fiche_titre($langs->trans("Other"), '', ''); // Other options $form=new Form($db); From 11ab49d85da58ac265018bff6f60f1903b421a29 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Aug 2016 10:27:19 +0200 Subject: [PATCH 11/13] Fix bad help --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 369dde1cf1c..8672056858b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -179,7 +179,7 @@ FeatureDisabledInDemo=Feature disabled in demo Rights=Permissions BoxesDesc=Widgets are components showing some information that you can add to personalize some pages. You can choose between showing the widget or not by selecting target page and clicking 'Activate', or by clicking the dustbin to disable it. OnlyActiveElementsAreShown=Only elements from enabled modules are shown. -ModulesDesc=Dolibarr modules define which functionality is enabled in software. Some modules require permissions you must grant to users, after enabling module. Click on button on/off in column "Status" to enable a module/feature. +ModulesDesc=Dolibarr modules define which functionality is enabled in software. Some modules require permissions you must grant to users, after enabling module. Click on button on/off to enable a module/feature. ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet... ModulesMarketPlaces=More modules... DoliStoreDesc=DoliStore, the official market place for Dolibarr ERP/CRM external modules From e0b9496f9e18568cf3d14bc1f9bbd53384bb6477 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Aug 2016 10:44:17 +0200 Subject: [PATCH 12/13] Fix link sometimes fails because of id not defined --- htdocs/core/class/html.form.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 61a999f7a04..2929044a858 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5312,6 +5312,7 @@ class Form $i = 0; print '
'; + print ''; print '
'; print ''; print ''; From 5247faf50f7a52c83063e13e0e2c20a33395349f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 4 Aug 2016 10:48:19 +0200 Subject: [PATCH 13/13] Fix align --- htdocs/expensereport/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index df2fe11bfbd..d3b25d2277f 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -1813,7 +1813,7 @@ else // Select project if (! empty($conf->projet->enabled)) { - print ''; }
'; + print ''; $formproject->select_projects(-1, $fk_projet, 'fk_projet', 0, 0, 1, 1); print '