From 4e1f9babaf4e8f823824371f67f9cb6b2dab5185 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Mon, 3 Nov 2014 21:58:14 +0100 Subject: [PATCH 01/77] 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/77] 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/77] 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/77] 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 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 05/77] 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 06/77] 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 07/77] 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 08/77] 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 09/77] 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 10/77] 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 ''; - 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 7a18240d2f8f97eae9ac0d6c0c5a777171185b57 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 23 Nov 2014 23:22:49 +0100 Subject: [PATCH 11/77] 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 12/77] 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 13/77] 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 14/77] 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 15/77] 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 16/77] 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 17/77] 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 18/77] 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 19/77] 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 20/77] 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 21/77] 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 22/77] 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 23/77] 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 24/77] 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 25/77] 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 26/77] 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 27/77] 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 28/77] 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 29/77] 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 30/77] 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 31/77] 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 32/77] 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 33/77] 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 34/77] 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 () { -
+
- +
diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index 2fac2e2a16a..160c9afd8a8 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -67,8 +67,6 @@ else } } -$obj_facturation->calculTotaux(); -$total_ttc = $obj_facturation->prixTotalTtc(); echo ('

'.$langs->trans("Total").' : '.price(price2num($total_ttc, 'MT'),0,$langs,0,0,-1,$conf->currency).'

'."\n"); ?> diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index 15762ecf494..1aa1c0c4723 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -17,6 +17,7 @@ */ $langs->load("main"); +$langs->load("bills"); // Object $form must de defined @@ -111,8 +112,9 @@ $langs->load("main");

trans("Notes"); ?>

- " /> -

trans("RestartSelling"); ?>

+
diff --git a/htdocs/cashdesk/tpl/validation2.tpl.php b/htdocs/cashdesk/tpl/validation2.tpl.php index 9ebab951eb9..b00268d7b0a 100644 --- a/htdocs/cashdesk/tpl/validation2.tpl.php +++ b/htdocs/cashdesk/tpl/validation2.tpl.php @@ -18,10 +18,11 @@ */ $langs->load("main"); +$langs->load("bills"); ?> -

trans("SellFinished"); ?>

+

trans("SellFinished"); ?>


diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index a03256bfed4..fa943acda96 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -234,11 +234,11 @@ switch ($action) { if ($invoice->lines[$i]->fk_product > 0) { - $mouvP = new MouvementStock($this->db); + $mouvP = new MouvementStock($db); $mouvP->origin = &$invoice; // We decrease stock for product - if ($invoice->type == self::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $idwarehouse, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $idwarehouse, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); if ($result < 0) { $error++; } @@ -274,11 +274,11 @@ switch ($action) { if ($invoice->lines[$i]->fk_product > 0) { - $mouvP = new MouvementStock($this->db); + $mouvP = new MouvementStock($db); $mouvP->origin = &$invoice; // We decrease stock for product - if ($invoice->type == self::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $idwarehouse, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $idwarehouse, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); if ($result < 0) { $error++; } diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 3e20d071cee..5d1a2323ff0 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1418,7 +1418,7 @@ OSCommerceTestKo2=Connection to server '%s' with user '%s' failed. ##### Stock ##### StockSetup=Warehouse module setup UserWarehouse=Use user personal warehouses -IfYouUsePointOfSaleCheckModule=If you use a Point of Sale module (POS module provided by default or another external module), check also setup of this module: Most point of sales modules are designed to create immediatly an invoice. If you need to have a stock decrease when registering a sell from your Point Of Sale whatever is the option set here, check your POS module is set up for that. +IfYouUsePointOfSaleCheckModule=If you use a Point of Sale module (POS module provided by default or another external module), this setup may be ignored by your Point Of Sale module. Most point of sales modules are designed to create immediatly an invoice and decrease stock by default whatever are options here. So, if you need or not to have a stock decrease when registering a sell from your Point Of Sale, check also your POS module set up. ##### Menu ##### MenuDeleted=Menu deleted TreeMenu=Tree menus diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 5bd7999e2e3..f53931955d3 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -627,12 +627,14 @@ if ($resql) print ''.$obj->reel.($obj->reel<0?' '.img_warning():'').''; // PMP print ''.(price2num($obj->pmp)?price2num($obj->pmp,'MU'):'').''; // Ditto : Show PMP from movement or from product + // Value purchase print ''.(price2num($obj->pmp)?price(price2num($obj->pmp*$obj->reel,'MT')):'').''; // Ditto : Show PMP from movement or from product // Sell price print ''; if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price,'MU'),1); else print $langs->trans("Variable"); print ''; // Ditto : Show PMP from movement or from product + // Value sell print ''; if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($product->price*$obj->reel,'MT'),1).''; // Ditto : Show PMP from movement or from product else print $langs->trans("Variable"); @@ -663,6 +665,7 @@ print ''.$total.''; print ''; print ($totalwithpmp?price($totalvalue/$totalwithpmp):' '); print ''; +// Value purchase print ''; print price(price2num($totalvalue,'MT'),1); print ''; @@ -670,6 +673,7 @@ print ''; if (empty($conf->global->PRODUIT_MULTI_PRICES)) print ($total?price($totalvaluesell/$total,1):' '); else print $langs->trans("Variable"); print ''; +// Value to sell print ''; if (empty($conf->global->PRODUIT_MULTI_PRICES)) print price(price2num($totalvaluesell,'MT'),1); else print $langs->trans("Variable"); From da841e28cdf14c5065dcff099f783e0dc3450f82 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Nov 2014 01:39:24 +0100 Subject: [PATCH 71/77] Add warning --- ChangeLog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c567d47a9bc..ed4498c342a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -162,7 +162,8 @@ Dolibarr better: creation of a pdf or odt, hook "afterPDFCreation" or "afterODTCreation" must be used instead. - A lot of pages called fiche.php were renamed into card.php - A lot of pages called liste.php were renamed into list.php - +- If you used warehouse/stock module, recheck setup of stock increase/decrease rules of the + warehouse module and your Point Of Sale module if you use one. ***** ChangeLog for 3.6.2 compared to 3.6.1 ***** From 20e76aa4e66e1f47371a003ed591f9170b4a37f4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Nov 2014 02:05:45 +0100 Subject: [PATCH 72/77] Fixed: Use constant to hide a feature that will probably be broken. Also it is a superfluous feature. --- htdocs/core/class/commonobject.class.php | 39 +++++++++++++----------- htdocs/theme/eldy/style.css.php | 4 +++ 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 87ee2f1a1d2..1b0438bdea1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3016,30 +3016,33 @@ abstract class CommonObject $marginInfo = $this->getMarginInfos($force_price); - print $langs->trans('ShowMarginInfos').' : '; - $hidemargininfos = $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']; - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + if (! empty($conf->global->MARGIN_ADD_SHOWHIDE_BUTTON)) // FIXME Warning this feature rely on an external js file that may be removed. Using native js function document.cookie should be better + { + print $langs->trans('ShowMarginInfos').' : '; + $hidemargininfos = $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']; + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; - print ''; - if (!empty($hidemargininfos)) print ''; - - print ''; + print ''; + if (!empty($hidemargininfos)) print ''; + } + + print '
'; print ''; - print ''; - print ''; + print ''; + print ''; if ($conf->global->MARGIN_TYPE == "1") - print ''; + print ''; else - print ''; - print ''; + print ''; + print ''; if (! empty($conf->global->DISPLAY_MARGIN_RATES)) - print ''; + print ''; if (! empty($conf->global->DISPLAY_MARK_RATES)) - print ''; + print ''; print ''; if (! empty($conf->product->enabled)) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 5ac8a76fb53..c4d933d4940 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -1958,6 +1958,10 @@ input.liste_titre { background: none; } +.margintable td { + border: 0px !important; +} + /* Disable shadows */ .noshadow { -moz-box-shadow: 0px 0px 0px #DDD !important; From e2c606f4161da9584010792489b4d9c3d7d8422a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Nov 2014 14:12:59 +0100 Subject: [PATCH 73/77] Better translation --- htdocs/langs/en_US/admin.lang | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5d1a2323ff0..c013f2c8cfc 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -437,8 +437,8 @@ Module52Name=Stocks Module52Desc=Stock management (products) Module53Name=Services Module53Desc=Service management -Module54Name=Contracts -Module54Desc=Contract and service management +Module54Name=Contracts/Subscriptions +Module54Desc=Management of contracts (services or reccuring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Telephony @@ -475,8 +475,8 @@ Module320Name=RSS Feed Module320Desc=Add RSS feed inside Dolibarr screen pages Module330Name=Bookmarks Module330Desc=Bookmark management -Module400Name=Projects -Module400Desc=Project management inside other modules +Module400Name=Projects/Opportunity +Module400Desc=Management of projects or opportunity. You can then assign all other elements (invoice, order, proposal, intervention, ...) to this projects Module410Name=Webcalendar Module410Desc=Webcalendar integration Module500Name=Special expenses (tax, social contributions, dividends) @@ -606,11 +606,11 @@ Permission151=Read standing orders Permission152=Create/modify a standing orders request Permission153=Transmission standing orders receipts Permission154=Credit/refuse standing orders receipts -Permission161=Read contracts -Permission162=Create/modify contracts -Permission163=Activate a service of a contract -Permission164=Disable a service of a contract -Permission165=Delete contracts +Permission161=Read contracts/subscriptions +Permission162=Create/modify contracts/subscriptions +Permission163=Activate a service/subscription of a contract +Permission164=Disable a service/subscription of a contract +Permission165=Delete contracts/subscriptions Permission171=Read trips and expenses (own and his subordinates) Permission172=Create/modify trips and expenses Permission173=Delete trips and expenses @@ -672,7 +672,7 @@ Permission300=Read bar codes Permission301=Create/modify bar codes Permission302=Delete bar codes Permission311=Read services -Permission312=Assign service to contract +Permission312=Assign service/subscription to contract Permission331=Read bookmarks Permission332=Create/modify bookmarks Permission333=Delete bookmarks @@ -1161,7 +1161,7 @@ FicheinterNumberingModules=Intervention numbering models TemplatePDFInterventions=Intervention card documents models WatermarkOnDraftInterventionCards=Watermark on intervention card documents (none if empty) ##### Contracts ##### -ContractsSetup=Contracts module setup +ContractsSetup=Contracts/Subscriptions module setup ContractsNumberingModules=Contracts numbering modules TemplatePDFContracts=Contracts documents models FreeLegalTextOnContracts=Free text on contracts From d39dbe66c8f8fca02e9e453c254c28602e3e7512 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Nov 2014 14:51:57 +0100 Subject: [PATCH 74/77] Fix: Removed duplicate entrie into language files Renamed tool so all script to run before release start with "fix". --- dev/detectduplicatelangkey.sh | 21 ---------- dev/{fixnotabfiles.sh => detectnotabfiles.sh} | 2 +- dev/fixduplicatelangkey.sh | 38 +++++++++++++++++++ htdocs/langs/en_US/admin.lang | 2 - htdocs/langs/en_US/bills.lang | 3 -- htdocs/langs/en_US/categories.lang | 3 -- htdocs/langs/en_US/contracts.lang | 2 +- htdocs/langs/en_US/cron.lang | 5 +-- htdocs/langs/en_US/orders.lang | 3 +- htdocs/langs/en_US/resource.lang | 3 -- htdocs/langs/en_US/users.lang | 1 - htdocs/langs/en_US/withdrawals.lang | 3 +- 12 files changed, 44 insertions(+), 42 deletions(-) delete mode 100755 dev/detectduplicatelangkey.sh rename dev/{fixnotabfiles.sh => detectnotabfiles.sh} (91%) create mode 100755 dev/fixduplicatelangkey.sh diff --git a/dev/detectduplicatelangkey.sh b/dev/detectduplicatelangkey.sh deleted file mode 100755 index 06d9cd8a69e..00000000000 --- a/dev/detectduplicatelangkey.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Helps find duplicate translation keys in language files -# -# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr - -for file in `find . -type f` -do - dupes=$( - sed "s/^\s*//" "$file" | # Remove any leading whitespace - sed "s/\s*\=/=/" | # Remove any whitespace before = - grep -Po "(^.*?)=" | # Non greedeely match everything before = - sed "s/\=//" | # Remove trailing = so we get the key - sort | uniq -d # Find duplicates - ) - - if [ -n "$dupes" ] - then - echo "Duplicates found in $file" - echo "$dupes" - fi -done diff --git a/dev/fixnotabfiles.sh b/dev/detectnotabfiles.sh similarity index 91% rename from dev/fixnotabfiles.sh rename to dev/detectnotabfiles.sh index 3e5d28966c9..c89b999b03d 100755 --- a/dev/fixnotabfiles.sh +++ b/dev/detectnotabfiles.sh @@ -1,6 +1,6 @@ #!/bin/sh #------------------------------------------------------ -# Script to find files that are not Unix encoded +# Detect files that does not contains any tab inside # # Laurent Destailleur - eldy@users.sourceforge.net #------------------------------------------------------ diff --git a/dev/fixduplicatelangkey.sh b/dev/fixduplicatelangkey.sh new file mode 100755 index 00000000000..2d9cb7f7a85 --- /dev/null +++ b/dev/fixduplicatelangkey.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# Helps find duplicate translation keys in language files +# +# Copyright (C) 2014 Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr + + +# Syntax +if [ "x$1" != "xlist" -a "x$1" != "xfix" ] +then + echo "Usage: detectduplicatelangkey.sh (list|fix)" +fi + + +if [ "x$1" = "xlist" ] +then + for file in `find htdocs/langs/en_US -name *.lang -type f` + do + dupes=$( + sed "s/^\s*//" "$file" | # Remove any leading whitespace + sed "s/\s*\=/=/" | # Remove any whitespace before = + grep -Po "(^.*?)=" | # Non greedeely match everything before = + sed "s/\=//" | # Remove trailing = so we get the key + sort | uniq -d # Find duplicates + ) + + if [ -n "$dupes" ] + then + echo "Duplicates found in $file" + echo "$dupes" + fi + done +fi + +# To convert +if [ "x$1" = "xfix" ] +then + echo Feature not implemented. Please fix files manually. +fi diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index c013f2c8cfc..ecfa7497c79 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1039,7 +1039,6 @@ YesInSummer=Yes in summer OnlyFollowingModulesAreOpenedToExternalUsers=Note, only following modules are opened to external users (whatever are permission of such users): SuhosinSessionEncrypt=Session storage encrypted by Suhosin ConditionIsCurrently=Condition is currently %s -TestNotPossibleWithCurrentBrowsers=Automatic detection not possible YouUseBestDriver=You use driver %s that is best driver available currently. YouDoNotUseBestDriver=You use drive %s but driver %s is recommended. NbOfProductIsLowerThanNoPb=You have only %s products/services into database. This does not required any particular optimization. @@ -1548,7 +1547,6 @@ MAIN_APPLICATION_TITLE=Force visible name of application NbMajMin=Minimum number of uppercase characters NbNumMin=Minimum number of numeric characters NbSpeMin=Minimum number of special characters -NbSpeMin=Minimum number of special characters NbIteConsecutive=Maximum number of repeating same characters NoAmbiCaracAutoGeneration=Do not use ambiguous characters ("1","l","i","|","0","O") for automatic generation SalariesSetup=Setup of module salaries diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 5c16e18e4cf..9429a682857 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -137,8 +137,6 @@ BillFrom=From BillTo=To ActionsOnBill=Actions on invoice NewBill=New invoice -Prélèvements=Standing order -Prélèvements=Standing orders LastBills=Last %s invoices LastCustomersBills=Last %s customers invoices LastSuppliersBills=Last %s suppliers invoices @@ -219,7 +217,6 @@ NoInvoice=No invoice ClassifyBill=Classify invoice SupplierBillsToPay=Suppliers invoices to pay CustomerBillsUnpaid=Unpaid customers invoices -DispenseMontantLettres=The bill drafted by mechanographical are exempt from the order in letters DispenseMontantLettres=The written invoices through mecanographic procedures are dispensed by the order in letters NonPercuRecuperable=Non-recoverable SetConditions=Set payment terms diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 0fe3b72b81f..7a3c7f0c288 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -101,9 +101,6 @@ CatSupLinks=Links between suppliers and categories CatCusLinks=Links between customers/prospects and categories CatProdLinks=Links between products/services and categories CatMemberLinks=Links between members and categories -CatProdLinks=Products -CatCusLinks=Customer/Prospects -CatSupLinks=Suppliers DeleteFromCat=Remove from category DeletePicture=Picture delete ConfirmDeletePicture=Confirm picture deletion? diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang index e06aadef531..511516dc755 100644 --- a/htdocs/langs/en_US/contracts.lang +++ b/htdocs/langs/en_US/contracts.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - contracts ContractsArea=Contracts area ListOfContracts=List of contracts -LastContracts=Last %s modified contracts +LastModifiedContracts=Last %s modified contracts AllContracts=All contracts ContractCard=Contract card ContractStatus=Contract status diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 69cf8e0491c..5432c5b5b52 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -18,9 +18,8 @@ CronExplainHowToRunUnix=On Unix environment you should use crontab to run Comman CronExplainHowToRunWin=On Microsoft(tm) Windows environement you can use Scheduled task tools to run Command line each minutes # Menu CronJobs=Scheduled jobs -CronListActive= List of active jobs -CronListInactive= List of disabled jobs -CronListActive= List of scheduled jobs +CronListActive=List of active/scheduled jobs +CronListInactive=List of disabled jobs # Page list CronDateLastRun=Last run CronLastOutput=Last run output diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 76986b67621..3eab6893735 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -53,7 +53,7 @@ ShippingExist=A shipment exists DraftOrWaitingApproved=Draft or approved not yet ordered DraftOrWaitingShipped=Draft or validated not yet shipped MenuOrdersToBill=Orders delivered -MenuOrdersToBill2=Orders to bill +MenuOrdersToBill2=Billable orders SearchOrder=Search order SearchACustomerOrder=Search a customer order ShipProduct=Ship product @@ -154,7 +154,6 @@ OrderByPhone=Phone CreateInvoiceForThisCustomer=Bill orders NoOrdersToInvoice=No orders billable CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders. -MenuOrdersToBill2=Billables orders OrderCreation=Order creation Ordered=Ordered OrderCreated=Your orders have been created diff --git a/htdocs/langs/en_US/resource.lang b/htdocs/langs/en_US/resource.lang index 3fbe6e4fb23..d64075dfbf5 100755 --- a/htdocs/langs/en_US/resource.lang +++ b/htdocs/langs/en_US/resource.lang @@ -16,11 +16,8 @@ ResourceType=Resource type ResourceFormLabel_description=Resource description ResourcesLinkedToElement=Resources linked to element -RessourceLineSuccessfullyUpdated=Resource successfully updated -RessourceLineSuccessfullyDeleted=Resource successfully deleted ShowResourcePlanning=Show resource planning -NoResourceInDatabase=No resource in database GotoDate=Go to date ResourceElementPage=Element resources diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index c13e3e767bb..9670d002be6 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -63,7 +63,6 @@ ShowGroup=Show group ShowUser=Show user NonAffectedUsers=Non assigned users UserModified=User modified successfully -GroupModified=Group modified successfully PhotoFile=Photo file UserWithDolibarrAccess=User with Dolibarr access ListOfUsersInGroup=List of users in this group diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index 35cfa23d9e2..fd4305bbd0b 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -41,14 +41,13 @@ TransMetod=Transmission method Send=Send Lines=Lines StandingOrderReject=Issue a rejection -InvoiceRefused=Invoice refused WithdrawalRefused=Withdrawal refused WithdrawalRefusedConfirm=Are you sure you want to enter a withdrawal rejection for society RefusedData=Date of rejection RefusedReason=Reason for rejection RefusedInvoicing=Billing the rejection NoInvoiceRefused=Do not charge the rejection -InvoiceRefused=Charge the rejection to customer +InvoiceRefused=Invoice refused (Charge the rejection to customer) Status=Status StatusUnknown=Unknown StatusWaiting=Waiting From e395fd8096094046731d0950b138bbf473c655c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Nov 2014 15:24:39 +0100 Subject: [PATCH 75/77] Fix CRLF --- dev/optimize_images.sh | 26 +++++- htdocs/cashdesk/affContenu.php | 8 +- htdocs/cashdesk/include/environnement.php | 2 +- htdocs/cashdesk/validation_verif.php | 80 +++++++++---------- htdocs/commande/card.php | 2 +- .../modSyncSupplierWebServices.class.php | 0 htdocs/fourn/commande/card.php | 2 +- htdocs/install/upgrade.php | 0 htdocs/install/upgrade2.php | 0 htdocs/product/stock/card.php | 6 +- test/phpunit/FunctionsLibTest.php | 32 ++++---- 11 files changed, 91 insertions(+), 67 deletions(-) mode change 100755 => 100644 htdocs/core/modules/modSyncSupplierWebServices.class.php mode change 100755 => 100644 htdocs/install/upgrade.php mode change 100755 => 100644 htdocs/install/upgrade2.php diff --git a/dev/optimize_images.sh b/dev/optimize_images.sh index 616eec75757..1899d0221e1 100755 --- a/dev/optimize_images.sh +++ b/dev/optimize_images.sh @@ -37,7 +37,8 @@ optimize_image() max_input_size=$(expr $max_input_size + $input_file_size) if [ "${1##*.}" = "png" ]; then - optipng -o1 -clobber -quiet $1 -out $2.firstpass + #optipng -o1 -clobber -quiet $1 -out $2.firstpass + optipng -o1 -quiet $1 -out $2.firstpass pngcrush -q -rem alla -reduce $2.firstpass $2 >/dev/null rm -fr $2.firstpass fi @@ -67,6 +68,25 @@ get_max_file_length() main() { + test=`type pngcrush >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool pngcrush not found" && exit + fi + + test=`type optipng >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool optipng not found" && exit + fi + + test=`type jpegtran >/dev/null 2>&1` + result=$? + if [ "x$result" == "x1" ]; then + echo "Tool jpegtran not found" && exit + fi + + # If $INPUT is empty, then we use current directory if [[ "$INPUT" == "" ]]; then INPUT=$(pwd) @@ -81,6 +101,8 @@ main() OUTPUT='/tmp/optimize' fi + echo "Mode is $INPLACE (0=Images are replaced, 1=New images are stored into $OUTPUT)" + # We create the output directory mkdir -p $OUTPUT @@ -96,6 +118,7 @@ main() # Search of all jpg/jpeg/png in $INPUT # We remove images from $OUTPUT if $OUTPUT is a subdirectory of $INPUT + echo "Scan $INPUT to find images" IMAGES=$(find $INPUT -regextype posix-extended -regex '.*\.(jpg|jpeg|png)' | grep -v $OUTPUT) if [ "$QUIET" == "0" ]; then @@ -103,6 +126,7 @@ main() echo fi for CURRENT_IMAGE in $IMAGES; do + echo "Process $CURRENT_IMAGE" filename=$(basename $CURRENT_IMAGE) if [ "$QUIET" == "0" ]; then printf '%s ' "$filename" diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index dd57a2fd988..6d8f5ca83ee 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -45,13 +45,13 @@ else -$obj_facturation->calculTotaux(); // Redefine prix_total_ttc, prix_total_ht et montant_tva from $_SESSION['poscart'] +$obj_facturation->calculTotaux(); // Redefine prix_total_ttc, prix_total_ht et montant_tva from $_SESSION['poscart'] -$total_ttc = $obj_facturation->prixTotalTtc(); +$total_ttc = $obj_facturation->prixTotalTtc(); -/*var_dump($obj_facturation); +/*var_dump($obj_facturation); var_dump($_SESSION['poscart']); -var_dump($total_ttc); +var_dump($total_ttc); exit;*/ diff --git a/htdocs/cashdesk/include/environnement.php b/htdocs/cashdesk/include/environnement.php index 7411b998272..3e6a88f252a 100644 --- a/htdocs/cashdesk/include/environnement.php +++ b/htdocs/cashdesk/include/environnement.php @@ -32,7 +32,7 @@ $conf_db_base = $dolibarr_main_db_name; $conf_fksoc = (! empty($_SESSION["CASHDESK_ID_THIRDPARTY"]))?$_SESSION["CASHDESK_ID_THIRDPARTY"]:($conf->global->CASHDESK_ID_THIRDPARTY>0?$conf->global->CASHDESK_ID_THIRDPARTY:0); // Identifiant unique correspondant a l'entrepot a utiliser $conf_fkentrepot = (! empty($_SESSION["CASHDESK_ID_WAREHOUSE"]))?$_SESSION["CASHDESK_ID_WAREHOUSE"]:($conf->global->CASHDESK_ID_WAREHOUSE>0?$conf->global->CASHDESK_ID_WAREHOUSE:0); -if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $conf_fkentrepot = 0; // If option to disable stock decrease is on, we set warehouse id to 0. +if (! empty($conf->global->CASHDESK_NO_DECREASE_STOCK)) $conf_fkentrepot = 0; // If option to disable stock decrease is on, we set warehouse id to 0. // Identifiant unique correspondant au compte caisse / liquide $conf_fkaccount_cash = (! empty($_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]))?$_SESSION["CASHDESK_ID_BANKACCOUNT_CASH"]:($conf->global->CASHDESK_ID_BANKACCOUNT_CASH>0?$conf->global->CASHDESK_ID_BANKACCOUNT_CASH:0); diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index fa943acda96..27ce3380dd4 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -226,25 +226,25 @@ switch ($action) if ($warehouseidtodecrease > 0) { // Decrease - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; - $langs->load("agenda"); - // Loop on each line - $cpt=count($invoice->lines); - for ($i = 0; $i < $cpt; $i++) - { - if ($invoice->lines[$i]->fk_product > 0) - { - $mouvP = new MouvementStock($db); - $mouvP->origin = &$invoice; - // We decrease stock for product - if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - if ($result < 0) { - $error++; - } - } + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); + // Loop on each line + $cpt=count($invoice->lines); + for ($i = 0; $i < $cpt; $i++) + { + if ($invoice->lines[$i]->fk_product > 0) + { + $mouvP = new MouvementStock($db); + $mouvP->origin = &$invoice; + // We decrease stock for product + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + if ($result < 0) { + $error++; + } + } } - } + } } else { @@ -263,28 +263,28 @@ switch ($action) $resultvalid=$invoice->validate($user, $obj_facturation->numInvoice(), 0); - if ($warehouseidtodecrease > 0) - { - // Decrease - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; - $langs->load("agenda"); - // Loop on each line - $cpt=count($invoice->lines); - for ($i = 0; $i < $cpt; $i++) - { - if ($invoice->lines[$i]->fk_product > 0) - { - $mouvP = new MouvementStock($db); - $mouvP->origin = &$invoice; - // We decrease stock for product - if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); - if ($result < 0) { - $error++; - } - } - } - } + if ($warehouseidtodecrease > 0) + { + // Decrease + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); + // Loop on each line + $cpt=count($invoice->lines); + for ($i = 0; $i < $cpt; $i++) + { + if ($invoice->lines[$i]->fk_product > 0) + { + $mouvP = new MouvementStock($db); + $mouvP->origin = &$invoice; + // We decrease stock for product + if ($invoice->type == $invoice::TYPE_CREDIT_NOTE) $result=$mouvP->reception($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + else $result=$mouvP->livraison($user, $invoice->lines[$i]->fk_product, $warehouseidtodecrease, $invoice->lines[$i]->qty, $invoice->lines[$i]->subprice, $langs->trans("InvoiceValidatedInDolibarrFromPos",$invoice->newref)); + if ($result < 0) { + $error++; + } + } + } + } $id = $invoice->id; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 79a6797245a..e31de409403 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1998,7 +1998,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $rowspan ++; // Bank Account - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled)) + if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER) && ! empty($conf->banque->enabled)) { print '
'.$langs->trans('Margins').''.$langs->trans('SellingPrice').''.$langs->trans('Margins').''.$langs->trans('SellingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('CostPrice').''.$langs->trans('Margin').''.$langs->trans('CostPrice').''.$langs->trans('Margin').''.$langs->trans('MarginRate').''.$langs->trans('MarginRate').''.$langs->trans('MarkRate').''.$langs->trans('MarkRate').'
'; print ''; // Bank Account - if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled)) + if (! empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER) && ! empty($conf->banque->enabled)) { print '
'; diff --git a/htdocs/core/modules/modSyncSupplierWebServices.class.php b/htdocs/core/modules/modSyncSupplierWebServices.class.php old mode 100755 new mode 100644 diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 3c7269c3e6f..753f91fbdda 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1544,7 +1544,7 @@ elseif (! empty($object->id)) print '
'; print '
'; diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php old mode 100755 new mode 100644 diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php old mode 100755 new mode 100644 diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 4c8ac74c463..2a7f64ee475 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -82,7 +82,7 @@ if ($action == 'add' && $user->rights->stock->creer) if (! empty($backtopage)) { - header("Location: ".$backtopage); + header("Location: ".$backtopage); exit; } else @@ -93,7 +93,7 @@ if ($action == 'add' && $user->rights->stock->creer) } else { - $action = 'create'; + $action = 'create'; setEventMessage($object->error, 'errors'); } } @@ -179,7 +179,7 @@ if ($action == 'create') print "
\n"; print ''; print ''; - print ''; + print ''; dol_fiche_head(); diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index af5f3393672..0ace96c6719 100755 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -824,32 +824,32 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase $this->assertEquals(dol_nl2br($string, 1, 1), "a
a"); } - /** - * testDolPrice2Num - * - * @return boolean - */ - public function testDolPrice2Num() + /** + * testDolPrice2Num + * + * @return boolean + */ + public function testDolPrice2Num() { - $this->assertEquals(1000, price2num('1 000.0')); - $this->assertEquals(1000, price2num('1 000','MT')); - $this->assertEquals(1000, price2num('1 000','MU')); + $this->assertEquals(1000, price2num('1 000.0')); + $this->assertEquals(1000, price2num('1 000','MT')); + $this->assertEquals(1000, price2num('1 000','MU')); $this->assertEquals(1000.123456, price2num('1 000.123456')); // Round down - $this->assertEquals(1000.12, price2num('1 000.123452','MT')); - $this->assertEquals(1000.12345, price2num('1 000.123452','MU'),"Test MU"); + $this->assertEquals(1000.12, price2num('1 000.123452','MT')); + $this->assertEquals(1000.12345, price2num('1 000.123452','MU'),"Test MU"); - // Round up - $this->assertEquals(1000.13, price2num('1 000.125456','MT')); - $this->assertEquals(1000.12546, price2num('1 000.125456','MU'),"Test MU"); + // Round up + $this->assertEquals(1000.13, price2num('1 000.125456','MT')); + $this->assertEquals(1000.12546, price2num('1 000.125456','MU'),"Test MU"); // Text can't be converted $this->assertEquals('12.4$',price2num('12.4$')); - $this->assertEquals('12r.4$',price2num('12r.4$')); + $this->assertEquals('12r.4$',price2num('12r.4$')); - return true; + return true; } } From 86e04cb62f2bbc5e91dfe9698d79f3bc5a318aa5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 30 Nov 2014 15:40:28 +0100 Subject: [PATCH 76/77] Enhance tool to fix images --- dev/optimize_images.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/dev/optimize_images.sh b/dev/optimize_images.sh index 1899d0221e1..0d532d054ad 100755 --- a/dev/optimize_images.sh +++ b/dev/optimize_images.sh @@ -10,6 +10,7 @@ INPLACE='0' max_input_size=0 max_output_size=0 + usage() { cat < Date: Mon, 1 Dec 2014 00:52:38 +0100 Subject: [PATCH 77/77] Fixed: Button at wrong place --- htdocs/comm/action/card.php | 55 ++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 596ce207f9b..12793a61fa1 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1248,34 +1248,6 @@ if ($id > 0) if ($action != 'edit') { - - if (empty($conf->global->SOCIETE_DISABLE_BUILDDOC)) { - print '
'; - print ''; // ancre - - /* - * Documents generes - */ - - $filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id; - $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id; - - $genallowed=$user->rights->agenda->myactions->create; - $delallowed=$user->rights->agenda->myactions->delete; - - $var=true; - - $somethingshown=$formfile->show_documents('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang); - - print '
'; - - - print '
'; - - print '
 
'; - } - - // Link to agenda views print '
'; print ''; @@ -1315,6 +1287,33 @@ if ($id > 0) print img_picto($langs->trans("ViewCal"),'object_calendarperuser','class="hideonsmartphone"').' '; print ''."\n"; print '
'; + + if (empty($conf->global->AGENDA_DISABLE_BUILDDOC)) + { + print '
 
'; + print ''; // ancre + + /* + * Documents generes + */ + + $filedir=$conf->agenda->multidir_output[$conf->entity].'/'.$object->id; + $urlsource=$_SERVER["PHP_SELF"]."?socid=".$object->id; + + $genallowed=$user->rights->agenda->myactions->create; + $delallowed=$user->rights->agenda->myactions->delete; + + $var=true; + + $somethingshown=$formfile->show_documents('agenda',$object->id,$filedir,$urlsource,$genallowed,$delallowed,'',0,0,0,0,0,'','','',$object->default_lang); + + print '
'; + + + print '
'; + + print '
 
'; + } } }