From 749bbcba18052ef88838cc4e197758b34c1b5a8e Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Mon, 11 Mar 2019 09:21:04 +0100 Subject: [PATCH 01/15] retrieve from dolibarr repo --- htdocs/custom/.gitignore | 4 ---- htdocs/custom/README.md | 22 ---------------------- htdocs/custom/index.html | 0 3 files changed, 26 deletions(-) delete mode 100644 htdocs/custom/.gitignore delete mode 100644 htdocs/custom/README.md delete mode 100644 htdocs/custom/index.html diff --git a/htdocs/custom/.gitignore b/htdocs/custom/.gitignore deleted file mode 100644 index 89ebd12182c..00000000000 --- a/htdocs/custom/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/* -!.gitignore -!README.md -!index.html \ No newline at end of file diff --git a/htdocs/custom/README.md b/htdocs/custom/README.md deleted file mode 100644 index 3a486e5a4a8..00000000000 --- a/htdocs/custom/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# DOLIBARR ERP & CRM custom directory for external modules. - -This directory is dedicated to store external modules. -To use it, just copy here the directory of the module into this directory. - -Note: On linux or MAC systems, it is better to unzip/store the external module directory into -a different place than this directory and just adding a symbolic link here to the htdocs directory -of the module. - -For example on Linux OS: Get the module from the command -mkdir ~/git; cd ~/git -git clone https://git.framasoft.org/p/newmodule/newmodule.git -Then create the symbolic link -ln -fs ~/git/newmodule/htdocs /path_to_dolibarr/htdocs/custom/newmodule - -WARNING !!! -Check also that the /custom directory is active by adding into dolibarr conf/conf.php file the following -two lines, so dolibarr will also scan /custom directory to find external external modules: - -$dolibarr_main_url_root_alt='/custom'; -$dolibarr_main_document_root_alt='/path_to_dolibarr/htdocs/custom/'; - diff --git a/htdocs/custom/index.html b/htdocs/custom/index.html deleted file mode 100644 index e69de29bb2d..00000000000 From ff206a3e261ec75e52aed02420b1da08042ccfa9 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Mon, 11 Mar 2019 10:32:01 +0100 Subject: [PATCH 02/15] custom content was deleted --- htdocs/custom/README.md | 22 ++++++++++++++++++++++ htdocs/custom/index.html | 0 2 files changed, 22 insertions(+) create mode 100644 htdocs/custom/README.md create mode 100644 htdocs/custom/index.html diff --git a/htdocs/custom/README.md b/htdocs/custom/README.md new file mode 100644 index 00000000000..3a486e5a4a8 --- /dev/null +++ b/htdocs/custom/README.md @@ -0,0 +1,22 @@ +# DOLIBARR ERP & CRM custom directory for external modules. + +This directory is dedicated to store external modules. +To use it, just copy here the directory of the module into this directory. + +Note: On linux or MAC systems, it is better to unzip/store the external module directory into +a different place than this directory and just adding a symbolic link here to the htdocs directory +of the module. + +For example on Linux OS: Get the module from the command +mkdir ~/git; cd ~/git +git clone https://git.framasoft.org/p/newmodule/newmodule.git +Then create the symbolic link +ln -fs ~/git/newmodule/htdocs /path_to_dolibarr/htdocs/custom/newmodule + +WARNING !!! +Check also that the /custom directory is active by adding into dolibarr conf/conf.php file the following +two lines, so dolibarr will also scan /custom directory to find external external modules: + +$dolibarr_main_url_root_alt='/custom'; +$dolibarr_main_document_root_alt='/path_to_dolibarr/htdocs/custom/'; + diff --git a/htdocs/custom/index.html b/htdocs/custom/index.html new file mode 100644 index 00000000000..e69de29bb2d From 519672cdc9a5cc4199f6d7a8c1f5a7234adea101 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Mon, 11 Mar 2019 10:32:55 +0100 Subject: [PATCH 03/15] custom content was deleted --- htdocs/custom/.gitignore | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 htdocs/custom/.gitignore diff --git a/htdocs/custom/.gitignore b/htdocs/custom/.gitignore new file mode 100644 index 00000000000..9420e8c61eb --- /dev/null +++ b/htdocs/custom/.gitignore @@ -0,0 +1,4 @@ +/* +!.gitignore +!README.md +!index.html From be612a1f6e5a7c2aac4006d7f5af786f454f5c76 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Mon, 11 Mar 2019 12:58:03 +0100 Subject: [PATCH 04/15] harmonize propal index pages --- htdocs/comm/index.php | 62 +++++++++++++++++++++++------------- htdocs/comm/propal/index.php | 32 ++++++++++++------- 2 files changed, 60 insertions(+), 34 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index e6fc5e95010..2040338f543 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -159,12 +159,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print '
'; print ''; print ''; - print ''; + print ''; if ($num > 0) { $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -190,10 +191,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $i++; $total += $obj->total_ht; } - if ($total>0) + if ($num > $nbofloop) { - - print '"; + print '"; + } + elseif ($total>0) + { + print '"; } } else @@ -245,7 +249,8 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos if ($num > 0) { $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -270,9 +275,13 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos $i++; $total += $obj->total_ht; } - if ($total>0) + if ($num > $nbofloop) + { + print '"; + } + elseif ($total>0) { - print '"; + print '"; } } else @@ -322,9 +331,9 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) if ($num > 0) { $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { - $obj = $db->fetch_object($resql); print '"; + print '"; + } + elseif ($total>0) + { + print '"; } } else @@ -409,7 +421,8 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande if ($num > 0) { $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -440,10 +453,13 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande $i++; $total += $obj->total_ttc; } - if ($total>0) + if ($num > $nbofloop) + { + print '"; + } + elseif ($total>0) { - - print '"; + print '"; } } else @@ -700,7 +716,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print '
'.$langs->trans("ProposalsDraft").($num?' '.$num.'':'').'
'.$langs->trans("ProposalsDraft").' '.$num.'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'; $orderstatic->id=$obj->rowid; @@ -353,10 +362,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $i++; $total += $obj->total_ttc; } - if ($total>0) + if ($num > $nbofloop) { - - print '
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'; print ''; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($result); @@ -757,11 +773,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } if ($num > $nbofloop) { - print '"; + print '"; } elseif ($total>0) { - print '"; + print '"; } print "
'.$langs->trans("ProposalsOpened").' '.$num.'
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("Total")."".price($total)." 
"; print "

"; @@ -804,7 +820,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print ''; print ''; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($result); @@ -861,11 +877,11 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } if ($num > $nbofloop) { - print '"; + print '"; } elseif ($total>0) { - print '"; + print '"; } print "
'.$langs->trans("OrdersOpened").' '.$num.'
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("Total")."".price($total)." 
"; print "
"; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 2bc710394bb..55145381951 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -172,16 +172,18 @@ if (! empty($conf->propal->enabled)) $resql=$db->query($sql); if ($resql) { - print '
'; - print ''; - print ''; - print ''; - $langs->load("propal"); $num = $db->num_rows($resql); if ($num) { + print '
'; + print '
'.$langs->trans("DraftPropals").'
'; + print ''; + $langs->load("propal"); + print ''; + $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { $obj = $db->fetch_object($resql); print ''; @@ -199,9 +201,17 @@ if (! empty($conf->propal->enabled)) print ''; $i++; } + if ($num > $nbofloop) + { + print '"; + } + elseif ($total>0) + { + print '"; + } + print "
'.$langs->trans("DraftPropals").' '.$num.'
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
"; + print "

"; } - print ""; - print "
"; } } @@ -320,7 +330,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) print ''; print ''; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($result); @@ -365,11 +375,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) } if ($num > $nbofloop) { - print '"; + print '"; } elseif ($total>0) { - print '"; + print '"; } print "
'.$langs->trans("ProposalsOpened").' '.$num.'
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("Total")."".price($total)." 
"; print "
"; From 2726cc335dd6f8e810f1cf5573f39775d0363ff7 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Tue, 12 Mar 2019 10:24:11 +0100 Subject: [PATCH 05/15] replace align by css align --- htdocs/comm/index.php | 24 ++++++++++++------------ htdocs/comm/propal/index.php | 8 ++++---- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 2040338f543..1dac0b902c7 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -193,11 +193,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total").''.price($total).""; + print ''.$langs->trans("Total").''.price($total).""; } } else @@ -277,11 +277,11 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total").''.price($total).""; + print ''.$langs->trans("Total").''.price($total).""; } } else @@ -364,11 +364,11 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total").''.price($total).""; + print ''.$langs->trans("Total").''.price($total).""; } } else @@ -455,11 +455,11 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total").''.price($total).""; + print ''.$langs->trans("Total").''.price($total).""; } } else @@ -773,11 +773,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total")."".price($total)." "; + print ''.$langs->trans("Total")."".price($total)." "; } print ""; print "
"; @@ -877,11 +877,11 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total")."".price($total)." "; + print ''.$langs->trans("Total")."".price($total)." "; } print ""; print "
"; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 55145381951..122730aee8e 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -203,11 +203,11 @@ if (! empty($conf->propal->enabled)) } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total").''.price($total).""; + print ''.$langs->trans("Total").''.price($total).""; } print ""; print "
"; @@ -375,11 +375,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total")."".price($total)." "; + print ''.$langs->trans("Total")."".price($total)." "; } print ""; print "
"; From 350f77db2b3ea758c3311d36204f41f87cc22f96 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 17 Mar 2019 23:00:13 +0100 Subject: [PATCH 06/15] FIX: Error with various & salary payment on project --- htdocs/projet/element.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 54906249234..bc883cacc70 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012-2016 Juanjo Menent - * Copyright (C) 2015-2018 Alexandre Spangaro + * Copyright (C) 2015-2019 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Josep Lluís Amador * @@ -419,7 +419,7 @@ $listofreferent=array( 'name'=>"SocialContribution", 'title'=>"ListSocialContributionAssociatedProject", 'class'=>'ChargeSociales', - 'margin'=>'add', + 'margin'=>'minus', 'table'=>'chargesociales', 'datefieldname'=>'date_ech', 'disableamount'=>0, @@ -470,7 +470,7 @@ $listofreferent=array( 'datefieldname'=>'datev', 'margin'=>'minus', 'disableamount'=>0, - 'urlnew'=>DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&projectid='.$id.'&socid='.$socid, + 'urlnew'=>DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&projectid='.$id, 'lang'=>'banks', 'buttonnew'=>'AddVariousPayment', 'testnew'=>$user->rights->banque->modifier, @@ -602,7 +602,7 @@ foreach ($listofreferent as $key => $value) // Special cases if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); - if ($tablename == 'don' || $tablename == 'chargesociales') $total_ht_by_line=$element->amount; + if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line=$element->amount; elseif ($tablename == 'stock_mouvement') $total_ht_by_line=$element->price*abs($element->qty); else if($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'projet_task') @@ -632,8 +632,8 @@ foreach ($listofreferent as $key => $value) if ($qualifiedfortotal) $total_ht = $total_ht + $total_ht_by_line; - if ($tablename == 'don' || $tablename == 'chargesociales') $total_ttc_by_line=$element->amount; - else if($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); + if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ttc_by_line=$element->amount; + elseif ($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ttc_by_line=$element->price*abs($element->qty); elseif ($tablename == 'projet_task') { From 227f5f8f9213060618d21efb45b59a3bf0db0a37 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Mar 2019 09:08:53 +0100 Subject: [PATCH 07/15] Code is cleaner --- htdocs/projet/element.php | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index bc883cacc70..2bd414e4414 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -600,11 +600,22 @@ foreach ($listofreferent as $key => $value) $element->fetch($idofelement); if ($idofelementuser) $elementuser->fetch($idofelementuser); - // Special cases + $qualifiedfortotal=true; + if ($key == 'invoice') + { + if (! empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal=false; // Replacement invoice, do not include into total + } + if ($key == 'propal') + { + if ($element->statut == Propal::STATUS_NOTSIGNED) $qualifiedfortotal=false; // Refused proposal must not be included in total + } + if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); + + // Define $total_ht_by_line if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line=$element->amount; + elseif ($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ht_by_line=$element->price*abs($element->qty); - else if($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'projet_task') { if ($idofelementuser) @@ -620,18 +631,7 @@ foreach ($listofreferent as $key => $value) } else $total_ht_by_line=$element->total_ht; - $qualifiedfortotal=true; - if ($key == 'invoice') - { - if (! empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal=false; // Replacement invoice, do not include into total - } - if ($key == 'propal') - { - if ($element->statut == Propal::STATUS_NOTSIGNED) $qualifiedfortotal=false; // Refused proposal must not be included in total - } - - if ($qualifiedfortotal) $total_ht = $total_ht + $total_ht_by_line; - + // Define $total_ttc_by_line if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ttc_by_line=$element->amount; elseif ($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ttc_by_line=$element->price*abs($element->qty); @@ -642,7 +642,12 @@ foreach ($listofreferent as $key => $value) } else $total_ttc_by_line=$element->total_ttc; - if ($qualifiedfortotal) $total_ttc = $total_ttc + $total_ttc_by_line; + // Add total if we have to + if ($qualifiedfortotal) + { + $total_ht = $total_ht + $total_ht_by_line; + $total_ttc = $total_ttc + $total_ttc_by_line; + } } // Each element with at least one line is output From 34034787afe764165ed68029a97c56ff53fe5f27 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Mar 2019 10:16:08 +0100 Subject: [PATCH 08/15] FIX problem with sign of various payment in project preview --- htdocs/compta/bank/bankentries_list.php | 12 ++++- .../compta/paiement/class/paiement.class.php | 2 +- htdocs/compta/tva/class/tva.class.php | 8 +-- htdocs/fourn/class/paiementfourn.class.php | 2 +- htdocs/projet/element.php | 53 +++++++++++++------ 5 files changed, 53 insertions(+), 24 deletions(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index f20925d7c12..d70ed77d645 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -44,6 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php' require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; @@ -367,6 +368,7 @@ $paymentstatic=new Paiement($db); $paymentsupplierstatic=new PaiementFourn($db); $paymentvatstatic=new TVA($db); $paymentsalstatic=new PaymentSalary($db); +$paymentvariousstatic=new PaymentVarious($db); $donstatic=new Don($db); $paymentexpensereportstatic=new PaymentExpenseReport($db); $bankstatic=new Account($db); @@ -1146,13 +1148,13 @@ if ($resql) if ($links[$key]['type']=='payment') { $paymentstatic->id=$links[$key]['url_id']; - $paymentstatic->ref=$links[$key]['url_id']; + $paymentstatic->ref=$links[$key]['url_id']; // FIXME This is id, not ref of payment print ' '.$paymentstatic->getNomUrl(2); } elseif ($links[$key]['type']=='payment_supplier') { $paymentsupplierstatic->id=$links[$key]['url_id']; - $paymentsupplierstatic->ref=$links[$key]['url_id']; + $paymentsupplierstatic->ref=$links[$key]['url_id']; // FIXME This is id, not ref of payment print ' '.$paymentsupplierstatic->getNomUrl(2); } elseif ($links[$key]['type']=='payment_sc') @@ -1192,6 +1194,12 @@ if ($resql) $paymentexpensereportstatic->ref=$links[$key]['url_id']; print ' '.$paymentexpensereportstatic->getNomUrl(2); } + elseif ($links[$key]['type']=='payment_various') + { + $paymentvariousstatic->id=$links[$key]['url_id']; + $paymentvariousstatic->ref=$links[$key]['url_id']; + print ' '.$paymentvariousstatic->getNomUrl(2); + } elseif ($links[$key]['type']=='banktransfert') { // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index c3126aecee0..d335c2c3773 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -1180,7 +1180,7 @@ class Paiement extends CommonObject $result=''; $label = ''.$langs->trans("ShowPayment").'
'; $label.= ''.$langs->trans("Ref").': '.$this->ref; - $label.= '
'.$langs->trans("Date").': '.dol_print_date($this->date, 'dayhour'); + if ($this->date) $label.= '
'.$langs->trans("Date").': '.dol_print_date($this->date, 'dayhour'); if ($mode == 'withlistofinvoices') { $arraybill = $this->getBillsArray(); diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 33d48de8bfc..21b2667d1a6 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -694,16 +694,16 @@ class Tva extends CommonObject if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips $result=''; - $label=$langs->trans("ShowVatPayment").': '.$this->ref; + + $label = '' . $langs->trans("ShowVatPayment") . ''; + $label.= '
'; + $label.= '' . $langs->trans('Ref') . ': ' . $this->ref; $url = DOL_URL_ROOT.'/compta/tva/card.php?id='.$this->id; $linkclose=''; if (empty($notooltip)) { - - - if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label=$langs->trans("ShowMyObject"); diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index ee92374149b..663605292b6 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -583,7 +583,7 @@ class PaiementFourn extends Paiement $label = ''.$langs->trans("ShowPayment").'
'; $label.= ''.$langs->trans("Ref").': '.$text; - $label.= '
'.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); + if ($this->datepaye ? $this->datepaye : $this->date) $label.= '
'.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); $linkstart = ''; $linkend = ''; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 2bd414e4414..23ee7fd8e2d 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -579,7 +579,7 @@ foreach ($listofreferent as $key => $value) $qualified=$value['test']; $margin = $value['margin']; $project_field = $value['project_field']; - if ($qualified && isset($margin)) // If this element must be included into profit calculation ($margin is 'minus' or 'plus') + if ($qualified && isset($margin)) // If this element must be included into profit calculation ($margin is 'minus' or 'plus' or 'auto') { $element = new $classname($db); @@ -600,6 +600,7 @@ foreach ($listofreferent as $key => $value) $element->fetch($idofelement); if ($idofelementuser) $elementuser->fetch($idofelementuser); + // Define if record must be used for total or not $qualifiedfortotal=true; if ($key == 'invoice') { @@ -642,6 +643,16 @@ foreach ($listofreferent as $key => $value) } else $total_ttc_by_line=$element->total_ttc; + // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases + if ($tablename == 'payment_various') + { + if ($element->sens == 1) + { + $total_ht_by_line = -$total_ht_by_line; + $total_ttc_by_line = -$total_ttc_by_line; + } + } + // Add total if we have to if ($qualifiedfortotal) { @@ -658,23 +669,14 @@ foreach ($listofreferent as $key => $value) // Calculate margin if ($qualifiedforfinalprofit) { - if ($margin=="add") - { - $balance_ht+= $total_ht; - $balance_ttc+= $total_ttc; - } - else - { - $balance_ht-= $total_ht; - $balance_ttc-= $total_ttc; - } - - // Show $total_ht & $total_ttc -- add a minus when necessary - if ($margin!="add") + if ($margin != "add") { $total_ht = -$total_ht; $total_ttc = -$total_ttc; } + + $balance_ht += $total_ht; + $balance_ttc += $total_ttc; } print ''; @@ -856,8 +858,7 @@ foreach ($listofreferent as $key => $value) $expensereport->fetch($element->fk_expensereport); } - //print 'xxx'.$tablename; - //print $classname; + //print 'xxx'.$tablename.'yyy'.$classname; if ($breakline && $saved_third_id != $element->thirdparty->id) { @@ -1032,6 +1033,16 @@ foreach ($listofreferent as $key => $value) { $total_ht_by_line=$element->total_ht; } + + // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases + if ($tablename == 'payment_various') + { + if ($element->sens == 0) + { + $total_ht_by_line = -$total_ht_by_line; + } + } + print ''; if ($othermessage) print $othermessage; if (isset($total_ht_by_line)) @@ -1069,6 +1080,16 @@ foreach ($listofreferent as $key => $value) { $total_ttc_by_line=$element->total_ttc; } + + // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases + if ($tablename == 'payment_various') + { + if ($element->sens == 0) + { + $total_ttc_by_line = -$total_ttc_by_line; + } + } + print ''; if ($othermessage) print $othermessage; if (isset($total_ttc_by_line)) From e3dd62ed72d0977400d49828f9b73400da8d1c30 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Mar 2019 10:26:36 +0100 Subject: [PATCH 09/15] Fix type --- htdocs/modulebuilder/template/class/myobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 57c5b923bae..3371beb97f8 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -139,12 +139,12 @@ class MyObject extends CommonObject public $status; /** - * @var string date_creation + * @var integer|string date_creation */ public $date_creation; /** - * @var string tms + * @var integer tms */ public $tms; From 466a5e2e81d385554a3dcfe969efabc9bb0812eb Mon Sep 17 00:00:00 2001 From: atm-ph Date: Mon, 18 Mar 2019 10:47:56 +0100 Subject: [PATCH 10/15] Fix postgreSQL migration --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index a7f5ca87c9a..4c65e9512a4 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -84,7 +84,7 @@ create table llx_mailing_unsubscribe ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup); ALTER TABLE llx_adherent ADD gender VARCHAR(10); -ALTER TABLE llx_subscription ADD fk_type integer(11); +ALTER TABLE llx_subscription ADD fk_type integer; -- Add url_id into unique index of bank_url ALTER TABLE llx_bank_url DROP INDEX uk_bank_url; @@ -96,7 +96,7 @@ ALTER TABLE llx_don ADD COLUMN fk_soc integer NULL; ALTER TABLE llx_payment_various ADD COLUMN subledger_account varchar(32); -ALTER TABLE llx_prelevement_facture_demande ADD COLUMN entity integer(11); +ALTER TABLE llx_prelevement_facture_demande ADD COLUMN entity integer; ALTER TABLE llx_prelevement_facture_demande ADD COLUMN sourcetype varchar(32); ALTER TABLE llx_prelevement_facture_demande ADD COLUMN ext_payment_id varchar(128) NULL; ALTER TABLE llx_prelevement_facture_demande ADD COLUMN ext_payment_site varchar(128) NULL; From d8c1a50291f12f702592eca26d2b76ca60805486 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Mar 2019 10:53:58 +0100 Subject: [PATCH 11/15] Update index.php --- htdocs/comm/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 1dac0b902c7..72fee769c09 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -164,7 +164,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) if ($num > 0) { $i = 0; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($resql); From 7adba419fc99abe0fb47ee9c0a7a83d8ccef82d1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Mar 2019 10:54:45 +0100 Subject: [PATCH 12/15] Update index.php --- htdocs/comm/index.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 72fee769c09..651d2c54ec7 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -249,7 +249,7 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos if ($num > 0) { $i = 0; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -331,7 +331,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) if ($num > 0) { $i = 0; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -421,7 +421,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande if ($num > 0) { $i = 0; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { @@ -716,7 +716,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print ''; print ''; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($result); @@ -820,7 +820,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) print '
'.$langs->trans("ProposalsOpened").' '.$num.'
'; print ''; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($result); From 22d61cd44d6c079f38730e8353d7f9392d1901d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Mar 2019 10:55:44 +0100 Subject: [PATCH 13/15] Update index.php --- htdocs/comm/propal/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 122730aee8e..e69dbbc8b6c 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -182,7 +182,7 @@ if (! empty($conf->propal->enabled)) print ''; $i = 0; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -330,7 +330,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) print '
'.$langs->trans("OrdersOpened").' '.$num.'
'.$langs->trans("DraftPropals").' '.$num.'
'; print ''; - $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?5:$conf->global->MAIN_MAXLIST_OVERLOAD)); + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); while ($i < $nbofloop) { $obj = $db->fetch_object($result); From 23252ed646a9dda22ed763bfe3fa06fad64bb7f1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Mar 2019 11:10:37 +0100 Subject: [PATCH 14/15] Add a test to avoid SQL non compatible with postgresql --- dev/initdemo/mysqldump_dolibarr_4.0.0.sql | 2 +- dev/initdemo/mysqldump_dolibarr_5.0.0.sql | 2 +- dev/initdemo/mysqldump_dolibarr_6.0.0.sql | 2 +- dev/initdemo/mysqldump_dolibarr_7.0.0.sql | 2 +- dev/initdemo/mysqldump_dolibarr_8.0.0.sql | 4 ++-- dev/initdemo/mysqldump_dolibarr_9.0.0.sql | 4 ++-- test/phpunit/CodingSqlTest.php | 14 +++++++++----- 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/dev/initdemo/mysqldump_dolibarr_4.0.0.sql b/dev/initdemo/mysqldump_dolibarr_4.0.0.sql index e8580cdff28..6363873d7c0 100644 --- a/dev/initdemo/mysqldump_dolibarr_4.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_4.0.0.sql @@ -7853,7 +7853,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_5.0.0.sql b/dev/initdemo/mysqldump_dolibarr_5.0.0.sql index 4c31fd25e8a..a66bd427499 100644 --- a/dev/initdemo/mysqldump_dolibarr_5.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_5.0.0.sql @@ -8260,7 +8260,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_6.0.0.sql b/dev/initdemo/mysqldump_dolibarr_6.0.0.sql index f0375a4b407..19cb46d0237 100644 --- a/dev/initdemo/mysqldump_dolibarr_6.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_6.0.0.sql @@ -8612,7 +8612,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_7.0.0.sql b/dev/initdemo/mysqldump_dolibarr_7.0.0.sql index bd5789f0a6b..363cc32670d 100644 --- a/dev/initdemo/mysqldump_dolibarr_7.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_7.0.0.sql @@ -9181,7 +9181,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_8.0.0.sql b/dev/initdemo/mysqldump_dolibarr_8.0.0.sql index 05a4814a7ef..b000b807930 100644 --- a/dev/initdemo/mysqldump_dolibarr_8.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_8.0.0.sql @@ -6360,7 +6360,7 @@ CREATE TABLE `llx_emailcollector_emailcollector` ( LOCK TABLES `llx_emailcollector_emailcollector` WRITE; /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` DISABLE KEYS */; -INSERT INTO `llx_emailcollector_emailcollector` VALUES (1,1,'MyEmailCollector1','My email collector 1','aaa','imap.gmail.com','testldr10@gmail.com','testldr10-10','INBOX','','','aftercollect','2018-11-19 15:21:07','1 emails analyzed, 1 emails successfuly processed (for 3 record/actions done) by collector',NULL,NULL,'2018-10-31 18:08:05','2018-10-31 17:08:05',12,12,NULL,1,'OK',0); +INSERT INTO `llx_emailcollector_emailcollector` VALUES (1,1,'MyEmailCollector1','My email collector 1','aaa','imap.gmail.com','testldr10@example.com','testldr10-10','INBOX','','','aftercollect','2018-11-19 15:21:07','1 emails analyzed, 1 emails successfuly processed (for 3 record/actions done) by collector',NULL,NULL,'2018-10-31 18:08:05','2018-10-31 17:08:05',12,12,NULL,1,'OK',0); /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` ENABLE KEYS */; UNLOCK TABLES; @@ -12450,7 +12450,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_9.0.0.sql b/dev/initdemo/mysqldump_dolibarr_9.0.0.sql index 61201d931e3..c3d5fcd9e73 100644 --- a/dev/initdemo/mysqldump_dolibarr_9.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_9.0.0.sql @@ -6275,7 +6275,7 @@ CREATE TABLE `llx_emailcollector_emailcollector` ( LOCK TABLES `llx_emailcollector_emailcollector` WRITE; /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` DISABLE KEYS */; -INSERT INTO `llx_emailcollector_emailcollector` VALUES (1,1,'MyEmailCollector1','My email collector 1','aaa','imap.gmail.com','testldr10@gmail.com','testldr10-10','INBOX','','','aftercollect','2018-11-19 15:21:07','1 emails analyzed, 1 emails successfuly processed (for 3 record/actions done) by collector',NULL,NULL,'2018-10-31 18:08:05','2018-10-31 17:08:05',12,12,NULL,1,'OK',0); +INSERT INTO `llx_emailcollector_emailcollector` VALUES (1,1,'MyEmailCollector1','My email collector 1','aaa','imap.gmail.com','testldr10@example.com','testldr10-10','INBOX','','','aftercollect','2018-11-19 15:21:07','1 emails analyzed, 1 emails successfuly processed (for 3 record/actions done) by collector',NULL,NULL,'2018-10-31 18:08:05','2018-10-31 17:08:05',12,12,NULL,1,'OK',0); /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` ENABLE KEYS */; UNLOCK TABLES; @@ -12388,7 +12388,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2012-07-08 14:26:14','2018-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2012-07-08','Project leader','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2012-07-08 22:44:50','2012-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2012-07-08 22:59:02','2018-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2012-07-09 00:16:58','2012-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2013-08-01 02:41:26','2018-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2018-07-30 16:11:06','2018-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2018-07-30 16:13:03','2018-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2018-07-30 16:14:41','2018-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2018-07-30 16:26:22','2018-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2012-07-08 14:26:14','2018-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2012-07-08','Project leader','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2012-07-08 22:44:50','2012-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2012-07-08 22:59:02','2018-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2012-07-09 00:16:58','2012-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2013-08-01 02:41:26','2018-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2018-07-30 16:11:06','2018-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2018-07-30 16:13:03','2018-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2018-07-30 16:14:41','2018-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2018-07-30 16:26:22','2018-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index 9c9655b1f5c..1e1d3d1a838 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -57,7 +57,7 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; * @backupStaticAttributes enabled * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ -class CodingSqlTest extends PHPUnit_Framework_TestCase +class CodingSqlTest extends PHPUnit\Framework\TestCase { protected $savconf; protected $savuser; @@ -182,6 +182,10 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase print __METHOD__." Result for checking we don't have 'NUMERIC(' = ".$result."\n"; $this->assertTrue($result===false, 'Found NUMERIC( into '.$file.'. Bad.'); + $result=strpos($filecontent, 'integer('); + print __METHOD__." Result for checking we don't have 'integer(' = ".$result."\n"; + $this->assertTrue($result===false, 'Found value in parenthesis after the integer. It must be integer not integer(x) into '.$file.'. Bad.'); + if ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/migration') { // Test for migration files only @@ -227,21 +231,21 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase $langs=$this->savlangs; $db=$this->savdb; - $filesarray = scandir(DOL_DOCUMENT_ROOT.'/../dev/initdata'); + $filesarray = scandir(DOL_DOCUMENT_ROOT.'/../dev/initdemo'); foreach($filesarray as $key => $file) { if (! preg_match('/\.sql$/', $file)) continue; print 'Check sql file '.$file."\n"; - $filecontent=file_get_contents(DOL_DOCUMENT_ROOT.'/../dev/initdata/'.$file); + $filecontent=file_get_contents(DOL_DOCUMENT_ROOT.'/../dev/initdemo/'.$file); $result=strpos($filecontent, '@gmail.com'); print __METHOD__." Result for checking we don't have personal data = ".$result."\n"; - $this->assertTrue($result===false, 'Found a bad key into file '.$file); + $this->assertTrue($result===false, 'Found a bad key @gmail into file '.$file); $result=strpos($filecontent, 'eldy@'); print __METHOD__." Result for checking we don't have personal data = ".$result."\n"; - $this->assertTrue($result===false, 'Found a bad key into file '.$file); + $this->assertTrue($result===false, 'Found a bad key eldy@ into file '.$file); } return; From ad3b0b1a62d69aed6f1fd2ae61932086025aa370 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Mar 2019 11:19:16 +0100 Subject: [PATCH 15/15] Removed deprecated function function test_sql_and_script_inject that was replaced with testSqlAndScriptInject --- ChangeLog | 1 + htdocs/main.inc.php | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index efc1be2c344..08aaaa4b6f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ Following changes may create regressions for some external modules, but were nec * Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming convention of extension .inc.php for files to be included. * All methods set_draft() were renamed into setDraft(). +* Removed deprecated function function test_sql_and_script_inject that was replaced with testSqlAndScriptInject. ***** ChangeLog for 9.0.1 compared to 9.0.0 ***** diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a473f9a5abd..109d0f5f1fe 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -68,22 +68,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* deprecated in PHP } } -// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps -/** - * Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). - * - * @param string $val Value - * @param string $type 1=GET, 0=POST, 2=PHP_SELF, 3=GET without sql reserved keywords (the less tolerant test) - * @return int >0 if there is an injection, 0 if none - * @deprecated use testSqlAndScriptInject - * @see testSqlAndScriptInject($val, $type) - */ -function test_sql_and_script_inject($val, $type) -{ - // phpcs:enable - return testSqlAndScriptInject($val, $type); -} - /** * Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). *
'.$langs->trans("ProposalsOpened").' '.$num.'