From 4e1f9babaf4e8f823824371f67f9cb6b2dab5185 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 3 Nov 2014 21:58:14 +0100 Subject: [PATCH 01/72] Merge --- htdocs/fichinter/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 77c7e17ffb5..4ffc31c9cab 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -748,10 +748,10 @@ if ($action == 'send' && ! GETPOST('cancel','alpha') && (empty($conf->global->MA $actionmsg = $langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=$langs->transnoentities("InterventionSentByEMail",$object->ref); } From fdac53bfca37b034a8decfb4f0e568cbc93a5b27 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Wed, 19 Nov 2014 18:53:33 +0100 Subject: [PATCH 02/72] Update objectline_create.tpl.php add label tags for product mode type --- htdocs/core/tpl/objectline_create.tpl.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index a51a6505416..6e9b3251fbd 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -107,7 +107,9 @@ else { print ''; } else {*/ + echo ''; /* if (empty($conf->product->enabled) && empty($conf->service->enabled)) echo $langs->trans("Type"); else if (! empty($forceall) || (! empty($conf->product->enabled) && ! empty($conf->service->enabled))) echo $langs->trans("FreeLineOfType"); @@ -123,7 +125,7 @@ else { { echo '
'; echo ' '; - + echo ''; echo ' '; $filtertype=''; From 9f73277ef2793842f1110375c6d4e10b51c82b75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 13:14:54 +0100 Subject: [PATCH 03/72] Fixed [ bug #1642 ]: add a free line in contract --- htdocs/contrat/card.php | 6 ++--- .../contract/doc/pdf_strato.modules.php | 24 ++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 20fd6939f5d..dfdf0e95a87 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -536,10 +536,10 @@ else if ($action == 'addline' && $user->rights->contrat->creer) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model=$object->modelpdf; - if (empty($model)) { $tmp=getListOfModels($db, 'contract'); $keys=array_keys($tmp); $model=$keys[0]; } + $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + + $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST ['prod_entry_mode']); diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index bd4cc333743..4c609bc100c 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -53,6 +53,18 @@ class pdf_strato extends ModelePDFContract var $marge_haute; var $marge_basse; + /** + * Issuer + * @var Societe + */ + public $emetteur; + + /** + * Recipient + * @var Societe + */ + public $recipient; + /** * Constructor * @@ -581,17 +593,17 @@ class pdf_strato extends ModelePDFContract $result=$object->fetch_contact($arrayidcontact[0]); } + $this->recipient = $object->client; + // Recipient name - if (! empty($usecontact)) - { + if (! empty($usecontact)) { // On peut utiliser le nom de la societe du contact if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname; else $socname = $object->client->name; - $this->recipient->name=$outputlangs->convToOutputCharset($socname); + $this->recipient->name = $outputlangs->convToOutputCharset($socname); } - else - { - $this->recipient->name=$outputlangs->convToOutputCharset($object->client->name); + else { + $this->recipient->name = $outputlangs->convToOutputCharset($object->client->name); } $carac_client=pdf_build_address($outputlangs, $this->emetteur, $object->client, (isset($object->contact)?$object->contact:''), $usecontact, 'target'); From 7a272afd120029ba06d00ff6d56d7a8e129cbb8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:03:49 +0100 Subject: [PATCH 04/72] Fixed [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state --- ChangeLog | 3 ++- htdocs/fichinter/fiche.php | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 99b29a81f56..34dd86aa02e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,7 +12,8 @@ English Dolibarr ChangeLog - Fix: Civility & birthdate wasn't save into adherent module. - Fix: webservice Thirdparty parameter lastname for invidual creation is now lastname and not ref - Fix: Chars - is no more allowed into value for code for extra fields. -( Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache +- Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache +- Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state ***** ChangeLog for 3.6.1 compared to 3.6.* ***** For users: diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 944dbae6b45..9be7d67115e 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -152,6 +152,11 @@ else if ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->fich else if ($action == 'add' && $user->rights->ficheinter->creer) { + // Fill array 'array_options' with data from add form + $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); + $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + if ($ret < 0) $error ++; + $object->socid = $socid; $object->duree = GETPOST('duree','int'); $object->fk_project = GETPOST('projectid','int'); From a1cc95d35271e8b4040ae5b1f3198ed7048a89a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:26:55 +0100 Subject: [PATCH 05/72] Fixed design of edit page of a bookmark --- htdocs/bookmarks/card.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 640e7e72c57..1d217b64154 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -153,7 +153,7 @@ if ($action == 'create') print_fiche_titre($langs->trans("NewBookmark")); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); print ''; @@ -196,8 +196,15 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) $bookmark=new Bookmark($db); $bookmark->fetch($id); + $head = array( + array( + '', + $langs->trans('Card'), + 'card' + ) + ); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); if ($action == 'edit') { From c40be71dcdd817e19619983acf92d6754578bfca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:44:49 +0100 Subject: [PATCH 06/72] Fixed design of new bookmark page --- htdocs/bookmarks/card.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 1d217b64154..2c1c61c5981 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -153,8 +153,6 @@ if ($action == 'create') print_fiche_titre($langs->trans("NewBookmark")); - dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); - print '
'; print ''; @@ -183,8 +181,6 @@ if ($action == 'create') print ''; print ''; - - dol_fiche_end(); } @@ -220,12 +216,12 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; - print ''; - print ''; From 52eb4943e2492a0a733800e1c557f96b3bf35e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:46:48 +0100 Subject: [PATCH 07/72] Fixed entities problems in error messages when creating a bookmark --- htdocs/bookmarks/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 2c1c61c5981..5e8f770c91c 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -69,12 +69,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if (! $title) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); } if (! $url) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); } if (! $error) @@ -95,7 +95,7 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("WarningBookmarkAlreadyExists"), 'warnings'); + setEventMessage($langs->transnoentities("WarningBookmarkAlreadyExists"), 'warnings'); } else { From 373bdcf5d7cc1169c1c3039626aa749534c2fa4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:54:09 +0100 Subject: [PATCH 08/72] Fixed problem when editing a bookmark and failing --- htdocs/bookmarks/card.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 5e8f770c91c..9e115a611e6 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -50,6 +50,13 @@ $backtopage=GETPOST('backtopage','alpha'); if ($action == 'add' || $action == 'addproduct' || $action == 'update') { + + if ($action == 'update') { + $invertedaction = 'edit'; + } else { + $invertedaction = 'create'; + } + $error = 0; if (GETPOST("cancel")) @@ -101,12 +108,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') { setEventMessage($bookmark->error, 'errors'); } - $action='create'; + $action = $invertedaction; } } else { - $action='create'; + $action = $invertedaction; } } From 231ad04fbd5555b42a535934226141e1830359d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 16:58:46 +0100 Subject: [PATCH 09/72] Highlight of required fields should be only in edit mode --- htdocs/bookmarks/card.php | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 9e115a611e6..5896f63106a 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2013 Laurent Destailleur + * Copyright (C) 2014 Marcos García * * 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 @@ -223,12 +224,31 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; - print ''; - print ''; From b76a58b898d64f7548de2d8d813298641786112a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:03:25 +0100 Subject: [PATCH 10/72] Fixed typo --- htdocs/bookmarks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index a22b24388b1..748a4d9b7fa 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -59,7 +59,7 @@ if ($_GET["action"] == 'delete') } else { - $setEventMessage($bookmark->error, 'errors'); + setEventMessage($bookmark->error, 'errors'); } } From 496a3fcaaef0f6e4a36bfe8d9aff9fad8b23d24f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:06:51 +0100 Subject: [PATCH 11/72] Removed unused action of card.php --- htdocs/bookmarks/card.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 5896f63106a..05d6a0b4843 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -118,28 +118,6 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') } } -if ($action == 'delete') -{ - $bookmark=new Bookmark($db); - $bookmark->id=$_GET["bid"]; - $bookmark->url=$user->id; - $bookmark->target=$user->id; - $bookmark->title='xxx'; - $bookmark->favicon='xxx'; - - $res=$bookmark->remove(); - if ($res > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - setEventMessage($bookmark->error, 'errors'); - } -} - - /* * View */ From 912384a9fad737c007dbe449cec47bd85cd64884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:24:37 +0100 Subject: [PATCH 12/72] Fixed [ bug #1679 ] Can't sort groups by user count in user groups list --- htdocs/user/group/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 00af5b0e6d2..1f06fa3a3c2 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -91,7 +91,7 @@ if ($resql) { print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder); } - print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"g.nb",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"nb",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; $var=True; From 326e009cadca00c59e1c44f4cc1a816f4104e432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 17:42:06 +0100 Subject: [PATCH 13/72] Fix Typo --- htdocs/compta/dons/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/dons/card.php b/htdocs/compta/dons/card.php index e453ef623c3..5a4170e74fe 100644 --- a/htdocs/compta/dons/card.php +++ b/htdocs/compta/dons/card.php @@ -76,7 +76,7 @@ if ($action == 'update') if (empty($amount)) { - $setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Amount")), 'errors'); + setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Amount")), 'errors'); $action = "create"; $error++; } From 486d24b8db251da9fcc4bc79d3b99bb480cc806c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 17:43:06 +0100 Subject: [PATCH 14/72] Fix Typo --- htdocs/fourn/paiement/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 824919400a2..179e810d182 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -107,7 +107,7 @@ if ($action == 'setnum_paiement' && ! empty($_POST['num_paiement'])) $res = $object->update_num($_POST['num_paiement']); if ($res === 0) { - $setEventMessage($langs->trans('PaymentNumberUpdateSucceeded')); + setEventMessage($langs->trans('PaymentNumberUpdateSucceeded')); } else { From 6d2e024d527210cdaab9e9db0a72bd37f92c2810 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 17:53:44 +0100 Subject: [PATCH 15/72] Doxygen --- htdocs/compta/bank/class/account.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 978fc2b3838..4343e2cb921 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -220,7 +220,7 @@ class Account extends CommonObject /** * Add an entry into table ".MAIN_DB_PREFIX."bank * - * @param timsestmap $date Date operation + * @param timestamp $date Date operation * @param string $oper 1,2,3,4... (deprecated) or TYP,VIR,PRE,LIQ,VAD,CB,CHQ... * @param string $label Descripton * @param float $amount Amount From 6cc79c2dd7d6012dde8b488cf1c32ecc6c65f5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 23 Nov 2014 18:42:48 +0100 Subject: [PATCH 16/72] Put label into div --- htdocs/main.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index c8553f29291..cf01d5d0364 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1810,13 +1810,13 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput $ret=''; $ret.='
'; - $ret.=''; + $ret.=''; $ret.=''; $ret.=''; $ret.=''; From aa4f16ce9931dfcd09b0383a475c602208264783 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 23 Nov 2014 21:02:49 +0100 Subject: [PATCH 17/72] Add resource language file in transifex --- .tx/config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.tx/config b/.tx/config index c20f75769ae..d6e339462e3 100644 --- a/.tx/config +++ b/.tx/config @@ -260,6 +260,12 @@ source_file = htdocs/langs/en_US/propal.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.resource] +file_filter = htdocs/langs//resource.lang +source_file = htdocs/langs/en_US/resource.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.salaries] file_filter = htdocs/langs//salaries.lang source_file = htdocs/langs/en_US/salaries.lang From aa8c165f065d1ed5cc801db6c796c41ddb7b1541 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 23 Nov 2014 21:03:34 +0100 Subject: [PATCH 18/72] Presentation --- htdocs/core/tpl/resource_view.tpl.php | 13 +++-- htdocs/resource/add.php | 82 +++++++++++++++------------ htdocs/resource/card.php | 8 +-- htdocs/resource/element_resource.php | 13 ++--- htdocs/resource/list.php | 18 +++--- 5 files changed, 75 insertions(+), 59 deletions(-) diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index ef2963b28c1..d57b66cc331 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -32,7 +32,7 @@ if( (array) $linked_resources && count($linked_resources) > 0) print '
'.$langs->trans('Resource').'
'; print '
'.$langs->trans('Busy').'
'; print '
'.$langs->trans('Mandatory').'
'; - print '
'.$langs->trans('Edit').'
'; + print '
'.$langs->trans('Action').'
'; print ''; //print ''; @@ -86,8 +86,13 @@ if( (array) $linked_resources && count($linked_resources) > 0) print ''; print ''; print ''; @@ -105,4 +110,4 @@ else { print '
'.$langs->trans('NoResourceLinked').'
'; } -// FIN DU TPL +// FIN DU TPL \ No newline at end of file diff --git a/htdocs/resource/add.php b/htdocs/resource/add.php index fde152b6185..679644ac9e0 100644 --- a/htdocs/resource/add.php +++ b/htdocs/resource/add.php @@ -32,7 +32,7 @@ if (! $res) die("Include of main fails"); require_once 'class/resource.class.php'; require_once 'class/html.formresource.class.php'; -// Load traductions files requiredby by page +// Load traductions files required by page $langs->load("resource"); $langs->load("companies"); $langs->load("other"); @@ -41,6 +41,7 @@ $langs->load("resource@resource"); // Get parameters $id = GETPOST('id','int'); $action = GETPOST('action','alpha'); +$cancel = GETPOST('cancel','alpha'); if (empty($sortorder)) $sortorder="DESC"; if (empty($sortfield)) $sortfield="t.rowid"; if (empty($arch)) $arch = 0; @@ -65,57 +66,64 @@ $object = new Resource($db); if ($action == 'confirm_add_resource') { - $error=''; - - $ref=GETPOST('ref','alpha'); - $description=GETPOST('description','alpha'); - $fk_code_type_resource=GETPOST('fk_code_type_resource','alpha'); - - if (empty($ref)) + if (! $cancel) { - $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")); - setEventMessage($mesg, 'errors'); - $error++; - } - - if (! $error) - { - $object=new Resource($db); - $object->ref=$ref; - $object->description=$description; - $object->fk_code_type_resource=$fk_code_type_resource; + $error=''; - $result=$object->create($user); - if ($result > 0) + $ref=GETPOST('ref','alpha'); + $description=GETPOST('description','alpha'); + $fk_code_type_resource=GETPOST('fk_code_type_resource','alpha'); + + if (empty($ref)) { - // Creation OK - $db->commit(); - setEventMessage($langs->trans('ResourceCreatedWithSuccess')); - Header("Location: card.php?id=" . $object->id); - return; + $mesg=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Ref")); + setEventMessage($mesg, 'errors'); + $error++; + } + + if (! $error) + { + $object=new Resource($db); + $object->ref=$ref; + $object->description=$description; + $object->fk_code_type_resource=$fk_code_type_resource; + + $result=$object->create($user); + if ($result > 0) + { + // Creation OK + $db->commit(); + setEventMessage($langs->trans('ResourceCreatedWithSuccess')); + Header("Location: card.php?id=" . $object->id); + return; + } + else + { + // Creation KO + setEventMessage($object->error, 'errors'); + $action = ''; + } } else { - // Creation KO - setEventMessage($object->error, 'errors'); $action = ''; } } else { - $action = ''; + Header("Location: list.php"); } } -/*************************************************** -* VIEW -* -****************************************************/ +/* + * View + * + */ $form=new Form($db); $formresource = new FormResource($db); -if ( !$action ) +if (! $action) { $pagetitle=$langs->trans('AddResource'); llxHeader('',$pagetitle,''); @@ -161,8 +169,10 @@ if ( !$action ) print '
'.$langs->trans("BookmarkTitle").''.$langs->trans("SetHereATitleForLink").'
'.$langs->trans("Ref").''.$bookmark->ref.'
'.$langs->trans("BookmarkTitle").''; + print '
'.$langs->trans("BookmarkTitle").''; if ($action == 'edit') print 'title).'">'; else print $bookmark->title; print '
'.$langs->trans("UrlOrLink").''; + print '
'.$langs->trans("UrlOrLink").''; if ($action == 'edit') print 'url).'">'; else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; print '
'.$langs->trans("Ref").''.$bookmark->ref.'
'.$langs->trans("BookmarkTitle").''; + print '
'; + if ($action == 'edit') { + print ''; + } + + print $langs->trans("BookmarkTitle"); + + if ($action == 'edit') { + print ''; + } + + print ''; if ($action == 'edit') print 'title).'">'; else print $bookmark->title; print '
'.$langs->trans("UrlOrLink").''; + print '
'; + if ($action == 'edit') { + print ''; + } + print $langs->trans("UrlOrLink"); + if ($action == 'edit') { + print ''; + } + print ''; if ($action == 'edit') print 'url).'">'; else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; print '
'; - echo '
', - ' ', + echo '
', + '', + ' ', + '', '
'; print ''; diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php index b2ee3ae1814..33a27796aaf 100644 --- a/htdocs/resource/card.php +++ b/htdocs/resource/card.php @@ -139,7 +139,7 @@ if ( $object->fetch($id) > 0 ) /*--------------------------------------- * Edit object - */ + */ print '
'; print ''; print ''; @@ -171,7 +171,7 @@ if ( $object->fetch($id) > 0 ) } else { - // Confirmation suppression resource line + // Confirm deleting resource line if ($action == 'delete') { print $form->formconfirm("card.php?&id=".$id,$langs->trans("DeleteResource"),$langs->trans("ConfirmDeleteResource"),"confirm_delete_resource",'','',1); @@ -228,9 +228,9 @@ if ( $object->fetch($id) > 0 ) print '
'; } } - if ($action != "delete" ) + if ($action != "delete" && $action != "edit") { - // Edit resource + // Delete resource if($user->rights->resource->delete) { print '
'; diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 02a24735454..d50c9a4ec6f 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -1,6 +1,5 @@ +/* Copyright (C) 2013 Jean-François Ferry * * 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 @@ -32,7 +31,7 @@ require 'class/resource.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // Load traductions files requiredby by page -$langs->load("resource@resource"); +$langs->load("resource"); $langs->load("other"); // Get parameters @@ -70,8 +69,9 @@ $resource_id = GETPOST('fk_resource','int'); $resource_type = GETPOST('resource_type','alpha'); $busy = GETPOST('busy','int'); $mandatory = GETPOST('mandatory','int'); +$cancel = GETPOST('cancel','alpha'); -if($action == 'add_element_resource' && !GETPOST('cancel')) +if($action == 'add_element_resource' && ! $cancel) { $objstat = fetchObjectByElement($element_id,$element); $res = $objstat->add_element_resource($resource_id,$resource_type,$busy,$mandatory); @@ -251,9 +251,6 @@ else foreach ($object->available_resources as $modresources => $resources) { - $langs->load($resources); - //print '

'.$modresources.'

'; - $resources=(array) $resources; // To be sure $resources is an array foreach($resources as $resource_obj) { @@ -301,7 +298,7 @@ else { print '
'; print '
'; - print 'Add resource'; + print ''.$langs->trans('AddResource').''; print '
'; print '
'; } diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php index 9a0fca19781..ab70bc9a338 100644 --- a/htdocs/resource/list.php +++ b/htdocs/resource/list.php @@ -1,6 +1,5 @@ +/* Copyright (C) 2013-2014 Jean-François Ferry * * 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 @@ -116,7 +115,7 @@ else print_liste_field_titre($langs->trans('Id'),$_SERVER['PHP_SELF'],'t.rowid','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'t.ref','',$param,'',$sortfield,$sortorder); print_liste_field_titre($langs->trans('ResourceType'),$_SERVER['PHP_SELF'],'ty.code','',$param,'',$sortfield,$sortorder); - print_liste_field_titre($langs->trans('Edit')); + print_liste_field_titre($langs->trans('Action'),"","","","",'width="60" align="center"',"",""); print ''; foreach ($object->lines as $resource) @@ -128,7 +127,7 @@ else $style='style="background: orange;"'; print ''; - print $resource->id; + print ''.$resource->id.''; print ''; print ''; @@ -139,9 +138,14 @@ else print $resource->type_label; print ''; - print ''; - print ''.$langs->trans('View').' '; - print ''.$langs->trans('Edit').''; + print ''; + print ''; + print img_edit(); + print ''; + print ' '; + print ''; + print img_delete(); + print ''; print ''; print ''; From bbdd25f97cde68b4ad46a2f2f268ddd3eee08f6c Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 23 Nov 2014 21:37:45 +0100 Subject: [PATCH 19/72] Add function purge criteria in project module --- htdocs/projet/list.php | 14 ++++++++++++-- htdocs/projet/tasks/index.php | 13 ++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index b4260e8ea91..614f91468cc 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -63,6 +63,14 @@ $search_label=GETPOST("search_label"); $search_societe=GETPOST("search_societe"); $search_all=GETPOST("search_all"); +// Purge criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +{ + $search_ref=""; + $search_label=""; + $search_societe=""; + $search_all=0; +} /* * View @@ -147,8 +155,10 @@ if ($resql) print ''; print ''; print ' '; - print ''; - print "\n"; + print ''; + print ''; + print ''; + print ''; while ($i < $num) { diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index cdf90a918a3..4354fc23b2c 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -51,7 +51,13 @@ $page = $page == -1 ? 0 : $page; $mine = $_REQUEST['mode']=='mine' ? 1 : 0; - +// Purge criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +{ + $search_project=""; + $search_status=""; +} +if (empty($search_status)) $search_status=1; /* * View @@ -122,9 +128,10 @@ print $form->selectarray('search_status', $listofstatus, $search_status); print ''; print ''; print ' '; +print ''; +print ''; +print ''; print ''; -print ''; -print "\n"; if (count($tasksarray) > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)) { From 7a18240d2f8f97eae9ac0d6c0c5a777171185b57 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 23:22:49 +0100 Subject: [PATCH 20/72] Doxygen --- htdocs/core/class/infobox.class.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/infobox.class.php b/htdocs/core/class/infobox.class.php index ab26ee68317..14d1bec0841 100644 --- a/htdocs/core/class/infobox.class.php +++ b/htdocs/core/class/infobox.class.php @@ -40,14 +40,14 @@ class InfoBox /** * Return array of boxes qualified for area and user * - * @param DoliDB $db Database handler - * @param string $mode 'available' or 'activated' - * @param string $zone Name or area (-1 for all, 0 for Homepage, 1 for xxx, ...) - * @param User $user Object user to filter - * @param array $excludelist Array of box id (box.box_id = boxes_def.rowid) to exclude - * @return array Array of boxes + * @param DoliDB $db Database handler + * @param string $mode 'available' or 'activated' + * @param string $zone Name or area (-1 for all, 0 for Homepage, 1 for xxx, ...) + * @param User|null $user Object user to filter + * @param array $excludelist Array of box id (box.box_id = boxes_def.rowid) to exclude + * @return array Array of boxes */ - static function listBoxes($db, $mode, $zone, $user, $excludelist=array()) + static function listBoxes($db, $mode, $zone, $user=null, $excludelist=array()) { global $conf; From 891e39189ab5df849d9626f5d369e51ccae09b91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 23:31:35 +0100 Subject: [PATCH 21/72] Fixed: missing css class --- htdocs/projet/tasks/time.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index 676b17a5951..6e7ab74b941 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -296,22 +296,22 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans("DateStart").''; print dol_print_date($object->date_start,'dayhour'); print ''; - + // Date end print ''.$langs->trans("DateEnd").''; print dol_print_date($object->date_end,'dayhour'); print ''; - + // Planned workload print ''.$langs->trans("PlannedWorkload").''; print convertSecondToTime($object->planned_workload,'allhourmin'); print ''; - + // Progress declared print ''.$langs->trans("ProgressDeclared").''; print $object->progress.' %'; print ''; - + // Progress calculated print ''.$langs->trans("ProgressCalculated").''; if ($object->planned_workload) @@ -322,7 +322,7 @@ if ($id > 0 || ! empty($ref)) } else print ''; print ''; - + // Project if (empty($withproject)) { @@ -400,11 +400,11 @@ if ($id > 0 || ! empty($ref)) // Contributor print ''; - print img_object('','user'); + print img_object('','user','class="hideonsmartphone"'); $contactsoftask=$object->getListContactId('internal'); if (count($contactsoftask)>0) { $userid=$contactsoftask[0]; - $form->select_users($userid,'userid',0,'',0,'',$contactsoftask); + print $form->select_dolusers($userid,'userid',0,'',0,'',$contactsoftask); }else { print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); } @@ -506,7 +506,7 @@ if ($id > 0 || ! empty($ref)) $contactsoftask[]=$task_time->fk_user; } if (count($contactsoftask)>0) { - $form->select_users($task_time->fk_user,'userid_line',0,'',0,'',$contactsoftask); + print $form->select_dolusers($task_time->fk_user,'userid_line',0,'',0,'',$contactsoftask); }else { print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); } From 6159591a02bfa0f27b6721c8e4a12a1a4fcdec52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:24:37 +0100 Subject: [PATCH 22/72] Fixed [ bug #1679 ] Can't sort groups by user count in user groups list --- htdocs/user/group/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 00af5b0e6d2..1f06fa3a3c2 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -91,7 +91,7 @@ if ($resql) { print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder); } - print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"g.nb",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"nb",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder); print "\n"; $var=True; From 601710a4dcc9751ff6ed79e53beec0296bcbefa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 24 Nov 2014 01:05:01 +0100 Subject: [PATCH 23/72] Highlight of required fields should be only in edit mode Conflicts: htdocs/bookmarks/card.php --- htdocs/bookmarks/card.php | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 640e7e72c57..d31a507ad6f 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2013 Laurent Destailleur + * Copyright (C) 2014 Marcos García * * 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 @@ -150,11 +151,11 @@ if ($action == 'create') print ''."\n"; print ''; print ''; - + print_fiche_titre($langs->trans("NewBookmark")); dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); - + print ''; print ''; @@ -176,14 +177,14 @@ if ($action == 'create') print ''; print '
'.$langs->trans("BookmarkTitle").''.$langs->trans("SetHereATitleForLink").'
 

'; - + print '
'; print '   '; print ''; print '
'; print ''; - + dol_fiche_end(); } @@ -213,12 +214,31 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''.$langs->trans("Ref").''.$bookmark->ref.''; - print ''.$langs->trans("BookmarkTitle").''; + print ''; + if ($action == 'edit') { + print ''; + } + + print $langs->trans("BookmarkTitle"); + + if ($action == 'edit') { + print ''; + } + + print ''; if ($action == 'edit') print 'title).'">'; else print $bookmark->title; print ''; - print ''.$langs->trans("UrlOrLink").''; + print ''; + if ($action == 'edit') { + print ''; + } + print $langs->trans("UrlOrLink"); + if ($action == 'edit') { + print ''; + } + print ''; if ($action == 'edit') print 'url).'">'; else print 'target?' target="_blank"':'').'>'.$bookmark->url.''; print ''; @@ -268,7 +288,7 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; if ($action == 'edit') print '
   
'; - + if ($action == 'edit') print ''; dol_fiche_end(); From 6304895d75afcfb6069f3c3232e60ed77398daf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:03:25 +0100 Subject: [PATCH 24/72] Fixed typo --- htdocs/bookmarks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index a22b24388b1..748a4d9b7fa 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -59,7 +59,7 @@ if ($_GET["action"] == 'delete') } else { - $setEventMessage($bookmark->error, 'errors'); + setEventMessage($bookmark->error, 'errors'); } } From 3ab8cff641394f8dcfd710e47fb78d5e2ec2b4b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 23 Nov 2014 17:06:51 +0100 Subject: [PATCH 25/72] Removed unused action of card.php --- htdocs/bookmarks/card.php | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index d31a507ad6f..6da8eba7557 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -111,28 +111,6 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') } } -if ($action == 'delete') -{ - $bookmark=new Bookmark($db); - $bookmark->id=$_GET["bid"]; - $bookmark->url=$user->id; - $bookmark->target=$user->id; - $bookmark->title='xxx'; - $bookmark->favicon='xxx'; - - $res=$bookmark->remove(); - if ($res > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - setEventMessage($bookmark->error, 'errors'); - } -} - - /* * View */ From 29bfe7050d83dbf3988caf1e91b9ac10e217d3db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Nov 2014 01:11:30 +0100 Subject: [PATCH 26/72] Fix: W3C. --- htdocs/bookmarks/card.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 6da8eba7557..5e47dfceae4 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -154,7 +154,9 @@ if ($action == 'create') print 'position).'">'; print ' '; - print '
'; + print ''; + + dol_fiche_end(); print '
'; print '   '; @@ -162,8 +164,6 @@ if ($action == 'create') print '
'; print ''; - - dol_fiche_end(); } @@ -176,8 +176,6 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) $bookmark->fetch($id); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); - if ($action == 'edit') { print '
'; @@ -188,6 +186,8 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print ''; } + dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + print ''; print ''; @@ -265,12 +265,14 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print '
'.$langs->trans("Ref").''.$bookmark->ref.'
'; - if ($action == 'edit') print '
   
'; - - if ($action == 'edit') print '
'; - dol_fiche_end(); + if ($action == 'edit') + { + print '
   
'; + print ''; + } + print "
\n"; From bc1d88d324fe41b0abf449ff73ca3691cc12c14a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Nov 2014 01:16:26 +0100 Subject: [PATCH 27/72] Fixed: The visualization of status with mutualized picto was lost, so i restore old feature to keep same visual for all status and add hidden option to switch to new. --- htdocs/product/card.php | 6 +++--- htdocs/product/list.php | 4 ++-- htdocs/product/stock/product.php | 6 +++--- htdocs/societe/soc.php | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 92d588d19fe..529f812d8c4 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1419,7 +1419,7 @@ else // Status (to sell) print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { print $object->getLibStatut(2,0); @@ -1428,7 +1428,7 @@ else // Status (to buy) print ''.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $object->getLibStatut(2,1); @@ -1438,7 +1438,7 @@ else // Batch number management (to batch) if ($conf->productbatch->enabled) { print ''.$langs->trans("Status").' ('.$langs->trans("Lot").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch'); } else { print $object->getLibStatut(2,2); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 907181634ee..a5cc97defa7 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -511,7 +511,7 @@ else $product_static->status = $objp->tosell; // Status (to sell) print ''; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product_static, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { print $product_static->LibStatut($objp->tosell,5,0); @@ -520,7 +520,7 @@ else // Status (to buy) print ''; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product_static, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $product_static->LibStatut($objp->tobuy,5,1); diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 96ecdb1d95d..5bd7999e2e3 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -279,7 +279,7 @@ if ($id > 0 || $ref) // Status (to sell) print ''.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell'); } else { print $product->getLibStatut(2,0); @@ -288,7 +288,7 @@ if ($id > 0 || $ref) // Status (to buy) print ''.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($product, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy'); } else { print $product->getLibStatut(2,1); @@ -340,7 +340,7 @@ if ($id > 0 || $ref) } print ''; print ''; - + print ''; $text_stock_options = ''; $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)?$langs->trans("DeStockOnShipment").'
':''); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 62869daf366..701efe742eb 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1727,7 +1727,7 @@ else // Status print ''.$langs->trans("Status").''; print ''; - if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer) { + if (! empty($conf->use_javascript_ajax) && $user->rights->societe->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { print ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); } else { print $object->getLibStatut(2); From ef991e6c5dff769ca1eb5e776df956971d2ea1b7 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 24 Nov 2014 06:43:15 +0100 Subject: [PATCH 28/72] HTML5 -
is deprecated - Need CSS - continue working --- htdocs/product/price.php | 21 +++++++++++++++------ htdocs/product/stock/card.php | 11 ++++++++--- htdocs/product/stock/mouvement.php | 17 ++++++++++++----- htdocs/product/stock/product.php | 14 ++++++++++---- htdocs/product/traduction.php | 16 ++++++++++------ htdocs/projet/card.php | 4 ++-- htdocs/projet/tasks/task.php | 7 ++++--- htdocs/public/demo/index.php | 2 +- htdocs/public/members/new.php | 12 ++++++------ htdocs/public/paybox/newpayment.php | 4 ++-- htdocs/public/paypal/newpayment.php | 4 ++-- htdocs/societe/checkvat/checkVatPopup.php | 2 +- htdocs/societe/price.php | 14 ++++++++++---- htdocs/societe/rib.php | 16 ++++++++++------ htdocs/societe/soc.php | 10 +++++----- htdocs/user/agenda_extsites.php | 4 ++-- htdocs/user/card.php | 8 ++++---- htdocs/user/clicktodial.php | 6 +++--- htdocs/user/group/card.php | 4 ++-- htdocs/user/note.php | 6 +++--- htdocs/user/param_ihm.php | 6 +++--- htdocs/webservices/admin/webservices.php | 4 ++-- 22 files changed, 117 insertions(+), 75 deletions(-) diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 3ff496356a8..bfd0b91fc5f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -669,8 +669,11 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } else { @@ -930,8 +933,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } elseif ($action == 'edit_customer_price') { @@ -1012,8 +1018,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } elseif ($action == 'showlog_customer_price') { diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 051a0575aaa..74cb33e02e7 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -206,7 +206,9 @@ if ($action == 'create') print ''; - print '

'; + print '
'; + print ''; + print '
'; print ''; } @@ -538,8 +540,11 @@ else print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 83d856ed0cc..1bac6b9fef5 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -332,9 +332,13 @@ if ($resql) print ''; - print '
 '; - print '
'; - print ''; + print '
'; + print ''; + print '     '; + print ''; + print '
'; + + print ''; } /* @@ -370,8 +374,11 @@ if ($resql) print ''; - print '
 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 96ecdb1d95d..a1a2b2be669 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -483,8 +483,11 @@ if ($id > 0 || $ref) } print ''; - print '
 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } @@ -519,8 +522,11 @@ if ($id > 0 || $ref) print ''; - print '
 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index cd7e4cdcb3c..34b38fe8919 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -217,9 +217,11 @@ if ($action == 'edit') } } - print '
'; - print '     '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; @@ -300,9 +302,11 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print ''; print ''; - print '
'; - print '     '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index f60d56cb633..e4e85345ec8 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -471,14 +471,14 @@ if ($action == 'create' && $user->rights->projet->creer) print ''; - print '
'; + print '
'; print ''; if (! empty($backtopage)) { print '     '; print ''; } - print '
'; + print '
'; print ''; diff --git a/htdocs/projet/tasks/task.php b/htdocs/projet/tasks/task.php index 73400bbcc6e..5d5c4f08e40 100644 --- a/htdocs/projet/tasks/task.php +++ b/htdocs/projet/tasks/task.php @@ -372,10 +372,11 @@ if ($id > 0 || ! empty($ref)) print ''; - print '

'; - print '   '; + print '
'; + print ''; + print '     '; print ''; - print '
'; + print '
'; print ''; } diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 8ee00d83515..dba28538780 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -305,7 +305,7 @@ print "\n"; print ''; print '
'; -print '
Dolibarr logo

'; +print '
Dolibarr logo

'; print '
'; print $langs->trans("DemoDesc").'
'; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index c8628bd26a0..bb218e4c0cf 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -110,9 +110,9 @@ function llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayo { $urllogo=DOL_URL_ROOT.'/theme/dolibarr_logo.png'; } - print '
'; + print '
'; print 'Logo'; - print '

'; + print '
'; print '
'; } @@ -343,9 +343,9 @@ if ($action == 'added') // Si on a pas ete redirige print '
'; - print '
'; + print '
'; print $langs->trans("NewMemberbyWeb"); - print '
'; + print '
'; llxFooterVierge(); exit; @@ -591,13 +591,13 @@ if (! empty($conf->global->MEMBER_NEWFORM_AMOUNT) print "
\n"; // Save -print '
'; +print '
'; print ''; if (! empty($backtopage)) { print '     '; } -print '
'; +print '
'; print "
\n"; print ''; diff --git a/htdocs/public/paybox/newpayment.php b/htdocs/public/paybox/newpayment.php index 47a93e39c32..0213ee7f6fa 100644 --- a/htdocs/public/paybox/newpayment.php +++ b/htdocs/public/paybox/newpayment.php @@ -166,7 +166,7 @@ if (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcredi else if (! empty($conf->global->PAYBOX_CREDITOR)) $creditor=$conf->global->PAYBOX_CREDITOR; print ''."\n"; -print '
'; +print '
'; print '
'; print ''; print ''; @@ -778,7 +778,7 @@ print ''."\n"; print ''."\n"; print '
'."\n"; -print '
'."\n"; +print ''."\n"; print '
'; diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php index afe685fb6ac..2cd56778f83 100644 --- a/htdocs/public/paypal/newpayment.php +++ b/htdocs/public/paypal/newpayment.php @@ -268,7 +268,7 @@ if (! empty($conf->global->$paramcreditor)) $creditor=$conf->global->$paramcredi else if (! empty($conf->global->PAYPAL_CREDITOR)) $creditor=$conf->global->PAYPAL_CREDITOR; print ''."\n"; -print '
'."\n"; +print '
'."\n"; print '
'."\n"; print ''."\n"; print ''."\n"; @@ -959,7 +959,7 @@ print ''."\n"; print ''."\n"; print '
'."\n"; -print '
'."\n"; +print ''."\n"; print '
'; diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 20c9068d4f6..748ba690ea0 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -158,7 +158,7 @@ else print '
'; print $langs->trans("VATIntraManualCheck",$langs->trans("VATIntraCheckURL"),$langs->trans("VATIntraCheckURL")).'
'; print '
'; -print '
'; +print '
'; if ($messagetoshow) { diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index 7ab39a10ddc..0932144a860 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -292,8 +292,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } elseif ($action == 'edit_customer_price') { @@ -368,8 +371,11 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print ''; - print '

 '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print '
'; } elseif ($action == 'showlog_customer_price') { diff --git a/htdocs/societe/rib.php b/htdocs/societe/rib.php index 01d82ac0867..68ade0431aa 100644 --- a/htdocs/societe/rib.php +++ b/htdocs/societe/rib.php @@ -497,9 +497,11 @@ if ($socid && $action == 'edit' && $user->rights->societe->creer) print '
'; - print '
'; - print '   '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } @@ -577,9 +579,11 @@ if ($socid && $action == 'create' && $user->rights->societe->creer) print '
'; - print '
'; - print '   '; - print '
'; + print '
'; + print ''; + print '     '; + print ''; + print '
'; print ''; } diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 62869daf366..d9fb4c0159f 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1095,9 +1095,9 @@ else print ''."\n"; - print '
'; + print '
'; print ''; - print '
'."\n"; + print ''."\n"; print ''."\n"; } @@ -1608,11 +1608,11 @@ else print ''; print '
'; - print '
'; + print '
'; print ''; - print '     '; + print '     '; print ''; - print '
'; + print ''; print ''; diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index 1993f12bd5c..2077c7e73e1 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -174,9 +174,9 @@ while ($i <= $MAXAGENDA) print ''; print '
'; -print '
'; +print '
'; print "trans("Save")."\">"; -print "
"; +print ""; print "\n"; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 429bcc91130..fe86717a4c9 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1009,7 +1009,7 @@ if (($action == 'create') || ($action == 'adduserldap')) print "\n"; - print '

'; + print '
'; print ""; } @@ -2126,11 +2126,11 @@ else print ''; - print '
'; + print '
'; print ''; - print '   '; + print '     '; print ''; - print '
'; + print ''; print ''; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 3dc3c14cc12..f72a8eb0f15 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -155,10 +155,10 @@ if ($id > 0) print ''; - print '
'; - print '     '; + print '
'; + print '     '; print ''; - print '
'; + print ''; print ''; } diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php index a1930f7c027..5f79c939432 100644 --- a/htdocs/user/group/card.php +++ b/htdocs/user/group/card.php @@ -264,7 +264,7 @@ if ($action == 'create') print "\n"; - print '

'; + print '
'; print ""; } @@ -536,7 +536,7 @@ else print "\n"; - print '

'; + print '
'; print ''; diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 448dd76d147..2a992aa3212 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -133,11 +133,11 @@ if ($id) if ($action == 'edit') { - print '

'; + print '
'; print ''; - print '   '; + print '     '; print ''; - print '
'; + print ''; } print "\n"; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 65e9e4ca7a6..3bca4cbee47 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -202,11 +202,11 @@ if ($action == 'edit') dol_fiche_end(); - print '
'; + print '
'; print ''; - print '     '; + print '     '; print ''; - print '
'; + print ''; print ''; diff --git a/htdocs/webservices/admin/webservices.php b/htdocs/webservices/admin/webservices.php index a12f638a174..431150bd9e9 100644 --- a/htdocs/webservices/admin/webservices.php +++ b/htdocs/webservices/admin/webservices.php @@ -90,9 +90,9 @@ print ''; print ''; -print '
'; +print '
'; print ''; -print '
'; +print ''; print ''; From d9958efcd77ee55ea991d73d1fe7ae6974278a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 24 Nov 2014 12:45:46 +0100 Subject: [PATCH 29/72] Fixed [ bug #1691 ] Don't think the ID should be displayed in holiday module --- htdocs/holiday/define_holiday.php | 11 ++--------- htdocs/langs/en_US/holiday.lang | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 217cb16bad1..fa3f745de81 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -144,17 +144,14 @@ if($cp_events == 1) print '
'; } -dol_fiche_head(); - print '
'."\n"; print ''; print ''; print ""; -print ''; -print ''; +print ''; print ''; print ''; -print ''; +print ''; print ''; foreach($listUsers as $users) @@ -163,7 +160,6 @@ foreach($listUsers as $users) $var=!$var; print ''; - print ''; print '
'.$langs->trans('ID').''.$langs->trans('Employee').''.$langs->trans('Employee').''.$langs->trans('Available').''.$langs->trans('Note').''.$langs->trans('UpdateButtonCP').'
'.$users['rowid'].''; $userstatic->id=$users['rowid']; $userstatic->lastname=$users['name']; @@ -183,9 +179,6 @@ foreach($listUsers as $users) print '
'; print '
'; -dol_fiche_end(); - - llxFooter(); $db->close(); diff --git a/htdocs/langs/en_US/holiday.lang b/htdocs/langs/en_US/holiday.lang index 698d34eb539..f5b87fefb08 100644 --- a/htdocs/langs/en_US/holiday.lang +++ b/htdocs/langs/en_US/holiday.lang @@ -48,7 +48,6 @@ ConfirmDeleteCP=Confirm the deletion of this leave request? ErrorCantDeleteCP=Error you don't have the right to delete this leave request. CantCreateCP=You don't have the right to make leave requests. InvalidValidatorCP=You must choose an approbator to your leave request. -UpdateButtonCP=Update CantUpdate=You cannot update this leave request. NoDateDebut=You must select a start date. NoDateFin=You must select an end date. From 082f67a6e4edd761f7db07c2dded7de24355f307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Mon, 24 Nov 2014 12:49:33 +0100 Subject: [PATCH 30/72] Fixed [ bug #1718 ] Mistakenly searching for text in amount field breaks --- htdocs/fourn/commande/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 6affbae3045..4f0974abd10 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -123,7 +123,7 @@ if ($search_user) } if ($search_ttc) { - $sql .= " AND total_ttc = ".price2num($search_ttc); + $sql .= " AND total_ttc = '".$db->escape(price2num($search_ttc))."'"; } if ($sall) { From ab25b149c59268c9e042117aebcfae7f437de1b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Nov 2014 15:40:40 +0100 Subject: [PATCH 31/72] Fix: Download of user files --- htdocs/user/document.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/user/document.php b/htdocs/user/document.php index b18424625ce..2659b9427c8 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -88,10 +88,11 @@ if ($id > 0 || ! empty($ref)) { $result = $object->fetch($id, $ref); - $upload_dir = $conf->user->multidir_output[$object->entity] . "/" . $object->id ; + $entitytouseforuserdir = $object->entity; + if (empty($entitytouseforuserdir)) $entitytouseforuserdir=1; + $upload_dir = $conf->user->multidir_output[$entitytouseforuserdir] . "/" . $object->id ; } - /* * Actions */ @@ -159,8 +160,8 @@ if ($object->id) print ''; - $modulepart = 'societe'; - $permission = $user->rights->societe->creer; + $modulepart = 'user'; + $permission = $user->rights->user->user->creer; $param = '&id=' . $object->id; include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php'; } From 5dbba380d230e23adda0e6e074cf8e811dff5224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Nov 2014 20:54:38 +0100 Subject: [PATCH 32/72] Fix 1721 Missing translation on proposal creation --- htdocs/langs/en_US/admin.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1eeb5a7f443..13e9580e2b8 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1139,6 +1139,7 @@ AddDeliveryAddressAbility=Add delivery date ability UseOptionLineIfNoQuantity=A line of product/service with a zero amount is considered as an option FreeLegalTextOnProposal=Free text on commercial proposals WatermarkOnDraftProposal=Watermark on draft commercial proposals (none if empty) +ASK_PAYMENT_BANK_DURING_PROPOSAL=Ask for bank account destination of proposal ##### Orders ##### OrdersSetup=Order management setup OrdersNumberingModules=Orders numbering models From 655dc35628e7da518eac53f3c92344f1311550cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Nov 2014 20:57:26 +0100 Subject: [PATCH 33/72] Update propal.php --- htdocs/admin/propal.php | 46 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 328866eb964..c92f2bac5ab 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -163,7 +163,22 @@ if ($action == 'setdefaultduration') } } -// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) +if ($action == 'set_ASK_PAYMENT_BANK_DURING_PROPOSAL') +{ + $res = dolibarr_set_const($db, "ASK_PAYMENT_BANK_DURING_PROPOSAL",$value,'chaine',0,'',$conf->entity); + + if (! $res > 0) $error++; + + if (! $error) + { + setEventMessage($langs->trans("SetupSaved")); + } + else + { + setEventMessage($langs->trans("Error"),'errors'); + } +} ++// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) if ($action == 'setModuleOptions') { $post_size=count($_POST); @@ -582,6 +597,35 @@ print '' print "\n"; print ''; +if ($conf->banque->enabled) +{ + $var=!$var; + print ''; + print $langs->trans("ASK_PAYMENT_BANK_DURING_PROPOSAL").' '; + if (! empty($conf->use_javascript_ajax)) + { + print ajax_constantonoff('ASK_PAYMENT_BANK_DURING_PROPOSAL'); + } + else + { + if (empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL)) + { + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + } + } + print ''; +} +else +{ + $var=!$var; + print ''; + print $langs->trans("ASK_PAYMENT_BANK_DURING_PROPOSAL").' '.$langs->trans('NotAvailable').''; +} + print ''; From 81f467661e9f941aa3ad8074df1ca8aff2c8b566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Nov 2014 20:58:46 +0100 Subject: [PATCH 34/72] Update propal.php --- htdocs/comm/propal.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6d23d3a982d..b14c9516465 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1310,9 +1310,11 @@ if ($action == 'create') print ''; // Bank Account - print '' . $langs->trans('BankAccount') . ''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); - print ''; + if (! empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->module->banque->enabled) { + print '' . $langs->trans('BankAccount') . ''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + } // What trigger creation print '' . $langs->trans('Source') . ''; @@ -1892,7 +1894,7 @@ if ($action == 'create') print ''; } - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL)) + if (! empty($conf->global->ASK_PAYMENT_BANK_DURING_PROPOSAL) && $conf->banque->enabled) { // Bank Account print ''; From f5bc6dc6343f503019eb2a59ebba6343c3dee6f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 24 Nov 2014 21:01:55 +0100 Subject: [PATCH 35/72] Update propal.php --- htdocs/admin/propal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index c92f2bac5ab..de935b3d0f0 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -178,7 +178,8 @@ if ($action == 'set_ASK_PAYMENT_BANK_DURING_PROPOSAL') setEventMessage($langs->trans("Error"),'errors'); } } -+// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) + +// Define constants for submodules that contains parameters (forms with param1, param2, ... and value1, value2, ...) if ($action == 'setModuleOptions') { $post_size=count($_POST); From 9d813b25d96254c5b90e472790639ca15abd87a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:05:01 +0100 Subject: [PATCH 36/72] Fix Typo --- htdocs/core/boxes/box_graph_invoices_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_permonth.php b/htdocs/core/boxes/box_graph_invoices_permonth.php index b272f350717..9b2a5437b8a 100644 --- a/htdocs/core/boxes/box_graph_invoices_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_permonth.php @@ -215,9 +215,9 @@ class box_graph_invoices_permonth extends ModeleBoxes $stringtoshow.='
'; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From 6163635d7cb77d781da8bacd61fae363c9849c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:06:04 +0100 Subject: [PATCH 37/72] Fix Typo --- htdocs/core/boxes/box_graph_invoices_supplier_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php index c882acd40c1..7c2aa53da97 100644 --- a/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_invoices_supplier_permonth.php @@ -214,9 +214,9 @@ class box_graph_invoices_supplier_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfBillsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfBillsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From 9fb58e06f6585a008a675d033bff74aabbcf265f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:06:55 +0100 Subject: [PATCH 38/72] Fix Typo --- htdocs/core/boxes/box_graph_orders_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_orders_permonth.php b/htdocs/core/boxes/box_graph_orders_permonth.php index 5084691d321..75f0f60660f 100644 --- a/htdocs/core/boxes/box_graph_orders_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_permonth.php @@ -215,9 +215,9 @@ class box_graph_orders_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From e4517ee0f4d96cc382bad3990ce2ed46eacb146d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:07:45 +0100 Subject: [PATCH 39/72] Fix Typo --- htdocs/core/boxes/box_graph_orders_supplier_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php index f398ae9dcb1..70d62cac348 100644 --- a/htdocs/core/boxes/box_graph_orders_supplier_permonth.php +++ b/htdocs/core/boxes/box_graph_orders_supplier_permonth.php @@ -214,9 +214,9 @@ class box_graph_orders_supplier_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfOrdersByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfOrdersByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From 911f9c0913ec614e257c209a47a5fb80caa68d73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 01:13:52 +0100 Subject: [PATCH 40/72] Fix Typo --- htdocs/core/boxes/box_graph_propales_permonth.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/boxes/box_graph_propales_permonth.php b/htdocs/core/boxes/box_graph_propales_permonth.php index 974ccaed446..fd866f5df89 100644 --- a/htdocs/core/boxes/box_graph_propales_permonth.php +++ b/htdocs/core/boxes/box_graph_propales_permonth.php @@ -218,9 +218,9 @@ class box_graph_propales_permonth extends ModeleBoxes $stringtoshow.=''; $stringtoshow.=''; $stringtoshow.=''; - $stringtoshow.=' '.$langs->trans("NumberOfProposalsByMonth"); + $stringtoshow.=' '.$langs->trans("NumberOfProposalsByMonth"); $stringtoshow.='   '; - $stringtoshow.=' '.$langs->trans("AmountOfProposalsByMonthHT"); + $stringtoshow.=' '.$langs->trans("AmountOfProposalsByMonthHT"); $stringtoshow.='
'; $stringtoshow.=$langs->trans("Year").' '; $stringtoshow.=''; From 18406fc550d68bb5e851e242b6f928327bbe1a20 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Tue, 25 Nov 2014 14:26:45 +0100 Subject: [PATCH 41/72] Fix: Show sender Country on PDF docs Show sender Country on PDF docs when sender Country != receiver Country --- ChangeLog | 1 + htdocs/core/lib/functions.lib.php | 9 +++++---- htdocs/core/lib/pdf.lib.php | 5 ++++- .../core/modules/commande/doc/pdf_einstein.modules.php | 2 +- .../core/modules/commande/doc/pdf_proforma.modules.php | 2 +- htdocs/core/modules/contract/doc/pdf_strato.modules.php | 2 +- htdocs/core/modules/expedition/doc/pdf_merou.modules.php | 2 +- .../core/modules/expedition/doc/pdf_rouget.modules.php | 2 +- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php | 2 +- htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php | 2 +- htdocs/core/modules/propale/doc/pdf_azur.modules.php | 2 +- .../modules/supplier_invoice/pdf/pdf_canelle.modules.php | 2 +- .../modules/supplier_order/pdf/pdf_muscadet.modules.php | 2 +- 14 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34dd86aa02e..05f46019350 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ English Dolibarr ChangeLog - Fix: Chars - is no more allowed into value for code for extra fields. - Fix: [ bug #1622 ] Requesting holiday than spans across two years cause high CPU usage by Apache - Fix: [ bug #1595 ] Selected boolean extrafield in intervention creation page, does not save state +- Fix: Show sender Country on PDF docs when sender Country <> receiver Country ***** ChangeLog for 3.6.1 compared to 3.6.* ***** For users: diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index d679882161f..f6f09dd1567 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -719,11 +719,12 @@ function dol_bc($var,$moreclass='') * @param Object $object A company or contact object * @param int $withcountry 1=Add country into address string * @param string $sep Separator to use to build string + * @param Tranlsate $outputlangs Object lang that contains language for text translation. * @return string Formated string */ -function dol_format_address($object,$withcountry=0,$sep="\n") +function dol_format_address($object,$withcountry=0,$sep="\n",$outputlangs='') { - global $conf; + global $conf,$langs; $ret=''; $countriesusingstate=array('AU','US','IN','GB','ES','UK','TR'); @@ -768,8 +769,8 @@ function dol_format_address($object,$withcountry=0,$sep="\n") $ret.=", ".$object->state; } } - - if ($withcountry) $ret.=($object->country?$sep.$object->country:''); + if (! is_object($outputlangs)) $outputlangs=$langs; + if ($withcountry) $ret.=($object->country_code?$sep.$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$object->country_code)):''); return $ret; } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 17c1185e2e0..8b0091a6f6d 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -309,7 +309,10 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if ($mode == 'source') { - $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany))."\n"; + $withCountry = 0; + if (!empty($sourcecompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) $withCountry = 1; + + $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->convToOutputCharset(dol_format_address($sourcecompany, $withCountry, "\n", $outputlangs))."\n"; if (empty($conf->global->MAIN_PDF_DISABLESOURCEDETAILS)) { diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index b3dd27a8a7a..2f569f1e47f 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1177,7 +1177,7 @@ class pdf_einstein extends ModelePDFCommandes if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php index 49e3c374752..cf5a562e2ef 100644 --- a/htdocs/core/modules/commande/doc/pdf_proforma.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_proforma.modules.php @@ -1134,7 +1134,7 @@ class pdf_proforma extends ModelePDFCommandes if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index 238f51e78cd..88645973f6c 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -520,7 +520,7 @@ class pdf_strato extends ModelePDFContract $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index 14bc79bf935..cc9d884a831 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -516,7 +516,7 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetTextColor(0,0,0); // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); $pdf->SetFont('','', $default_font_size - 3); $pdf->SetXY($blSocX,$blSocY+4); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index 37e3f8b911f..eedc4b91827 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -564,7 +564,7 @@ class pdf_rouget extends ModelePdfExpedition $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posx=$this->marge_gauche; diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 6b66d9d2df3..e8ea460fb9b 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1363,7 +1363,7 @@ class pdf_crabe extends ModelePDFFactures if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php index c94cd154251..2c8214457e2 100644 --- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php +++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php @@ -505,7 +505,7 @@ class pdf_soleil extends ModelePDFFicheinter $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php index 3aae0e5a18e..ba58279c8ec 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php @@ -749,7 +749,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 29fea0d9c1a..d7d4b3150cf 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -1269,7 +1269,7 @@ class pdf_azur extends ModelePDFPropales $carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n"; } - $carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index d3cf60295f6..4124d4745f6 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -961,7 +961,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index 78a33f76a29..83d1aac952b 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -1005,7 +1005,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders if ($showaddress) { // Sender properties - $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur); + $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->client); // Show sender $posy=42; From fbdd8518751c34564ef4e6a389e16920e4377bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 25 Nov 2014 18:54:56 +0100 Subject: [PATCH 42/72] Fix remove not needed --- htdocs/compta/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index fc2943f05e0..2359d70d07b 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -678,7 +678,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us $societestatic->name=$obj->name; $societestatic->client=1; print $societestatic->getNomUrl(1,'customer',44); - print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.price($obj->total_ht).''; print ''.price($obj->total_ttc).''; print ''.price($obj->total_ttc-$obj->tot_fttc).''; @@ -777,7 +777,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire) $societestatic->name=$obj->name; $societestatic->client=1; print $societestatic->getNomUrl(1,'customer',44); - print ''; + print ''; if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.price($obj->total).''; print ''.price($obj->total_ttc).''; print ''.price($obj->am).''; From c4c69e191bdc616e25fd7f04448ba5189594a130 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Tue, 25 Nov 2014 20:13:43 +0100 Subject: [PATCH 43/72] Replace
tags --- build/doxygen/doxygen_footer.html | 4 ++-- build/doxygen/doxygen_header.html | 4 ++-- dev/skeletons/skeleton_page.php | 4 ++-- dev/test/testdiv.php | 8 ++++---- htdocs/accountancy/admin/card.php | 13 +++++++++---- htdocs/accountancy/admin/fiscalyear_card.php | 13 +++++++++---- htdocs/accountancy/customer/card.php | 7 +++++-- htdocs/adherents/admin/public.php | 6 +++--- htdocs/adherents/card.php | 8 ++++---- htdocs/adherents/card_subscriptions.php | 6 +++--- htdocs/adherents/type.php | 15 ++++++++++----- htdocs/admin/agenda.php | 4 ++-- htdocs/admin/agenda_extsites.php | 6 +++--- htdocs/admin/agenda_other.php | 2 +- htdocs/admin/agenda_xcal.php | 4 ++-- htdocs/admin/clicktodial.php | 2 +- htdocs/admin/company.php | 6 +++--- htdocs/admin/delais.php | 2 +- htdocs/admin/external_rss.php | 4 ++-- htdocs/admin/fckeditor.php | 2 +- htdocs/admin/ihm.php | 4 ++-- htdocs/admin/index.php | 2 +- htdocs/admin/ldap.php | 2 +- htdocs/admin/limits.php | 4 ++-- htdocs/admin/mails.php | 6 +++--- htdocs/admin/menus.php | 6 +++--- htdocs/admin/menus/edit.php | 16 ++++++++++------ htdocs/admin/notification.php | 2 +- htdocs/admin/pdf.php | 4 ++-- htdocs/admin/prelevement.php | 2 +- htdocs/admin/sms.php | 6 +++--- htdocs/admin/tools/index.php | 2 +- htdocs/admin/tools/purge.php | 2 +- htdocs/bookmarks/admin/bookmark.php | 2 +- htdocs/cashdesk/admin/cashdesk.php | 2 +- htdocs/cashdesk/tpl/liste_articles.tpl.php | 2 +- htdocs/categories/card.php | 6 +++--- htdocs/categories/edit.php | 3 +-- htdocs/categories/traduction.php | 16 ++++++++++------ htdocs/comm/action/card.php | 14 ++++++++------ htdocs/comm/address.php | 12 ++++++------ htdocs/comm/mailing/card.php | 8 ++++---- htdocs/comm/propal.php | 7 ++++--- htdocs/comm/remise.php | 6 +++--- htdocs/comm/remx.php | 6 +++--- htdocs/commande/card.php | 2 +- htdocs/commande/orderstoinvoice.php | 5 +++-- htdocs/compta/bank/annuel.php | 6 +++--- htdocs/compta/bank/card.php | 9 ++++++--- htdocs/compta/bank/virement.php | 2 +- htdocs/compta/deplacement/card.php | 13 +++++++++---- htdocs/compta/dons/card.php | 4 ++-- htdocs/compta/facture.php | 9 +++++---- htdocs/compta/localtax/card.php | 7 +++++-- htdocs/compta/paiement.php | 4 ++-- htdocs/compta/paiement/cheque/card.php | 4 ++-- htdocs/compta/paiement_charge.php | 8 +++----- htdocs/compta/prelevement/card.php | 4 ++-- htdocs/compta/prelevement/ligne.php | 2 +- htdocs/compta/salaries/card.php | 7 +++++-- htdocs/compta/tva/card.php | 7 +++++-- htdocs/contact/card.php | 10 +++++----- htdocs/contact/perso.php | 6 +++--- htdocs/contrat/card.php | 2 +- htdocs/core/class/html.formmail.class.php | 4 ++-- htdocs/core/class/html.formsms.class.php | 11 +++++------ htdocs/core/menus/standard/auguria.lib.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 2 +- htdocs/core/modules/dons/html_cerfafr.html | 4 ++-- htdocs/core/photos_resize.php | 4 ++-- htdocs/core/tpl/login.tpl.php | 10 +++++----- htdocs/core/tpl/passwordforgotten.tpl.php | 12 +++++------- htdocs/cron/admin/cron.php | 4 ++-- htdocs/ecm/docdir.php | 6 +++--- htdocs/expedition/card.php | 2 +- htdocs/exports/index.php | 4 ++-- htdocs/externalsite/admin/externalsite.php | 6 +++--- htdocs/externalsite/frames.php | 4 ++-- htdocs/fichinter/card.php | 8 ++++---- htdocs/fourn/commande/card.php | 2 +- htdocs/fourn/commande/dispatch.php | 4 ++-- htdocs/fourn/commande/orderstoinvoice.php | 9 +++++---- htdocs/fourn/facture/card.php | 4 ++-- htdocs/fourn/facture/paiement.php | 4 ++-- htdocs/ftp/admin/ftpclient.php | 2 +- htdocs/holiday/card.php | 4 ++-- htdocs/imports/import.php | 16 ++++++++-------- htdocs/imports/index.php | 4 ++-- htdocs/install/check.php | 6 +++--- htdocs/install/etape5.php | 16 ++++++++-------- htdocs/install/index.php | 4 ++-- htdocs/install/repair.php | 4 ++-- htdocs/opensurvey/card.php | 2 +- htdocs/opensurvey/wizard/choix_date.php | 8 ++++---- htdocs/opensurvey/wizard/index.php | 18 +++++++++--------- htdocs/paybox/admin/paybox.php | 2 +- htdocs/paybox/lib/paybox.lib.php | 6 +++--- htdocs/paypal/admin/paypal.php | 2 +- htdocs/paypal/lib/paypal.lib.php | 4 ++-- htdocs/product/card.php | 9 ++++++--- htdocs/product/composition/card.php | 8 +++++--- htdocs/product/fournisseurs.php | 8 +++++--- 102 files changed, 326 insertions(+), 276 deletions(-) diff --git a/build/doxygen/doxygen_footer.html b/build/doxygen/doxygen_footer.html index 1f4cbd00215..e11df270ddc 100755 --- a/build/doxygen/doxygen_footer.html +++ b/build/doxygen/doxygen_footer.html @@ -26,7 +26,7 @@ for $projectname by Doxygen $doxygenversio -
+
-
+
diff --git a/build/doxygen/doxygen_header.html b/build/doxygen/doxygen_header.html index 363d408d43c..0c2e189136b 100755 --- a/build/doxygen/doxygen_header.html +++ b/build/doxygen/doxygen_header.html @@ -24,7 +24,7 @@ File added into doxygen generated documentation
-
+
@@ -54,7 +54,7 @@ File added into doxygen generated documentation
$projectname
- $projectnumber
-
+
diff --git a/dev/skeletons/skeleton_page.php b/dev/skeletons/skeleton_page.php index deaecd95526..ac329318ae5 100644 --- a/dev/skeletons/skeleton_page.php +++ b/dev/skeletons/skeleton_page.php @@ -282,7 +282,7 @@ if ($action == 'create') print '
'; - print '
 
'; + print '
 
'; print ''; @@ -304,7 +304,7 @@ if (($id || $ref) && $action == 'edit') print '
'; - print '
'; + print '
'; print ''; diff --git a/dev/test/testdiv.php b/dev/test/testdiv.php index 8700be5b2ab..2f1bd9182ae 100644 --- a/dev/test/testdiv.php +++ b/dev/test/testdiv.php @@ -19,14 +19,14 @@ -
+
'."\n"; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 781de5f2913..aaf24d5b07e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -436,7 +436,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu print ''; print ''; print ''; print ''; print '
'."\n"; diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 2dc9c72968c..ca3f3510eee 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -157,8 +157,8 @@
-
__Date__ & __Signature__
-
__NOW__
+
__Date__ & __Signature__
+
__NOW__
diff --git a/htdocs/core/photos_resize.php b/htdocs/core/photos_resize.php index 2d18c6154f8..3a51a5f7567 100644 --- a/htdocs/core/photos_resize.php +++ b/htdocs/core/photos_resize.php @@ -173,11 +173,11 @@ if (! empty($conf->use_javascript_ajax)) print '
'; print ''.$langs->trans("Recenter").''; print $langs->trans("DefineNewAreaToPick").'...
'; - print '
'; + print '
'; print '
'; print ''; print '
'; - print '

'; + print '
'; print '
'.$langs->trans("NewSizeAfterCropping").': diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 23d8dd4f326..b314104f734 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -46,7 +46,7 @@ $(document).ready(function () { -
+