From 30d58f77db555c807251c4dfe1e0eb7ba1a7d486 Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 11 Apr 2017 11:33:05 +0200 Subject: [PATCH 01/85] FIX : forgotten parameter for right multicompany use --- htdocs/contact/document.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index 81f9b2a29be..2d8fe5b1d2e 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -39,7 +39,7 @@ $confirm = GETPOST('confirm', 'alpha'); // Security check if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'contact', $id, '',''); +$result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); // Get parameters $sortfield = GETPOST("sortfield",'alpha'); From 8a373b25ba04c33300ccd38fc5b02ad5c0ce1bd2 Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 11 Apr 2017 12:41:19 +0200 Subject: [PATCH 02/85] FIX : global $dateSelector isn't the good one, then date selector on objectline_create tpl was hidden --- htdocs/core/tpl/objectline_create.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index c43380a9e7a..c6f6a638c6c 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -37,7 +37,7 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob $usemargins=1; } -global $dateSelector, $forceall, $senderissupplier, $inputalsopricewithtax; +global $forceall, $senderissupplier, $inputalsopricewithtax; if (empty($dateSelector)) $dateSelector=0; if (empty($forceall)) $forceall=0; if (empty($senderissupplier)) $senderissupplier=0; From 551d79f1e22dad34d7595b97d7195e9999d685f2 Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 11 Apr 2017 17:36:21 +0200 Subject: [PATCH 03/85] FIX : close supplier makes no sense. we just need to know if it is accepted or not --- htdocs/supplier_proposal/card.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 9ed38461180..b306a7149e2 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -452,14 +452,6 @@ if (empty($reshook)) } } - // Close proposal - else if ($action == 'close' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel')) { - // prevent browser refresh from reopening proposal several times - if ($object->statut == 2) { - $object->setStatut(4); - } - } - // Set accepted/refused else if ($action == 'setstatut' && $user->rights->supplier_proposal->cloturer && ! GETPOST('cancel')) { if (! GETPOST('statut')) { @@ -1779,12 +1771,6 @@ if ($action == 'create') print '>' . $langs->trans('SetAcceptedRefused') . ''; } - // Close - if ($object->statut == 2 && $user->rights->supplier_proposal->cloturer) { - print ''; - } - // Clone if ($user->rights->supplier_proposal->creer) { print ''; From 396ea5489419f61b936510c49b010e6abb95974e Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 12 Apr 2017 11:09:49 +0200 Subject: [PATCH 04/85] Subprice was null in supplier proposal and line was not transfered to supplier order --- htdocs/supplier_proposal/class/supplier_proposal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index d14591b6b9f..8cbc3882fc4 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2781,7 +2781,7 @@ class SupplierProposalLine extends CommonObject $sql.= " ".price2num($this->localtax2_tx).","; $sql.= " '".$this->localtax1_type."',"; $sql.= " '".$this->localtax2_type."',"; - $sql.= " ".($this->subprice?price2num($this->subprice):"null").","; + $sql.= " ".price2num($this->subprice).","; $sql.= " ".price2num($this->remise_percent).","; $sql.= " ".(isset($this->info_bits)?"'".$this->info_bits."'":"null").","; $sql.= " ".price2num($this->total_ht).","; From e23a44bcdf49d8e15062ec04d233ae3968604db1 Mon Sep 17 00:00:00 2001 From: Christian Seiler Date: Sun, 16 Apr 2017 11:09:18 +0200 Subject: [PATCH 05/85] Added missing Slashes fixed line where two slashes were missing, that caused an error when creating barcodes. --- htdocs/core/lib/functions2.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 82449ac63cb..6d72a668269 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1074,7 +1074,7 @@ function check_value($mask,$value) // If an offset is asked if (! empty($reg[2]) && preg_match('/^\+/',$reg[2])) $maskoffset=preg_replace('/^\+/','',$reg[2]); - if (! empty($reg[3]) && preg_match('^\+',$reg[3])) $maskoffset=preg_replace('/^\+/','',$reg[3]); + if (! empty($reg[3]) && preg_match('/^\+/',$reg[3])) $maskoffset=preg_replace('/^\+/','',$reg[3]); // Define $sqlwhere From 433b9e6fe17840ba401415bff7d4f62d1200cec0 Mon Sep 17 00:00:00 2001 From: fappels Date: Tue, 18 Apr 2017 16:22:39 +0200 Subject: [PATCH 06/85] Fix typo in en_US admin tag --- htdocs/langs/en_US/admin.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index be60fc5db7c..068e44d920d 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -286,7 +286,7 @@ FindPackageFromWebSite=Find a package that provides feature you want (for exampl DownloadPackageFromWebSite=Download package (for example from official web site %s). UnpackPackageInDolibarrRoot=Unpack package files into Dolibarr server directory dedicated to Dolibarr: %s UnpackPackageInModulesRoot=Unpack package files into Dolibarr server directory dedicated to modules: %s -oiSetupIsReadyForUse=Module deployement is finished. You must however enable and setup the module in your application by going on the page to setup modules: %s. +SetupIsReadyForUse=Module deployement is finished. You must however enable and setup the module in your application by going on the page to setup modules: %s. NotExistsDirect=The alternative root directory is not defined.
InfDirAlt=Since version 3 it is possible to define an alternative root directory.This allows you to store, same place, plug-ins and custom templates.
Just create a directory at the root of Dolibarr (eg: custom).
InfDirExample=
Then declare it in the file conf.php
$dolibarr_main_url_root_alt='http://myserver/custom'
$dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
*These lines are commented with "#", to uncomment only remove the character. From 54256773c558f5599a2111c6010fc1ab1a8f6335 Mon Sep 17 00:00:00 2001 From: hugome Date: Fri, 21 Apr 2017 10:27:48 +0200 Subject: [PATCH 07/85] FIX: length_accounta return variable name --- htdocs/core/lib/accounting.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 8ec0713b01a..4d32aa899b3 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -151,7 +151,7 @@ function length_accounta($accounta) if ($accounta < 0 || empty($accounta)) return ''; - if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) return $account; + if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) return $accounta; $a = $conf->global->ACCOUNTING_LENGTH_AACCOUNT; if (! empty($a)) { From cd099bf3b1f02681176ec6e384825bb312e6ab32 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Apr 2017 12:42:54 +0200 Subject: [PATCH 08/85] Fix bad update of prices --- htdocs/product/admin/product_tools.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index 0d3ea7584f1..7e66181fdbc 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -42,8 +42,6 @@ $oldvatrate=GETPOST('oldvatrate'); $newvatrate=GETPOST('newvatrate'); //$price_base_type=GETPOST('price_base_type'); -$objectstatic = new Product($db); -$objectstatic2 = new ProductFournisseur($db); /* @@ -87,6 +85,7 @@ if ($action == 'convert') { $obj = $db->fetch_object($resql); + $objectstatic = new Product($db); // Object init must be into loop to avoid to get value of previous step $ret=$objectstatic->fetch($obj->rowid); if ($ret > 0) { @@ -150,7 +149,8 @@ if ($action == 'convert') if ($ret < 0 || $retm < 0) $error++; else $nbrecordsmodified++; } - + unset($objectstatic); + $i++; } } @@ -176,6 +176,7 @@ if ($action == 'convert') { $obj = $db->fetch_object($resql); + $objectstatic2 = new ProductFournisseur($db); // Object init must be into loop to avoid to get value of previous step $ret=$objectstatic2->fetch_product_fournisseur_price($obj->rowid); if ($ret > 0) { @@ -207,6 +208,8 @@ if ($action == 'convert') if ($ret < 0 || $retm < 0) $error++; else $nbrecordsmodified++; } + unset($objectstatic2); + $i++; } } From a2287fd1830083b998c5274212563c78bf5c1b44 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Apr 2017 13:46:41 +0200 Subject: [PATCH 09/85] Add example of sql request to fix llx_product_price --- htdocs/install/mysql/migration/repair.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 6b9ea2a16f7..b5ed611ea51 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -257,3 +257,14 @@ delete from llx_commande_fournisseur_dispatch where fk_commandefourndet = 0 or f delete from llx_menu where menu_handler = 'smartphone'; +-- Clean product prices +--delete from llx_product_price where date_price between '2017-04-20 06:51:00' and '2017-04-20 06:51:05'; +-- Set product prices into llx_product with last price into llx_product_prices +--update llx_product as p set +-- p.price = (select pp.price from llx_product_price as pp where pp.price_level = 1 and pp.fk_product = p.rowid order by pp.tms desc limit 1), +-- p.price_ttc = (select pp.price_ttc from llx_product_price as pp where pp.price_level = 1 and pp.fk_product = p.rowid order by pp.tms desc limit 1), +-- p.price_min = (select pp.price_min from llx_product_price as pp where pp.price_level = 1 and pp.fk_product = p.rowid order by pp.tms desc limit 1), +-- p.price_min_ttc = (select pp.price_min_ttc from llx_product_price as pp where pp.price_level = 1 and pp.fk_product = p.rowid order by pp.tms desc limit 1), +-- p.tva_tx = 0 +-- where price = 17.5 + From 8f97177dae03aca9df07fc2171d32df608f04bee Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Mon, 24 Apr 2017 14:44:44 +0200 Subject: [PATCH 10/85] FIX 6614 --- htdocs/compta/facture/fiche-rec.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 7217e1eedf7..4adfc24b4dc 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -889,7 +889,6 @@ if ($action == 'create') $object = new Facture($db); // Source invoice $product_static = new Product($db); - $formproject = new FormProjets($db); if ($object->fetch($id, $ref) > 0) { From d9cdaeb851671771c6a7ef483ebfe9fba03a0c9b Mon Sep 17 00:00:00 2001 From: AlainRnet Date: Mon, 24 Apr 2017 15:43:36 +0200 Subject: [PATCH 11/85] without html.formprojet.class.php called, not possible create invoice template cf. https://github.com/Dolibarr/dolibarr/issues/6614 without this class AND module Projects disabled, it's not possible to create an invoice template. So I pulled out the call of the class from the condition. --- htdocs/compta/facture/fiche-rec.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 706807c8f02..d164019b64d 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -35,8 +35,9 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; if (! empty($conf->projet->enabled)) { require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; + //require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; } +require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php'; From 0c7cfdb03753bcf5ab5550d94eb848c33e4c5921 Mon Sep 17 00:00:00 2001 From: philippe grand Date: Mon, 24 Apr 2017 16:36:58 +0200 Subject: [PATCH 12/85] Update code using new css class --- htdocs/admin/agenda.php | 3 +-- htdocs/admin/agenda_other.php | 11 ++--------- htdocs/admin/bank.php | 4 +--- htdocs/admin/company.php | 36 +++++++++++++---------------------- htdocs/admin/compta.php | 9 ++++----- htdocs/admin/events.php | 2 +- htdocs/admin/fichinter.php | 9 ++------- 7 files changed, 24 insertions(+), 50 deletions(-) diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index d076fcf7e26..051179d61ca 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -150,7 +150,6 @@ print $langs->trans("AgendaAutoActionDesc")."
\n"; print $langs->trans("OnlyActiveElementsAreShown").'
'; print "
\n"; -$var=true; print ''; print ''; print ''; @@ -180,7 +179,7 @@ if (! empty($triggers)) print ''."\n"; } } diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 6e0a62610aa..17ccd64d000 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -245,7 +245,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) clearstatcache(); - $var=true; foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/action/doc/"); @@ -263,10 +262,9 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) $classname = substr($file, 0, dol_strlen($file) -12); require_once $dir.'/'.$file; - $module = new $classname($db, new ActionComm($db)); + $module = new $classname($db, new ActionComm($db)); - - print "\n"; + print '\n'; print "\n"; @@ -338,8 +336,6 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print '
'.$langs->trans("ActionsEvents").''; $key='MAIN_AGENDA_ACTIONAUTO_'.$trigger['code']; $value=$conf->global->$key; - print ''; + print ''; print '
"; print (empty($module->name)?$name:$module->name); print "

'; } -$var=true; - print '
'; print ''; @@ -380,7 +376,6 @@ if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) } // AGENDA_DEFAULT_FILTER_TYPE - print ''."\n"; print ''.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").''."\n"; print ' '."\n"; @@ -389,7 +384,6 @@ $formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AG print ''."\n"; // AGENDA_DEFAULT_FILTER_STATUS - print ''."\n"; print ''.$langs->trans("AGENDA_DEFAULT_FILTER_STATUS").''."\n"; print ' '."\n"; @@ -398,7 +392,6 @@ $formactions->form_select_status_action('agenda', $conf->global->AGENDA_DEFAULT_ print ''."\n"; // AGENDA_DEFAULT_VIEW - print ''."\n"; print ''.$langs->trans("AGENDA_DEFAULT_VIEW").''."\n"; print ' '."\n"; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 98cecb2f44b..8ed1e3cd9ac 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -273,7 +273,6 @@ print "\n"; clearstatcache(); -$var = true; foreach ($dirmodels as $reldir) { foreach (array('', '/doc') as $valdir) { @@ -305,8 +304,7 @@ foreach ($dirmodels as $reldir) $modulequalified = 0; if ($modulequalified) { - $var = ! $var; - print ''; + print ''; print(empty($module->name) ? $name : $module->name); print "\n"; if (method_exists($module, 'info')) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 8c29fe67a1c..ef22d8ecb4a 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent - * Copyright (C) 2011-2016 Philippe Grand + * Copyright (C) 2011-2017 Philippe Grand * Copyright (C) 2015 Alexandre Spangaro * * This program is free software; you can redistribute it and/or modify @@ -545,7 +545,6 @@ if ($action == 'edit' || $action == 'updateedit') print ''; print ''.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").''; print "\n"; - $var=true; print ''; @@ -561,10 +560,9 @@ if ($action == 'edit' || $action == 'updateedit') print ''.$langs->trans("VATManagement").''.$langs->trans("Description").''; print ' '; print "\n"; - $var=true; - print ""; + print ""; print ''; print ""; print ""; @@ -573,7 +571,7 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; - print ""; + print ""; print '
'; print ""; print ""; @@ -595,10 +593,9 @@ if ($action == 'edit' || $action == 'updateedit') print ''; print ''; print "\n"; - $var=true; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; + print ""; print '
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; print ''; print ""; @@ -620,7 +617,7 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; - print ""; + print ""; print '
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; print ""; @@ -639,11 +636,10 @@ if ($action == 'edit' || $action == 'updateedit') print ''; print ''; print "\n"; - $var=true; // Note: When option is not set, it must not appears as set on on, because there is no default value for this option - print ""; + print ""; print '
'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ''; print ""; @@ -662,7 +658,7 @@ if ($action == 'edit' || $action == 'updateedit') print "\n"; - print ""; + print ""; print '
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; print ""; @@ -696,7 +692,6 @@ else print '
'; print ''; - $var=true; print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'.$langs->trans("CompanyName").''; @@ -799,7 +794,6 @@ else print ''; print ''; print ''; - $var=true; // Managing Director(s) @@ -965,7 +959,6 @@ else print ''; print ''; print "\n"; - $var=true; print ''; print ''; print "\n"; - $var=true; - print ""; + print ""; print '
'.$langs->trans("CompanyIds").''.$langs->trans("Value").'
'.$langs->trans("FiscalYearInformation").''.$langs->trans("Value").'
'.$langs->trans("FiscalMonthStart").''; @@ -983,10 +976,9 @@ else print ''.$langs->trans("VATManagement").''.$langs->trans("Description").' 
global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."
global->FACTURE_TVAOPTION)?"":" checked")."> ".$langs->trans("VATIsUsed")."'; print ""; print ""; @@ -995,7 +987,7 @@ else print "\n"; - print ""; + print ""; print '
global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."
global->FACTURE_TVAOPTION)?" checked":"")."> ".$langs->trans("VATIsNotUsed")."'; print ""; print ""; @@ -1018,10 +1010,9 @@ else print ''; print ''; print "\n"; - $var=true; - print ""; + print ""; print '
".$langs->trans("VATIsNotUsedDesc")."
'.$langs->transcountry("LocalTax1Management",$mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX1_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1on")?" checked":"")."> ".$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code)."'; print ""; print ""; @@ -1049,7 +1040,7 @@ else print "\n"; - print ""; + print ""; print '
".$langs->transcountry("LocalTax1IsUsedDesc",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX1_OPTION) || $conf->global->FACTURE_LOCAL_TAX1_OPTION == "localtax1off")?" checked":"")."> ".$langs->transcountry("LocalTax1IsNotUsed",$mysoc->country_code)."'; print ""; print ""; @@ -1069,10 +1060,9 @@ else print ''; print ''; print "\n"; - $var=true; - print ""; + print ""; print ''; // Products - print ''; + print ''; print ''; // Services - print ''; + print ''; print ''; + print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/admin/websites.php b/htdocs/admin/websites.php index b0c81ec18af..f7e71555943 100644 --- a/htdocs/admin/websites.php +++ b/htdocs/admin/websites.php @@ -450,7 +450,6 @@ if ($id) { $num = $db->num_rows($resql); $i = 0; - $var=true; if ($num) { // There is several pages @@ -499,11 +498,10 @@ if ($id) // Lines with values while ($i < $num) { - $var = ! $var; $obj = $db->fetch_object($resql); //print_r($obj); - print ''; + print ''; if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code))) { print ''; diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index d9595cd7fb0..af104fd4bfe 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -120,8 +120,7 @@ foreach($workflowcodes as $key => $params) $oldfamily = $family; } - $var = !$var; - print "\n"; + print "\n"; print "'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 275bbae8c36..31f29ff611c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -248,70 +248,72 @@ function dol_shutdown() */ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL) { - if (empty($method)) - { - $out = isset($_GET[$paramname])?$_GET[$paramname]:(isset($_POST[$paramname])?$_POST[$paramname]:''); - - // Management of default values - if (! isset($_GET['sortfield'])) // If we did a click on a field to sort, we do no apply default values - { - if (! empty($_GET['action']) && $_GET['action'] == 'create' && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname])) - { - $relativepathstring = $_SERVER["PHP_SELF"]; - if (constant('DOL_URL_ROOT')) $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'),'/').'/', '', $relativepathstring); - $relativepathstring = preg_replace('/^custom\//', '', $relativepathstring); - $relativepathstring = preg_replace('/^\//', '', $relativepathstring); - global $user; - if (! empty($user->default_values)) // $user->default_values defined from menu default values, and values loaded not at first - { - //var_dump($user->default_values[$relativepathstring]['createform']); - if (isset($user->default_values[$relativepathstring]['createform'][$paramname])) $out = $user->default_values[$relativepathstring]['createform'][$paramname]; - } - } - // Management of default search_filters and sort order - elseif (preg_match('/list.php$/', $_SERVER["PHP_SELF"]) && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname])) - { - $relativepathstring = $_SERVER["PHP_SELF"]; - if (constant('DOL_URL_ROOT')) $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'),'/').'/', '', $relativepathstring); - $relativepathstring = preg_replace('/^custom\//', '', $relativepathstring); - $relativepathstring = preg_replace('/^\//', '', $relativepathstring); - global $user; - if (! empty($user->default_values)) // $user->default_values defined from menu default values, and values loaded not at first - { - //var_dump($user->default_values[$relativepathstring]); - if ($paramname == 'sortfield') - { - if (isset($user->default_values[$relativepathstring]['sortorder'])) - { - foreach($user->default_values[$relativepathstring]['sortorder'] as $key => $val) - { - if ($out) $out.=', '; - $out.=$key; - } - } - } - elseif ($paramname == 'sortorder') - { - if (isset($user->default_values[$relativepathstring]['sortorder'])) - { - foreach($user->default_values[$relativepathstring]['sortorder'] as $key => $val) - { - if ($out) $out.=', '; - $out.=$val; - } - } - } - elseif (isset($user->default_values[$relativepathstring]['filters'][$paramname])) $out = $user->default_values[$relativepathstring]['filters'][$paramname]; - } - } - } - } + if (empty($method)) $out = isset($_GET[$paramname])?$_GET[$paramname]:(isset($_POST[$paramname])?$_POST[$paramname]:''); elseif ($method==1) $out = isset($_GET[$paramname])?$_GET[$paramname]:''; elseif ($method==2) $out = isset($_POST[$paramname])?$_POST[$paramname]:''; elseif ($method==3) $out = isset($_POST[$paramname])?$_POST[$paramname]:(isset($_GET[$paramname])?$_GET[$paramname]:''); elseif ($method==4) $out = isset($_POST[$paramname])?$_POST[$paramname]:(isset($_GET[$paramname])?$_GET[$paramname]:(isset($_COOKIE[$paramname])?$_COOKIE[$paramname]:'')); else return 'BadThirdParameterForGETPOST'; - + + if (empty($method) || $method == 3 || $method == 4) + { + // Management of default values + if (! isset($_GET['sortfield'])) // If we did a click on a field to sort, we do no apply default values + { + if (! empty($_GET['action']) && $_GET['action'] == 'create' && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname])) + { + $relativepathstring = $_SERVER["PHP_SELF"]; + if (constant('DOL_URL_ROOT')) $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'),'/').'/', '', $relativepathstring); + $relativepathstring = preg_replace('/^custom\//', '', $relativepathstring); + $relativepathstring = preg_replace('/^\//', '', $relativepathstring); + global $user; + if (! empty($user->default_values)) // $user->default_values defined from menu default values, and values loaded not at first + { + //var_dump($user->default_values[$relativepathstring]['createform']); + if (isset($user->default_values[$relativepathstring]['createform'][$paramname])) $out = $user->default_values[$relativepathstring]['createform'][$paramname]; + } + } + // Management of default search_filters and sort order + //elseif (preg_match('/list.php$/', $_SERVER["PHP_SELF"]) && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname])) + elseif (! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname])) + { + $relativepathstring = $_SERVER["PHP_SELF"]; + if (constant('DOL_URL_ROOT')) $relativepathstring = preg_replace('/^'.preg_quote(constant('DOL_URL_ROOT'),'/').'/', '', $relativepathstring); + $relativepathstring = preg_replace('/^custom\//', '', $relativepathstring); + $relativepathstring = preg_replace('/^\//', '', $relativepathstring); + global $user; + if (! empty($user->default_values)) // $user->default_values defined from menu default values + { + //var_dump($user->default_values[$relativepathstring]); + if ($paramname == 'sortfield') + { + if (isset($user->default_values[$relativepathstring]['sortorder'])) + { + foreach($user->default_values[$relativepathstring]['sortorder'] as $key => $val) + { + if ($out) $out.=', '; + $out.=dol_string_nospecial($key, ''); + } + } + } + elseif ($paramname == 'sortorder') + { + if (isset($user->default_values[$relativepathstring]['sortorder'])) + { + foreach($user->default_values[$relativepathstring]['sortorder'] as $key => $val) + { + if ($out) $out.=', '; + $out.=dol_string_nospecial($val, ''); + } + } + } + elseif (isset($user->default_values[$relativepathstring]['filters'][$paramname])) + $out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$paramname], ''); + } + } + } + } + if (! empty($check)) { // Replace vars like __DAY__, __MONTH__, __YEAR__, __MYCOUNTRYID__, __USERID__, __ENTITYID__ diff --git a/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN b/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN index d3044fc9bd8..d8ad49945bd 100755 --- a/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN +++ b/htdocs/webservices/demo_wsclient_actioncomm.php-NORUN @@ -107,8 +107,7 @@ if ($action=='create') 'projectid'=>'', 'note'=>'This is note', 'contactid'=>'', - 'usertodo'=>'1', - 'userdone'=>'1', + 'userownerod'=>'1', 'label'=>'Ceci est les titre de l\'envenement', 'percentage'=>'100', 'location'=>'Location1' diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index 99e8ea59e6f..c7e1f769d9a 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -101,8 +101,7 @@ $actioncomm_fields= array( 'percentage' => array('name'=>'percentage','type'=>'xsd:string'), 'author' => array('name'=>'author','type'=>'xsd:string'), 'usermod' => array('name'=>'usermod','type'=>'xsd:string'), - 'usertodo' => array('name'=>'usertodo','type'=>'xsd:string'), - 'userdone' => array('name'=>'userdone','type'=>'xsd:string'), + 'userownerid' => array('name'=>'userownerid','type'=>'xsd:string'), 'priority' => array('name'=>'priority','type'=>'xsd:string'), 'fulldayevent' => array('name'=>'fulldayevent','type'=>'xsd:string'), 'location' => array('name'=>'location','type'=>'xsd:string'), @@ -291,8 +290,7 @@ function getActionComm($authentication,$id) 'percentage'=> $actioncomm->percentage, 'author'=> $actioncomm->authorid, 'usermod'=> $actioncomm->usermodid, - 'usertodo'=> $actioncomm->userownerid, - 'userdone'=> $actioncomm->userdoneid, + 'userownerid'=> $actioncomm->userownerid, 'priority'=> $actioncomm->priority, 'fulldayevent'=> $actioncomm->fulldayevent, 'location'=> $actioncomm->location, @@ -437,8 +435,7 @@ function createActionComm($authentication,$actioncomm) $newobject->fk_project=$actioncomm['projectid']; $newobject->note=$actioncomm['note']; $newobject->contactid=$actioncomm['contactid']; - $newobject->userownerid=$actioncomm['usertodo']; - $newobject->userdoneid=$actioncomm['userdone']; + $newobject->userownerid=$actioncomm['userownerid']; $newobject->label=$actioncomm['label']; $newobject->percentage=$actioncomm['percentage']; $newobject->priority=$actioncomm['priority']; @@ -532,8 +529,7 @@ function updateActionComm($authentication,$actioncomm) $object->contactid=$actioncomm['contactid']; $object->fk_project=$actioncomm['projectid']; $object->note=$actioncomm['note']; - $object->userownerid=$actioncomm['usertodo']; - $object->userdoneid=$actioncomm['userdone']; + $object->userownerid=$actioncomm['userownerid']; $object->label=$actioncomm['label']; $object->percentage=$actioncomm['percentage']; $object->priority=$actioncomm['priority']; From d53654e64f46ff71aa5f4b87f62557371471b614 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 May 2017 20:41:44 +0200 Subject: [PATCH 81/85] Look and feel v6 --- htdocs/admin/ihm.php | 44 ------------------- htdocs/admin/pdf.php | 9 ++-- htdocs/comm/action/card.php | 8 ++-- htdocs/core/class/html.formactions.class.php | 5 ++- htdocs/core/lib/functions.lib.php | 4 +- htdocs/core/lib/security2.lib.php | 6 --- htdocs/core/lib/usergroups.lib.php | 13 ++++-- htdocs/holiday/list.php | 1 + htdocs/projet/activity/perday.php | 38 ++++++++-------- htdocs/projet/activity/perweek.php | 40 ++++++++--------- htdocs/theme/doliforge_logo.png | Bin 16587 -> 0 bytes htdocs/theme/eldy/style.css.php | 22 +++++----- htdocs/theme/md/style.css.php | 7 ++- htdocs/user/note.php | 1 + htdocs/user/passwordforgotten.php | 9 ---- 15 files changed, 80 insertions(+), 127 deletions(-) delete mode 100644 htdocs/theme/doliforge_logo.png diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 193ee35a80f..739a6fa4c88 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -50,18 +50,6 @@ $action = GETPOST('action'); if (! defined("MAIN_MOTD")) define("MAIN_MOTD",""); -// List of supported permanent search area -$searchform=array(); -/* deprecated -if (empty($conf->use_javascript_ajax)) -{ - $searchform=array("MAIN_SEARCHFORM_SOCIETE", "MAIN_SEARCHFORM_CONTACT", "MAIN_SEARCHFORM_PRODUITSERVICE", "MAIN_SEARCHFORM_ADHERENT", "MAIN_SEARCHFORM_PROJECT", "MAIN_SEARCHFORM_EMPLOYEE"); - $searchformconst=array($conf->global->MAIN_SEARCHFORM_SOCIETE,$conf->global->MAIN_SEARCHFORM_CONTACT,$conf->global->MAIN_SEARCHFORM_PRODUITSERVICE,$conf->global->MAIN_SEARCHFORM_ADHERENT,$conf->global->MAIN_SEARCHFORM_PROJECT,$conf->global->MAIN_SEARCHFORM_EMPLOYEE); - $searchformtitle=array($langs->trans("Companies"), $langs->trans("Contacts"), $langs->trans("ProductsAndServices"), $langs->trans("Members"), $langs->trans("Projects"), $langs->trans("Users")); - $searchformmodule=array('Module1Name','Module1Name','Module50Name','Module310Name','Module400Name'); -} -*/ - /* * Action @@ -275,21 +263,6 @@ if ($action == 'edit') // Edit show_theme(null,1); print '
'; - // List of permanent supported search box - if (! empty($searchform)) - { - print '
'.$langs->transcountry("LocalTax2Management",$mysoc->country_code).''.$langs->trans("Description").' 
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX2_OPTION == '1' || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2on")?" checked":"")."> ".$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code)."'; print ""; print ""; @@ -1101,7 +1091,7 @@ else print "\n"; - print ""; + print ""; print '\n"; foreach ($list as $key) { - - print ''; + print ''; // Param $libelle = $langs->trans($key); diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index 161b1aac45d..74525a6855b 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -105,7 +105,7 @@ foreach ($eventstolog as $key => $arr) print ''."\n"; } } diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 6c73afcf8f5..3695a593ece 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2014 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2017 Philippe Grand * * 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 @@ -291,7 +291,6 @@ foreach ($dirmodels as $reldir) $handle = opendir($dir); if (is_resource($handle)) { - $var=true; while (($file = readdir($handle))!==false) { @@ -410,7 +409,6 @@ print "\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/fichinter/doc/"); @@ -532,9 +530,7 @@ print ''; print ''; print "\n"; print "\n"; -$var=true; -$var=! $var; print ''; print ''; print ''; @@ -583,11 +579,10 @@ print '\n"; // Use services duration -$var = !$var; print ''; print ''; print ''; -print ''; +print ''; print ''; From e2dbcb2b5a68083711a373f2eaee78513eb20fcb Mon Sep 17 00:00:00 2001 From: philippe grand Date: Tue, 25 Apr 2017 11:59:18 +0200 Subject: [PATCH 13/85] Update code using new css class --- htdocs/admin/loan.php | 4 +--- htdocs/admin/mails_templates.php | 9 ++++----- htdocs/admin/modules.php | 6 ++---- htdocs/admin/oauth.php | 13 ++++--------- htdocs/admin/perms.php | 4 +--- htdocs/admin/salaries.php | 2 +- htdocs/admin/supplier_invoice.php | 5 ++--- htdocs/admin/supplier_order.php | 5 ++--- htdocs/admin/supplier_payment.php | 3 +-- htdocs/admin/syslog.php | 3 +-- htdocs/admin/taxes.php | 10 +++++----- htdocs/admin/websites.php | 4 +--- htdocs/admin/workflow.php | 3 +-- 13 files changed, 26 insertions(+), 45 deletions(-) diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index ee6b9ef74ee..86d963ed54f 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -96,9 +96,7 @@ print "\n"; foreach ($list as $key) { - - - print ''; + print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index f0bf5609adf..a4ec423b42f 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -4,7 +4,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2017 Philippe Grand * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel @@ -651,11 +651,10 @@ if ($resql) // Lines with values while ($i < $num) { - $var = ! $var; $obj = $db->fetch_object($resql); //print_r($obj); - print ''; + print ''; if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code))) { $tmpaction='edit'; @@ -689,7 +688,7 @@ if ($resql) // Show value for field if ($showfield) { - print ''; - print "\n"; + print "\n"; $url='https://www.dolistore.com'; print ''; print ''; @@ -790,7 +788,7 @@ if ($mode == 'marketplace') print ''; - print "\n"; + print "\n"; $url='https://partners.dolibarr.org'; print ''; print ''; diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index 34aa49ea237..c1bb5909e15 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -93,7 +93,6 @@ print $langs->trans("ListOfSupportedOauthProviders").'

'; print '
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."
global->FACTURE_LOCAL_TAX2_OPTION) || $conf->global->FACTURE_LOCAL_TAX2_OPTION == "localtax2off")?" checked":"")."> ".$langs->transcountry("LocalTax2IsNotUsed",$mysoc->country_code)."'; print ""; print ""; diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index c097b9f39b1..0c42659357a 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2013-2016 Philippe Grand + * Copyright (C) 2013-2017 Philippe Grand * Copyright (C) 2014 Marcos García * * This program is free software; you can redistribute it and/or modify @@ -119,7 +119,7 @@ print '
'; print ''; print ''; print "\n"; -print ''; +print ''; print '\n"; -print ''; +print ''; print '\n"; print "
'.$langs->trans('OptionMode').''.$langs->trans('Description').'
'.$langs->trans('OptionModeTrue').'
'.$langs->trans('OptionModeTrue').''.nl2br($langs->trans('OptionModeTrueDesc')); // Write info on way to count VAT //if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) @@ -133,7 +133,7 @@ print ''.nl2br($langs->trans('OptionModeTrueDesc')); // // print nl2br($langs->trans('OptionModeTrueInfoExpert')); //} print "
'.$langs->trans('OptionModeVirtual').'
'.$langs->trans('OptionModeVirtual').''.nl2br($langs->trans('OptionModeVirtualDesc'))."
\n"; @@ -149,8 +149,7 @@ print "
'; $key='MAIN_LOGEVENTS_'.$arr['id']; $value=$conf->global->$key; - print ''; + print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").' 
'; print ''; print "
'; print $langs->trans("UseServicesDurationOnFichinter"); print '
'; // To create an artificial CR for the current tr we are on + print '
'; // To create an artificial CR for the current tr we are on $okforextended = true; if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended = false; @@ -781,7 +780,7 @@ if ($resql) // Show value for field if ($showfield) { - print '
'; // To create an artificial CR for the current tr we are on + print '
'; // To create an artificial CR for the current tr we are on $okforextended = true; if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended = false; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 4eb82e6183c..c47586b2b2a 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -428,8 +428,6 @@ $h++; print "
\n"; -$var=true; - if ($mode == 'common') { @@ -782,7 +780,7 @@ if ($mode == 'marketplace') print '
'.$langs->trans("DoliStoreDesc").'
'.$langs->trans("DoliPartnersDesc").'
'; -$var = true; $i=0; foreach ($list as $key) @@ -116,31 +115,27 @@ foreach ($list as $key) if ($supported) { $redirect_uri=$urlwithroot.'/core/modules/oauth/'.$supportedoauth2array[$key[0]].'_oauthcallback.php'; - $var = !$var; - print ''; + print ''; print ''; print ''; } else { - $var = !$var; - print ''; + print ''; print ''; print ''; print ''; } // Api Id - $var = !$var; - print ''; + print ''; print ''; print ''; // Api Secret - $var = !$var; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index daafab71053..5acbeb2e627 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -140,7 +140,6 @@ if ($result) { $num = $db->num_rows($result); $i = 0; - $var = True; $oldmod = ""; while ($i < $num) @@ -187,8 +186,7 @@ if ($result) } - print ''; - + print ''; print ''; + print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 2619951e1b5..9e717ee125a 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2017 Philippe Grand * * 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 @@ -361,7 +361,6 @@ foreach ($dirmodels as $reldir) if (is_dir($dir)) { - $var=true; $handle=opendir($dir); @@ -379,7 +378,7 @@ foreach ($dirmodels as $reldir) $module = new $classname($db, new FactureFournisseur($db)); - print "\n"; + print "\n"; print "\n"; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index d54f0e367aa..7bca2418df3 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2010-2013 Juanjo Menent - * Copyright (C) 2011-2015 Philippe Grand + * Copyright (C) 2011-2017 Philippe Grand * * 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 @@ -382,7 +382,6 @@ print ''."\n"; clearstatcache(); -$var=true; foreach ($dirmodels as $reldir) { $dir = dol_buildpath($reldir."core/modules/supplier_order/pdf/"); @@ -403,7 +402,7 @@ foreach ($dirmodels as $reldir) $module = new $classname($db, new CommandeFournisseur($db)); - print "\n"; + print "\n"; print "\n"; diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 40caa94c8a8..0f6cbff6179 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -367,7 +367,6 @@ foreach ($dirmodels as $reldir) if (is_dir($dir)) { - $var=true; $handle=opendir($dir); @@ -385,7 +384,7 @@ foreach ($dirmodels as $reldir) $module = new $classname($db, new PaiementFourn($db)); - print "\n"; + print "\n"; print "\n"; diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 71d06ae8e64..40a94bffc71 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -194,7 +194,6 @@ print ''; print ''; print ''; print "\n"; -$var=true; foreach ($syslogModules as $moduleName) { @@ -207,7 +206,7 @@ foreach ($syslogModules as $moduleName) print ''; print ''; diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 788d8604584..dbdce59c3c5 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -136,10 +136,10 @@ else print ''; print ''; print "\n"; - print ''; + print ''; print '\n"; - print ''; + print ''; print '\n"; print "
'.$langs->trans("UseTheFollowingUrlAsRedirectURI").''; print '
'.$langs->trans("UseTheFollowingUrlAsRedirectURI").''.$langs->trans("FeatureNotYetSupported").'
'; print '
'; print '
'.img_object('',$picto).' '.$objMod->getName(); print ' '; diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index a04b23ce4fe..52470be4106 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -99,7 +99,7 @@ foreach ($list as $key) { - print '
"; print (empty($module->name)?$name:$module->name); print "
"; print (empty($module->name)?$name:$module->name); print "
"; print (empty($module->name)?$name:$module->name); print "
'.$langs->trans("Type").''.$langs->trans("Value").'
'; - print ' '; + print ' '; print $module->getName(); print '
'.$langs->trans('OptionVatMode').''.$langs->trans('Description').'
'.$langs->trans('OptionVATDefault').'
'.$langs->trans('OptionVATDefault').''.nl2br($langs->trans('OptionVatDefaultDesc')); print "
'.$langs->trans('OptionVATDebitOption').'
'.$langs->trans('OptionVATDebitOption').''.nl2br($langs->trans('OptionVatDebitOptionDesc'))."
\n"; @@ -152,7 +152,7 @@ else print '
 '.$langs->trans("Buy").''.$langs->trans("Sell").'
'.$langs->trans("Product").'
'.$langs->trans("Product").''; print $langs->trans("OnDelivery"); print ' ('.$langs->trans("SupposedToBeInvoiceDate").')'; @@ -163,7 +163,7 @@ else print '
'.$langs->trans("Services").'
'.$langs->trans("Services").''; if ($tax_mode == 0) { @@ -206,7 +206,7 @@ foreach ($list as $key) { - print '
".img_object('', $picto).$langs->trans('desc'.$key); if (! empty($params['warning'])) { From 4ab5674ffbbeb8af8ada5cc8c2a5b4b7ccd39bee Mon Sep 17 00:00:00 2001 From: Quentin Vial-Gouteyron Date: Tue, 25 Apr 2017 15:10:46 +0200 Subject: [PATCH 14/85] FIX ajax autocomplete on clone --- htdocs/core/class/html.form.class.php | 13 +++++++++---- htdocs/core/lib/ajax.lib.php | 2 ++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0b5778a512a..b29f7bc5bf3 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -965,18 +965,23 @@ class Form } // mode 1 $urloption='htmlname='.$htmlname.'&outjson=1&filter='.$filter; - print ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); + $out.= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); + $out.=''; if (empty($hidelabel)) print $langs->trans("RefOrLabel").' : '; else if ($hidelabel > 1) { if (! empty($conf->global->MAIN_HTML5_PLACEHOLDER)) $placeholder=' placeholder="'.$langs->trans("RefOrLabel").'"'; else $placeholder=' title="'.$langs->trans("RefOrLabel").'"'; if ($hidelabel == 2) { - print img_picto($langs->trans("Search"), 'search'); + $out.= img_picto($langs->trans("Search"), 'search'); } } - print 'global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; + $out.= 'global->THIRDPARTY_SEARCH_AUTOFOCUS) ? 'autofocus' : '').' />'; if ($hidelabel == 3) { - print img_picto($langs->trans("Search"), 'search'); + $out.= img_picto($langs->trans("Search"), 'search'); } } else diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 0193a33b305..e7d8a7cf538 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -181,10 +181,12 @@ function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLengt }); } console.log("ajax_autocompleter new value selected, we trigger change on original component so field #search_'.$htmlname.'"); + $("#search_'.$htmlname.'").trigger("change"); // We have changed value of the combo select, we must be sure to trigger all js hook binded on this event. This is required to trigger other javascript change method binded on original field by other code. } ,delay: 500 }).data("ui-autocomplete")._renderItem = function( ul, item ) { + return $("
  • ") .data( "ui-autocomplete-item", item ) // jQuery UI > 1.10.0 .append( \'\' + item.label + "" ) From 56e749df9f26a82dc988d9d3228b9f99966f8957 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Wed, 26 Apr 2017 16:12:27 +0200 Subject: [PATCH 15/85] FIX: supplier order line were always created with rang = 0 --- htdocs/fourn/class/fournisseur.commande.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 11d755b50a4..03898da3943 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1372,10 +1372,13 @@ class CommandeFournisseur extends CommonOrder $localtax2_type=$localtaxes_type[2]; $subprice = price2num($pu,'MU'); + + $rangmax = $this->line_max(); + $rang = $rangmax + 1; $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet"; $sql.= " (fk_commande, label, description, date_start, date_end,"; - $sql.= " fk_product, product_type,"; + $sql.= " fk_product, product_type, rang,"; $sql.= " qty, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, ref,"; $sql.= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit"; $sql.= ")"; @@ -1384,7 +1387,7 @@ class CommandeFournisseur extends CommonOrder $sql.= " ".($date_end?"'".$this->db->idate($date_end)."'":"null").","; if ($fk_product) { $sql.= $fk_product.","; } else { $sql.= "null,"; } - $sql.= "'".$product_type."',"; + $sql.= "'".$product_type."', ".$rang.","; $sql.= "'".$qty."', ".$txtva.", ".$txlocaltax1.", ".$txlocaltax2; $sql.= ", '".$localtax1_type."',"; From c69a1205c001b42ce9acaa7cdf62cc8c0f6caee4 Mon Sep 17 00:00:00 2001 From: fappels Date: Wed, 26 Apr 2017 19:06:41 +0200 Subject: [PATCH 16/85] Fix download delivery document --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 21344f5eca9..f029a569968 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2148,7 +2148,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu } // Wrapping pour les bons de livraison - else if ($modulepart == 'livraison' && !empty($conf->livraison->dir_output)) + else if ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->livraison->lire || preg_match('/^specimen/i',$original_file)) { From 4c5e78a2cee5c883c7718e8152fbede3554d1b5d Mon Sep 17 00:00:00 2001 From: alexis Algoud Date: Thu, 27 Apr 2017 16:30:57 +0200 Subject: [PATCH 17/85] NEW use pdktk to concat mass pdf because tcpdf generate avoid to split large file into multiple smaller file (all have same size) encounter issue with mailer provider virtual delivery service --- htdocs/core/actions_massactions.inc.php | 141 ++++++++++++++++-------- 1 file changed, 93 insertions(+), 48 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 74badc6daae..58e47a29ec8 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -406,60 +406,105 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $outputlangs->setDefaultLang($newlang); } - // Create empty PDF - $pdf=pdf_getInstance(); - if (class_exists('TCPDF')) - { - $pdf->setPrintHeader(false); - $pdf->setPrintFooter(false); + if(!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) { + // Create output dir if not exists + dol_mkdir($diroutputmassaction); + + // Defined name of merged file + $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); + $filename=preg_replace('/\s/','_',$filename); + + // Save merged file + if ($filter=='paye:0') + { + if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } + if ($year) $filename.='_'.$year; + if ($month) $filename.='_'.$month; + + if (count($files)>0) + { + + $now=dol_now(); + $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + + $input_files = ''; + foreach($files as $f) { + $input_files.=' '.escapeshellarg($f); + } + + $cmd = 'pdftk '.$input_files.' cat output '.escapeshellarg($file); + exec($cmd); + + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + + $langs->load("exports"); + setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + } + } - $pdf->SetFont(pdf_getPDFFont($outputlangs)); + else { + // Create empty PDF + $pdf=pdf_getInstance(); + if (class_exists('TCPDF')) + { + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + } + $pdf->SetFont(pdf_getPDFFont($outputlangs)); - if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); - // Add all others - foreach($files as $file) - { - // Charge un document PDF depuis un fichier. - $pagecount = $pdf->setSourceFile($file); - for ($i = 1; $i <= $pagecount; $i++) - { - $tplidx = $pdf->importPage($i); - $s = $pdf->getTemplatesize($tplidx); - $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); - $pdf->useTemplate($tplidx); - } - } + // Add all others + foreach($files as $file) + { + // Charge un document PDF depuis un fichier. + $pagecount = $pdf->setSourceFile($file); + for ($i = 1; $i <= $pagecount; $i++) + { + $tplidx = $pdf->importPage($i); + $s = $pdf->getTemplatesize($tplidx); + $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); + $pdf->useTemplate($tplidx); + } + } - // Create output dir if not exists - dol_mkdir($diroutputmassaction); + // Create output dir if not exists + dol_mkdir($diroutputmassaction); - // Defined name of merged file - $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); - $filename=preg_replace('/\s/','_',$filename); - - // Save merged file - if ($filter=='paye:0') - { - if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); - else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); - } - if ($year) $filename.='_'.$year; - if ($month) $filename.='_'.$month; - if ($pagecount) - { - $now=dol_now(); - $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - $pdf->Output($file,'F'); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($file, octdec($conf->global->MAIN_UMASK)); + // Defined name of merged file + $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); + $filename=preg_replace('/\s/','_',$filename); + + // Save merged file + if ($filter=='paye:0') + { + if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } + if ($year) $filename.='_'.$year; + if ($month) $filename.='_'.$month; + if ($pagecount) + { + $now=dol_now(); + $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + $pdf->Output($file,'F'); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); - $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + $langs->load("exports"); + setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + } } } From 18981ab0c9e9c716aa7d31cf9f6eafab3ff2cd23 Mon Sep 17 00:00:00 2001 From: fappels Date: Fri, 28 Apr 2017 11:39:33 +0200 Subject: [PATCH 18/85] Fix download donation document --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index f029a569968..f1dd6dc6e43 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2199,7 +2199,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu } // Wrapping pour les dons - else if ($modulepart == 'donation' && !empty($conf->donation->dir_output)) + else if ($modulepart == 'donation' && !empty($conf->don->dir_output)) { if ($fuser->rights->don->lire || preg_match('/^specimen/i',$original_file)) { From 88515c306fdf759abd5cf97797db7b92a461b97f Mon Sep 17 00:00:00 2001 From: phf Date: Fri, 28 Apr 2017 14:33:06 +0200 Subject: [PATCH 19/85] Fix Propal class doesn't have fetch_lines method yet --- htdocs/comm/propal/class/propal.class.php | 204 ++++++++++++---------- 1 file changed, 111 insertions(+), 93 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 46c6a55cf2f..348ca1938b0 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1366,102 +1366,13 @@ class Propal extends CommonObject $this->lines = array(); /* - * Lignes propales liees a un produit ou non + * Lines */ - $sql = "SELECT d.rowid, d.fk_propal, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,"; - $sql.= " d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,"; - $sql.= " d.fk_unit,"; - $sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label,'; - $sql.= ' d.date_start, d.date_end'; - $sql.= ' ,d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc'; - $sql.= " FROM ".MAIN_DB_PREFIX."propaldet as d"; - $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON d.fk_product = p.rowid"; - $sql.= " WHERE d.fk_propal = ".$this->id; - $sql.= " ORDER by d.rang"; - - $result = $this->db->query($sql); - if ($result) + $result=$this->fetch_lines(); + if ($result < 0) { - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafieldsline=new ExtraFields($this->db); - $line = new PropaleLigne($this->db); - $extralabelsline=$extrafieldsline->fetch_name_optionals_label($line->table_element,true); - - $num = $this->db->num_rows($result); - $i = 0; - - while ($i < $num) - { - $objp = $this->db->fetch_object($result); - - $line = new PropaleLigne($this->db); - - $line->rowid = $objp->rowid; //Deprecated - $line->id = $objp->rowid; - $line->fk_propal = $objp->fk_propal; - $line->fk_parent_line = $objp->fk_parent_line; - $line->product_type = $objp->product_type; - $line->label = $objp->custom_label; - $line->desc = $objp->description; // Description ligne - $line->qty = $objp->qty; - $line->tva_tx = $objp->tva_tx; - $line->localtax1_tx = $objp->localtax1_tx; - $line->localtax2_tx = $objp->localtax2_tx; - $line->subprice = $objp->subprice; - $line->fk_remise_except = $objp->fk_remise_except; - $line->remise_percent = $objp->remise_percent; - $line->price = $objp->price; // TODO deprecated - - $line->info_bits = $objp->info_bits; - $line->total_ht = $objp->total_ht; - $line->total_tva = $objp->total_tva; - $line->total_localtax1 = $objp->total_localtax1; - $line->total_localtax2 = $objp->total_localtax2; - $line->total_ttc = $objp->total_ttc; - $line->fk_fournprice = $objp->fk_fournprice; - $marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $line->fk_fournprice, $objp->pa_ht); - $line->pa_ht = $marginInfos[0]; - $line->marge_tx = $marginInfos[1]; - $line->marque_tx = $marginInfos[2]; - $line->special_code = $objp->special_code; - $line->rang = $objp->rang; - - $line->fk_product = $objp->fk_product; - - $line->ref = $objp->product_ref; // TODO deprecated - $line->product_ref = $objp->product_ref; - $line->libelle = $objp->product_label; // TODO deprecated - $line->product_label = $objp->product_label; - $line->product_desc = $objp->product_desc; // Description produit - $line->fk_product_type = $objp->fk_product_type; - $line->fk_unit = $objp->fk_unit; - - $line->date_start = $this->db->jdate($objp->date_start); - $line->date_end = $this->db->jdate($objp->date_end); - - // Multicurrency - $line->fk_multicurrency = $objp->fk_multicurrency; - $line->multicurrency_code = $objp->multicurrency_code; - $line->multicurrency_subprice = $objp->multicurrency_subprice; - $line->multicurrency_total_ht = $objp->multicurrency_total_ht; - $line->multicurrency_total_tva = $objp->multicurrency_total_tva; - $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; - - $line->fetch_optionals($line->id,$extralabelsline); - - $this->lines[$i] = $line; - //dol_syslog("1 ".$line->fk_product); - //print "xx $i ".$this->lines[$i]->fk_product; - $i++; - } - $this->db->free($result); + return -3; } - else - { - $this->error=$this->db->lasterror(); - return -1; - } - return 1; } @@ -1475,6 +1386,113 @@ class Propal extends CommonObject return -1; } } + + /** + * Load array lines + * + * @param int $only_product Return only physical products + * @return int <0 if KO, >0 if OK + */ + function fetch_lines($only_product=0) + { + $this->lines=array(); + + $sql = 'SELECT d.rowid, d.fk_propal, d.fk_parent_line, d.label as custom_label, d.description, d.price, d.tva_tx, d.localtax1_tx, d.localtax2_tx, d.qty, d.fk_remise_except, d.remise_percent, d.subprice, d.fk_product,'; + $sql.= ' d.info_bits, d.total_ht, d.total_tva, d.total_localtax1, d.total_localtax2, d.total_ttc, d.fk_product_fournisseur_price as fk_fournprice, d.buy_price_ht as pa_ht, d.special_code, d.rang, d.product_type,'; + $sql.= ' d.fk_unit,'; + $sql.= ' p.ref as product_ref, p.description as product_desc, p.fk_product_type, p.label as product_label,'; + $sql.= ' d.date_start, d.date_end'; + $sql.= ' ,d.fk_multicurrency, d.multicurrency_code, d.multicurrency_subprice, d.multicurrency_total_ht, d.multicurrency_total_tva, d.multicurrency_total_ttc'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'propaldet as d'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON (d.fk_product = p.rowid)'; + $sql.= ' WHERE d.fk_propal = '.$this->id; + if ($only_product) $sql .= ' AND p.fk_product_type = 0'; + $sql.= ' ORDER by d.rang'; + + dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + + $num = $this->db->num_rows($result); + + $i = 0; + while ($i < $num) + { + $objp = $this->db->fetch_object($result); + + $line = new PropaleLigne($this->db); + + $line->rowid = $objp->rowid; //Deprecated + $line->id = $objp->rowid; + $line->fk_propal = $objp->fk_propal; + $line->fk_parent_line = $objp->fk_parent_line; + $line->product_type = $objp->product_type; + $line->label = $objp->custom_label; + $line->desc = $objp->description; // Description ligne + $line->qty = $objp->qty; + $line->tva_tx = $objp->tva_tx; + $line->localtax1_tx = $objp->localtax1_tx; + $line->localtax2_tx = $objp->localtax2_tx; + $line->subprice = $objp->subprice; + $line->fk_remise_except = $objp->fk_remise_except; + $line->remise_percent = $objp->remise_percent; + $line->price = $objp->price; // TODO deprecated + + $line->info_bits = $objp->info_bits; + $line->total_ht = $objp->total_ht; + $line->total_tva = $objp->total_tva; + $line->total_localtax1 = $objp->total_localtax1; + $line->total_localtax2 = $objp->total_localtax2; + $line->total_ttc = $objp->total_ttc; + $line->fk_fournprice = $objp->fk_fournprice; + $marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $line->fk_fournprice, $objp->pa_ht); + $line->pa_ht = $marginInfos[0]; + $line->marge_tx = $marginInfos[1]; + $line->marque_tx = $marginInfos[2]; + $line->special_code = $objp->special_code; + $line->rang = $objp->rang; + + $line->fk_product = $objp->fk_product; + + $line->ref = $objp->product_ref; // TODO deprecated + $line->product_ref = $objp->product_ref; + $line->libelle = $objp->product_label; // TODO deprecated + $line->product_label = $objp->product_label; + $line->product_desc = $objp->product_desc; // Description produit + $line->fk_product_type = $objp->fk_product_type; + $line->fk_unit = $objp->fk_unit; + + $line->date_start = $this->db->jdate($objp->date_start); + $line->date_end = $this->db->jdate($objp->date_end); + + // Multicurrency + $line->fk_multicurrency = $objp->fk_multicurrency; + $line->multicurrency_code = $objp->multicurrency_code; + $line->multicurrency_subprice = $objp->multicurrency_subprice; + $line->multicurrency_total_ht = $objp->multicurrency_total_ht; + $line->multicurrency_total_tva = $objp->multicurrency_total_tva; + $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + + $line->fetch_optionals(); + + $this->lines[$i] = $line; + //dol_syslog("1 ".$line->fk_product); + //print "xx $i ".$this->lines[$i]->fk_product; + $i++; + } + + $this->db->free($result); + + return 1; + } + else + { + $this->error=$this->db->lasterror(); + return -3; + } + } /** * Update value of extrafields on the proposal From 05fe0d7fcdcefb15970d1a470e75c9e4187b54ec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Apr 2017 01:01:12 +0200 Subject: [PATCH 20/85] Fix doxygen --- htdocs/includes/odtphp/Segment.php | 30 +++++++++++++++--------- htdocs/includes/odtphp/odf.php | 37 +++++++++++++++++++----------- 2 files changed, 42 insertions(+), 25 deletions(-) diff --git a/htdocs/includes/odtphp/Segment.php b/htdocs/includes/odtphp/Segment.php index 39761aa4d04..d8a14d09df9 100644 --- a/htdocs/includes/odtphp/Segment.php +++ b/htdocs/includes/odtphp/Segment.php @@ -1,14 +1,16 @@ xmlParsed; } + /** * Analyse the XML code in order to find children * - * @param string $xml + * @param string $xml Xml * @return Segment */ protected function _analyseChildren($xml) @@ -172,11 +177,14 @@ class Segment implements IteratorAggregate, Countable } return $this; } + /** * Assign a template variable to replace * - * @param string $key - * @param string $value + * @param string $key Key + * @param string $value Value + * @param string $encode Encode + * @param string $charset Charset * @throws SegmentException * @return Segment */ @@ -230,7 +238,7 @@ IMG; /** * Shortcut to retrieve a child * - * @param string $prop + * @param string $prop Prop * @return Segment * @throws SegmentException */ @@ -245,8 +253,8 @@ IMG; /** * Proxy for setVars * - * @param string $meth - * @param array $args + * @param string $meth Meth + * @param array $args Args * @return Segment */ public function __call($meth, $args) diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index d052482845c..01633634705 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -1,16 +1,20 @@ {aaa} // instead of {aaa} so we should enhance this function. //print $key.'-'.$value.'-'.strpos($this->contentXml, $this->config['DELIMITER_LEFT'] . $key . $this->config['DELIMITER_RIGHT']).'
    '; - if (strpos($this->contentXml, $tag) === false && strpos($this->stylesXml , $tag) === false) { + if (strpos($this->contentXml, $tag) === false && strpos($this->stylesXml, $tag) === false) { //if (strpos($this->contentXml, '">'. $key . '') === false) { throw new OdfException("var $key not found in the document"); //} @@ -577,6 +583,7 @@ IMG; } else { + dol_syslog(get_class($this).'::exportAsAttachedPDF is used but the constant MAIN_DOL_SCRIPTS_ROOT with path to script directory was not defined.', LOG_WARNING); $command = '../../scripts/odt2pdf/odt2pdf.sh '.escapeshellcmd($name).' '.(is_numeric($conf->global->MAIN_ODT_AS_PDF)?'jodconverter':$conf->global->MAIN_ODT_AS_PDF); } @@ -642,7 +649,8 @@ IMG; /** * Returns a variable of configuration * - * @return string The requested variable of configuration + * @param string $configKey Config key + * @return string The requested variable of configuration */ public function getConfig($configKey) { @@ -678,7 +686,8 @@ IMG; /** * Empty the temporary working directory recursively - * @param $dir the temporary working directory + * + * @param string $dir The temporary working directory * @return void */ private function _rrmdir($dir) @@ -701,8 +710,8 @@ IMG; /** * return the value present on odt in [valuename][/valuename] * - * @param string $value name balise in the template - * @return string the value inside the balise + * @param string $valuename Balise in the template + * @return string The value inside the balise */ public function getvalue($valuename) { From 04b1535b12e8ec2049b4a73a5a614f8642fdfbf3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Apr 2017 14:59:40 +0200 Subject: [PATCH 21/85] FIX Found duplicate line when it is not. --- htdocs/accountancy/class/bookkeeping.class.php | 15 ++++++++++++--- htdocs/langs/en_US/errors.lang | 6 ++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 754dd262369..8f31b40bc54 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -169,7 +169,15 @@ class BookKeeping extends CommonObject if (empty($this->numero_compte) || $this->numero_compte == '-1') { $langs->load("errors"); - $this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet); + if (in_array($this->doc_type, array('bank', 'expense_report'))) + { + $this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type); + } + else + { + $this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForInvoiceLine', $this->fk_doc, $this->doc_type); + } + return -1; } @@ -178,11 +186,12 @@ class BookKeeping extends CommonObject $this->piece_num = 0; - // first check if line not yet in bookkeeping + // First check if line not yet already in bookkeeping $sql = "SELECT count(*) as nb"; $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element; $sql .= " WHERE doc_type = '" . $this->doc_type . "'"; - $sql .= " AND fk_docdet = " . $this->fk_docdet; + $sql .= " AND fk_doc = " . $this->fk_doc; + $sql .= " AND fk_docdet = " . $this->fk_docdet; // This field can be 0 is record is for several lines $sql .= " AND numero_compte = '" . $this->numero_compte . "'"; $sql .= " AND entity IN (" . getEntity("accountancy", 1) . ")"; diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 72912ca2b1f..4f700109c33 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -11,6 +11,7 @@ ErrorLoginAlreadyExists=Login %s already exists. ErrorGroupAlreadyExists=Group %s already exists. ErrorRecordNotFound=Record not found. ErrorFailToCopyFile=Failed to copy file '%s' into '%s'. +ErrorFailToCopyDir=Failed to copy directory '%s' into '%s'. ErrorFailToRenameFile=Failed to rename file '%s' into '%s'. ErrorFailToDeleteFile=Failed to remove file '%s'. ErrorFailToCreateFile=Failed to create file '%s'. @@ -115,7 +116,7 @@ ErrorNoActivatedBarcode=No barcode type activated ErrUnzipFails=Failed to unzip %s with ZipArchive ErrNoZipEngine=No engine to unzip %s file in this PHP ErrorFileMustBeADolibarrPackage=The file %s must be a Dolibarr zip package -ErrorFileRequired=It takes a package Dolibarr file +ErrorModuleFileRequired=You must select a Dolibarr module package file ErrorPhpCurlNotInstalled=The PHP CURL is not installed, this is essential to talk with Paypal ErrorFailedToAddToMailmanList=Failed to add record %s to Mailman list %s or SPIP base ErrorFailedToRemoveToMailmanList=Failed to remove record %s to Mailman list %s or SPIP base @@ -176,7 +177,8 @@ ErrorStockIsNotEnoughToAddProductOnShipment=Stock is not enough for product %s t ErrorStockIsNotEnoughToAddProductOnProposal=Stock is not enough for product %s to add it into a new proposal. ErrorFailedToLoadLoginFileForMode=Failed to get the login key for mode '%s'. ErrorModuleNotFound=File of module was not found. -ErrorFieldAccountNotDefinedForBankLine=Value for Accounting account not defined for source bank line %s +ErrorFieldAccountNotDefinedForBankLine=Value for Accounting account not defined for source line id %s (%s) +ErrorFieldAccountNotDefinedForInvoiceLine=Value for Accounting account not defined for invoice id %s (%s) ErrorBankStatementNameMustFollowRegex=Error, bank statement name must follow the following syntax rule %s ErrorPhpMailDelivery=Check that you don't use a too high number of recipients and that your email content is not similar to a Spam. Ask also your administrator to check firewall and server logs files for a more complete information. ErrorUserNotAssignedToTask=User must be assigned to task to be able to enter time consumed. From c9bfb6e945e248d4953100378b0d40e48c6ba32f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 29 Apr 2017 15:04:15 +0200 Subject: [PATCH 22/85] FIX Several bugs in accounting module. --- .../accountancy/journal/purchasesjournal.php | 259 ++++++++++-------- htdocs/accountancy/journal/sellsjournal.php | 240 +++++++++------- 2 files changed, 293 insertions(+), 206 deletions(-) diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 9790d124d56..81b45c6f82e 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -109,6 +109,7 @@ dol_syslog('accountancy/journal/purchasesjournal.php:: $sql=' . $sql); $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); + // les variables $cptfour = (! empty($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)) ? $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER : $langs->trans("CodeNotDef"); $cpttva = (! empty($conf->global->ACCOUNTING_VAT_BUY_ACCOUNT)) ? $conf->global->ACCOUNTING_VAT_BUY_ACCOUNT : $langs->trans("CodeNotDef"); @@ -123,8 +124,10 @@ if ($result) { $i = 0; while ( $i < $num ) { $obj = $db->fetch_object($result); + // contrôles $compta_soc = (! empty($obj->code_compta_fournisseur)) ? $obj->code_compta_fournisseur : $cptfour; + $compta_prod = $obj->compte; if (empty($compta_prod)) { if ($obj->product_type == 0) @@ -144,14 +147,21 @@ if ($result) { $tabfac[$obj->rowid]["type"] = $obj->type; $tabfac[$obj->rowid]["description"] = $obj->description; - $tabfac[$obj->rowid]["fk_facturefourndet"] = $obj->fdid; + //$tabfac[$obj->rowid]["fk_facturefourndet"] = $obj->fdid; + + // Avoid warnings + if (! isset($tabttc[$obj->rowid][$compta_soc])) $tabttc[$obj->rowid][$compta_soc] = 0; + if (! isset($tabht[$obj->rowid][$compta_prod])) $tabht[$obj->rowid][$compta_prod] = 0; + if (! isset($tabtva[$obj->rowid][$compta_tva])) $tabtva[$obj->rowid][$compta_tva] = 0; + $tabttc[$obj->rowid][$compta_soc] += $obj->total_ttc; $tabht[$obj->rowid][$compta_prod] += $obj->total_ht; $tabtva[$obj->rowid][$compta_tva] += $obj->total_tva; $tabcompany[$obj->rowid] = array ( 'id' => $obj->socid, 'name' => $obj->name, - 'code_fournisseur' => $obj->code_compta_fournisseur + 'code_fournisseur' => $obj->code_fournisseur, + 'code_compta_fournisseur' => $compta_soc ); $i ++; @@ -165,7 +175,7 @@ if ($action == 'writebookkeeping') { $now = dol_now(); $error = 0; - foreach ($tabfac as $key => $val) + foreach ($tabfac as $key => $val) // Loop on each invoice { $errorforline = 0; @@ -188,101 +198,136 @@ if ($action == 'writebookkeeping') { $companystatic->code_fournisseur = $tabcompany[$key]['code_fournisseur']; $companystatic->client = $tabcompany[$key]['code_client']; - foreach ( $tabttc[$key] as $k => $mt ) { - // get compte id and label - - $bookkeeping = new BookKeeping($db); - $bookkeeping->doc_date = $val["date"]; - $bookkeeping->doc_ref = $val["ref"]; - $bookkeeping->date_create = $now; - $bookkeeping->doc_type = 'supplier_invoice'; - $bookkeeping->fk_doc = $key; - $bookkeeping->fk_docdet = $val["fk_facturefourndet"]; - $bookkeeping->code_tiers = $tabcompany[$key]['code_fournisseur']; - $bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("Code_tiers"); - $bookkeeping->numero_compte = $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER; - $bookkeeping->montant = $mt; - $bookkeeping->sens = ($mt >= 0) ? 'C' : 'D'; - $bookkeeping->debit = ($mt <= 0) ? $mt : 0; - $bookkeeping->credit = ($mt > 0) ? $mt : 0; - $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; - $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create($user); - if ($result < 0) { - $error++; - $errorforline++; - setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); - } - } - + if (! $errorforline) + { + foreach ( $tabttc[$key] as $k => $mt ) { + // get compte id and label + if ($mt) { + $bookkeeping = new BookKeeping($db); + $bookkeeping->doc_date = $val["date"]; + $bookkeeping->doc_ref = $val["ref"]; + $bookkeeping->date_create = $now; + $bookkeeping->doc_type = 'supplier_invoice'; + $bookkeeping->fk_doc = $key; + $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add + $bookkeeping->code_tiers = $tabcompany[$key]['code_fournisseur']; + $bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("Code_tiers"); + $bookkeeping->numero_compte = $tabcompany[$key]['code_compta_fournisseur']; + $bookkeeping->montant = $mt; + $bookkeeping->sens = ($mt >= 0) ? 'C' : 'D'; + $bookkeeping->debit = ($mt <= 0) ? $mt : 0; + $bookkeeping->credit = ($mt > 0) ? $mt : 0; + $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; + $bookkeeping->fk_user_author = $user->id; + + $result = $bookkeeping->create($user); + if ($result < 0) { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists + { + $error++; + $errorforline++; + //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); + } + else + { + $error++; + $errorforline++; + setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); + } + } + } + } + } + // Product / Service - foreach ( $tabht[$key] as $k => $mt ) { - $accountingaccount = new AccountingAccount($db); - $accountingaccount->fetch(null, $k, true); - if ($mt) { - // get compte id and label - $accountingaccount = new AccountingAccount($db); - if ($accountingaccount->fetch(null, $k, true)) { - $bookkeeping = new BookKeeping($db); - $bookkeeping->doc_date = $val["date"]; - $bookkeeping->doc_ref = $val["ref"]; - $bookkeeping->date_create = $now; - $bookkeeping->doc_type = 'supplier_invoice'; - $bookkeeping->fk_doc = $key; - $bookkeeping->fk_docdet = $val["fk_facturefourndet"]; - $bookkeeping->code_tiers = ''; - $bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label; - $bookkeeping->numero_compte = $k; - $bookkeeping->montant = $mt; - $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; - $bookkeeping->debit = ($mt > 0) ? $mt : 0; - $bookkeeping->credit = ($mt <= 0) ? $mt : 0; - $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; - $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create($user); - if ($result < 0) { - $error++; - $errorforline++; - setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); - } - } - } - } - + if (! $errorforline) + { + foreach ( $tabht[$key] as $k => $mt ) { + $accountingaccount = new AccountingAccount($db); + $accountingaccount->fetch(null, $k, true); + if ($mt) { + // get compte id and label + $accountingaccount = new AccountingAccount($db); + if ($accountingaccount->fetch(null, $k, true)) { + $bookkeeping = new BookKeeping($db); + $bookkeeping->doc_date = $val["date"]; + $bookkeeping->doc_ref = $val["ref"]; + $bookkeeping->date_create = $now; + $bookkeeping->doc_type = 'supplier_invoice'; + $bookkeeping->fk_doc = $key; + $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add + $bookkeeping->code_tiers = ''; + $bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $accountingaccount->label; + $bookkeeping->numero_compte = $k; + $bookkeeping->montant = $mt; + $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; + $bookkeeping->debit = ($mt > 0) ? $mt : 0; + $bookkeeping->credit = ($mt <= 0) ? $mt : 0; + $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; + $bookkeeping->fk_user_author = $user->id; + + $result = $bookkeeping->create($user); + if ($result < 0) { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists + { + $error++; + $errorforline++; + //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); + } + else + { + $error++; + $errorforline++; + setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); + } + } + } + } + } + } + // VAT // var_dump($tabtva); - foreach ( $tabtva[$key] as $k => $mt ) { - if ($mt) { - // get compte id and label - $bookkeeping = new BookKeeping($db); - $bookkeeping->doc_date = $val["date"]; - $bookkeeping->doc_ref = $val["ref"]; - $bookkeeping->date_create = $now; - $bookkeeping->doc_type = 'supplier_invoice'; - $bookkeeping->fk_doc = $key; - $bookkeeping->fk_docdet = $val["fk_facturefourndet"]; - $bookkeeping->code_tiers = ''; - $bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.$def_tva[$key]; - $bookkeeping->numero_compte = $k; - $bookkeeping->montant = $mt; - $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; - $bookkeeping->debit = ($mt > 0) ? $mt : 0; - $bookkeeping->credit = ($mt <= 0) ? $mt : 0; - $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; - $bookkeeping->fk_user_author = $user->id; - - $result = $bookkeeping->create($user); - if ($result < 0) { - $error++; - $errorforline++; - setEventMessages($object->error, $object->errors, 'errors'); - } - } - } - - + if (! $errorforline) + { + foreach ( $tabtva[$key] as $k => $mt ) { + if ($mt) { + // get compte id and label + $bookkeeping = new BookKeeping($db); + $bookkeeping->doc_date = $val["date"]; + $bookkeeping->doc_ref = $val["ref"]; + $bookkeeping->date_create = $now; + $bookkeeping->doc_type = 'supplier_invoice'; + $bookkeeping->fk_doc = $key; + $bookkeeping->fk_docdet = 0; // Useless, can be several lines that are source of this record to add + $bookkeeping->code_tiers = ''; + $bookkeeping->label_compte = dol_trunc($companystatic->name, 16) . ' - ' . $invoicestatic->refsupplier . ' - ' . $langs->trans("VAT"). ' '.$def_tva[$key]; + $bookkeeping->numero_compte = $k; + $bookkeeping->montant = $mt; + $bookkeeping->sens = ($mt < 0) ? 'C' : 'D'; + $bookkeeping->debit = ($mt > 0) ? $mt : 0; + $bookkeeping->credit = ($mt <= 0) ? $mt : 0; + $bookkeeping->code_journal = $conf->global->ACCOUNTING_PURCHASE_JOURNAL; + $bookkeeping->fk_user_author = $user->id; + + $result = $bookkeeping->create($user); + if ($result < 0) { + if ($bookkeeping->error == 'BookkeepingRecordAlreadyExists') // Already exists + { + $error++; + $errorforline++; + //setEventMessages('Transaction for ('.$bookkeeping->doc_type.', '.$bookkeeping->doc_ref.', '.$bookkeeping->fk_docdet.') were already recorded', null, 'warnings'); + } + else + { + $error++; + $errorforline++; + setEventMessages($bookkeeping->error, $bookkeeping->errors, 'errors'); + } + } + } + } + } if (! $errorforline) { @@ -456,18 +501,19 @@ if (empty($action) || $action == 'view') { } $period = $form->select_date($date_start, 'date_start', 0, 0, 0, '', 1, 0, 1) . ' - ' . $form->select_date($date_end, 'date_end', 0, 0, 0, '', 1, 0, 1); - report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array ( - 'action' => '' - )); + + report_header($nom, $nomlink, $period, $periodlink, $description, $builddate, $exportlink, array('action' => '')); - if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) { + /*if ($conf->global->ACCOUNTING_EXPORT_MODELCSV != 1 && $conf->global->ACCOUNTING_EXPORT_MODELCSV != 2) { print ''; } else { print ''; - } + }*/ + print '
    '; print ''; - + print '
    '; + print ' -'; -*/ - llxFooter(); $db->close(); diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 8b1dc424239..3e6224e0c41 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -64,8 +64,8 @@ $dateend=dol_mktime(0, 0, 0, GETPOST('dateendmonth'), GETPOST('dateendday'), GET if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS); if (empty($action) && ! isset($_GET['action']) && ! isset($_POST['action'])) $action=(empty($conf->global->AGENDA_DEFAULT_VIEW)?'show_month':$conf->global->AGENDA_DEFAULT_VIEW); -$filter=GETPOST("filter",'',3); -$filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filtert","int",3); +$filter = GETPOST("filter",'',3); +$filtert = GETPOST("filtert","int",3); $usergroup = GETPOST("usergroup","int",3); $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 4f4ef6a580c..544da904cdc 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -38,8 +38,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3; -$filter=GETPOST("filter",'',3); -$filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filtert","int",3); +$filter = GETPOST("filter",'',3); +$filtert = GETPOST("filtert","int",3); $usergroup = GETPOST("usergroup","int",3); //if (! ($usergroup > 0) && ! ($filtert > 0)) $filtert = $user->id; //$showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; @@ -250,7 +250,7 @@ $picto='calendarweek'; $nav.='   '; $nav.=''; $nav.=''; -$nav.=''; +$nav.=''; $nav.=''; $nav.=''; $nav.=''; @@ -714,7 +714,7 @@ jQuery(document).ready(function() { else if (ids.indexOf(",") > -1) /* There is several events */ { /* alert(\'several events\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?usertodo="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; + url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; window.location.href = url; } else /* One event */ diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index 61bf98634c4..2a707cd2d8f 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -38,8 +38,8 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3; -$filter=GETPOST("filter",'',3); -$filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filtert","int",3); +$filter = GETPOST("filter",'',3); +$filtert = GETPOST("filtert","int",3); $usergroup = GETPOST("usergroup","int",3); //if (! ($usergroup > 0) && ! ($filtert > 0)) $filtert = $user->id; //$showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; @@ -252,7 +252,7 @@ $picto='calendarweek'; $nav.='   '; $nav.=''; $nav.=''; -$nav.=''; +$nav.=''; $nav.=''; $nav.=''; $nav.=''; @@ -663,7 +663,6 @@ else if ($usergroup > 0) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON u.rowid = ug.fk_user"; $sql.= " WHERE u.statut = 1 AND u.entity IN (".getEntity('user',1).")"; if ($usergroup > 0) $sql.= " AND ug.fk_usergroup = ".$usergroup; - //if (GETPOST("usertodo","int",3) > 0) $sql.=" AND u.rowid = ".GETPOST("usertodo","int",3); //print $sql; $resql=$db->query($sql); if ($resql) @@ -816,7 +815,7 @@ jQuery(document).ready(function() { else if (ids.indexOf(",") > -1) /* There is several events */ { /* alert(\'several events\'); */ - url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?usertodo="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; + url = "'.DOL_URL_ROOT.'/comm/action/listactions.php?filtert="+userid+"&dateselectyear="+year+"&dateselectmonth="+month+"&dateselectday="+day; window.location.href = url; } else /* One event */ diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 1f83690b096..4e9b458c3d0 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -76,7 +76,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print '
  • '; print $langs->trans("ActionsToDoBy").'   '; print ''; - print $form->select_dolusers($filtert, 'usertodo', 1, '', ! $canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print $form->select_dolusers($filtert, 'filtert', 1, '', ! $canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); if (empty($conf->dol_optimize_smallscreen)) print '   '.$langs->trans("or") . ' '.$langs->trans("ToUserOfGroup").'   '; print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', ! $canedit); print '
    '; - print ''; - foreach ($searchform as $key => $value) - { - print ''; - } - print '
    '.$langs->trans("PermanentLeftSearchForm").''.$langs->trans("Activated").'
    '.$searchformtitle[$key].''; - print $form->selectyesno($searchform[$key],$searchformconst[$key],1); - print '
    '; - print '
    '; - } - // Other print ''; print ''; @@ -476,23 +449,6 @@ else // Show print '
    '; - // List of search forms to show - if (! empty($searchform)) - { - print '
    '.$langs->trans("Parameters").''.$langs->trans("Value").'
    '; - print ''; - foreach ($searchform as $key => $value) - { - - print ''; - print ''; - } - print '
    '.$langs->trans("PermanentLeftSearchForm").''.$langs->trans("Activated").' 
    '.$searchformtitle[$key].''.yn($searchformconst[$key]).''; - if (! empty($searchformmodule[$key])) print $langs->trans("IfModuleEnabled",$langs->transnoentitiesnoconv($searchformmodule[$key])); - print '
    '; - print '
    '; - } - // Other print ''; print ''; diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 2e650c75696..6698be8b01f 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -306,8 +306,9 @@ else // Show $var=true; // Misc options - print load_fiche_titre($langs->trans("DictionaryPaperFormat"),'','').'
    '; - $var=true; + print load_fiche_titre($langs->trans("DictionaryPaperFormat"),'',''); + + print '
    '.$langs->trans("Parameters").''.$langs->trans("Value").'
    '; print ''; @@ -357,7 +358,7 @@ else // Show print '
    '; - print load_fiche_titre($langs->trans("PDFAddressForging"),'','').'
    '; + print load_fiche_titre($langs->trans("PDFAddressForging"),'',''); print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; print ''; @@ -444,7 +445,7 @@ else // Show print '
    '; // Other - print load_fiche_titre($langs->trans("Other"),'','').'
    '; + print load_fiche_titre($langs->trans("Other"),'',''); $var=true; print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '; print ''; diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 73d015d7db9..30b13bc3007 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -706,7 +706,7 @@ if ($action == 'create') if (GETPOST('complete') == '0' || GETPOST("afaire") == 1) $percent='0'; else if (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent=100; } - $formactions->form_select_status_action('formaction',$percent,1,'complete'); + $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); print ''; // Location @@ -1428,7 +1428,7 @@ if ($id > 0) } else { $value = $object->array_options["options_" . $key]; } - print '\n"; } @@ -1491,7 +1491,7 @@ if ($id > 0) { if (empty($conf->global->AGENDA_DISABLE_BUILDDOC)) { - print '
     

    '; + print '
    '; print ''; // ancre /* @@ -1512,8 +1512,6 @@ if ($id > 0) print '
    '; - - print '
     
    '; } } } diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index b799e0e2359..452ff89d914 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -54,9 +54,10 @@ class FormActions * @param string $htmlname Name of html prefix for html fields (selectX and valX) * @param integer $showempty Show an empty line if select is used * @param integer $onlyselect 0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running) + * @param string $morecss More css on select field * @return void */ - function form_select_status_action($formname,$selected,$canedit=1,$htmlname='complete',$showempty=0,$onlyselect=0) + function form_select_status_action($formname, $selected, $canedit=1, $htmlname='complete', $showempty=0, $onlyselect=0, $morecss='maxwidth100') { global $langs,$conf; @@ -120,7 +121,7 @@ class FormActions { //var_dump($selected); if ($selected == 'done') $selected='100'; - print ''; if ($showempty) print ''; foreach($listofstatus as $key => $val) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 31f29ff611c..262204b9f72 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -257,8 +257,10 @@ function GETPOST($paramname, $check='', $method=0, $filter=NULL, $options=NULL) if (empty($method) || $method == 3 || $method == 4) { + global $conf; + // Management of default values - if (! isset($_GET['sortfield'])) // If we did a click on a field to sort, we do no apply default values + if (! isset($_GET['sortfield']) && empty($conf->global->MAIN_DISABLE_DEFAULT_VALUES)) // If we did a click on a field to sort, we do no apply default values. Same if option MAIN_DISABLE_DEFAULT_VALUES is on { if (! empty($_GET['action']) && $_GET['action'] == 'create' && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname])) { diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index 5139128a5d8..a14645a3152 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -197,12 +197,6 @@ function dol_loginfunction($langs,$conf,$mysoc) if (! GETPOST("username")) $focus_element='username'; else $focus_element='password'; - $login_background=DOL_URL_ROOT.'/theme/login_background.png'; - if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/login_background.png')) - { - $login_background=DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/login_background.png'; - } - $demologin=''; $demopassword=''; if (! empty($dolibarr_main_demo)) diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 4350edc3797..8936cf98623 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -426,7 +426,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) print ''; - // BackgroundColor + // Background color THEME_ELDY_BACKBODY if ($foruserprofile) { /* @@ -609,7 +609,7 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default")); } - print '   ('.$langs->trans("Default").': 3c3c14) '; + print '   ('.$langs->trans("Default").': 3c3c14) '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); print ''; @@ -654,9 +654,14 @@ function show_theme($fuser,$edit=0,$foruserprofile=false) { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK,array()),''); if ($color) print ''; - else print $langs->trans("Default"); + else + { + //print ''; + //print ''.$langs->trans("Default").''; + print $langs->trans("Default"); + } } - print '   ('.$langs->trans("Default").': 000078) '; + print '   ('.$langs->trans("Default").': 000078) '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); print ''; } diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index d9c5fdf43c0..f91616d0b9a 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -282,6 +282,7 @@ print ''; print ''; print ''; print ''; +if ($id > 0) print ''; if ($sall) { diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index c50cbd014f7..c1aa8aaa469 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -407,25 +407,7 @@ print '
    '; print '
    '; print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").'
    '.$label.''; + print '
    '.$label.''; print $extrafields->showOutputField($key,$value); print "
    '."\n"; -print ''; -print ''; -print ''; -print ''; -if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY)) -{ - print ''; -} -print ''; -print ''; -print ''; -if ($usertoprocess->id == $user->id) print ''; -else print ''; -print ''; -print ''; -print ''; -print "\n"; - -print ''; +print ''; print ''; print ''; print ''; @@ -444,6 +426,24 @@ print $searchpitco; print ''; print "\n"; +print ''; +print ''; +print ''; +print ''; +if (! empty($conf->global->PROJECT_LINES_PERDAY_SHOW_THIRDPARTY)) +{ + print ''; +} +print ''; +print ''; +print ''; +if ($usertoprocess->id == $user->id) print ''; +else print ''; +print ''; +print ''; +print ''; +print "\n"; + // By default, we can edit only tasks we are assigned to $restrictviewformytask=(empty($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)?1:0); diff --git a/htdocs/projet/activity/perweek.php b/htdocs/projet/activity/perweek.php index 989424afd67..905b93393dd 100644 --- a/htdocs/projet/activity/perweek.php +++ b/htdocs/projet/activity/perweek.php @@ -402,6 +402,26 @@ print '
    '; print '
    '; print '
    '.$langs->trans("RefTask").''.$langs->trans("LabelTask").''.$langs->trans("ProjectRef").''.$langs->trans("ThirdParty").''.$langs->trans("PlannedWorkload").''.$langs->trans("ProgressDeclared").''.$langs->trans("TimeSpent").''.$langs->trans("TimeSpentByYou").''.$langs->trans("TimeSpentByUser").''.$langs->trans("HourStart").''.$langs->trans("Duration").''.$langs->trans("Note").'
    '.$langs->trans("RefTask").''.$langs->trans("LabelTask").''.$langs->trans("ProjectRef").''.$langs->trans("ThirdParty").''.$langs->trans("PlannedWorkload").''.$langs->trans("ProgressDeclared").''.$langs->trans("TimeSpent").''.$langs->trans("TimeSpentByYou").''.$langs->trans("TimeSpentByUser").''.$langs->trans("HourStart").''.$langs->trans("Duration").''.$langs->trans("Note").'
    '."\n"; +print ''; +print ''; +print ''; +print ''; +if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY)) print ''; +print ''; +print ''; +print ''; +print ''; +for($i=0;$i<7;$i++) +{ + print ''; +} +// Action column +print ''; +print "\n"; + print ''; print ''; print ''; @@ -425,26 +445,6 @@ for($i=0;$i<7;$i++) print ''; print "\n"; -print ''; -print ''; -print ''; -print ''; -if (! empty($conf->global->PROJECT_LINES_PERWEEK_SHOW_THIRDPARTY)) print ''; -print ''; -print ''; -print ''; -print ''; -for($i=0;$i<7;$i++) -{ - print ''; -} -// Action column -print ''; -print "\n"; - // By default, we can edit only tasks we are assigned to $restrictviewformytask=(empty($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSIGNED)?1:0); diff --git a/htdocs/theme/doliforge_logo.png b/htdocs/theme/doliforge_logo.png deleted file mode 100644 index c9de1b5012c45670d346b4f699a01ab8d257d415..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16587 zcmV)lK%c*fP)bL6Y5D_aHvCe``*T6diDo$q|-ectzZ$M+q@wrw%9&1^H< z`L!uCLvY@W`#EXKKp-HNE?p{u!Jx>^%@w9;3RP7_B9Rcft_#C3&Uifc9UL4Knx@IN z^7Hcrm31^4mB;eEqA2pkeIk*Fh{a-}r>938J9cc!cJuP`#ATOVCfj$FKacfzJi_ny zi{as6`5pVs&uokB@;uz1{iv<2mHp`M?iPiGg`%LKK%6>tN{o$-iR$WV*|r=o>>rQE z<@?^=Ub&yo=aX%>wY7<%p&>DE-aI)T+&D%@jvSHK$Md=45DtgM$&)ALXYOBCRwl2R z*TT)REaCNf%#$UX5K!pEpUr`#z|m2LpxLfd4+r0N z0mAkCtp zB3cCk(qN>?DXe7HVfEN%e67OqWx z2kT0pc`#;P4ZyTDuN_d$f`UZfe6N)#j9P)NAz#5^T=|%4By@~ZjA8f6%1XPlvs2RC zDaJ&m5oWgkI~G%gl~YSgOFcT|$x?L_+8xwQ)d)_Ahe~cLw=?2JAuI*=(RCXRl_i}0 zO~@&*Y8n8&34u2VQuiE&V2_2gIx-HWk+!BaJzsVx5Put{4L zwkfT?$0sZ!$=yMH6$_(8Fne)`uIZX*PWaf{D~H-{4kSgR?hzuH6h_3a?>|;J?`tPK z&v7m{e@)!O~*^n{%U zY4kvwYuJmv7U(RbN1V}O+7_&&p?D$*&EGes1qKY&8wNbb0I|5&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xwp$@=Dd;_lWs{q?yFnGi7nY;9Qea(J< zu-SHs)4&tM_O*jQxKjvYJR24m8_b?er%_KgdCWlnBBUx0Zg0a5-4 zAbPpMKHdJ>FLT@HI_>n;7@zZEBWT>z##Am4(-80@--5qC1L!{H_Xienu|>sMCW2N} zRke)BDw#~uc>;C38}#)q!!SQjmy7N^KeN3SzzGY>$qalH-_HQHBE04Rd`+XHqeY2CLIr3UOlScxTj0BP zF~~=&oW9`KYwDU`Z6|kTo7rZzEb)VxA(+`_wi#f~Y%|-;HjVB73orm`T~JCU>#6zx O0000dol_hide_leftmenu)) print 'margin-bottom: 12px;'."\n"; ?> } div.fichecenter { + /* margin-top: 10px; */ width: 100%; clear: both; /* This is to have div fichecenter that are true rectangles */ } @@ -1737,7 +1738,7 @@ div.vmenu, td.vmenu { .vmenu { width: 190px; - margin-left: 4px; + margin-left: 6px; display: none; @@ -1953,10 +1954,11 @@ img.toolbarbutton { /* ============================================================================== */ div.tabs { text-align: ; - margin-left: 6px !important; - margin-right: 6px !important; + padding-left: 6px !important; + padding-right: 6px !important; clear:both; height:100%; + /* background-image: linear-gradient(to top,#f6f6f6 0,#fff 8px); */ } div.tabsElem { margin-top: 1px; @@ -2018,7 +2020,7 @@ a.tabTitle { a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { font-family: ; - padding: 8px 9px 8px; + padding: 12px 9px 12px; margin: 0em 0.2em; text-decoration: none; white-space: nowrap; @@ -2027,11 +2029,6 @@ a.tab:link, a.tab:visited, a.tab:hover, a.tab#active { border-left: 1px solid transparent; border-top: 1px solid transparent; border-bottom: 0px !important; - /* - -moz-border-radius:4px 4px 0 0; - -webkit-border-radius: 4px 4px 0 0; - border-radius: 4px 4px 0 0; - */ background-image: none !important; } @@ -3036,9 +3033,12 @@ td.legendLabel { padding: 2px 2px 2px 0 !important; } div.titre { font-family: ; - font-weight: bold; + font-size: 14px; + /* font-weight: bold; */ color: rgb(); text-decoration: none; + padding-top: 5px; + padding-bottom: 5px; /* text-shadow: 1px 1px 2px #FFFFFF; */ } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 6513210a1a9..52fb9d3ab1a 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -241,7 +241,7 @@ body { color: rgb(); font-size: px; - line-height: 130%; + line-height: 1.3; font-family: ; margin-top: 0; margin-bottom: 0; @@ -3146,9 +3146,12 @@ td.legendLabel { padding: 2px 2px 2px 0 !important; } div.titre { font-family: ; - font-weight: bold; + font-size: 14px; + /* font-weight: bold; */ color: rgb(); text-decoration: none; + padding-top: 5px; + padding-bottom: 5px; /* text-shadow: 1px 1px 2px #FFFFFF; */ dol_optimize_smallscreen)?'':'margin-top: 4px;'); ?> } diff --git a/htdocs/user/note.php b/htdocs/user/note.php index ae685391299..ca9f821d14c 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -52,6 +52,7 @@ $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('usercard','globalcard')); + /******************************************************************************/ /* Actions */ /******************************************************************************/ diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index f7acc3609c7..e59e26efd0b 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -191,15 +191,6 @@ $conf_css = $themepath."?lang=".$langs->defaultlang; $jquerytheme = 'smoothness'; if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME; -if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/login_background.png')) -{ - $login_background = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/login_background.png'; -} -else -{ - $login_background = DOL_URL_ROOT.'/theme/login_background.png'; -} - if (! $username) $focus_element = 'username'; else $focus_element = 'password'; From cea835744c61486f2cadafec2e589fe6578fc628 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 5 May 2017 23:06:46 +0200 Subject: [PATCH 82/85] Look and feel v6 --- htdocs/theme/md/style.css.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 52fb9d3ab1a..7818422d192 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1137,6 +1137,9 @@ table.noborder tr.liste_titre td { .pictoedit, .pictowarning, .pictodelete { vertical-align: text-bottom; } +img.hideonsmartphone.pictoactionview { + vertical-align: bottom; +} .colorthumb { padding-left: 1px !important; padding-right: 1px; @@ -4680,7 +4683,7 @@ border-top-right-radius: 6px; } .mainmenuaspan { /*display: none;*/ - font-size: 10px; + font-size: 12px; } .topmenuimage { background-size: 26px auto; From 56140ae5729df78af81b174631f8156e85c5c94e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 6 May 2017 01:09:22 +0200 Subject: [PATCH 83/85] Work on default focus --- build/debian/README.howto | 9 ++-- htdocs/admin/defaultvalues.php | 89 +++++++++++++++++++++------------- htdocs/core/lib/admin.lib.php | 5 ++ htdocs/langs/en_US/admin.lang | 7 +-- 4 files changed, 71 insertions(+), 39 deletions(-) diff --git a/build/debian/README.howto b/build/debian/README.howto index 399c4f07a1f..e040cd6dced 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -152,7 +152,7 @@ tag 729538 -moreinfo -##### Testing a package into unstable env +##### Testing a package into a chroot environment Check you have a mysql server available from another interface than "localhost". Set line in /etc/mysql/my.cnf if required and restart mysql @@ -160,9 +160,11 @@ Set line in /etc/mysql/my.cnf if required and restart mysql [mysqld] bind-address = * -Create a chroot called "unstable-amd64-sbuild". +Create a chroot called "jessie" or "unstable". Chroot env is stored into /srv/chroot directory. > sudo sbuild-createchroot --keyring=unstable /srv/chroot/unstable http://ftp.uk.debian.org/debian +or +> sudo sbuild-createchroot jessie /srv/chroot/jessie http://ftp.uk.debian.org/debian Pour lister les env chroot > schroot -l @@ -170,8 +172,9 @@ or > ls /srv/chroot Puis pour se connecter et préparer l'environnement -> schroot -c name_of_chroot +> schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild) > cat /etc/debian_chroot to check which debian branch we are into +> apt-get install vi > vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok) > apt-get update > apt-get upgrade diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 8a9bd4f209b..ec4c5fd4605 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -37,7 +37,7 @@ if (!$user->admin) accessforbidden(); $id=GETPOST('rowid','int'); $action=GETPOST('action','alpha'); -$mode = GETPOST('mode')?GETPOST('mode'):'createform'; // 'createform', 'filters', 'sortorder' +$mode = GETPOST('mode')?GETPOST('mode'):'createform'; // 'createform', 'filters', 'sortorder', 'focus' $limit = GETPOST("limit")?GETPOST("limit","int"):$conf->liste_limit; $sortfield = GETPOST("sortfield",'alpha'); @@ -210,6 +210,10 @@ if ($mode == 'sortorder') { print info_admin($langs->trans("WarningSettingSortOrder")).'
    '; } +if ($mode == 'focus') +{ + print info_admin($langs->trans("FeatureNotYetAvailable")).'
    '; +} print ''; print ''; @@ -217,11 +221,13 @@ print ''; print '
    '; +// Page $texthelp=$langs->trans("PageUrlForDefaultValues"); if ($mode == 'createform') $texthelp.=$langs->trans("PageUrlForDefaultValuesCreate", 'societe/card.php'); else $texthelp.=$langs->trans("PageUrlForDefaultValuesList", 'societe/list.php'); $texturl=$form->textwithpicto($langs->trans("Url"), $texthelp); print_liste_field_titre($texturl,$_SERVER["PHP_SELF"],'page,param','',$param,'',$sortfield,$sortorder); +// Field $texthelp=$langs->trans("TheKeyIsTheNameOfHtmlField"); if ($mode != 'sortorder') { @@ -233,26 +239,32 @@ else $textkey=$form->textwithpicto($langs->trans("Field"), $texthelp); } print_liste_field_titre($textkey,$_SERVER["PHP_SELF"],'param','',$param,'',$sortfield,$sortorder); -if ($mode != 'sortorder') +// Value +if ($mode != 'focus') { - $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
    '; - // See list into GETPOST - $texthelp.='__USERID__
    '; - $texthelp.='__SUPERVISORID__
    '; - $texthelp.='__MYCOUNTRYID__
    '; - $texthelp.='__DAY__
    '; - $texthelp.='__MONTH__
    '; - $texthelp.='__YEAR__
    '; - if (! empty($conf->multicompany->enabled)) $texthelp.='__ENTITYID__
    '; - $textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, ''); + if ($mode != 'sortorder') + { + $texthelp=$langs->trans("FollowingConstantsWillBeSubstituted").'
    '; + // See list into GETPOST + $texthelp.='__USERID__
    '; + $texthelp.='__SUPERVISORID__
    '; + $texthelp.='__MYCOUNTRYID__
    '; + $texthelp.='__DAY__
    '; + $texthelp.='__MONTH__
    '; + $texthelp.='__YEAR__
    '; + if (! empty($conf->multicompany->enabled)) $texthelp.='__ENTITYID__
    '; + $textvalue=$form->textwithpicto($langs->trans("Value"), $texthelp, 1, 'help', '', 0, 2, ''); + } + else + { + $texthelp='ASC or DESC'; + $textvalue=$form->textwithpicto($langs->trans("SortOrder"), $texthelp); + } + print_liste_field_titre($textvalue, $_SERVER["PHP_SELF"], 'value', '', $param, '', $sortfield, $sortorder); } -else -{ - $texthelp='ASC or DESC'; - $textvalue=$form->textwithpicto($langs->trans("SortOrder"), $texthelp); -} -print_liste_field_titre($textvalue, $_SERVER["PHP_SELF"], 'value', '', $param, '', $sortfield, $sortorder); +// Entity if (! empty($conf->multicompany->enabled) && !$user->entity) print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],'entity,page','',$param,'',$sortfield,$sortorder); +// Actions print ''; print "\n"; @@ -261,15 +273,21 @@ print "\n"; print "\n"; print ''; +// Page print ''."\n"; +// Field print ''; -print ''; +// Value +if ($mode != 'focus') +{ + print ''; +} // Limit to superadmin if (! empty($conf->multicompany->enabled) && !$user->entity) { @@ -311,28 +329,33 @@ if ($result) print ''; + // Page print ''."\n"; - // Key + // Field print ''."\n"; // Value - print ''; - + if ($mode != 'focus') + { + print ''; + } + + // Actions print ''; - + print "\n"; print "\n"; $i++; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 2a734b5f161..4beb49107d2 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -624,6 +624,11 @@ function defaultvalues_prepare_head() $head[$h][2] = 'sortorder'; $h++; + $head[$h][0] = DOL_URL_ROOT."/admin/defaultvalues.php?mode=focus"; + $head[$h][1] = $langs->trans("DefaultFocus"); + $head[$h][2] = 'focus'; + $h++; + /*$head[$h][0] = DOL_URL_ROOT."/admin/translation.php?mode=searchkey"; $head[$h][1] = $langs->trans("TranslationKeySearch"); $head[$h][2] = 'searchkey'; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4b56ef00ae1..14131bddd2c 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1352,9 +1352,10 @@ CacheByClient=Cache by browser CompressionOfResources=Compression of HTTP responses TestNotPossibleWithCurrentBrowsers=Such an automatic detection is not possible with current browsers DefaultValuesDesc=You can define/force here the default value you want to get when your create a new record, and/or defaut filters or sort order when your list record. -DefaultCreateForm=Create forms -DefaultSearchFilters=Search filters -DefaultSortOrder=Sort orders +DefaultCreateForm=Default values for new objects +DefaultSearchFilters=Default search filters +DefaultSortOrder=Default sort orders +DefaultFocus=Default focus fields ##### Products ##### ProductSetup=Products module setup ServiceSetup=Services module setup From 9b90e7aa095bff665604d541ef14976f3ae605a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 6 May 2017 01:41:56 +0200 Subject: [PATCH 84/85] Minor fix --- build/debian/README.howto | 5 +++-- htdocs/bookmarks/bookmarks.lib.php | 2 +- htdocs/theme/eldy/style.css.php | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/build/debian/README.howto b/build/debian/README.howto index e040cd6dced..c94309ec2ef 100644 --- a/build/debian/README.howto +++ b/build/debian/README.howto @@ -174,7 +174,7 @@ or Puis pour se connecter et préparer l'environnement > schroot -c name_of_chroot (exemple schroot -c unstable-amd64-sbuild) > cat /etc/debian_chroot to check which debian branch we are into -> apt-get install vi +> apt-get install vi dialog > vi /usr/sbin/policy-rc.d and replace return code 101 (not allowed) into 0 (ok) > apt-get update > apt-get upgrade @@ -404,6 +404,7 @@ Note that package 3.5.7 contains not only fixed for bugs reported to debian. It so it is a better solution to validate this maintenance release than applying a patch of the only CVE-2015-3935. After discussion with ..., it appears that security holes are enough to request this unblock request." + Use this to request an full update of a stable package reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls @@ -434,7 +435,7 @@ Use this to ask to apply patches on a stable version. reportbug -B debian --smtphost=smtp.gmail.com:587 --smtpuser=xxxx --smtppasswd=yyyy --tls Choose package "release.debian.org" -Then usertag "jessie-pu" +Then usertag "jessie-pu" (if tags is not available in list, choose another one, and change it later into email content text) Then name of package "dolibarr" Fill message, for example: "Please unblock package dolibarr diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index d84713d1e62..26089c3d07c 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -62,7 +62,7 @@ function printBookmarksList($aDb, $aLangs) */ $ret.= ''."\n"; - $ret.= ''; + $ret.= ''; $ret.= '
    '; +$searchpitco=$form->showFilterAndCheckAddButtons(0); +print $searchpitco; +print '
    '.$langs->trans("RefTask").''.$langs->trans("LabelTask").'
    '; -$searchpitco=$form->showFilterAndCheckAddButtons(0); -print $searchpitco; -print '
    '; print ''; print ''; print ''; print ''; -print ''; -print ''; + print ''; + print '
    '; if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->page; else print ''; print ''; if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->param; else print ''; print ''; - /*print ''; - print ''; - print ''; - print ''; - */ - if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->value; - else print ''; - print ''; + /*print ''; + print ''; + print ''; + print ''; + */ + if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) print $obj->value; + else print ''; + print ''; if ($action != 'edit' || GETPOST('rowid') != $obj->rowid) { @@ -349,7 +372,7 @@ if ($result) print ''; } print '