From 6e9a07d11951a1759b5be8434f92191b9cfe11be Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 22 Mar 2020 05:33:30 +0100 Subject: [PATCH 001/456] Work on split module fournisseur --- htdocs/comm/action/class/cactioncomm.class.php | 4 ++-- htdocs/comm/index.php | 8 ++++---- htdocs/core/ajax/selectsearchbox.php | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 7362a82840d..6d92a3e8263 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -169,8 +169,8 @@ class CActionComm if ($obj->module == 'invoice' && ! $conf->facture->enabled) $qualified=0; if ($obj->module == 'order' && ! $conf->commande->enabled) $qualified=0; if ($obj->module == 'propal' && ! $conf->propal->enabled) $qualified=0; - if ($obj->module == 'invoice_supplier' && ! $conf->fournisseur->enabled) $qualified=0; - if ($obj->module == 'order_supplier' && ! $conf->fournisseur->enabled) $qualified=0; + if ($obj->module == 'invoice_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD || ! $conf->supplier_invoice->enabled)) $qualified=0; + if ($obj->module == 'order_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD || ! $conf->supplier_order->enabled)) $qualified=0; if ($obj->module == 'shipping' && ! $conf->expedition->enabled) $qualified=0; } diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 0bb38aeaa38..b7370bc1ba1 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -35,7 +35,7 @@ if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/cl if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; if (!empty($conf->supplier_proposal->enabled)) require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; if (!$user->rights->societe->lire) accessforbidden(); @@ -76,7 +76,7 @@ $companystatic = new Societe($db); if (!empty($conf->propal->enabled)) $propalstatic = new Propal($db); if (!empty($conf->supplier_proposal->enabled)) $supplierproposalstatic = new SupplierProposal($db); if (!empty($conf->commande->enabled)) $orderstatic = new Commande($db); -if (!empty($conf->fournisseur->enabled)) $supplierorderstatic = new CommandeFournisseur($db); +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) $supplierorderstatic = new CommandeFournisseur($db); llxHeader("", $langs->trans("CommercialArea")); @@ -102,7 +102,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles $listofsearchfields['search_supplier_proposal'] = array('text'=>'SupplierProposalShort'); } // Search supplier order - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) { $listofsearchfields['search_supplier_order'] = array('text'=>'SupplierOrder'); } @@ -414,7 +414,7 @@ if (!empty($conf->commande->enabled) && $user->rights->commande->lire) /* * Draft suppliers orders */ -if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire) +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) { $langs->load("orders"); diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index b5d9b005cdd..61cf3c074bf 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -105,11 +105,11 @@ if (! empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEAR { $arrayresult['searchintosupplierpropal']=array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_propal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue?'?sall='.urlencode($search_boxvalue):'')); } -if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) && $user->rights->fournisseur->commande->lire) +if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) || ! empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) { $arrayresult['searchintosupplierorder']=array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue?'?search_all='.urlencode($search_boxvalue):'')); } -if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) && $user->rights->fournisseur->facture->lire) +if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) || ! empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { $arrayresult['searchintosupplierinvoice']=array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue?'?sall='.urlencode($search_boxvalue):'')); } From c05ef16e0bf12a588cc47886a9633094854d1947 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 22 Mar 2020 05:51:14 +0100 Subject: [PATCH 002/456] Work on split module fournisseur --- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/lib/contact.lib.php | 2 +- htdocs/core/lib/product.lib.php | 6 +++--- htdocs/core/lib/project.lib.php | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 700c3f0410f..da141618f00 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -173,7 +173,7 @@ function societe_prepare_head(Societe $object) } // Related items - if ((!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled)) + if ((!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->THIRPARTIES_DISABLE_RELATED_OBJECT_TAB)) { $head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id; diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 0082947d0c1..c1a6620fc4b 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -59,7 +59,7 @@ function contact_prepare_head(Contact $object) $tab++; // Related items - if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || ! empty($conf->fournisseur->enabled)) + if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $head[$tab][0] = DOL_URL_ROOT.'/contact/consumption.php?id='.$object->id; $head[$tab][1] = $langs->trans("Referers"); diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 79d77e0268f..a6ee33e9a65 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -55,7 +55,7 @@ function product_prepare_head($object) if (!empty($object->status_buy) || (!empty($conf->margin->enabled) && !empty($object->status))) // If margin is on and product on sell, we may need the cost price even if product os not on purchase { - if ((!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) + if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->lire) || (!empty($conf->margin->enabled) && $user->rights->margin->liretous) ) { @@ -408,7 +408,7 @@ function show_stats_for_company($product, $socid) print ''; } // Supplier orders - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande->lire) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) { $nblines++; $ret = $product->load_stats_commande_fournisseur($socid); @@ -462,7 +462,7 @@ function show_stats_for_company($product, $socid) print ''; } // Supplier invoices - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { $nblines++; $ret = $product->load_stats_facture_fournisseur($socid); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index ee80a525f04..ea3ddab9976 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -87,7 +87,8 @@ function project_prepare_head($object) $h++; } - if (!empty($conf->fournisseur->enabled) || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) + || !empty($conf->propal->enabled) || !empty($conf->commande->enabled) || !empty($conf->facture->enabled) || !empty($conf->contrat->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->agenda->enabled) || !empty($conf->deplacement->enabled)) { From b6137696060cfa243acb76e0390c0db67ab15b05 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 22 Mar 2020 06:09:47 +0100 Subject: [PATCH 003/456] Work on split module fournisseur --- htdocs/core/menus/init_menu_auguria.sql | 20 +++++++++---------- htdocs/core/menus/standard/auguria.lib.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 12 +++++------ htdocs/core/modules/modCategorie.class.php | 6 +++--- .../doc/doc_generic_project_odt.modules.php | 8 ++++---- 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 66ed948585f..e8b0eda2e63 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -9,9 +9,9 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__; -- table llx_menu -- insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', 1__+MAX_llx_menu__, __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur', '( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur|supplier_order|supplier_invoice', '( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'ProductsPipeServices', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|supplier_order|supplier_invoice|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire', '', 2, 50, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 52, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|asset', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->asset->enabled', 9__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', -1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire || $user->rights->asset->read', '', 2, 54, __ENTITY__); @@ -76,8 +76,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 500__+MAX_llx_menu__, 'companies', 'thirdparties', 2__+MAX_llx_menu__, '/societe/index.php?mainmenu=companies&leftmenu=thirdparties', 'ThirdParty', 0, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 501__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&action=create', 'MenuNewThirdParty', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 502__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&action=create', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&type=f&leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 503__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&type=f&leftmenu=suppliers', 'ListSuppliersShort', 1, 'suppliers', '$user->rights->societe->lire && $user->rights->fournisseur->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 504__+MAX_llx_menu__, 'companies', '', 503__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&leftmenu=supplier&action=create&type=f', 'NewSupplier', 2, 'suppliers', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 506__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&type=p&leftmenu=prospects', 'ListProspectsShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 507__+MAX_llx_menu__, 'companies', '', 506__+MAX_llx_menu__, '/societe/card.php?mainmenu=companies&leftmenu=prospects&action=create&type=p', 'MenuNewProspect', 2, 'companies', '$user->rights->societe->creer', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 509__+MAX_llx_menu__, 'companies', '', 500__+MAX_llx_menu__, '/societe/list.php?mainmenu=companies&type=c&leftmenu=customers', 'ListCustomersShort', 1, 'companies', '$user->rights->societe->lire', '', 2, 4, __ENTITY__); @@ -88,14 +88,14 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 602__+MAX_llx_menu__, 'companies', '', 600__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts', 'List', 1, 'companies', '$user->rights->societe->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 604__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=p', 'ThirdPartyProspects', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 605__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=c', 'ThirdPartyCustomers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 2, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=f', 'ThirdPartySuppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 606__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=f', 'ThirdPartySuppliers', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled', __HANDLER__, 'left', 607__+MAX_llx_menu__, 'companies', '', 602__+MAX_llx_menu__, '/contact/list.php?mainmenu=companies&leftmenu=contacts&type=o', 'Others', 2, 'companies', '$user->rights->societe->contact->lire', '', 2, 4, __ENTITY__); -- Third parties - Category customer insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 650__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?mainmenu=companies&leftmenu=cat&type=1', 'SuppliersCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 651__+MAX_llx_menu__, 'companies', '', 650__+MAX_llx_menu__, '/categories/card.php?mainmenu=companies&action=create&type=1', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Third parties - Category supplier -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 660__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?mainmenu=companies&leftmenu=cat&type=2', 'CustomersProspectsCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->fournisseur->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/card.php?mainmenu=companies&action=create&type=2', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $conf->categorie->enabled', __HANDLER__, 'left', 660__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?mainmenu=companies&leftmenu=cat&type=2', 'CustomersProspectsCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $conf->categorie->enabled', __HANDLER__, 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/card.php?mainmenu=companies&action=create&type=2', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); -- Third parties - Category contact insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 670__+MAX_llx_menu__, 'companies', 'cat', 2__+MAX_llx_menu__, '/categories/index.php?mainmenu=companies&leftmenu=cat&type=4', 'ContactCategoriesShort', 0, 'categories', '$user->rights->categorie->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->societe->enabled && $conf->categorie->enabled', __HANDLER__, 'left', 671__+MAX_llx_menu__, 'companies', '', 670__+MAX_llx_menu__, '/categories/card.php?mainmenu=companies&action=create&type=4', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); @@ -264,9 +264,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 4, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_expensereport', 2400__+MAX_llx_menu__, '/accountancy/expensereport/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport', 'ExpenseReportsVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 390c50aa748..360a173dcee 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -381,7 +381,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t // Must match array $sourceList defined into journals_list.php if ($objp->nature == 2 && ! empty($conf->facture->enabled)) $nature="sells"; - if ($objp->nature == 3 && ! empty($conf->fournisseur->enabled)) $nature="purchases"; + if ($objp->nature == 3 && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))) $nature="purchases"; if ($objp->nature == 4 && ! empty($conf->banque->enabled)) $nature="bank"; if ($objp->nature == 5 && ! empty($conf->expensereport->enabled)) $nature="expensereports"; if ($objp->nature == 1) $nature="various"; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index eafbdaf5ddd..7d5cb8d8ff3 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -120,7 +120,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'enabled'=> ((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) ) - || !empty($conf->fournisseur->enabled) + || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) ), 'perms'=> (!empty($user->rights->societe->lire) || !empty($user->rights->fournisseur->lire)), 'module'=>'societe|fournisseur' @@ -848,7 +848,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM } // Suppliers - if (!empty($conf->societe->enabled) && (!empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled))) + if (!empty($conf->societe->enabled) && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) || !empty($conf->supplier_proposal->enabled))) { $langs->load("suppliers"); $newmenu->add("/societe/list.php?type=f&leftmenu=suppliers", $langs->trans("ListSuppliersShort"), 1, ($user->rights->fournisseur->lire || $user->rights->supplier_proposal->lire), '', $mainmenu, 'suppliers'); @@ -868,7 +868,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/categories/index.php?leftmenu=cat&type=2", $menutoshow, 1, $user->rights->categorie->lire, '', $mainmenu, 'cat'); } // Categories suppliers - if (!empty($conf->fournisseur->enabled)) + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $newmenu->add("/categories/index.php?leftmenu=catfournish&type=1", $langs->trans("SuppliersCategoriesShort"), 1, $user->rights->categorie->lire); } @@ -880,7 +880,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire); if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire); if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire); - if (!empty($conf->fournisseur->enabled)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire); + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire); $newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("ContactOthers"), 2, $user->rights->societe->contact->lire); //$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->rights->societe->contact->lire); @@ -1201,7 +1201,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM if (!empty($conf->banque->enabled)) { $newmenu->add("/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin&search_status=-1", $langs->trans("MenuBankAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_bank', 70); } - if (!empty($conf->facture->enabled) || !empty($conf->fournisseur->enabled)) { + if (!empty($conf->facture->enabled) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))) { $newmenu->add("/admin/dict.php?id=10&from=accountancy&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuVatAccounts"), 1, $user->rights->accounting->chartofaccount, '', $mainmenu, 'accountancy_admin_default', 80); } if (!empty($conf->tax->enabled)) { @@ -1275,7 +1275,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM // Must match array $sourceList defined into journals_list.php if ($objp->nature == 2 && !empty($conf->facture->enabled)) $nature = "sells"; - if ($objp->nature == 3 && !empty($conf->fournisseur->enabled)) $nature = "purchases"; + if ($objp->nature == 3 && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))) $nature = "purchases"; if ($objp->nature == 4 && !empty($conf->banque->enabled)) $nature = "bank"; if ($objp->nature == 5 && !empty($conf->expensereport->enabled)) $nature = "expensereports"; if ($objp->nature == 1) $nature = "various"; diff --git a/htdocs/core/modules/modCategorie.class.php b/htdocs/core/modules/modCategorie.class.php index 61a4dd67d5c..4f0c1e04307 100644 --- a/htdocs/core/modules/modCategorie.class.php +++ b/htdocs/core/modules/modCategorie.class.php @@ -120,7 +120,7 @@ class modCategorie extends DolibarrModules $this->export_code[$r] = 'category_'.$r; $this->export_label[$r] = 'CatSupList'; $this->export_icon[$r] = 'category'; - $this->export_enabled[$r] = '$conf->fournisseur->enabled'; + $this->export_enabled[$r] = '!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)'; $this->export_permission[$r] = array(array("categorie", "lire"), array("fournisseur", "lire")); $this->export_fields_array[$r] = array( 'u.rowid'=>"CategId", 'u.label'=>"Label", 'u.description'=>"Description", 's.rowid'=>'IdThirdParty', 's.nom'=>'Name', 's.prefix_comm'=>"Prefix", @@ -423,7 +423,7 @@ class modCategorie extends DolibarrModules ); $typeexample = ""; if ($conf->product->enabled) { $typeexample .= ($typeexample ? "/" : "")."0=Product"; } - if ($conf->fournisseur->enabled) { $typeexample .= ($typeexample ? "/" : "")."1=Supplier"; } + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $typeexample .= ($typeexample ? "/" : "")."1=Supplier"; } if ($conf->societe->enabled) { $typeexample .= ($typeexample ? "/" : "")."2=Customer-Prospect"; } if ($conf->adherent->enabled) { $typeexample .= ($typeexample ? "/" : "")."3=Member"; } $this->import_examplevalues_array[$r] = array( @@ -491,7 +491,7 @@ class modCategorie extends DolibarrModules $this->import_examplevalues_array[$r] = array('cs.fk_categorie'=>"Imported category", 'cs.fk_socpeople'=>"123"); } - if (!empty($conf->fournisseur->enabled)) + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { // Suppliers $r++; diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 488938a725b..a7e543d2d35 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -41,8 +41,8 @@ if (!empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/p if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; if (!empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; if (!empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -if (!empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; if (!empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; if (!empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; if (!empty($conf->deplacement->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; @@ -1008,13 +1008,13 @@ class doc_generic_project_odt extends ModelePDFProjects 'title' => "ListSupplierOrdersAssociatedProject", 'table' => 'commande_fournisseur', 'class' => 'CommandeFournisseur', - 'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire + 'test' => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire ), 'invoice_supplier' => array( 'title' => "ListSupplierInvoicesAssociatedProject", 'table' => 'facture_fourn', 'class' => 'FactureFournisseur', - 'test' => $conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire + 'test' => (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire ), 'contract' => array( 'title' => "ListContractAssociatedProject", From e6a59dcdbb7407fe7953355d0079b024adf4aca7 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 23 Mar 2020 05:43:41 +0100 Subject: [PATCH 004/456] Work on split module fournisseur --- htdocs/comm/action/class/cactioncomm.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 6d92a3e8263..62051a45134 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -169,8 +169,8 @@ class CActionComm if ($obj->module == 'invoice' && ! $conf->facture->enabled) $qualified=0; if ($obj->module == 'order' && ! $conf->commande->enabled) $qualified=0; if ($obj->module == 'propal' && ! $conf->propal->enabled) $qualified=0; - if ($obj->module == 'invoice_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD || ! $conf->supplier_invoice->enabled)) $qualified=0; - if ($obj->module == 'order_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD || ! $conf->supplier_order->enabled)) $qualified=0; + if ($obj->module == 'invoice_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! $conf->supplier_invoice->enabled) $qualified=0; + if ($obj->module == 'order_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! $conf->supplier_order->enabled) $qualified=0; if ($obj->module == 'shipping' && ! $conf->expedition->enabled) $qualified=0; } From d5729e6dcc90484e33d60593edddc420fdb6e81f Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 23 Mar 2020 05:53:33 +0100 Subject: [PATCH 005/456] Work on split module fournisseur --- htdocs/comm/action/class/cactioncomm.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 62051a45134..df65dd724da 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -169,8 +169,8 @@ class CActionComm if ($obj->module == 'invoice' && ! $conf->facture->enabled) $qualified=0; if ($obj->module == 'order' && ! $conf->commande->enabled) $qualified=0; if ($obj->module == 'propal' && ! $conf->propal->enabled) $qualified=0; - if ($obj->module == 'invoice_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! $conf->supplier_invoice->enabled) $qualified=0; - if ($obj->module == 'order_supplier' && (! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! $conf->supplier_order->enabled) $qualified=0; + if ($obj->module == 'invoice_supplier' && ((! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! $conf->supplier_invoice->enabled)) $qualified=0; + if ($obj->module == 'order_supplier' && ((! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! $conf->supplier_order->enabled)) $qualified=0; if ($obj->module == 'shipping' && ! $conf->expedition->enabled) $qualified=0; } From e6d9f7885c07a774d14bb86072b87bfe96c6eba4 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 24 Mar 2020 21:22:20 +0100 Subject: [PATCH 006/456] Work on split module fournisseur --- htdocs/comm/action/class/cactioncomm.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index df65dd724da..cf60911555d 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -169,8 +169,8 @@ class CActionComm if ($obj->module == 'invoice' && ! $conf->facture->enabled) $qualified=0; if ($obj->module == 'order' && ! $conf->commande->enabled) $qualified=0; if ($obj->module == 'propal' && ! $conf->propal->enabled) $qualified=0; - if ($obj->module == 'invoice_supplier' && ((! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! $conf->supplier_invoice->enabled)) $qualified=0; - if ($obj->module == 'order_supplier' && ((! $conf->fournisseur->enabled && $conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! $conf->supplier_order->enabled)) $qualified=0; + if ($obj->module == 'invoice_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || ! $conf->supplier_invoice->enabled)) $qualified=0; + if ($obj->module == 'order_supplier' && ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || ! $conf->supplier_order->enabled)) $qualified=0; if ($obj->module == 'shipping' && ! $conf->expedition->enabled) $qualified=0; } From 5528e9ef3860891e4fb11f32e52b1bd9094115f3 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 24 Mar 2020 22:02:58 +0100 Subject: [PATCH 007/456] Work on split module fournisseur --- htdocs/core/modules/project/doc/pdf_beluga.modules.php | 4 ++-- htdocs/fourn/card.php | 6 +++--- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/fourn/index.php | 4 ++-- htdocs/fourn/recap-fourn.php | 4 ++-- htdocs/margin/tabs/thirdpartyMargins.php | 2 +- htdocs/product/admin/product.php | 4 ++-- htdocs/product/class/product.class.php | 6 +++--- htdocs/product/stock/product.php | 5 +++-- htdocs/societe/index.php | 4 ++-- htdocs/societe/list.php | 6 +++--- 11 files changed, 24 insertions(+), 23 deletions(-) diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php index 4072f22bf58..23a2a515873 100644 --- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php +++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php @@ -38,8 +38,8 @@ if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/com if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -if (! empty($conf->fournisseur->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_invoice->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +if (! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; if (! empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; if (! empty($conf->deplacement->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 8051b9684f9..f905c1b3f29 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -295,7 +295,7 @@ if ($object->id > 0) print ''; print ''; - if (!empty($conf->fournisseur->enabled) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && !empty($conf->global->ORDER_MANAGE_MIN_AMOUNT)) { print ''; print ''; @@ -378,7 +378,7 @@ if ($object->id > 0) if ($link) $boxstat .= ''; } - if ($conf->fournisseur->enabled) + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { // Box proposals $tmp = $object->getOutstandingOrders('supplier'); @@ -396,7 +396,7 @@ if ($object->id > 0) if ($link) $boxstat .= ''; } - if ($conf->fournisseur->enabled) + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { $tmp = $object->getOutstandingBills('supplier'); $outstandingOpened = $tmp['opened']; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 797e3693614..0913f5ba43b 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3185,7 +3185,7 @@ class CommandeFournisseur extends CommonOrder { global $conf, $langs; - if (!empty($conf->fournisseur->enabled)) + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 207133d9cfa..f9650941555 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -97,7 +97,7 @@ else // Draft orders -if (!empty($conf->fournisseur->enabled)) +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) { $langs->load("orders"); @@ -154,7 +154,7 @@ if (!empty($conf->fournisseur->enabled)) } // Draft invoices -if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { $sql = "SELECT ff.ref_supplier, ff.rowid, ff.total_ttc, ff.type"; $sql .= ", s.nom as name, s.rowid as socid"; diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 2cd52bfeb77..8cda5a20d98 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -65,7 +65,7 @@ if ($socid > 0) dol_banner_tab($societe, 'socid', '', ($user->socid ? 0 : 1), 'rowid', 'nom'); dol_fiche_end(); - if (!empty($conf->fournisseur->enabled) && $user->rights->facture->lire) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->facture->lire) { // Invoice list print load_fiche_titre($langs->trans("SupplierPreview")); @@ -77,7 +77,7 @@ if ($socid > 0) $sql .= " u.login, u.rowid as userid"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture_fourn as f,".MAIN_DB_PREFIX."user as u"; $sql .= " WHERE f.fk_soc = s.rowid AND s.rowid = ".$societe->id; - $sql .= " AND f.entity IN (".getEntity("facture_fourn").")"; // Reconaissance de l'entité attribuée à cette facture pour Multicompany + $sql .= " AND f.entity IN (".getEntity("facture_fourn").")"; // Recognition of the entity attributed to this invoice for Multicompany $sql .= " AND f.fk_user_valid = u.rowid"; $sql .= " ORDER BY f.datef DESC"; diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index 5d7d0039b7a..a31803d2d72 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -106,7 +106,7 @@ if ($socid > 0) print ''; } - if (!empty($conf->fournisseur->enabled) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled)) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) { print ''; print $langs->trans('SupplierCode').''; diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index f3ef5441144..e1fe84600d1 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -564,7 +564,7 @@ $rowspan = 4; if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY_MULTIPRICES)) $rowspan++; if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) $rowspan++; if (!empty($conf->global->MAIN_MULTILANGS)) $rowspan++; -if (!empty($conf->fournisseur->enabled)) $rowspan++; +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled)) $rowspan++; print ''; @@ -680,7 +680,7 @@ if (!empty($conf->global->MAIN_MULTILANGS)) print ''; } -if (!empty($conf->fournisseur->enabled)) +if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled) || ! empty($conf->supplier_invoice->enabled)) { print ''; print ''.$langs->trans("UseProductFournDesc").''; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 96b2165c65a..7e29180a6e7 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4872,19 +4872,19 @@ class Product extends CommonObject if ($result < 0) dol_print_error($this->db, $this->error); $stock_sending_client = $this->stats_expedition['qty']; } - if (!empty($conf->fournisseur->enabled)) + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || ! empty($conf->supplier_order->enabled)) { $result = $this->load_stats_commande_fournisseur(0, '1,2,3,4', 1); if ($result < 0) dol_print_error($this->db, $this->error); $stock_commande_fournisseur = $this->stats_commande_fournisseur['qty']; } - if (!empty($conf->fournisseur->enabled) && empty($conf->reception->enabled)) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) { $result = $this->load_stats_reception(0, '4', 1); if ($result < 0) dol_print_error($this->db, $this->error); $stock_reception_fournisseur = $this->stats_reception['qty']; } - if (!empty($conf->fournisseur->enabled) && !empty($conf->reception->enabled)) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->reception->enabled)) { $result = $this->load_stats_reception(0, '4', 1); // Use same tables than when module reception is not used. if ($result < 0) dol_print_error($this->db, $this->error); diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index af12804aac5..1fa7dfb12a3 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -674,7 +674,8 @@ if ($id > 0 || $ref) } // Number of supplier order running - if (!empty($conf->fournisseur->enabled)) { + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) + { if ($found) $helpondiff .= '
'; else $found = 1; $result = $object->load_stats_commande_fournisseur(0, '3,4', 1); $helpondiff .= $langs->trans("ProductQtyInSuppliersOrdersRunning").': '.$object->stats_commande_fournisseur['qty']; @@ -684,7 +685,7 @@ if ($id > 0 || $ref) } // Number of product from supplier order already received (partial receipt) - if (!empty($conf->fournisseur->enabled)) { + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) { if ($found) $helpondiff .= '
'; else $found = 1; $helpondiff .= $langs->trans("ProductQtyInSuppliersShipmentAlreadyRecevied").': '.$object->stats_reception['qty']; } diff --git a/htdocs/societe/index.php b/htdocs/societe/index.php index 5b89c086c1f..f96082db62c 100644 --- a/htdocs/societe/index.php +++ b/htdocs/societe/index.php @@ -134,7 +134,7 @@ else $statstring .= ''.$langs->trans("Customers").''.round($third['customer']).''; $statstring .= ""; } - if (!empty($conf->fournisseur->enabled) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $user->rights->fournisseur->lire) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS) && $user->rights->fournisseur->lire) { $statstring2 = ""; $statstring2 .= ''.$langs->trans("Suppliers").''.round($third['supplier']).''; @@ -310,7 +310,7 @@ if ($result) $thirdparty_static->name = $langs->trans("Prospect"); print $thirdparty_static->getNomUrl(0, 'prospect', 0, 1); } - if (!empty($conf->fournisseur->enabled) && $thirdparty_static->fournisseur) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $thirdparty_static->fournisseur) { if ($thirdparty_static->client) print " / "; $thirdparty_static->name = $langs->trans("Supplier"); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 63641f27625..253de10fc58 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -178,9 +178,9 @@ $arrayfields = array( 's.name_alias'=>array('label'=>"AliasNameShort", 'position'=>3, 'checked'=>1), 's.barcode'=>array('label'=>"Gencod", 'position'=>5, 'checked'=>1, 'enabled'=>(!empty($conf->barcode->enabled))), 's.code_client'=>array('label'=>"CustomerCodeShort", 'position'=>10, 'checked'=>$checkedcustomercode), - 's.code_fournisseur'=>array('label'=>"SupplierCodeShort", 'position'=>11, 'checked'=>$checkedsuppliercode, 'enabled'=>(!empty($conf->fournisseur->enabled))), + 's.code_fournisseur'=>array('label'=>"SupplierCodeShort", 'position'=>11, 'checked'=>$checkedsuppliercode, 'enabled'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), 's.code_compta'=>array('label'=>"CustomerAccountancyCodeShort", 'position'=>13, 'checked'=>$checkedcustomeraccountcode), - 's.code_compta_fournisseur'=>array('label'=>"SupplierAccountancyCodeShort", 'position'=>14, 'checked'=>$checkedsupplieraccountcode, 'enabled'=>(!empty($conf->fournisseur->enabled))), + 's.code_compta_fournisseur'=>array('label'=>"SupplierAccountancyCodeShort", 'position'=>14, 'checked'=>$checkedsupplieraccountcode, 'enabled'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), 's.town'=>array('label'=>"Town", 'position'=>20, 'checked'=>1), 's.zip'=>array('label'=>"Zip", 'position'=>21, 'checked'=>1), 'state.nom'=>array('label'=>"State", 'position'=>22, 'checked'=>0), @@ -1226,7 +1226,7 @@ while ($i < min($num, $limit)) $companystatic->name_alias = ''; $s .= $companystatic->getNomUrl(0, 'prospect', 0, 1); } - if ((!empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) && $obj->fournisseur) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $obj->fournisseur) { if ($s) $s .= ", "; $companystatic->name = $langs->trans("Supplier"); From c3e5cf901d7c92983797de13786567fe403874dc Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 24 Mar 2020 22:20:25 +0100 Subject: [PATCH 008/456] Work on split module fournisseur --- htdocs/admin/workflow.php | 6 +++--- htdocs/comm/index.php | 2 +- htdocs/compta/index.php | 8 ++++---- htdocs/contact/consumption.php | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 02abcf59660..99185cce733 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -85,11 +85,11 @@ $workflowcodes = array( 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array('family'=>'classify_order', 'position'=>41, 'enabled'=>'! empty($conf->facture->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order', 'warning'=>''), // For this option, if module invoice is disabled, it does not exists, so "Classify billed" for order must be done manually from order card. 'separator2'=>array('family'=>'separator', 'position'=>50), // Automatic classification supplier proposal - 'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array('family'=>'classify_supplier_proposal', 'position'=>60, 'enabled'=>'! empty($conf->supplier_proposal->enabled) && ! empty($conf->fournisseur->enabled)', 'picto'=>'propal', 'warning'=>''), + 'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array('family'=>'classify_supplier_proposal', 'position'=>60, 'enabled'=>'! empty($conf->supplier_proposal->enabled) && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', 'picto'=>'propal', 'warning'=>''), // Automatic classification supplier order - 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array('family'=>'classify_supplier_order', 'position'=>62, 'enabled'=>'! empty($conf->fournisseur->enabled)', 'picto'=>'order', 'warning'=>''), + 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array('family'=>'classify_supplier_order', 'position'=>62, 'enabled'=>'!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)', 'picto'=>'order', 'warning'=>''), //Automatic classification reception - 'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>64, 'enabled'=>'! empty($conf->reception->enabled) && ! empty($conf->fournisseur->enabled)', 'picto'=>'bill'), + 'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>64, 'enabled'=>'! empty($conf->reception->enabled) && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', 'picto'=>'bill'), ); if (!empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index b7370bc1ba1..295562236b2 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -581,7 +581,7 @@ if (!empty($conf->societe->enabled) && $user->rights->societe->lire) } // Last suppliers -if (!empty($conf->fournisseur->enabled) && $user->rights->societe->lire) +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->societe->lire) { $langs->load("boxes"); diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index c9a77e5cc26..bbbb9912bd1 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -101,7 +101,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles $listofsearchfields['search_invoice'] = array('text'=>'CustomerInvoice'); } // Search supplier invoices - if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire) + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->lire) { $listofsearchfields['search_supplier_invoice'] = array('text'=>'SupplierInvoice'); } @@ -231,7 +231,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) /** * Draft suppliers invoices */ -if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { $sql = "SELECT f.ref, f.rowid, f.total_ht, f.total_tva, f.total_ttc, f.type, f.ref_supplier"; $sql .= ", s.nom as name"; @@ -447,7 +447,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) // Last modified supplier invoices -if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { $langs->load("boxes"); $facstatic = new FactureFournisseur($db); @@ -958,7 +958,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) /* * Unpayed supplier invoices */ -if (!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire) +if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { $facstatic = new FactureFournisseur($db); diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index f27903f559e..e5150c7d81f 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -147,11 +147,11 @@ if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire) $elementTypeA if ($object->thirdparty->fournisseur) { $thirdTypeArray['supplier']=$langs->trans("supplier"); - if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice']=$langs->transnoentitiesnoconv('SuppliersInvoices'); - if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order']=$langs->transnoentitiesnoconv('SuppliersOrders'); + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice']=$langs->transnoentitiesnoconv('SuppliersInvoices'); + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order']=$langs->transnoentitiesnoconv('SuppliersOrders'); // There no contact type for supplier proposals - // if ($conf->fournisseur->enabled && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals'); + // if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals'); } print ''; From 6a53e02c3c1d2c5216cf68aa9788756feb223abf Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Sun, 5 Apr 2020 14:02:51 +0200 Subject: [PATCH 009/456] FIX better url for get conf with REST API need to be more userfriendly and similar to other api (without a variable with GET varible in URL "?confname=" --- htdocs/api/class/api_setup.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 7b47c59dbb7..05d9214389f 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1409,15 +1409,15 @@ class Setup extends DolibarrApi * * Note that conf variables that stores security key or password hashes can't be loaded with API. * - * @url GET /conf - * - * @param string $confname Name of conf variable to get + * @param string $constante Name of conf variable to get * @return array|mixed Data without useless information * + * @url GET conf/{constante} + * * @throws RestException 403 Forbidden - * @throws RestException 500 Error Bad or unknown value for constname + * @throws RestException 500 Error Bad or unknown value for constname */ - public function getConf($confname) + public function getConf($constante) { global $conf; @@ -1426,14 +1426,14 @@ class Setup extends DolibarrApi throw new RestException(403, 'Error API open to admin users only or to the login user defined with constant API_LOGIN_ALLOWED_FOR_ADMIN_CHECK'); } - if (! preg_match('/^[a-zA-Z0-9_]+$/', $confname) || ! isset($conf->global->$confname)) { + if (! preg_match('/^[a-zA-Z0-9_]+$/', $constante) || ! isset($conf->global->$constante)) { throw new RestException(500, 'Error Bad or unknown value for constname'); } - if (preg_match('/(_pass|password|secret|_key|key$)/i', $confname)) { + if (preg_match('/(_pass|password|secret|_key|key$)/i', $constante)) { throw new RestException(403, 'Forbidden'); } - return $conf->global->$confname; + return $conf->global->$constante; } /** From 1827541f88dab73951f49371d0f4c19d8a0205fa Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 5 Apr 2020 12:04:25 +0000 Subject: [PATCH 010/456] Fixing style errors. --- htdocs/api/class/api_setup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 05d9214389f..d6ee0f1a79e 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1413,7 +1413,7 @@ class Setup extends DolibarrApi * @return array|mixed Data without useless information * * @url GET conf/{constante} - * + * * @throws RestException 403 Forbidden * @throws RestException 500 Error Bad or unknown value for constname */ From 26bc5381e47e2757d4bae54a977c301813216f5c Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Wed, 8 Apr 2020 14:57:34 +0200 Subject: [PATCH 011/456] Update api_setup.class.php --- htdocs/api/class/api_setup.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index d6ee0f1a79e..5f867c066c7 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1409,15 +1409,15 @@ class Setup extends DolibarrApi * * Note that conf variables that stores security key or password hashes can't be loaded with API. * - * @param string $constante Name of conf variable to get + * @param string $constantname Name of conf variable to get * @return array|mixed Data without useless information * - * @url GET conf/{constante} + * @url GET conf/{constantname} * * @throws RestException 403 Forbidden * @throws RestException 500 Error Bad or unknown value for constname */ - public function getConf($constante) + public function getConf($constantname) { global $conf; @@ -1426,14 +1426,14 @@ class Setup extends DolibarrApi throw new RestException(403, 'Error API open to admin users only or to the login user defined with constant API_LOGIN_ALLOWED_FOR_ADMIN_CHECK'); } - if (! preg_match('/^[a-zA-Z0-9_]+$/', $constante) || ! isset($conf->global->$constante)) { + if (! preg_match('/^[a-zA-Z0-9_]+$/', $constantname) || ! isset($conf->global->$constantname)) { throw new RestException(500, 'Error Bad or unknown value for constname'); } - if (preg_match('/(_pass|password|secret|_key|key$)/i', $constante)) { + if (preg_match('/(_pass|password|secret|_key|key$)/i', $constantname)) { throw new RestException(403, 'Forbidden'); } - return $conf->global->$constante; + return $conf->global->$constantname; } /** From e915552ae18882a1c39d9a3252ba77e9d9c688f3 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sat, 18 Apr 2020 11:39:33 +0200 Subject: [PATCH 012/456] New class tool for converting units --- htdocs/core/class/unitsTools.class.php | 119 +++++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 htdocs/core/class/unitsTools.class.php diff --git a/htdocs/core/class/unitsTools.class.php b/htdocs/core/class/unitsTools.class.php new file mode 100644 index 00000000000..79ffdb82338 --- /dev/null +++ b/htdocs/core/class/unitsTools.class.php @@ -0,0 +1,119 @@ +unit_type == 'time'){ + return doubleval($unit->scale); + } + + return pow($base, doubleval($unit->scale)); + } + + return 0; + } + + /** + * return first result from query + * @param string $sql the sql query string + * @return bool| var + */ + static public function dbGetvalue($sql) + { + global $db; + $sql .= ' LIMIT 1;'; + + $res = $db->query($sql); + if ($res) + { + $Tresult = $db->fetch_row($res); + return $Tresult[0]; + } + + return false; + } + + /** + * return first result from query + * @param string $sql the sql query string + * @return bool| var + */ + static public function dbGetRow($sql) + { + global $db; + $sql .= ' LIMIT 1;'; + + $res = $db->query($sql); + if ($res) + { + return $db->fetch_object($res); + } + + return false; + } +} From 09591d75f6bfd848363cddd4a4dbf0888bf5ddb9 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sat, 18 Apr 2020 13:20:08 +0200 Subject: [PATCH 013/456] Sql write less do more... --- htdocs/core/class/unitsTools.class.php | 42 ++------------------------ htdocs/core/db/DoliDB.class.php | 38 +++++++++++++++++++++++ 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/htdocs/core/class/unitsTools.class.php b/htdocs/core/class/unitsTools.class.php index 79ffdb82338..a5bc839da0c 100644 --- a/htdocs/core/class/unitsTools.class.php +++ b/htdocs/core/class/unitsTools.class.php @@ -63,9 +63,10 @@ class UnitsTools */ static public function scaleOfUnitPow($id) { + global $db; $base = 10; // TODO : add base col into unit dictionary table - $unit = self::dbGetRow('SELECT scale, unit_type from '.MAIN_DB_PREFIX.'c_units WHERE rowid = '.intval($id)); + $unit = $db->getRow('SELECT scale, unit_type from '.MAIN_DB_PREFIX.'c_units WHERE rowid = '.intval($id)); if($unit){ // TODO : if base exist in unit dictionary table remove this convertion exception and update convertion infos in database exemple time hour currently scale 3600 will become scale 2 base 60 if($unit->unit_type == 'time'){ @@ -77,43 +78,4 @@ class UnitsTools return 0; } - - /** - * return first result from query - * @param string $sql the sql query string - * @return bool| var - */ - static public function dbGetvalue($sql) - { - global $db; - $sql .= ' LIMIT 1;'; - - $res = $db->query($sql); - if ($res) - { - $Tresult = $db->fetch_row($res); - return $Tresult[0]; - } - - return false; - } - - /** - * return first result from query - * @param string $sql the sql query string - * @return bool| var - */ - static public function dbGetRow($sql) - { - global $db; - $sql .= ' LIMIT 1;'; - - $res = $db->query($sql); - if ($res) - { - return $db->fetch_object($res); - } - - return false; - } } diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index 96e76097877..c38db8f9c99 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -297,4 +297,42 @@ abstract class DoliDB implements Database { return $this->lastqueryerror; } + + + /** + * return first result value from query + * @param string $sql the sql query string + * @return bool| var + */ + public function getvalue($sql) + { + $sql .= ' LIMIT 1;'; + + $res = $this->query($sql); + if ($res) + { + $Tresult = $this->fetch_row($res); + return $Tresult[0]; + } + + return false; + } + + /** + * return first result from query as object + * @param string $sql the sql query string + * @return bool| var + */ + public function getRow($sql) + { + $sql .= ' LIMIT 1;'; + + $res = $this->query($sql); + if ($res) + { + return $this->fetch_object($res); + } + + return false; + } } From 395446a924f6a5ed7d3f3851f6906b40dfe35180 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sat, 18 Apr 2020 13:44:13 +0200 Subject: [PATCH 014/456] Add getRows method and comments --- htdocs/core/db/DoliDB.class.php | 36 +++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index c38db8f9c99..e3e0491b298 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -300,11 +300,13 @@ abstract class DoliDB implements Database /** - * return first result value from query + * Return first result value from query + * Note : This method executes a given SQL query and retrieves the first value of the first row of results. It should only be used with SELECT queries. + * Dont add LIMIT to your query, it will be added by this method * @param string $sql the sql query string * @return bool| var */ - public function getvalue($sql) + public function getValue($sql) { $sql .= ' LIMIT 1;'; @@ -319,9 +321,11 @@ abstract class DoliDB implements Database } /** - * return first result from query as object + * Return first result from query as object + * Note : This method executes a given SQL query and retrieves the first row of results as an object. It should only be used with SELECT queries + * Dont add LIMIT to your query, it will be added by this method * @param string $sql the sql query string - * @return bool| var + * @return bool| object */ public function getRow($sql) { @@ -335,4 +339,28 @@ abstract class DoliDB implements Database return false; } + + /** + * return all results from query as an array of objects + * Note : This method executes a given SQL query and retrieves all row of results as an array of objects. It should only be used with SELECT queries + * be carefull with this method use it only with some limit of results to avoid performences loss + * @param string $sql the sql query string + * @return bool| array + */ + public function getRows($sql) + { + $res = $this->query($sql); + if ($res) + { + $results = array(); + if($this->num_rows($res) > 0){ + while ($obj = $this->fetch_object($res)){ + $results[] = $obj; + } + } + return $results; + } + + return false; + } } From f2435f6247adb16374ff732dd8797e81a335c720 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sat, 18 Apr 2020 16:08:26 +0200 Subject: [PATCH 015/456] Move methods to cunits class --- htdocs/core/class/cunits.class.php | 73 +++++++++++++++++++++++ htdocs/core/class/unitsTools.class.php | 81 -------------------------- 2 files changed, 73 insertions(+), 81 deletions(-) delete mode 100644 htdocs/core/class/unitsTools.class.php diff --git a/htdocs/core/class/cunits.class.php b/htdocs/core/class/cunits.class.php index 65baf0056e9..6de3af70416 100644 --- a/htdocs/core/class/cunits.class.php +++ b/htdocs/core/class/cunits.class.php @@ -386,4 +386,77 @@ class CUnits // extends CommonObject return 1; } } + + + /** + * Get unit from code + * @param string $code code of unit + * @param string $mode 0= id , short_label=Use short label as value, code=use code + * @return int <0 if KO, Id of code if OK + */ + public function getUnitFromCode($code, $mode = 'code') + { + + if($mode == 'short_label'){ + return dol_getIdFromCode($this->db, $code, 'c_units', 'short_label', 'rowid'); + } + elseif($mode == 'code'){ + return dol_getIdFromCode($this->db, $code, 'c_units', 'code', 'rowid'); + } + + return $code; + } + + /** + * Unit converter + * @param double $value value to convert + * @param int $fk_unit current unit id of value + * @param int $fk_new_unit the id of unit to convert in + * @return double + */ + public function unitConverter($value, $fk_unit, $fk_new_unit = 0) + { + $value = doubleval(price2num($value)); + $fk_unit = intval($fk_unit); + + // Calcul en unité de base + $scaleUnitPow = $this->scaleOfUnitPow($fk_unit); + + // convert to standard unit + $value = $value * $scaleUnitPow; + if($fk_new_unit !=0 ){ + // Calcul en unité de base + $scaleUnitPow = $this->scaleOfUnitPow($fk_new_unit); + if(!empty($scaleUnitPow)) + { + // convert to new unit + $value = $value / $scaleUnitPow; + } + } + return round($value, 2); + } + + + + /** + * get scale of unit factor + * @param $id int id of unit in dictionary + * @return float|int + */ + public function scaleOfUnitPow($id) + { + $base = 10; + // TODO : add base col into unit dictionary table + $unit = $this->db->getRow('SELECT scale, unit_type from '.MAIN_DB_PREFIX.'c_units WHERE rowid = '.intval($id)); + if($unit){ + // TODO : if base exist in unit dictionary table remove this convertion exception and update convertion infos in database exemple time hour currently scale 3600 will become scale 2 base 60 + if($unit->unit_type == 'time'){ + return doubleval($unit->scale); + } + + return pow($base, doubleval($unit->scale)); + } + + return 0; + } } diff --git a/htdocs/core/class/unitsTools.class.php b/htdocs/core/class/unitsTools.class.php deleted file mode 100644 index a5bc839da0c..00000000000 --- a/htdocs/core/class/unitsTools.class.php +++ /dev/null @@ -1,81 +0,0 @@ -getRow('SELECT scale, unit_type from '.MAIN_DB_PREFIX.'c_units WHERE rowid = '.intval($id)); - if($unit){ - // TODO : if base exist in unit dictionary table remove this convertion exception and update convertion infos in database exemple time hour currently scale 3600 will become scale 2 base 60 - if($unit->unit_type == 'time'){ - return doubleval($unit->scale); - } - - return pow($base, doubleval($unit->scale)); - } - - return 0; - } -} From e230a3a264ce7e81b0ea61111ebc72161f406a82 Mon Sep 17 00:00:00 2001 From: ATM john Date: Sat, 18 Apr 2020 16:24:12 +0200 Subject: [PATCH 016/456] add num row test --- htdocs/core/db/DoliDB.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index e3e0491b298..3bb5e025c34 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -313,8 +313,10 @@ abstract class DoliDB implements Database $res = $this->query($sql); if ($res) { - $Tresult = $this->fetch_row($res); - return $Tresult[0]; + if($this->num_rows($res) > 0) { + $Tresult = $this->fetch_row($res); + return reset($Tresult); + } } return false; From 3f5270cf3906cc13156addc507fe688dc5451007 Mon Sep 17 00:00:00 2001 From: ATM john Date: Wed, 22 Apr 2020 23:12:15 +0200 Subject: [PATCH 017/456] Remove getValue Method : usage of fetch_row is deprecated --- htdocs/core/db/DoliDB.class.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index 3bb5e025c34..2818eff65e2 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -298,30 +298,6 @@ abstract class DoliDB implements Database return $this->lastqueryerror; } - - /** - * Return first result value from query - * Note : This method executes a given SQL query and retrieves the first value of the first row of results. It should only be used with SELECT queries. - * Dont add LIMIT to your query, it will be added by this method - * @param string $sql the sql query string - * @return bool| var - */ - public function getValue($sql) - { - $sql .= ' LIMIT 1;'; - - $res = $this->query($sql); - if ($res) - { - if($this->num_rows($res) > 0) { - $Tresult = $this->fetch_row($res); - return reset($Tresult); - } - } - - return false; - } - /** * Return first result from query as object * Note : This method executes a given SQL query and retrieves the first row of results as an object. It should only be used with SELECT queries From 4220d6b253d1626d73920072de291ef30c97aeba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 23 Apr 2020 00:38:42 +0200 Subject: [PATCH 018/456] actioncomm note deprecated --- htdocs/comm/action/class/actioncomm.class.php | 15 +++++++-------- test/phpunit/ActionCommTest.php | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 8c1e2051a81..09c114375b1 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -380,7 +380,7 @@ class ActionComm extends CommonObject // Clean parameters $this->label = dol_trunc(trim($this->label), 128); $this->location = dol_trunc(trim($this->location), 128); - $this->note = dol_htmlcleanlastbr(trim($this->note)); + $this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private)); if (empty($this->percentage)) $this->percentage = 0; if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0; if (empty($this->fulldayevent)) $this->fulldayevent = 0; @@ -488,7 +488,7 @@ class ActionComm extends CommonObject $sql .= ($this->ref_ext ? ("'".$this->db->idate($this->ref_ext)."'") : "null").", "; $sql .= ((isset($this->socid) && $this->socid > 0) ? $this->socid : "null").", "; $sql .= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : "null").", "; - $sql .= " '".$this->db->escape($this->note_private ? $this->note_private : $this->note)."', "; + $sql .= " '".$this->db->escape($this->note_private)."', "; $sql .= ((isset($this->contactid) && $this->contactid > 0) ? $this->contactid : "null").", "; $sql .= (isset($user->id) && $user->id > 0 ? $user->id : "null").", "; $sql .= ($userownerid > 0 ? $userownerid : "null").", "; @@ -993,7 +993,7 @@ class ActionComm extends CommonObject // Clean parameters $this->label = trim($this->label); - $this->note = trim($this->note); + $this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private)); if (empty($this->percentage)) $this->percentage = 0; if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0; if (empty($this->transparency)) $this->transparency = 0; @@ -1027,7 +1027,7 @@ class ActionComm extends CommonObject $sql .= ", datep = ".(strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : 'null'); $sql .= ", datep2 = ".(strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : 'null'); $sql .= ", durationp = ".(isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '' ? "'".$this->db->escape($this->durationp)."'" : "null"); // deprecated - $sql .= ", note = '".$this->db->escape($this->note_private ? $this->note_private : $this->note)."'"; + $sql .= ", note = '".$this->db->escape($this->note_private)."'"; $sql .= ", fk_project =".($this->fk_project > 0 ? $this->fk_project : "null"); $sql .= ", fk_soc =".($socid > 0 ? $socid : "null"); $sql .= ", fk_contact =".($contactid > 0 ? $contactid : "null"); @@ -1406,8 +1406,8 @@ class ActionComm extends CommonObject $tooltip .= '
'.$langs->trans('Type').': '.$labeltype; if (!empty($this->location)) $tooltip .= '
'.$langs->trans('Location').': '.$this->location; - if (!empty($this->note)) - $tooltip .= '
'.$langs->trans('Note').': '.(dol_textishtml($this->note) ? str_replace(array("\r", "\n"), "", $this->note) : str_replace(array("\r", "\n"), '
', $this->note)); + if (!empty($this->note_private)) + $tooltip .= '
'.$langs->trans('Note').': '.(dol_textishtml($this->note_private) ? str_replace(array("\r", "\n"), "", $this->note_private) : str_replace(array("\r", "\n"), '
', $this->note_private)); $linkclose = ''; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color) $linkclose = ' style="background-color:#'.$this->type_color.'"'; @@ -1940,8 +1940,7 @@ class ActionComm extends CommonObject $this->location = 'Location'; $this->transparency = 1; // 1 means opaque $this->priority = 1; - $this->note = "This is a 'public' note"; - $this->note_public = "This is a 'public' note."; + //$this->note_public = "This is a 'public' note."; $this->note_private = "This is a 'private' note."; $this->userownerid = $user->id; diff --git a/test/phpunit/ActionCommTest.php b/test/phpunit/ActionCommTest.php index 6bb7f12250d..34d67341afb 100644 --- a/test/phpunit/ActionCommTest.php +++ b/test/phpunit/ActionCommTest.php @@ -140,7 +140,7 @@ class ActionCommTest extends PHPUnit\Framework\TestCase $localobject->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) $localobject->code = 'AC_PHPUNITTEST'; $localobject->label = 'This is a description'; - $localobject->note = 'This is note'; + $localobject->note_private = 'This is note'; $localobject->fk_project = 0; $localobject->datep = $now; $localobject->datef = $now; From 177008ab65a06221663e496809e904ec2363ae8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 23 Apr 2020 00:45:33 +0200 Subject: [PATCH 019/456] actioncomm note deprecated --- htdocs/comm/action/card.php | 9 ++++----- htdocs/comm/action/class/actioncomm.class.php | 12 ++++++------ htdocs/comm/action/list.php | 7 +++---- 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index fb07acbd337..716e02ae678 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -317,7 +317,7 @@ if (empty($reshook) && $action == 'add') if (GETPOST("doneby") > 0) $object->userdoneid = GETPOST("doneby", "int"); } - $object->note = trim(GETPOST("note")); + $object->note_private = trim(GETPOST("note")); if (isset($_POST["contactid"])) $object->contact = $contact; @@ -465,7 +465,6 @@ if (empty($reshook) && $action == 'update') $object->contactid = key($object->socpeopleassigned); } $object->fk_project = GETPOST("projectid", 'int'); - $object->note = GETPOST("note", "none"); // deprecated $object->note_private = GETPOST("note", "none"); $object->fk_element = GETPOST("fk_element", "int"); $object->elementtype = GETPOST("elementtype", "alphanohtml"); @@ -1122,7 +1121,7 @@ if ($action == 'create') // Description print ''.$langs->trans("Description").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('note', (GETPOST('note', 'none') ?GETPOST('note', 'none') : $object->note), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%'); + $doleditor = new DolEditor('note', (GETPOST('note', 'none') ?GETPOST('note', 'none') : $object->note_private), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%'); $doleditor->Create(); print ''; @@ -1188,7 +1187,7 @@ if ($id > 0) $object->contactid = GETPOST("contactid", 'int'); $object->fk_project = GETPOST("projectid", 'int'); - $object->note = GETPOST("note", 'none'); + $object_private = GETPOST("note", 'none'); } if ($result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0) @@ -1540,7 +1539,7 @@ if ($id > 0) print ''.$langs->trans("Description").''; // Editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('note', $object->note, '', 200, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_5, '90%'); + $doleditor = new DolEditor('note', $object->note_private, '', 200, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_5, '90%'); $doleditor->Create(); print ''; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 09c114375b1..d5b2d542b05 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -733,14 +733,14 @@ class ActionComm extends CommonObject $this->type_short = (($transcode != "Action".$obj->type_code.'Short') ? $transcode : ''); $this->code = $obj->code; - $this->label = $obj->label; - $this->datep = $this->db->jdate($obj->datep); - $this->datef = $this->db->jdate($obj->datep2); + $this->label = $obj->label; + $this->datep = $this->db->jdate($obj->datep); + $this->datef = $this->db->jdate($obj->datep2); - $this->datec = $this->db->jdate($obj->datec); - $this->datem = $this->db->jdate($obj->datem); + $this->datec = $this->db->jdate($obj->datec); + $this->datem = $this->db->jdate($obj->datem); - $this->note = $obj->note; + $this->note = $obj->note; // deprecated $this->note_private = $obj->note; $this->percentage = $obj->percentage; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 9f28d278ed1..a4b1a9618fb 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -553,8 +553,7 @@ if ($resql) $actionstatic->type_picto = $obj->type_picto; $actionstatic->label = $obj->label; $actionstatic->location = $obj->location; - $actionstatic->note = dol_htmlentitiesbr($obj->note); // deprecated - $actionstatic->note_public = dol_htmlentitiesbr($obj->note); + $actionstatic->note_private = dol_htmlentitiesbr($obj->note); $actionstatic->fetchResources(); @@ -613,8 +612,8 @@ if ($resql) // Description if (!empty($arrayfields['a.note']['checked'])) { print ''; - $text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note, 0)); - print $form->textwithtooltip(dol_trunc($text, 40), $actionstatic->note); + $text = dolGetFirstLineOfText(dol_string_nohtmltag($actionstatic->note_private, 0)); + print $form->textwithtooltip(dol_trunc($text, 40), $actionstatic->note_private); print ''; } From e15256712278343032c08734e60d597847b2c62f Mon Sep 17 00:00:00 2001 From: Lenin Rivas <53640168+leninrivas@users.noreply.github.com> Date: Thu, 23 Apr 2020 00:38:08 -0500 Subject: [PATCH 020/456] Add Button Cancel And cancel confirmation --- htdocs/expedition/card.php | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 655ba8f060f..cb3c908138b 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -12,6 +12,7 @@ * Copyright (C) 2016-2018 Ferran Marcet * Copyright (C) 2016 Yasser Carreón * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Lenin Rivas * * 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 @@ -460,7 +461,23 @@ if (empty($reshook)) } } } + + elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->expedition->supprimer) + { + + $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); + $result = $object->cancel(0, $also_update_stock); + if ($result > 0) + { + $result = $object->setStatut(-1); + } + else + { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer) { $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); @@ -1689,7 +1706,7 @@ elseif ($id || $ref) $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('ValidateSending'), $text, 'confirm_valid', '', 0, 1); } // Confirm cancelation - if ($action == 'annuler') + if ($action == 'cancel') { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans('CancelSending'), $langs->trans("ConfirmCancelSending", $object->ref), 'confirm_cancel', '', 0, 1); } @@ -2575,6 +2592,16 @@ elseif ($id || $ref) } } + // Cancel + if ($object->statut == Expedition::STATUS_VALIDATED) + { + if ($user->rights->expedition->supprimer) + { + print ''.$langs->trans("Cancel").''; + } + } + + // Delete if ($user->rights->expedition->supprimer) { print ''.$langs->trans("Delete").''; From 47654fd6290138c503d315d487f947314ed79cfc Mon Sep 17 00:00:00 2001 From: Lenin Rivas <53640168+leninrivas@users.noreply.github.com> Date: Thu, 23 Apr 2020 00:49:31 -0500 Subject: [PATCH 021/456] Shipment Canceled Shipment canceled, not delete ref and recovery stock. --- htdocs/expedition/class/expedition.class.php | 228 ++++++++++++++++++- 1 file changed, 227 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 624add5c075..92d2d146d58 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -12,6 +12,7 @@ * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Lenin Rivas * * 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 @@ -175,7 +176,11 @@ class Expedition extends CommonObject */ const STATUS_CLOSED = 2; - + /** + * Canceled status + */ + const STATUS_CANCELED = -1; + /** * Constructor @@ -1165,6 +1170,227 @@ class Expedition extends CommonObject } } + + /** + * Cancel shipment. + * + * @param int $notrigger Disable triggers + * @param bool $also_update_stock true if the stock should be increased back (false by default) + * @return int >0 if OK, 0 if deletion done but failed to delete files, <0 if KO + */ + public function cancel($notrigger = 0, $also_update_stock = false) + { + global $conf, $langs, $user; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expeditionbatch.class.php'; + + $error=0; + $this->error=''; + + $this->db->begin(); + + // Add a protection to refuse deleting if shipment has at least one delivery + $this->fetchObjectLinked($this->id, 'shipping', 0, 'delivery'); // Get deliveries linked to this shipment + if (count($this->linkedObjectsIds) > 0) + { + $this->error='ErrorThereIsSomeDeliveries'; + $error++; + } + + if (! $error) + { + if (! $notrigger) + { + // Call trigger + $result=$this->call_trigger('SHIPPING_CANCEL', $user); + if ($result < 0) { $error++; } + // End call triggers + } + } + + // Stock control + if (! $error && $conf->stock->enabled && + (($conf->global->STOCK_CALCULATE_ON_SHIPMENT && $this->statut > self::STATUS_DRAFT) || + ($conf->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE && $this->statut == self::STATUS_CLOSED && $also_update_stock))) + { + require_once DOL_DOCUMENT_ROOT."/product/stock/class/mouvementstock.class.php"; + + $langs->load("agenda"); + + // Loop on each product line to add a stock movement and delete features + $sql = "SELECT cd.fk_product, cd.subprice, ed.qty, ed.fk_entrepot, ed.rowid as expeditiondet_id"; + $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd,"; + $sql .= " ".MAIN_DB_PREFIX."expeditiondet as ed"; + $sql .= " WHERE ed.fk_expedition = ".$this->id; + $sql .= " AND cd.rowid = ed.fk_origin_line"; + + dol_syslog(get_class($this)."::delete select details", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $cpt = $this->db->num_rows($resql); + for ($i = 0; $i < $cpt; $i++) + { + dol_syslog(get_class($this)."::delete movement index ".$i); + $obj = $this->db->fetch_object($resql); + + $mouvS = new MouvementStock($this->db); + // we do not log origin because it will be deleted + $mouvS->origin = null; + // get lot/serial + $lotArray = null; + if ($conf->productbatch->enabled) + { + $lotArray = ExpeditionLineBatch::fetchAll($this->db, $obj->expeditiondet_id); + if (!is_array($lotArray)) + { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } + } + if (empty($lotArray)) { + // no lot/serial + // We increment stock of product (and sub-products) + // We use warehouse selected for each line + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref)); // Price is set to 0, because we don't want to see WAP changed + if ($result < 0) + { + $error++; $this->errors = $this->errors + $mouvS->errors; + break; + } + } + else + { + // We increment stock of batches + // We use warehouse selected for each line + foreach ($lotArray as $lot) + { + $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed + if ($result < 0) + { + $error++; $this->errors = $this->errors + $mouvS->errors; + break; + } + } + if ($error) break; // break for loop incase of error + } + } + } + else + { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } + } + + // delete batch expedition line + if (!$error && $conf->productbatch->enabled) + { + if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) + { + $error++; $this->errors[] = "Error ".$this->db->lasterror(); + } + } + + + if (!$error) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet"; + $sql .= " WHERE fk_expedition = ".$this->id; + + if ($this->db->query($sql)) + { + // Delete linked object + $res = $this->deleteObjectLinked(); + if ($res < 0) $error++; + + // No delete expedition + if (!$error) + { + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."expedition"; + $sql .= " WHERE rowid = ".$this->id; + + if ($this->db->query($sql)) + { + if (!empty($this->origin) && $this->origin_id > 0) + { + $this->fetch_origin(); + $origin = $this->origin; + if ($this->$origin->statut == Commande::STATUS_SHIPMENTONPROCESS) // If order source of shipment is "shipment in progress" + { + // Check if there is no more shipment. If not, we can move back status of order to "validated" instead of "shipment in progress" + $this->$origin->loadExpeditions(); + //var_dump($this->$origin->expeditions);exit; + if (count($this->$origin->expeditions) <= 0) + { + $this->$origin->setStatut(Commande::STATUS_VALIDATED); + } + } + } + + if (!$error) + { + $this->db->commit(); + + // We delete PDFs + $ref = dol_sanitizeFileName($this->ref); + if (!empty($conf->expedition->dir_output)) + { + $dir = $conf->expedition->dir_output.'/sending/'.$ref; + $file = $dir.'/'.$ref.'.pdf'; + if (file_exists($file)) + { + if (!dol_delete_file($file)) + { + return 0; + } + } + if (file_exists($dir)) + { + if (!dol_delete_dir_recursive($dir)) + { + $this->error = $langs->trans("ErrorCanNotDeleteDir", $dir); + return 0; + } + } + } + + return 1; + } + else + { + $this->db->rollback(); + return -1; + } + } + else + { + $this->error = $this->db->lasterror()." - sql=$sql"; + $this->db->rollback(); + return -3; + } + } + else + { + $this->error = $this->db->lasterror()." - sql=$sql"; + $this->db->rollback(); + return -2; + }//*/ + } + else + { + $this->error = $this->db->lasterror()." - sql=$sql"; + $this->db->rollback(); + return -1; + } + } + else + { + $this->db->rollback(); + return -1; + } + + } + /** * Delete shipment. * Warning, do not delete a shipment if a delivery is linked to (with table llx_element_element) From ff694c22d1900706d3bebe0a2a69dd29529cc57c Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 23 Apr 2020 05:54:13 +0000 Subject: [PATCH 022/456] Fixing style errors. --- htdocs/expedition/card.php | 12 +++++------- htdocs/expedition/class/expedition.class.php | 9 ++++----- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index cb3c908138b..b8a17e35c5e 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -461,10 +461,9 @@ if (empty($reshook)) } } } - + elseif ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->expedition->supprimer) { - $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); $result = $object->cancel(0, $also_update_stock); if ($result > 0) @@ -475,9 +474,8 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } - } - + elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expedition->supprimer) { $also_update_stock = (GETPOST('alsoUpdateStock', 'alpha') ? 1 : 0); @@ -2592,15 +2590,15 @@ elseif ($id || $ref) } } - // Cancel + // Cancel if ($object->statut == Expedition::STATUS_VALIDATED) - { + { if ($user->rights->expedition->supprimer) { print ''.$langs->trans("Cancel").''; } } - + // Delete if ($user->rights->expedition->supprimer) { diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 92d2d146d58..1db01a61820 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -180,7 +180,7 @@ class Expedition extends CommonObject * Canceled status */ const STATUS_CANCELED = -1; - + /** * Constructor @@ -1170,7 +1170,7 @@ class Expedition extends CommonObject } } - + /** * Cancel shipment. * @@ -1291,7 +1291,7 @@ class Expedition extends CommonObject } } - + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet"; @@ -1388,9 +1388,8 @@ class Expedition extends CommonObject $this->db->rollback(); return -1; } - } - + /** * Delete shipment. * Warning, do not delete a shipment if a delivery is linked to (with table llx_element_element) From f793844862a30715ae7b87c706d03b6730421dd4 Mon Sep 17 00:00:00 2001 From: "Sekan, Tobias" Date: Thu, 23 Apr 2020 11:04:14 +0200 Subject: [PATCH 023/456] Fix missing errror on facture clone --- htdocs/fourn/class/fournisseur.facture.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index bc353e7ef0d..61ac0899bff 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2674,6 +2674,7 @@ class FactureFournisseur extends CommonInvoice if ($result < 0) { $this->error = $object->error; + $this->errors = $object->errors; $error++; } @@ -3154,7 +3155,7 @@ class SupplierInvoiceLine extends CommonObjectLine dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } } - + if (!$error) { // Supprime ligne $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det '; From 0999f5e6f26bc39e67b80b2ac9a0ce0cdcfa8d89 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 23 Apr 2020 12:12:50 +0200 Subject: [PATCH 024/456] FIX: Error update SQL into stock reception --- htdocs/product/stock/class/mouvementstock.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index e0266172463..2799cbaaf50 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -515,10 +515,11 @@ class MouvementStock extends CommonObject // Update PMP and denormalized value of stock qty at product level if (! $error) { + $newpmp = price2num($newpmp,'MU'); // $sql = "UPDATE ".MAIN_DB_PREFIX."product SET pmp = ".$newpmp.", stock = ".$this->db->ifsql("stock IS NULL", 0, "stock") . " + ".$qty; // $sql.= " WHERE rowid = ".$fk_product; // Update pmp + denormalized fields because we change content of produt_stock. Warning: Do not use "SET p.stock", does not works with pgsql - $sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET pmp = ".$newpmp.", "; + $sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET pmp = '".$newpmp."', "; $sql.= " stock=(SELECT SUM(ps.reel) FROM ".MAIN_DB_PREFIX."product_stock as ps WHERE ps.fk_product = p.rowid)"; $sql.= " WHERE rowid = ".$fk_product; From d11396be3e5becdb80fe72c54e30a6fa905ff8c9 Mon Sep 17 00:00:00 2001 From: Drosis Nikos Date: Thu, 23 Apr 2020 13:22:30 +0300 Subject: [PATCH 025/456] Fix check VAT ID HTTP to HTTPS No response to HTTP --- htdocs/societe/checkvat/checkVatPopup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 8d004fa4c79..91f24bbb915 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -28,9 +28,9 @@ require_once NUSOAP_PATH.'/nusoap.php'; $langs->load("companies"); //http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl -$WS_DOL_URL = 'http://ec.europa.eu/taxation_customs/vies/services/checkVatService'; +$WS_DOL_URL = 'https://ec.europa.eu/taxation_customs/vies/services/checkVatService'; //$WS_DOL_URL_WSDL=$WS_DOL_URL.'?wsdl'; -$WS_DOL_URL_WSDL = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'; +$WS_DOL_URL_WSDL = 'https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'; $WS_METHOD = 'checkVat'; From 93278b2dca15a5c3cf299d9648ef7ccbcfb51772 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 12:42:03 +0200 Subject: [PATCH 026/456] FIX #13713 --- htdocs/fourn/commande/info.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index efabf409cdc..6764c00f003 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -40,6 +40,17 @@ $id=GETPOST('id', 'int'); $ref=GETPOST('ref', 'alpha'); $action = GETPOST('action', 'alpha'); +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST("sortfield", 'alpha'); +$sortorder = GETPOST("sortorder", 'alpha'); +$page = GETPOST("page", 'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (!$sortfield) $sortfield = 'a.datep,a.id'; +if (!$sortorder) $sortorder = 'DESC,DESC'; + if (GETPOST('actioncode', 'array')) { $actioncode=GETPOST('actioncode', 'array', 3); @@ -217,7 +228,7 @@ if (!empty($object->id)) // List of all actions $filters = array(); $filters['search_agenda_label'] = $search_agenda_label; - show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters); + show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder); } // End of page From e1129babbcbe1eab280d22d0fc5c5cb0a973e2e6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 12:44:30 +0200 Subject: [PATCH 027/456] Code comment --- htdocs/fourn/commande/info.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index 6764c00f003..3da0211d3f1 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -223,7 +223,7 @@ if (!empty($object->id)) //show_actions_todo($conf,$langs,$db,$object,null,0,$actioncode); // List of done actions - //show_actions_done($conf,$langs,$db,$object,null,0,$actioncode); + //show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters, $sortfield, $sortorder); // List of all actions $filters = array(); From 3a9add0e7078508ffd79369a659449bfa918edb2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 13:37:43 +0200 Subject: [PATCH 028/456] FIX #13663 --- htdocs/compta/facture/class/facture.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index c2c82424b77..f9285eb2d9c 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1434,9 +1434,10 @@ class Facture extends CommonInvoice $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); if ($txttoshow) { - $notetoshow = $langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow, 1); + //$notetoshow = $langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow, 1); + $notetoshow = $langs->trans("ViewPrivateNote").':
'.$txttoshow; $result .= ' '; - $result .= ''; + $result .= ''; $result .= img_picto('', 'note'); $result .= ''; //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); From 436362502c3be8740d03ffe561e8a2954fdcd818 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 13:41:51 +0200 Subject: [PATCH 029/456] CSS --- htdocs/loan/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 9e7b8f2565a..3e96a33c931 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -475,7 +475,7 @@ if ($id > 0) print '
'; print '
'; - print ''; + print '
'; // Capital if ($action == 'edit') From 7972174787ef17a98f86403ce1b517ad4ac638ba Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 23 Apr 2020 13:44:23 +0200 Subject: [PATCH 030/456] remove debug pring --- .../modules/project/task/doc/doc_generic_task_odt.modules.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 386de7bfdd7..cae24a1ce7e 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -474,7 +474,6 @@ class doc_generic_task_odt extends ModelePDFTask if (!file_exists($dir)) { - print '$dir'.$dir; if (dol_mkdir($dir) < 0) { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); From 6819255b764a2a004ee10770dde354893c9b9f37 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 13:49:18 +0200 Subject: [PATCH 031/456] FIX #13650 --- htdocs/core/modules/modFournisseur.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/modFournisseur.class.php b/htdocs/core/modules/modFournisseur.class.php index 4b7c8ff3ed2..b8539ad41c1 100644 --- a/htdocs/core/modules/modFournisseur.class.php +++ b/htdocs/core/modules/modFournisseur.class.php @@ -346,7 +346,10 @@ class modFournisseur extends DolibarrModules case 'sellist': $tmp=''; $tmpparam=unserialize($obj->param); // $tmp ay be array 'options' => array 'c_currencies:code_iso:code_iso' => null - if ($tmpparam['options'] && is_array($tmpparam['options'])) $tmp=array_shift(array_keys($tmpparam['options'])); + if ($tmpparam['options'] && is_array($tmpparam['options'])) { + $var=array_keys($tmpparam['options']); + $tmp=array_shift($var); + } if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp; break; } From 882b39628f81710491c61258b9993bac76adca75 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 23 Apr 2020 15:50:42 +0200 Subject: [PATCH 032/456] fix: uniformize extrafeild replacemnt for ODT docs --- .../core/class/commondocgenerator.class.php | 88 +++++++------------ .../task/doc/doc_generic_task_odt.modules.php | 25 ++++-- 2 files changed, 46 insertions(+), 67 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index a5cb9bf7d35..2317636f42a 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -170,12 +170,13 @@ abstract class CommonDocGenerator * * @param Societe $object Object * @param Translate $outputlangs Language object for output + * @param string $array_key Name of the key for return array * @return array Array of substitution key->code */ - public function get_substitutionarray_thirdparty($object, $outputlangs) + public function get_substitutionarray_thirdparty($object, $outputlangs, $array_key = 'company') { // phpcs:enable - global $conf; + global $conf, $extrafields; if (empty($object->country) && !empty($object->country_code)) { @@ -221,27 +222,14 @@ abstract class CommonDocGenerator 'company_default_bank_bic'=>$object->bank_account->bic ); - // Retrieve extrafields - if (is_array($object->array_options) && count($object->array_options)) - { - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $extrafields->fetch_name_optionals_label($object->table_element, true); - $object->fetch_optionals(); + // Retrieve extrafields + if (is_array($object->array_options) && count($object->array_options)) + { + $object->fetch_optionals(); - foreach ($extrafields->attributes[$object->table_element]['label'] as $key=>$label) - { - if ($extrafields->attributes[$object->table_element]['type'][$key] == 'price') - { - $object->array_options['options_'.$key] = price($object->array_options['options_'.$key], 0, $outputlangs, 0, 0, -1, $conf->currency); - } - elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select' || $extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') - { - $object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]]; - } - $array_thirdparty = array_merge($array_thirdparty, array('company_options_'.$key => $object->array_options ['options_'.$key])); - } - } + $array_thirdparty = $this->fill_substitutionarray_with_extrafields($object, $array_thirdparty, $extrafields, $array_key, $outputlangs); + + } return $array_thirdparty; } @@ -251,13 +239,13 @@ abstract class CommonDocGenerator * * @param Contact $object contact * @param Translate $outputlangs object for output - * @param array $array_key Name of the key for return array + * @param string $array_key Name of the key for return array * @return array Array of substitution key->code */ public function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object') { // phpcs:enable - global $conf; + global $conf, $extrafields; if (empty($object->country) && !empty($object->country_code)) { @@ -298,24 +286,14 @@ abstract class CommonDocGenerator $array_key.'_civility' => $object->civility, ); - // Retrieve extrafields - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $extrafields->fetch_name_optionals_label($object->table_element, true); - $object->fetch_optionals(); + // Retrieve extrafields + if (is_array($object->array_options) && count($object->array_options)) + { + $object->fetch_optionals(); - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) - { - if ($extrafields->attributes[$object->table_element]['type'][$key] == 'price') - { - $object->array_options['options_'.$key] = price($object->array_options ['options_'.$key], 0, $outputlangs, 0, 0, - 1, $conf->currency); - } - elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select' || $extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') - { - $object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]]; - } - $array_contact = array_merge($array_contact, array($array_key.'_options_'.$key => $object->array_options['options_'.$key])); - } + $array_contact = $this->fill_substitutionarray_with_extrafields($object, $array_contact, $extrafields, $array_key, $outputlangs); + + } return $array_contact; } @@ -370,7 +348,7 @@ abstract class CommonDocGenerator public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable - global $conf; + global $conf, $extrafields; $sumpayed = $sumdeposit = $sumcreditnote = ''; $already_payed_all = 0; @@ -528,14 +506,10 @@ abstract class CommonDocGenerator // Retrieve extrafields if (is_array($object->array_options) && count($object->array_options)) { - $extrafieldkey = $object->element; - - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $extrafields->fetch_name_optionals_label($extrafieldkey, true); $object->fetch_optionals(); $resarray = $this->fill_substitutionarray_with_extrafields($object, $resarray, $extrafields, $array_key, $outputlangs); + } return $resarray; @@ -605,7 +579,7 @@ abstract class CommonDocGenerator } // Retrieve extrafields - $extrafieldkey = $line->element; + $extrafieldkey = $line->table_element; $array_key = "line"; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; $extrafields = new ExtraFields($this->db); @@ -672,7 +646,7 @@ abstract class CommonDocGenerator public function get_substitutionarray_shipment($object, $outputlangs, $array_key = 'object') { // phpcs:enable - global $conf; + global $conf, $extrafields; dol_include_once('/core/lib/product.lib.php'); $object->list_delivery_methods($object->shipping_method_id); $calculatedVolume = ($object->trueWidth * $object->trueHeight * $object->trueDepth); @@ -708,16 +682,14 @@ abstract class CommonDocGenerator $array_shipment[$array_key.'_total_vat_'.$line->tva_tx] += $line->total_tva; } - // Retrieve extrafields - if (is_array($object->array_options) && count($object->array_options)) - { - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $extrafields->fetch_name_optionals_label('expedition', true); - $object->fetch_optionals(); + // Retrieve extrafields + if (is_array($object->array_options) && count($object->array_options)) + { + $object->fetch_optionals(); - $array_shipment = $this->fill_substitutionarray_with_extrafields($object, $array_shipment, $extrafields, $array_key, $outputlangs); - } + $array_shipment = $this->fill_substitutionarray_with_extrafields($object, $array_shipment, $extrafields, $array_key, $outputlangs); + + } return $array_shipment; } diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 8a38450697f..1aa8f05d9df 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -130,7 +130,7 @@ class doc_generic_task_odt extends ModelePDFTask public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object') { // phpcs:enable - global $conf; + global $conf, $extrafields; $resarray = array( $array_key.'_id'=>$object->id, @@ -150,14 +150,10 @@ class doc_generic_task_odt extends ModelePDFTask // Retrieve extrafields if (is_array($object->array_options) && count($object->array_options)) { - $extrafieldkey = $object->element; - - require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; - $extrafields = new ExtraFields($this->db); - $extrafields->fetch_name_optionals_label($extrafieldkey, true); $object->fetch_optionals(); $resarray = $this->fill_substitutionarray_with_extrafields($object, $resarray, $extrafields, $array_key, $outputlangs); + } return $resarray; @@ -169,14 +165,15 @@ class doc_generic_task_odt extends ModelePDFTask * * @param array $task Task Object * @param Translate $outputlangs Lang object to use for output + * @param string $array_key Name of the key for return array * @return array Return a substitution array */ - public function get_substitutionarray_tasks($task, $outputlangs) + public function get_substitutionarray_tasks($task, $outputlangs, $array_key = 'task') { // phpcs:enable - global $conf; + global $conf, $extrafields; - return array( + $resarray = array( 'task_ref'=>$task->ref, 'task_fk_project'=>$task->fk_project, 'task_projectref'=>$task->projectref, @@ -192,6 +189,16 @@ class doc_generic_task_odt extends ModelePDFTask 'task_note_private'=>$task->note_private, 'task_note_public'=>$task->note_public ); + + // Retrieve extrafields + if (is_array($task->array_options) && count($task->array_options)) + { + $task->fetch_optionals(); + + $resarray = $this->fill_substitutionarray_with_extrafields($task, $resarray, $extrafields, $array_key, $outputlangs); + } + + return $resarray; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps From 68e9d8463a101340b707d20f750206a06971a1a3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 15:52:15 +0200 Subject: [PATCH 033/456] Debug MAIN_USE_ALTERNATE_TRANSLATION_FOR variable --- htdocs/core/class/extralanguages.class.php | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/extralanguages.class.php b/htdocs/core/class/extralanguages.class.php index 8f61e84839c..8ae1fd0a4c7 100644 --- a/htdocs/core/class/extralanguages.class.php +++ b/htdocs/core/class/extralanguages.class.php @@ -69,7 +69,9 @@ class ExtraLanguages // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Load array this->attributes + * Load array this->attributes with list of fields per object that need an alternate translation. + * You can set variable MAIN_USE_ALTERNATE_TRANSLATION_FOR=elementA:fieldname,fieldname2;elementB:... + * Example: MAIN_USE_ALTERNATE_TRANSLATION_FOR=societe:name,town;contact:firstname,lastname * * @param string $elementtype Type of element ('' = all, 'adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...). * @param boolean $forceload Force load of extra fields whatever is status of cache. @@ -86,11 +88,25 @@ class ExtraLanguages if ($elementtype == 'contact') $elementtype = 'socpeople'; if ($elementtype == 'order_supplier') $elementtype = 'commande_fournisseur'; - $array_name_label = array( - 'societe' => array('name'=>'Name'), - 'contact' => array('firstname' => 'Firstname', 'lastname' => 'Lastname') - ); + $array_name_label = array(); + if (! empty($conf->global->MAIN_USE_ALTERNATE_TRANSLATION_FOR)) { + $tmpelement = explode(';', $conf->global->MAIN_USE_ALTERNATE_TRANSLATION_FOR); + foreach($tmpelement as $elementstring) { + $reg=array(); + preg_match('/^(.*):(.*)$/', $elementstring, $reg); + $element = $reg[1]; + $array_name_label[$element] = array(); + $tmpfields=explode(',', $reg[2]); + foreach($tmpfields as $field) { + //var_dump($fields); + //$tmpkeyvar = explode(':', $fields); + //$array_name_label[$element][$tmpkeyvar[0]] = $tmpkeyvar[1]; + $array_name_label[$element][$field] = $field; + } + } + } + //var_dump($array_name_label); $this->attributes = $array_name_label; return $array_name_label; From 55a9aa5991c3a4468ef8a90452218b6786f7b183 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 23 Apr 2020 15:55:37 +0200 Subject: [PATCH 034/456] fix: missing duration odt task substitution --- .../project/task/doc/doc_generic_task_odt.modules.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 1aa8f05d9df..033aee6b8fa 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -163,7 +163,7 @@ class doc_generic_task_odt extends ModelePDFTask /** * Define array with couple substitution key => substitution value * - * @param array $task Task Object + * @param Task $task Task Object * @param Translate $outputlangs Lang object to use for output * @param string $array_key Name of the key for return array * @return array Return a substitution array @@ -181,7 +181,8 @@ class doc_generic_task_odt extends ModelePDFTask 'task_label'=>$task->label, 'task_description'=>$task->description, 'task_fk_parent'=>$task->fk_parent, - 'task_duration'=>$task->duration, + 'task_duration'=>$task->convertSecondToTime(duration_effective,'allhourmin'), + 'task_planned_workload'=>convertSecondToTime($task->planned_workload,'allhourmin'), 'task_progress'=>$task->progress, 'task_public'=>$task->public, 'task_date_start'=>dol_print_date($task->date_start, 'day'), From 6dafb30ee8e57be64f2ca2c5a6f347c94476f80d Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 23 Apr 2020 15:57:06 +0200 Subject: [PATCH 035/456] fix time duration substitution --- .../modules/project/task/doc/doc_generic_task_odt.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 033aee6b8fa..6e96699116e 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -181,7 +181,7 @@ class doc_generic_task_odt extends ModelePDFTask 'task_label'=>$task->label, 'task_description'=>$task->description, 'task_fk_parent'=>$task->fk_parent, - 'task_duration'=>$task->convertSecondToTime(duration_effective,'allhourmin'), + 'task_duration'=>convertSecondToTime($task->duration_effective,'allhourmin'), 'task_planned_workload'=>convertSecondToTime($task->planned_workload,'allhourmin'), 'task_progress'=>$task->progress, 'task_public'=>$task->public, From 32385b75e18458a95e7c9bfde6c2659ea9ac7c8d Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 23 Apr 2020 16:18:31 +0200 Subject: [PATCH 036/456] travis --- htdocs/core/class/commondocgenerator.class.php | 4 ---- .../project/task/doc/doc_generic_task_odt.modules.php | 5 ++--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 2317636f42a..5c43f4f83a1 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -228,7 +228,6 @@ abstract class CommonDocGenerator $object->fetch_optionals(); $array_thirdparty = $this->fill_substitutionarray_with_extrafields($object, $array_thirdparty, $extrafields, $array_key, $outputlangs); - } return $array_thirdparty; } @@ -292,7 +291,6 @@ abstract class CommonDocGenerator $object->fetch_optionals(); $array_contact = $this->fill_substitutionarray_with_extrafields($object, $array_contact, $extrafields, $array_key, $outputlangs); - } return $array_contact; } @@ -509,7 +507,6 @@ abstract class CommonDocGenerator $object->fetch_optionals(); $resarray = $this->fill_substitutionarray_with_extrafields($object, $resarray, $extrafields, $array_key, $outputlangs); - } return $resarray; @@ -688,7 +685,6 @@ abstract class CommonDocGenerator $object->fetch_optionals(); $array_shipment = $this->fill_substitutionarray_with_extrafields($object, $array_shipment, $extrafields, $array_key, $outputlangs); - } return $array_shipment; diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 6e96699116e..ceb735dc486 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -153,7 +153,6 @@ class doc_generic_task_odt extends ModelePDFTask $object->fetch_optionals(); $resarray = $this->fill_substitutionarray_with_extrafields($object, $resarray, $extrafields, $array_key, $outputlangs); - } return $resarray; @@ -181,8 +180,8 @@ class doc_generic_task_odt extends ModelePDFTask 'task_label'=>$task->label, 'task_description'=>$task->description, 'task_fk_parent'=>$task->fk_parent, - 'task_duration'=>convertSecondToTime($task->duration_effective,'allhourmin'), - 'task_planned_workload'=>convertSecondToTime($task->planned_workload,'allhourmin'), + 'task_duration'=>convertSecondToTime($task->duration_effective, 'allhourmin'), + 'task_planned_workload'=>convertSecondToTime($task->planned_workload, 'allhourmin'), 'task_progress'=>$task->progress, 'task_public'=>$task->public, 'task_date_start'=>dol_print_date($task->date_start, 'day'), From b68e85703ff2530021e870675794ed33c11c30c4 Mon Sep 17 00:00:00 2001 From: simicar29 Date: Thu, 23 Apr 2020 16:29:22 +0200 Subject: [PATCH 037/456] Clean line extrafields when deleting invoice Delete extrafields invoice lines when deleting parent object (sql syntax ok for mariadb & pgsql) Delete extrafields when deleting an invoice line --- htdocs/compta/facture/class/facture.class.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index f9285eb2d9c..66cb1aed37d 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2166,13 +2166,16 @@ class Facture extends CommonInvoice } } - + // Invoice line extrafileds + $main = MAIN_DB_PREFIX . 'facturedet'; + $ef = $main . "_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_facture = $rowid)"; // Delete invoice line $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facturedet WHERE fk_facture = '.$rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); - if ($this->db->query($sql) && $this->delete_linked_contact()) + if ($this->db->query($sqlef) && $this->db->query($sql) && $this->delete_linked_contact()) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture WHERE rowid = '.$rowid; @@ -5312,7 +5315,14 @@ class FactureLigne extends CommonInvoiceLine } // End call triggers - + // extrafields + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".$this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); if ($this->db->query($sql)) From aebc04d30a15eb8e2a46bdd44a1875aacc1db3d7 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 23 Apr 2020 14:33:11 +0000 Subject: [PATCH 038/456] Fixing style errors. --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 66cb1aed37d..9b327aadb45 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5322,7 +5322,7 @@ class FactureLigne extends CommonInvoiceLine $this->db->rollback(); return -1; } - + $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".$this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); if ($this->db->query($sql)) From ce94788dd906cce4f925fc260180359175c88d5a Mon Sep 17 00:00:00 2001 From: simicar29 Date: Thu, 23 Apr 2020 17:01:40 +0200 Subject: [PATCH 039/456] Clean line extrafields when deleting recurring invoice Delete extrafields recurring invoice lines when deleting parent object Delete extrafields when deleting a recurring invoice line --- .../compta/facture/class/facture-rec.class.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 110f5a9cbb8..f3437308f39 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -664,9 +664,13 @@ class FactureRec extends CommonInvoice $error = 0; $this->db->begin(); + $main = MAIN_DB_PREFIX . 'facturedet_rec'; + $ef = $main . "_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_facture = $rowid)"; + dol_syslog($sqlef); $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet_rec WHERE fk_facture = ".$rowid; dol_syslog($sql); - if ($this->db->query($sql)) + if ($this->db->query($sqlef) && $this->db->query($sql)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."facture_rec WHERE rowid = ".$rowid; dol_syslog($sql); @@ -675,6 +679,9 @@ class FactureRec extends CommonInvoice // Delete linked object $res = $this->deleteObjectLinked(); if ($res < 0) $error = -3; + // Delete extrafields + $res = $this->deleteExtraFields(); + if ($res < 0) $error = -4; } else { @@ -1881,6 +1888,14 @@ class FactureLigneRec extends CommonInvoiceLine // End call triggers } } + + if (!$error) + { + $result = $this->deleteExtraFields(); + if ($result < 0) { + $error++; + } + } if (!$error) { From 2633e908902d3e20e2cfe35f28447f9842c98582 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 23 Apr 2020 15:03:14 +0000 Subject: [PATCH 040/456] Fixing style errors. --- htdocs/compta/facture/class/facture-rec.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index f3437308f39..5b72b6d465d 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -1888,7 +1888,7 @@ class FactureLigneRec extends CommonInvoiceLine // End call triggers } } - + if (!$error) { $result = $this->deleteExtraFields(); From cd1368cb71202231393aeb207ddd9fcd3cdfdf72 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 17:10:40 +0200 Subject: [PATCH 041/456] Fix dispatch in ledger for various payment done in same account when there is 2 different transaction in 2 different account (backport v12) --- htdocs/accountancy/journal/bankjournal.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index e9be75990dc..06f5a56f943 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -666,7 +666,7 @@ if (! $error && $action == 'writebookkeeping') { } elseif ($tabtype[$key] == 'payment_various') { $bookkeeping->subledger_account = $k; $bookkeeping->subledger_label = $tabcompany[$key]['name']; - $bookkeeping->numero_compte = $tabpay[$obj->rowid]["account_various"]; + $bookkeeping->numero_compte = $tabpay[$key]["account_various"]; $accountingaccount->fetch(null, $bookkeeping->numero_compte, true); $bookkeeping->label_compte = $accountingaccount->label; @@ -1174,7 +1174,11 @@ if (empty($action) || $action == 'view') { //print ''.$langs->trans("ThirdpartyAccountNotDefined").''; if (! empty($tabcompany[$key]['code_compta'])) { - print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknown", $tabcompany[$key]['code_compta']).''; + if (in_array($tabtype[$key], array('payment_various'))) { + // For such case, if subledger is not defined, we won't use subledger accounts. + print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored").''; + } else { + print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknown", $tabcompany[$key]['code_compta']).''; } else { From be46b2062ee29fe57181170b21a5241080f895ab Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 17:51:06 +0200 Subject: [PATCH 042/456] Clean line extrafields when deleting order --- htdocs/commande/class/commande.class.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 52dfde785a4..54506a4a816 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -3396,6 +3396,19 @@ class Commande extends CommonOrder $error++; } + if (!$error) + { + // Delete extrafields of order details + $main = MAIN_DB_PREFIX . 'commandedet'; + $ef = $main . "_extrafields"; + $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = " . $this->id . ")"; + if (!$this->db->query($sql)) + { + $error++; + $this->errors[] = $this->db->lasterror(); + } + } + if (!$error) { // Delete order details From f7d4d78008b132574dc81f6e358bd498b4863f7b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 17:55:55 +0200 Subject: [PATCH 043/456] Fix error 500 --- htdocs/accountancy/journal/bankjournal.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 06f5a56f943..d2ad7a0503e 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -1179,6 +1179,7 @@ if (empty($action) || $action == 'view') { print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored").''; } else { print ''.$langs->trans("ThirdpartyAccountNotDefinedOrThirdPartyUnknown", $tabcompany[$key]['code_compta']).''; + } } else { From 1101c4e587232905e2caa9c61545c47a8503e888 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 18:01:04 +0200 Subject: [PATCH 044/456] Fix trans --- htdocs/langs/en_US/accountancy.lang | 1 + htdocs/langs/fr_FR/accountancy.lang | 1 + 2 files changed, 2 insertions(+) diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 4b22f512826..9b80eae930c 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -218,6 +218,7 @@ ListAccounts=List of the accounting accounts UnknownAccountForThirdparty=Unknown third-party account. We will use %s UnknownAccountForThirdpartyBlocking=Unknown third-party account. Blocking error ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Third-party account not defined or third party unknown. We will use %s +ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unknown and subledger not defined on the payment. We will keep the subledger account value empty. ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Third-party account not defined or third party unknown. Blocking error. UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error PaymentsNotLinkedToProduct=Payment not linked to any product / service diff --git a/htdocs/langs/fr_FR/accountancy.lang b/htdocs/langs/fr_FR/accountancy.lang index 0150ff7d017..7c0602332f3 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -218,6 +218,7 @@ ListAccounts=Liste des comptes comptables UnknownAccountForThirdparty=Compte de tiers inconnu. %s sera utilisé UnknownAccountForThirdpartyBlocking=Compte de tiers inconnu. Erreur bloquante. ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Code comptable du tiers non défini ou tiers inconnu. On utilisera %s. +ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Tiers inconnu et code comptable auxiliaire non défini sur le paiement. Nous conserverons la valeur du compte auxiliaire vide. ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Compte tiers non défini ou inconnu. Erreur bloquante. UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Compte tiers inconnu et compte d'attente non défini. Erreur blocante. PaymentsNotLinkedToProduct=Paiement non lié à un produit / service From 94be1870ec2faeffcdf9b9b10cd4ac88e89d916f Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 18:02:53 +0200 Subject: [PATCH 045/456] Clean line extrafields when deleting proposal --- htdocs/comm/propal/class/propal.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 409a1924b70..0962fcd63b6 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -2992,8 +2992,11 @@ class Propal extends CommonObject if (!$error) { + $main = MAIN_DB_PREFIX . 'propaldet'; + $ef = $main . "_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_propal = " . $this->id . ")"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."propaldet WHERE fk_propal = ".$this->id; - if ($this->db->query($sql)) + if ($this->db->query($sqlef) && $this->db->query($sql)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."propal WHERE rowid = ".$this->id; if ($this->db->query($sql)) From 039fe922090d4f1812159999927c585c5341269d Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 18:14:56 +0200 Subject: [PATCH 046/456] Clean line extrafields when deleting supplier invoice --- htdocs/fourn/class/fournisseur.facture.class.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 48ca9ca81f2..8cec13609a0 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1180,10 +1180,14 @@ class FactureFournisseur extends CommonInvoice if (!$error) { + $main = MAIN_DB_PREFIX . 'facture_fourn_det'; + $ef = $main . "_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_facture_fourn = $rowid)"; + $resqlef = $this->db->query($sqlef); $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det WHERE fk_facture_fourn = '.$rowid.';'; dol_syslog(get_class($this)."::delete", LOG_DEBUG); $resql = $this->db->query($sql); - if ($resql) + if ($resqlef && $resql) { $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn WHERE rowid = '.$rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); @@ -3141,6 +3145,11 @@ class SupplierInvoiceLine extends CommonObjectLine $this->deleteObjectLinked(); + $result = $this->deleteExtraFields(); + if ($result < 0) { + $error++; + } + if (!$error) { // Supprime ligne $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det '; From b5f48fb815a80e8343b87bf989b882b412ebe22c Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 23 Apr 2020 16:17:37 +0000 Subject: [PATCH 047/456] Fixing style errors. --- htdocs/fourn/class/fournisseur.facture.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 8cec13609a0..117a99ee2cc 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -3146,9 +3146,9 @@ class SupplierInvoiceLine extends CommonObjectLine $this->deleteObjectLinked(); $result = $this->deleteExtraFields(); - if ($result < 0) { - $error++; - } + if ($result < 0) { + $error++; + } if (!$error) { // Supprime ligne From 8401f68bde8672b76036192d63f26f8cc9610583 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 18:21:17 +0200 Subject: [PATCH 048/456] Update doc_generic_task_odt.modules.php --- .../project/task/doc/doc_generic_task_odt.modules.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index ceb735dc486..c56506eb311 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -180,8 +180,10 @@ class doc_generic_task_odt extends ModelePDFTask 'task_label'=>$task->label, 'task_description'=>$task->description, 'task_fk_parent'=>$task->fk_parent, - 'task_duration'=>convertSecondToTime($task->duration_effective, 'allhourmin'), - 'task_planned_workload'=>convertSecondToTime($task->planned_workload, 'allhourmin'), + 'task_duration'=>$task->duration_effective, + 'task_duration_formated'=>convertSecondToTime($task->duration_effective, 'allhourmin'), + 'task_planned_workload'=>$task->planned_workload, + 'task_planned_workload_formated'=>convertSecondToTime($task->planned_workload, 'allhourmin'), 'task_progress'=>$task->progress, 'task_public'=>$task->public, 'task_date_start'=>dol_print_date($task->date_start, 'day'), From 64d877bc7bc8968d3443bb03dcd3f196650ba6d3 Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 18:27:06 +0200 Subject: [PATCH 049/456] Clean line extrafields when deleting supplier order --- .../class/fournisseur.commande.class.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 0ed924ffb64..76b3cdabc6a 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1994,6 +1994,17 @@ class CommandeFournisseur extends CommonOrder // End call triggers } + $main = MAIN_DB_PREFIX . 'commande_fournisseurdet'; + $ef = $main . "_extrafields"; + $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = " . $this->id . ")"; + dol_syslog(get_class($this)."::delete extrafields lines", LOG_DEBUG); + if (!$this->db->query($sql)) + { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + $error++; + } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande =".$this->id; dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (!$this->db->query($sql)) @@ -3700,6 +3711,14 @@ class CommandeFournisseurLigne extends CommonOrderLine $this->db->begin(); + // extrafields + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid=".$this->id; dol_syslog(__METHOD__, LOG_DEBUG); From 4b58213e5b9ee14609c63f5c0ea27eccd3134d42 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 23 Apr 2020 16:29:36 +0000 Subject: [PATCH 050/456] Fixing style errors. --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 76b3cdabc6a..7de6f6a770e 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3711,7 +3711,7 @@ class CommandeFournisseurLigne extends CommonOrderLine $this->db->begin(); - // extrafields + // extrafields $result = $this->deleteExtraFields(); if ($result < 0) { From 02c5530e1f94ac7292b763c571e949011d4620f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 18:31:01 +0200 Subject: [PATCH 051/456] Update mouvementstock.class.php --- htdocs/product/stock/class/mouvementstock.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php index 2799cbaaf50..1702c4beecc 100644 --- a/htdocs/product/stock/class/mouvementstock.class.php +++ b/htdocs/product/stock/class/mouvementstock.class.php @@ -515,11 +515,12 @@ class MouvementStock extends CommonObject // Update PMP and denormalized value of stock qty at product level if (! $error) { - $newpmp = price2num($newpmp,'MU'); + $newpmp = price2num($newpmp, 'MU'); + // $sql = "UPDATE ".MAIN_DB_PREFIX."product SET pmp = ".$newpmp.", stock = ".$this->db->ifsql("stock IS NULL", 0, "stock") . " + ".$qty; // $sql.= " WHERE rowid = ".$fk_product; // Update pmp + denormalized fields because we change content of produt_stock. Warning: Do not use "SET p.stock", does not works with pgsql - $sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET pmp = '".$newpmp."', "; + $sql = "UPDATE ".MAIN_DB_PREFIX."product as p SET pmp = ".$newpmp.", "; $sql.= " stock=(SELECT SUM(ps.reel) FROM ".MAIN_DB_PREFIX."product_stock as ps WHERE ps.fk_product = p.rowid)"; $sql.= " WHERE rowid = ".$fk_product; From 73ddfb1c81a27ab1e7e69f3d3d597983ecdd9558 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 18:33:25 +0200 Subject: [PATCH 052/456] Use label instead of libelle --- test/phpunit/MouvementStockTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/phpunit/MouvementStockTest.php b/test/phpunit/MouvementStockTest.php index d095736042b..85137234a3b 100644 --- a/test/phpunit/MouvementStockTest.php +++ b/test/phpunit/MouvementStockTest.php @@ -148,13 +148,13 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase // We create a product for tests $warehouse1=new Entrepot($db); $warehouse1->initAsSpecimen(); - $warehouse1->libelle.=' 1'; + $warehouse1->label.=' 1'; $warehouse1->description.=' 1'; $warehouse1id=$warehouse1->create($user); $warehouse2=new Entrepot($db); $warehouse2->initAsSpecimen(); - $warehouse2->libelle.=' 2'; + $warehouse2->label.=' 2'; $warehouse2->description.=' 2'; $warehouse2id=$warehouse2->create($user); From ab5c2b1fd56ba640e0d6ab483f52d2a5b225371c Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 18:33:58 +0200 Subject: [PATCH 053/456] Clean line extrafields when deleting supplier proposal --- htdocs/supplier_proposal/class/supplier_proposal.class.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 7fdd5466cd5..d292ebe13bf 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2061,11 +2061,14 @@ class SupplierProposal extends CommonObject if (! $error) { + $main = MAIN_DB_PREFIX . 'supplier_proposaldet'; + $ef = $main . "_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_supplier_proposal = " . $this->id . ")"; $sql = "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposaldet WHERE fk_supplier_proposal = ".$this->id; if ($this->db->query($sql)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."supplier_proposal WHERE rowid = ".$this->id; - if ($this->db->query($sql)) + if ($this->db->query($sqlef) && $this->db->query($sql)) { // Delete linked object $res = $this->deleteObjectLinked(); From 0aa0d62f43d56987126f240dabd98aeb073a57d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 18:42:59 +0200 Subject: [PATCH 054/456] Fix constant --- htdocs/api/class/api_setup.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index f4c73c1b8ec..945a0efdf46 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1415,7 +1415,7 @@ class Setup extends DolibarrApi * @url GET conf/{constantname} * * @throws RestException 403 Forbidden - * @throws RestException 500 Error Bad or unknown value for constname + * @throws RestException 500 Error Bad or unknown value for constantname */ public function getConf($constantname) { @@ -1427,7 +1427,7 @@ class Setup extends DolibarrApi } if (!preg_match('/^[a-zA-Z0-9_]+$/', $constantname) || ! isset($conf->global->$constantname)) { - throw new RestException(500, 'Error Bad or unknown value for constname'); + throw new RestException(500, 'Error Bad or unknown value for constantname'); } if (preg_match('/(_pass|password|secret|_key|key$)/i', $constantname)) { throw new RestException(403, 'Forbidden'); From 4e6017e5bfb2c156bd28fe1cd96ee5978bd8c2a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 18:50:20 +0200 Subject: [PATCH 055/456] Look and feel v12 --- htdocs/api/admin/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index 73041f6c386..d0a0e79c855 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -153,7 +153,7 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai // Show message $message = ''; $url = $urlwithroot.'/api/index.php/login?login=auserlogin&password=thepassword[&reset=1]'; -$message .= $langs->trans("UrlToGetKeyToUseAPIs").':
'; +$message .= ''.$langs->trans("UrlToGetKeyToUseAPIs").':
'; $message .= img_picto('', 'globe').' '.$url; print $message; print '
'; From 285f215acfd51ac595a3c44a38a695729d33e95f Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 18:52:45 +0200 Subject: [PATCH 056/456] Clean line extrafields when deleting fichinter --- htdocs/fichinter/class/fichinter.class.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 9f180fc24b0..1a4a6817892 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -961,6 +961,16 @@ class Fichinter extends CommonObject } } + if (!$error) + { + $main = MAIN_DB_PREFIX . 'fichinterdet'; + $ef = $main . "_extrafields"; + $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_fichinter = " . $this->id . ")"; + + $resql = $this->db->query($sql); + if (!$resql) $error++; + } + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet"; @@ -1704,6 +1714,13 @@ class FichinterLigne extends CommonObjectLine dol_syslog(get_class($this)."::deleteline lineid=".$this->id); $this->db->begin(); + $result = $this->deleteExtraFields(); + if ($result < 0) { + $error++; + $this->db->rollback(); + return -1; + } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE rowid = ".$this->id; $resql = $this->db->query($sql); From 548f3007cffcddd67b41391611c5456e61b21977 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Thu, 23 Apr 2020 16:55:10 +0000 Subject: [PATCH 057/456] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- htdocs/admin/facture_situation.php | 36 ++++++++--------- htdocs/compta/facture/card.php | 38 +++++++++--------- htdocs/compta/facture/class/facture.class.php | 40 +++++++++---------- .../core/class/commondocgenerator.class.php | 2 +- htdocs/core/lib/website.lib.php | 2 +- htdocs/core/modules/modSociete.class.php | 2 +- htdocs/product/class/product.class.php | 2 +- htdocs/product/composition/card.php | 30 +++++++------- .../societe/class/api_thirdparties.class.php | 2 +- htdocs/user/class/usergroup.class.php | 6 +-- htdocs/user/group/perms.php | 2 +- htdocs/website/index.php | 8 ++-- 12 files changed, 85 insertions(+), 85 deletions(-) diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index ce327cc5187..223045db2e9 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -36,13 +36,13 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'errors', 'other', 'bills')); -if (! $user->admin) accessforbidden(); +if (!$user->admin) accessforbidden(); $action = GETPOST('action', 'alpha'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); -$type='invoice'; +$type = 'invoice'; /* @@ -57,17 +57,17 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; * View */ -$dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']); +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); llxHeader( "", $langs->trans("BillsSetup"), 'EN:Invoice_Configuration|FR:Configuration_module_facture|ES:ConfiguracionFactura' ); -$form=new Form($db); +$form = new Form($db); -$linkback=''.$langs->trans("BackToModuleList").''; +$linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("BillsSetup"), $linkback, 'title_setup'); $head = invoice_admin_prepare_head(); @@ -106,12 +106,12 @@ $arrayAvailableType = array( ); $selected = array(); $implodeglue = '+'; -if(!empty($conf->global->{$confkey}) && !is_array($conf->global->{$confkey})){ +if (!empty($conf->global->{$confkey}) && !is_array($conf->global->{$confkey})) { $selected = explode('+', $conf->global->{$confkey}); } -$curentInput = (empty($inputCount)?1:($inputCount+1)); -$formSelectInvoiceType = $form->selectarray('value'. $curentInput, $arrayAvailableType, $selected, 1); +$curentInput = (empty($inputCount) ? 1 : ($inputCount + 1)); +$formSelectInvoiceType = $form->selectarray('value'.$curentInput, $arrayAvailableType, $selected, 1); _printInputFormPart($confkey, $langs->trans('AllowedInvoiceForRetainedWarranty'), '', array(), $formSelectInvoiceType); //_printOnOff('INVOICE_RETAINED_WARRANTY_LIMITED_TO_SITUATION', $langs->trans('RetainedwarrantyOnlyForSituation')); @@ -126,7 +126,7 @@ $metas = array( _printInputFormPart('INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT', $langs->trans('RetainedwarrantyDefaultPercent'), '', $metas); // Conditions paiements -$inputCount = empty($inputCount)?1:($inputCount+1); +$inputCount = empty($inputCount) ? 1 : ($inputCount + 1); print '
'; print ''; print ''; @@ -178,7 +178,7 @@ function _printOnOff($confkey, $title = false, $desc = '') global $langs; print ''; - print ''; - if($conf->global->INVOICE_USE_RETAINED_WARRANTY){ + if ($conf->global->INVOICE_USE_RETAINED_WARRANTY) { $rwStyle = 'display:none;'; - if(in_array(GETPOST('type', 'int'), $retainedWarrantyInvoiceAvailableType)){ + if (in_array(GETPOST('type', 'int'), $retainedWarrantyInvoiceAvailableType)) { $rwStyle = ''; } $retained_warranty = GETPOST('retained_warranty', 'int'); - if(empty($retained_warranty)){ - if(!empty($objectsrc->retained_warranty)){ // use previous situation value + if (empty($retained_warranty)) { + if (!empty($objectsrc->retained_warranty)) { // use previous situation value $retained_warranty = $objectsrc->retained_warranty; } } - $retained_warranty_js_default = !empty($retained_warranty)?$retained_warranty:$conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT; + $retained_warranty_js_default = !empty($retained_warranty) ? $retained_warranty : $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_PERCENT; print ''; + if ($num == 0) print ''; $MAX = 100; while ($i < min($num, $MAX)) { $objp = $db->fetch_object($resql); - if($objp->rowid != $id) + if ($objp->rowid != $id) { // check if a product is not already a parent product of this one - $prod_arbo=new Product($db); - $prod_arbo->id=$objp->rowid; + $prod_arbo = new Product($db); + $prod_arbo->id = $objp->rowid; // This type is not supported (not required to have virtual products working). if ($prod_arbo->type == Product::TYPE_ASSEMBLYKIT || $prod_arbo->type == Product::TYPE_STOCKKIT) { - $is_pere=0; + $is_pere = 0; $prod_arbo->get_sousproduits_arbo(); // associations sousproduits $prods_arbo = $prod_arbo->get_arbo_each_prod(); if (count($prods_arbo) > 0) { - foreach($prods_arbo as $key => $value) + foreach ($prods_arbo as $key => $value) { - if ($value[1]==$id) + if ($value[1] == $id) { - $is_pere=1; + $is_pere = 1; } } } - if ($is_pere==1) + if ($is_pere == 1) { $i++; continue; diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index 1100432c854..c50a746c444 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -129,7 +129,7 @@ class Thirdparties extends DolibarrApi $sql .= " FROM ".MAIN_DB_PREFIX."societe as t"; if ($category > 0) { if ($mode != 4) $sql .= ", ".MAIN_DB_PREFIX."categorie_societe as c"; - if (!in_array($mode, array(1,2,3))) $sql .= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cc"; + if (!in_array($mode, array(1, 2, 3))) $sql .= ", ".MAIN_DB_PREFIX."categorie_fournisseur as cc"; } if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale $sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st"; diff --git a/htdocs/user/class/usergroup.class.php b/htdocs/user/class/usergroup.class.php index 2cf11c3851f..bc5396e9f51 100644 --- a/htdocs/user/class/usergroup.class.php +++ b/htdocs/user/class/usergroup.class.php @@ -118,12 +118,12 @@ class UserGroup extends CommonObject /** * @var array List of child tables. To test if we can delete object. */ - protected $childtables=array(); + protected $childtables = array(); /** * @var array List of child tables. To know object to delete on cascade. */ - protected $childtablesoncascade = array('usergroup_rights','usergroup_user'); + protected $childtablesoncascade = array('usergroup_rights', 'usergroup_user'); /** @@ -162,7 +162,7 @@ class UserGroup extends CommonObject $this->name = $this->nom; // For compatibility with field name - if($result) + if ($result) { if ($load_members) { diff --git a/htdocs/user/group/perms.php b/htdocs/user/group/perms.php index 8efd7ef38e2..70030dbf1af 100644 --- a/htdocs/user/group/perms.php +++ b/htdocs/user/group/perms.php @@ -77,7 +77,7 @@ if (empty($reshook)) { $editgroup = new Usergroup($db); $result = $editgroup->fetch($id); if ($result > 0) { - $result= $editgroup->addrights($rights, $module, '', $entity); + $result = $editgroup->addrights($rights, $module, '', $entity); if ($result < 0) { setEventMessages($editgroup->error, $editgroup->errors, 'errors'); } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 32c51d3eef1..0f684ca5232 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -327,8 +327,8 @@ if ($cancel) $savbacktopage = $backtopage; $backtopage = $_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid.(GETPOST('section_dir', 'alpha') ? '§ion_dir='.urlencode(GETPOST('section_dir', 'alpha')) : ''); // used after a confirm_deletefile into actions_linkedfiles.inc.php -if ($sortfield) $backtopage.='&sortfield='.$sortfield; -if ($sortorder) $backtopage.='&sortorder='.$sortorder; +if ($sortfield) $backtopage .= '&sortfield='.$sortfield; +if ($sortorder) $backtopage .= '&sortorder='.$sortorder; include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; $backtopage = $savbacktopage; @@ -2133,7 +2133,7 @@ print '
'; // Add a margin under toolbar ? $style = ''; -if ($action != 'preview' && $action != 'editcontent' && $action != 'editsource' && ! GETPOST('createpagefromclone', 'alphanohtml')) $style = ' margin-bottom: 5px;'; +if ($action != 'preview' && $action != 'editcontent' && $action != 'editsource' && !GETPOST('createpagefromclone', 'alphanohtml')) $style = ' margin-bottom: 5px;'; if (!GETPOST('hide_websitemenu')) @@ -2437,7 +2437,7 @@ if (!GETPOST('hide_websitemenu')) $preselectedlanguage = GETPOST('newlang', 'aZ09') ? GETPOST('newlang', 'aZ09') : ($objectpage->lang ? $objectpage->lang : $langs->defaultlang); $onlylang = array(); if ($website->otherlang) { - foreach(explode(',', $website->otherlang) as $langkey) { + foreach (explode(',', $website->otherlang) as $langkey) { $onlylang[$langkey] = $langkey; } $textifempty = 1; From 93735bf9cd5c96388736074b53b8e07e375c77e4 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 23 Apr 2020 16:55:36 +0000 Subject: [PATCH 058/456] Fixing style errors. --- htdocs/fichinter/class/fichinter.class.php | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 1a4a6817892..025a2e13a88 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -961,15 +961,15 @@ class Fichinter extends CommonObject } } - if (!$error) + if (!$error) { - $main = MAIN_DB_PREFIX . 'fichinterdet'; - $ef = $main . "_extrafields"; - $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_fichinter = " . $this->id . ")"; + $main = MAIN_DB_PREFIX . 'fichinterdet'; + $ef = $main . "_extrafields"; + $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_fichinter = " . $this->id . ")"; - $resql = $this->db->query($sql); - if (!$resql) $error++; - } + $resql = $this->db->query($sql); + if (!$resql) $error++; + } if (!$error) { @@ -1715,11 +1715,11 @@ class FichinterLigne extends CommonObjectLine $this->db->begin(); $result = $this->deleteExtraFields(); - if ($result < 0) { - $error++; - $this->db->rollback(); - return -1; - } + if ($result < 0) { + $error++; + $this->db->rollback(); + return -1; + } $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet WHERE rowid = ".$this->id; $resql = $this->db->query($sql); From a70be95760a3389161cbd2d49b6c82a13c05b1a0 Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 19:00:47 +0200 Subject: [PATCH 059/456] Clean line extrafields when deleting contrat --- htdocs/contrat/class/contrat.class.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index e40eba40ee2..b265ab59cde 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1234,6 +1234,22 @@ class Contrat extends CommonObject } } + if (!$error) + { + // Delete contratdet extrafields + $main = MAIN_DB_PREFIX . 'contratdet'; + $ef = $main . "_extrafields"; + $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_contrat = " . $this->id . ")"; + + dol_syslog(get_class($this)."::delete contratdet_extrafields", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) + { + $this->error = $this->db->error(); + $error++; + } + } + if (!$error) { // Delete contratdet From b8a4c0d83b945214548aa578dfdbd1396624d868 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 23 Apr 2020 17:02:57 +0000 Subject: [PATCH 060/456] Fixing style errors. --- htdocs/contrat/class/contrat.class.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index b265ab59cde..9d90520e1d7 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1234,21 +1234,21 @@ class Contrat extends CommonObject } } - if (!$error) + if (!$error) { - // Delete contratdet extrafields - $main = MAIN_DB_PREFIX . 'contratdet'; - $ef = $main . "_extrafields"; - $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_contrat = " . $this->id . ")"; + // Delete contratdet extrafields + $main = MAIN_DB_PREFIX . 'contratdet'; + $ef = $main . "_extrafields"; + $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_contrat = " . $this->id . ")"; - dol_syslog(get_class($this)."::delete contratdet_extrafields", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) - { - $this->error = $this->db->error(); - $error++; - } - } + dol_syslog(get_class($this)."::delete contratdet_extrafields", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) + { + $this->error = $this->db->error(); + $error++; + } + } if (!$error) { From 3ea8d1895bef4256e8053bc41d5d8118ef44c3e2 Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 19:09:05 +0200 Subject: [PATCH 061/456] Clean line extrafields when deleting expedition --- htdocs/expedition/class/expedition.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index bf20ac42611..006db734a0a 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1280,15 +1280,23 @@ class Expedition extends CommonObject if (!$error) { + $main = MAIN_DB_PREFIX . 'expeditiondet'; + $ef = $main . "_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_expedition = " . $this->id . ")"; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."expeditiondet"; $sql .= " WHERE fk_expedition = ".$this->id; - if ($this->db->query($sql)) + if ($this->db->query($sqlef) && $this->db->query($sql)) { // Delete linked object $res = $this->deleteObjectLinked(); if ($res < 0) $error++; + // delete extrafields + $res = $this->deleteExtraFields(); + if ($res < 0) $error++; + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."expedition"; From b4fbb8654824da0c3c50c22233f43b269c22c313 Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Thu, 23 Apr 2020 19:22:25 +0200 Subject: [PATCH 062/456] Clean line extrafields when deleting reception --- .../class/fournisseur.commande.dispatch.class.php | 12 ++++++++++++ htdocs/reception/class/reception.class.php | 13 +++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index b453653c681..bd71918d92d 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -303,6 +303,7 @@ class CommandeFournisseurDispatch extends CommonObject $this->batch = $obj->batch; $this->eatby = $this->db->jdate($obj->eatby); $this->sellby = $this->db->jdate($obj->sellby); + $this->fetch_optionals(); } $this->db->free($resql); @@ -439,6 +440,16 @@ class CommandeFournisseurDispatch extends CommonObject } } + // Remove extrafields + if (!$error) { + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $error++; + dol_syslog(get_class($this)."::delete error deleteExtraFields ".$this->error, LOG_ERR); + } + } + if (! $error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; @@ -689,6 +700,7 @@ class CommandeFournisseurDispatch extends CommonObject $line->batch = $obj->batch; $line->eatby = $this->db->jdate($obj->eatby); $line->sellby = $this->db->jdate($obj->sellby); + $line->fetch_optionals(); $this->lines[$line->id] = $line; } diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 5552d45380e..17e9ea9c1ec 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -763,8 +763,13 @@ class Reception extends CommonObject } // extrafields + $line->array_options = $supplierorderline->array_options; if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) // For avoid conflicts if trigger used - $line->array_options = $array_options; + { + foreach ($array_options as $key => $value) { + $line->array_options[$key] = $value; + } + } $line->fk_product = $fk_product; $line->fk_commande = $supplierorderline->fk_commande; @@ -938,10 +943,14 @@ class Reception extends CommonObject if (!$error) { + $main = MAIN_DB_PREFIX . 'commande_fournisseur_dispatch'; + $ef = $main . "_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_reception = " . $this->id . ")"; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur_dispatch"; $sql .= " WHERE fk_reception = ".$this->id; - if ($this->db->query($sql)) + if ($this->db->query($sqlef) && $this->db->query($sql)) { // Delete linked object $res = $this->deleteObjectLinked(); From ababad540a311339e1b5266b586097cdad9b22c1 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 23 Apr 2020 17:29:52 +0000 Subject: [PATCH 063/456] Fixing style errors. --- .../fournisseur.commande.dispatch.class.php | 16 ++++++++-------- htdocs/reception/class/reception.class.php | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index bd71918d92d..cec23c590b2 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -441,14 +441,14 @@ class CommandeFournisseurDispatch extends CommonObject } // Remove extrafields - if (!$error) { - $result = $this->deleteExtraFields(); - if ($result < 0) - { - $error++; - dol_syslog(get_class($this)."::delete error deleteExtraFields ".$this->error, LOG_ERR); - } - } + if (!$error) { + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $error++; + dol_syslog(get_class($this)."::delete error deleteExtraFields ".$this->error, LOG_ERR); + } + } if (! $error) { diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 17e9ea9c1ec..ce718fda964 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -766,10 +766,10 @@ class Reception extends CommonObject $line->array_options = $supplierorderline->array_options; if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) // For avoid conflicts if trigger used { - foreach ($array_options as $key => $value) { - $line->array_options[$key] = $value; - } - } + foreach ($array_options as $key => $value) { + $line->array_options[$key] = $value; + } + } $line->fk_product = $fk_product; $line->fk_commande = $supplierorderline->fk_commande; From 2ba6e65feb6c29b4cbdf409629ff5fb9069e4cc6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 20:03:41 +0200 Subject: [PATCH 064/456] Fix label --- htdocs/product/stock/class/entrepot.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 5f98de4993b..9f764f7d412 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -272,6 +272,7 @@ class Entrepot extends CommonObject $error = 0; if (empty($id)) $id = $this->id; + if (empty($this->label)) $this->label = $this->libelle; // For backward compatibility // Check if new parent is already a child of current warehouse if (!empty($this->fk_parent)) @@ -285,7 +286,7 @@ class Entrepot extends CommonObject } } - $this->libelle = trim($this->libelle); + $this->label = trim($this->label); $this->description = trim($this->description); $this->lieu = trim($this->lieu); @@ -296,7 +297,7 @@ class Entrepot extends CommonObject $this->country_id = ($this->country_id > 0 ? $this->country_id : 0); $sql = "UPDATE ".MAIN_DB_PREFIX."entrepot "; - $sql .= " SET ref = '".$this->db->escape($this->libelle)."'"; + $sql .= " SET ref = '".$this->db->escape($this->label)."'"; $sql .= ", fk_parent = ".(($this->fk_parent > 0) ? $this->fk_parent : "NULL"); $sql .= ", description = '".$this->db->escape($this->description)."'"; $sql .= ", statut = ".$this->statut; From 5756e3be09e2d41fb367559fe597009218941993 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Apr 2020 20:45:51 +0200 Subject: [PATCH 065/456] Look and feel v12 --- htdocs/contrat/agenda.php | 13 ++++++++----- htdocs/contrat/document.php | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index 2b7ca20c6e8..0055b0ba428 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -146,14 +146,16 @@ if ($id > 0) $morehtmlref .= $form->editfieldval("", 'ref', $object->ref, $object, $user->rights->contrat->creer, 'string', '', 0, 2); } + $permtoedit = 0; + $morehtmlref .= '
'; // Ref customer - $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->contrat->creer, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $user->rights->contrat->creer, 'string', '', null, null, '', 1, 'getFormatedCustomerRef'); + $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_customer', $object->ref_customer, $object, $permtoedit, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_customer', $object->ref_customer, $object, $permtoedit, 'string', '', null, null, '', 1, 'getFormatedCustomerRef'); // Ref supplier $morehtmlref .= '
'; - $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->contrat->creer, 'string', '', null, null, '', 1, 'getFormatedSupplierRef'); + $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $permtoedit, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $permtoedit, 'string', '', null, null, '', 1, 'getFormatedSupplierRef'); // Thirdparty $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; @@ -165,7 +167,8 @@ if ($id > 0) if ($user->rights->contrat->creer) { if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + //$morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).''; + $morehtmlref .= ' : '; } if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 330db63e30c..7d47b5102ac 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -136,6 +136,7 @@ if ($object->id) $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1, 'getFormatedSupplierRef'); // Thirdparty $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherContracts").')'; // Project if (!empty($conf->projet->enabled)) { From dd070cc68046a2ba911d9222e7ab61e8d7044213 Mon Sep 17 00:00:00 2001 From: Matt Sidnell <54064522+pstructures@users.noreply.github.com> Date: Thu, 23 Apr 2020 20:37:15 +0100 Subject: [PATCH 066/456] Update commonobject.class.php --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 7bbf7b6475c..72eff12edca 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1359,7 +1359,7 @@ abstract class CommonObject } if ($conf->{$modulename}->enabled) { $libelle_element = $langs->trans('ContactDefault_'.$obj->element); - $transkey = "TypeContact_".$this->element."_".$source."_".$obj->code; + $transkey = "TypeContact_".$obj->element."_".$source."_".$obj->code; $libelle_type = ($langs->trans($transkey) != $transkey ? $langs->trans($transkey) : $obj->libelle); if (empty($option)) $tab[$obj->rowid] = $libelle_element.' - '.$libelle_type; From 1aafd4667b70148265d79ef44731e659c9b1cc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 24 Apr 2020 11:57:23 +0200 Subject: [PATCH 067/456] fix countable php7 warning --- htdocs/core/lib/sendings.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index 6dc78611c26..96a51815b09 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -388,7 +388,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='') //var_dump($expedition->linkedObjects); $receiving=''; - if (count($expedition->linkedObjects['delivery']) > 0) $receiving=reset($expedition->linkedObjects['delivery']); // Take first link + if (!empty($expedition->linkedObjects['delivery'])) $receiving=reset($expedition->linkedObjects['delivery']); // Take first link if (! empty($receiving)) { From cab4f35438a391fff7301c21320bc2fb7efbf1a0 Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Fri, 24 Apr 2020 14:01:08 +0200 Subject: [PATCH 068/456] fix missing vcard values --- htdocs/contact/vcard.php | 60 ++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 15 deletions(-) diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 297cadac0be..bf1e8528960 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -37,19 +38,19 @@ $id = GETPOST('id', 'int'); $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); -$result = $contact->fetch($id); +$result=$contact->fetch($id); if ($result <= 0) { dol_print_error($contact->error); exit; } -$physicalperson = 1; +$physicalperson=1; $company = new Societe($db); if ($contact->socid) { - $result = $company->fetch($contact->socid); + $result=$company->fetch($contact->socid); } // We create VCard @@ -57,29 +58,58 @@ $v = new vCard(); $v->setProdId('Dolibarr '.DOL_VERSION); $v->setUid('DOLIBARR-CONTACTID-'.$contact->id); -$v->setName($contact->lastname, $contact->firstname, "", "", ""); -$v->setFormattedName($contact->getFullName($langs)); +$v->setName($contact->lastname, $contact->firstname, "", $contact->civility, ""); +$v->setFormattedName($contact->getFullName($langs, 1)); -// By default, all informations are for work (except phone_perso and phone_mobile) $v->setPhoneNumber($contact->phone_pro, "TYPE=WORK;VOICE"); +//$v->setPhoneNumber($contact->phone_perso,"TYPE=HOME;VOICE"); $v->setPhoneNumber($contact->phone_mobile, "TYPE=CELL;VOICE"); $v->setPhoneNumber($contact->fax, "TYPE=WORK;FAX"); -$v->setAddress("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->country_code ? $contact->country : ''), "TYPE=WORK;POSTAL"); -$v->setLabel("", "", $contact->address, $contact->town, "", $contact->zip, ($contact->country_code ? $contact->country : ''), "TYPE=WORK"); -$v->setEmail($contact->email, 'TYPE=PREF,INTERNET'); -$v->setNote($contact->note); +$country = $contact->country_code ? $contact->country : '' ; +$v->setAddress("", "", $contact->address, $contact->town, $contact->state, $contact->zip, $country, "TYPE=WORK;POSTAL"); +$v->setLabel("", "", $contact->address, $contact->town, $contact->state, $contact->zip, $country, "TYPE=WORK"); + +$v->setEmail($contact->email); +$v->setNote($contact->note); $v->setTitle($contact->poste); // Data from linked company if ($company->id) { $v->setURL($company->url, "TYPE=WORK"); - if (!$contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); - if (!$contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); - if (!$contact->zip) $v->setAddress("", "", $company->address, $company->town, "", $company->zip, $company->country, "TYPE=WORK;POSTAL"); - if (empty($contact->email)) $v->setEmail($company->email, 'TYPE=PREF,INTERNET'); + if (! $contact->phone_pro) $v->setPhoneNumber($company->phone, "TYPE=WORK;VOICE"); + if (! $contact->fax) $v->setPhoneNumber($company->fax, "TYPE=WORK;FAX"); + if (! $contact->zip) $v->setAddress("", "", $company->address, $company->town, $company->state, $company->zip, $company->country, "TYPE=WORK;POSTAL"); + + // when company e-mail is empty, use only contact e-mail + if (empty(trim($company->email))) + { + // was set before, don't set twice + } + // when contact e-mail is empty, use only company e-mail + elseif (empty(trim($contact->email))) + { + $v->setEmail($company->email); + } + // when e-mail domain of contact and company are the same, use contact e-mail at first (and company e-mail at second) + elseif (strtolower(end(explode("@", $contact->email))) == strtolower(end(explode("@", $company->email)))) + { + $v->setEmail($contact->email); + + // support by Microsoft Outlook (2019 and possible earlier) + $v->setEmail($company->email, 'INTERNET'); + } + // when e-mail of contact and company complete different use company e-mail at first (and contact e-mail at second) + else + { + $v->setEmail($company->email); + + // support by Microsoft Outlook (2019 and possible earlier) + $v->setEmail($contact->email, 'INTERNET'); + } + // Si contact lie a un tiers non de type "particulier" if ($contact->typent_code != 'TE_PRIVATE') $v->setOrg($company->name); } @@ -95,7 +125,7 @@ $db->close(); $output = $v->getVCard(); -$filename = trim(urldecode($v->getFileName())); // "Nom prenom.vcf" +$filename =trim(urldecode($v->getFileName())); // "Nom prenom.vcf" $filenameurlencoded = dol_sanitizeFileName(urlencode($filename)); //$filename = dol_sanitizeFileName($filename); From 5d9432e4d04f8f73d0f9767e54934dc20086689d Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Fri, 24 Apr 2020 14:02:54 +0200 Subject: [PATCH 069/456] fix style --- htdocs/contact/vcard.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index bf1e8528960..75362491424 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -38,19 +38,19 @@ $id = GETPOST('id', 'int'); $result = restrictedArea($user, 'contact', $id, 'socpeople&societe'); -$result=$contact->fetch($id); +$result = $contact->fetch($id); if ($result <= 0) { dol_print_error($contact->error); exit; } -$physicalperson=1; +$physicalperson = 1; $company = new Societe($db); if ($contact->socid) { - $result=$company->fetch($contact->socid); + $result = $company->fetch($contact->socid); } // We create VCard @@ -125,7 +125,7 @@ $db->close(); $output = $v->getVCard(); -$filename =trim(urldecode($v->getFileName())); // "Nom prenom.vcf" +$filename = trim(urldecode($v->getFileName())); // "Nom prenom.vcf" $filenameurlencoded = dol_sanitizeFileName(urlencode($filename)); //$filename = dol_sanitizeFileName($filename); From 05bb94cd3f105a71ec81162f507dd6cf2522833c Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Fri, 24 Apr 2020 14:12:43 +0200 Subject: [PATCH 070/456] fix wrong set e-mail for vCard + docu update --- htdocs/core/class/vcard.class.php | 53 ++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index a3948bdeed6..4147b6f086a 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -1,7 +1,8 @@ * Copyright (C) 2005-2017 Laurent Destailleur - * + * Copyright (C) 2020 Tobias Sekan + * * 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 * the Free Software Foundation; either version 3 of the License, or @@ -135,11 +136,11 @@ class vCard /** * mise en forme du nom complet * - * @param string $family Family - * @param string $first First - * @param string $additional Additionnal - * @param string $prefix Prefix - * @param string $suffix Suffix + * @param string $family Family name + * @param string $first First name + * @param string $additional Additional (e.g. second name, nick name) + * @param string $prefix Prefix (e.g. "Mr.", "Ms.", "Prof.") + * @param string $suffix Suffix (e.g. "sen." for senior, "jun." for junior) * @return void */ public function setName($family = "", $first = "", $additional = "", $prefix = "", $suffix = "") @@ -216,15 +217,17 @@ class vCard } /** - * mise en forme de l'email + * Add a e-mail address to this vCard * - * @param string $address EMail - * @param string $type Vcard type + * @param string $address E-mail address + * @param string $type (optional) The type of the e-mail (typical "PREF;INTERNET" or "INTERNET") * @return void */ - public function setEmail($address, $type = "internet,pref") + public function setEmail($address, $type = "TYPE=INTERNET;PREF") { - $this->properties["EMAIL;TYPE=".$type] = $address; + $key = "EMAIL"; + if ($type != "") $key .= ";".$type; + $this->properties[$key] = $address; } /** @@ -330,4 +333,32 @@ class vCard { return $this->filename; } + + /* Example from Microsoft Outlook 2019 + + BEGIN:VCARD + VERSION:2.1 + + N;LANGUAGE=de:surename;forename;secondname;Sir;jun. + FN:Sir surename secondname forename jun. + ORG:Companyname + TITLE:position + TEL;WORK;VOICE:work-phone-number + TEL;HOME;VOICE:private-phone-number + TEL;CELL;VOICE:mobile-phone-number + TEL;WORK;FAX:fax-phone-number + ADR;WORK;PREF:;;street and number;town;region;012345;Deutschland + LABEL;WORK;PREF;ENCODING=QUOTED-PRINTABLE:street and number=0D=0A= + =0D=0A= + 012345 town region + X-MS-OL-DEFAULT-POSTAL-ADDRESS:2 + URL;WORK:www.mywebpage.de + EMAIL;PREF;INTERNET:test1@test1.de + EMAIL;INTERNET:test2@test2.de + EMAIL;INTERNET:test3@test3.de + X-MS-IMADDRESS:test@jabber.org + REV:20200424T104242Z + + END:VCARD + */ } From 6d4d638ec10acb6c6cd770ac3937ff40c22c3416 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 24 Apr 2020 12:38:46 +0000 Subject: [PATCH 071/456] Fixing style errors. --- htdocs/core/class/vcard.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/vcard.class.php b/htdocs/core/class/vcard.class.php index 4147b6f086a..fc67eb2f2a0 100644 --- a/htdocs/core/class/vcard.class.php +++ b/htdocs/core/class/vcard.class.php @@ -2,7 +2,7 @@ /* Copyright (C) Kai Blankenhorn * Copyright (C) 2005-2017 Laurent Destailleur * Copyright (C) 2020 Tobias Sekan - * + * * 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 * the Free Software Foundation; either version 3 of the License, or @@ -333,7 +333,7 @@ class vCard { return $this->filename; } - + /* Example from Microsoft Outlook 2019 BEGIN:VCARD From 42ee9845ad33dfa9a7a623102357c4e13e3ee0cc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2020 15:21:02 +0200 Subject: [PATCH 072/456] Report error --- htdocs/compta/facture/class/facture.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 05661fb01cc..1558b6cbfab 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5013,8 +5013,7 @@ class FactureLigne extends CommonInvoiceLine $returnPercent = floatval($res['situation_percent']); - if($include_credit_note) { - + if ($include_credit_note) { $sql = 'SELECT fd.situation_percent FROM ' . MAIN_DB_PREFIX . 'facturedet fd'; $sql.= ' JOIN ' . MAIN_DB_PREFIX . 'facture f ON (f.rowid = fd.fk_facture) '; $sql.= ' WHERE fd.fk_prev_id =' . $this->fk_prev_id; @@ -5026,6 +5025,8 @@ class FactureLigne extends CommonInvoiceLine while($obj = $this->db->fetch_object($res)) { $returnPercent = $returnPercent + floatval($obj->situation_percent); } + } else { + dol_print_error($this->db); } } From b2b580f6fb7d89bf9f295c7308c215e95d5aa9ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2020 15:21:38 +0200 Subject: [PATCH 073/456] Report error --- htdocs/compta/facture/class/facture.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index d872b02a35d..118bcb790bc 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -5569,7 +5569,7 @@ class FactureLigne extends CommonInvoiceLine $sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd'; $sql .= ' JOIN '.MAIN_DB_PREFIX.'facture f ON (f.rowid = fd.fk_facture) '; $sql .= ' WHERE fd.fk_prev_id ='.$this->fk_prev_id; - $sql .= ' AND f.situation_cycle_ref = '.$tmpinvoice->situation_cycle_ref; // Prevent cycle outed + $sql .= ' AND f.situation_cycle_ref = '.$invoicecache[$invoiceid]->situation_cycle_ref; // Prevent cycle outed $sql .= ' AND f.type = '.Facture::TYPE_CREDIT_NOTE; $res = $this->db->query($sql); @@ -5577,6 +5577,8 @@ class FactureLigne extends CommonInvoiceLine while ($obj = $this->db->fetch_object($res)) { $returnPercent = $returnPercent + floatval($obj->situation_percent); } + } else { + dol_print_error($this->db); } } From e98671e40489da84d3b9f3728e54dd41f5f6713f Mon Sep 17 00:00:00 2001 From: gauthier Date: Fri, 24 Apr 2020 15:22:38 +0200 Subject: [PATCH 074/456] FIX : Access to undeclared static property: Contact::$table_element --- htdocs/core/tpl/advtarget.tpl.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index 07b7744e2f8..a40f1214af1 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -459,7 +459,8 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { // Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementype = Contact::$table_element; + $contactstatic = new Contact($db); + $elementype = $contactstatic->table_element; // fetch optionals attributes and labels dol_include_once('/core/class/extrafields.class.php'); $extrafields = new ExtraFields($db); From df917805525cbd22453c9b05c68d4b2785f2290a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2020 15:57:08 +0200 Subject: [PATCH 075/456] FIX Situation invoice take into account the credit notes. --- htdocs/compta/facture/card.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index d83e13da433..934916fa31e 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -1590,6 +1590,8 @@ if (empty($reshook)) if (!empty($origin) && !empty($originid)) { + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + $object->origin = $origin; $object->origin_id = $originid; @@ -1601,6 +1603,17 @@ if (empty($reshook)) $line->fetch_optionals($line->id); $line->situation_percent = $line->get_prev_progress($object->id); // get good progress including credit note + // The $line->situation_percent has been modified, so we must recalculate all amounts + $tabprice = calcul_price_total($line->qty, $line->subprice, $line->remise_percent, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 0, 'HT', 0, $line->product_type, $mysoc, '', $line->situation_percent); + $line->total_ht = $tabprice[0]; + $line->total_tva = $tabprice[1]; + $line->total_ttc = $tabprice[2]; + $line->total_localtax1 = $tabprice[9]; + $line->total_localtax2 = $tabprice[10]; + $line->multicurrency_total_ht = $tabprice[16]; + $line->multicurrency_total_tva = $tabprice[17]; + $line->multicurrency_total_ttc = $tabprice[18]; + // Si fk_remise_except defini on vérifie si la réduction à déjà été appliquée if ($line->fk_remise_except) { @@ -1644,6 +1657,7 @@ if (empty($reshook)) { $nextSituationInvoice = new Facture($db); $nextSituationInvoice->fetch($id); + // create extrafields with data from create form $extralabels = $extrafields->fetch_name_optionals_label($nextSituationInvoice->table_element); $ret = $extrafields->setOptionalsFromPost($extralabels, $nextSituationInvoice); From a685026756fc1046bfb5426947006de9cb4fff5f Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Fri, 24 Apr 2020 17:22:35 +0200 Subject: [PATCH 076/456] fix: remove php warning --- htdocs/compta/accounting-files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index b8e10e7d0e3..665ab6ce485 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -23,7 +23,7 @@ * \brief Page to show portoflio and files of a thirdparty and download it */ -if ($_GET['action'] == 'dl' || $_POST['action'] == 'dl') { // To not replace token when downloading file +if (array_key_exists('action', $_GET) && $_GET['action'] == 'dl' || array_key_exists('action', $_POST) && $_POST['action'] == 'dl') { // To not replace token when downloading file if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); } From 4564a5cffd7e6c2f1f8ab81db902f8036622d693 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2020 19:01:08 +0200 Subject: [PATCH 077/456] Update accounting-files.php --- htdocs/compta/accounting-files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 665ab6ce485..83f735c1eeb 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -23,7 +23,7 @@ * \brief Page to show portoflio and files of a thirdparty and download it */ -if (array_key_exists('action', $_GET) && $_GET['action'] == 'dl' || array_key_exists('action', $_POST) && $_POST['action'] == 'dl') { // To not replace token when downloading file +if ((array_key_exists('action', $_GET) && $_GET['action'] == 'dl') || (array_key_exists('action', $_POST) && $_POST['action'] == 'dl')) { // To not replace token when downloading file if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); } From df10b86d1fbe6a613160ea8922d617cde6d62faf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2020 19:52:34 +0200 Subject: [PATCH 078/456] FIX consistency of price w/wo vat wrong when price entered with tax --- htdocs/core/class/commonobject.class.php | 25 ++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d4735e4ba8d..157fc718700 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2807,8 +2807,8 @@ abstract class CommonObject $sql = 'SELECT rowid, qty, '.$fieldup.' as up, remise_percent, total_ht, '.$fieldtva.' as total_tva, total_ttc, '.$fieldlocaltax1.' as total_localtax1, '.$fieldlocaltax2.' as total_localtax2,'; $sql.= ' tva_tx as vatrate, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, info_bits, product_type'; - if ($this->table_element_line == 'facturedet') $sql.= ', situation_percent'; - $sql.= ', multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; + if ($this->table_element_line == 'facturedet') $sql.= ', situation_percent'; + $sql.= ', multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; $sql.= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql.= ' WHERE '.$this->fk_element.' = '.$this->id; if ($exclspec) @@ -2847,18 +2847,23 @@ abstract class CommonObject if (empty($reshook) && $forcedroundingmode == '0') // Check if data on line are consistent. This may solve lines that were not consistent because set with $forcedroundingmode='auto' { + // This part of code is to fix data. We should not call it too often. $localtax_array=array($obj->localtax1_type,$obj->localtax1_tx,$obj->localtax2_type,$obj->localtax2_tx); $tmpcal=calcul_price_total($obj->qty, $obj->up, $obj->remise_percent, $obj->vatrate, $obj->localtax1_tx, $obj->localtax2_tx, 0, 'HT', $obj->info_bits, $obj->product_type, $seller, $localtax_array, (isset($obj->situation_percent) ? $obj->situation_percent : 100), $multicurrency_tx); - $diff=price2num($tmpcal[1] - $obj->total_tva, 'MT', 1); - if ($diff) + + $diff_when_using_price_ht=price2num($tmpcal[1] - $obj->total_tva, 'MT', 1); // If price was set with tax price adn unit price HT has a low number of digits, then we may have a diff on recalculation from unit price HT. + $diff_on_current_total=price2num($obj->total_ttc - $obj->total_ht - $obj->total_tva - $obj->total_localtax1 - $obj->total_localtax2, 'MT', 1); + //var_dump($obj->total_ht.' '.$obj->total_tva.' '.$obj->total_localtax1.' '.$obj->total_localtax2.' =? '.$obj->total_ttc); + //var_dump($diff_when_using_price_ht.' '.$diff_on_current_total); + + if ($diff_when_using_price_ht && $diff_on_current_total) { $sqlfix="UPDATE ".MAIN_DB_PREFIX.$this->table_element_line." SET ".$fieldtva." = ".$tmpcal[1].", total_ttc = ".$tmpcal[2]." WHERE rowid = ".$obj->rowid; - dol_syslog('We found unconsistent data into detailed line (difference of '.$diff.') for line rowid = '.$obj->rowid." (total vat of line calculated=".$tmpcal[1].", database=".$obj->total_tva."). We fix the total_vat and total_ttc of line by running sqlfix = ".$sqlfix); - $resqlfix=$this->db->query($sqlfix); - if (! $resqlfix) dol_print_error($this->db, 'Failed to update line'); - $obj->total_tva = $tmpcal[1]; - $obj->total_ttc = $tmpcal[2]; - // + dol_syslog('We found unconsistent data into detailed line (diff_when_using_price_ht = '.$diff_when_using_price_ht.' and diff_on_current_total = '.$diff_on_current_total.') for line rowid = '.$obj->rowid." (total vat of line calculated=".$tmpcal[1].", database=".$obj->total_tva."). We fix the total_vat and total_ttc of line by running sqlfix = ".$sqlfix, LOG_WARNING); + $resqlfix=$this->db->query($sqlfix); + if (! $resqlfix) dol_print_error($this->db, 'Failed to update line'); + $obj->total_tva = $tmpcal[1]; + $obj->total_ttc = $tmpcal[2]; } } From 6798e9e6f5ab8862450ee9745b0017e8f08a5c68 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2020 19:52:54 +0200 Subject: [PATCH 079/456] Fix remove warning missing the seller in update_price --- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index b62190686b3..e20a3f9e7de 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1967,7 +1967,7 @@ class FactureFournisseur extends CommonInvoice $this->errors[] = $line->error; } else { // Update total price into invoice record - $res = $this->update_price('', 'auto'); + $res = $this->update_price('', 'auto', 0, $this->thirdparty); } return $res; From 9ed7ff80a1922e9882d57dc0b7a0a2c6097b837c Mon Sep 17 00:00:00 2001 From: Maxime Lecoq Date: Fri, 24 Apr 2020 21:08:47 +0200 Subject: [PATCH 080/456] FIX CUnit->fetch id/rowid --- htdocs/core/class/cunits.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/cunits.class.php b/htdocs/core/class/cunits.class.php index 65baf0056e9..a25250516f4 100644 --- a/htdocs/core/class/cunits.class.php +++ b/htdocs/core/class/cunits.class.php @@ -147,7 +147,7 @@ class CUnits // extends CommonObject /** * Load object in memory from database * - * @param int $id Id object + * @param int $id Id of CUnit object to fetch (rowid) * @param string $code Code * @param string $short_label Short Label ('g', 'kg', ...) * @param string $unit_type Unit type ('size', 'surface', 'volume', 'weight', ...) @@ -168,7 +168,7 @@ class CUnits // extends CommonObject $sql .= " t.active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_units as t"; $sql_where = array(); - if ($id) $sql_where[] = " t.id = ".$id; + if ($id) $sql_where[] = " t.rowid = ".$id; if ($unit_type) $sql_where[] = " t.unit_type = '".$this->db->escape($unit_type)."'"; if ($code) $sql_where[] = " t.code = '".$this->db->escape($code)."'"; if ($short_label) $sql_where[] = " t.short_label = '".$this->db->escape($short_label)."'"; From ac872b6d3dc618b23b456fd7dccb9e9c1535e103 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Fri, 24 Apr 2020 23:36:37 +0200 Subject: [PATCH 081/456] Update global.inc.php --- htdocs/theme/eldy/global.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index e495a3bb4bc..7b8e1373df9 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3360,6 +3360,7 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { text-shadow: none !important; + color: unset; } tr.liste_titre_topborder td { border-top-width: px; From 3ed11f374a9a8aabcb06753f58bf73ee93f0c1cc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 24 Apr 2020 23:56:57 +0200 Subject: [PATCH 082/456] Look and feel v12 --- htdocs/adherents/class/adherent.class.php | 3 + htdocs/core/lib/functions.lib.php | 13 +- htdocs/core/modules/modAsset.class.php | 2 +- htdocs/core/modules/modDon.class.php | 2 +- htdocs/don/card.php | 6 +- htdocs/don/class/don.class.php | 2 +- htdocs/don/document.php | 2 +- htdocs/don/index.php | 2 +- htdocs/don/info.php | 2 +- htdocs/don/list.php | 6 +- htdocs/don/note.php | 2 +- .../class/fournisseur.commande.class.php | 2 +- htdocs/index.php | 331 ++++++++---------- htdocs/product/class/product.class.php | 13 + htdocs/projet/class/project.class.php | 2 +- htdocs/user/class/user.class.php | 2 + 16 files changed, 189 insertions(+), 203 deletions(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index dd2593329e0..55504a547c2 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -60,6 +60,9 @@ class Adherent extends CommonObject */ public $ismultientitymanaged = 1; + public $picto = 'member'; + + public $mesgs; /** diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 507ef0fef08..44ebb23fe93 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3148,9 +3148,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bom', 'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', - 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_dynamicprice', + 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', 'object_holiday', 'object_hrm', 'object_intervention', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', - 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', 'object_supplier_proposal', 'object_service', 'object_stock', + 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', + 'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_other', 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', @@ -3178,7 +3179,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $arrayconvpictotofa = array( 'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bom'=>'cubes', - 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'dynamicprice'=>'hand-holding-usd', + 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'donation'=>'file-medical', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', 'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', @@ -3193,7 +3194,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle', 'other'=>'square', 'playdisabled'=>'play', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature', - 'resize'=>'crop', 'supplier_proposal'=>'file-signature', + 'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', 'resource'=>'laptop-house', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'technic'=>'cogs', 'ticket'=>'ticket-alt', @@ -3249,7 +3250,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // Add CSS $arrayconvpictotomorcess = array( 'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'cash-register'=>'bg-infobox-bank_account', - 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action', + 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'donation'=>'bg-infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action', 'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat', 'multicurrency'=>'bg-infobox-bank_account', 'members'=>'bg-infobox-adherent', 'member'=>'bg-infobox-adherent', 'money-bill-alt'=>'bg-infobox-bank_account', @@ -3258,7 +3259,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4', 'holiday'=>'bg-infobox-holiday', 'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal', - 'resource'=>'bg-infobox-action', 'supplier_proposal'=>'bg-infobox-supplier_proposal', + 'resource'=>'bg-infobox-action', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal', 'ticket'=>'bg-infobox-contrat', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action', 'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode' ); diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index 1efeec1ff43..06e8521b4e5 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -69,7 +69,7 @@ class modAsset extends DolibarrModules // Name of image file used for this module. // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' - $this->picto = 'generic'; + $this->picto = 'accounting'; // Defined all module parts (triggers, login, substitutions, menus, css, etc...) // for default path (eg: /asset/core/xxxxx) (0=disable, 1=enable) diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 003fd61b578..88b7400cc36 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -54,7 +54,7 @@ class modDon extends DolibarrModules $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of png file (without png) used for this module. // Png file must be in theme/yourtheme/img directory under name object_pictovalue.png. - $this->picto = 'bill'; + $this->picto = 'donation'; // Data directories to create when module is enabled $this->dirs = array("/don/temp"); diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 4eb6123b305..505d2fbed29 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -318,7 +318,7 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } if ($action == 'create') { - print load_fiche_titre($langs->trans("AddDonation"), '', 'invoicing'); + print load_fiche_titre($langs->trans("AddDonation"), '', 'object_donation'); print '
'; print ''; @@ -500,7 +500,7 @@ if (!empty($id) && $action == 'edit') print ''; - dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'generic'); + dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'donation'); print '
'.$langs->trans('PaymentConditionsShortRetainedWarranty').' 
'.($title?$title:$langs->trans($confkey)); + print ''.($title ? $title : $langs->trans($confkey)); if (!empty($desc)) { print '
'.$langs->trans($desc).''; } @@ -206,14 +206,14 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra { global $langs, $conf, $db, $inputCount; - $inputCount = empty($inputCount)?1:($inputCount+1); - $form=new Form($db); + $inputCount = empty($inputCount) ? 1 : ($inputCount + 1); + $form = new Form($db); $defaultMetas = array( 'name' => 'value'.$inputCount ); - if ($type!='textarea') { + if ($type != 'textarea') { $defaultMetas['type'] = 'text'; $defaultMetas['value'] = $conf->global->{$confkey}; } @@ -229,9 +229,9 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra print '
'; if (!empty($help)) { - print $form->textwithtooltip(($title?$title:$langs->trans($confkey)), $langs->trans($help), 2, 1, img_help(1, '')); + print $form->textwithtooltip(($title ? $title : $langs->trans($confkey)), $langs->trans($help), 2, 1, img_help(1, '')); } else { - print $title?$title:$langs->trans($confkey); + print $title ? $title : $langs->trans($confkey); } if (!empty($desc)) { @@ -244,12 +244,12 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra print ''; print ''; - if ($type=='textarea') { + if ($type == 'textarea') { print ''; - }elseif($type=='input'){ + }elseif ($type == 'input') { print ''; } - else{ + else { // custom print $type; } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index e5cfb1574dc..89801a357dd 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -140,8 +140,8 @@ $isdraft = (($object->statut == Facture::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid, $isdraft); // retained warranty invoice available type -$retainedWarrantyInvoiceAvailableType=array(); -if(!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) { +$retainedWarrantyInvoiceAvailableType = array(); +if (!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) { $retainedWarrantyInvoiceAvailableType = explode('+', $conf->global->INVOICE_USE_RETAINED_WARRANTY); } @@ -952,7 +952,7 @@ if (empty($reshook)) } $discount->tva_tx = abs($tva_tx); - $discount->vat_src_code =$vat_src_code; + $discount->vat_src_code = $vat_src_code; $result = $discount->create($user); if ($result < 0) @@ -1362,11 +1362,11 @@ if (empty($reshook)) $object->situation_cycle_ref = $object->newCycle(); } - if(in_array($object->type, $retainedWarrantyInvoiceAvailableType)){ + if (in_array($object->type, $retainedWarrantyInvoiceAvailableType)) { $object->retained_warranty = GETPOST('retained_warranty', 'int'); $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); } - else{ + else { $object->retained_warranty = 0; $object->retained_warranty_fk_cond_reglement = 0; } @@ -1772,15 +1772,15 @@ if (empty($reshook)) $object->origin_id = $originid; // retained warranty - if(!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) + if (!empty($conf->global->INVOICE_USE_RETAINED_WARRANTY)) { $retained_warranty = GETPOST('retained_warranty', 'int'); - if(price2num($retained_warranty) > 0) + if (price2num($retained_warranty) > 0) { - $object->retained_warranty = price2num($retained_warranty); + $object->retained_warranty = price2num($retained_warranty); } - if(GETPOST('retained_warranty_fk_cond_reglement', 'int') > 0) + if (GETPOST('retained_warranty_fk_cond_reglement', 'int') > 0) { $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); } @@ -2629,10 +2629,10 @@ if (empty($reshook)) $pa_ht = $originLine->pa_ht; $label = $originLine->label; $array_options = $originLine->array_options; - if($object->type == Facture::TYPE_SITUATION){ + if ($object->type == Facture::TYPE_SITUATION) { $situation_percent = 0; } - else{ + else { $situation_percent = 100; } $fk_prev_id = ''; @@ -3393,19 +3393,19 @@ if ($action == 'create') print '
'.$langs->trans('RetainedWarranty').''; print '%'; @@ -3413,11 +3413,11 @@ if ($action == 'create') // Retained warranty payment term print '
'.$langs->trans('PaymentConditionsShortRetainedWarranty').''; $retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); - if(empty($retained_warranty_fk_cond_reglement)){ + if (empty($retained_warranty_fk_cond_reglement)) { $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID; - if(!empty($objectsrc->retained_warranty_fk_cond_reglement)){ // use previous situation value + if (!empty($objectsrc->retained_warranty_fk_cond_reglement)) { // use previous situation value $retained_warranty_fk_cond_reglement = $objectsrc->retained_warranty_fk_cond_reglement; - }else{ + } else { $retained_warranty_fk_cond_reglement = $conf->global->INVOICE_SITUATION_DEFAULT_RETAINED_WARRANTY_COND_ID; } } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 62acafe4bf9..d872b02a35d 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -813,12 +813,12 @@ class Facture extends CommonInvoice $vatrate = $line->tva_tx; if ($line->vat_src_code && !preg_match('/\(.*\)/', $vatrate)) $vatrate .= ' ('.$line->vat_src_code.')'; - if(!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) { - $originid=$line->origin_id; - $origintype=$line->origin; + if (!empty($conf->global->MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION)) { + $originid = $line->origin_id; + $origintype = $line->origin; } else { - $originid=$line->id; - $origintype=$this->element; + $originid = $line->id; + $origintype = $this->element; } $result = $this->addline( @@ -3734,44 +3734,44 @@ class Facture extends CommonInvoice } if (!empty($addon)) { - dol_syslog("Call getNextNumRef with " . $addonConstName . " = " . $conf->global->FACTURE_ADDON . ", thirdparty=" . $soc->nom . ", type=" . $soc->typent_code, LOG_DEBUG); + dol_syslog("Call getNextNumRef with ".$addonConstName." = ".$conf->global->FACTURE_ADDON.", thirdparty=".$soc->nom.", type=".$soc->typent_code, LOG_DEBUG); $mybool = false; - $file = $addon . '.php'; + $file = $addon.'.php'; $classname = $addon; // Include file with class $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir . 'core/modules/' . $moduleName . '/'); + $dir = dol_buildpath($reldir.'core/modules/'.$moduleName.'/'); // Load file with numbering class (if found) - if (is_file($dir . $file) && is_readable($dir . $file)) { - $mybool |= include_once $dir . $file; + if (is_file($dir.$file) && is_readable($dir.$file)) { + $mybool |= include_once $dir.$file; } } // For compatibility if (!$mybool) { - $file = $addon . '/' . $addon . '.modules.php'; - $classname = 'mod_' . $moduleName . '_' . $addon; + $file = $addon.'/'.$addon.'.modules.php'; + $classname = 'mod_'.$moduleName.'_'.$addon; $classname = preg_replace('/\-.*$/', '', $classname); // Include file with class foreach ($conf->file->dol_document_root as $dirroot) { - $dir = $dirroot . '/core/modules/' . $moduleName . '/'; + $dir = $dirroot.'/core/modules/'.$moduleName.'/'; // Load file with numbering class (if found) - if (is_file($dir . $file) && is_readable($dir . $file)) { - $mybool |= include_once $dir . $file; + if (is_file($dir.$file) && is_readable($dir.$file)) { + $mybool |= include_once $dir.$file; } } } if (!$mybool) { - dol_print_error('', 'Failed to include file ' . $file); + dol_print_error('', 'Failed to include file '.$file); return ''; } @@ -3790,7 +3790,7 @@ class Facture extends CommonInvoice return $numref; } else { $langs->load('errors'); - print $langs->trans('Error') . ' ' . $langs->trans('ErrorModuleSetupNotComplete', $langs->transnoentitiesnoconv($moduleSourceName)); + print $langs->trans('Error').' '.$langs->trans('ErrorModuleSetupNotComplete', $langs->transnoentitiesnoconv($moduleSourceName)); return ''; } } @@ -4756,7 +4756,7 @@ class Facture extends CommonInvoice // note : we dont need to test INVOICE_USE_RETAINED_WARRANTY because if $this->retained_warranty is not empty it's because it was set when this conf was active $displayWarranty = false; - if(!empty($this->retained_warranty)) { + if (!empty($this->retained_warranty)) { $displayWarranty = true; if ($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) { @@ -4795,7 +4795,7 @@ class Facture extends CommonInvoice $retainedWarrantyAmount = 0; // Billed - retained warranty - if($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) + if ($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) { $displayWarranty = true; // Check if this situation invoice is 100% for real @@ -4835,7 +4835,7 @@ class Facture extends CommonInvoice $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT); } - if($rounding>0){ + if ($rounding > 0) { return round($retainedWarrantyAmount, $rounding); } diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 5c43f4f83a1..4bcfbafa9d8 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -365,7 +365,7 @@ abstract class CommonDocGenerator $remain_to_pay = $sumpayed - $sumdeposit - $sumcreditnote; if ($object->fk_account > 0) { - require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php'; + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $bank_account = new Account($this->db); $bank_account->fetch($object->fk_account); } diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 2dcabbcafaa..76e910bdecd 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -352,7 +352,7 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '') $content = str_replace(' contenteditable="true"', ' contenteditable="false"', $content); - if (! empty($conf->global->WEBSITE_ADD_CSS_TO_BODY)) { + if (!empty($conf->global->WEBSITE_ADD_CSS_TO_BODY)) { $content = str_replace('entity.")"; $resql = $this->db->query($sql); diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 4f4334e4125..e245ec2cf4e 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4938,7 +4938,7 @@ class Product extends CommonObject { $filterStatus = '4'; if (isset($includedraftpoforvirtual)) $filterStatus = '0,'.$filterStatus; - $result = $this->load_stats_reception(0, $filterStatus, 1); // Use same tables than when module reception is not used. + $result = $this->load_stats_reception(0, $filterStatus, 1); // Use same tables than when module reception is not used. if ($result < 0) dol_print_error($this->db, $this->error); $stock_reception_fournisseur = $this->stats_reception['qty']; } diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index d57db91aa82..dbdb6cb6f42 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -64,14 +64,14 @@ if ($id > 0 || !empty($ref)) * Actions */ -if ($cancel) $action =''; +if ($cancel) $action = ''; // Action association d'un sousproduit if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->service->creer)) { - $error=0; + $error = 0; $maxprod = GETPOST("max_prod", 'int'); - for ($i=0; $i < $maxprod; $i++) + for ($i = 0; $i < $maxprod; $i++) { $qty = price2num(GETPOST("prod_qty_".$i, 'alpha'), 'MS'); if ($qty > 0) @@ -109,13 +109,13 @@ if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->se } } - if (! $error) + if (!$error) { header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } } -elseif($action==='save_composed_product') +elseif ($action === 'save_composed_product') { $TProduct = GETPOST('TProduct', 'array'); if (!empty($TProduct)) @@ -540,38 +540,38 @@ if ($id > 0 || !empty($ref)) if ($resql) { $num = $db->num_rows($resql); - $i=0; + $i = 0; - if($num == 0) print '
'.$langs->trans("NoMatchFound").'
'.$langs->trans("NoMatchFound").'
'; @@ -629,7 +629,7 @@ if (!empty($id) && $action != 'edit') $hselected = 'card'; $head = donation_prepare_head($object); - dol_fiche_head($head, $hselected, $langs->trans("Donation"), -1, 'generic'); + dol_fiche_head($head, $hselected, $langs->trans("Donation"), -1, 'donation'); // Print form confirm print $formconfirm; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 102d7e58685..bbd2a9b4577 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -60,7 +60,7 @@ class Don extends CommonObject /** * @var string String with name of icon for object don. Must be the part after the 'object_' into object_myobject.png */ - public $picto = 'generic'; + public $picto = 'donation'; /** * @var string Date of the donation diff --git a/htdocs/don/document.php b/htdocs/don/document.php index dcb245e3e85..f2994b95577 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -104,7 +104,7 @@ if ($object->id) $head = donation_prepare_head($object); - dol_fiche_head($head, 'documents', $langs->trans("Donation"), -1, 'generic'); + dol_fiche_head($head, 'documents', $langs->trans("Donation"), -1, 'donation'); // Build file list diff --git a/htdocs/don/index.php b/htdocs/don/index.php index 3f74cfa53a1..d8df1f910fc 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -85,7 +85,7 @@ if ($result) dol_print_error($db); } -print load_fiche_titre($langs->trans("DonationsArea"), '', 'invoicing'); +print load_fiche_titre($langs->trans("DonationsArea"), '', 'object_donation'); print '
'; diff --git a/htdocs/don/info.php b/htdocs/don/info.php index cff4aceae79..170c577dc00 100644 --- a/htdocs/don/info.php +++ b/htdocs/don/info.php @@ -67,7 +67,7 @@ $object->info($id); $head = donation_prepare_head($object); -dol_fiche_head($head, 'info', $langs->trans("Donation"), -1, 'generic'); +dol_fiche_head($head, 'info', $langs->trans("Donation"), -1, 'donation'); $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/don/list.php b/htdocs/don/list.php index cd0d0539f8f..65ec24b1458 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -77,17 +77,17 @@ $fieldstosearchall = array( 'd.firstname'=>'Firstname', ); + /* * View */ +$donationstatic = new Don($db); $form = new Form($db); if (!empty($conf->projet->enabled)) $projectstatic = new Project($db); llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones'); -$donationstatic = new Don($db); - // Genere requete de liste des dons $sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,"; $sql .= " d.amount, d.fk_statut as status,"; @@ -163,7 +163,7 @@ if ($resql) print ''; print ''; - print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit, 0, 0, 1); + print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1); if ($search_all) { diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 08b8c05b520..111ea2399a3 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -83,7 +83,7 @@ if ($id > 0 || !empty($ref)) $head = donation_prepare_head($object); - dol_fiche_head($head, 'note', $langs->trans("Donation"), -1, 'generic'); + dol_fiche_head($head, 'note', $langs->trans("Donation"), -1, 'donation'); $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 3784b3a9c6a..faf0b76ce33 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -65,7 +65,7 @@ class CommandeFournisseur extends CommonOrder /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ - public $picto = 'order'; + public $picto = 'supplier_order'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/index.php b/htdocs/index.php index 850a6c3a932..cfa927ef9b1 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -125,212 +125,178 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) if (empty($reshook)) { + // Cle array returned by the method load_state_board for each line + $keys = array( + 'users', + 'members', + 'expensereports', + 'holidays', + 'customers', + 'prospects', + 'suppliers', + 'contacts', + 'products', + 'services', + 'projects', + 'proposals', + 'orders', + 'invoices', + 'donations', + 'contracts', + 'interventions', + 'supplier_orders', + 'supplier_invoices', + 'supplier_proposals', + 'ticket' + ); + // Condition to be checked for each display line dashboard $conditions = array( - $user->rights->user->user->lire, - !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), - !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), - !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), - !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, - !empty($conf->adherent->enabled) && $user->rights->adherent->lire, - !empty($conf->product->enabled) && $user->rights->produit->lire, - !empty($conf->service->enabled) && $user->rights->service->lire, - !empty($conf->propal->enabled) && $user->rights->propale->lire, - !empty($conf->commande->enabled) && $user->rights->commande->lire, - !empty($conf->facture->enabled) && $user->rights->facture->lire, - !empty($conf->contrat->enabled) && $user->rights->contrat->lire, - !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire, - !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS), - !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS), - !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS), - !empty($conf->projet->enabled) && $user->rights->projet->lire, - !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire, - !empty($conf->holiday->enabled) && $user->rights->holiday->read, - !empty($conf->don->enabled) && $user->rights->don->lire, - !empty($conf->ticket->enabled) && $user->rights->ticket->read + 'users' => $user->rights->user->user->lire, + 'members' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), + 'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), + 'prospects' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), + 'suppliers' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, + 'contacts' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire, + 'products' => !empty($conf->product->enabled) && $user->rights->produit->lire, + 'services' => !empty($conf->service->enabled) && $user->rights->service->lire, + 'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire, + 'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire, + 'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire, + 'donations' => !empty($conf->don->enabled) && $user->rights->don->lire, + 'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire, + 'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire, + 'supplier_orders' => !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS), + 'supplier_invoices' => !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS), + 'supplier_proposals' => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS), + 'projects' => !empty($conf->projet->enabled) && $user->rights->projet->lire, + 'expensereports' => !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire, + 'holidays' => !empty($conf->holiday->enabled) && $user->rights->holiday->read, + 'ticket' => !empty($conf->ticket->enabled) && $user->rights->ticket->read ); // Class file containing the method load_state_board for each line $includes = array( - DOL_DOCUMENT_ROOT."/user/class/user.class.php", - DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php", - DOL_DOCUMENT_ROOT."/societe/class/client.class.php", - DOL_DOCUMENT_ROOT."/societe/class/client.class.php", - DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php", - DOL_DOCUMENT_ROOT."/contact/class/contact.class.php", - DOL_DOCUMENT_ROOT."/product/class/product.class.php", - DOL_DOCUMENT_ROOT."/product/class/product.class.php", - DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php", - DOL_DOCUMENT_ROOT."/commande/class/commande.class.php", - DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php", - DOL_DOCUMENT_ROOT."/don/class/don.class.php", - DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php", - DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php", - DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php", - DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php", - DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php", - DOL_DOCUMENT_ROOT."/projet/class/project.class.php", - DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php", - DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php", - DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php" + 'users' => DOL_DOCUMENT_ROOT."/user/class/user.class.php", + 'members' => DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php", + 'customers' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", + 'prospects' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", + 'suppliers' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php", + 'contacts' => DOL_DOCUMENT_ROOT."/contact/class/contact.class.php", + 'products' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", + 'services' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", + 'proposals' => DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php", + 'orders' => DOL_DOCUMENT_ROOT."/commande/class/commande.class.php", + 'invoices' => DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php", + 'donations' => DOL_DOCUMENT_ROOT."/don/class/don.class.php", + 'contracts' => DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php", + 'interventions' => DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php", + 'supplier_orders' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php", + 'supplier_invoices' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php", + 'supplier_proposals' => DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php", + 'projects' => DOL_DOCUMENT_ROOT."/projet/class/project.class.php", + 'expensereports' => DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php", + 'holidays' => DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php", + 'ticket' => DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php" ); // Name class containing the method load_state_board for each line $classes = array( - 'User', - 'Adherent', - 'Client', - 'Client', - 'Fournisseur', - 'Contact', - 'Product', - 'Product', - 'Propal', - 'Commande', - 'Facture', - 'Don', - 'Contrat', - 'Fichinter', - 'CommandeFournisseur', - 'FactureFournisseur', - 'SupplierProposal', - 'Project', - 'ExpenseReport', - 'Holiday', - 'Ticket', - ); - // Cle array returned by the method load_state_board for each line - $keys = array( - 'users', - 'members', - 'customers', - 'prospects', - 'suppliers', - 'contacts', - 'products', - 'services', - 'proposals', - 'orders', - 'invoices', - 'donations', - 'contracts', - 'interventions', - 'supplier_orders', - 'supplier_invoices', - 'askprice', - 'projects', - 'expensereports', - 'holidays', - 'ticket' - ); - // Dashboard Icon lines - $icons = array( - 'user', - 'user', - 'company', - 'company', - 'company', - 'contact', - 'product', - 'service', - 'propal', - 'order', - 'bill', - 'generic', - 'contract', - 'intervention', - 'order', - 'bill', - 'propal', - 'project', - 'trip', - 'holiday', - 'ticket', + 'users' => 'User', + 'members' => 'Adherent', + 'customers' => 'Client', + 'prospects' => 'Client', + 'suppliers' => 'Fournisseur', + 'contacts' => 'Contact', + 'products' => 'Product', + 'services' => 'Service', + 'proposals' => 'Propal', + 'orders' => 'Commande', + 'invoices' => 'Facture', + 'donations' => 'Don', + 'contracts' => 'Contrat', + 'interventions' => 'Fichinter', + 'supplier_orders' => 'CommandeFournisseur', + 'supplier_invoices' => 'FactureFournisseur', + 'supplier_proposals' => 'SupplierProposal', + 'projects' => 'Project', + 'expensereports' => 'ExpenseReport', + 'holidays' => 'Holiday', + 'ticket' => 'Ticket', ); // Translation keyword $titres = array( - "Users", - "Members", - "ThirdPartyCustomersStats", - "ThirdPartyProspectsStats", - "Suppliers", - "Contacts", - "Products", - "Services", - "CommercialProposalsShort", - "CustomersOrders", - "BillsCustomers", - "Donations", - "Contracts", - "Interventions", - "SuppliersOrders", - "SuppliersInvoices", - "SupplierProposalShort", - "Projects", - "ExpenseReports", - "Holidays", - "Ticket", + 'users' => "Users", + 'members' => "Members", + 'customers' => "ThirdPartyCustomersStats", + 'prospects' => "ThirdPartyProspectsStats", + 'suppliers' => "Suppliers", + 'contacts' => "Contacts", + 'products' => "Products", + 'services' => "Services", + 'proposals' => "CommercialProposalsShort", + 'orders' => "CustomersOrders", + 'invoices' => "BillsCustomers", + 'donations' => "Donations", + 'contracts' => "Contracts", + 'interventions' => "Interventions", + 'supplier_orders' => "SuppliersOrders", + 'supplier_invoices' => "SuppliersInvoices", + 'supplier_proposals' => "SupplierProposalShort", + 'projects' => "Projects", + 'expensereports' => "ExpenseReports", + 'holidays' => "Holidays", + 'ticket' => "Ticket", ); // Dashboard Link lines $links = array( - DOL_URL_ROOT.'/user/list.php', - DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members', - DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies', - DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies', - DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies', - DOL_URL_ROOT.'/contact/list.php?mainmenu=companies', - DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products', - DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products', - DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', - DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders', - DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills', - DOL_URL_ROOT.'/don/list.php?leftmenu=donations', - DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts', - DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter', - DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers', - DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills', - DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=', - DOL_URL_ROOT.'/projet/list.php?mainmenu=project', - DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport', - DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday', - DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket' + 'users' => DOL_URL_ROOT.'/user/list.php', + 'members' => DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members', + 'customers' => DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies', + 'prospects' => DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies', + 'suppliers' => DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies', + 'contacts' => DOL_URL_ROOT.'/contact/list.php?mainmenu=companies', + 'products' => DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products', + 'services' => DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products', + 'proposals' => DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', + 'orders' => DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders', + 'invoices' => DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills', + 'donations' => DOL_URL_ROOT.'/don/list.php?leftmenu=donations', + 'contracts' => DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts', + 'interventions' => DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter', + 'supplier_orders' => DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers', + 'supplier_invoices' => DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills', + 'supplier_proposals' => DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=', + 'projects' => DOL_URL_ROOT.'/projet/list.php?mainmenu=project', + 'expensereports' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport', + 'holidays' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday', + 'ticket' => DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket' ); // Translation lang files $langfile = array( - "users", - "members", - "companies", - "prospects", - "suppliers", - "companies", - "products", - "products", - "propal", - "orders", - "bills", - "donations", - "contracts", - "interventions", - "bills", - "bills", - "supplier_proposal", - "projects", - "trips", - "holiday", - "ticket" + 'customers' => "companies", + 'contacts' => "companies", + 'services' => "products", + 'proposals' => "propal", + 'invoices' => "bills", + 'supplier_orders' => "orders", + 'supplier_invoices' => "bills", + 'supplier_proposals' => 'supplier_proposal', + 'expensereports' => "trips", + 'holidays' => "holiday", ); // Loop and displays each line of table $boardloaded = array(); - foreach ($keys as $key => $val) + foreach ($keys as $val) { - if ($conditions[$key]) + if ($conditions[$val]) { $boxstatItem = ''; - $classe = $classes[$key]; + $classe = $classes[$val]; // Search in cache if load_state_board is already realized if (!isset($boardloaded[$classe]) || !is_object($boardloaded[$classe])) { - include_once $includes[$key]; // Loading a class cost around 1Mb + include_once $includes[$val]; // Loading a class cost around 1Mb $board = new $classe($db); $board->load_state_board($user); @@ -341,12 +307,13 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) $board = $boardloaded[$classe]; } - if (!empty($langfile[$key])) $langs->load($langfile[$key]); - $text = $langs->trans($titres[$key]); - $boxstatItem .= ''; + $langs->load(empty($langfile[$val]) ? $val : $langfile[$val]); + + $text = $langs->trans($titres[$val]); + $boxstatItem .= ''; $boxstatItem .= '
'; $boxstatItem .= ''.$text.'
'; - $boxstatItem .= ''.img_object("", $icons[$key], 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).''; + $boxstatItem .= ''.img_object("", $board->picto, 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).''; $boxstatItem .= '
'; $boxstatItem .= '
'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index e245ec2cf4e..336c6b85fa4 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -71,6 +71,9 @@ class Product extends CommonObject */ public $ismultientitymanaged = 1; + + public $picto = 'product'; + /** * {@inheritdoc} */ @@ -5632,3 +5635,13 @@ class Product extends CommonObject } } } + + + +/** + * Class to manage products or services + */ +class Service extends Product +{ + public $picto = 'service'; +} diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 674db2cc5d6..1ee17511304 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -68,7 +68,7 @@ class Project extends CommonObject /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ - public $picto = 'projectpub'; + public $picto = 'project'; /** * {@inheritdoc} diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 24bf871af1f..23d42ba3e65 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -64,6 +64,8 @@ class User extends CommonObject */ public $ismultientitymanaged = 1; + public $picto = 'user'; + public $id = 0; public $statut; public $ldap_sid; From 291664d1099e1e90f7b8e3126a66fa36502f194d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 01:04:26 +0200 Subject: [PATCH 083/456] Look and feel v12 --- htdocs/compta/localtax/list.php | 2 +- htdocs/core/lib/functions.lib.php | 17 +++++++++-------- .../fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/class/paiementfourn.class.php | 5 ++++- htdocs/fourn/facture/paiement.php | 12 ++++++++++-- 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php index 911eb7e88f3..47a0f44be47 100644 --- a/htdocs/compta/localtax/list.php +++ b/htdocs/compta/localtax/list.php @@ -48,7 +48,7 @@ if ($user->rights->tax->charges->creer) $newcardbutton .= dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt + 1)), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt); } -print load_fiche_titre($langs->transcountry($ltt == 2 ? "LT2Payments" : "LT1Payments", $mysoc->country_code), $newcardbutton, 'invoicing'); +print load_fiche_titre($langs->transcountry($ltt == 2 ? "LT2Payments" : "LT1Payments", $mysoc->country_code), $newcardbutton, 'title_accountancy'); $sql = "SELECT rowid, amount, label, f.datev, f.datep"; $sql .= " FROM ".MAIN_DB_PREFIX."localtax as f "; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 44ebb23fe93..13727fe8669 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3141,11 +3141,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ if (empty($srconly) && in_array($pictowithouttext, array( '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', - 'address', 'bank_account', 'barcode', 'bank', 'bookmark', 'bom', 'building', 'cash-register', 'check', 'close_title', 'company', 'contact', 'cubes', + 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', 'cash-register', 'check', 'close_title', 'company', 'contact', 'cubes', 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', 'language', 'list', 'listlight', 'lot', 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'stock', - 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bom', + 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bill', 'object_bom', 'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', @@ -3178,7 +3178,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $pictowithouttext = str_replace('object_', '', $pictowithouttext); $arrayconvpictotofa = array( - 'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bom'=>'cubes', + 'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'bom'=>'cubes', 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'donation'=>'file-medical', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', @@ -3197,7 +3197,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', 'resource'=>'laptop-house', - 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'technic'=>'cogs', 'ticket'=>'ticket-alt', + 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt', 'uparrow'=>'mail-forward', @@ -3249,8 +3249,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // Add CSS $arrayconvpictotomorcess = array( - 'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'cash-register'=>'bg-infobox-bank_account', - 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'donation'=>'bg-infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action', + 'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'bill'=>'bg-infobox-commande', + 'cash-register'=>'bg-infobox-bank_account', 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', + 'donation'=>'bg-infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action', 'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat', 'multicurrency'=>'bg-infobox-bank_account', 'members'=>'bg-infobox-adherent', 'member'=>'bg-infobox-adherent', 'money-bill-alt'=>'bg-infobox-bank_account', @@ -3259,8 +3260,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4', 'holiday'=>'bg-infobox-holiday', 'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal', - 'resource'=>'bg-infobox-action', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal', - 'ticket'=>'bg-infobox-contrat', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action', + 'resource'=>'bg-infobox-action', 'supplier_invoice'=>'bg-infobox-order_supplier', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal', + 'ticket'=>'bg-infobox-contrat', 'title_accountancy'=>'bg-infobox-bank_account', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action', 'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode' ); if (!empty($arrayconvpictotomorcess[$pictowithouttext])) { diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index ba0bcfb052c..52c5f15abd3 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -66,7 +66,7 @@ class FactureFournisseur extends CommonInvoice /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ - public $picto = 'bill'; + public $picto = 'supplier_invoice'; /** * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index ace596b6bb4..a95aefede0f 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -67,6 +67,8 @@ class PaiementFourn extends Paiement */ public $type_code; + + /** * Constructor * @@ -583,13 +585,14 @@ class PaiementFourn extends Paiement $result = ''; $text = $this->ref; // Sometimes ref contains label + $reg = array(); if (preg_match('/^\((.*)\)$/i', $text, $reg)) { // Label generique car entre parentheses. On l'affiche en le traduisant if ($reg[1] == 'paiement') $reg[1] = 'Payment'; $text = $langs->trans($reg[1]); } - $label = ''.$langs->trans("ShowPayment").'
'; + $label = ''.$langs->trans("Payment").'
'; $label .= ''.$langs->trans("Ref").': '.$text; if ($this->datepaye ? $this->datepaye : $this->date) $label .= '
'.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 45d9c8ef967..99b982f5e40 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -822,7 +822,7 @@ if (empty($action) || $action == 'list') if (!$sortorder) $sortorder = 'DESC'; if (!$sortfield) $sortfield = 'p.datep'; - $sql = 'SELECT p.rowid as pid, p.datep as dp, p.amount as pamount, p.num_paiement,'; + $sql = 'SELECT p.rowid as pid, p.ref, p.datep as dp, p.amount as pamount, p.num_paiement,'; $sql .= ' s.rowid as socid, s.nom as name,'; $sql .= ' c.code as paiement_type, c.libelle as paiement_libelle,'; $sql .= ' ba.rowid as bid, ba.label,'; @@ -972,16 +972,24 @@ if (empty($action) || $action == 'list') print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); print "\n"; + $paymentfournstatic = new PaiementFourn($db); + $i = 0; $totalarray = array(); while ($i < min($num, $limit)) { $objp = $db->fetch_object($resql); + $paymentfournstatic->id = $objp->pid; + $paymentfournstatic->ref = $objp->ref; + $paymentfournstatic->datepaye = $objp->dp; + print '
'; // Ref payment - print ''; + print ''; if (!$i) $totalarray['nbfield']++; // Date From c9f242406c8510b95088d4eea6f567a8da66d4d4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 02:44:24 +0200 Subject: [PATCH 084/456] Look and feel v12 --- htdocs/accountancy/admin/index.php | 2 ++ htdocs/accountancy/customer/list.php | 6 +++--- htdocs/accountancy/journal/bankjournal.php | 2 +- htdocs/accountancy/journal/expensereportsjournal.php | 2 +- htdocs/accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- htdocs/accountancy/supplier/list.php | 10 +++++----- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 02963557222..006db08fe9c 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -236,6 +236,7 @@ if (!empty($user->admin)) } print ''; + /* Set this option as a hidden option but keep it for some needs. print ''; print ''; if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) { @@ -248,6 +249,7 @@ if (!empty($user->admin)) print ''; } print ''; + */ print ''; print ''; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 9dbb846370c..8d09587ca5a 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -567,12 +567,12 @@ if ($result) { print ''; // Found accounts - print ''; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index b3d1e6ce7f8..3372105cd85 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -994,7 +994,7 @@ if (empty($action) || $action == 'view') { print '
'; - if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print ''; + if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print ''; if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1' || ($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') { diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index d0a84c1236c..4be0b133143 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -508,7 +508,7 @@ if (empty($action) || $action == 'view') { } print '
'; - if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print ''; + if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print ''; if (empty($conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT) || $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT == '-1') { print ''; } diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index dd7dc1ca9e1..ee67aaad392 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -740,7 +740,7 @@ if (empty($action) || $action == 'view') { print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); } print '
'; - if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print ''; + if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print ''; if (($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == "") || $conf->global->ACCOUNTING_ACCOUNT_SUPPLIER == '-1') { print ''; } diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 80603106cb3..1710a61ccdd 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -677,7 +677,7 @@ if (empty($action) || $action == 'view') { print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); } print '
'; - if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) print ''; + if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') print ''; if (($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == "") || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') { print ''; } diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index ce354c789f3..c100868bd63 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -553,21 +553,21 @@ if ($result) { print '
'; // Found accounts - print ''; From 6b114a31ced82e81d5bf35267e4d8e37da5e4ffc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 03:00:41 +0200 Subject: [PATCH 085/456] Look and feel v12 --- htdocs/accountancy/admin/account.php | 4 ++-- htdocs/accountancy/admin/accountmodel.php | 2 +- htdocs/accountancy/admin/categories_list.php | 4 ++-- htdocs/accountancy/admin/journals_list.php | 2 +- htdocs/accountancy/admin/productaccount.php | 3 +-- htdocs/accountancy/index.php | 2 +- htdocs/accountancy/supplier/list.php | 4 ++-- htdocs/admin/dict.php | 2 +- htdocs/compta/resultat/clientfourn.php | 8 +++----- htdocs/core/lib/functions.lib.php | 10 +++++----- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- 11 files changed, 20 insertions(+), 23 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index f735a0a0cfc..86981e5b5de 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -488,11 +488,11 @@ if ($resql) // Action print '"; // Modify link - if ($canbemodified) print ''; + if ($canbemodified) print ''; else print ''; // Delete link diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 500a0d3cbba..1b2733e2045 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -408,7 +408,7 @@ llxHeader('', $langs->trans('DictionaryAccountancyCategory')); $titre = $langs->trans($tablib[$id]); $linkback = ''; -$titlepicto = 'title_setup'; +$titlepicto = 'title_accountancy'; print load_fiche_titre($titre, $linkback, $titlepicto); @@ -806,7 +806,7 @@ if ($id) print ""; // Modify link - if ($canbemodified) print ''; + if ($canbemodified) print ''; else print ''; // Delete link diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index eccb7450594..e34ce8094dd 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -657,7 +657,7 @@ if ($id) print ""; // Modify link - if ($canbemodified) print ''; + if ($canbemodified) print ''; else print ''; // Delete link diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index c6c76a57621..e32e47b169d 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -362,7 +362,6 @@ if ($result) print ''; print ''; print ''; - print ''; print load_fiche_titre($langs->trans("ProductsBinding"), '', 'title_accountancy'); print '
'; @@ -412,7 +411,7 @@ if ($result) //print '
'.$buttonsave.'
'; $texte = $langs->trans("ListOfProductsServices"); - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $buttonsave, $num, $nbtotalofrecords, '', 0, '', '', $limit); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $buttonsave, $num, $nbtotalofrecords, '', 0, '', '', $limit, 0, 0, 1); print '
'; print '
'.img_object($langs->trans('ShowPayment'), 'payment').' '.$objp->pid.''; + print $paymentfournstatic->getNomUrl(1); + print '
'.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").'
'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").''.$objp->tva_intra.''; + print ''; $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; $shelp = ''; if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC"); elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport"); - $s .= ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : $langs->trans("NotDefined")); + $s .= ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : ''.$langs->trans("NotDefined").''); print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); if ($objp->product_id > 0) { @@ -583,7 +583,7 @@ if ($result) { elseif ($suggestedaccountingaccountfor == 'eecwithvat') $shelp = $langs->trans("SaleEECWithVAT"); elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') $shelp = $langs->trans("SaleEECWithoutVATNumber"); elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport"); - $s .= (empty($objp->code_sell_p) ? $langs->trans("NotDefined") : length_accountg($objp->code_sell_p)); + $s .= (empty($objp->code_sell_p) ? ''.$langs->trans("NotDefined").'' : length_accountg($objp->code_sell_p)); print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); } print ''.$objp->tva_intra.''; - $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; + print ''; + $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; $shelp = ''; if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC"); elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport"); - $s .= ($objp->code_buy_l > 0 ? length_accountg($objp->code_buy_l) : $langs->trans("NotDefined")); + $s .= ($objp->code_buy_l > 0 ? length_accountg($objp->code_buy_l) : ''.$langs->trans("NotDefined").''); print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); if ($objp->product_id > 0) { print '
'; - $s = ''.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; + $s = ''.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; $shelp = ''; if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC"); elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport"); - $s .= (empty($objp->code_buy_p) ? $langs->trans("NotDefined") : length_accountg($objp->code_buy_p)); + $s .= (empty($objp->code_buy_p) ? ''.$langs->trans("NotDefined").'' : length_accountg($objp->code_buy_p)); print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); } print '
'; if ($user->rights->accounting->chartofaccount) { - print ''; + print ''; print img_edit(); print ''; print ' '; - print ''; + print ''; print img_delete(); print ''; } diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 0ab42d582d1..b31cd23dfa4 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -696,7 +696,7 @@ if ($id) print "'.img_edit().''.img_edit().' '.img_edit().''.img_edit().' '.img_edit().''.img_edit().' 
'; diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index bc0cf66a938..4d64c7666d8 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -88,7 +88,7 @@ if ($conf->accounting->enabled) } - print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy', 0, '', '', $showtutorial); + print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'title_accountancy', 0, '', '', $showtutorial); print '
'; // hideobject is to start hidden print "
\n"; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index c100868bd63..7daf526c658 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -554,7 +554,7 @@ if ($result) { // Found accounts print '
"; // Modify link - if ($canbemodified) print ''; + if ($canbemodified) print ''; else print ''; // Delete link diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 17d2becfc19..44be66a2218 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -227,17 +227,15 @@ print "\n"; if ($modecompta == 'BOOKKEEPING') { $predefinedgroupwhere = "("; - //$predefinedgroupwhere.= " (pcg_type = 'EXPENSE' and pcg_subtype in ('PRODUCT','SERVICE'))"; $predefinedgroupwhere .= " (pcg_type = 'EXPENSE')"; $predefinedgroupwhere .= " OR "; - //$predefinedgroupwhere.= " (pcg_type = 'INCOME' and pcg_subtype in ('PRODUCT','SERVICE'))"; $predefinedgroupwhere .= " (pcg_type = 'INCOME')"; $predefinedgroupwhere .= ")"; $charofaccountstring = $conf->global->CHARTOFACCOUNTS; $charofaccountstring = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version'); - $sql = "SELECT f.thirdparty_code as name, -1 as socid, aa.pcg_type, aa.pcg_subtype, sum(f.credit - f.debit) as amount"; + $sql = "SELECT f.thirdparty_code as name, -1 as socid, aa.pcg_type, SUM(f.credit - f.debit) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as f"; $sql .= ", ".MAIN_DB_PREFIX."accounting_account as aa"; $sql .= " WHERE f.numero_compte = aa.account_number"; @@ -271,7 +269,7 @@ if ($modecompta == 'BOOKKEEPING') print ''; print ''; - print '\n"; + print '\n"; print '\n"; print "\n"; @@ -282,7 +280,7 @@ if ($modecompta == 'BOOKKEEPING') // This make 14 calls for each detail of account (NP, N and month m) if ($showaccountdetail != 'no') { - $tmppredefinedgroupwhere = "pcg_type = '".$db->escape($objp->pcg_type)."' AND pcg_subtype = '".$db->escape($objp->pcg_subtype)."'"; + $tmppredefinedgroupwhere = "pcg_type = '".$db->escape($objp->pcg_type)."'"; $tmppredefinedgroupwhere .= " AND fk_pcg_version = '".$db->escape($charofaccountstring)."'"; //$tmppredefinedgroupwhere.= " AND thirdparty_code = '".$db->escape($objp->name)."'"; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 13727fe8669..2f49c678d09 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3141,7 +3141,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ if (empty($srconly) && in_array($pictowithouttext, array( '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', - 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', 'cash-register', 'check', 'close_title', 'company', 'contact', 'cubes', + 'accountancy', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', 'cash-register', 'check', 'close_title', 'company', 'contact', 'cubes', 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', 'language', 'list', 'listlight', 'lot', 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'stock', @@ -3160,7 +3160,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', - 'home', 'companies', 'products', 'commercial', 'invoicing', 'accountancy', 'preview', 'project', 'projectpub', 'hrm', 'members', 'ticket', 'generic', + 'home', 'companies', 'products', 'commercial', 'invoicing', 'preview', 'project', 'projectpub', 'hrm', 'members', 'ticket', 'generic', 'error', 'warning', 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda' ) @@ -3178,9 +3178,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $pictowithouttext = str_replace('object_', '', $pictowithouttext); $arrayconvpictotofa = array( - 'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'bom'=>'cubes', + 'account'=>'university', 'accountancy'=>'money-check-alt', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'bom'=>'cubes', 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'donation'=>'file-medical', 'dynamicprice'=>'hand-holding-usd', - 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt', + 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', 'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', 'email'=>'at', @@ -3249,7 +3249,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // Add CSS $arrayconvpictotomorcess = array( - 'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'bill'=>'bg-infobox-commande', + 'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'accountancy'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'bill'=>'bg-infobox-commande', 'cash-register'=>'bg-infobox-bank_account', 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'donation'=>'bg-infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action', 'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat', diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 52c5f15abd3..ce2de03a762 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2355,7 +2355,7 @@ class FactureFournisseur extends CommonInvoice if ($this->type == self::TYPE_CREDIT_NOTE) $picto .= 'a'; // Credit note if ($this->type == self::TYPE_DEPOSIT) $picto .= 'd'; // Deposit invoice - $label = ''.$langs->trans("ShowSupplierInvoice").''; + $label = ''.$langs->trans("SupplierInvoice").''; if (!empty($this->ref)) $label .= '
'.$langs->trans('Ref').': '.$this->ref; if (!empty($this->ref_supplier)) From 38f2aad0c6ab4749dac22863ee04b91c432fefae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 03:19:30 +0200 Subject: [PATCH 086/456] Debug asset module --- htdocs/asset/card.php | 76 +++++++++++++------ htdocs/asset/class/asset.class.php | 8 +- htdocs/core/menus/standard/eldy.lib.php | 2 +- htdocs/core/modules/modAsset.class.php | 2 +- .../modulebuilder/template/myobject_card.php | 4 +- 5 files changed, 60 insertions(+), 32 deletions(-) diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index ddb2eaed9c4..0a604c023ec 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -34,15 +34,18 @@ $langs->loadLangs(array("asset")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // Initialize technical objects $object = new Asset($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->asset->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('assetcard', 'globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -59,23 +62,20 @@ foreach ($object->fields as $key => $val) if (empty($action) && empty($id) && empty($ref)) $action = 'view'; -// Security check - Protection if external user -//if ($user->socid > 0) accessforbidden(); -//if ($user->socid > 0) $socid = $user->socid; -//$result = restrictedArea($user, 'asset', $id); - // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. + +$permissiontoread = $user->rights->asset->read; +$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$permissiontodelete = $user->rights->asset->delete || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DRAFT); $permissionnote = $user->rights->asset->write; // Used by the include of actions_setnotes.inc.php $permissiondellink = $user->rights->asset->write; // Used by the include of actions_dellink.inc.php -$permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +$upload_dir = $conf->mymodule->multidir_output[isset($object->entity) ? $object->entity : 1]; /* * Actions - * - * Put here all code to do according to value of "action" parameter */ $parameters = array(); @@ -86,16 +86,35 @@ if (empty($reshook)) { $error = 0; - $permissiontoadd = $user->rights->asset->create; - $permissiontodelete = $user->rights->asset->delete; $backurlforlist = dol_buildpath('/asset/list.php', 1); // Actions cancel, add, update or delete include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + + // Actions when linking object each other + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; + // Actions when printing a doc from card include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + // Action to move up and down lines of object + //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; + + // Action to build doc + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + + if ($action == 'set_thirdparty' && $permissiontoadd) + { + $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY'); + } + if ($action == 'classin' && $permissiontoadd) + { + $object->setProject(GETPOST('projectid', 'int')); + } + // Actions to send emails $triggersendname = 'ASSET_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO'; @@ -143,11 +162,12 @@ if ($action == 'create') print ''; print ''; print ''; - print ''; - + if ($backtopage) print ''; + if ($backtopageforcancel) print ''; + dol_fiche_head(array(), ''); - print '
'; - $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; + $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; $shelp = ''; if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC"); elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport"); @@ -563,7 +563,7 @@ if ($result) { if ($objp->product_id > 0) { print '
'; - $s = ''.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; + $s = ''.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; $shelp = ''; if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC"); elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport"); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 7d12ffca433..3c19121d424 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1718,7 +1718,7 @@ if ($id) print "
'.img_edit().''.img_edit().' 
 '.$objp->pcg_type.($objp->pcg_subtype != 'XXXXXX' ? ' - '.$objp->pcg_subtype : '').($objp->name ? ' ('.$objp->name.')' : '')."'.$objp->pcg_type.($objp->name ? ' ('.$objp->name.')' : '')."'.price($objp->amount)."
'."\n"; + print '
'."\n"; // Common attributes include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_add.tpl.php'; @@ -166,6 +186,8 @@ if ($action == 'create') print ''; print ''; + + //dol_set_focus('input[name="ref"]'); } // Part to edit record @@ -178,10 +200,12 @@ if (($id || $ref) && $action == 'edit') print ''; print ''; print ''; - + if ($backtopage) print ''; + if ($backtopageforcancel) print ''; + dol_fiche_head(); - print '
'."\n"; + print '
'."\n"; // Common attributes include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; @@ -206,7 +230,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $res = $object->fetch_optionals(); $head = asset_prepare_head($object); - dol_fiche_head($head, 'card', $langs->trans("Asset"), -1, 'generic'); + dol_fiche_head($head, 'card', $langs->trans("Asset"), -1, $object->picto); $formconfirm = ''; @@ -255,10 +279,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'."\n"; // Common attributes - //$keyforbreak='fieldkeytoswithonsecondcolumn'; + //$keyforbreak='fieldkeytoswitchonsecondcolumn'; // We change column just after this field + //unset($object->fields['fk_project']); // Hide field already shown in banner + //unset($object->fields['fk_soc']); // Hide field already shown in banner include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; - // Other attributes + // Other attributes. Fields from hook formObjectOptions and Extrafields. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; print '
'; @@ -266,7 +292,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
'; print ''; - print '

'; + print '
'; dol_fiche_end(); @@ -349,14 +375,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } //Select mail models is same action as presend - /* if (GETPOST('modelselected')) $action = 'presend'; // Presend form - $modelmail='inventory'; + /* + $modelmail='asset'; $defaulttopic='InformationMessage'; - $diroutput = $conf->product->dir_output.'/inventory'; - $trackid = 'stockinv'.$object->id; + $diroutput = $conf->asset->dir_output.'/asset'; + $trackid = 'asset'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; */ diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 6fe78edad60..7c9d91d79e7 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -77,12 +77,12 @@ class Asset extends CommonObject */ public $fields = array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), - 'ref' => array('type'=>'varchar(10)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object",), - 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>-1, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), - 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>"Help text",), + 'ref' => array('type'=>'varchar(10)', 'label'=>'Ref', 'visible'=>1, 'enabled'=>1, 'position'=>10, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", 'showoncombobox'=>1), + 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1), 'amount_ht' => array('type'=>'double(24,8)', 'label'=>'AmountHTShort', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), 'amount_vat' => array('type'=>'double(24,8)', 'label'=>'AmountVAT', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1, 'isameasure'=>'1', 'help'=>"Help text",), - 'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty",), + 'fk_asset_type' => array('type'=>'integer:AssetType:asset/class/asset_type.class.php', 'label'=>'AssetsType', 'visible'=>1, 'enabled'=>1, 'position'=>50, 'notnull'=>1, 'index'=>1, 'searchall'=>1, 'help'=>"LinkToThirparty",), 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>90, 'notnull'=>-1,), 'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>-1,), 'note_private' => array('type'=>'html', 'label'=>'NotePrivate', 'visible'=>-1, 'enabled'=>1, 'position'=>92, 'notnull'=>-1,), diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index dba6dd2f4a4..9f32435ef66 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1447,7 +1447,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/asset/list.php?leftmenu=asset&mainmenu=accountancy", $langs->trans("MenuListAssets"), 1, $user->rights->asset->read); $newmenu->add("/asset/type.php?leftmenu=asset_type", $langs->trans("MenuTypeAssets"), 1, $user->rights->asset->read, '', $mainmenu, 'asset_type'); if ($usemenuhider || empty($leftmenu) || preg_match('/asset_type/', $leftmenu)) { - $newmenu->add("/asset/type.php?leftmenu=asset_type&action=create", $langs->trans("MenuNewTypeAssets"), 2, $user->rights->asset->configurer); + $newmenu->add("/asset/type.php?leftmenu=asset_type&action=create", $langs->trans("MenuNewTypeAssets"), 2, (empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->asset->write) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->asset->setup_advance)); $newmenu->add("/asset/type.php?leftmenu=asset_type", $langs->trans("MenuListTypeAssets"), 2, $user->rights->asset->read); } } diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index 06e8521b4e5..4feb38536ce 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -200,7 +200,7 @@ class modAsset extends DolibarrModules $this->rights[$r][1] = 'Setup types of asset'; // Permission label $this->rights[$r][2] = 'w'; $this->rights[$r][3] = 0; // Permission by default for new user (0/1) - $this->rights[$r][4] = 'advanced_configurer'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2) + $this->rights[$r][4] = 'setup_advance'; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2) $this->rights[$r][5] = ''; // In php code, permission will be checked by test if ($user->rights->asset->level1->level2) // Menus diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index e299fec88c5..50fcd2629a7 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -182,7 +182,9 @@ if (empty($reshook)) $form = new Form($db); $formfile = new FormFile($db); -llxHeader('', $langs->trans('MyObject'), ''); +$title = $langs->trans("MyObject"); +$help_url = ''; +llxHeader('', $title, $help_url); // Example : Adding jquery code print ''; } elseif (GETPOST('action') == 'confirm_delete' && GETPOST('confirm') == 'yes' && GETPOST('socid') > 0) { // La suppression n'a pas été possible - require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $societe = new Societe($this->db); $societe->fetch(GETPOST('socid')); // On vérifie si il est utilisé if ((in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $societe->typent_id == 8) && $societe->isObjectUsed(GETPOST('socid'))) { - require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $form = new Form($this->db); - echo $form->formconfirm($_SERVER["PHP_SELF"] . "?socid=" . GETPOST('socid'), substr($langs->trans("DATAPOLICIES_POPUP_ANONYME_TITLE"), 0, strlen($langs->trans("DATAPOLICIES_POPUP_ANONYME_TITLE")) - 2), $langs->trans("DATAPOLICIES_POPUP_ANONYME_TEXTE"), 'anonymiser', '', '', 1); + echo $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".GETPOST('socid'), substr($langs->trans("DATAPOLICIES_POPUP_ANONYME_TITLE"), 0, strlen($langs->trans("DATAPOLICIES_POPUP_ANONYME_TITLE")) - 2), $langs->trans("DATAPOLICIES_POPUP_ANONYME_TEXTE"), 'anonymiser', '', '', 1); } } if (GETPOST('socid')) { - require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php'; + require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $societe = new Societe($this->db); $societe->fetch(GETPOST('socid')); if (!in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) && $societe->typent_id != 8) { - require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $jsscript .= ''; } } diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index b6bc5b15a91..e653ab5d3ca 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -1046,7 +1046,7 @@ class Expedition extends CommonObject } } $line->entrepot_id = $linebatch->entrepot_id; - $line->origin_line_id = $dbatch['ix_l']; // deprecated + $line->origin_line_id = $dbatch['ix_l']; // deprecated $line->fk_origin_line = $dbatch['ix_l']; $line->qty = $dbatch['qty']; $line->detail_batch = $tab; diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index 139d87162c6..1f20965fab3 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -490,16 +490,16 @@ class SupplierInvoices extends DolibarrApi */ public function getLines($id) { - if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { throw new RestException(401); } $result = $this->invoice->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Supplier invoice not found'); } - if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $this->invoice->fetch_lines(); @@ -522,16 +522,16 @@ class SupplierInvoices extends DolibarrApi */ public function postLine($id, $request_data = null) { - if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { throw new RestException(401); } $result = $this->invoice->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Supplier invoice not found'); } - if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $request_data = (object) $request_data; @@ -586,16 +586,16 @@ class SupplierInvoices extends DolibarrApi */ public function putLine($id, $lineid, $request_data = null) { - if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { throw new RestException(401); } $result = $this->invoice->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Supplier invoice not found'); } - if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } $request_data = (object) $request_data; @@ -647,20 +647,20 @@ class SupplierInvoices extends DolibarrApi */ public function deleteLine($id, $lineid) { - if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { throw new RestException(401); } $result = $this->invoice->fetch($id); - if( ! $result ) { + if (!$result) { throw new RestException(404, 'Supplier invoice not found'); } - if(empty($lineid)) { + if (empty($lineid)) { throw new RestException(400, 'Line ID is mandatory'); } - if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index b809a9fcd37..19ea5880346 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -211,9 +211,9 @@ class CommandeFournisseurDispatch extends CommonObject } // Create extrafields - if (! $error) + if (!$error) { - $result=$this->insertExtraFields(); + $result = $this->insertExtraFields(); if ($result < 0) $error++; } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index ce2de03a762..7bc56994fdb 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -977,9 +977,9 @@ class FactureFournisseur extends CommonInvoice } } - if (! $error) + if (!$error) { - $result=$this->insertExtraFields(); + $result = $this->insertExtraFields(); if ($result < 0) { $error++; @@ -3150,9 +3150,9 @@ class SupplierInvoiceLine extends CommonObjectLine $this->deleteObjectLinked(); // Remove extrafields - if (! $error) + if (!$error) { - $result=$this->deleteExtraFields(); + $result = $this->deleteExtraFields(); if ($result < 0) { $error++; diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 9d81bca42ce..a5e6b9d3377 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -566,21 +566,21 @@ if (!$error && $db->connected && $action == "set") $error++; } - if (! $error) + if (!$error) { if ($db->connected) { $resultbis = 1; // Create user - $result=$db->DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); + $result = $db->DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); // Create user bis if ($databasefortest == 'mysql') { - if (! in_array($dolibarr_main_db_host, array('127.0.0.1', '::1', 'localhost', 'localhost.local'))) + if (!in_array($dolibarr_main_db_host, array('127.0.0.1', '::1', 'localhost', 'localhost.local'))) { - $resultbis=$db->DDLCreateUser('%', $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); + $resultbis = $db->DDLCreateUser('%', $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); } } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 86dd2f128e3..6533b4bfe54 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2351,7 +2351,7 @@ function main_area($title = '') if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print info_admin($langs->trans("WarningYouAreInMaintenanceMode", $conf->global->MAIN_ONLY_LOGIN_ALLOWED)); // Permit to add user company information on each printed document by set SHOW_SOCINFO_ON_PRINT - if (! empty($conf->global->SHOW_SOCINFO_ON_PRINT) && GETPOST('optioncss', 'aZ09') == 'print' && empty(GETPOST('disable_show_socinfo_on_print', 'az09'))) + if (!empty($conf->global->SHOW_SOCINFO_ON_PRINT) && GETPOST('optioncss', 'aZ09') == 'print' && empty(GETPOST('disable_show_socinfo_on_print', 'az09'))) { global $hookmanager; $hookmanager->initHooks(array('showsocinfoonprint')); diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 336c6b85fa4..e8dd338f4cd 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -4737,7 +4737,7 @@ class Product extends CommonObject $op[1] = "-".trim($nbpiece); $movementstock = new MouvementStock($this->db); - $movementstock->setOrigin($origin_element, $origin_id); // Set ->origin and ->origin->id + $movementstock->setOrigin($origin_element, $origin_id); // Set ->origin and ->origin->id $result = $movementstock->_create($user, $this->id, $id_entrepot, $op[$movement], $movement, $price, $label, $inventorycode); if ($result >= 0) { diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 54b70528f9b..7cc5d3966c1 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -780,33 +780,33 @@ SCRIPT; if (empty($rowid)) { foreach ($extralabels as $key => $value) { if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { - if(!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); + if (!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); print 'attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key])); else print $langs->trans($value); - print ''.$extrafields->showInputField($key, GETPOSTISSET('options_' . $key) ? $extrafield_values['options_' . $key] : '', '', '', '', '', 0, 'product_fournisseur_price').''; + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : '', '', '', '', '', 0, 'product_fournisseur_price').''; } } } else { $sql = "SELECT"; $sql .= " fk_object"; foreach ($extralabels as $key => $value) { - $sql .= ", " . $key; + $sql .= ", ".$key; } - $sql .= " FROM " . MAIN_DB_PREFIX . "product_fournisseur_price_extrafields"; - $sql .= " WHERE fk_object = " . $rowid; + $sql .= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price_extrafields"; + $sql .= " WHERE fk_object = ".$rowid; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); foreach ($extralabels as $key => $value) { if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && ($extrafields->attributes["product_fournisseur_price"]['list'][$key] == 1 || $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 3 || ($action == "update_price" && $extrafields->attributes["product_fournisseur_price"]['list'][$key] == 4))) { - if(!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); + if (!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); print 'attributes["product_fournisseur_price"]['required'][$key] ? ' class="fieldrequired"' : '').'>'; if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) print $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key])); else print $langs->trans($value); - print ''.$extrafields->showInputField($key, GETPOSTISSET('options_' . $key) ? $extrafield_values['options_' . $key] : $obj->{$key}, '', '', '', '', 0, 'product_fournisseur_price'); + print ''.$extrafields->showInputField($key, GETPOSTISSET('options_'.$key) ? $extrafield_values['options_'.$key] : $obj->{$key}, '', '', '', '', 0, 'product_fournisseur_price'); print ''; } @@ -912,7 +912,7 @@ SCRIPT; foreach ($extralabels as $key => $value) { // Show field if not hidden if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { - if(!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); + if (!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) $extratitle = $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key])); else $extratitle = $langs->trans($value); print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index 9f764f7d412..510a6469482 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -112,7 +112,7 @@ class Entrepot extends CommonObject /** * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ - public $fields=array( + public $fields = array( 'rowid' =>array('type'=>'integer', 'label'=>'ID', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>10), 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'showoncombobox'=>1, 'position'=>25), 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>30), @@ -184,7 +184,7 @@ class Entrepot extends CommonObject $error = 0; - if (empty($this->label)) $this->label = $this->libelle; // For backward compatibility + if (empty($this->label)) $this->label = $this->libelle; // For backward compatibility $this->label = trim($this->label); if ($this->label == '') diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 06d3e46728f..15b92c83acc 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -97,11 +97,11 @@ $fieldstosearchall = array( ); // Initialize array of search criterias -$search_all=trim(GETPOST("search_all", 'alpha')); -$search=array(); -foreach($object->fields as $key => $val) +$search_all = trim(GETPOST("search_all", 'alpha')); +$search = array(); +foreach ($object->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key]=GETPOST('search_'.$key, 'alpha'); + if (GETPOST('search_'.$key, 'alpha') !== '') $search[$key] = GETPOST('search_'.$key, 'alpha'); } // Definition of fields for list @@ -110,7 +110,7 @@ $arrayfields = array( 'estimatedvalue'=>array('type'=>'float', 'label'=>'EstimatedStockValue', 'enabled'=>1, 'visible'=>-2, 'position'=>71), 'estimatedstockvaluesell'=>array('type'=>'float', 'label'=>'EstimatedStockValueSell', 'enabled'=>1, 'visible'=>-2, 'position'=>72), ); -foreach($object->fields as $key => $val) +foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); @@ -241,20 +241,20 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -$sql.= " GROUP BY "; -foreach($object->fields as $key => $val) +$sql .= " GROUP BY "; +foreach ($object->fields as $key => $val) { - $sql.='t.'.$key.', '; + $sql .= 't.'.$key.', '; } // Add fields from extrafields -if (! empty($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); +if (!empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); } // Add where from hooks -$parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListGroupBy', $parameters); // Note that $action and $object may have been modified by hook -$sql.=$hookmanager->resPrint; -$sql=preg_replace('/,\s*$/', '', $sql); +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; +$sql = preg_replace('/,\s*$/', '', $sql); $totalnboflines = 0; $result = $db->query($sql); if ($result) @@ -408,7 +408,7 @@ print ''; foreach ($object->fields as $key => $val) { - if($key == 'statut'){ continue; } + if ($key == 'statut') { continue; } $cssforfield = (empty($val['css']) ? '' : $val['css']); if ($key == 'status') $cssforfield .= ($cssforfield ? ' ' : '').'center'; elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; @@ -421,7 +421,7 @@ foreach ($object->fields as $key => $val) elseif (strpos($val['type'], 'integer:') === 0 || strpos($val['type'], 'sellist:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); } - elseif (! preg_match('/^(date|timestamp)/', $val['type'])) print ''; + elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; print ''; } } @@ -466,7 +466,7 @@ print ''; foreach ($object->fields as $key => $val) { - if($key == 'statut'){ continue; } + if ($key == 'statut') { continue; } $cssforfield = (empty($val['css']) ? '' : $val['css']); if ($key == 'status') $cssforfield .= ($cssforfield ? ' ' : '').'center'; elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; @@ -525,7 +525,7 @@ if ($num) $warehouse->fk_parent = $obj->fk_parent; $warehouse->statut = $obj->statut; - foreach ($object->fields as $key => $val){ + foreach ($object->fields as $key => $val) { $warehouse->{$key} = $obj->{$key}; } @@ -535,7 +535,7 @@ if ($num) foreach ($warehouse->fields as $key => $val) { - if($key == 'statut'){ continue; } + if ($key == 'statut') { continue; } $cssforfield = (empty($val['css']) ? '' : $val['css']); if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; elseif ($key == 'status') $cssforfield .= ($cssforfield ? ' ' : '').'center'; @@ -562,7 +562,7 @@ if ($num) // Stock qty if (!empty($arrayfields["stockqty"]['checked'])) { - print '' . price2num($obj->stockqty, 5) . ''; + print ''.price2num($obj->stockqty, 5).''; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'stockqty'; } @@ -599,7 +599,7 @@ if ($num) // Status if (!empty($arrayfields['t.statut']['checked'])) { - print '' . $warehouse->LibStatut($obj->statut, 5) . ''; + print ''.$warehouse->LibStatut($obj->statut, 5).''; if (!$i) $totalarray['nbfield']++; } diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index df6d5b3a13f..3d6903065ab 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -116,7 +116,7 @@ if ($resql) $listofoppstatus[$objp->rowid] = $objp->percent; $listofopplabel[$objp->rowid] = $objp->label; $listofoppcode[$objp->rowid] = $objp->code; - switch($objp->code) { + switch ($objp->code) { case 'PROSP': $colorseries[$objp->rowid] = "-".$badgeStatus0; break; diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 26b00bae2a9..6f60904c67b 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -713,7 +713,7 @@ while ($i < min($num, $limit)) $object->public = $obj->public; $object->ref = $obj->ref; $object->datee = $db->jdate($obj->date_end); - $object->statut = $obj->status; // deprecated + $object->statut = $obj->status; // deprecated $object->status = $obj->status; $object->public = $obj->public; $object->opp_status = $obj->fk_opp_status; diff --git a/htdocs/public/stripe/ipn.php b/htdocs/public/stripe/ipn.php index 8a3bb00e765..4291cb6f834 100644 --- a/htdocs/public/stripe/ipn.php +++ b/htdocs/public/stripe/ipn.php @@ -111,54 +111,54 @@ $user = new User($db); $user->fetch($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS); $user->getrights(); -if (! empty($conf->multicompany->enabled) && ! empty($conf->stripeconnect->enabled) && is_object($mc)) +if (!empty($conf->multicompany->enabled) && !empty($conf->stripeconnect->enabled) && is_object($mc)) { $sql = "SELECT entity"; - $sql.= " FROM ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " WHERE service = '".$db->escape($service)."' and tokenstring = '%".$db->escape($event->account)."%'"; + $sql .= " FROM ".MAIN_DB_PREFIX."oauth_token"; + $sql .= " WHERE service = '".$db->escape($service)."' and tokenstring = '%".$db->escape($event->account)."%'"; - dol_syslog(get_class($db) . "::fetch", LOG_DEBUG); + dol_syslog(get_class($db)."::fetch", LOG_DEBUG); $result = $db->query($sql); if ($result) { if ($db->num_rows($result)) { $obj = $db->fetch_object($result); - $key=$obj->entity; + $key = $obj->entity; } else { - $key=1; + $key = 1; } } else { - $key=1; + $key = 1; } - $ret=$mc->switchEntity($key); - if (! $res && file_exists("../../main.inc.php")) $res=@include "../../main.inc.php"; - if (! $res) die("Include of main fails"); + $ret = $mc->switchEntity($key); + if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php"; + if (!$res) die("Include of main fails"); } // list of action -$stripe=new Stripe($db); +$stripe = new Stripe($db); // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; -if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; dol_syslog("***** Stripe IPN was called with event->type = ".$event->type); if ($event->type == 'payout.created') { - $error=0; + $error = 0; - $result=dolibarr_set_const($db, $service."_NEXTPAYOUT", date('Y-m-d H:i:s', $event->data->object->arrival_date), 'chaine', 0, '', $conf->entity); + $result = dolibarr_set_const($db, $service."_NEXTPAYOUT", date('Y-m-d H:i:s', $event->data->object->arrival_date), 'chaine', 0, '', $conf->entity); if ($result > 0) { $subject = $societeName.' - [NOTIFICATION] Stripe payout scheduled'; if (!empty($user->email)) { - $sendto = dolGetFirstLastname($user->firstname, $user->lastname) . " <".$user->email.">"; + $sendto = dolGetFirstLastname($user->firstname, $user->lastname)." <".$user->email.">"; } else { $sendto = $conf->global->MAIN_INFO_SOCIETE_MAIL.'" <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; } diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index b4e5d0633c7..dbf6e4b9e29 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -306,9 +306,9 @@ class Reception extends CommonObject } // Create extrafields - if (! $error) + if (!$error) { - $result=$this->insertExtraFields(); + $result = $this->insertExtraFields(); if ($result < 0) $error++; } diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index fd89ba5dd2d..fd6e7a3ec95 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -58,7 +58,7 @@ $optioncss = GETPOST('optioncss', 'alpha'); $filtre = GETPOST("filtre", 'none'); -if (! GETPOST('typeid', 'int')) +if (!GETPOST('typeid', 'int')) { $newfiltre = str_replace('filtre=', '', $filtre); $filterarray = explode('-', $newfiltre); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index c35b17fe4fa..62140ba5d89 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -3623,7 +3623,7 @@ class Societe extends CommonObject $this->phone = $member->phone; // Prof phone $this->email = $member->email; $this->socialnetworks = $member->socialnetworks; - $this->entity=$member->entity; + $this->entity = $member->entity; $this->client = 1; // A member is a customer by default $this->code_client = ($customercode ? $customercode : -1); diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php index c12526bbe85..7e5b6aaf531 100644 --- a/htdocs/support/inc.php +++ b/htdocs/support/inc.php @@ -66,87 +66,87 @@ if (!file_exists($conffile)) // Load conf file if it is already defined -if (! defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > 8) // Test on filesize is to ensure that conf file is more that an empty template with just 8) // Test on filesize is to ensure that conf file is more that an empty template with just global->MAIN_LOGTOHTML = 1; // Define prefix -if (! isset($dolibarr_main_db_prefix) || ! $dolibarr_main_db_prefix) $dolibarr_main_db_prefix='llx_'; -define('MAIN_DB_PREFIX', (isset($dolibarr_main_db_prefix)?$dolibarr_main_db_prefix:'')); +if (!isset($dolibarr_main_db_prefix) || !$dolibarr_main_db_prefix) $dolibarr_main_db_prefix = 'llx_'; +define('MAIN_DB_PREFIX', (isset($dolibarr_main_db_prefix) ? $dolibarr_main_db_prefix : '')); -define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir -define('DOL_DATA_ROOT', (isset($dolibarr_main_data_root)?$dolibarr_main_data_root:'')); -define('DOL_MAIN_URL_ROOT', (isset($dolibarr_main_url_root)?$dolibarr_main_url_root:'')); // URL relative root -$uri=preg_replace('/^http(s?):\/\//i', '', constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http* -$suburi = strstr($uri, '/'); // $suburi contains url without domain -if ($suburi == '/') $suburi = ''; // If $suburi is /, it is now '' -define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...) +define('DOL_CLASS_PATH', 'class/'); // Filsystem path to class dir +define('DOL_DATA_ROOT', (isset($dolibarr_main_data_root) ? $dolibarr_main_data_root : '')); +define('DOL_MAIN_URL_ROOT', (isset($dolibarr_main_url_root) ? $dolibarr_main_url_root : '')); // URL relative root +$uri = preg_replace('/^http(s?):\/\//i', '', constant('DOL_MAIN_URL_ROOT')); // $uri contains url without http* +$suburi = strstr($uri, '/'); // $suburi contains url without domain +if ($suburi == '/') $suburi = ''; // If $suburi is /, it is now '' +define('DOL_URL_ROOT', $suburi); // URL relative root ('', '/dolibarr', ...) -if (empty($character_set_client)) $character_set_client="UTF-8"; -$conf->file->character_set_client=strtoupper($character_set_client); -if (empty($dolibarr_main_db_character_set)) $dolibarr_main_db_character_set=($conf->db->type=='mysql'?'latin1':''); // Old installation -$conf->db->character_set=$dolibarr_main_db_character_set; -if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation=($conf->db->type=='mysql'?'latin1_swedish_ci':''); // Old installation -$conf->db->dolibarr_main_db_collation=$dolibarr_main_db_collation; -if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption=0; +if (empty($character_set_client)) $character_set_client = "UTF-8"; +$conf->file->character_set_client = strtoupper($character_set_client); +if (empty($dolibarr_main_db_character_set)) $dolibarr_main_db_character_set = ($conf->db->type == 'mysql' ? 'latin1' : ''); // Old installation +$conf->db->character_set = $dolibarr_main_db_character_set; +if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation = ($conf->db->type == 'mysql' ? 'latin1_swedish_ci' : ''); // Old installation +$conf->db->dolibarr_main_db_collation = $dolibarr_main_db_collation; +if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption = 0; $conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption; -if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey=''; +if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey = ''; $conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey; -if (empty($conf->db->user)) $conf->db->user=''; +if (empty($conf->db->user)) $conf->db->user = ''; // Defini objet langs diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index 24061a9e949..5d06973abf6 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -294,9 +294,9 @@ print ''."\n"; //print "xx".$conf->global->MAIN_USE_ADVANCED_PERMS; $sql = "SELECT r.id, r.libelle as label, r.module, r.perms, r.subperms, r.module_position"; $sql .= " FROM ".MAIN_DB_PREFIX."rights_def as r"; -$sql .= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous" -$sql .= " AND r.entity = " . $entity; -if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled +$sql .= " WHERE r.libelle NOT LIKE 'tou%'"; // On ignore droits "tous" +$sql .= " AND r.entity = ".$entity; +if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) $sql .= " AND r.perms NOT LIKE '%_advance'"; // Hide advanced perms if option is not enabled $sql .= " ORDER BY r.family_position, r.module_position, r.module, r.id"; $result = $db->query($sql); From a040cd030569f06a84ea57aaeef31350dd5cbf44 Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Sat, 25 Apr 2020 15:19:47 +0200 Subject: [PATCH 095/456] Properly assign ->id in expensereport fetch_lines --- htdocs/expensereport/class/expensereport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index ab54a4f3915..048bdb5d493 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1049,7 +1049,7 @@ class ExpenseReport extends CommonObject $deplig = new ExpenseReportLine($this->db); $deplig->rowid = $objp->rowid; - $deplig->id = $objp->id; + $deplig->id = $objp->rowid; $deplig->comments = $objp->comments; $deplig->qty = $objp->qty; $deplig->value_unit = $objp->value_unit; From 3090eb578bddee0bb2980da54b5e1487bae60742 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 17:18:57 +0200 Subject: [PATCH 096/456] Look and feel v12 --- htdocs/admin/ihm.php | 19 +-- htdocs/commande/index.php | 1 + htdocs/compta/stats/cabyuser.php | 2 +- htdocs/compta/stats/casoc.php | 2 +- .../stats/supplier_turnover_by_thirdparty.php | 2 +- htdocs/core/class/html.formticket.class.php | 4 +- htdocs/core/lib/ajax.lib.php | 4 +- htdocs/core/lib/functions.lib.php | 10 +- htdocs/core/lib/project.lib.php | 2 +- htdocs/core/lib/usergroups.lib.php | 42 ++---- htdocs/margin/admin/margin.php | 16 +-- htdocs/projet/activity/index.php | 4 +- htdocs/projet/tasks.php | 2 +- htdocs/projet/tasks/contact.php | 8 +- htdocs/projet/tasks/list.php | 2 +- htdocs/projet/tasks/stats/index.php | 2 +- htdocs/supplier_proposal/list.php | 4 +- htdocs/ticket/class/ticket.class.php | 133 ++++-------------- htdocs/ticket/index.php | 20 ++- 19 files changed, 105 insertions(+), 174 deletions(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index ab67974c920..68ab91c4638 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -160,7 +160,6 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_HELPCENTER_DISABLELINK", GETPOST('MAIN_HELPCENTER_DISABLELINK', 'aZ09'), 'chaine', 0, '', 0); // Param for all entities dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'none')), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'none')), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities @@ -278,8 +277,10 @@ print ''; // Disable javascript and ajax print ''.$langs->trans("DisableJavascript").''; print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0); +print '     '.$langs->trans("DisableJavascriptNote").''; +print ''; +print ''; print ''; -print ' '; print ''; // Max size of lists @@ -392,6 +393,13 @@ print ''.$langs->trans("LoginPage print ' '; print ''; +// Hide helpcenter link on login page +print ''.$langs->trans("DisableLinkToHelpCenter").''; +print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0); +print ''; +print ' '; +print ''; + // Message on login page $substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user')); complete_substitutions_array($substitutionarray, $langs); @@ -407,13 +415,6 @@ $doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf $doleditor->Create(); print ''."\n"; -// Hide helpcenter link on login page -print ''.$langs->trans("DisableLinkToHelpCenter").''; -print $form->selectyesno('MAIN_HELPCENTER_DISABLELINK', isset($conf->global->MAIN_HELPCENTER_DISABLELINK) ? $conf->global->MAIN_HELPCENTER_DISABLELINK : 0, 1); -print ''; -print ' '; -print ''; - // Background print ''; print '
'; diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 4ca7086c132..13d67c942ed 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -106,6 +106,7 @@ if ($resql) $total = 0; $totalinprocess = 0; $dataseries = array(); + $colorseries = array(); $vals = array(); // -1=Canceled, 0=Draft, 1=Validated, 2=Accepted/On process, 3=Closed (Sent/Received, billed or not) while ($i < $num) diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 9a4ce5b0427..4d4f56a1354 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -462,7 +462,7 @@ if (count($amount)) { print ''; print ''.$langs->trans("Total").''; if ($modecompta != 'CREANCES-DETTES') { - print ''; + print ''; } else { print ''.price($catotal_ht).''; } diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index c563d8c5ae6..bec20998cfa 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -625,7 +625,7 @@ if (count($amount)) { print ' '; print ' '; if ($modecompta != 'CREANCES-DETTES') { - print ''; + print ''; } else { print ''.price($catotal_ht).''; } diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php index a9cdef94711..fcae12f744b 100644 --- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php +++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php @@ -574,7 +574,7 @@ if (count($amount)) { print ' '; print ' '; if ($modecompta != 'CREANCES-DETTES') { - print ''; + print ''; } else { print ''.price($catotal_ht).''; } diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 35e5d00bab8..da41a02491b 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -247,7 +247,7 @@ class FormTicket $doleditor->Create(); print ''; - // FK_USER_CREATE + // User of creation if ($this->withusercreate > 0 && $this->fk_user_create) { print ''.$langs->trans("CreatedBy").''; $langs->load("users"); @@ -270,6 +270,7 @@ class FormTicket print ''.$langs->trans("ThirdParty").''; $events = array(); $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); + print img_picto('', 'company', 'class="paddingright"'); print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events, 0, 'minwidth200'); print ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) { @@ -330,6 +331,7 @@ class FormTicket print ''.$langs->trans("Contact").''; // If no socid, set to -1 to avoid full contacts list $selectedCompany = ($this->withfromsocid > 0) ? $this->withfromsocid : -1; + print img_picto('', 'contact', 'class="paddingright"'); $nbofcontacts = $form->select_contacts($selectedCompany, $this->withfromcontactid, 'contactid', 3, '', '', 0, 'minwidth200'); print ' '; $formcompany->selectTypeContact($ticketstatic, '', 'type', 'external', '', 0, 'maginleftonly'); diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index c29b82f4329..329d177a33d 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -533,8 +533,8 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof '."\n"; $out .= ''; - $out .= ''.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).''; - $out .= ''.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort)).''; + $out .= ''.($revertonoff ?img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort)).''; + $out .= ''.($revertonoff ?img_picto($langs->trans("Disabled"), 'switch_off', '', false, 0, 0, '', '', $marginleftonlyshort) : img_picto($langs->trans("Enabled"), 'switch_on', '', false, 0, 0, '', '', $marginleftonlyshort)).''; $out .= "\n"; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 850879e262e..94a32ceacaf 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3146,20 +3146,20 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', 'intervention', 'language', 'list', 'listlight', 'lot', - 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'stock', + 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', 'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', - 'object_holiday', 'object_hrm', 'object_intervention', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', + 'object_holiday', 'object_hrm', 'object_intervention', 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', 'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', 'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'off', 'on', 'order', - 'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'resize', 'service', 'stats', 'trip', - 'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', + 'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', + 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'home', 'companies', 'products', 'commercial', 'invoicing', 'preview', 'project', 'projectpub', 'supplier_invoice', 'hrm', 'members', 'ticket', 'generic', @@ -3185,7 +3185,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', - 'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', + 'hrm'=>'umbrella-beach', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', 'email'=>'at', 'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'info-circle', 'generic'=>'file', 'holiday'=>'umbrella-beach', 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users', diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 428d976ab6d..581a7ebab74 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2241,7 +2241,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { if (!in_array('prospectionstatus', $hiddenfields)) { - print ''; + print ''; // Because color of prospection status has no meaning yet, it is used if hidden constant is set if (empty($conf->global->USE_COLOR_FOR_PROSPECTION_STATUS)) { $oppStatusCode = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code'); diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 5b7c923001b..d41965bdf1f 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -502,9 +502,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -549,9 +548,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': ffffff) '; + print '   '.$langs->trans("Default").': ffffff '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -597,9 +595,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -645,9 +642,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -671,9 +667,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default")); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; @@ -698,9 +693,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default")); } - print '   ('.$langs->trans("Default").': '.$default.') '; // $colorbacktitle1 in CSS + print '   '.$langs->trans("Default").': '.$default.' '; // $colorbacktitle1 in CSS print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; @@ -725,9 +719,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default")); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; @@ -754,9 +747,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -782,9 +774,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($color) print ''; else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -835,9 +826,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print $langs->trans("Default"); } } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -881,9 +871,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; } @@ -927,9 +916,8 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } else print $langs->trans("Default"); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); - print ''; print ''; print ''; } @@ -959,7 +947,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) print ' ('.$langs->trans("ForcedByGlobalSetup").')'; } } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc")); print ''; print ''; @@ -979,7 +967,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   wspan class="opacitymedium">'.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc")); print ''; print ''; @@ -1018,7 +1006,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print yn(0); } } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORCOLORBLINDDesc")); print ''; print ''; diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php index a2ac11abf7d..5b6cd01ba97 100644 --- a/htdocs/margin/admin/margin.php +++ b/htdocs/margin/admin/margin.php @@ -39,6 +39,7 @@ $action = GETPOST('action', 'alpha'); /* * Action */ + if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; @@ -107,6 +108,8 @@ if ($action == 'contact') * View */ +$form = new Form($db); + llxHeader('', $langs->trans("margesSetup")); @@ -118,16 +121,13 @@ $head = marges_admin_prepare_head(); dol_fiche_head($head, 'parameters', $langs->trans("Margins"), -1, 'margin'); -print load_fiche_titre($langs->trans("MemberMainOptions"), '', ''); print ''; print ''; -print ''; -print ''."\n"; +print ''; +print ''."\n"; print ''."\n"; print ''; -$form = new Form($db); - // GLOBAL DISCOUNT MANAGEMENT print ''; print ''; @@ -162,7 +162,7 @@ print ''; // DISPLAY MARGIN RATES print ''; print ''; -print ''; // DISPLAY MARK RATES print ''; print ''; -print ''; print ''; print ''; -print ''; - print ''; - print ''; - print ''; - print ''; diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 67131c29ef4..b7a3f33c117 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -441,7 +441,7 @@ else else $texthelp .= $langs->trans("TasksOnProjectsPublicDesc"); } -print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'project', 0, $newcardbutton, '', $limit, 0, 0, 1); +print_barre_liste($form->textwithpicto($title, $texthelp), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'projecttask', 0, $newcardbutton, '', $limit, 0, 0, 1); $topicmail = "Information"; $modelmail = "task"; diff --git a/htdocs/projet/tasks/stats/index.php b/htdocs/projet/tasks/stats/index.php index c758664d2c6..bbb275ef5df 100644 --- a/htdocs/projet/tasks/stats/index.php +++ b/htdocs/projet/tasks/stats/index.php @@ -67,7 +67,7 @@ llxHeader('', $langs->trans('Tasks')); $title = $langs->trans("TasksStatistics"); $dir = $conf->projet->dir_output.'/temp'; -print load_fiche_titre($title, '', 'project'); +print load_fiche_titre($title, '', 'projecttask'); dol_mkdir($dir); diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index cae4e5a81ad..b4708780c63 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -534,7 +534,7 @@ if ($resql) // Date if (!empty($arrayfields['sp.date_valid']['checked'])) { - print '"; +print ''; if (empty($reshook)) { @@ -976,12 +976,9 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') { global $conf, $langs, $user, $db; global $form; - global $region_id; - global $elementList, $sourceList, $localtax_typeList; - global $bc; + global $elementList, $sourceList; $formadmin = new FormAdmin($db); - $formcompany = new FormCompany($db); foreach ($fieldlist as $field => $value) { diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 0a604c023ec..110d662c9e8 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -93,19 +93,19 @@ if (empty($reshook)) // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; - + // Actions when linking object each other include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; - + // Actions when printing a doc from card include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Action to move up and down lines of object //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; - + // Action to build doc include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - + if ($action == 'set_thirdparty' && $permissiontoadd) { $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY'); @@ -114,7 +114,7 @@ if (empty($reshook)) { $object->setProject(GETPOST('projectid', 'int')); } - + // Actions to send emails $triggersendname = 'ASSET_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_ASSET_TO'; @@ -164,7 +164,7 @@ if ($action == 'create') print ''; if ($backtopage) print ''; if ($backtopageforcancel) print ''; - + dol_fiche_head(array(), ''); print '
'.$langs->trans("Description").''.$langs->trans("Value").''.$langs->trans("MemberMainOptions").''.$langs->trans("Value").''.$langs->trans("Description").'
'.$langs->trans("DisplayMarginRates").''; +print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('DISPLAY_MARGIN_RATES'); @@ -185,7 +185,7 @@ print '
'.$langs->trans("DisplayMarkRates").''; +print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('DISPLAY_MARK_RATES'); @@ -208,7 +208,7 @@ print '
'.$langs->trans("ForceBuyingPriceIfNull").''; +print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('ForceBuyingPriceIfNull'); diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 63115350bbc..107bcb4e4e3 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -21,7 +21,7 @@ /** * \file htdocs/projet/activity/index.php * \ingroup projet - * \brief Page activite perso du module projet + * \brief Page on activity of projects */ require "../../main.inc.php"; @@ -92,7 +92,7 @@ else else $tooltiphelp = $langs->trans("TasksPublicDesc"); } -print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'project', 0, $morehtml); +print_barre_liste($form->textwithpicto($title, $tooltiphelp), 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'projecttask', 0, $morehtml); print '
'; diff --git a/htdocs/projet/tasks.php b/htdocs/projet/tasks.php index cb004bc33a0..ebc6a7dc556 100644 --- a/htdocs/projet/tasks.php +++ b/htdocs/projet/tasks.php @@ -499,7 +499,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third { if ($id > 0 || !empty($ref)) print '
'; - print load_fiche_titre($langs->trans("NewTask"), '', 'project'); + print load_fiche_titre($langs->trans("NewTask"), '', 'projecttask'); if ($object->statut == Project::STATUS_CLOSED) { diff --git a/htdocs/projet/tasks/contact.php b/htdocs/projet/tasks/contact.php index 0c9a09b37c0..415859127db 100644 --- a/htdocs/projet/tasks/contact.php +++ b/htdocs/projet/tasks/contact.php @@ -395,11 +395,11 @@ if ($id > 0 || !empty($ref)) print img_object('', 'user').' '.$langs->trans("Users"); print '
'; + print ''; print $conf->global->MAIN_INFO_SOCIETE_NOM; print ''; + print ''; // On recupere les id des users deja selectionnes if ($object->project->public) $contactsofproject = ''; // Everybody else $contactsofproject = $projectstatic->getListContactId('internal'); @@ -430,13 +430,13 @@ if ($id > 0 || !empty($ref)) print img_object('', 'contact').' '.$langs->trans("ThirdPartyContacts"); print ''; + print ''; $thirdpartyofproject = $projectstatic->getListContactId('thirdparty'); $selectedCompany = isset($_GET["newcompany"]) ? $_GET["newcompany"] : $projectstatic->socid; $selectedCompany = $formcompany->selectCompaniesForNewContact($object, 'id', $selectedCompany, 'newcompany', $thirdpartyofproject, 0, '&withproject='.$withproject); print ''; + print ''; $contactofproject = $projectstatic->getListContactId('external'); $nbofcontacts = $form->select_contacts($selectedCompany, '', 'contactid', 0, '', $contactofproject); print ''; + print ''; //print $langs->trans('Month').': '; print ''; //print ' '.$langs->trans('Year').': '; @@ -545,7 +545,7 @@ if ($resql) // Date if (!empty($arrayfields['sp.date_livraison']['checked'])) { - print ''; + print ''; //print $langs->trans('Month').': '; print ''; //print ' '.$langs->trans('Year').': '; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 172309a233e..85c900eaf55 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1177,116 +1177,41 @@ class Ticket extends CommonObject // phpcs:enable global $langs; - if ($mode == 0) { - return $langs->trans($this->statuts[$status]); + $labelStatus = $this->statuts[$status]; + $labelStatusShort = $this->statuts_short[$status]; + + if ($status == self::STATUS_NOT_READ) { + $statusType = 'status0'; } - elseif ($mode == 1) { - return $langs->trans($this->statuts_short[$status]); + elseif ($status == self::STATUS_READ) { + $statusType = 'status1'; } - elseif ($mode == 2) { - if ($status == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } + elseif ($status == self::STATUS_ASSIGNED) { + $statusType = 'status3'; } - elseif ($mode == 3) { - if ($status == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket'); - } - elseif ($status == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket'); - } - elseif ($status == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket'); - } - elseif ($status == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket'); - } - elseif ($status == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket'); - } - elseif ($status == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket'); - } - elseif ($status == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket'); - } - elseif ($status == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket'); - } + elseif ($status == self::STATUS_IN_PROGRESS) { + $statusType = 'status4'; } - elseif ($mode == 4) { - if ($status == self::STATUS_NOT_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_READ) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_ASSIGNED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_IN_PROGRESS) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_NEED_MORE_INFO) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_WAITING) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_CLOSED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($status == self::STATUS_CANCELED) { - return img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket').' '.$langs->trans($this->statuts_short[$status]); - } + elseif ($status == self::STATUS_WAITING) { + $statusType = 'status3'; } - elseif ($mode == 5 || $mode == 6) { - if ($status == self::STATUS_NOT_READ) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0.png@ticket'); - } - elseif ($status == self::STATUS_READ) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut1.png@ticket'); - } - elseif ($status == self::STATUS_ASSIGNED) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut2.png@ticket'); - } - elseif ($status == self::STATUS_IN_PROGRESS) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut3.png@ticket'); - } - elseif ($status == self::STATUS_NEED_MORE_INFO) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut5.png@ticket'); - } - elseif ($status == self::STATUS_WAITING) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut6.png@ticket'); - } - elseif ($status == self::STATUS_CLOSED) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut8.png@ticket'); - } - elseif ($status == self::STATUS_CANCELED) { - return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut9.png@ticket'); - } + elseif ($status == self::STATUS_NEED_MORE_INFO) { + $statusType = 'status9'; } + elseif ($status == self::STATUS_CANCELED) { + $statusType = 'status9'; + } + elseif ($status == self::STATUS_CLOSED) { + $statusType = 'status6'; + } + else { + $labelStatus = $langs->trans('Unknown'); + $labelStatusShort = $langs->trans('Unknown'); + $statusType = 'status0'; + $mode = 0; + } + + return dolGetStatus($langs->trans($labelStatus), $langs->trans($labelStatusShort), '', $statusType, $mode); } diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php index 86929157d25..cfd8e3f26f3 100644 --- a/htdocs/ticket/index.php +++ b/htdocs/ticket/index.php @@ -181,15 +181,27 @@ if ($result) { } } + include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; + $dataseries = array(); + $colorseries = array(); + $dataseries[] = array('label' => $langs->trans("Unread"), 'data' => round($tick['unread'])); + $colorseries[Ticket::STATUS_NOT_READ] = '-'.$badgeStatus0; $dataseries[] = array('label' => $langs->trans("Read"), 'data' => round($tick['read'])); - $dataseries[] = array('label' => $langs->trans("NeedMoreInformation"), 'data' => round($tick['needmoreinfo'])); + $colorseries[Ticket::STATUS_READ] = $badgeStatus1; $dataseries[] = array('label' => $langs->trans("Assigned"), 'data' => round($tick['assigned'])); + $colorseries[Ticket::STATUS_ASSIGNED] = $badgeStatus3; $dataseries[] = array('label' => $langs->trans("InProgress"), 'data' => round($tick['inprogress'])); - $dataseries[] = array('label' => $langs->trans("Waiting"), 'data' => round($tick['waiting'])); - $dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['closed'])); + $colorseries[Ticket::STATUS_IN_PROGRESS] = $badgeStatus4; + $dataseries[] = array('label' => $langs->trans("Suspended"), 'data' => round($tick['waiting'])); + $colorseries[Ticket::STATUS_WAITING] = '-'.$badgeStatus3; + $dataseries[] = array('label' => $langs->trans("NeedMoreInformation"), 'data' => round($tick['needmoreinfo'])); + $colorseries[Ticket::STATUS_NEED_MORE_INFO] = $badgeStatus9; $dataseries[] = array('label' => $langs->trans("Canceled"), 'data' => round($tick['canceled'])); + $colorseries[Ticket::STATUS_CANCELED] = $badgeStatus9; + $dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['closed'])); + $colorseries[Ticket::STATUS_CLOSED] = $badgeStatus6; } else { dol_print_error($db); } @@ -233,6 +245,8 @@ if (!empty($dataseries) && count($dataseries) > 1) { $mesg = $px1->isGraphKo(); if (!$mesg) { $px1->SetData($data); + $px1->SetDataColor(array_values($colorseries)); + unset($data1); $i = $startyear; $legend = array(); From b426bbe7586d0dd7b7196533032b37d3dabe0551 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 17:47:41 +0200 Subject: [PATCH 097/456] Fix bad code --- htdocs/adherents/class/adherent_type.class.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 46733575c36..4af80ab4a63 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -183,20 +183,14 @@ class AdherentType extends CommonObject $sql2 .= " SET "; $sql2 .= " label='".$this->db->escape($this->label)."',"; $sql2 .= " description='".$this->db->escape($this->description)."'"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", email='".$this->db->escape($this->other)."'"; - } $sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'"; } else { $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", email"; - } $sql2 .= ")"; $sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->label)."',"; $sql2 .= " '".$this->db->escape($this->description)."'"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", '".$this->db->escape($this->other)."'"; - } $sql2 .= ")"; } dol_syslog(get_class($this).'::setMultiLangs key = current_lang = '.$key); @@ -219,20 +213,14 @@ class AdherentType extends CommonObject $sql2 .= " SET "; $sql2 .= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2 .= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", email='".$this->db->escape($this->multilangs["$key"]["other"])."'"; - } $sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'"; } else { $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", email"; - } $sql2 .= ")"; $sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->multilangs["$key"]["label"])."',"; $sql2 .= " '".$this->db->escape($this->multilangs["$key"]["description"])."'"; - if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", '".$this->db->escape($this->multilangs["$key"]["other"])."'"; - } $sql2 .= ")"; } From 068a890c36d4a739602d24df38805dee0102073d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 19:13:20 +0200 Subject: [PATCH 098/456] Enable more PHPCS rules --- dev/setup/codesniffer/README | 4 ++++ dev/setup/codesniffer/ruleset.xml | 7 +------ htdocs/admin/mails_templates.php | 7 ++----- htdocs/asset/card.php | 16 ++++++++-------- htdocs/core/class/smtps.class.php | 7 ++----- htdocs/core/modules/modEmailCollector.class.php | 9 ++++++--- htdocs/core/modules/modReceiptPrinter.class.php | 4 +++- htdocs/core/modules/modReception.class.php | 3 ++- htdocs/core/modules/modTicket.class.php | 7 ++++++- htdocs/install/upgrade2.php | 8 +++----- .../test/phpunit/MyModuleFunctionalTest.php | 2 +- 11 files changed, 38 insertions(+), 36 deletions(-) diff --git a/dev/setup/codesniffer/README b/dev/setup/codesniffer/README index 8a68d8a1140..087fb318f6f 100644 --- a/dev/setup/codesniffer/README +++ b/dev/setup/codesniffer/README @@ -6,6 +6,10 @@ This directory contains ruleset files to use to develop Dolibarr EPR & CRM. To install/upgrade phpcs: > sudo pear upgrade PHP_CodeSniffer +To run phpcs: +> cd dolibarrgitrepo +> phpcs --standard=dev/setup/codesniffer/ruleset.xml --extensions=php --parallel=8 . + Note with Eclipse: You must setup the PTI plugin of Eclipse into PHPCodeSniffer menu with: * tab value to 4 * path of code sniffer standard to dev/codesniffer diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 10d6e29bbe2..6b92522d11e 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -36,8 +36,6 @@ - - @@ -70,9 +68,6 @@ 0 - - 0 - - + diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index cc8a92f819b..37d1f903b4a 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -536,7 +536,7 @@ $errors = $hookmanager->errors; // Line to enter new values (input fields) -print "
'."\n"; @@ -186,7 +186,7 @@ if ($action == 'create') print ''; print ''; - + //dol_set_focus('input[name="ref"]'); } @@ -202,7 +202,7 @@ if (($id || $ref) && $action == 'edit') print ''; if ($backtopage) print ''; if ($backtopageforcancel) print ''; - + dol_fiche_head(); print '
'."\n"; diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index ba3c8199fca..f65b87944cf 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -533,12 +533,9 @@ class SMTPs /** * Now send the message * - * @param boolean $_bolTestMsg whether to run this method in 'Test' mode. - * @param boolean $_bolDebug whether to log all communication between this Class and the Mail Server. - * @return boolean|null void - * $_strMsg If this is run in 'Test' mode, the actual message structure will be returned + * @return boolean|null Result */ - public function sendMsg($_bolTestMsg = false, $_bolDebug = false) + public function sendMsg() { global $conf; diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index cba555391d7..46d17f9668c 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -282,8 +282,9 @@ class modEmailCollector extends DolibarrModules $tmpresql = $this->db->query($tmpsql); if ($tmpresql) { if ($this->db->num_rows($tmpresql) == 0) { + $descriptionA1 = 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.'; $sqlforexampleA1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; - $sqlforexampleA1 .= " VALUES (".$conf->entity.", 'Collect_Ticket_Requets', 'Example to collect ticket requests', 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; + $sqlforexampleA1 .= " VALUES (".$conf->entity.", 'Collect_Ticket_Requets', 'Example to collect ticket requests', $this->db->escape($descriptionA1), 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleA2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleA2 .= " VALUES ((SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Ticket_Requets' and entity = ".$conf->entity."), 'withouttrackingid', '".$this->db->idate(dol_now())."', ".$user->id.", 1)"; $sqlforexampleA3 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, rulevalue, date_creation, fk_user_creat, status)"; @@ -301,8 +302,9 @@ class modEmailCollector extends DolibarrModules $tmpresql = $this->db->query($tmpsql); if ($tmpresql) { if ($this->db->num_rows($tmpresql) == 0) { + $descriptionB1 = 'This collector will scan your mailbox to find all emails that are an answer of an email sent from your application. An event with the email response will be recorded at the good place (Module Agenda must be enabled). For example, if your send a commercial proposal, order or invoice by email and your customer answers your email, the system will automatically find the answer and add it into your ERP.'; $sqlforexampleB1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; - $sqlforexampleB1 .= " VALUES (".$conf->entity.", 'Collect_Responses', 'Example to collect any email responses', 'This collector will scan your mailbox to find all emails that are an answer of an email sent from your application. An event with the email response will be recorded at the good place (Module Agenda must be enabled). For example, if your send a commercial proposal, order or invoice by email and your customer answers your email, the system will automatically find the answer and add it into your ERP.', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; + $sqlforexampleB1 .= " VALUES (".$conf->entity.", 'Collect_Responses', 'Example to collect any email responses', $this->db->escape($descriptionB1), 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleB2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleB2 .= " VALUES ((SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Responses' and entity = ".$conf->entity."), 'withtrackingid', '".$this->db->idate(dol_now())."', ".$user->id.", 1)"; $sqlforexampleB3 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectoraction (fk_emailcollector, type, date_creation, fk_user_creat, status)"; @@ -317,8 +319,9 @@ class modEmailCollector extends DolibarrModules $tmpresql = $this->db->query($tmpsql); if ($tmpresql) { if ($this->db->num_rows($tmpresql) == 0) { + $descriptionC1 = "This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can't be found in database (new customer), the lead will be attached to the thirdparty with ID 1."; $sqlforexampleC1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; - $sqlforexampleC1 .= " VALUES (".$conf->entity.", 'Collect_Leads', 'Example to collect leads', 'This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can''t be found in database (new customer), the lead will be attached to the thirdparty with ID 1.', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; + $sqlforexampleC1 .= " VALUES (".$conf->entity.", 'Collect_Leads', 'Example to collect leads',$this->db->escape($descriptionC1), 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleC2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleC2 .= " VALUES ((SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Leads' and entity = ".$conf->entity."), 'withouttrackingid', '".$this->db->idate(dol_now())."', ".$user->id.", 1)"; $sqlforexampleC3 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, rulevalue, date_creation, fk_user_creat, status)"; diff --git a/htdocs/core/modules/modReceiptPrinter.class.php b/htdocs/core/modules/modReceiptPrinter.class.php index 47f62a21b08..f761238213a 100644 --- a/htdocs/core/modules/modReceiptPrinter.class.php +++ b/htdocs/core/modules/modReceiptPrinter.class.php @@ -135,11 +135,13 @@ class modReceiptPrinter extends DolibarrModules global $conf, $langs; // Clean before activation $this->remove($options); + + $templateexample = '\r\n\r\n\r\n\r\n\r\nFacture \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n'; $sql = array( "CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."printer_receipt (rowid integer AUTO_INCREMENT PRIMARY KEY, name varchar(128), fk_type integer, fk_profile integer, parameter varchar(128), entity integer) ENGINE=innodb;", "CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."printer_receipt_template (rowid integer AUTO_INCREMENT PRIMARY KEY, name varchar(128), template text, entity integer) ENGINE=innodb;", "DELETE FROM ".MAIN_DB_PREFIX."printer_receipt_template WHERE name = '".$langs->trans('Example')."';", - "INSERT INTO ".MAIN_DB_PREFIX."printer_receipt_template (name,template,entity) VALUES ('".$langs->trans('Example')."', '\r\n\r\n\r\n\r\n\r\nFacture \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n', 1);", + "INSERT INTO ".MAIN_DB_PREFIX."printer_receipt_template (name,template,entity) VALUES ('".$langs->trans('Example')."', $templateexample, 1);", ); return $this->_init($sql, $options); } diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index 637afae049d..c09915febb8 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -197,7 +197,8 @@ class modReception extends DolibarrModules $this->export_entities_array[$r] = array( 's.rowid'=>"company", 's.nom'=>'company', 's.address'=>'company', 's.zip'=>'company', 's.town'=>'company', 'd.nom'=>'company', 'co.label'=>'company', 'co.code'=>'company', 's.fk_pays'=>'company', 's.phone'=>'company', 's.siren'=>'company', 's.ape'=>'company', 's.siret'=>'company', 's.idprof4'=>'company', 's.idprof5'=>'company', 's.idprof6'=>'company', - 'c.rowid'=>"reception", 'c.ref'=>"reception", 'c.ref_supplier'=>"reception", 'c.fk_soc'=>"reception", 'c.date_creation'=>"reception", 'c.date_delivery'=>"reception", 'c.tracking_number'=>'reception', 'c.height'=>"reception", 'c.width'=>"reception", 'c.size'=>'reception', 'c.size_units'=>'reception', 'c.weight'=>"reception", 'c.weight_units'=>'reception', 'c.fk_statut'=>"reception", 'c.note_public'=>"reception", 'ed.rowid'=>'reception_line', 'ed.comment'=>'reception_line', 'ed.qty'=>"reception_line", + 'c.rowid'=>"reception", 'c.ref'=>"reception", 'c.ref_supplier'=>"reception", 'c.fk_soc'=>"reception", 'c.date_creation'=>"reception", 'c.date_delivery'=>"reception", 'c.tracking_number'=>'reception', 'c.height'=>"reception", 'c.width'=>"reception", 'c.size'=>'reception', 'c.size_units'=>'reception', 'c.weight'=>"reception", 'c.weight_units'=>'reception', 'c.fk_statut'=>"reception", 'c.note_public'=>"reception", + 'ed.rowid'=>'reception_line', 'ed.comment'=>'reception_line', 'ed.qty'=>"reception_line", 'p.rowid'=>'product', 'p.ref'=>'product', 'p.label'=>'product', 'p.weight'=>'product', 'p.weight_units'=>'product', 'p.volume'=>'product', 'p.volume_units'=>'product' ); if ($idcontacts && !empty($conf->global->RECEPTION_ADD_CONTACTS_IN_EXPORT)) $this->export_entities_array[$r] += array('sp.rowid'=>'contact', 'sp.lastname'=>'contact', 'sp.firstname'=>'contact', 'sp.note_public'=>'contact'); diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php index 1fc755455de..0b5e54e9637 100644 --- a/htdocs/core/modules/modTicket.class.php +++ b/htdocs/core/modules/modTicket.class.php @@ -122,7 +122,12 @@ class modTicket extends DolibarrModules 'langs' => 'ticket', 'tabname' => array(MAIN_DB_PREFIX."c_ticket_type", MAIN_DB_PREFIX."c_ticket_severity", MAIN_DB_PREFIX."c_ticket_category", MAIN_DB_PREFIX."c_ticket_resolution"), 'tablib' => array("TicketDictType", "TicketDictSeverity", "TicketDictCategory", "TicketDictResolution"), - 'tabsql' => array('SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_type as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_severity as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_category as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_resolution as f'), + 'tabsql' => array( + 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_type as f', + 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_severity as f', + 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_category as f', + 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_resolution as f' + ), 'tabsqlsort' => array("pos ASC", "pos ASC", "pos ASC", "pos ASC"), 'tabfield' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"), 'tabfieldvalue' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"), diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 70f4bb32d19..0fb36466a02 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -498,7 +498,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ migrate_reload_modules($db, $langs, $conf, $listofmodule); // Reload menus (this must be always and only into last targeted version) - migrate_reload_menu($db, $langs, $conf, $versionto); + migrate_reload_menu($db, $langs, $conf); } // Can force activation of some module during migration with parameter 'enablemodules=MAIN_MODULE_XXX,MAIN_MODULE_YYY,...' @@ -3624,10 +3624,9 @@ function migrate_mode_reglement($db, $langs, $conf) * @param DoliDB $db Database handler * @param Translate $langs Object langs * @param Conf $conf Object conf - * @param string $versionto Version target * @return void */ -function migrate_clean_association($db, $langs, $conf, $versionto) +function migrate_clean_association($db, $langs, $conf) { $result = $db->DDLDescTable(MAIN_DB_PREFIX."categorie_association"); if ($result) // result defined for version 3.2 or - @@ -4834,10 +4833,9 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo * @param DoliDB $db Database handler * @param Translate $langs Object langs * @param Conf $conf Object conf - * @param string $versionto Version target * @return void */ -function migrate_reload_menu($db, $langs, $conf, $versionto) +function migrate_reload_menu($db, $langs, $conf) { global $conf; dolibarr_install_syslog("upgrade2::migrate_reload_menu"); diff --git a/htdocs/modulebuilder/template/test/phpunit/MyModuleFunctionalTest.php b/htdocs/modulebuilder/template/test/phpunit/MyModuleFunctionalTest.php index 3a3870958e8..7c038971ed6 100644 --- a/htdocs/modulebuilder/template/test/phpunit/MyModuleFunctionalTest.php +++ b/htdocs/modulebuilder/template/test/phpunit/MyModuleFunctionalTest.php @@ -17,7 +17,7 @@ */ /** - * \file test/functional/MyModuleFunctionalTest.php + * \file test/phpunit/MyModuleFunctionalTest.php * \ingroup mymodule * \brief Example Selenium test. * From 6caa872280759954ac04127bee6ca85a1e3f0e01 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 19:27:42 +0200 Subject: [PATCH 099/456] Enable more PHPCS rules --- dev/setup/codesniffer/ruleset.xml | 7 ------- htdocs/admin/external_rss.php | 12 ++++++------ htdocs/admin/modulehelp.php | 2 +- htdocs/compta/paiement/rapport.php | 6 ++++-- htdocs/core/class/smtps.class.php | 4 ++-- htdocs/mrp/mo_production.php | 2 +- htdocs/product/price.php | 2 +- htdocs/product/stock/movement_card.php | 12 +++++------- htdocs/product/stock/movement_list.php | 14 +++++--------- 9 files changed, 25 insertions(+), 36 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 6b92522d11e..9c564c24b0c 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -120,13 +120,6 @@ - - 0 - - - 0 - - diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 51f6c1fd720..b3a66fa112e 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -271,19 +271,19 @@ if ($resql) print ''; print ''; print ''; - print ""."\n"; + print ''."\n"; print ''; print ""; print ""; - print ""."\n"; + print ''."\n"; print ''; print ""; print ""; - print ""."\n"; + print ''."\n"; print ''; @@ -301,7 +301,7 @@ if ($resql) print ''; } print ""; - print ""."\n"; + print ''."\n"; // Logo if ($result > 0 && empty($rss->error)) @@ -315,7 +315,7 @@ if ($resql) if ($imageurl) print ''; else print $langs->trans("None"); print ''; - print ""."\n"; + print ''."\n"; } // Active @@ -323,7 +323,7 @@ if ($resql) print ''; print ''; print ''; - print ""."\n"; + print ''."\n"; print '
".$langs->trans("Title")."global->$keyrsstitle)."\">
".$langs->trans("URL")."global->$keyrssurl)."\">
'.$langs->trans('WidgetEnabled').''.yn($active).'
'."\n"; diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 339b98be44a..d5bf12f1061 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -387,7 +387,7 @@ if ($mode == 'feature') $filedata = dol_buildpath($moduledir.'/sql/data.sql'); if (dol_is_file($filedata)) { - $text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql'.')'; + $text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql)'; } else $text .= $langs->trans("No"); diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index a0daa698f24..80013d3d865 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -154,9 +154,11 @@ if ($year) { $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; - print ''.''.img_pdf().' '.$file.''; + print ''; + print ''.img_pdf().' '.$file.''; print ''.dol_print_size(dol_filesize($tfile)).''; - print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; + print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; + print ''; } } closedir($handle); diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index f65b87944cf..f6bc31c2f53 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1507,8 +1507,8 @@ class SMTPs } // always end related and end alternative after inline images - $content .= "--".$this->_getBoundary('related')."--"."\r\n"; - $content .= "\r\n"."--".$this->_getBoundary('alternative')."--"."\r\n"; + $content .= "--".$this->_getBoundary('related')."--\r\n"; + $content .= "\r\n--".$this->_getBoundary('alternative')."--\r\n"; $content .= "\r\n"; } else diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 301cf4a76ae..599cb094aac 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -667,7 +667,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print load_fiche_titre($langs->trans('Consumption'), '', '', 0, '', '', $newlinetext); print '
'; - print ''; + print '
'; print ''; print ''; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index a4e9f46fa0a..f2109b94795 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -2048,7 +2048,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print ''; print ""; - print ""; + print ""; print '"; print ''; + .$objp->inventorycode + .''; } if (!empty($arrayfields['m.label']['checked'])) { diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 944462ccdfc..535a0533249 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -1086,15 +1086,11 @@ if ($resql) if (!empty($arrayfields['m.inventorycode']['checked'])) { // Inventory code - print ''; + print ''; } if (!empty($arrayfields['m.label']['checked'])) { From 1d68510c7d7ccfe27c7089e454a1b10d6feeb812 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 19:32:18 +0200 Subject: [PATCH 100/456] Fix syntax error --- htdocs/core/modules/modEmailCollector.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index 46d17f9668c..ed37a3a70ab 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -284,7 +284,7 @@ class modEmailCollector extends DolibarrModules if ($this->db->num_rows($tmpresql) == 0) { $descriptionA1 = 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.'; $sqlforexampleA1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; - $sqlforexampleA1 .= " VALUES (".$conf->entity.", 'Collect_Ticket_Requets', 'Example to collect ticket requests', $this->db->escape($descriptionA1), 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; + $sqlforexampleA1 .= " VALUES (".$conf->entity.", 'Collect_Ticket_Requets', 'Example to collect ticket requests', '".$this->db->escape($descriptionA1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleA2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleA2 .= " VALUES ((SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Ticket_Requets' and entity = ".$conf->entity."), 'withouttrackingid', '".$this->db->idate(dol_now())."', ".$user->id.", 1)"; $sqlforexampleA3 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, rulevalue, date_creation, fk_user_creat, status)"; @@ -304,7 +304,7 @@ class modEmailCollector extends DolibarrModules if ($this->db->num_rows($tmpresql) == 0) { $descriptionB1 = 'This collector will scan your mailbox to find all emails that are an answer of an email sent from your application. An event with the email response will be recorded at the good place (Module Agenda must be enabled). For example, if your send a commercial proposal, order or invoice by email and your customer answers your email, the system will automatically find the answer and add it into your ERP.'; $sqlforexampleB1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; - $sqlforexampleB1 .= " VALUES (".$conf->entity.", 'Collect_Responses', 'Example to collect any email responses', $this->db->escape($descriptionB1), 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; + $sqlforexampleB1 .= " VALUES (".$conf->entity.", 'Collect_Responses', 'Example to collect any email responses', '".$this->db->escape($descriptionB1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleB2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleB2 .= " VALUES ((SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Responses' and entity = ".$conf->entity."), 'withtrackingid', '".$this->db->idate(dol_now())."', ".$user->id.", 1)"; $sqlforexampleB3 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectoraction (fk_emailcollector, type, date_creation, fk_user_creat, status)"; @@ -321,7 +321,7 @@ class modEmailCollector extends DolibarrModules if ($this->db->num_rows($tmpresql) == 0) { $descriptionC1 = "This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can't be found in database (new customer), the lead will be attached to the thirdparty with ID 1."; $sqlforexampleC1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; - $sqlforexampleC1 .= " VALUES (".$conf->entity.", 'Collect_Leads', 'Example to collect leads',$this->db->escape($descriptionC1), 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; + $sqlforexampleC1 .= " VALUES (".$conf->entity.", 'Collect_Leads', 'Example to collect leads', '".$this->db->escape($descriptionC1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleC2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; $sqlforexampleC2 .= " VALUES ((SELECT rowid FROM ".MAIN_DB_PREFIX."emailcollector_emailcollector WHERE ref = 'Collect_Leads' and entity = ".$conf->entity."), 'withouttrackingid', '".$this->db->idate(dol_now())."', ".$user->id.", 1)"; $sqlforexampleC3 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, rulevalue, date_creation, fk_user_creat, status)"; From 62ca9a984e1d8d4c32b794c0bb0a6526affbfe3f Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sat, 25 Apr 2020 21:42:59 +0200 Subject: [PATCH 101/456] Update list.php --- htdocs/societe/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 3d72fb1cdd3..282a4f44e8f 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1153,12 +1153,12 @@ while ($i < min($num, $limit)) } if (!empty($arrayfields['s.phone']['checked'])) { - print "
\n"; + print "\n"; if (!$i) $totalarray['nbfield']++; } if (!empty($arrayfields['s.fax']['checked'])) { - print "\n"; + print "\n"; if (!$i) $totalarray['nbfield']++; } if (!empty($arrayfields['s.url']['checked'])) From 58409ce93e91ae6f6e7cb3b5dc9823f98041e067 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Apr 2020 14:11:25 +0200 Subject: [PATCH 102/456] Look and feel v12 --- htdocs/societe/paymentmodes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index d440930bbf5..3583d104dbf 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1138,11 +1138,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''.$langs->trans("CreateCardOnStripe").''; } - print ''; + print ''; print img_picto($langs->trans("Modify"), 'edit'); print ''; print ' '; - print ''; // source='.$companypaymentmodetemp->stripe_card_ref.'& + print ''; // source='.$companypaymentmodetemp->stripe_card_ref.'& print img_picto($langs->trans("Delete"), 'delete'); print ''; } From 06cb0194d562d81f2c14093b3e32e758755ff9f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Apr 2020 14:12:51 +0200 Subject: [PATCH 103/456] Look and feel v12 --- htdocs/societe/paymentmodes.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 3583d104dbf..6385346ce5d 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1547,13 +1547,11 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print '"; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 1710a61ccdd..c3c9f45ed5a 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -874,7 +874,7 @@ if (empty($action) || $action == 'view') { $accountoshow = length_accountg($k); if (($accountoshow == "") || $accountoshow == 'NotDefined') { - print ''.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Sale").')'.''; + print ''.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Sale").')'; } else print $accountoshow; print ""; diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 251322ea798..d250203b3d8 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -213,19 +213,17 @@ class Dolistore { $cat = $this->categories[$i]; if ($cat->is_root_category == 1 && $parent == 0) { - $html .= '
  • '.$cat->name->language[$this->lang - 1].' '.$cat->nb_products_recursive.'

    '; - $html .= self::get_categories($cat->id); - $html .= "
  • \n"; + $html .= '
  • description->language[$this->lang - 1])).'">'.$cat->name->language[$this->lang - 1].' '.$cat->nb_products_recursive.'

    '; + $html .= self::get_categories($cat->id); + $html .= "
  • \n"; } elseif (trim($cat->id_parent) == $parent && $cat->active == 1 && trim($cat->id_parent) != 0) { // si cat est de ce niveau $select = ($cat->id == $this->categorie) ? ' selected' : ''; - $html .= '
  • '.$cat->name->language[$this->lang - 1].' '.$cat->nb_products_recursive.''; - $html .= self::get_categories($cat->id); - $html .= "
  • \n"; - } else { + $html .= '
  • description->language[$this->lang - 1])).'" '; + $html .= '>'.$cat->name->language[$this->lang - 1].' '.$cat->nb_products_recursive.''; + $html .= self::get_categories($cat->id); + $html .= "
  • \n"; } } diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index b3a66fa112e..8aa1a425778 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -327,7 +327,7 @@ if ($resql) print '
    '.$langs->trans("Product").'
    ".$langs->trans("Default").""."'.$langs->trans($object->price_base_type)."'; diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index 2714740eb45..03171fbeac5 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -1049,14 +1049,12 @@ if ($resql) { // Inventory code print '' - .$objp->inventorycode - .'' - .''.'' - .$objp->inventorycode - .'' - .''.$objp->inventorycode.'".dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid)."".dol_print_phone($obj->phone, $obj->country_code, 0, $obj->rowid, 'AC_TEL')."".dol_print_phone($obj->fax, $obj->country_code, 0, $obj->rowid)."".dol_print_phone($obj->fax, $obj->country_code, 0, $obj->rowid, 'AC_TEL')."'; if ($user->rights->societe->creer) { - print ''; + print ''; print img_picto($langs->trans("Modify"), 'edit'); print ''; - print ' '; - - print ''; + print ''; print img_picto($langs->trans("Delete"), 'delete'); print ''; } From a36d0c96c1458c31c20f8a170ef879e7319bd9f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Apr 2020 22:28:43 +0200 Subject: [PATCH 104/456] Fix sql --- htdocs/core/modules/modReceiptPrinter.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modReceiptPrinter.class.php b/htdocs/core/modules/modReceiptPrinter.class.php index f761238213a..818c090dcc0 100644 --- a/htdocs/core/modules/modReceiptPrinter.class.php +++ b/htdocs/core/modules/modReceiptPrinter.class.php @@ -141,7 +141,7 @@ class modReceiptPrinter extends DolibarrModules "CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."printer_receipt (rowid integer AUTO_INCREMENT PRIMARY KEY, name varchar(128), fk_type integer, fk_profile integer, parameter varchar(128), entity integer) ENGINE=innodb;", "CREATE TABLE IF NOT EXISTS ".MAIN_DB_PREFIX."printer_receipt_template (rowid integer AUTO_INCREMENT PRIMARY KEY, name varchar(128), template text, entity integer) ENGINE=innodb;", "DELETE FROM ".MAIN_DB_PREFIX."printer_receipt_template WHERE name = '".$langs->trans('Example')."';", - "INSERT INTO ".MAIN_DB_PREFIX."printer_receipt_template (name,template,entity) VALUES ('".$langs->trans('Example')."', $templateexample, 1);", + "INSERT INTO ".MAIN_DB_PREFIX."printer_receipt_template (name,template,entity) VALUES ('".$langs->trans('Example')."', '".$templateexample."', 1);", ); return $this->_init($sql, $options); } From b20d85b198f432d9dfbdcff4214bd0c60ea2574e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Apr 2020 23:06:52 +0200 Subject: [PATCH 105/456] Fix phpcs --- dev/setup/codesniffer/ruleset.xml | 1 - .../accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- .../admin/dolistore/class/dolistore.class.php | 20 ++++++------ htdocs/admin/external_rss.php | 2 +- htdocs/admin/system/perf.php | 4 +-- htdocs/blockedlog/admin/blockedlog_list.php | 28 ++++++++-------- htdocs/categories/index.php | 4 +-- htdocs/compta/tva/clients.php | 18 +++++------ htdocs/core/class/html.form.class.php | 3 +- .../filemanagerdol/connectors/php/util.php | 12 ++----- htdocs/core/js/lib_notification.js.php | 2 +- htdocs/core/lib/cron.lib.php | 2 +- htdocs/core/lib/project.lib.php | 2 +- htdocs/core/lib/website2.lib.php | 4 +-- htdocs/core/lib/xcal.lib.php | 14 ++++---- .../bank/doc/pdf_sepamandate.modules.php | 4 +-- htdocs/install/repair.php | 6 ++-- htdocs/opensurvey/fonctions.php | 2 +- htdocs/product/stock/replenishorders.php | 32 +++++++++---------- htdocs/public/members/public_card.php | 2 +- htdocs/public/opensurvey/studs.php | 2 +- htdocs/public/payment/newpayment.php | 2 +- htdocs/reception/card.php | 8 ++--- htdocs/takepos/admin/terminal.php | 2 +- 25 files changed, 84 insertions(+), 96 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 9c564c24b0c..e4bdefaecd4 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -167,7 +167,6 @@ - 0 diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index ee67aaad392..59bfd561c6c 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -936,7 +936,7 @@ if (empty($action) || $action == 'view') { $accountoshow = length_accountg($k); if (($accountoshow == "") || $accountoshow == 'NotDefined') { - print ''.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Purchase").')'.''; + print ''.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("Purchase").')'; } else print $accountoshow; print "
    '."\n"; - print ""."\n"; + print "\n"; $i++; } diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index fcfe25ce3d3..dd77c41a673 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -66,7 +66,7 @@ if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled"); else { print img_picto('', 'warning').' '.$langs->trans("ModuleActivated", $langs->transnoentities("XDebug")); - print ' - '.$langs->trans("MoreInformation").' XDebug admin page'; + print ' - '.$langs->trans("MoreInformation").' XDebug admin page'; } print '
    '; @@ -123,7 +123,7 @@ if (!$foundcache && $test) { $foundcache++; print img_picto('', 'tick.png').' '.$langs->trans("PHPModuleLoaded", "XCache"); - print ' '.$langs->trans("MoreInformation").' Xcache admin page'; + print ' '.$langs->trans("MoreInformation").' Xcache admin page'; } $test = function_exists('eaccelerator_info'); if (!$foundcache && $test) diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index d753b3a66ea..66cc3b44848 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -223,20 +223,20 @@ if ($action === 'downloadblockchain') { { $statusofrecordnote = $langs->trans("PreviousFingerprint").': '.$previoushash.($statusofrecordnote ? ' - '.$statusofrecordnote : ''); } - print $obj->rowid - .';'.$obj->date_creation - .';"'.$obj->user_fullname.'"' - .';'.$obj->action - .';'.$obj->element - .';'.$obj->amounts - .';'.$obj->fk_object - .';'.$obj->date_object - .';"'.$obj->ref_object.'"' - .';'.$obj->signature - .';'.$statusofrecord - .';'.$statusofrecordnote - .';"'.str_replace('"', '""', $obj->object_data).'"' - ."\n"; + print $obj->rowid; + print ';'.$obj->date_creation; + print ';"'.str_replace('"', '""', $obj->user_fullname).'"'; + print ';'.$obj->action; + print ';'.$obj->element; + print ';'.$obj->amounts; + print ';'.$obj->fk_object; + print ';'.$obj->date_object; + print ';"'.str_replace('"', '""', $obj->ref_object).'"'; + print ';'.$obj->signature; + print ';'.$statusofrecord; + print ';'.$statusofrecordnote; + print ';"'.str_replace('"', '""', $obj->object_data).'"'; + print "\n"; // Set new previous hash for next fetch $previoushash = $obj->signature; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 2103a4081d3..b36101750f2 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -184,9 +184,7 @@ foreach ($fulltree as $key => $val) 'rowid'=>$val['rowid'], 'fk_menu'=>$val['fk_parent'], 'entry'=>''.$counter. - //''. - ''. - '
    color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"').'>'.$li.''.dolGetFirstLineOfText($desc).''.img_view().'
    ' + ''.img_view().'' ); } diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index 0bce99df2ff..bcedba7a074 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -191,15 +191,15 @@ if (!empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description .= '
    '.$langs $description .= ($description ? '
    ' : '').$fsearch; if (!empty($conf->global->TAX_REPORT_EXTRA_REPORT)) { - $description .= '
    ' - . ' ' - . $langs->trans('SimpleReport') - . '' - . '
    ' - . ' ' - . $langs->trans('AddExtraReport') - . '' - . '
    '; + $description .= '
    '; + $description .= ' '; + $description .= $langs->trans('SimpleReport'); + $description .= ''; + $description .= '
    '; + $description .= ' '; + $description .= $langs->trans('AddExtraReport'); + $description .= ''; + $description .= '
    '; } $elementcust = $langs->trans("CustomersInvoices"); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 63500b156a8..954a996b0a8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6642,8 +6642,7 @@ class Form $out .= 'function formatResult(record) {'."\n"; if ($elemtype == 'category') { - $out .= ' //return \' \'+record.text+\'\'; - return \' \'+record.text+\'\';'; + $out .= 'return \' \'+record.text+\'\';'; } else { diff --git a/htdocs/core/filemanagerdol/connectors/php/util.php b/htdocs/core/filemanagerdol/connectors/php/util.php index 3ea4baf8c87..1349ed00dad 100644 --- a/htdocs/core/filemanagerdol/connectors/php/util.php +++ b/htdocs/core/filemanagerdol/connectors/php/util.php @@ -56,16 +56,10 @@ function RemoveFromEnd($sourceString, $charToRemove) */ function FindBadUtf8($string) { - $regex = '([\x00-\x7F]'. - '|[\xC2-\xDF][\x80-\xBF]'. - '|\xE0[\xA0-\xBF][\x80-\xBF]'. - '|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}'. - '|\xED[\x80-\x9F][\x80-\xBF]'. - '|\xF0[\x90-\xBF][\x80-\xBF]{2}'. - '|[\xF1-\xF3][\x80-\xBF]{3}'. - '|\xF4[\x80-\x8F][\x80-\xBF]{2}'. - '|(.{1}))'; + $regex = '([\x00-\x7F]|[\xC2-\xDF][\x80-\xBF]|\xE0[\xA0-\xBF][\x80-\xBF]|[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2}|\xED[\x80-\x9F][\x80-\xBF]'; + $regex .= '|\xF0[\x90-\xBF][\x80-\xBF]{2}|[\xF1-\xF3][\x80-\xBF]{3}|\xF4[\x80-\x8F][\x80-\xBF]{2}|(.{1}))'; + $matches =array(); while (preg_match('/'.$regex.'/S', $string, $matches)) { if (isset($matches[2])) { return true; diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 3e4f838fe33..769e0a36157 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -75,7 +75,7 @@ if (!($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root.'/' || $_SERVER['HTTP var audio = null; global->AGENDA_REMINDER_BROWSER_SOUND)) { - print 'audio = new Audio(\''.DOL_URL_ROOT.'/theme/common/sound/notification_agenda.wav'.'\');'; + print 'audio = new Audio(\''.DOL_URL_ROOT.'/theme/common/sound/notification_agenda.wav\');'; } ?> diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php index 8128a449cfd..33ad0a85229 100644 --- a/htdocs/core/lib/cron.lib.php +++ b/htdocs/core/lib/cron.lib.php @@ -107,7 +107,7 @@ function dol_print_cron_urls() print ''.$langs->trans("FileToLaunchCronJobs").':
    '; - $file = '/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY) ? 'securitykey' : ''.$conf->global->CRON_KEY.'').' '.$logintouse.' [cronjobid]'; + $file = '/scripts/cron/cron_run_jobs.php '.(empty($conf->global->CRON_KEY) ? 'securitykey' : ''.$conf->global->CRON_KEY.'').' '.$logintouse.' [cronjobid]'; print '
    \n"; print '
    '; diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 581a7ebab74..be23fc65cfc 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -642,7 +642,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if ($source == 'internal') $c = new User($db); else $c = new Contact($db); $c->fetch($contacttask['id']); - print $c->getNomUrl(1).' ('.$contacttask['libelle'].')'.'
    '; + print $c->getNomUrl(1).' ('.$contacttask['libelle'].')
    '; } } } diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index b2b5ef06abf..6ef17220283 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -133,7 +133,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage) $tplcontent .= "if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {\n"; $tplcontent .= ' $pathdepth = count(explode(\'/\', $_SERVER[\'SCRIPT_NAME\'])) - 2;'."\n"; $tplcontent .= ' require_once ($pathdepth ? str_repeat(\'../\', $pathdepth) : \'./\').\'master.inc.php\';'."\n"; - $tplcontent .= "} // Not already loaded"."\n"; + $tplcontent .= "} // Not already loaded\n"; $tplcontent .= "require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';\n"; $tplcontent .= "require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n"; $tplcontent .= "ob_start();\n"; @@ -212,7 +212,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage) $tplcontent .= 'id.');'."\n"; - $tplcontent .= "// END PHP ?>"."\n"; + $tplcontent .= "// END PHP ?>\n"; //var_dump($filetpl);exit; $result = file_put_contents($filetpl, $tplcontent); diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 4a85c595223..440f1147cbf 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -251,7 +251,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) } fwrite($calfileh, "DTEND".$prefix.":".$enddatef."\n"); - fwrite($calfileh, "STATUS:CONFIRMED"."\n"); + fwrite($calfileh, "STATUS:CONFIRMED\n"); if (!empty($transparency)) { @@ -295,7 +295,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) fwrite($calfileh, "SUMMARY:".$encoding.$summary."\n"); fwrite($calfileh, "DESCRIPTION:".$encoding.$description."\n"); - fwrite($calfileh, "STATUS:CONFIRMED"."\n"); + fwrite($calfileh, "STATUS:CONFIRMED\n"); fwrite($calfileh, "CATEGORIES:".$category."\n"); fwrite($calfileh, "LOCATION:".$location."\n"); fwrite($calfileh, "TRANSP:OPAQUE\n"); @@ -381,7 +381,7 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt $url = $urlwithroot."/public/agenda/agendaexport.php?format=rss&exportkey=".urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY); } - fwrite($fichier, ""."\n"); + fwrite($fichier, "\n"); foreach ($events_array as $key => $event) { @@ -480,9 +480,9 @@ function format_cal($format, $string) if ($format === "ical") { // Replace new lines chars by "\n" - $newstring = preg_replace("/"."\r\n"."/i", "\\n", $newstring); - $newstring = preg_replace("/"."\n\r"."/i", "\\n", $newstring); - $newstring = preg_replace("/"."\n"."/i", "\\n", $newstring); + $newstring = preg_replace("/\r\n/i", "\\n", $newstring); + $newstring = preg_replace("/\n\r/i", "\\n", $newstring); + $newstring = preg_replace("/\n/i", "\\n", $newstring); // Must not exceed 75 char. Cut with "\r\n"+Space $newstring = calEncode($newstring); @@ -586,7 +586,7 @@ function quotedPrintEncode($str, $forcal = 0) if ((strlen($newpara) + strlen($char)) >= 76) { // New line with carray-return (CR) and line-feed (LF) - $out .= $newpara."="."\r\n"; + $out .= $newpara."=\r\n"; // extra space for cal if ($forcal) diff --git a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php index 0ce2f2bbbb2..23868eef643 100644 --- a/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php +++ b/htdocs/core/modules/bank/doc/pdf_sepamandate.modules.php @@ -227,14 +227,14 @@ class pdf_sepamandate extends ModeleBankAccountDoc $posY += 2; $pdf->SetXY($this->marge_gauche, $posY); - $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("RUMLong").' ('.$outputlangs->transnoentitiesnoconv("RUM").')'.' : '.$object->rum, 0, 'L'); + $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("RUMLong").' ('.$outputlangs->transnoentitiesnoconv("RUM").') : '.$object->rum, 0, 'L'); $posY = $pdf->GetY(); $posY += 2; $pdf->SetXY($this->marge_gauche, $posY); $ics = ''; if (!empty($conf->global->PRELEVEMENT_ICS)) $ics = $conf->global->PRELEVEMENT_ICS; - $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").')'.' : '.$ics, 0, 'L'); + $pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite, 3, $outputlangs->transnoentitiesnoconv("CreditorIdentifier").' ('.$outputlangs->transnoentitiesnoconv("ICS").') : '.$ics, 0, 'L'); $posY = $pdf->GetY(); $posY += 1; diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index d129fbeb1e4..2c99c28e7e5 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -1440,9 +1440,9 @@ if ($ok && GETPOST('repair_link_dispatch_lines_supplier_order_lines')) { exit; } while ($obj_dispatch = $db->fetch_object($resql_dispatch)) { - $sql_line = 'SELECT line.rowid, line.qty FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet AS line' - . ' WHERE line.fk_commande = '.$obj_dispatch->fk_commande - . ' AND line.fk_product = '.$obj_dispatch->fk_product; + $sql_line = 'SELECT line.rowid, line.qty FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet AS line'; + $sql_line .= ' WHERE line.fk_commande = '.$obj_dispatch->fk_commande; + $sql_line .= ' AND line.fk_product = '.$obj_dispatch->fk_product; $resql_line = $db->query($sql_line); // s’il y a plusieurs lignes avec le même produit sur cette commande fournisseur, diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 09a9c10e789..30529b49f56 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -84,7 +84,7 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ print ''."\n"; print '
    '."\n"; - print '
    '."\n"; + print ''."\n"; print ''; print ''."\n"; print "\n"; diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index 9ed74d112eb..25f3e38a81b 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -172,22 +172,22 @@ if ($resql) print ''; print ''; - print ''. - ''. - ''. - ''. - ''. - ''; + print ''; + print ''; + print ''; + print ''; + print ''; diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index 195a7560631..04fe1f75fca 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -66,7 +66,7 @@ $extrafields = new ExtraFields($db); $morehead = ''; if (!empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead = ''; -else $morehead = ''; +else $morehead = ''; llxHeaderVierge($langs->trans("MemberCard"), $morehead); diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php index ef5458456c5..d0ce716bb7d 100644 --- a/htdocs/public/opensurvey/studs.php +++ b/htdocs/public/opensurvey/studs.php @@ -690,7 +690,7 @@ if ($object->allow_spy) { if (strpos($toutsujet[$i], '@') !== false) { $toutsujetdate = explode("@", $toutsujet[$i]); - $meilleursujet .= dol_print_date($toutsujetdate[0], 'daytext').' ('.dol_print_date($toutsujetdate[0], '%A').')'.' - '.$toutsujetdate[1]; + $meilleursujet .= dol_print_date($toutsujetdate[0], 'daytext').' ('.dol_print_date($toutsujetdate[0], '%A').') - '.$toutsujetdate[1]; } else { $meilleursujet .= dol_print_date($toutsujet[$i], 'daytext').' ('.dol_print_date($toutsujet[$i], '%A').')'; } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index c3e6553cf92..8b1e8a42574 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1924,7 +1924,7 @@ if (preg_match('/^dopayment/', $action)) // If we choosed/click on the payment print '
    '; print ''; - print ''; + print ''; print ''; print '
    '. - ''. - ''. - ''. - ''. - ''. - ''. - ''. - ''. - $form->selectDate($search_date, 'search_date', 0, 0, 1, '', 1, 0, 0, ''). - ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print $form->selectDate($search_date, 'search_date', 0, 0, 1, '', 1, 0, 0, ''); + print ''; $searchpicto = $form->showFilterAndCheckAddButtons(0); print $searchpicto; print '
    '; diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 9c6e8df76f1..3d8547f9322 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -1858,7 +1858,7 @@ elseif ($id || $ref) print ''; print ''; // Qty to receive or received - print ''.''.''; + print ''; // Warehouse source print ''.$formproduct->selectWarehouses($lines[$i]->fk_entrepot, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).''; // Batch number managment @@ -1878,11 +1878,11 @@ elseif ($id || $ref) print ''; print ''; // Qty to receive or received - print ''.''.''; + print ''; // Warehouse source - print ''.''; + print ''; // Batch number managment - print ''.''; + print ''; print ''; } } diff --git a/htdocs/takepos/admin/terminal.php b/htdocs/takepos/admin/terminal.php index 10a679615a9..46d168ddd24 100644 --- a/htdocs/takepos/admin/terminal.php +++ b/htdocs/takepos/admin/terminal.php @@ -264,7 +264,7 @@ if ($conf->global->TAKEPOS_PRINT_METHOD == "receiptprinter") { print ''.$langs->trans('CashDeskReaderKeyCodeForEnter').''; print ''; -print ''; +print ''; print ''; // Numbering module From 31ba277da708f99d33b3476c8997a74398b206f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Apr 2020 23:18:09 +0200 Subject: [PATCH 106/456] Fix phpcs --- .../compta/paiement/class/cpaiement.class.php | 2 +- htdocs/core/class/smtps.class.php | 19 +++++-------------- htdocs/core/db/sqlite3.class.php | 2 +- htdocs/expensereport/card.php | 4 ++-- test/phpunit/AdherentTest.php | 10 +++++----- test/phpunit/FilesLibTest.php | 2 +- 6 files changed, 15 insertions(+), 24 deletions(-) diff --git a/htdocs/compta/paiement/class/cpaiement.class.php b/htdocs/compta/paiement/class/cpaiement.class.php index 5b66dbec15e..d1cd1f0015b 100644 --- a/htdocs/compta/paiement/class/cpaiement.class.php +++ b/htdocs/compta/paiement/class/cpaiement.class.php @@ -185,7 +185,7 @@ class Cpaiement $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; if (null !== $ref) { $sql .= ' WHERE t.entity IN ('.getEntity('c_paiement').')'; - $sql .= ' AND t.code = '.'\''.$ref.'\''; + $sql .= " AND t.code = '".$this->db->escape($ref)."'"; } else { $sql .= ' WHERE t.id = '.$id; } diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index f6bc31c2f53..51e375c5279 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1534,34 +1534,25 @@ class SMTPs $content .= "--".$this->_getBoundary('alternative')."\r\n"; } - $content .= 'Content-Type: '.$_content['mimeType'].'; ' - // . 'charset="' . $this->getCharSet() . '"'; - . 'charset='.$this->getCharSet().''; + $content .= 'Content-Type: '.$_content['mimeType'].'; charset='.$this->getCharSet(); - // $content .= ( $type == 'html') ? '; name="HTML Part"' : ''; $content .= "\r\n"; - // $content .= 'Content-Transfer-Encoding: '; - // $content .= ($type == 'html') ? 'quoted-printable' : $this->getTransEncodeType(); - // $content .= "\r\n" - // . 'Content-Disposition: inline' . "\r\n" - // . 'Content-Description: ' . $type . ' message' . "\r\n"; - if ($this->getMD5flag()) - $content .= 'Content-MD5: '.$_content['md5']."\r\n"; + if ($this->getMD5flag()) { + $content .= 'Content-MD5: '.$_content['md5']."\r\n"; + } $content .= "\r\n".$_content['data']."\r\n"; if (!key_exists('image', $this->_msgContent) && $_content['dataText'] && !empty($conf->global->MAIN_MAIL_USE_MULTI_PART)) // Add plain text message part after html part { - $content .= "--".$this->_getBoundary('alternative')."--"."\r\n"; + $content .= "--".$this->_getBoundary('alternative')."--\r\n"; } $content .= "\r\n"; } } - // Close message boundries - // $content .= "\r\n--" . $this->_getBoundary() . '--' . "\r\n" ; $content .= "--".$this->_getBoundary('mixed').'--'."\r\n"; } diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index ba8f8eff3e9..2d24c232797 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -1325,7 +1325,7 @@ class DoliDBSqlite3 extends DoliDB if ($this->db) { $newname = preg_replace('/_/', '', $name); - $localname = __CLASS__.'::'.'db'.$newname; + $localname = __CLASS__.'::db'.$newname; $reflectClass = new ReflectionClass(__CLASS__); $reflectFunction = $reflectClass->getMethod('db'.$newname); if ($arg_count < 0) { diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index fd582ac0a1e..2a0f804b196 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2330,7 +2330,7 @@ else print ''; if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { - print '   -   '.''.$langs->trans("AttachTheNewLineToTheDocument"); + print '   -   '.$langs->trans("AttachTheNewLineToTheDocument"); print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); print ''; } @@ -2478,7 +2478,7 @@ else print ''; if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { - print '   -   '.''.$langs->trans("AttachTheNewLineToTheDocument"); + print '   -   '.$langs->trans("AttachTheNewLineToTheDocument"); print img_picto($langs->trans("AttachTheNewLineToTheDocument"), 'chevron-down', '', false, 0, 0, '', 'marginleftonly'); print ''; } diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index c78bc6542bb..89e78b32bd9 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -325,13 +325,13 @@ class AdherentTest extends PHPUnit\Framework\TestCase $conf->global->MAIN_FIRSTNAME_NAME_POSITION = 0; // Force setup for firstname+lastname - $template = '__CIVILITY__,__FIRSTNAME__,__LASTNAME__,__FULLNAME__,__COMPANY__,'. - '__ADDRESS__,__ZIP__,__TOWN__,__COUNTRY__,__EMAIL__,__BIRTH__,__PHOTO__,__LOGIN__'; + $template = '__CIVILITY__,__FIRSTNAME__,__LASTNAME__,__FULLNAME__,__COMPANY__,'; + $template .= '__ADDRESS__,__ZIP__,__TOWN__,__COUNTRY__,__EMAIL__,__BIRTH__,__PHOTO__,__LOGIN__'; // If option to store clear password has been set, we get 'dolibspec' into PASSWORD field. - $expected = ',New firstname,New name,New firstname New name,'. - 'New company label,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->birth, 'day').',,'. - 'newlogin'; + $expected = ',New firstname,New name,New firstname New name,'; + $expected .= 'New company label,New address,New zip,New town,Belgium,newemail@newemail.com,'.dol_print_date($localobject->birth, 'day').',,'; + $expected .= 'newlogin'; $result = $localobject->makeSubstitution($template); print __METHOD__." result=".$result."\n"; diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index 776e783a6b0..fb3ce8f5814 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -336,7 +336,7 @@ class FilesLibTest extends PHPUnit\Framework\TestCase $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 1); print __METHOD__." result=".$result."\n"; - $this->assertGreaterThanOrEqual(1, $result, 'copy file ('.$file.') into a dir that exists ('.$conf->admin->dir_temp.'/file.csv'.')'); // Should be 1 + $this->assertGreaterThanOrEqual(1, $result, 'copy file ('.$file.') into a dir that exists ('.$conf->admin->dir_temp.'/file.csv)'); // Should be 1 // Again to test with overwriting=0 $result=dol_copy($file, $conf->admin->dir_temp.'/file.csv', 0, 0); From 31157931a94ceebbdd49907d4f5198d8161a52dc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 26 Apr 2020 23:52:23 +0200 Subject: [PATCH 107/456] Fix phpcs --- htdocs/accountancy/index.php | 20 +++++++++---------- .../accountancy/journal/purchasesjournal.php | 8 ++++---- htdocs/admin/tools/dolibarr_export.php | 2 +- htdocs/bom/tpl/objectline_create.tpl.php | 2 +- htdocs/comm/mailing/advtargetemailing.php | 16 +++++++-------- .../mailing/class/advtargetemailing.class.php | 8 ++++---- htdocs/core/class/html.form.class.php | 3 +-- htdocs/core/lib/pdf.lib.php | 2 +- htdocs/fourn/facture/rapport.php | 3 ++- htdocs/install/repair.php | 12 +++++------ htdocs/mrp/mo_production.php | 2 +- htdocs/opensurvey/results.php | 4 ++-- htdocs/product/stock/replenish.php | 20 +++++++++---------- htdocs/product/stock/replenishorders.php | 10 ++++++---- htdocs/public/members/public_list.php | 2 +- htdocs/ticket/card.php | 2 +- htdocs/website/index.php | 4 ++-- 17 files changed, 61 insertions(+), 59 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 4d64c7666d8..2379c31ce53 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -101,13 +101,13 @@ if ($conf->accounting->enabled) // STEPS $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''.''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''); print "
    \n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''.''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''); print "
    \n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''.''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''); print "
    \n"; print "
    \n"; @@ -116,11 +116,11 @@ if ($conf->accounting->enabled) print "
    \n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''.''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); print "
    \n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").''.'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'')."\n"; print "
    \n"; $step++; @@ -145,7 +145,7 @@ if ($conf->accounting->enabled) if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several. { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''.''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''); print "
    \n"; } /* @@ -169,7 +169,7 @@ if ($conf->accounting->enabled) }*/ $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''.''); + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''); print "
    \n"; @@ -186,17 +186,17 @@ if ($conf->accounting->enabled) $langs->loadLangs(array('bills', 'trips')); $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), ''.''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").''.'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsCustomers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'')."\n"; print "
    \n"; $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), ''.''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").''.'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("BillsSuppliers"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'')."\n"; print "
    \n"; if (!empty($conf->expensereport->enabled) || !empty($conf->deplacement->enabled)) { $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), ''.''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").''.'')."\n"; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv("ExpenseReports"), ''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'')."\n"; print "
    \n"; } diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 59bfd561c6c..42bff74097f 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -959,15 +959,15 @@ if (empty($action) || $action == 'view') { foreach ($tabother[$key] as $k => $mt) { if ($mt) { print ''; - print ""; + print ''; print "".$date.""; print "".$invoicestatic->getNomUrl(1).""; // Account - print ""; + print ''; $accountoshow = length_accountg($k); - if (($accountoshow == "") || $accountoshow == 'NotDefined') + if ($accountoshow == '' || $accountoshow == 'NotDefined') { - print ''.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("NPR counterpart").'). Set ACCOUNTING_COUNTERPART_VAT_NPR to the subvention account'.''; + print ''.$langs->trans("VATAccountNotDefined").' ('.$langs->trans("NPR counterpart").'). Set ACCOUNTING_COUNTERPART_VAT_NPR to the subvention account'; } else print $accountoshow; print ''; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 68bbd03162f..f88563ff512 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -303,7 +303,7 @@ if (in_array($type, array('mysql', 'mysqli'))) { print '
    '; print '
    '.$langs->trans('ExportStructure').''; - print ''; + print ''; print ''; print '
    '; print '
    '; diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index be7eb3e775f..eeffb625381 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -74,7 +74,7 @@ if ($nolinesbefore) { print ' '; print ''; } -print ''; +print ''; $coldisplay = 0; // Adds a line numbering column diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index b716790aa8f..d4db9fc6ea9 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -147,15 +147,15 @@ if ($action == 'add') { if (preg_match("/st_dt/", $key)) { $dtarr = array(); $dtarr = explode('_', $key); - if (!array_key_exists('options_'.$dtarr[1].'_st_dt'.'_cnct', $array_query)) { - $array_query['options_'.$dtarr[1].'_st_dt'.'_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear'.'_cnct', 'int')); + if (!array_key_exists('options_'.$dtarr[1].'_st_dt_cnct', $array_query)) { + $array_query['options_'.$dtarr[1].'_st_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear_cnct', 'int')); } } elseif (preg_match("/end_dt/", $key)) { // Special case for end date come with 3 inputs day, month, year $dtarr = array(); $dtarr = explode('_', $key); - if (!array_key_exists('options_'.$dtarr[1].'_end_dt'.'_cnct', $array_query)) { - $array_query['options_'.$dtarr[1].'_end_dt'.'_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear'.'_cnct', 'int')); + if (!array_key_exists('options_'.$dtarr[1].'_end_dt_cnct', $array_query)) { + $array_query['options_'.$dtarr[1].'_end_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear_cnct', 'int')); } } else { $array_query[$key] = GETPOST($key); @@ -299,15 +299,15 @@ if ($action == 'savefilter' || $action == 'createfilter') { if (preg_match("/st_dt/", $key)) { $dtarr = array(); $dtarr = explode('_', $key); - if (!array_key_exists('options_'.$dtarr[1].'_st_dt'.'_cnct', $array_query)) { - $array_query['options_'.$dtarr[1].'_st_dt'.'_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear'.'_cnct', 'int')); + if (!array_key_exists('options_'.$dtarr[1].'_st_dt_cnct', $array_query)) { + $array_query['options_'.$dtarr[1].'_st_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_st_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_st_dtyear_cnct', 'int')); } } elseif (preg_match("/end_dt/", $key)) { // Special case for end date come with 3 inputs day, month, year $dtarr = array(); $dtarr = explode('_', $key); - if (!array_key_exists('options_'.$dtarr[1].'_end_dt'.'_cnct', $array_query)) { - $array_query['options_'.$dtarr[1].'_end_dt'.'_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday'.'_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear'.'_cnct', 'int')); + if (!array_key_exists('options_'.$dtarr[1].'_end_dt_cnct', $array_query)) { + $array_query['options_'.$dtarr[1].'_end_dt_cnct'] = dol_mktime(0, 0, 0, GETPOST('options_'.$dtarr[1].'_end_dtmonth_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtday_cnct', 'int'), GETPOST('options_'.$dtarr[1].'_end_dtyear_cnct', 'int')); // print $array_query['cnct_options_'.$dtarr[1].'_end_dt']; // 01/02/1013=1361228400 } diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 83ea16641fe..7bb73a61c9f 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -724,13 +724,13 @@ class AdvanceTargetingMailing extends CommonObject } } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { - if (!empty($arrayquery['options_'.$key.'_max'.'_cnct'])) { - $sqlwhere[] = " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'.'_cnct'].")"; + if (!empty($arrayquery['options_'.$key.'_max_cnct'])) { + $sqlwhere[] = " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min_cnct'].")"; } } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { - if (!empty($arrayquery['options_'.$key.'_end_dt'.'_cnct'])) { - $sqlwhere[] = " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'.'_cnct'])."')"; + if (!empty($arrayquery['options_'.$key.'_end_dt_cnct'])) { + $sqlwhere[] = " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt_cnct'])."')"; } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key.'_cnct'] != '') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 954a996b0a8..05174f176b0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6652,8 +6652,7 @@ class Form $out .= 'function formatSelection(record) {'."\n"; if ($elemtype == 'category') { - $out .= ' //return \' \'+record.text+\'\'; - return \' \'+record.text+\'\';'; + $out .= 'return \' \'+record.text+\'\';'; } else { diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index d31baf70b69..63789a18e62 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -914,7 +914,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ // // become // - $newfreetext = preg_replace('/()/', '\1'.'file:/'.DOL_DATA_ROOT.'/medias/\2\3', $newfreetext); + $newfreetext = preg_replace('/()/', '\1file:/'.DOL_DATA_ROOT.'/medias/\2\3', $newfreetext); $line .= $outputlangs->convToOutputCharset($newfreetext); } diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index 391c44a2f03..f0bf2d85dd1 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -157,13 +157,14 @@ if ($year) { $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; - print ''.''.img_pdf().' '.$file.''; + print ''.img_pdf().' '.$file.''; print ''.dol_print_size(dol_filesize($tfile)).''; print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; } } closedir($handle); } + print ''; } } diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 2c99c28e7e5..034741c7c7e 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -1465,9 +1465,9 @@ if ($ok && GETPOST('repair_link_dispatch_lines_supplier_order_lines')) { } $qty_for_line = min($remaining_qty, $obj_line->qty); if ($first_iteration) { - $sql_attach = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch' - . ' SET fk_commandefourndet = '.$obj_line->rowid.', qty = '.$qty_for_line - . ' WHERE rowid = '.$obj_dispatch->rowid; + $sql_attach = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch'; + $sql_attach .= ' SET fk_commandefourndet = '.$obj_line->rowid.', qty = '.$qty_for_line; + $sql_attach .= ' WHERE rowid = '.$obj_dispatch->rowid; $first_iteration = false; } else { $sql_attach_values = array( @@ -1487,9 +1487,9 @@ if ($ok && GETPOST('repair_link_dispatch_lines_supplier_order_lines')) { ); $sql_attach_values = join(', ', $sql_attach_values); - $sql_attach = 'INSERT INTO '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch' - . ' (fk_commande, fk_product, fk_commandefourndet, qty, fk_entrepot, fk_user, datec, comment, status, tms, batch, eatby, sellby)' - . ' VALUES ('.$sql_attach_values.')'; + $sql_attach = 'INSERT INTO '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch'; + $sql_attach .= ' (fk_commande, fk_product, fk_commandefourndet, qty, fk_entrepot, fk_user, datec, comment, status, tms, batch, eatby, sellby)'; + $sql_attach .= ' VALUES ('.$sql_attach_values.')'; } if ($repair_link_dispatch_lines_supplier_order_lines == 'confirmed') diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 599cb094aac..f762ca9291c 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -667,7 +667,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print load_fiche_titre($langs->trans('Consumption'), '', '', 0, '', '', $newlinetext); print '
    '; - print ''; + print '
    '; print ''; print ''; diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index c7d712b4633..337ccb3e435 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -507,7 +507,7 @@ print ''."\n"; print ''; @@ -522,7 +522,7 @@ if (GETPOST('ajoutsujet')) print ''; print '
    '."\n"; - print "

    "."\n"; + print "

    \n"; // Add new column if ($object->format == "A") diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index ed83034bb6c..97d3871c027 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -588,16 +588,16 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entre { $stocklabel .= ' ('.$langs->trans("AllWarehouses").')'; } -print '
    '. - ''. - ''. - ''. - ''. - ''. - ''. - ''. - ''. - ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; // Fields title search print '
    '; diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index 25f3e38a81b..42469b4dd2a 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -268,7 +268,9 @@ if ($resql) if ($showline) { $href = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$obj->rowid; + print ''; + // Ref print ''; + print ''; // Author $userstatic->id = $obj->fk_user_author; @@ -290,6 +289,7 @@ if ($resql) $txt = ' '; } print ''; + // Amount print ''; @@ -300,8 +300,10 @@ if ($resql) $date = '-'; } print ''; + // Statut print ''; + print ''; } $i++; diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php index 0514c5ad565..459926707b8 100644 --- a/htdocs/public/members/public_list.php +++ b/htdocs/public/members/public_list.php @@ -101,7 +101,7 @@ $form = new Form($db); $morehead = ''; if (!empty($conf->global->MEMBER_PUBLIC_CSS)) $morehead = ''; -else $morehead = ''; +else $morehead = ''; llxHeaderVierge($langs->trans("ListOfValidatedPublicMembers"), $morehead); diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index dbdb15bfedc..7f4601eb177 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -856,7 +856,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd // Creation date print ''; // Read date diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 0f684ca5232..32fa5d4eefb 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1232,7 +1232,7 @@ if ($action == 'updatecss') $csscontent .= ""."\n"; + $csscontent .= "// END PHP ?>\n"; dol_syslog("Save css content into ".$filecss); From c0821a8ed680f3e4df6a6cbff1d1c5bec2e88157 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 00:02:31 +0200 Subject: [PATCH 108/456] Fix phpcs --- .../accountancy/class/bookkeeping.class.php | 2 +- htdocs/admin/menus/index.php | 32 +++++++++++-------- htdocs/admin/notification.php | 2 +- htdocs/core/tpl/advtarget.tpl.php | 4 +-- htdocs/expedition/card.php | 14 ++++---- htdocs/website/index.php | 8 ++--- 6 files changed, 33 insertions(+), 29 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 43762c2d36a..0162a98394e 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -704,7 +704,7 @@ class BookKeeping extends CommonObject $sql .= ' WHERE 1 = 1'; $sql .= " AND entity IN (".getEntity('accountancy').")"; if (null !== $ref) { - $sql .= ' AND t.ref = '.'\''.$ref.'\''; + $sql .= " AND t.ref = '".$this->db->escape($ref)."'"; } else { $sql .= ' AND t.rowid = '.$id; } diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index cc83e019833..56251e48f7b 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -325,6 +325,22 @@ if ($conf->use_javascript_ajax) if (!empty($menu['langs'])) $langs->load($menu['langs']); $titre = $langs->trans($menu['titre']); + $entry = '
    '.$langs->trans("Product").'
    '; print ''.img_object($langs->trans('ShowOrder'), 'order').' '.$obj->ref.''; @@ -276,10 +278,7 @@ if ($resql) // Company $href = DOL_URL_ROOT.'/fourn/card.php?socid='.$obj->socid; - print ''. - ''. - img_object($langs->trans('ShowCompany'), 'company').' '. - $obj->name.''.img_object($langs->trans('ShowCompany'), 'company').' '.$obj->name.''.$txt.''.price($obj->total_ttc).''.$date.''.$commandestatic->LibStatut($obj->fk_statut, 5).'
    '.$langs->trans("DateCreation").''; print dol_print_date($object->datec, 'dayhour'); - print ' - '.$langs->trans("TimeElapsedSince").': '.''.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).''; + print ' - '.$langs->trans("TimeElapsedSince").': '.convertSecondToTime(roundUpToNextMultiple($now - $object->datec, 60)).''; print '
    '; + $entry .= '   '.$titre.''; + $entry .= ''; + $entry .= ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; + $entry .= ''.img_edit_add('default').' '; + $entry .= ''.img_delete('default').' '; + $entry .= '     '; + $entry .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; + $entry .= '
    '; + + $buttons = ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; + $buttons .= ''.img_edit_add('default').' '; + $buttons .= ''.img_delete('default').' '; + $buttons .= '     '; + $buttons .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; + $data[] = array( 'rowid'=>$menu['rowid'], 'module'=>$menu['module'], @@ -335,20 +351,8 @@ if ($conf->use_javascript_ajax) 'fk_mainmenu'=>$menu['fk_mainmenu'], 'fk_leftmenu'=>$menu['fk_leftmenu'], 'position'=>$menu['position'], - 'entry'=>'
    '. - '   '.$titre.''. - ''. - ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '. - ''.img_edit_add('default').' '. - ''.img_delete('default').' '. - '     '. - ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''. - '
    ', - 'buttons'=>''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '. - ''.img_edit_add('default').' '. - ''.img_delete('default').' '. - '     '. - ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").'' + 'entry'=>$entry, + 'buttons'=>$buttons ); $i++; } diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 0455fb961ae..97b09861a42 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -265,7 +265,7 @@ print ''.$langs->trans("Code").''; print ''.$langs->trans("Label").''; print ''.$langs->trans("FixedEmailTarget").''; print ''.$langs->trans("Threshold").''; -print ''.''; +print ''; print "\n"; foreach ($listofnotifiedevents as $notifiedevent) diff --git a/htdocs/core/tpl/advtarget.tpl.php b/htdocs/core/tpl/advtarget.tpl.php index f433366f112..23727e4ad97 100644 --- a/htdocs/core/tpl/advtarget.tpl.php +++ b/htdocs/core/tpl/advtarget.tpl.php @@ -486,9 +486,9 @@ if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { print ''; print '
    '.$langs->trans("AdvTgtStartDt").''; - print $form->selectDate('', 'options_'.$key.'_st_dt'.'_cnct'); + print $form->selectDate('', 'options_'.$key.'_st_dt_cnct'); print ''.$langs->trans("AdvTgtEndDt").''; - print $form->selectDate('', 'options_'.$key.'_end_dt'.'_cnct'); + print $form->selectDate('', 'options_'.$key.'_end_dt_cnct'); print '
    '; print ''."\n"; print $form->textwithpicto('', $langs->trans("AdvTgtSearchDtHelp"), 1, 'help'); diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 655ba8f060f..7fd2948480e 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2278,7 +2278,7 @@ elseif ($id || $ref) { print ''; // Qty to ship or shipped - print ''.''.''; + print ''; // Batch number managment if ($lines[$i]->entrepot_id == 0) { @@ -2291,7 +2291,7 @@ elseif ($id || $ref) // add a 0 qty lot row to be able to add a lot print ''; // Qty to ship or shipped - print ''.''.''; + print ''; // Batch number managment print ''.$formproduct->selectLotStock('', 'batchl'.$line_id.'_0', '', 1, 0, $lines[$i]->fk_product).''; print ''; @@ -2305,7 +2305,7 @@ elseif ($id || $ref) print ''; print ''; // Qty to ship or shipped - print ''.''.''; + print ''; // Warehouse source print ''.$formproduct->selectWarehouses($lines[$i]->entrepot_id, 'entl'.$line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).''; // Batch number managment @@ -2319,7 +2319,7 @@ elseif ($id || $ref) { print ''; // Qty to ship or shipped - print ''.''.''; + print ''; // Warehouse source print ''.$formproduct->selectWarehouses($detail_entrepot->entrepot_id, 'entl'.$detail_entrepot->line_id, '', 1, 0, $lines[$i]->fk_product, '', 1).''; // Batch number managment @@ -2338,11 +2338,11 @@ elseif ($id || $ref) print ''; print ''; // Qty to ship or shipped - print ''.''.''; + print ''; // Warehouse source - print ''.''; + print ''; // Batch number managment - print ''.''; + print ''; print ''; } } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 32fa5d4eefb..403473071f4 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -1263,7 +1263,7 @@ if ($action == 'updatecss') $jscontent .= ""."\n"; + $jscontent .= "// END PHP ?>\n"; $result = dolSaveJsFile($filejs, $jscontent); if (!$result) @@ -1329,7 +1329,7 @@ if ($action == 'updatecss') $manifestjsoncontent .= ""."\n"; + $manifestjsoncontent .= "// END PHP ?>\n"; $result = dolSaveManifestJson($filemanifestjson, $manifestjsoncontent); if (!$result) From 4c605283f5b515f6d9dddb0359a0fede90d574e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 00:09:21 +0200 Subject: [PATCH 109/456] Fix phpcs --- htdocs/accountancy/index.php | 4 ++-- htdocs/admin/dolistore/class/dolistore.class.php | 4 ++-- htdocs/comm/mailing/class/advtargetemailing.class.php | 4 ++-- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/ticket/card.php | 2 +- htdocs/ticket/class/ticket.class.php | 8 ++++---- htdocs/website/index.php | 4 +++- 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index 2379c31ce53..56cf674505b 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -124,12 +124,12 @@ if ($conf->accounting->enabled) print "
    \n"; $step++; - $textlink = ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''.''; + $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''; print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink); print "
    \n"; if (!empty($conf->tax->enabled)) { - $textlink = ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''.''; + $textlink = ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''; $step++; print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink); print "
    \n"; diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index d250203b3d8..230c588f7e4 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -267,8 +267,8 @@ class Dolistore // add image or default ? if ($product->id_default_image != '') { $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image; - $images = ''. - ''; + $images = ''; + $images .= ''; } else { $images = ''; } diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 7bb73a61c9f..b398235e8d8 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -725,12 +725,12 @@ class AdvanceTargetingMailing extends CommonObject } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { if (!empty($arrayquery['options_'.$key.'_max_cnct'])) { - $sqlwhere[] = " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min_cnct'].")"; + $sqlwhere[] = " (te.".$key." >= ".$arrayquery['options_'.$key.'_max_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min_cnct'].")"; } } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt_cnct'])) { - $sqlwhere[] = " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt_cnct'])."')"; + $sqlwhere[] = " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt_cnct'])."')"; } } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key.'_cnct'] != '') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 05174f176b0..25ed9f86625 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6642,7 +6642,7 @@ class Form $out .= 'function formatResult(record) {'."\n"; if ($elemtype == 'category') { - $out .= 'return \' \'+record.text+\'\';'; + $out .= 'return \' \'+record.text+\'\';'; } else { @@ -6652,7 +6652,7 @@ class Form $out .= 'function formatSelection(record) {'."\n"; if ($elemtype == 'category') { - $out .= 'return \' \'+record.text+\'\';'; + $out .= 'return \' \'+record.text+\'\';'; } else { diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 7f4601eb177..b9459a0e161 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -864,7 +864,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd if (!empty($object->date_read)) { print dol_print_date($object->date_read, 'dayhour'); print ' - '.$langs->trans("TicketTimeToRead").': '.convertSecondToTime(roundUpToNextMultiple($object->date_read - $object->datec, 60)).''; - print ' - '.$langs->trans("TimeElapsedSince").': '.''.convertSecondToTime(roundUpToNextMultiple($now - $object->date_read, 60)).''; + print ' - '.$langs->trans("TimeElapsedSince").': '.convertSecondToTime(roundUpToNextMultiple($now - $object->date_read, 60)).''; } print ''; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 85c900eaf55..f94599153f0 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1441,10 +1441,10 @@ class Ticket extends CommonObject if ($info_sendto['source'] == 'internal') { $url_internal_ticket = dol_buildpath('/ticket/card.php', 2).'?track_id='.$this->track_id; - $message .= "\n".$langs->transnoentities('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.''.$this->track_id.''."\n"; + $message .= "\n".$langs->transnoentities('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.$this->track_id.''."\n"; } else { $url_public_ticket = ($conf->global->TICKET_URL_PUBLIC_INTERFACE ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/' : dol_buildpath('/public/ticket/view.php', 2)).'?track_id='.$this->track_id; - $message .= "\n".$langs->transnoentities('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.''.$this->track_id.''."\n"; + $message .= "\n".$langs->transnoentities('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.$this->track_id.''."\n"; } $message .= "\n"; @@ -2510,7 +2510,7 @@ class Ticket extends CommonObject $url_internal_ticket = dol_buildpath('/ticket/card.php', 2).'?track_id='.$object->track_id; // altairis: make html link on url - $message .= "\n".$langs->trans('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.''.$object->track_id.''."\n"; + $message .= "\n".$langs->trans('TicketNotificationEmailBodyInfosTrackUrlinternal').' : '.$object->track_id.''."\n"; // Add global email address recipient if ($conf->global->TICKET_NOTIFICATION_ALSO_MAIN_ADDRESS && !in_array($conf->global->TICKET_NOTIFICATION_EMAIL_TO, $sendto)) { @@ -2572,7 +2572,7 @@ class Ticket extends CommonObject // If public interface is not enable, use link to internal page into mail $url_public_ticket = (!empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) ? (!empty($conf->global->TICKET_URL_PUBLIC_INTERFACE) ? $conf->global->TICKET_URL_PUBLIC_INTERFACE.'/view.php' : dol_buildpath('/public/ticket/view.php', 2)) : dol_buildpath('/ticket/card.php', 2)).'?track_id='.$object->track_id; - $message .= "\n".$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.''.$object->track_id.''."\n"; + $message .= "\n".$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.$object->track_id.''."\n"; // Build final message $message = $message_intro.$message; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 403473071f4..a617d9ae018 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2719,7 +2719,9 @@ if ($action == 'editcss') { $csscontent = GETPOST('WEBSITE_CSS_INLINE', 'none'); } - if (!trim($csscontent)) $csscontent = '/* CSS content (all pages) */'."\n"."body.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; }\n.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;}"; + if (!trim($csscontent)) { + $csscontent = '/* CSS content (all pages) */'."\nbody.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; }\n.bodywebsite h1 { margin-top: 0; margin-bottom: 0; padding: 10px;}"; + } if (!GETPOSTISSET('WEBSITE_JS_INLINE')) { From b90a6024f57097830be749a5eee755cc45b603af Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Mon, 27 Apr 2020 10:15:47 +0200 Subject: [PATCH 110/456] FIX: Wrong Sql on getListOfTowns api method --- htdocs/api/class/api_setup.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index 5174aae7221..1e1ab2f8307 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -603,7 +603,7 @@ class Setup extends DolibarrApi $sql = "SELECT rowid AS id, zip, town, fk_county, fk_pays AS fk_country"; $sql.= " FROM ".MAIN_DB_PREFIX."c_ziptown as t"; - $sql.= " AND t.active = ".$active; + $sql.= " WHERE t.active = ".$active; if ($zipcode) $sql.=" AND t.zip LIKE '%" . $this->db->escape($zipcode) . "%'"; if ($town) $sql.=" AND t.town LIKE '%" . $this->db->escape($town) . "%'"; // Add sql filters From 7f56c4a785b93f460f43a049257617faa0102d36 Mon Sep 17 00:00:00 2001 From: gauthier Date: Mon, 27 Apr 2020 11:18:53 +0200 Subject: [PATCH 111/456] FIX : Another "Access to undeclared static property: Contact::$table_element" && "Societe::$table_element" --- htdocs/comm/mailing/class/advtargetemailing.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index da1775955b7..6987a27dacd 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -615,7 +615,8 @@ class AdvanceTargetingMailing extends CommonObject //Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementtype = Societe::$table_element; + $socstatic = new Societe($this->db); + $elementtype = $socstatic->table_element; $extrafields->fetch_name_optionals_label($elementtype); @@ -752,7 +753,8 @@ class AdvanceTargetingMailing extends CommonObject //Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementtype = Contact::$table_element; + $contactstatic = new Contact($this->db); + $elementtype = $contactstatic->table_element; // fetch optionals attributes and labels dol_include_once('/core/class/extrafields.class.php'); @@ -854,7 +856,8 @@ class AdvanceTargetingMailing extends CommonObject //Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - $elementtype = Societe::$table_element; + $socstatic = new Societe($this->db); + $elementtype = $socstatic->table_element; // fetch optionals attributes and labels dol_include_once('/core/class/extrafields.class.php'); From 3c1d989c301314cda384debea133295a6a4668d3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 11:41:35 +0200 Subject: [PATCH 112/456] FIX #13751 --- htdocs/modulebuilder/template/.editorconfig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/.editorconfig b/htdocs/modulebuilder/template/.editorconfig index 3c4bd7d679d..d25f38c8b44 100644 --- a/htdocs/modulebuilder/template/.editorconfig +++ b/htdocs/modulebuilder/template/.editorconfig @@ -2,6 +2,7 @@ # top-most EditorConfig file root = true + # Unix-style newlines with a newline ending every file [*] charset = utf-8 @@ -11,9 +12,10 @@ insert_final_newline = true # PHP PSR-2 Coding Standards # http://www.php-fig.org/psr/psr-2/ [*.php] -indent_style = space +indent_style = tab indent_size = 4 trim_trailing_whitespace = true +insert_final_newline = true [*.js] indent_style = tab [*.css] From ed632877971d1de2d5f1b8790d17b4a2b9e34d6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 14:02:18 +0200 Subject: [PATCH 113/456] Fix font --- htdocs/langs/es_AR/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/es_AR/main.lang b/htdocs/langs/es_AR/main.lang index 1451ea1c508..a48f7399746 100644 --- a/htdocs/langs/es_AR/main.lang +++ b/htdocs/langs/es_AR/main.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - main DIRECTION=ltr -FONTFORPDF=helvética +FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=. SeparatorThousand=, From fdc0543b4d396287b4f35fe3c1f90cec9b54a221 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 27 Apr 2020 12:16:24 +0000 Subject: [PATCH 114/456] Fixing style errors. --- htdocs/contact/consumption.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index 3f95d6acd14..ad4b5ca08f5 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -150,8 +150,8 @@ if ($object->thirdparty->fournisseur) if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) $elementTypeArray['supplier_invoice'] = $langs->transnoentitiesnoconv('SuppliersInvoices'); if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) $elementTypeArray['supplier_order']= $langs->transnoentitiesnoconv('SuppliersOrders'); - // There no contact type for supplier proposals - // if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals'); + // There no contact type for supplier proposals + // if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $user->rights->supplier_proposal->lire) $elementTypeArray['supplier_proposal']=$langs->transnoentitiesnoconv('SupplierProposals'); } print ''; From 50d9f466d453c1e71bee17b8466340dd514d79ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 14:38:45 +0200 Subject: [PATCH 115/456] FIX #13749 --- htdocs/api/class/api.class.php | 9 +++++++++ htdocs/product/class/api_products.class.php | 18 +++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 6b106efc450..5e051420748 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -137,6 +137,15 @@ class DolibarrApi unset($object->labelStatus); unset($object->labelStatusShort); + unset($object->stats_propale); + unset($object->stats_commande); + unset($object->stats_contrat); + unset($object->stats_facture); + unset($object->stats_commande_fournisseur); + unset($object->stats_reception); + unset($object->stats_mrptoconsume); + unset($object->stats_mrptoproduce); + unset($object->element); unset($object->fk_element); unset($object->table_element); diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 315936d41eb..91162d727c3 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -734,8 +734,6 @@ class Products extends DolibarrApi } /** - * List purchase prices - * * Get a list of all purchase prices of products * * @param string $sortfield Sort field @@ -767,11 +765,11 @@ class Products extends DolibarrApi if ($supplier > 0) { $sql .= " AND s.fk_soc = ".$db->escape($supplier); } - $sql .= " AND s.fk_product = t.rowid "; + $sql .= " AND s.fk_product = t.rowid"; // Select products of given category if ($category > 0) { $sql .= " AND c.fk_categorie = ".$db->escape($category); - $sql .= " AND c.fk_product = t.rowid "; + $sql .= " AND c.fk_product = t.rowid"; } if ($mode == 1) { // Show only products @@ -804,10 +802,15 @@ class Products extends DolibarrApi while ($i < $min) { $obj = $db->fetch_object($result); - $product_static = new Product($db); - if ($product_static->fetch($obj->rowid)) { - $obj_ret[] = $this->_cleanObjectDatas($product_static); + + $product_fourn = new ProductFournisseur($this->db); + $product_fourn_list = $product_fourn->list_product_fournisseur_price($obj->rowid, '', '', 0, 0); + foreach($product_fourn_list as $tmpobj) { + $this->_cleanObjectDatas($tmpobj); } + //var_dump($product_fourn_list->db);exit; + $obj_ret[$obj->rowid] = $product_fourn_list; + $i++; } } @@ -1587,6 +1590,7 @@ class Products extends DolibarrApi unset($object->prices_by_qty_id); unset($object->libelle); unset($object->product_id_already_linked); + unset($object->reputations); unset($object->name); unset($object->firstname); From 581d4dbcd9ca421c64cedcb750298552b4d6f8ed Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 14:39:38 +0200 Subject: [PATCH 116/456] Look and feel v12 --- htdocs/expedition/card.php | 3 ++- htdocs/langs/es_AR/main.lang | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 7fd2948480e..605cc8316c9 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -960,8 +960,9 @@ if ($action == 'create') $langs->load("projects"); print ''; print ''.$langs->trans("Project").''; + print img_picto('', 'project'); $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid', 0); - print '   id).'">'.$langs->trans("AddProject").''; + print ' id).'">'; print ''; print ''; } diff --git a/htdocs/langs/es_AR/main.lang b/htdocs/langs/es_AR/main.lang index 1451ea1c508..a48f7399746 100644 --- a/htdocs/langs/es_AR/main.lang +++ b/htdocs/langs/es_AR/main.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - main DIRECTION=ltr -FONTFORPDF=helvética +FONTFORPDF=helvetica FONTSIZEFORPDF=10 SeparatorDecimal=. SeparatorThousand=, From ed045b26736523cbbf82fc1f8c13081f671192f7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 14:38:45 +0200 Subject: [PATCH 117/456] FIX #13749 --- htdocs/api/class/api.class.php | 9 +++++++++ htdocs/product/class/api_products.class.php | 18 +++++++++++------- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 26f83f36fd6..46431cdb510 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -137,6 +137,15 @@ class DolibarrApi unset($object->labelStatus); unset($object->labelStatusShort); + unset($object->stats_propale); + unset($object->stats_commande); + unset($object->stats_contrat); + unset($object->stats_facture); + unset($object->stats_commande_fournisseur); + unset($object->stats_reception); + unset($object->stats_mrptoconsume); + unset($object->stats_mrptoproduce); + unset($object->element); unset($object->fk_element); unset($object->table_element); diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 0cf6b344abf..b1fee0177d6 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -669,8 +669,6 @@ class Products extends DolibarrApi } /** - * List purchase prices - * * Get a list of all purchase prices of products * * @param string $sortfield Sort field @@ -702,11 +700,11 @@ class Products extends DolibarrApi if ($supplier > 0) { $sql .= " AND s.fk_soc = ".$db->escape($supplier); } - $sql .= " AND s.fk_product = t.rowid "; + $sql .= " AND s.fk_product = t.rowid"; // Select products of given category if ($category > 0) { $sql .= " AND c.fk_categorie = ".$db->escape($category); - $sql .= " AND c.fk_product = t.rowid "; + $sql .= " AND c.fk_product = t.rowid"; } if ($mode == 1) { // Show only products @@ -739,10 +737,15 @@ class Products extends DolibarrApi while ($i < $min) { $obj = $db->fetch_object($result); - $product_static = new Product($db); - if ($product_static->fetch($obj->rowid)) { - $obj_ret[] = $this->_cleanObjectDatas($product_static); + + $product_fourn = new ProductFournisseur($this->db); + $product_fourn_list = $product_fourn->list_product_fournisseur_price($obj->rowid, '', '', 0, 0); + foreach($product_fourn_list as $tmpobj) { + $this->_cleanObjectDatas($tmpobj); } + //var_dump($product_fourn_list->db);exit; + $obj_ret[$obj->rowid] = $product_fourn_list; + $i++; } } @@ -1527,6 +1530,7 @@ class Products extends DolibarrApi unset($object->prices_by_qty_id); unset($object->libelle); unset($object->product_id_already_linked); + unset($object->reputations); unset($object->name); unset($object->firstname); From 6b1a1e5e587c1bd2e7b2d4a8130d10952b3d8a3f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 15:09:27 +0200 Subject: [PATCH 118/456] FIX #13743 --- htdocs/commande/class/api_orders.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 289bbea2c7e..ab0abb3d151 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -33,7 +33,8 @@ class Orders extends DolibarrApi * @var array $FIELDS Mandatory fields, checked when create and update object */ static $FIELDS = array( - 'socid' + 'socid', + 'date' ); /** @@ -233,7 +234,9 @@ class Orders extends DolibarrApi } /** - * Create order object + * Create a sale order + * + * Exemple: { "socid": 2, "date": 1595196000, "type": 0, "lines": [{ "fk_product": 2, "qty": 1 }] } * * @param array $request_data Request data * @return int ID of order From 635b9bb0fee53252f5cd5442045032614a8086ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 15:27:03 +0200 Subject: [PATCH 119/456] FIX #13641 --- htdocs/core/tpl/extrafields_list_search_sql.tpl.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php index 3a0bcf6375c..6b08baddb72 100644 --- a/htdocs/core/tpl/extrafields_list_search_sql.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_sql.tpl.php @@ -33,12 +33,12 @@ if (! empty($extrafieldsobjectkey) && ! empty($search_array_options) && is_array $sql.= ")"; } } - elseif ($crit != '' && (! in_array($typ, array('select','sellist')) || $crit != '0') && (! in_array($typ, array('link')) || $crit != '-1')) + elseif ($crit != '' && (! in_array($typ, array('select', 'sellist')) || $crit != '0') && (! in_array($typ, array('link')) || $crit != '-1')) { $mode_search=0; - if (in_array($typ, array('int','double','real'))) $mode_search=1; // Search on a numeric - if (in_array($typ, array('sellist','link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int - if (in_array($typ, array('chkbxlst','checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text + if (in_array($typ, array('int', 'double', 'real', 'price'))) $mode_search=1; // Search on a numeric + if (in_array($typ, array('sellist', 'link')) && $crit != '0' && $crit != '-1') $mode_search=2; // Search on a foreign key int + if (in_array($typ, array('chkbxlst', 'checkbox'))) $mode_search=4; // Search on a multiselect field with sql type = text if (is_array($crit)) $crit = implode(' ', $crit); // natural_search() expects a string elseif ($typ === 'select' and is_string($crit) and strpos($crit, ' ') === false) { $sql .= ' AND (' . $extrafieldsobjectprefix.$tmpkey . ' = "' . $db->escape($crit) . '")'; From fe6fb12d189825fdec451cb9dfe4ca69be0f7d13 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 17:13:23 +0200 Subject: [PATCH 120/456] Fix missing link --- htdocs/core/class/notify.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 7a3508c7d2f..c0258bdec90 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -314,6 +314,7 @@ class Notify global $user, $conf, $langs, $mysoc; global $hookmanager; global $dolibarr_main_url_root; + global $action; if (!in_array($notifcode, $this->arrayofnotifsupported)) return 0; @@ -526,6 +527,8 @@ class Notify if ($link) $message .= "\n".$urlwithroot.$link; $parameters = array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list); + if (!isset($action)) $action = ''; + $reshook = $hookmanager->executeHooks('formatNotificationMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { @@ -700,21 +703,25 @@ class Notify $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref); break; case 'EXPENSE_REPORT_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref); break; case 'EXPENSE_REPORT_APPROVE': + $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref); break; case 'HOLIDAY_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref); break; case 'HOLIDAY_APPROVE': + $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref); From 0de8cb7096ba8242f4fec221dbe4f9d76c5859ad Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 18:38:11 +0200 Subject: [PATCH 121/456] Add property shortlang --- htdocs/core/class/translate.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 5ea1a321bb5..4f3930a4588 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -32,6 +32,7 @@ class Translate public $dir; // Directories that contains /langs subdirectory public $defaultlang; // Current language for current user + public $shortlang; // Short language for current user public $charset_output = 'UTF-8'; // Codage used by "trans" method outputs public $tab_translate = array(); // Array of all translations key=>value @@ -122,6 +123,7 @@ class Translate } $this->defaultlang = $srclang; + $this->shortlang = substr($srclang, 0, 2); //print 'this->defaultlang='.$this->defaultlang; } From 12e090eed6a0bd4834563636323aca4e00b1e3fc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 18:48:35 +0200 Subject: [PATCH 122/456] Fix search in correct language --- htdocs/core/lib/website.lib.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index 76e910bdecd..ed535b6af6d 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -720,9 +720,10 @@ function getSocialNetworkSharingLinks() * @param int $max Max number of answers * @param string $sortfield Sort Fields * @param string $sortorder Sort order ('DESC' or 'ASC') + * @param string $langcode Language code ('' or 'en', 'fr', 'es', ...) * @return string HTML content */ -function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC') +function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '') { global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers. @@ -764,6 +765,9 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so { $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'website_page'; $sql .= " WHERE fk_website = ".$website->id; + if ($langcode) { + $sql .= " AND lang ='".$db->escape($langcode).'"'; + } if ($type) { $tmparrayoftype = explode(',', $type); $typestring = ''; From a8613661fc16a5d709dddab505614a07f78307f7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 19:03:04 +0200 Subject: [PATCH 123/456] Fix sql --- htdocs/core/lib/website.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index ed535b6af6d..5eac4469c4e 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -766,7 +766,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'website_page'; $sql .= " WHERE fk_website = ".$website->id; if ($langcode) { - $sql .= " AND lang ='".$db->escape($langcode).'"'; + $sql .= " AND lang ='".$db->escape($langcode)."'"; } if ($type) { $tmparrayoftype = explode(',', $type); From 9764c85ee3abda4680bedaa7ac0e46c584ccfd4a Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Mon, 27 Apr 2020 19:15:17 +0200 Subject: [PATCH 124/456] FIX files download by API/entity TODO need more clean of this file with multicompany --- htdocs/core/lib/files.lib.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 9746c1047b8..288a28c111a 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2419,7 +2419,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $original_file = $conf->agenda->dir_output.'/'.$original_file; } // Wrapping for categories - elseif ($modulepart == 'category' && !empty($conf->categorie->dir_output)) + elseif ($modulepart == 'category' && !empty($conf->categorie->multidir_output[$entity])) { if (empty($entity) || empty($conf->categorie->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->categorie->{$lire}) $accessallowed = 1; @@ -2489,7 +2489,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for third parties - elseif (($modulepart == 'company' || $modulepart == 'societe' || $modulepart == 'thirdparty') && !empty($conf->societe->dir_output)) + elseif (($modulepart == 'company' || $modulepart == 'societe' || $modulepart == 'thirdparty') && !empty($conf->societe->multidir_output[$entity])) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->societe->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2501,7 +2501,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for contact - elseif ($modulepart == 'contact' && !empty($conf->societe->dir_output)) + elseif ($modulepart == 'contact' && !empty($conf->societe->multidir_output[$entity])) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->societe->{$lire}) @@ -2519,7 +2519,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->facture->multidir_output[$entity].'/'.$original_file; - $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; + $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('invoice').")"; } // Wrapping for mass actions elseif ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->multidir_output[$entity])) @@ -2632,7 +2632,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->propal->multidir_output[$entity].'/'.$original_file; - $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."propal WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; + $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."propal WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('propal').")"; } // Wrapping pour les commandes @@ -2643,7 +2643,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->commande->multidir_output[$entity].'/'.$original_file; - $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."commande WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; + $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."commande WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('order').")"; } // Wrapping pour les projets From 52fc149faa851de95f9ba1298b1cf4dff4d47245 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 01:04:37 +0200 Subject: [PATCH 125/456] Fix permissions --- htdocs/index.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index 477168a0a59..7fed7d75bb3 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2015 Marcos García @@ -153,12 +153,12 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) // Condition to be checked for each display line dashboard $conditions = array( 'users' => $user->rights->user->user->lire, - 'members' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), - 'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), - 'prospects' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), - 'suppliers' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, - 'contacts' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire, - 'products' => !empty($conf->product->enabled) && $user->rights->produit->lire, + 'members' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire, + 'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), + 'prospects' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), + 'suppliers' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), + 'contacts' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, + 'services' => !empty($conf->product->enabled) && $user->rights->produit->lire, 'services' => !empty($conf->service->enabled) && $user->rights->service->lire, 'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire, 'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire, From fb8bdefbaa6fc3d75779c1ae3d13bcd120c76d62 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 02:10:26 +0200 Subject: [PATCH 126/456] Look and feel v12 --- htdocs/compta/facture/prelevement.php | 6 +- htdocs/compta/prelevement/bons.php | 22 ++--- .../class/bonprelevement.class.php | 3 + htdocs/compta/prelevement/list.php | 81 ++++++++++++------- htdocs/core/menus/standard/eldy.lib.php | 34 -------- .../install/mysql/migration/11.0.0-12.0.0.sql | 10 ++- .../mysql/tables/llx_prelevement_bons.sql | 6 +- .../mysql/tables/llx_prelevement_facture.sql | 3 +- .../llx_prelevement_facture_demande.sql | 3 +- htdocs/theme/eldy/global.inc.php | 2 +- 10 files changed, 88 insertions(+), 82 deletions(-) diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 337aea12033..74de1c640d4 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -24,7 +24,7 @@ /** * \file htdocs/compta/facture/prelevement.php * \ingroup facture - * \brief Gestion des prelevement d'une facture + * \brief Management of direct debit order of invoices */ require '../../main.inc.php'; @@ -32,9 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; -if (!empty($conf->projet->enabled)) { - require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; -} +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (!$user->rights->facture->lire) accessforbidden(); diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 935b57e0faa..8c9203c8a58 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -31,12 +31,14 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'widthdrawals')); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search + // Security check $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); @@ -101,7 +103,10 @@ if ($result) $num = $db->num_rows($result); $i = 0; - $urladd = "&statut=".$statut; + $param = ''; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + $param .= "&statut=".urlencode($statut); $selectedfields = ''; @@ -119,10 +124,9 @@ if ($result) print ''; print ''; print ''; - print ''; print ''; - print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("WithdrawalsReceipts"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1); $moreforfilter = ''; @@ -141,11 +145,11 @@ if ($result) print ''; print ''; - print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref", '', '', 'class="liste_titre"', $sortfield, $sortorder); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", "", 'class="liste_titre" align="center"', $sortfield, $sortorder); - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", "", 'class="right"', $sortfield, $sortorder); - print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'class="right"', $sortfield, $sortorder); - print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; + print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); + print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center ')."\n"; print "\n"; $directdebitorder = new BonPrelevement($db); diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index df1ecf094ca..0a033e2df53 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1229,6 +1229,9 @@ class BonPrelevement extends CommonObject $label = ''.$langs->trans("ShowWithdraw").''; $label .= '
    '; $label .= ''.$langs->trans('Ref').': '.$this->ref; + if (isset($this->statut)) { + $label .= '
    '.$langs->trans("Status").": ".$this->getLibStatut(5); + } $url = DOL_URL_ROOT.'/compta/prelevement/card.php?id='.$this->id; diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index bbac6c6232e..5598168a436 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -32,12 +32,21 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'withdrawals', 'companies', 'categories')); +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) +$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + // Security check $socid = GETPOST('socid', 'int'); if ($user->socid) $socid=$user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); - $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); @@ -57,7 +66,7 @@ $statut = GETPOST('statut', 'int'); $bon = new BonPrelevement($db, ""); $ligne = new LignePrelevement($db, $user); - +$company = new Societe($db); /* * Actions @@ -81,9 +90,9 @@ $form = new Form($db); llxHeader('', $langs->trans("WithdrawalsLines")); -$sql = "SELECT p.rowid, p.ref, p.statut, p.datec"; -$sql .= " ,f.rowid as facid, f.ref, f.total_ttc"; -$sql .= " , s.rowid as socid, s.nom as name, s.code_client"; +$sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec"; +$sql .= " ,f.rowid as facid, f.ref as invoiceref, f.total_ttc"; +$sql .= " , s.rowid as socid, s.nom as name, s.code_client, s.email"; $sql .= " , pl.amount, pl.statut as statut_ligne, pl.rowid as rowid_ligne"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql .= " , ".MAIN_DB_PREFIX."prelevement_lignes as pl"; @@ -124,14 +133,21 @@ if ($result) $num = $db->num_rows($result); $i = 0; - $urladd = "&statut=".$statut; - $urladd .= "&search_bon=".$search_bon; - if ($limit > 0 && $limit != $conf->liste_limit) $urladd .= '&limit='.urlencode($limit); + $param = "&statut=".urlencode($statut); + $param .= "&search_bon=".urlencode($search_bon); + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); print"\n\n"; - print ''; + print ''."\n"; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); + print_barre_liste($langs->trans("WithdrawalsLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 0, 0, 1); $moreforfilter = ''; @@ -153,13 +169,13 @@ if ($result) print ''; print ''; - print_liste_field_titre("Line", $_SERVER["PHP_SELF"]); - print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref"); - print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $urladd); - print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom"); - print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', '', 'align="center"'); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", "", 'align="center"'); - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", "", 'class="right"'); + print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); + print_liste_field_titre("WithdrawalsReceipts", $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); + print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder); + print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder); + print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", '', $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre(''); print "\n"; @@ -167,28 +183,37 @@ if ($result) { $obj = $db->fetch_object($result); - print ''; + $bon->ref = $obj->ref; + $bon->statut = $obj->status; + $company->id = $obj->socid; + $company->name = $obj->name; + $company->email = $obj->email; + $company->code_client = $obj->code_client; + + print ''; + + print ''; print $ligne->LibStatut($obj->statut_ligne, 2); print " "; - print ''; print substr('000000'.$obj->rowid_ligne, -6); print ''; print ''; + print $bon->getNomUrl(1); + print "\n"; - print $bon->LibStatut($obj->statut, 2); - print " "; - - print ''.$obj->ref."\n"; - - print ''; + print ''; + print ''; print img_object($langs->trans("ShowBill"), "bill"); - print ' '.$obj->ref."\n"; - print ''; + print ' '.$obj->invoiceref."\n"; + print ''; + print ''; - print ''.$obj->name."\n"; + print ''; + print $company->getNomUrl(1); + print "\n"; print ''.$obj->code_client."\n"; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 01b361aa6b3..8566575e5ca 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1905,40 +1905,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu = $menuArbo->menuLeftCharger($newmenu, $mainmenu, $leftmenu, (empty($user->socid) ? 0 : 1), 'eldy', $tabMenu); //var_dump($newmenu->liste); // - // We update newmenu for special dynamic menus - if (!empty($user->rights->banque->lire) && $mainmenu == 'bank') // Entry for each bank account - { - require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - - $sql = "SELECT rowid, label, courant, rappro"; - $sql .= " FROM ".MAIN_DB_PREFIX."bank_account"; - $sql .= " WHERE entity = ".$conf->entity; - $sql .= " AND clos = 0"; - $sql .= " ORDER BY label"; - - $resql = $db->query($sql); - if ($resql) - { - $numr = $db->num_rows($resql); - $i = 0; - - if ($numr > 0) $newmenu->add('/compta/bank/list.php', $langs->trans("BankAccounts"), 0, $user->rights->banque->lire); - - while ($i < $numr) - { - $objp = $db->fetch_object($resql); - $newmenu->add('/compta/bank/card.php?id='.$objp->rowid, $objp->label, 1, $user->rights->banque->lire); - if ($objp->rappro && $objp->courant != Account::TYPE_CASH && empty($objp->clos)) // If not cash account and not closed and can be reconciliate - { - $newmenu->add('/compta/bank/bankentries_list.php?action=reconcile&contextpage=banktransactionlist-'.$objp->rowid.'&account='.$objp->rowid.'&id='.$objp->rowid.'&search_conciliated=0', $langs->trans("Conciliate"), 2, $user->rights->banque->consolidate); - } - $i++; - } - } - else dol_print_error($db); - $db->free($resql); - } - if (!empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP { $MAXFTP = 20; diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 4b87b4b9ce3..4f6a5b7c4e6 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -261,4 +261,12 @@ ALTER TABLE llx_categorie ADD COLUMN fk_user_modif integer; ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commandefourndet FOREIGN KEY (fk_commandefourndet) REFERENCES llx_commande_fournisseurdet (rowid); ---Dictionary of package type because filename in V11 was incomplete + +-- VMYSQL4.3 ALTER TABLE llx_prelevement_facture_demande MODIFY COLUMN fk_facture INTEGER NULL; +-- VPGSQL8.2 ALTER TABLE llx_prelevement_facture_demande ALTER COLUMN fk_facture DROP NOT NULL; +ALTER TABLE llx_prelevement_facture_demande ADD COLUMN fk_facture_fourn INTEGER NULL; + +-- VMYSQL4.3 ALTER TABLE llx_prelevement_facture MODIFY COLUMN fk_facture INTEGER NULL; +-- VPGSQL8.2 ALTER TABLE llx_prelevement_facture ALTER COLUMN fk_facture DROP NOT NULL; +ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; + diff --git a/htdocs/install/mysql/tables/llx_prelevement_bons.sql b/htdocs/install/mysql/tables/llx_prelevement_bons.sql index 2a8fd114440..e7e0b9a89f1 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_bons.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_bons.sql @@ -18,10 +18,10 @@ -- =================================================================== -- --- Bons de prelevement +-- Direct debit or credit orders -- --- statut 1 : transmis a la banque --- statut 2 : credite +-- statut 1 : sent to the bank +-- statut 2 : paid -- create table llx_prelevement_bons ( diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture.sql b/htdocs/install/mysql/tables/llx_prelevement_facture.sql index 2524f854a9c..dbe2cb85f84 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_facture.sql @@ -19,7 +19,8 @@ create table llx_prelevement_facture ( rowid integer AUTO_INCREMENT PRIMARY KEY, - fk_facture integer NOT NULL, + fk_facture integer NULL, + fk_facture_foun integer NULL, fk_prelevement_lignes integer NOT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql b/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql index b1f625de872..4e1f37c6d3f 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql @@ -21,7 +21,8 @@ create table llx_prelevement_facture_demande ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, - fk_facture integer NOT NULL, + fk_facture integer NULL, + fk_facture_fourn integer NULL, sourcetype varchar(32), amount double(24,8) NOT NULL, date_demande datetime NOT NULL, diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index e495a3bb4bc..9a152fdb91f 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -149,7 +149,7 @@ input[name=duration_value] { margin-right: 4px; } -input[type=submit] { +input[type=submit], input[type=submit]:hover { margin-left: 5px; } input, input.flat, form.flat select, select, select.flat, .dataTables_length label select { From a40c2fdbfc9a27759969e090398f7fc6c08efc5d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 02:58:33 +0200 Subject: [PATCH 127/456] Debug v12 --- htdocs/core/menus/init_menu_auguria.sql | 25 +++++++++++----- htdocs/core/menus/standard/auguria.lib.php | 30 ++++++++++++------- htdocs/core/menus/standard/auguria_menu.php | 2 +- htdocs/core/menus/standard/eldy_menu.php | 2 -- .../install/mysql/migration/11.0.0-12.0.0.sql | 1 + htdocs/install/mysql/tables/llx_menu.sql | 2 +- 6 files changed, 40 insertions(+), 22 deletions(-) diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 19ef1f59d02..ede2a9f94d3 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -9,15 +9,16 @@ delete from llx_menu where menu_handler=__HANDLER__ and entity=__ENTITY__; -- table llx_menu -- insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', 1__+MAX_llx_menu__, __HANDLER__, 'top', 'home', '', 0, '/index.php?mainmenu=home&leftmenu=', 'Home', -1, '', '', '', 2, 10, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur|supplier_order|supplier_invoice', '( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('societe|fournisseur|supplier_order|supplier_invoice', '($conf->societe->enabled && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) || $conf->fournisseur->enabled || $conf->supplier_order->enabled || $conf->supplier_invoice->enabled))', 2__+MAX_llx_menu__, __HANDLER__, 'top', 'companies', '', 0, '/societe/index.php?mainmenu=companies&leftmenu=', 'ThirdParties', -1, 'companies', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 20, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('product|service', '$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, __HANDLER__, 'top', 'products', '', 0, '/product/index.php?mainmenu=products&leftmenu=', 'ProductsPipeServices', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 30, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('bom|mrp', '$conf->bom->enabled || $conf->mrp->enabled', 16__+MAX_llx_menu__, __HANDLER__, 'top', 'mrp', '', 0, '/mrp/index.php?mainmenu=mrp&leftmenu=', 'MRP', -1, 'mrp', '$user->rights->bom->read||$user->rights->mrp->read', '', 0, 31, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 32, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('propal|commande|fournisseur|supplier_order|supplier_invoice|contrat|ficheinter', '$conf->propal->enabled || $conf->commande->enabled || $conf->supplier_order->enabled || $conf->contrat->enabled || $conf->ficheinter->enabled', 5__+MAX_llx_menu__, __HANDLER__, 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 40, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('facture|don|tax|salaries|loan|banque', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->don->enabled || $conf->tax->enabled || $conf->salaries->enabled || $conf->supplier_invoice->enabled || $conf->loan->enabled || $conf->banque->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'billing', '', 0, '/compta/index.php?mainmenu=billing&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->facture->lire|| $user->rights->don->lire || $user->rights->tax->charges->lire || $user->rights->salaries->read || $user->rights->loan->read || $user->rights->banque->lire', '', 2, 50, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 52, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|asset', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->asset->enabled', 9__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=accountancy', 'MenuAccountancy', -1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire || $user->rights->asset->read', '', 2, 54, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 70, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '', '', 2, 90, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('adherent', '$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 110, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('adherent', '$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 19, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('hrm|holiday|deplacement|expensereport', '$conf->hrm->enabled || $conf->holiday->enabled || $conf->deplacement->enabled || $conf->expensereport->enabled', 15__+MAX_llx_menu__, __HANDLER__, 'top', 'hrm', '', 0, '/hrm/index.php?mainmenu=hrm&leftmenu=', 'HRM', -1, 'holiday', '$user->rights->hrm->employee->read || $user->rights->holiday->write || $user->rights->deplacement->lire || $user->rights->expensereport->lire', '', 0, 80, __ENTITY__); -- Home - Dashboard @@ -159,10 +160,10 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled && $leftmenu=="orders"', __HANDLER__, 'left', 1208__+MAX_llx_menu__, 'commercial', '', 1202__+MAX_llx_menu__, '/commande/list.php?mainmenu=commercial&leftmenu=orders&search_status=-1', 'StatusOrderCanceledShort', 1, 'orders', '$user->rights->commande->lire', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->commande->enabled', __HANDLER__, 'left', 1209__+MAX_llx_menu__, 'commercial', '', 1200__+MAX_llx_menu__, '/commande/stats/index.php?mainmenu=commercial&leftmenu=orders', 'Statistics', 1, 'orders', '$user->rights->commande->lire', '', 2, 4, __ENTITY__); -- Commercial - Supplier's proposals -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1600__+MAX_llx_menu__, 'commercial', 'propals_supplier', 3__+MAX_llx_menu__, '/supplier_proposal/index.php?leftmenu=propals_supplier', 'SupplierProposalsShort', 0, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1601__+MAX_llx_menu__, 'commercial', '', 1600__+MAX_llx_menu__, '/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals', 'SupplierProposalNew', 1, 'supplier_proposal', '$user->rights->supplier_proposal->creer', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1602__+MAX_llx_menu__, 'commercial', '', 1600__+MAX_llx_menu__, '/supplier_proposal/list.php?leftmenu=supplier_proposals', 'List', 1, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1610__+MAX_llx_menu__, 'commercial', '', 1600__+MAX_llx_menu__, '/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier', 'Statistics', 1, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1650__+MAX_llx_menu__, 'commercial', 'propals_supplier', 3__+MAX_llx_menu__, '/supplier_proposal/index.php?leftmenu=propals_supplier', 'SupplierProposalsShort', 0, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1651__+MAX_llx_menu__, 'commercial', '', 1650__+MAX_llx_menu__, '/supplier_proposal/card.php?action=create&leftmenu=supplier_proposals', 'SupplierProposalNew', 1, 'supplier_proposal', '$user->rights->supplier_proposal->creer', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1652__+MAX_llx_menu__, 'commercial', '', 1650__+MAX_llx_menu__, '/supplier_proposal/list.php?leftmenu=supplier_proposals', 'List', 1, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_proposal->enabled', __HANDLER__, 'left', 1653__+MAX_llx_menu__, 'commercial', '', 1650__+MAX_llx_menu__, '/comm/propal/stats/index.php?leftmenu=supplier_proposals&mode=supplier', 'Statistics', 1, 'supplier_proposal', '$user->rights->supplier_proposal->lire', '', 2, 2, __ENTITY__); -- Commercial - Supplier's orders insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5100__+MAX_llx_menu__, 'commercial', 'orders_suppliers', 5__+MAX_llx_menu__, '/fourn/commande/index.php?mainmenu=commercial&leftmenu=orders_suppliers', 'SuppliersOrders', 0, 'orders', '$user->rights->fournisseur->commande->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->supplier_order->enabled', __HANDLER__, 'left', 5101__+MAX_llx_menu__, 'commercial', '', 5100__+MAX_llx_menu__, '/fourn/commande/card.php?mainmenu=commercial&action=create&leftmenu=orders_suppliers', 'NewOrder', 1, 'orders', '$user->rights->fournisseur->commande->creer', '', 2, 0, __ENTITY__); @@ -347,6 +348,16 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->projet->enabled && !$conf->global->PROJECT_HIDE_TASKS', __HANDLER__, 'left', 3400__+MAX_llx_menu__, 'project', '', 7__+MAX_llx_menu__, '/projet/activity/perweek.php?mainmenu=project&leftmenu=projects', 'NewTimeSpent', 0, 'projects', '$user->rights->projet->lire', '', 2, 3, __ENTITY__); +-- BOM +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->bom->enabled', __HANDLER__, 'left', 5400__+MAX_llx_menu__, 'mrp', 'bom', 16__+MAX_llx_menu__, '/bom/bom_list.php?mainmenu=mrp&leftmenu=bom', 'MenuBOM', 1, 'mrp', '$user->rights->bom->read', '', 0, 20, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->bom->enabled', __HANDLER__, 'left', 5401__+MAX_llx_menu__, 'mrp', '', 5400__+MAX_llx_menu__, '/bom/bom_card.php?mainmenu=mrp&leftmenu=bom&action=create', 'NewBOM', 2, 'mrp', '$user->rights->bom->write', '', 0, 21, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->bom->enabled', __HANDLER__, 'left', 5403__+MAX_llx_menu__, 'mrp', '', 5400__+MAX_llx_menu__, '/bom/bom_list.php?mainmenu=mrp&leftmenu=bom', 'List', 2, 'mrp', '$user->rights->bom->read', '', 0, 22, __ENTITY__); +-- MRP +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->bom->enabled', __HANDLER__, 'left', 5450__+MAX_llx_menu__, 'mrp', 'mrp', 16__+MAX_llx_menu__, '/mrp/mo_list.php?mainmenu=mrp&leftmenu=mrp', 'MenuMRP', 1, 'mrp', '$user->rights->mrp->read', '', 0, 20, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->bom->enabled', __HANDLER__, 'left', 5451__+MAX_llx_menu__, 'mrp', '', 5450__+MAX_llx_menu__, '/mrp/mo_card.php?mainmenu=mrp&leftmenu=mrp&action=create', 'NewMO', 2, 'mrp', '$user->rights->mrp->write', '', 0, 21, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->bom->enabled', __HANDLER__, 'left', 5453__+MAX_llx_menu__, 'mrp', '', 5450__+MAX_llx_menu__, '/mrp/mo_list.php?mainmenu=mrp&leftmenu=mrp', 'List', 2, 'mrp', '$user->rights->mrp->read', '', 0, 22, __ENTITY__); + + -- Project - Categories insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3804__+MAX_llx_menu__, 'project', 'cat', 7__+MAX_llx_menu__, '/categories/index.php?mainmenu=project&leftmenu=cat&type=6', 'Categories', 0, 'categories', '$user->rights->categorie->lire', '', 2, 4, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->categorie->enabled', __HANDLER__, 'left', 3805__+MAX_llx_menu__, 'project', '', 3804__+MAX_llx_menu__, '/categories/card.php?mainmenu=project&action=create&type=6', 'NewCategory', 1, 'categories', '$user->rights->categorie->creer', '', 2, 0, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 8a014ac3283..97bb28a7c52 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -29,11 +29,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; * Core function to output top menu auguria * * @param DoliDB $db Database handler - * @param string $atarget Target + * @param string $atarget Target (Example: '' or '_top') * @param int $type_user 0=Menu for backoffice, 1=Menu for front office * @param array $tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) * @param Menu $menu Object Menu to return back list of menu entries - * @param int $noout Disable output (Initialise &$menu only). + * @param int $noout 1=Disable output (Initialise &$menu only). * @param string $mode 'top', 'topnb', 'left', 'jmobile' * @return int 0 */ @@ -131,27 +131,38 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout { //$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); $mysoc->logo_squarred_mini = (empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI) ? '' : $conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); + + $logoContainerAdditionalClass = 'backgroundforcompanylogo'; + if (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_NO_BACKGROUND)) { + $logoContainerAdditionalClass = ''; + } + if (!empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); } + /*elseif (! empty($mysoc->logo_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini)) + { + $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); + }*/ else { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo_squarred_alpha.png'; + $logoContainerAdditionalClass = ''; } + $title = $langs->trans("GoIntoSetupToChangeLogo"); print "\n".''."\n"; - print_start_menu_entry_auguria('companylogo', 'class="tmenu tmenucompanylogo"', 1); + print_start_menu_entry_auguria('companylogo', 'class="tmenu tmenucompanylogo nohover"', 1); - print ''."\n"; + print ''."\n"; print_end_menu_entry_auguria(4); } if (empty($noout)) { - foreach ($menu->liste as $menuval) - { + foreach ($menu->liste as $menuval) { print_start_menu_entry_auguria($menuval['idsel'], $menuval['classname'], $menuval['enabled']); print_text_menu_entry_auguria($menuval['titre'], $menuval['enabled'], ($menuval['url'] != '#' ?DOL_URL_ROOT:'').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target'] ? $menuval['target'] : $atarget)); print_end_menu_entry_auguria($menuval['enabled']); @@ -216,8 +227,7 @@ function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $cla { global $langs; - if ($showmode == 1) - { + if ($showmode == 1) { print ''; print '
    '; print '
    '; @@ -226,9 +236,7 @@ function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $cla print $text; print ''; print ''; - } - elseif ($showmode == 2) - { + } elseif ($showmode == 2) { print '
    '; print ''; print ''; diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 0b08dce9beb..2a67d43c1e3 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -119,7 +119,7 @@ class MenuManager /** - * Show menu + * Show menu. * Menu defined in sql tables were stored into $this->tabMenu BEFORE this is called. * * @param string $mode 'top', 'topnb', 'left', 'jmobile' (used to get full xml ul/li menu) diff --git a/htdocs/core/menus/standard/eldy_menu.php b/htdocs/core/menus/standard/eldy_menu.php index 96c334a1de7..5276a509ae5 100644 --- a/htdocs/core/menus/standard/eldy_menu.php +++ b/htdocs/core/menus/standard/eldy_menu.php @@ -308,8 +308,6 @@ class MenuManager $lastlevel2[$val2['level']] = 'greyed'; } } - //var_dump($val2['level']); - //var_dump($lastlevel2); print $val2['titre']; if ($relurl2) { diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 4f6a5b7c4e6..98d64622cb8 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -270,3 +270,4 @@ ALTER TABLE llx_prelevement_facture_demande ADD COLUMN fk_facture_fourn INTEGER -- VPGSQL8.2 ALTER TABLE llx_prelevement_facture ALTER COLUMN fk_facture DROP NOT NULL; ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; +ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); diff --git a/htdocs/install/mysql/tables/llx_menu.sql b/htdocs/install/mysql/tables/llx_menu.sql index 59bb96297d7..cb279cb5c56 100644 --- a/htdocs/install/mysql/tables/llx_menu.sql +++ b/htdocs/install/mysql/tables/llx_menu.sql @@ -25,7 +25,7 @@ CREATE TABLE llx_menu rowid integer AUTO_INCREMENT NOT NULL PRIMARY KEY, menu_handler varchar(16) NOT NULL, -- Menu handler name entity integer DEFAULT 1 NOT NULL, -- Multi company id - module varchar(64), -- Module name if record is added by a module + module varchar(255), -- Module name if record is added by a module type varchar(4) NOT NULL, -- Menu top or left mainmenu varchar(100) NOT NULL, -- Name family/module for top menu (home, companies, ...) leftmenu varchar(100) NULL, -- Name family/module for left menu (setup, info, ...) From 31583c9b6380d0ccf3a03eba6244f847d3bc4ae6 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 28 Apr 2020 04:45:06 +0200 Subject: [PATCH 128/456] NEW: Accountancy add column thirdparty on binding page --- htdocs/accountancy/supplier/lines.php | 31 ++++++++++++++++++++++++--- htdocs/accountancy/supplier/list.php | 30 +++++++++++++++++++++++--- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 8d3f3937823..e81da78bf55 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2020 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -27,12 +27,13 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -44,6 +45,7 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' $account_parent = GETPOST('account_parent'); $changeaccount = GETPOST('changeaccount'); // Search Getpost +$search_societe = GETPOST('search_societe', 'alpha'); $search_lineid = GETPOST('search_lineid', 'int'); $search_ref = GETPOST('search_ref', 'alpha'); $search_invoice = GETPOST('search_invoice', 'alpha'); @@ -91,6 +93,7 @@ $formaccounting = new FormAccounting($db); // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { + $search_societe = ''; $search_lineid = ''; $search_ref = ''; $search_invoice = ''; @@ -177,7 +180,7 @@ $sql .= " l.rowid, l.fk_product, l.product_type as line_type, l.description, l.t $sql .= " aa.label, aa.account_number, "; $sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.fk_product_type as type,"; $sql .= " co.code as country_code, co.label as country,"; -$sql .= " s.tva_intra"; +$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur"; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; @@ -188,6 +191,10 @@ $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = l.fk_fact $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays "; $sql .= " WHERE f.rowid = l.fk_facture_fourn and f.fk_statut >= 1 AND l.fk_code_ventilation <> 0 "; +// Add search filter like +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} if ($search_lineid) { $sql .= natural_search("l.rowid", $search_lineid, 1); } @@ -264,6 +271,7 @@ if ($result) { $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($search_societe) $param .= "&search_societe=" . urlencode($search_societe); if ($search_invoice) $param .= "&search_invoice=".urlencode($search_invoice); if ($search_ref) $param .= "&search_ref=".urlencode($search_ref); if ($search_label) $param .= "&search_label=".urlencode($search_label); @@ -300,6 +308,7 @@ if ($result) { // We add search filter print ''; + print ''; print ''; print ''; print ''; @@ -325,6 +334,7 @@ if ($result) { print "\n"; print ''; + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder); @@ -341,6 +351,7 @@ if ($result) { print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center '); print "\n"; + $thirdpartystatic = new Societe($db); $facturefournisseur_static = new FactureFournisseur($db); $product_static = new ProductFournisseur($db); @@ -352,6 +363,17 @@ if ($result) { $facturefournisseur_static->ref = $objp->ref; $facturefournisseur_static->id = $objp->facid; + $thirdpartystatic->id = $objp->socid; + $thirdpartystatic->name = $objp->name; + $thirdpartystatic->client = $objp->client; + $thirdpartystatic->fournisseur = $objp->fournisseur; + $thirdpartystatic->code_client = $objp->code_client; + $thirdpartystatic->code_compta_client = $objp->code_compta_client; + $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; + $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; + $thirdpartystatic->email = $objp->email; + $thirdpartystatic->country_code = $objp->country_code; + $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; $product_static->label = $objp->product_label; @@ -359,6 +381,9 @@ if ($result) { print ''; + // Thirdparty + print '' . $thirdpartystatic->getNomUrl(1, 'supplier') . ''; + // Line id print ''.$objp->rowid.''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index ce354c789f3..9788de4bb5f 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -27,12 +27,13 @@ */ require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -49,6 +50,7 @@ $toselect = GETPOST('toselect', 'array'); $mesCasesCochees = GETPOST('toselect', 'array'); // Search Getpost +$search_societe = GETPOST('search_societe', 'alpha'); $search_lineid = GETPOST('search_lineid', 'int'); $search_invoice = GETPOST('search_invoice', 'alpha'); $search_ref = GETPOST('search_ref', 'alpha'); @@ -116,6 +118,7 @@ if (empty($reshook)) // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers { + $search_societe=''; $search_lineid = ''; $search_ref = ''; $search_invoice = ''; @@ -216,7 +219,7 @@ $sql .= " p.accountancy_code_buy as code_buy, p.accountancy_code_buy_intra as co $sql .= " p.tosell as status, p.tobuy as status_buy,"; $sql .= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,"; $sql .= " co.code as country_code, co.label as country_label,"; -$sql .= " s.tva_intra"; +$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur"; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; @@ -231,6 +234,9 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; // Add search filter like +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} if ($search_lineid) { $sql .= natural_search("l.rowid", $search_lineid, 1); } @@ -314,6 +320,7 @@ if ($result) { $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($search_societe) $param.='&search_societe='.urlencode($search_societe); if ($search_lineid) $param .= '&search_lineid='.urlencode($search_lineid); if ($search_day) $param .= '&search_day='.urlencode($search_day); if ($search_month) $param .= '&search_month='.urlencode($search_month); @@ -364,6 +371,7 @@ if ($result) { // We add search filter print ''; + print ''; print ''; print ''; print ''; @@ -390,6 +398,7 @@ if ($result) { print "\n"; print ''; + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder); @@ -408,6 +417,7 @@ if ($result) { print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center '); print "\n"; + $thirdpartystatic=new Societe($db); $facturefourn_static = new FactureFournisseur($db); $product_static = new Product($db); @@ -424,6 +434,17 @@ if ($result) { $objp->code_buy_l = ''; $objp->code_buy_p = ''; + $thirdpartystatic->id = $objp->socid; + $thirdpartystatic->name = $objp->name; + $thirdpartystatic->client = $objp->client; + $thirdpartystatic->fournisseur = $objp->fournisseur; + $thirdpartystatic->code_client = $objp->code_client; + $thirdpartystatic->code_compta_client = $objp->code_compta_client; + $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; + $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; + $thirdpartystatic->email = $objp->email; + $thirdpartystatic->country_code = $objp->country_code; + $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; $product_static->type = $objp->type; @@ -506,6 +527,9 @@ if ($result) { print ''; + // Thirdparty + print '' . $thirdpartystatic->getNomUrl(1, 'supplier') . ''; + // Line id print ''.$objp->rowid.''; From 1f6c959b723e04db550b215f9e05d41f2fdafae9 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 28 Apr 2020 04:55:54 +0200 Subject: [PATCH 129/456] NEW: Accountancy add column thirdparty on binding page --- htdocs/accountancy/customer/lines.php | 33 ++++++++++++++++++++++---- htdocs/accountancy/customer/list.php | 34 +++++++++++++++++++++++---- htdocs/accountancy/supplier/lines.php | 2 +- htdocs/accountancy/supplier/list.php | 2 +- 4 files changed, 60 insertions(+), 11 deletions(-) diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 7e51160195b..94835b429c8 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2020 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014-2016 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -27,10 +27,11 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -42,6 +43,7 @@ $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' $account_parent = GETPOST('account_parent'); $changeaccount = GETPOST('changeaccount'); // Search Getpost +$search_societe = GETPOST('search_societe', 'alpha'); $search_lineid = GETPOST('search_lineid', 'int'); $search_ref = GETPOST('search_ref', 'alpha'); $search_invoice = GETPOST('search_invoice', 'alpha'); @@ -89,6 +91,7 @@ $formaccounting = new FormAccounting($db); // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { + $search_societe=''; $search_lineid = ''; $search_ref = ''; $search_invoice = ''; @@ -175,7 +178,7 @@ $sql .= " s.rowid as socid, s.nom as name, s.code_compta, s.code_client,"; $sql .= " p.rowid as product_id, p.fk_product_type as product_type, p.ref as product_ref, p.label as product_label, p.accountancy_code_sell, aa.rowid as fk_compte, aa.account_number, aa.label as label_compte,"; $sql .= " fd.situation_percent,"; $sql .= " co.code as country_code, co.label as country,"; -$sql .= " s.tva_intra"; +$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur"; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; @@ -193,6 +196,10 @@ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { } else { $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_STANDARD.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")"; } +// Add search filter like +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} if ($search_lineid) { $sql .= natural_search("fd.rowid", $search_lineid, 1); } @@ -262,6 +269,7 @@ if ($result) { $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($search_societe) $param .= "&search_societe=".urlencode($search_societe); if ($search_invoice) $param .= "&search_invoice=".urlencode($search_invoice); if ($search_ref) $param .= "&search_ref=".urlencode($search_ref); if ($search_label) $param .= "&search_label=".urlencode($search_label); @@ -296,7 +304,8 @@ if ($result) { print ''."\n"; print ''; - print ''; + print ''; + print ''; print ''; print '\n"; print ''; + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "fd.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, fd.rowid", "", $param, '', $sortfield, $sortorder, 'center '); @@ -337,6 +347,7 @@ if ($result) { print_liste_field_titre($clickpicto, '', '', '', '', '', '', '', 'center '); print "\n"; + $thirdpartystatic=new Societe($db); $facture_static = new Facture($db); $product_static = new Product($db); @@ -347,6 +358,17 @@ if ($result) { $facture_static->id = $objp->facid; $facture_static->type = $objp->ftype; + $thirdpartystatic->id = $objp->socid; + $thirdpartystatic->name = $objp->name; + $thirdpartystatic->client = $objp->client; + $thirdpartystatic->fournisseur = $objp->fournisseur; + $thirdpartystatic->code_client = $objp->code_client; + $thirdpartystatic->code_compta_client = $objp->code_compta_client; + $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; + $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; + $thirdpartystatic->email = $objp->email; + $thirdpartystatic->country_code = $objp->country_code; + $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; $product_static->label = $objp->product_label; @@ -354,6 +376,9 @@ if ($result) { print ''; + // Thirdparty + print ''; + // Line id print ''; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 8d09587ca5a..a623628a3d4 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2019 Alexandre Spangaro + * Copyright (C) 2013-2020 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent @@ -27,12 +27,13 @@ */ require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; @@ -49,6 +50,7 @@ $toselect = GETPOST('toselect', 'array'); $mesCasesCochees = GETPOST('toselect', 'array'); // Search Getpost +$search_societe = GETPOST('search_societe', 'alpha'); $search_lineid = GETPOST('search_lineid', 'int'); $search_ref = GETPOST('search_ref', 'alpha'); $search_invoice = GETPOST('search_invoice', 'alpha'); @@ -112,6 +114,7 @@ if (empty($reshook)) // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers { + $search_societe=''; $search_lineid = ''; $search_ref = ''; $search_invoice = ''; @@ -212,7 +215,7 @@ $sql .= " p.accountancy_code_buy as code_buy, p.accountancy_code_buy_intra as co $sql .= " p.tosell as status, p.tobuy as status_buy,"; $sql .= " aa.rowid as aarowid, aa2.rowid as aarowid_intra, aa3.rowid as aarowid_export,"; $sql .= " co.code as country_code, co.label as country_label,"; -$sql .= " s.tva_intra"; +$sql .= " s.rowid as socid, s.nom as name, s.tva_intra, s.email, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur"; $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; @@ -227,6 +230,9 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; // Add search filter like +if ($search_societe) { + $sql .= natural_search('s.nom', $search_societe); +} if ($search_lineid) { $sql .= natural_search("l.rowid", $search_lineid, 1); } @@ -314,6 +320,7 @@ if ($result) { $param = ''; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($search_societe) $param .= '&search_societe='.urlencode($search_societe); if ($search_lineid) $param .= '&search_lineid='.urlencode($search_lineid); if ($search_day) $param .= '&search_day='.urlencode($search_day); if ($search_month) $param .= '&search_month='.urlencode($search_month); @@ -363,7 +370,8 @@ if ($result) { // We add search filter print ''; - print ''; + print ''; + print ''; print ''; print ''; print ''; + print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, '', $sortfield, $sortorder, 'center '); @@ -408,6 +417,7 @@ if ($result) { print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center '); print "\n"; + $thirdpartystatic = new Societe($db); $facture_static = new Facture($db); $product_static = new Product($db); @@ -421,6 +431,17 @@ if ($result) { $objp->code_sell_l = ''; $objp->code_sell_p = ''; + $thirdpartystatic->id = $objp->socid; + $thirdpartystatic->name = $objp->name; + $thirdpartystatic->client = $objp->client; + $thirdpartystatic->fournisseur = $objp->fournisseur; + $thirdpartystatic->code_client = $objp->code_client; + $thirdpartystatic->code_compta_client = $objp->code_compta_client; + $thirdpartystatic->code_fournisseur = $objp->code_fournisseur; + $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; + $thirdpartystatic->email = $objp->email; + $thirdpartystatic->country_code = $objp->country_code; + $product_static->ref = $objp->product_ref; $product_static->id = $objp->product_id; $product_static->type = $objp->type; @@ -525,6 +546,9 @@ if ($result) { print ''; + // Thirdparty + print ''; + // Line id print ''; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index cd553849414..2e4059bcaba 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -309,7 +309,7 @@ if ($result) { // We add search filter print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print '\n"; +// Allow to group payments by mod in rapports +print '\n"; + print '
    '; if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { @@ -322,6 +331,7 @@ if ($result) { print "
    ' . $thirdpartystatic->getNomUrl(1, 'customer') . ''.$objp->rowid.'
    '; if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { @@ -391,6 +399,7 @@ if ($result) { print '
    ' . $thirdpartystatic->getNomUrl(1, 'customer') . ''.$objp->rowid.'
    '; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 4996faa9260..f9bac6682a8 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -372,7 +372,7 @@ if ($result) { // We add search filter print '
    '; From 740b2c92285aaf60c69fe3849306a6798fc01b74 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Tue, 28 Apr 2020 08:59:27 +0200 Subject: [PATCH 130/456] NEW possibilty to group payments by mode and show their subtotal This add two params (PAYMENTS_REPORT_GROUP_BY_MOD and PAYMENTS_FOURN_REPORT_GROUP_BY_MOD) for payments and supplier payments to group them by mode and get subtotals for each mode. Add the corresponding configuration options on admin page fore each payments and supplier payments. --- htdocs/admin/payment.php | 14 +++- htdocs/admin/supplier_payment.php | 56 ++++++++++++++ htdocs/compta/paiement/rapport.php | 5 +- .../modules/rapport/pdf_paiement.class.php | 74 +++++++++++++++++-- htdocs/fourn/facture/rapport.php | 5 +- htdocs/langs/en_US/bills.lang | 1 + htdocs/langs/fr_FR/bills.lang | 1 + 7 files changed, 145 insertions(+), 11 deletions(-) diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index e740150e1d5..a5b494b62e2 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -1,5 +1,6 @@ + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -70,11 +71,12 @@ if ($action == 'setmod') if ($action == 'setparams') { $freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS', 'none'); // No alpha here, we want exact string - $res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + $res = dolibarr_set_const($db, "PAYMENTS_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + if ($error) { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -253,6 +255,14 @@ print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS", $co print ''; print "
    '; +print $langs->trans("GroupPaymentsByModOnReports"); +print ''; +print $form->selectyesno("PAYMENTS_REPORT_GROUP_BY_MOD", $conf->global->PAYMENTS_REPORT_GROUP_BY_MOD, 1); +print ''; +print "
    '; print '
    '; diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index d533ba0d8eb..e2fc6dce4a7 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -1,6 +1,7 @@ * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -144,6 +145,23 @@ elseif ($action == 'specimen') } } + + +elseif ($action == 'setparams') +{ + $res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + + if ($error) + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } + if (!$error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } +} + /* * View */ @@ -428,8 +446,46 @@ foreach ($dirmodels as $reldir) print ''; +/* + * Other Options + */ + +print "
    "; + +print load_fiche_titre($langs->trans("OtherOptions"), '', ''); + +print ''; +print ''; +print ''; + +print '
    '; +print ''; +print ''; +print ''; +print ''; +print ''; +print "\n"; + +// Allow to group payments by mod in rapports +print '\n"; + +print '
    '.$langs->trans("Parameter").''.$langs->trans("Value").' 
    '; +print $langs->trans("GroupPaymentsByModOnReports"); +print ''; +print $form->selectyesno("PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", $conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD, 1); +print ''; +print "
    '; + dol_fiche_end(); +print '
    '; +print '
    '; +print ''; +print '
    '; +print '
    '; + +print ''; + // End of page llxFooter(); $db->close(); diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 80013d3d865..76a1ce72d76 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2006 Rodolphe Quiedeville * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -26,6 +27,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/rapport/pdf_paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Security check @@ -84,6 +86,7 @@ if ($action == 'builddoc') */ $formother = new FormOther($db); +$formfile = new FormFile($db); llxHeader(); @@ -155,7 +158,7 @@ if ($year) $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; print ''; - print '
    '.img_pdf().' '.$file.''; + print ''.img_pdf().' '.$file.''.$formfile->showPreview($file, 'facture_paiement', $relativepath, 0).''; print ''.dol_print_size(dol_filesize($tfile)).''; print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; print ''; diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 2377e537606..58b5de4d7d8 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2006 Rodolphe Quiedeville * Copyright (C) 2006-2014 Laurent Destailleur * Copyright (C) 2015-2018 Charlene BENKE + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -207,7 +208,11 @@ class pdf_paiement $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } if (!empty($socid)) $sql .= " AND s.rowid = ".$socid; - $sql .= " ORDER BY p.datep ASC, pf.fk_paiement ASC"; + // If global param PAYMENTS_REPORT_GROUP_BY_MOD is set, payement are ordered by paiement_code + if (!empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) + $sql .= " ORDER BY paiement_code ASC, p.datep ASC, pf.fk_paiement ASC"; + else + $sql .= " ORDER BY p.datep ASC, pf.fk_paiement ASC"; break; case "fourn": $sql = "SELECT p.datep as dp, f.ref as ref"; @@ -237,7 +242,11 @@ class pdf_paiement $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } if (!empty($socid)) $sql .= " AND s.rowid = ".$socid; - $sql .= " ORDER BY p.datep ASC, pf.fk_paiementfourn ASC"; + // If global param PAYMENTS_FOURN_REPORT_GROUP_BY_MOD is set, payement fourn are ordered by paiement_code + if (!empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD)) + $sql .= " ORDER BY paiement_code ASC, p.datep ASC, pf.fk_paiementfourn ASC"; + else + $sql .= " ORDER BY p.datep ASC, pf.fk_paiementfourn ASC"; break; } @@ -425,7 +434,7 @@ class pdf_paiement public function Body(&$pdf, $page, $lines, $outputlangs) { // phpcs:enable - global $langs; + global $langs, $conf; $default_font_size = pdf_getPDFFontSize($outputlangs); $pdf->SetFont('', '', $default_font_size - 1); @@ -435,6 +444,11 @@ class pdf_paiement $pdf->SetFillColor(220, 220, 220); $yp = 0; $numlines = count($lines); + if (($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) + { + $mod = $lines[0][2]; + $total_mod = 0; + } for ($j = 0; $j < $numlines; $j++) { $i = $j; @@ -450,8 +464,17 @@ class pdf_paiement { if ($yp > $this->tab_height - 15) { - $pdf->SetXY($this->posxpaymentamount, $this->tab_top + 10 + $yp); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $langs->transnoentities('SubTotal')." : ".price($total_page), 0, 'R', 0); + $pdf->SetFillColor(255, 255, 255); + $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array()); + $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); + $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); + $pdf->SetFont('', 'B', $default_font_size - 1); + $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp); + $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('SubTotal')." : ", 0, 'R', 1); + $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total_page), 0, 'R', 1); + $pdf->SetFont('', '', $default_font_size - 1); + $pdf->SetFillColor(220, 220, 220); $page++; $pdf->AddPage(); $this->_pagehead($pdf, $page, 0, $outputlangs); @@ -474,6 +497,7 @@ class pdf_paiement $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $lines[$j][4], 0, 'R', 1); $yp = $yp + 5; $total_page += $lines[$j][9]; + if (($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) $total_mod += $lines[$j][9]; } // Invoice number @@ -497,9 +521,45 @@ class pdf_paiement { $oldprowid = $lines[$j][7]; } + + // Add line to add total by payment mode if mode reglement for nex line change + if ((($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) && ($mod != $lines[$j+1][2])) + { + $pdf->SetFillColor(245, 245, 245); + $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array()); + $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); + $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); + $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp); + $pdf->SetFont('', 'I', $default_font_size - 1); + $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('Total').' '.$mod." : ", 0, 'R', 1); + $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total_mod), 0, 'R', 1); + $pdf->SetFont('', '', $default_font_size - 1); + $mod = $lines[$j+1][2]; + $total_mod = 0; + $yp = $yp + 5; + if ($yp > $this->tab_height - 5) + { + $page++; + $pdf->AddPage(); + $this->_pagehead($pdf, $page, 0, $outputlangs); + $pdf->SetFont('', '', $default_font_size - 1); + $yp = 0; + } + $pdf->SetFillColor(220, 220, 220); + } + } $total += $total_page; - $pdf->SetXY($this->posxpaymentamount, $this->tab_top + 10 + $yp); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $langs->transnoentities('Total')." : ".price($total), 0, 'R', 0); + $pdf->SetFillColor(255, 255, 255); + $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array()); + $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); + $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); + $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp); + $pdf->SetFont('', 'B'); + $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('Total')." : ", 0, 'R', 1); + $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total), 0, 'R', 1); + $pdf->SetFillColor(220, 220, 220); } } diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index f0bf2d85dd1..9f38c4c4f9e 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -1,5 +1,6 @@ + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -24,6 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/rapport/pdf_paiement_fourn.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->loadLangs(array('bills')); @@ -86,6 +88,7 @@ if ($action == 'builddoc') */ $formother = new FormOther($db); +$formfile = new FormFile($db); $titre = ($year ? $langs->trans("PaymentsReportsForYear", $year) : $langs->trans("PaymentsReports")); @@ -157,7 +160,7 @@ if ($year) { $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; - print ''.img_pdf().' '.$file.''; + print ''.img_pdf().' '.$file.''.$formfile->showPreview($file, 'facture_fournisseur', 'payments/'.$relativepath, 0).''; print ''.dol_print_size(dol_filesize($tfile)).''; print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; } diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 55de1591689..9f11d8ecf87 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -385,6 +385,7 @@ GeneratedFromTemplate=Generated from template invoice %s WarningInvoiceDateInFuture=Warning, the invoice date is higher than current date WarningInvoiceDateTooFarInFuture=Warning, the invoice date is too far from current date ViewAvailableGlobalDiscounts=View available discounts +GroupPaymentsByModOnReports=Group payments by mode on reports # PaymentConditions Statut=Status PaymentConditionShortRECEP=Due Upon Receipt diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 6ad3faba02d..92a0da802d1 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -393,6 +393,7 @@ GeneratedFromTemplate=Généré à partir du modèle de facture %s WarningInvoiceDateInFuture=Attention, la date de facturation est antérieur à la date actuelle WarningInvoiceDateTooFarInFuture=Attention, la date de facturation est trop éloignée de la date actuelle ViewAvailableGlobalDiscounts=Voir les remises disponibles +GroupPaymentsByModOnReports=Grouper les paiements par mode sur les rapports # PaymentConditions Statut=État PaymentConditionShortRECEP=A réception From 2cf5f12a62a949f602ac601ac6965977c991af80 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 28 Apr 2020 07:18:45 +0000 Subject: [PATCH 131/456] Fixing style errors. --- htdocs/admin/supplier_payment.php | 12 ++++++------ htdocs/core/modules/rapport/pdf_paiement.class.php | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index e2fc6dce4a7..5d7a0d0b8d5 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -152,14 +152,14 @@ elseif ($action == 'setparams') $res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; - if ($error) + if ($error) { - setEventMessages($langs->trans("Error"), null, 'errors'); - } - if (!$error) + setEventMessages($langs->trans("Error"), null, 'errors'); + } + if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } } /* diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 58b5de4d7d8..024310abb09 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -548,7 +548,6 @@ class pdf_paiement } $pdf->SetFillColor(220, 220, 220); } - } $total += $total_page; $pdf->SetFillColor(255, 255, 255); From 72c8397e36c668c982dc86c46503b682d6ab0bf1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 11:24:13 +0200 Subject: [PATCH 132/456] css --- htdocs/projet/tasks/time.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index ea74482b4a1..377d34e61d5 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -270,7 +270,7 @@ if (($action == 'updateline' || $action == 'updatesplitline') && !$_POST["cancel $object->timespent_note = $_POST["timespent_note_line"]; $object->timespent_old_duration = $_POST["old_duration"]; $object->timespent_duration = $_POST["new_durationhour"] * 60 * 60; // We store duration in seconds - $object->timespent_duration += $_POST["new_durationmin"] * 60; // We store duration in seconds + $object->timespent_duration += ($_POST["new_durationmin"] ? $_POST["new_durationmin"] : 0) * 60; // We store duration in seconds if (GETPOST("timelinehour") != '' && GETPOST("timelinehour") >= 0) // If hour was entered { $object->timespent_date = dol_mktime(GETPOST("timelinehour"), GETPOST("timelinemin"), 0, GETPOST("timelinemonth"), GETPOST("timelineday"), GETPOST("timelineyear")); @@ -1377,10 +1377,10 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } } - // User + // By User if (!empty($arrayfields['author']['checked'])) { - print ''; + print ''; if ($action == 'editline' && $_GET['lineid'] == $task_time->rowid) { if (empty($object->id)) $object->fetch($id); @@ -1390,7 +1390,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) } if (count($contactsoftask) > 0) { print img_object('', 'user', 'class="hideonsmartphone"'); - print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask); + print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'maxwidth200'); } else { print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); } @@ -1452,7 +1452,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) // Value spent if (!empty($arrayfields['value']['checked'])) { - print ''; + print ''; $value = price2num($task_time->thm * $task_time->task_duration / 3600); print price($value, 1, $langs, 1, -1, -1, $conf->currency); print ''; From 4a8173f498b4a95366263fcc4751ccad1778d96d Mon Sep 17 00:00:00 2001 From: Tim Otte Date: Tue, 28 Apr 2020 12:40:10 +0200 Subject: [PATCH 133/456] Fixed search_projectstatus to allow default values --- htdocs/projet/tasks/list.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 67131c29ef4..ccd3d28ba31 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -45,12 +45,14 @@ $id = GETPOST('id', 'int'); $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_categ = GETPOST("search_categ", 'alpha'); $search_project = GETPOST('search_project'); -if (!isset($_GET['search_projectstatus']) && !isset($_POST['search_projectstatus'])) + +$search_projectstatus = GETPOST('search_projectstatus'); +if (!isset($search_projectstatus) || $search_projectstatus == '') { if ($search_all != '') $search_projectstatus = -1; else $search_projectstatus = 1; } -else $search_projectstatus = GETPOST('search_projectstatus'); + $search_project_ref = GETPOST('search_project_ref'); $search_project_title = GETPOST('search_project_title'); $search_task_ref = GETPOST('search_task_ref'); From 947609fc122f9bb89eea7cb6ceff0e532a97835b Mon Sep 17 00:00:00 2001 From: Tim Otte Date: Tue, 28 Apr 2020 12:59:15 +0200 Subject: [PATCH 134/456] Minor fix --- htdocs/projet/tasks/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 5b60e1ef3bc..113f02670f0 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -47,7 +47,7 @@ $search_categ = GETPOST("search_categ", 'alpha'); $search_project = GETPOST('search_project'); $search_projectstatus = GETPOST('search_projectstatus'); -if (!isset($search_projectstatus) || $search_projectstatus == '') +if (!isset($search_projectstatus) || $search_projectstatus === '') { if ($search_all != '') $search_projectstatus = -1; else $search_projectstatus = 1; From 7a73915e9203f120333220806a2e68d8873c9bef Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 14:22:13 +0200 Subject: [PATCH 135/456] FIX Can switch from double to price type for extrafields --- htdocs/core/tpl/admin_extrafields_edit.tpl.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index d0eaaec25f2..80a7cac7de3 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -194,6 +194,8 @@ elseif (($type == 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($ // Define list of possible type transition $typewecanchangeinto = array( 'varchar'=>array('varchar', 'phone', 'mail', 'url', 'select', 'password', 'text', 'html'), + 'double'=>array('double', 'price'), + 'price'=>array('double', 'price'), 'text'=>array('text', 'html'), 'html'=>array('text', 'html'), 'password'=>array('password', 'varchar'), @@ -202,6 +204,7 @@ $typewecanchangeinto = array( 'phone'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'select'=>array('varchar', 'phone', 'mail', 'url', 'select') ); + if (in_array($type, array_keys($typewecanchangeinto))) { $newarray = array(); From 2b00ae9e927b6d08b78d70af3e221da97c4c2cfa Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 14:22:52 +0200 Subject: [PATCH 136/456] FIX Extrafields of type price must be '' and not '0' if not defined --- htdocs/core/class/extrafields.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index a5c6e74733c..18dd686367b 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1671,7 +1671,8 @@ class ExtraFields } elseif ($type == 'price') { - $value = price($value, 0, $langs, 0, 0, -1, $conf->currency); + //$value = price($value, 0, $langs, 0, 0, -1, $conf->currency); + if ($value || $value == '0') $value = price($value, 0, $langs, 0, 0, -1); } elseif ($type == 'select') { From dd3a5949c031048f340c5644141ae5b78b1f3ee9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 14:25:07 +0200 Subject: [PATCH 137/456] FIX Avoid infinite loop when a fetch is inside a compute field. --- htdocs/core/class/commonobject.class.php | 26 ++++++++++++++++++++++-- htdocs/core/class/conf.class.php | 2 ++ htdocs/langs/en_US/admin.lang | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 102f9da411a..adb6d21a828 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5243,6 +5243,25 @@ abstract class CommonObject /* Functions for extrafields */ + /** + * Function to make a fetch but set environment to avoid to load computed values before. + * + * @param int $id ID of object + * @return int >0 if OK, 0 if not found, <0 if KO + */ + public function fetchNoCompute($id) + { + global $conf; + + $savDisableCompute = $conf->disable_compute; + $conf->disable_compute = 1; + + $ret = $this->fetch($id); + + $conf->disable_compute = $savDisableCompute; + + return $ret; + } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** @@ -5257,7 +5276,7 @@ abstract class CommonObject public function fetch_optionals($rowid = null, $optionsArray = null) { // phpcs:enable - global $extrafields; + global $conf, $extrafields; if (empty($rowid)) $rowid = $this->id; if (empty($rowid)) $rowid = $this->rowid; @@ -5341,7 +5360,10 @@ abstract class CommonObject foreach ($tab as $key => $value) { if (!empty($extrafields) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) { - $this->array_options["options_".$key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0); + //var_dump($conf->disable_compute); + if (empty($conf->disable_compute)) { + $this->array_options["options_".$key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0); + } } } } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 7a0c46a39c4..0a52301e608 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -48,6 +48,8 @@ class Conf //! To store if javascript/ajax is enabked public $use_javascript_ajax; + //! To store if javascript/ajax is enabked + public $disable_compute; //! Used to store current currency (ISO code like 'USD', 'EUR', ...) public $currency; //! Used to store current css (from theme) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 58e5cecf39d..96bb77a5064 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -427,7 +427,7 @@ ExtrafieldCheckBox=Checkboxes ExtrafieldCheckBoxFromList=Checkboxes from table ExtrafieldLink=Link to an object ComputedFormula=Computed field -ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetch($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetch($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetch($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' +ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' Computedpersistent=Store computed field ComputedpersistentDesc=Computed extra fields will be stored in the database, however, the value will only be recalculated when the object of this field is changed. If the computed field depends on other objects or global data this value might be wrong!! ExtrafieldParamHelpPassword=Leaving this field blank means this value will be stored without encryption (field must be only hidden with star on screen).
    Set 'auto' to use the default encryption rule to save password into database (then value read will be the hash only, no way to retrieve original value) From 91523b4b6425b201f2c8c4e1580b49d9364e8334 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 14:22:13 +0200 Subject: [PATCH 138/456] FIX Can switch from double to price type for extrafields Conflicts: htdocs/core/tpl/admin_extrafields_edit.tpl.php --- htdocs/core/tpl/admin_extrafields_edit.tpl.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 4063111a6fb..b9035f546dd 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -193,14 +193,17 @@ elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') || ($t // Define list of possible type transition $typewecanchangeinto=array( 'varchar'=>array('varchar', 'phone', 'mail', 'url', 'select', 'password', 'text', 'html'), - 'text'=>array('text','html'), - 'html'=>array('text','html'), + 'double'=>array('double', 'price'), + 'price'=>array('double', 'price'), + 'text'=>array('text', 'html'), + 'html'=>array('text', 'html'), 'password'=>array('password', 'varchar'), 'mail'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'url'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'phone'=>array('varchar', 'phone', 'mail', 'url', 'select'), 'select'=>array('varchar', 'phone', 'mail', 'url', 'select') ); + if (in_array($type, array_keys($typewecanchangeinto))) { $newarray=array(); From a8740352af918429cdd766aaf8ca106a0daeec72 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 14:22:52 +0200 Subject: [PATCH 139/456] FIX Extrafields of type price must be '' and not '0' if not defined --- htdocs/core/class/extrafields.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 0938da39dcd..ac388b1ef83 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1681,7 +1681,8 @@ class ExtraFields } elseif ($type == 'price') { - $value = price($value, 0, $langs, 0, 0, -1, $conf->currency); + //$value = price($value, 0, $langs, 0, 0, -1, $conf->currency); + if ($value || $value == '0') $value = price($value, 0, $langs, 0, 0, -1); } elseif ($type == 'select') { From c22e13b138d28bbb902881c6cdd061ca555b8b60 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 14:25:07 +0200 Subject: [PATCH 140/456] FIX Avoid infinite loop when a fetch is inside a compute field. --- htdocs/core/class/commonobject.class.php | 26 ++++++++++++++++++++++-- htdocs/core/class/conf.class.php | 2 ++ htdocs/langs/en_US/admin.lang | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f7202040fe5..10e04896314 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -5012,6 +5012,25 @@ abstract class CommonObject /* Functions for extrafields */ + /** + * Function to make a fetch but set environment to avoid to load computed values before. + * + * @param int $id ID of object + * @return int >0 if OK, 0 if not found, <0 if KO + */ + public function fetchNoCompute($id) + { + global $conf; + + $savDisableCompute = $conf->disable_compute; + $conf->disable_compute = 1; + + $ret = $this->fetch($id); + + $conf->disable_compute = $savDisableCompute; + + return $ret; + } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** @@ -5025,7 +5044,7 @@ abstract class CommonObject public function fetch_optionals($rowid = null, $optionsArray = null) { // phpcs:enable - global $extrafields; + global $conf, $extrafields; if (empty($rowid)) $rowid = $this->id; @@ -5109,7 +5128,10 @@ abstract class CommonObject foreach ($tab as $key => $value) { if (!empty($extrafields) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) { - $this->array_options["options_".$key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0); + //var_dump($conf->disable_compute); + if (empty($conf->disable_compute)) { + $this->array_options["options_".$key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0); + } } } } diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 4136cef1be5..00556f40480 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -48,6 +48,8 @@ class Conf //! To store if javascript/ajax is enabked public $use_javascript_ajax; + //! To store if javascript/ajax is enabked + public $disable_compute; //! Used to store current currency (ISO code like 'USD', 'EUR', ...) public $currency; //! Used to store current css (from theme) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index e2c03545124..00e6279349b 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -427,7 +427,7 @@ ExtrafieldCheckBox=Checkboxes ExtrafieldCheckBoxFromList=Checkboxes from table ExtrafieldLink=Link to an object ComputedFormula=Computed field -ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetch($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetch($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetch($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' +ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' Computedpersistent=Store computed field ComputedpersistentDesc=Computed extra fields will be stored in the database, however, the value will only be recalculated when the object of this field is changed. If the computed field depends on other objects or global data this value might be wrong!! ExtrafieldParamHelpPassword=Leaving this field blank means this value will be stored without encryption (field must be only hidden with star on screen).
    Set 'auto' to use the default encryption rule to save password into database (then value read will be the hash only, no way to retrieve original value) From aa9ee060d56ae1f60bb0e826746a060787f43f5d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 17:34:11 +0200 Subject: [PATCH 141/456] Look and feel v12 --- htdocs/core/lib/ajax.lib.php | 1 + htdocs/projet/admin/project.php | 24 +++--------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 329d177a33d..64f442633de 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -488,6 +488,7 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof global $conf, $langs, $user; $entity = ((isset($entity) && is_numeric($entity) && $entity >= 0) ? $entity : $conf->entity); + if (! isset($input)) $input = array(); if (empty($conf->use_javascript_ajax)) { diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php index 19b68ddd9ea..cfd10d2c1fa 100644 --- a/htdocs/projet/admin/project.php +++ b/htdocs/projet/admin/project.php @@ -51,17 +51,7 @@ $type = 'project'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; -if ($action == 'setmainoptions') -{ - if (GETPOST('PROJECT_USE_OPPORTUNITIES')) dolibarr_set_const($db, "PROJECT_USE_OPPORTUNITIES", GETPOST('PROJECT_USE_OPPORTUNITIES'), 'chaine', 0, '', $conf->entity); - else dolibarr_del_const($db, "PROJECT_USE_OPPORTUNITIES", $conf->entity); - - // Warning, the constant saved and used in code is PROJECT_HIDE_TASKS - if (GETPOST('PROJECT_USE_TASKS')) dolibarr_del_const($db, "PROJECT_HIDE_TASKS", $conf->entity); - else dolibarr_set_const($db, "PROJECT_HIDE_TASKS", 1, 'chaine', 0, '', $conf->entity); -} - -elseif ($action == 'updateMask') +if ($action == 'updateMask') { $maskconstproject = GETPOST('maskconstproject', 'alpha'); $maskproject = GETPOST('maskproject', 'alpha'); @@ -315,12 +305,8 @@ print ' '."\n"; print ''; print ''.$langs->trans("ManageOpportunitiesStatus").''; print ''; -$arrval = array('0'=>$langs->trans("No"), - '1'=>$langs->trans("Yes"), -); -print $form->selectyesno('PROJECT_USE_OPPORTUNITIES', $conf->global->PROJECT_USE_OPPORTUNITIES, 1); +print ajax_constantonoff("PROJECT_USE_OPPORTUNITIES"); print ''; -print ''; print ""; print ''; @@ -328,12 +314,8 @@ print ''; print ''; print ''.$langs->trans("ManageTasks").''; print ''; -$arrval = array('0'=>$langs->trans("No"), - '1'=>$langs->trans("Yes"), -); -print $form->selectyesno('PROJECT_USE_TASKS', empty($conf->global->PROJECT_HIDE_TASKS) ? 1 : 0, 1); +print ajax_constantonoff("PROJECT_HIDE_TASKS", array(), null, 1); print ''; -print ''; print ""; print ''; From 483935493c8c2a36b15578b1ab271c0c5beb90a8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 18:08:26 +0200 Subject: [PATCH 142/456] Fix look and feel --- htdocs/accountancy/customer/lines.php | 4 ++-- htdocs/accountancy/supplier/lines.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 7e51160195b..22813024328 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -311,7 +311,7 @@ if ($result) { print ''; print ''; print ''; - print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1); + print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth150', 'code2', 1, 0, 1); //print ''; print ''; print ''; @@ -367,7 +367,7 @@ if ($result) { print ''; if ($product_static->id > 0) print $product_static->getNomUrl(1); if ($product_static->id > 0 && $objp->product_label) print '
    '; - if ($objp->product_label) print $objp->product_label; + if ($objp->product_label) print ''.$objp->product_label.''; print ''; print ''; diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 6d1a0ccd610..0c062b95057 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -313,7 +313,7 @@ if ($result) { print ''; print ''; print ''; - print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth200', 'code2', 1, 0, 1); + print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth150', 'code2', 1, 0, 1); // print ''; print ''; print ''; @@ -376,7 +376,7 @@ if ($result) { print ''; if ($product_static->id > 0) print $product_static->getNomUrl(1); if ($product_static->id > 0 && $objp->product_label) print '
    '; - if ($objp->product_label) print $objp->product_label; + if ($objp->product_label) print ''.$objp->product_label.''; print ''; // Description @@ -400,7 +400,7 @@ if ($result) { print ''.$objp->tva_intra.''; print ''; - print $codecompta.' '; + print $codecompta.' '; print img_edit(); print ''; print ''; From 66b33573ef725fc8a5e61e298e717b315f7dfb6d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 18:30:38 +0200 Subject: [PATCH 143/456] Fix menu --- htdocs/core/menus/standard/auguria.lib.php | 38 +++------------------- htdocs/core/modules/modAsset.class.php | 2 +- 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 97bb28a7c52..4b4a4c54151 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -131,12 +131,12 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout { //$mysoc->logo_mini=(empty($conf->global->MAIN_INFO_SOCIETE_LOGO_MINI)?'':$conf->global->MAIN_INFO_SOCIETE_LOGO_MINI); $mysoc->logo_squarred_mini = (empty($conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI) ? '' : $conf->global->MAIN_INFO_SOCIETE_LOGO_SQUARRED_MINI); - + $logoContainerAdditionalClass = 'backgroundforcompanylogo'; if (!empty($conf->global->MAIN_INFO_SOCIETE_LOGO_NO_BACKGROUND)) { $logoContainerAdditionalClass = ''; } - + if (!empty($mysoc->logo_squarred_mini) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_mini)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_mini); @@ -150,7 +150,7 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo_squarred_alpha.png'; $logoContainerAdditionalClass = ''; } - + $title = $langs->trans("GoIntoSetupToChangeLogo"); print "\n".''."\n"; @@ -364,7 +364,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t if (!empty($conf->accounting->enabled) && !empty($user->rights->accounting->comptarapport->lire) && $mainmenu == 'accountancy') // Entry in accountancy journal for each bank account { - $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire, '', 'accountancy', 'accountancy'); + $newmenu->add('', $langs->trans("RegistrationInAccounting"), 1, $user->rights->accounting->comptarapport->lire, '', 'accountancy', 'accountancy', 10); // Multi journal $sql = "SELECT rowid, code, label, nature"; @@ -419,36 +419,6 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t } else dol_print_error($db); $db->free($resql); - - /* - $sql = "SELECT rowid, label, accountancy_journal"; - $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; - $sql.= " WHERE entity = ".$conf->entity; - $sql.= " AND clos = 0"; - $sql.= " ORDER BY label"; - - $resql = $db->query($sql); - if ($resql) - { - $numr = $db->num_rows($resql); - $i = 0; - - if ($numr > 0) - while ($i < $numr) - { - $objp = $db->fetch_object($resql); - $newmenu->add('/accountancy/journal/bankjournal.php?id_account='.$objp->rowid, $langs->trans("Journal").' - '.$objp->label, 1, $user->rights->accounting->comptarapport->lire,'','accountancy','accountancy_journal'); - $i++; - } - } - else dol_print_error($db); - $db->free($resql); - - // Add other journal - $newmenu->add("/accountancy/journal/sellsjournal.php?leftmenu=journal",$langs->trans("SellsJournal"),1,$user->rights->accounting->comptarapport->lire,'','accountancy','accountancy_journal'); - $newmenu->add("/accountancy/journal/purchasesjournal.php?leftmenu=journal",$langs->trans("PurchasesJournal"),1,$user->rights->accounting->comptarapport->lire,'','accountancy','accountancy_journal'); - $newmenu->add("/accountancy/journal/expensereportsjournal.php?leftmenu=journal",$langs->trans("ExpenseReportsJournal"),1,$user->rights->accounting->comptarapport->lire,'','accountancy','accountancy_journal'); - */ } if (!empty($conf->ftp->enabled) && $mainmenu == 'ftp') // Entry for FTP diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index 4feb38536ce..c11cf34d257 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -103,7 +103,7 @@ class modAsset extends DolibarrModules // 1=>array('ASSETS_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1) // ); $this->const = array( - 1=>array('ASSET_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1) + //1=>array('ASSET_MYCONSTANT', 'chaine', 'avalue', 'This is a constant to add', 1, 'allentities', 1) ); From a0c013d87bfc61db04b84ae33990d6b14112724e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 27 Apr 2020 17:13:23 +0200 Subject: [PATCH 144/456] Fix missing link Conflicts: htdocs/core/class/notify.class.php --- htdocs/core/class/notify.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 59d523b6b44..99910e82ecc 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -314,6 +314,7 @@ class Notify global $user,$conf,$langs,$mysoc; global $hookmanager; global $dolibarr_main_url_root; + global $action; if (! in_array($notifcode, $this->arrayofnotifsupported)) return 0; @@ -524,8 +525,10 @@ class Notify $message.= $mesg; if ($link) $message.= "\n" . $urlwithroot . $link; - $parameters=array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list); - $reshook=$hookmanager->executeHooks('formatNotificationMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + $parameters = array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list); + if (!isset($action)) $action = ''; + + $reshook = $hookmanager->executeHooks('formatNotificationMessage', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if (empty($reshook)) { if (! empty($hookmanager->resArray['subject'])) $subject.=$hookmanager->resArray['subject']; @@ -694,21 +697,25 @@ class Notify $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref); break; case 'EXPENSE_REPORT_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref); break; case 'EXPENSE_REPORT_APPROVE': + $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref); break; case 'HOLIDAY_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref); break; case 'HOLIDAY_APPROVE': + $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref); From 4d22baabfe3bbc4a5e59fd036cb9237a3a7bf531 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 19:40:25 +0200 Subject: [PATCH 145/456] CSS --- htdocs/public/payment/newpayment.php | 6 +++--- htdocs/theme/eldy/global.inc.php | 5 ++++- htdocs/theme/md/style.css.php | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 8b1e8a42574..5beab4fcc3b 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1719,7 +1719,7 @@ if ($action != 'dopayment') if ((empty($paymentmethod) || $paymentmethod == 'paybox') && !empty($conf->paybox->enabled)) { - print '
    '; + print '
    '; print '
    '; print ''.$langs->trans("CreditOrDebitCard").''; print '
    '; @@ -1739,7 +1739,7 @@ if ($action != 'dopayment') if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled)) { - print '
    '; + print '
    '; print ''; print '
    '; print ''.$langs->trans("CreditOrDebitCard").''; @@ -1763,7 +1763,7 @@ if ($action != 'dopayment') { if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY = 'integral'; - print '
    '; + print '
    '; if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') { print '
    '; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 9a152fdb91f..c45f2ad1e77 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -240,6 +240,7 @@ input.buttongen { input.buttonpayment, button.buttonpayment, div.buttonpayment { min-width: 290px; margin-bottom: 15px; + margin-top: 15px; background-image: none; line-height: 24px; padding: 8px; @@ -251,6 +252,8 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment { box-shadow: 1px 1px 4px #bbb; color: #fff; border-radius: 4px; + cursor: pointer; + max-width: 350px; } div.buttonpayment input:focus { color: #008; @@ -411,7 +414,7 @@ div#moretabsList, div#moretabsListaction { hr { border: 0; border-top: 1px solid #ccc; } .tabBar hr { margin-top: 20px; margin-bottom: 17px; } -.button:not(.bordertransp), .buttonDelete:not(.bordertransp) { +.button:not(.bordertransp):not(.buttonpayment), .buttonDelete:not(.bordertransp):not(.buttonpayment) { margin-bottom: 0; margin-top: 0; margin-left: 5px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index dcc9ce34886..dfcc413986f 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -393,7 +393,7 @@ input.buttongen { input.buttonpayment, button.buttonpayment, div.buttonpayment { min-width: 290px; margin-bottom: 15px; - margin-top: 0; + margin-top: 15px; margin-left: 5px; margin-right: 5px; background-image: none; @@ -566,7 +566,7 @@ div#moretabsList, div#moretabsListaction { hr { border: 0; border-top: 1px solid #ccc; } -.button:not(.bordertransp), .buttonDelete:not(.bordertransp) { +.button:not(.bordertransp):not(.buttonpayment), .buttonDelete:not(.bordertransp):not(.buttonpayment) { border-color: #c5c5c5; border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); display: inline-block; From e68f51c4cd1ccb5938e0c3887669fd851ed1cdfb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 19:42:39 +0200 Subject: [PATCH 146/456] csss --- htdocs/theme/eldy/global.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index c45f2ad1e77..c559fcec9ad 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -241,6 +241,7 @@ input.buttonpayment, button.buttonpayment, div.buttonpayment { min-width: 290px; margin-bottom: 15px; margin-top: 15px; + height: 60px; background-image: none; line-height: 24px; padding: 8px; From a7815e0aac59ccde98283833614d48b37072d7c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 19:44:32 +0200 Subject: [PATCH 147/456] css --- htdocs/public/payment/newpayment.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 5beab4fcc3b..dd670928a5c 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1763,7 +1763,11 @@ if ($action != 'dopayment') { if (empty($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY)) $conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY = 'integral'; - print '
    '; + print '
    '; + if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY != 'integral') { + print '
    '; + } + print ' '; if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') { print '
    '; From 293034dd89b26c57d1f0b1e5c9aed81524cd73f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 19:47:31 +0200 Subject: [PATCH 148/456] css --- htdocs/public/payment/newpayment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index dd670928a5c..ddd1943329e 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -1765,7 +1765,7 @@ if ($action != 'dopayment') print '
    '; if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY != 'integral') { - print '
    '; + print '
     
    '; } print ' '; if ($conf->global->PAYPAL_API_INTEGRAL_OR_PAYPALONLY == 'integral') From f8dfe886ac67aff9e088c6b0c03e6c219a6f2162 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 28 Apr 2020 20:52:24 +0200 Subject: [PATCH 149/456] Fix css --- htdocs/compta/bank/bankentries_list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 7b531d31bc0..7d059734126 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -1519,7 +1519,7 @@ if ($resql) // Transaction reconciliated or edit link if ($objp->conciliated && $bankaccount->canBeConciliated() > 0) // If line not conciliated and account can be conciliated { - print ''; + print ''; print img_edit(); print ''; } From 40f1bed8d0dfaaabb4712f445f1fc9561d84111d Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 29 Apr 2020 09:15:27 +0200 Subject: [PATCH 150/456] Add possibility to filter stats by ThirdParty type and categorie --- .../comm/propal/class/propalestats.class.php | 24 +++++++++++++- htdocs/comm/propal/stats/index.php | 33 ++++++++++++++++--- htdocs/commande/class/commandestats.class.php | 24 +++++++++++++- htdocs/commande/stats/index.php | 30 ++++++++++++++++- .../facture/class/facturestats.class.php | 26 ++++++++++++++- htdocs/compta/facture/stats/index.php | 32 ++++++++++++++++-- 6 files changed, 159 insertions(+), 10 deletions(-) diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index d5c48006430..655ccda2a80 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -3,6 +3,7 @@ * Copyright (c) 2005-2013 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (c) 2011 Juanjo Menent + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -46,6 +47,7 @@ class PropaleStats extends Stats public $from; public $field; public $where; + public $join; /** @@ -56,13 +58,14 @@ class PropaleStats extends Stats * @param int $userid Id user for filter (creation user) * @param string $mode Option ('customer', 'supplier') */ - public function __construct($db, $socid = 0, $userid = 0, $mode = 'customer') + public function __construct($db, $socid = 0, $userid = 0, $mode = 'customer', $typentid = 0, $categid = 0) { global $user, $conf; $this->db = $db; $this->socid = ($socid > 0 ? $socid : 0); $this->userid = $userid; + $this->join = ''; if ($mode == 'customer') { @@ -96,6 +99,19 @@ class PropaleStats extends Stats $this->where .= " AND p.fk_soc = ".$this->socid; } if ($this->userid > 0) $this->where .= ' AND fk_user_author = '.$this->userid; + + if ($typentid) + { + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = p.fk_soc'; + $this->where .= ' AND s.fk_typent = '.$typentid; + } + + if ($categid) + { + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cs ON cs.fk_soc = p.fk_soc'; + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as c ON c.rowid = cs.fk_categorie'; + $this->where .= ' AND c.rowid = '.$categid; + } } @@ -113,6 +129,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -135,6 +152,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); @@ -156,6 +174,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, SUM(p.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -178,6 +197,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%m') as dm, AVG(p.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -198,6 +218,7 @@ class PropaleStats extends Stats $sql = "SELECT date_format(".$this->field_date.",'%Y') as year, COUNT(*) as nb, SUM(".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; $sql .= $this->db->order('year', 'DESC'); @@ -221,6 +242,7 @@ class PropaleStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " AND p.rowid = tl.fk_propal AND tl.fk_product = product.rowid"; $sql .= " AND ".$this->field_date." BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 3fee370c89b..78fbf725929 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos García * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -28,7 +29,10 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propalestats.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); @@ -38,6 +42,8 @@ if ($mode == 'customer' && !$user->rights->propale->lire) accessforbidden(); if ($mode == 'supplier' && !$user->rights->supplier_proposal->lire) accessforbidden(); $object_status = GETPOST('object_status'); +$typent_id = GETPOST('typent_id', 'int'); +$categ_id = GETPOST('categ_id', 'categ_id'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); @@ -64,17 +70,26 @@ $langs->loadLangs(array('orders', 'companies', 'other', 'suppliers', 'supplier_p $form = new Form($db); $formpropal = new FormPropal($db); +$formcompany = new FormCompany($db); +$formother = new FormOther($db); $langs->loadLangs(array('propal', 'other', 'companies')); -$picto = 'propal'; -$title = $langs->trans("ProposalsStatistics"); -$dir = $conf->propale->dir_temp; +if ($mode == 'customer') +{ + $picto = 'propal'; + $title = $langs->trans("ProposalsStatistics"); + $dir = $conf->propale->dir_temp; + $cat_type = Categorie::TYPE_CUSTOMER; + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); +} if ($mode == 'supplier') { $picto = 'supplier_proposal'; $title = $langs->trans("ProposalsStatisticsSuppliers").' ('.$langs->trans("SentToSuppliers").")"; $dir = $conf->supplier_proposal->dir_temp; + $cat_type = Categorie::TYPE_SUPPLIER; + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); } llxHeader('', $title); @@ -85,7 +100,7 @@ print load_fiche_titre($title, '', $picto); dol_mkdir($dir); -$stats = new PropaleStats($db, $socid, ($userid > 0 ? $userid : 0), $mode); +$stats = new PropaleStats($db, $socid, ($userid > 0 ? $userid : 0), $mode, ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0)); if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND p.fk_statut IN ('.$db->escape($object_status).')'; // Build graphic number of object @@ -251,6 +266,16 @@ print '
    '; $filter = 's.client IN (1,2,3)'; print $form->select_company($socid, 'socid', $filter, 1, 0, 0, array(), 0, '', 'style="width: 95%"'); print ''; + // ThirdParty Type + print ''.$langs->trans("ThirdPartyType").''; + $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. + print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); + if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print ''; + // Category + print ''.$cat_label.''; + print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); + print ''; // User print ''.$langs->trans("CreatedBy").''; print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index 8b6dc4db6ec..e040a1b1ce1 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -3,6 +3,7 @@ * Copyright (c) 2005-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos García + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -45,6 +46,7 @@ class CommandeStats extends Stats public $from; public $field; public $where; + public $join; /** @@ -55,7 +57,7 @@ class CommandeStats extends Stats * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) */ - public function __construct($db, $socid, $mode, $userid = 0) + public function __construct($db, $socid, $mode, $userid = 0, $typentid = 0, $categid = 0) { global $user, $conf; @@ -64,6 +66,7 @@ class CommandeStats extends Stats $this->socid = ($socid > 0 ? $socid : 0); $this->userid = $userid; $this->cachefilesuffix = $mode; + $this->join = ''; if ($mode == 'customer') { @@ -92,6 +95,19 @@ class CommandeStats extends Stats $this->where .= " AND c.fk_soc = ".$this->socid; } if ($this->userid > 0) $this->where .= ' AND c.fk_user_author = '.$this->userid; + + if ($typentid) + { + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = c.fk_soc'; + $this->where .= ' AND s.fk_typent = '.$typentid; + } + + if ($categid) + { + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cats ON cats.fk_soc = c.fk_soc'; + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as cat ON cat.rowid = cats.fk_categorie'; + $this->where .= ' AND cat.rowid = '.$categid; + } } /** @@ -108,6 +124,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -130,6 +147,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%Y') as dm, COUNT(*) as nb, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); @@ -151,6 +169,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -173,6 +192,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%m') as dm, AVG(c.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -193,6 +213,7 @@ class CommandeStats extends Stats $sql = "SELECT date_format(c.date_commande,'%Y') as year, COUNT(*) as nb, SUM(c.".$this->field.") as total, AVG(".$this->field.") as avg"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; $sql .= $this->db->order('year', 'DESC'); @@ -214,6 +235,7 @@ class CommandeStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " AND c.rowid = tl.fk_commande AND tl.fk_product = product.rowid"; $sql .= " AND c.date_commande BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 16cef93d228..d009621dc82 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -4,6 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2012 Marcos García * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -28,7 +29,10 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commandestats.class.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); @@ -39,6 +43,8 @@ if ($mode == 'customer' && !$user->rights->commande->lire) accessforbidden(); if ($mode == 'supplier' && !$user->rights->fournisseur->commande->lire) accessforbidden(); $object_status = GETPOST('object_status'); +$typent_id = GETPOST('typent_id', 'int'); +$categ_id = GETPOST('categ_id', 'categ_id'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); @@ -65,6 +71,8 @@ $langs->loadLangs(array('orders', 'companies', 'other', 'suppliers')); $form = new Form($db); $formorder = new FormOrder($db); +$formcompany = new FormCompany($db); +$formother = new FormOther($db); $picto = 'order'; $title = $langs->trans("OrdersStatistics"); @@ -83,7 +91,7 @@ print load_fiche_titre($title, '', $picto); dol_mkdir($dir); -$stats = new CommandeStats($db, $socid, $mode, ($userid > 0 ? $userid : 0)); +$stats = new CommandeStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0)); if ($mode == 'customer') { if ($object_status != '' && $object_status >= -1) $stats->where .= ' AND c.fk_statut IN ('.$db->escape($object_status).')'; @@ -266,6 +274,26 @@ if ($mode == 'customer') $filter = 's.client IN (1,2,3)'; if ($mode == 'supplier') $filter = 's.fournisseur = 1'; print $form->select_company($socid, 'socid', $filter, 1, 0, 0, array(), 0, '', 'style="width: 95%"'); print ''; +// ThirdParty Type +print ''.$langs->trans("ThirdPartyType").''; +$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. +print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); +if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +print ''; +// Category +if ($mode == 'customer') +{ + $cat_type = Categorie::TYPE_CUSTOMER; + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); +} +if ($mode == 'supplier') +{ + $cat_type = Categorie::TYPE_SUPPLIER; + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); +} +print ''.$cat_label.''; +print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); +print ''; // User print ''.$langs->trans("CreatedBy").''; print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index ea0b17bc59a..d280b7745e2 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (c) 2005-2013 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -43,6 +44,7 @@ class FactureStats extends Stats public $from; public $field; public $where; + public $join; /** @@ -52,8 +54,9 @@ class FactureStats extends Stats * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) + * @param int $ Id user for filter (creation user) */ - public function __construct($db, $socid, $mode, $userid = 0) + public function __construct($db, $socid, $mode, $userid = 0, $typentid = 0, $categid = 0) { global $user, $conf; @@ -61,6 +64,7 @@ class FactureStats extends Stats $this->socid = ($socid > 0 ? $socid : 0); $this->userid = $userid; $this->cachefilesuffix = $mode; + $this->join = ''; if ($mode == 'customer') { @@ -79,6 +83,7 @@ class FactureStats extends Stats $this->field_line = 'total_ht'; } + $this->where = " f.fk_statut >= 0"; $this->where .= " AND f.entity IN (".getEntity('invoice').")"; if (!$user->rights->societe->client->voir && !$this->socid) $this->where .= " AND f.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; @@ -90,6 +95,19 @@ class FactureStats extends Stats if ($this->userid > 0) $this->where .= ' AND f.fk_user_author = '.$this->userid; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $this->where .= " AND f.type IN (0,1,2,5)"; else $this->where .= " AND f.type IN (0,1,2,3,5)"; + + if ($typentid) + { + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe as s ON s.rowid = f.fk_soc'; + $this->where .= ' AND s.fk_typent = '.$typentid; + } + + if ($categid) + { + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cs ON cs.fk_soc = f.fk_soc'; + $this->join .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie as c ON c.rowid = cs.fk_categorie'; + $this->where .= ' AND c.rowid = '.$categid; + } } @@ -107,6 +125,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(f.datef,'%m') as dm, COUNT(*) as nb"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -130,6 +149,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(f.datef,'%Y') as dm, COUNT(*), SUM(c.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); @@ -152,6 +172,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(datef,'%m') as dm, SUM(f.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -175,6 +196,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; @@ -195,6 +217,7 @@ class FactureStats extends Stats $sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(f.".$this->field.") as total, AVG(f.".$this->field.") as avg"; $sql .= " FROM ".$this->from; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " GROUP BY year"; $sql .= $this->db->order('year', 'DESC'); @@ -216,6 +239,7 @@ class FactureStats extends Stats $sql = "SELECT product.ref, COUNT(product.ref) as nb, SUM(tl.".$this->field_line.") as total, AVG(tl.".$this->field_line.") as avg"; $sql .= " FROM ".$this->from.", ".$this->from_line.", ".MAIN_DB_PREFIX."product as product"; if (!$user->rights->societe->client->voir && !$this->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= $this->join; $sql .= " WHERE ".$this->where; $sql .= " AND f.rowid = tl.fk_facture AND tl.fk_product = product.rowid"; $sql .= " AND f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year, 1, false))."' AND '".$this->db->idate(dol_get_last_day($year, 12, false))."'"; diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 36dfab5a3c4..b1af8064d9f 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -4,6 +4,7 @@ * Copyright (C) 2012 Marcos García * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -27,6 +28,9 @@ require '../../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); @@ -40,6 +44,8 @@ if ($mode == 'customer' && !$user->rights->facture->lire) accessforbidden(); if ($mode == 'supplier' && !$user->rights->fournisseur->facture->lire) accessforbidden(); $object_status = GETPOST('object_status'); +$typent_id = GETPOST('typent_id', 'int'); +$categ_id = GETPOST('categ_id', 'categ_id'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); @@ -62,6 +68,8 @@ $endyear = $year; */ $form = new Form($db); +$formcompany = new FormCompany($db); +$formother = new FormOther($db); llxHeader(); @@ -81,7 +89,7 @@ print load_fiche_titre($title, '', $picto); dol_mkdir($dir); -$stats = new FactureStats($db, $socid, $mode, ($userid > 0 ? $userid : 0)); +$stats = new FactureStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0)); if ($mode == 'customer') { if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')'; @@ -248,6 +256,26 @@ if ($mode == 'customer') $filter = 's.client in (1,2,3)'; if ($mode == 'supplier') $filter = 's.fournisseur = 1'; print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1); print ''; +// ThirdParty Type +print ''.$langs->trans("ThirdPartyType").''; +$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. +print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); +if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); +print ''; +// Category +print ''.$cat_label.''; +if ($mode == 'customer') +{ + $cat_type = Categorie::TYPE_CUSTOMER; + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); +} +if ($mode == 'supplier') +{ + $cat_type = Categorie::TYPE_SUPPLIER; + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); +} +print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); +print ''; // User print ''.$langs->trans("CreatedBy").''; print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); @@ -256,7 +284,7 @@ print ''; print ''.$langs->trans("Status").''; if ($mode == 'customer') { - $liststatus = array('0'=>$langs->trans("BillStatusDraft"), '1'=>$langs->trans("BillStatusNotPaid"), '2'=>$langs->trans("BillStatusPaid"), '3'=>$langs->trans("BillStatusCanceled")); + $liststatus = array('0'=>$langs->trans("BillStatusDraft"), '1'=>$langs->trans("BillStatusNotPaid"), '2'=>$langs->trans("BillStatusPaid"), '1,2'=>$langs->trans("BillStatusNotPaid").' / '.$langs->trans("BillStatusPaid"), '3'=>$langs->trans("BillStatusCanceled")); print $form->selectarray('object_status', $liststatus, $object_status, 1); } if ($mode == 'supplier') From 1bd93720222243a017cd50822843849622149fd8 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 29 Apr 2020 10:00:29 +0200 Subject: [PATCH 151/456] Forgot comments to document news params for the modified methods --- htdocs/comm/propal/class/propalestats.class.php | 10 ++++++---- htdocs/commande/class/commandestats.class.php | 10 ++++++---- htdocs/compta/facture/class/facturestats.class.php | 3 ++- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index 655ccda2a80..747bb75433c 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -53,10 +53,12 @@ class PropaleStats extends Stats /** * Constructor * - * @param DoliDB $db Database handler - * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. - * @param int $userid Id user for filter (creation user) - * @param string $mode Option ('customer', 'supplier') + * @param DoliDB $db Database handler + * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. + * @param int $userid Id user for filter (creation user) + * @param string $mode Option ('customer', 'supplier') + * @param int $typentid Id typent of thirdpary for filter + * @param int $categid Id category of thirdpary for filter */ public function __construct($db, $socid = 0, $userid = 0, $mode = 'customer', $typentid = 0, $categid = 0) { diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index e040a1b1ce1..cbb93b940de 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -52,10 +52,12 @@ class CommandeStats extends Stats /** * Constructor * - * @param DoliDB $db Database handler - * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. - * @param string $mode Option ('customer', 'supplier') - * @param int $userid Id user for filter (creation user) + * @param DoliDB $db Database handler + * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. + * @param string $mode Option ('customer', 'supplier') + * @param int $userid Id user for filter (creation user) + * @param int $typentid Id typent of thirdpary for filter + * @param int $categid Id category of thirdpary for filter */ public function __construct($db, $socid, $mode, $userid = 0, $typentid = 0, $categid = 0) { diff --git a/htdocs/compta/facture/class/facturestats.class.php b/htdocs/compta/facture/class/facturestats.class.php index d280b7745e2..6b95c939e2a 100644 --- a/htdocs/compta/facture/class/facturestats.class.php +++ b/htdocs/compta/facture/class/facturestats.class.php @@ -54,7 +54,8 @@ class FactureStats extends Stats * @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user. * @param string $mode Option ('customer', 'supplier') * @param int $userid Id user for filter (creation user) - * @param int $ Id user for filter (creation user) + * @param int $typentid Id typent of thirdpary for filter + * @param int $categid Id category of thirdpary for filter */ public function __construct($db, $socid, $mode, $userid = 0, $typentid = 0, $categid = 0) { From 56dee72b66a6300cd2ac2b12598bfe0334b73297 Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Wed, 29 Apr 2020 13:30:14 +0200 Subject: [PATCH 152/456] add tooltip for unit_type and scale (admin) --- htdocs/admin/dict.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 3c19121d424..15cfd9ed9db 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -503,7 +503,7 @@ $tabhelp[33] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[34] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[35] = array(); $tabhelp[36] = array('range_ik'=>$langs->trans('PrevRangeToThisRange')); -$tabhelp[37] = array('code'=>$langs->trans("EnterAnyCode")); +$tabhelp[37] = array('code'=>$langs->trans("EnterAnyCode"), 'unit_type' => $langs->trans('MeasuringUnitTypeDesc'), 'scale' => $langs->trans('MeasuringScaleDesc')); $tabhelp[38] = array('code'=>$langs->trans("EnterAnyCode"), 'url' => $langs->trans('UrlSocialNetworksDesc'), 'icon' => $langs->trans('FafaIconSocialNetworksDesc')); // List of check for fields (NOT USED YET) From 9e7c0c14d95ef8764a29d8755f9235a1733b05a7 Mon Sep 17 00:00:00 2001 From: Tobias Sekan Date: Wed, 29 Apr 2020 13:30:58 +0200 Subject: [PATCH 153/456] Add two new lang entries (admin) --- htdocs/langs/en_US/admin.lang | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 96bb77a5064..d19d928cdbd 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1995,3 +1995,5 @@ PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book. RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard JumpToBoxes=Jump to Setup -> Widgets +MeasuringUnitTypeDesc=For the product units like weight, length, area and volume use "size", "surface", "volume" or "weight" as Unit_type +MeasuringScaleDesc=The scale for the Unit_types "size", "surface", "volume" and "weight" can only we have values from -127 up to 128. From 398b0234ea95309a3d85245c1844bf3e51502527 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 29 Apr 2020 14:08:31 +0200 Subject: [PATCH 154/456] Correct label for select thirdparty categorie in invoice stats --- htdocs/compta/facture/stats/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index b1af8064d9f..513e1d6a0a2 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -263,7 +263,6 @@ print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''; // Category -print ''.$cat_label.''; if ($mode == 'customer') { $cat_type = Categorie::TYPE_CUSTOMER; @@ -274,6 +273,7 @@ if ($mode == 'supplier') $cat_type = Categorie::TYPE_SUPPLIER; $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); } +print ''.$cat_label.''; print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); print ''; // User From 790cffb7ae4e0b461b226044023fa360fea17809 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 29 Apr 2020 15:24:13 +0200 Subject: [PATCH 155/456] Correct select label for categories in stats pages --- htdocs/comm/propal/stats/index.php | 2 +- htdocs/commande/stats/index.php | 2 +- htdocs/compta/facture/stats/index.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 78fbf725929..add31f13f08 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -89,7 +89,7 @@ if ($mode == 'supplier') $title = $langs->trans("ProposalsStatisticsSuppliers").' ('.$langs->trans("SentToSuppliers").")"; $dir = $conf->supplier_proposal->dir_temp; $cat_type = Categorie::TYPE_SUPPLIER; - $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier")); } llxHeader('', $title); diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index d009621dc82..4e7ed481882 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -289,7 +289,7 @@ if ($mode == 'customer') if ($mode == 'supplier') { $cat_type = Categorie::TYPE_SUPPLIER; - $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); + $cat_label = $langs->trans("Supplier").' '.lcfirst($langs->trans("Customer")); } print ''.$cat_label.''; print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 513e1d6a0a2..f5472196cc2 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -271,7 +271,7 @@ if ($mode == 'customer') if ($mode == 'supplier') { $cat_type = Categorie::TYPE_SUPPLIER; - $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier")); } print ''.$cat_label.''; print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); From 84bca036c9eb20c073b1a6549d090deed4a808a6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Apr 2020 18:03:28 +0200 Subject: [PATCH 156/456] FIX Link missing into email of some notification --- htdocs/core/class/notify.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 99910e82ecc..db0e490a6c6 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -482,26 +482,31 @@ class Notify $mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n"; break; case 'SHIPPING_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->expedition->dir_output.'/sending/'; - $object_type = 'order_supplier'; + $object_type = 'expedition'; $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref); break; case 'EXPENSE_REPORT_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref); break; case 'EXPENSE_REPORT_APPROVE': + $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref); break; case 'HOLIDAY_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref); break; case 'HOLIDAY_APPROVE': + $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref); @@ -692,6 +697,7 @@ class Notify $mesg.= "\n\n".$langs->transnoentitiesnoconv("Sincerely").".\n\n"; break; case 'SHIPPING_VALIDATE': + $link = ''.$newref.''; $dir_output = $conf->expedition->dir_output.'/sending/'; $object_type = 'order_supplier'; $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref); From 6ec6a4465ad95fb16a660f87653a8e397596d1a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Apr 2020 20:21:17 +0200 Subject: [PATCH 157/456] FIX Setup of thirdparty or contact for external users --- htdocs/core/class/html.form.class.php | 8 +++---- htdocs/user/card.php | 30 +++++++++++++++++++++------ 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 25ed9f86625..b2c677ed29d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1298,11 +1298,11 @@ class Form // Construct $out and $outarray $out .= ''; if (($showempty == 1 || ($showempty == 3 && $num > 1)) && !$multiple) $out .= ''; - if ($showempty == 2) $out .= ''; + if ($showempty == 2) $out .= ''; $num = $this->db->num_rows($resql); $i = 0; diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 22b591dd53f..cd115dbe292 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -481,17 +481,22 @@ if (empty($reshook)) { if (!$error && GETPOSTISSET('contactid')) { $contactid = GETPOST('contactid', 'int'); + $socid = GETPOST('socid', 'int'); - if ($contactid > 0) { + if ($contactid > 0) { // The 'contactid' is used inpriority over the 'socid' $contact = new Contact($db); $contact->fetch($contactid); $sql = "UPDATE ".MAIN_DB_PREFIX."user"; - $sql .= " SET fk_socpeople=".$db->escape($contactid); + $sql .= " SET fk_socpeople=".((int) $contactid); if (!empty($contact->socid)) { - $sql .= ", fk_soc=".$db->escape($contact->socid); + $sql .= ", fk_soc=".((int) $contact->socid); } $sql .= " WHERE rowid=".$object->id; + } elseif ($socid > 0) { + $sql = "UPDATE ".MAIN_DB_PREFIX."user"; + $sql .= " SET fk_socpeople=NULL, fk_soc=".((int) $socid); + $sql .= " WHERE rowid=".$object->id; } else { $sql = "UPDATE ".MAIN_DB_PREFIX."user"; $sql .= " SET fk_socpeople=NULL, fk_soc=NULL"; @@ -1831,7 +1836,7 @@ else $contact->fetch($object->contactid); if ($object->socid > 0) print ' / '; else print '
    '; - print ''.img_object($langs->trans("ShowContact"), 'contact').' '.dol_trunc($contact->getFullName($langs), 32).''; + print $contact->getNomUrl(1, ''); } print ''; print ''."\n"; @@ -2287,6 +2292,7 @@ else print ''; if ($user->id == $object->id || !$user->admin) { + // Read mode $type = $langs->trans("Internal"); if ($object->socid) $type = $langs->trans("External"); print $form->textwithpicto($type, $langs->trans("InternalExternalDesc")); @@ -2294,10 +2300,22 @@ else } else { + // Select mode $type = 0; if ($object->contactid) $type = $object->contactid; - print $form->selectcontacts(0, $type, 'contactid', 2, '', '', 1, '', false, 1); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + + if ($object->socid > 0 && ! ($object->contactid > 0)) { // external user but no link to a contact + print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' '); + print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); + if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + } elseif ($object->socid > 0 && $object->contactid > 0) { // external user with a link to a contact + print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set + print img_picto('', 'contact').$form->selectcontacts(0, $object->contactid, 'contactid', 1, '', '', 1, '', false, 1); + if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + } else { // $object->socid is not > 0 here + print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set + print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); + } } print ''; From 6d79eed8c1776cd48d47ff4675b46634ca089c88 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 29 Apr 2020 20:36:14 +0200 Subject: [PATCH 158/456] Fix colspan alignement --- htdocs/societe/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 8800bd887a1..b5400db04b3 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1354,10 +1354,10 @@ else // Phone / Fax print ''.$form->editfieldkey('Phone', 'phone', '', $object, 0).''; - print ''.img_picto('', 'object_phoning').' '; + print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning').' '; if ($conf->browser->layout == 'phone') print ''; print ''.$form->editfieldkey('Fax', 'fax', '', $object, 0).''; - print ''.img_picto('', 'object_phoning_fax').' '; + print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax').' '; // Email / Web print ''.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).''; @@ -1501,13 +1501,13 @@ else } // Type - Size - print ''.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).''."\n"; + print ''.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'browser->layout == 'phone' ? ' colspan="3"': '').'>'."\n"; $sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''; if ($conf->browser->layout == 'phone') print ''; - print ''.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).''; + print ''.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).'browser->layout == 'phone' ? ' colspan="3"': '').'>'; print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''; From 4dbd16077e4de7228e436573904ced5f8f9bcfa6 Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Thu, 30 Apr 2020 01:10:12 +0200 Subject: [PATCH 159/456] Finish send receipt by email from TakePOS --- htdocs/takepos/admin/setup.php | 2 +- htdocs/takepos/invoice.php | 4 +- htdocs/takepos/receipt.php | 2 +- htdocs/takepos/send.php | 141 +++++++++++---------------------- 4 files changed, 50 insertions(+), 99 deletions(-) diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index bf5c4671b13..3e12fdce5c9 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -362,7 +362,7 @@ if (is_array($formmail->lines_model)) { if (!empty($arrayofmessagename[$modelmail->label])) { $moreonlabel = ' ('.$langs->trans("SeveralLangugeVariatFound").')'; } - $arrayofmessagename[$modelmail->label] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; + $arrayofmessagename[$modelmail->id] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->topic)).$moreonlabel; } } //var_dump($arraydefaultmessage); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index adbf403491e..fa5ca2f83be 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -597,7 +597,7 @@ if ($action == "valid" || $action == "history") } else { $sectionwithinvoicelink .= ' '; } - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) + if ($conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE > 0) { $sectionwithinvoicelink .= ' '; } @@ -690,7 +690,7 @@ if ($action == "search") { function SendTicket(id) { console.log("Open box to select the Print/Send form"); - $.colorbox({href:"send.php?facid="+id, width:"90%", height:"50%", transition:"none", iframe:"true", title:"trans("SendTicket"); ?>"}); + $.colorbox({href:"send.php?facid="+id, width:"70%", height:"30%", transition:"none", iframe:"true", title:"trans("SendTicket"); ?>"}); } function Print(id){ diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index c025f504d73..90b3a5c1fee 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -25,7 +25,7 @@ * \brief Page to show a receipt. */ -require '../main.inc.php'; // Load $user and permissions +if (!isset($action)) require '../main.inc.php'; // If this file is called from send.php avoid load again include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $langs->loadLangs(array("main", "cashdesk", "companies")); diff --git a/htdocs/takepos/send.php b/htdocs/takepos/send.php index 5774c9bbaf1..720cd4e271c 100644 --- a/htdocs/takepos/send.php +++ b/htdocs/takepos/send.php @@ -1,5 +1,6 @@ +/* Copyright (C) 2019 Thibault FOUCART + * Copyright (C) 2020 Andreu Bisquerra Gaya * * 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 @@ -35,123 +36,73 @@ require '../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -$invoiceid = GETPOST('facid', 'int'); +$facid = GETPOST('facid', 'int'); +$action = GETPOST('action', 'alpha'); +$email = GETPOST('email', 'alpha'); if (empty($user->rights->takepos->run)) { accessforbidden(); } - -/* - * View - */ - -$invoice = new Facture($db); -if ($invoiceid > 0) -{ - $invoice->fetch($invoiceid); -} -else -{ - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; - $resql = $db->query($sql); - $obj = $db->fetch_object($resql); - if ($obj) - { - $invoiceid = $obj->rowid; - } - if (!$invoiceid) - { - $invoiceid = 0; // Invoice does not exist yet - } - else - { - $invoice->fetch($invoiceid); - } -} - $langs->loadLangs(array("main", "bills", "cashdesk")); +$invoice = new Facture($db); +$invoice->fetch($facid); +$customer = new Societe($db); +$customer->fetch($invoice->socid); + +if ($action=="send") +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $outputlangs = new Translate('', $conf); + $model_id = $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE; + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'facture_send', $user, $outputlangs, $model_id); + $subject = $arraydefaultmessage->topic; + ob_start(); // turn on output receipt + include('receipt.php'); + $receipt = ob_get_contents(); // get the contents of the output buffer + ob_end_clean(); + $msg="".$arraydefaultmessage->content."
    ".$receipt.""; + $sendto=$email; + $from=$mysoc->email; + $mail = new CMailFile($subject, $sendto, $from, $msg, array(), array(), array(), '', '', 0, 1); + if ($mail->error || $mail->errors) { + setEventMessages($mail->error, $mail->errors, 'errors'); + } else { + $result = $mail->sendfile(); + } + exit; +} +$arrayofcss = array('/takepos/css/pos.css.php'); +$arrayofjs = array(); +top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); ?> -
    -
    +
    +

    - +
    From 281a97404a84c740fa4b7906ecc3126ca055f22d Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Thu, 30 Apr 2020 01:27:55 +0200 Subject: [PATCH 160/456] Fix travis --- htdocs/takepos/send.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/send.php b/htdocs/takepos/send.php index 720cd4e271c..3f59d4069b5 100644 --- a/htdocs/takepos/send.php +++ b/htdocs/takepos/send.php @@ -61,9 +61,9 @@ if ($action=="send") $arraydefaultmessage = $formmail->getEMailTemplate($db, 'facture_send', $user, $outputlangs, $model_id); $subject = $arraydefaultmessage->topic; ob_start(); // turn on output receipt - include('receipt.php'); + include 'receipt.php'; $receipt = ob_get_contents(); // get the contents of the output buffer - ob_end_clean(); + ob_end_clean(); $msg="".$arraydefaultmessage->content."
    ".$receipt.""; $sendto=$email; $from=$mysoc->email; From 82ace4b4ef6f8fd63ec4f6d73df641fb7362c129 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Sep 2019 22:39:24 +0200 Subject: [PATCH 161/456] FIX Several pb in export of documents FIX Must escape shell FIX Must exclude logs and some dirs for compressed backup FIX gzip and bzip2 must use option -f --- htdocs/admin/tools/dolibarr_export.php | 74 ++-- htdocs/admin/tools/export_files.php | 49 +- htdocs/core/class/utils.class.php | 178 +++++--- htdocs/core/lib/files.lib.php | 591 +++++++++++++++---------- 4 files changed, 520 insertions(+), 372 deletions(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index d04840e2d71..0bef19dde56 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -29,15 +29,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $langs->load("admin"); -$action=GETPOST('action','alpha'); +$action=GETPOST('action', 'alpha'); -$sortfield = GETPOST('sortfield','alpha'); -$sortorder = GETPOST('sortorder','alpha'); -$page = GETPOST('page','int'); +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); +$page = GETPOST('page', 'int'); if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; if (empty($page) || $page == -1) { $page = 0; } -$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; $offset = $limit * $page; if (! $user->admin) @@ -50,10 +50,20 @@ if (! $user->admin) if ($action == 'delete') { - $file=$conf->admin->dir_output.'/backup/'.basename(GETPOST('urlfile', 'alpha')); - $ret=dol_delete_file($file, 1); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + if (preg_match('/^backup\//', GETPOST('urlfile', 'alpha'))) + { + $file=$conf->admin->dir_output.'/backup/'.basename(GETPOST('urlfile', 'alpha')); + $ret=dol_delete_file($file, 1); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } + else + { + $file=$conf->admin->dir_output.'/documents/'.basename(GETPOST('urlfile', 'alpha')); + $ret=dol_delete_file($file, 1); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors'); + } $action=''; } @@ -70,7 +80,7 @@ $type=$db->type; //var_dump($db); $help_url='EN:Backups|FR:Sauvegardes|ES:Copias_de_seguridad'; -llxHeader('','',$help_url); +llxHeader('', '', $help_url); ?> trans("Backup"),'','title_setup'); +print load_fiche_titre($langs->trans("Backup"), '', 'title_setup'); //print_barre_liste($langs->trans("Backup"), '', '', '', '', '', $langs->trans("BackupDesc",DOL_DATA_ROOT), 0, 0, 'title_setup'); -print '
    '; -print $langs->trans("BackupDesc",DOL_DATA_ROOT); +print '
    '; +print $langs->trans("BackupDesc", DOL_DATA_ROOT); print '
    '; print '
    '; @@ -128,7 +138,7 @@ print '
    ';
    1 trans("BackupDesc3",$dolibarr_main_db_name).'
    '; +print $langs->trans("BackupDesc3", $dolibarr_main_db_name).'
    '; //print $langs->trans("BackupDescY").'
    '; print '
    '; ?> @@ -166,7 +176,7 @@ print '';
    @@ -211,6 +221,7 @@ print '';
    +
    global->MYSQL_OLD_OPTION_DISABLE_FK)) { ?> @@ -233,14 +244,6 @@ print '';
    - - -
    @@ -453,8 +456,10 @@ print "\n";
    -
    " id="buttonGo" />
    +
    + " id="buttonGo"> + +

    '.$langs->trans("BackupResult").': '; print $_SESSION["commandbackupresult"]; @@ -476,7 +481,7 @@ if (! empty($_SESSION["commandbackuplastdone"])) } if (! empty($_SESSION["commandbackuptorun"])) { - print '
    '.$langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser",$dolibarr_main_db_user,$dolibarr_main_db_user).':
    '."\n"; + print '
    '.$langs->trans("YouMustRunCommandFromCommandLineAfterLoginToUser", $dolibarr_main_db_user, $dolibarr_main_db_user).':
    '."\n"; print '
    '."\n"; print ajax_autoselect("commandbackuptoruntext", 0); print '
    '; @@ -505,8 +510,8 @@ print '';
    admin->dir_output.'/backup','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1); -$result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'backup/',1,0,$langs->trans("NoBackupFileAvailable"),0,$langs->trans("PreviousDumpFiles")); +$filearray=dol_dir_list($conf->admin->dir_output.'/backup', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1); +$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'backup/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles")); print '
    '; ?> @@ -526,7 +531,7 @@ print '
    ';
    2 trans("BackupDesc2",DOL_DATA_ROOT).'
    '; +print $langs->trans("BackupDesc2", DOL_DATA_ROOT).'
    '; print $langs->trans("BackupDescX").'

    '; ?> @@ -582,7 +587,7 @@ print "\n"; ?>
    -
    " id="buttonGo" />

    @@ -593,8 +598,8 @@ print "\n";
    admin->dir_output.'/documents','files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1); -$result=$formfile->list_of_documents($filearray,null,'systemtools','',1,'documents/',1,0,$langs->trans("NoBackupFileAvailable"),0,$langs->trans("PreviousDumpFiles")); +$filearray=dol_dir_list($conf->admin->dir_output.'/documents', 'files', 0, '', '', $sortfield, (strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC), 1); +$result=$formfile->list_of_documents($filearray, null, 'systemtools', '', 1, 'documents/', 1, 0, $langs->trans("NoBackupFileAvailable"), 0, $langs->trans("PreviousDumpFiles")); print '
    '; ?> @@ -605,9 +610,6 @@ print '
    ';
    - - - load("admin"); -$action=GETPOST('action','alpha'); -$what=GETPOST('what','alpha'); -$export_type=GETPOST('export_type','alpha'); -$file=GETPOST('zipfilename_template','alpha'); +$action=GETPOST('action', 'alpha'); +$what=GETPOST('what', 'alpha'); +$export_type=GETPOST('export_type', 'alpha'); +$file=GETPOST('zipfilename_template', 'alpha'); $compression = GETPOST('compression'); $file = dol_sanitizeFileName($file); -$sortfield = GETPOST('sortfield','alpha'); -$sortorder = GETPOST('sortorder','alpha'); -$page = GETPOST("page",'int'); +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); +$page = GETPOST("page", 'int'); if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="date"; if ($page < 0) { $page = 0; } elseif (empty($page)) $page = 0; -$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; +$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; $offset = $limit * $page; if (! $user->admin) accessforbidden(); @@ -112,21 +112,27 @@ $utils = new Utils($db); if ($compression == 'zip') { - $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression); + $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.log|\/temp\/|documents\/admin\/documents\/)/'); if ($ret < 0) { - $errormsg = $langs->trans("ErrorFailedToWriteInDir",$outputfile); + $errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir); } } elseif (in_array($compression, array('gz', 'bz'))) { - $file = substr($file, 0, strrpos($file, '.')); - $file .= '.tar'; - $cmd = 'tar -cf '.$outputdir."/".$file." --exclude=documents/admin/documents -C ".DOL_DATA_ROOT." ".DOL_DATA_ROOT."/../documents/"; - exec($cmd, $out, $retval); - //var_dump($cmd, DOL_DATA_ROOT);exit; + $userlogin = ($user->login ? $user->login : 'unknown'); - if ($retval != 0) + $outputfile = $conf->admin->dir_temp.'/export_files.'.$userlogin.'.out'; // File used with popen method + + $file = substr($file, 0, strrpos($file, '.')); + $file .= '.tar'; + // We also exclude '/temp/' dir and 'documents/admin/documents' + $cmd = "tar -cf ".$outputdir."/".$file." --exclude-vcs --exclude 'temp' --exclude 'dolibarr.log' --exclude='documents/admin/documents' -C ".dirname(DOL_DATA_ROOT)." ".basename(DOL_DATA_ROOT); + + $result = $utils->executeCLI($cmd, $outputfile); + + $retval = $result['error']; + if ($result['result'] || ! empty($retval)) { $langs->load("errors"); dol_syslog("Documents tar retval after exec=".$retval, LOG_ERR); @@ -136,15 +142,17 @@ elseif (in_array($compression, array('gz', 'bz'))) { if ($compression == 'gz') { - $cmd = "gzip " . $outputdir."/".$file; + $cmd = "gzip -f " . $outputdir."/".$file; } if ($compression == 'bz') { - $cmd = "bzip2 " . $outputdir."/".$file; + $cmd = "bzip2 -f " . $outputdir."/".$file; } - exec($cmd, $out, $retval); - if ($retval != 0) + $result = $utils->executeCLI($cmd, $outputfile); + + $retval = $result['error']; + if ($result['result'] || ! empty($retval)) { $errormsg = 'Error '.$compression.' generation return '.$retval; unlink($outputdir."/".$file); @@ -166,4 +174,3 @@ header("Location: dolibarr_export.php"); $time_end = time(); $db->close(); - diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 5007e642300..86eff6613c1 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -32,15 +32,15 @@ class Utils */ public $db; - var $output; // Used by Cron method to return message - var $result; // Used by Cron method to return data + public $output; // Used by Cron method to return message + public $result; // Used by Cron method to return data /** * Constructor * * @param DoliDB $db Database handler */ - function __construct($db) + public function __construct($db) { $this->db = $db; } @@ -54,7 +54,7 @@ class Utils * @param int $nbsecondsold Nb of seconds old to accept deletion of a directory if $choice is 'tempfilesold' * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function purgeFiles($choice = 'tempfilesold', $nbsecondsold = 86400) + public function purgeFiles($choice = 'tempfilesold', $nbsecondsold = 86400) { global $conf, $langs, $dolibarr_main_data_root; @@ -106,7 +106,7 @@ class Utils if (! empty($conf->syslog->enabled)) { $filelog=$conf->global->SYSLOG_FILE; - $filelog=preg_replace('/DOL_DATA_ROOT/i',DOL_DATA_ROOT,$filelog); + $filelog=preg_replace('/DOL_DATA_ROOT/i', DOL_DATA_ROOT, $filelog); $alreadyincluded=false; foreach ($filesarray as $tmpcursor) @@ -193,7 +193,7 @@ class Utils * @param int $execmethod 0=Use default method (that is 1 by default), 1=Use the PHP 'exec', 2=Use the 'popen' method * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - function dumpDatabase($compression='none', $type='auto', $usedefault=1, $file='auto', $keeplastnfiles=0, $execmethod=0) + public function dumpDatabase($compression = 'none', $type = 'auto', $usedefault = 1, $file = 'auto', $keeplastnfiles = 0, $execmethod = 0) { global $db, $conf, $langs, $dolibarr_main_data_root; global $dolibarr_main_db_name, $dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_port, $dolibarr_main_db_pass; @@ -251,8 +251,8 @@ class Utils // Parameteres execution $command = $cmddump; - $command = preg_replace('/(\$|%)/', '', $command); // We removed chars that can be used to inject vars that contains space inside path of command without seeing there is a space to bypass the escapeshellarg. - if (preg_match("/\s/",$command)) $command=escapeshellarg($command); // If there is spaces, we add quotes on command to be sure $command is only a program and not a program+parameters + $command = preg_replace('/(\$|%)/', '', $command); // We removed chars that can be used to inject vars that contains space inside path of command without seeing there is a space to bypass the escapeshellarg. + if (preg_match("/\s/", $command)) $command=escapeshellarg($command); // If there is spaces, we add quotes on command to be sure $command is only a program and not a program+parameters //$param=escapeshellarg($dolibarr_main_db_name)." -h ".escapeshellarg($dolibarr_main_db_host)." -u ".escapeshellarg($dolibarr_main_db_user)." -p".escapeshellarg($dolibarr_main_db_pass); $param=$dolibarr_main_db_name." -h ".$dolibarr_main_db_host; @@ -262,7 +262,6 @@ class Utils if (GETPOST("disable_fk", "alpha") || $usedefault) $param.=" -K"; if (GETPOST("sql_compat", "alpha") && GETPOST("sql_compat", "alpha") != 'NONE') $param.=" --compatible=".escapeshellarg(GETPOST("sql_compat", "alpha")); if (GETPOST("drop_database", "alpha")) $param.=" --add-drop-database"; - if (GETPOST("use_mysql_quick_param", "alpha"))$param.=" --quick"; if (GETPOST("sql_structure", "alpha") || $usedefault) { if (GETPOST("drop", "alpha") || $usedefault) $param.=" --add-drop-table=TRUE"; @@ -292,8 +291,8 @@ class Utils $paramclear=$param; if (! empty($dolibarr_main_db_pass)) { - $paramcrypted.=' -p"'.preg_replace('/./i','*',$dolibarr_main_db_pass).'"'; - $paramclear.=' -p"'.str_replace(array('"','`'),array('\"','\`'),$dolibarr_main_db_pass).'"'; + $paramcrypted.=' -p"'.preg_replace('/./i', '*', $dolibarr_main_db_pass).'"'; + $paramclear.=' -p"'.str_replace(array('"','`'), array('\"','\`'), $dolibarr_main_db_pass).'"'; } $errormsg=''; @@ -317,27 +316,29 @@ class Utils // TODO Replace with executeCLI function if ($execmethod == 1) { - exec($fullcommandclear, $readt, $retval); - $result = $retval; + $output_arr = array(); $retval = null; + exec($fullcommandclear, $output_arr, $retval); if ($retval != 0) { $langs->load("errors"); dol_syslog("Datadump retval after exec=".$retval, LOG_ERR); - $error = 'Error '.$retval; + $errormsg = 'Error '.$retval; $ok=0; } else { $i=0; - if (!empty($readt)) - foreach($readt as $key=>$read) + if (!empty($output_arr)) { - $i++; // output line number - if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue; - fwrite($handle, $read.($execmethod == 2 ? '' : "\n")); - if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1; - elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1; + foreach($output_arr as $key => $read) + { + $i++; // output line number + if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue; + fwrite($handle, $read.($execmethod == 2 ? '' : "\n")); + if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok=1; + elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok=1; + } } } } @@ -351,9 +352,9 @@ class Utils $read = fgets($handlein); // Exclude warning line we don't want if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue; - fwrite($handle,$read); - if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1; - elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1; + fwrite($handle, $read); + if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok=1; + elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok=1; } pclose($handlein); } @@ -369,7 +370,7 @@ class Utils else { $langs->load("errors"); - dol_syslog("Failed to open file ".$outputfile,LOG_ERR); + dol_syslog("Failed to open file ".$outputfile, LOG_ERR); $errormsg=$langs->trans("ErrorFailedToWriteInDir"); } @@ -380,18 +381,18 @@ class Utils if ($handle) { // Get 2048 first chars of error message. - $errormsg = fgets($handle,2048); + $errormsg = fgets($handle, 2048); // Close file if ($compression == 'none') fclose($handle); if ($compression == 'gz') gzclose($handle); if ($compression == 'bz') bzclose($handle); - if ($ok && preg_match('/^-- MySql/i',$errormsg)) $errormsg=''; // Pas erreur + if ($ok && preg_match('/^-- MySql/i', $errormsg)) $errormsg=''; // Pas erreur else { // Renommer fichier sortie en fichier erreur //print "$outputfile -> $outputerror"; @dol_delete_file($outputerror, 1, 0, 0, null, false, 0); - @rename($outputfile,$outputerror); + @rename($outputfile, $outputerror); // Si safe_mode on et command hors du parametre exec, on a un fichier out vide donc errormsg vide if (! $errormsg) { @@ -450,8 +451,8 @@ class Utils // Parameteres execution $command = $cmddump; - $command = preg_replace('/(\$|%)/', '', $command); // We removed chars that can be used to inject vars that contains space inside path of command without seeing there is a space to bypass the escapeshellarg. - if (preg_match("/\s/",$command)) $command=escapeshellarg($command); // If there is spaces, we add quotes on command to be sure $command is only a program and not a program+parameters + $command = preg_replace('/(\$|%)/', '', $command); // We removed chars that can be used to inject vars that contains space inside path of command without seeing there is a space to bypass the escapeshellarg. + if (preg_match("/\s/", $command)) $command=escapeshellarg($command); // If there is spaces, we add quotes on command to be sure $command is only a program and not a program+parameters //$param=escapeshellarg($dolibarr_main_db_name)." -h ".escapeshellarg($dolibarr_main_db_host)." -u ".escapeshellarg($dolibarr_main_db_user)." -p".escapeshellarg($dolibarr_main_db_pass); //$param="-F c"; @@ -515,7 +516,7 @@ class Utils * @param int $execmethod 0=Use default method (that is 1 by default), 1=Use the PHP 'exec', 2=Use the 'popen' method * @return array array('result'=>...,'output'=>...,'error'=>...). result = 0 means OK. */ - function executeCLI($command, $outputfile, $execmethod=0) + public function executeCLI($command, $outputfile, $execmethod = 0) { global $conf, $langs; @@ -535,6 +536,7 @@ class Utils if ($execmethod == 1) { + $retval = null; exec($command, $output_arr, $retval); $result = $retval; if ($retval != 0) @@ -546,7 +548,6 @@ class Utils } if ($execmethod == 2) // With this method, there is no way to get the return code, only output { - $ok=0; $handle = fopen($outputfile, 'w+b'); if ($handle) { @@ -555,7 +556,7 @@ class Utils while (!feof($handlein)) { $read = fgets($handlein); - fwrite($handle,$read); + fwrite($handle, $read); $output_arr[]=$read; } pclose($handlein); @@ -584,14 +585,15 @@ class Utils * @param string $module Module name * @return int <0 if KO, >0 if OK */ - function generateDoc($module) + public function generateDoc($module) { - global $conf, $langs; + global $conf, $langs, $user, $mysoc; global $dirins; $error = 0; $modulelowercase=strtolower($module); + $now=dol_now(); // Dir for module $dir = $dirins.'/'.$modulelowercase; @@ -621,11 +623,12 @@ class Utils exit; } - $arrayversion=explode('.',$moduleobj->version,3); + $arrayversion=explode('.', $moduleobj->version, 3); if (count($arrayversion)) { $FILENAMEASCII=strtolower($module).'.asciidoc'; - $FILENAMEDOC=strtolower($module).'.html'; // TODO Use/text PDF + $FILENAMEDOC=strtolower($module).'.html'; + $FILENAMEDOCPDF=strtolower($module).'.pdf'; $dirofmodule = dol_buildpath(strtolower($module), 0); $dirofmoduledoc = dol_buildpath(strtolower($module), 0).'/doc'; @@ -641,13 +644,25 @@ class Utils return -1; } - $conf->global->MODULEBUILDER_ASCIIDOCTOR='asciidoctor'; - if (empty($conf->global->MODULEBUILDER_ASCIIDOCTOR)) + if (empty($conf->global->MODULEBUILDER_ASCIIDOCTOR) && empty($conf->global->MODULEBUILDER_ASCIIDOCTORPDF)) { $this->error = 'Setup of module ModuleBuilder not complete'; return -1; } + // Copy some files into temp directory, so instruction include::ChangeLog.md[] will works inside the asciidoc file. + dol_copy($dirofmodule.'/README.md', $dirofmoduletmp.'/README.md', 0, 1); + dol_copy($dirofmodule.'/ChangeLog.md', $dirofmoduletmp.'/ChangeLog.md', 0, 1); + + // Replace into README.md and ChangeLog.md (in case they are included into documentation with tag __README__ or __CHANGELOG__) + $arrayreplacement=array(); + $arrayreplacement['/^#\s.*/m']=''; // Remove first level of title into .md files + $arrayreplacement['/^#/m']='##'; // Add on # to increase level + + dolReplaceInFile($dirofmoduletmp.'/README.md', $arrayreplacement, '', 0, 0, 1); + dolReplaceInFile($dirofmoduletmp.'/ChangeLog.md', $arrayreplacement, '', 0, 0, 1); + + $destfile=$dirofmoduletmp.'/'.$FILENAMEASCII; $fhandle = fopen($destfile, 'w+'); @@ -680,35 +695,48 @@ class Utils $i++; } - fwrite($fhandle, "\n\n\n== DATA SPECIFICATIONS...\n\n"); - - // TODO - fwrite($fhandle, "TODO..."); - - - fwrite($fhandle, "\n\n\n== CHANGELOG...\n\n"); - - // TODO - fwrite($fhandle, "TODO..."); - - - fclose($fhandle); - } - // Copy some files into temp directory - dol_copy($dirofmodule.'/README.md', $dirofmoduletmp.'/README.md', 0, 1); - dol_copy($dirofmodule.'/ChangeLog.md', $dirofmoduletmp.'/ChangeLog.md', 0, 1); + $contentreadme=file_get_contents($dirofmoduletmp.'/README.md'); + $contentchangelog=file_get_contents($dirofmoduletmp.'/ChangeLog.md'); + + include DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php'; + + //var_dump($phpfileval['fullname']); + $arrayreplacement=array( + 'mymodule'=>strtolower($module), + 'MyModule'=>$module, + 'MYMODULE'=>strtoupper($module), + 'My module'=>$module, + 'my module'=>$module, + 'Mon module'=>$module, + 'mon module'=>$module, + 'htdocs/modulebuilder/template'=>strtolower($module), + '__MYCOMPANY_NAME__'=>$mysoc->name, + '__KEYWORDS__'=>$module, + '__USER_FULLNAME__'=>$user->getFullName($langs), + '__USER_EMAIL__'=>$user->email, + '__YYYY-MM-DD__'=>dol_print_date($now, 'dayrfc'), + '---Put here your own copyright and developer email---'=>dol_print_date($now, 'dayrfc').' '.$user->getFullName($langs).($user->email?' <'.$user->email.'>':''), + '__DATA_SPECIFICATION__'=>'Not yet available', + '__README__'=>dolMd2Asciidoc($contentreadme), + '__CHANGELOG__'=>dolMd2Asciidoc($contentchangelog), + ); + + dolReplaceInFile($destfile, $arrayreplacement); + } // Launch doc generation $currentdir = getcwd(); chdir($dirofmodule); + require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php'; + $utils = new Utils($db); + + // Build HTML doc $command=$conf->global->MODULEBUILDER_ASCIIDOCTOR.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOC; $outfile=$dirofmoduletmp.'/out.tmp'; - require_once DOL_DOCUMENT_ROOT.'/core/class/utils.class.php'; - $utils = new Utils($this->db); $resarray = $utils->executeCLI($command, $outfile); if ($resarray['result'] != '0') { @@ -716,6 +744,16 @@ class Utils } $result = ($resarray['result'] == 0) ? 1 : 0; + // Build PDF doc + $command=$conf->global->MODULEBUILDER_ASCIIDOCTORPDF.' '.$destfile.' -n -o '.$dirofmoduledoc.'/'.$FILENAMEDOCPDF; + $outfile=$dirofmoduletmp.'/outpdf.tmp'; + $resarray = $utils->executeCLI($command, $outfile); + if ($resarray['result'] != '0') + { + $this->error = $resarray['error'].' '.$resarray['output']; + } + $result = ($resarray['result'] == 0) ? 1 : 0; + chdir($currentdir); } else @@ -751,7 +789,7 @@ class Utils * * @return int 0 if OK, < 0 if KO */ - function compressSyslogs() + public function compressSyslogs() { global $conf; @@ -857,7 +895,7 @@ class Utils $this->output = 'Archive log files (keeping last SYSLOG_FILE_SAVES='.$nbSaves.' files) done.'; return 0; - } + } /** Backup the db OR just a table without mysqldump binary, with PHP only (does not require any exec permission) * Author: David Walsh (http://davidwalsh.name/backup-mysql-database-php) @@ -869,7 +907,7 @@ class Utils * @param string $tables Table name or '*' for all * @return int <0 if KO, >0 if OK */ - function backupTables($outputfile, $tables='*') + public function backupTables($outputfile, $tables = '*') { global $db, $langs; global $errormsg; @@ -896,7 +934,7 @@ class Utils } else { - $tables = is_array($tables) ? $tables : explode(',',$tables); + $tables = is_array($tables) ? $tables : explode(',', $tables); } //cycle through @@ -904,7 +942,7 @@ class Utils if (fwrite($handle, '') === false) { $langs->load("errors"); - dol_syslog("Failed to open file ".$outputfile,LOG_ERR); + dol_syslog("Failed to open file ".$outputfile, LOG_ERR); $errormsg=$langs->trans("ErrorFailedToWriteInDir"); return -1; } @@ -947,9 +985,9 @@ class Utils // Saving the table structure fwrite($handle, "\n--\n-- Table structure for table `".$table."`\n--\n"); - if (GETPOST("nobin_drop")) fwrite($handle,"DROP TABLE IF EXISTS `".$table."`;\n"); // Dropping table if exists prior to re create it - fwrite($handle,"/*!40101 SET @saved_cs_client = @@character_set_client */;\n"); - fwrite($handle,"/*!40101 SET character_set_client = utf8 */;\n"); + if (GETPOST("nobin_drop")) fwrite($handle, "DROP TABLE IF EXISTS `".$table."`;\n"); // Dropping table if exists prior to re create it + fwrite($handle, "/*!40101 SET @saved_cs_client = @@character_set_client */;\n"); + fwrite($handle, "/*!40101 SET character_set_client = utf8 */;\n"); $resqldrop=$db->query('SHOW CREATE TABLE '.$table); $row2 = $db->fetch_row($resqldrop); if (empty($row2[1])) @@ -958,7 +996,7 @@ class Utils } else { - fwrite($handle,$row2[1].";\n"); + fwrite($handle, $row2[1].";\n"); //fwrite($handle,"/*!40101 SET character_set_client = @saved_cs_client */;\n\n"); // Dumping the data (locking the table and disabling the keys check while doing the process) @@ -972,7 +1010,7 @@ class Utils while($row = $db->fetch_row($result)) { // For each row of data we print a line of INSERT - fwrite($handle,'INSERT '.$delayed.$ignore.'INTO `'.$table.'` VALUES ('); + fwrite($handle, 'INSERT '.$delayed.$ignore.'INTO `'.$table.'` VALUES ('); $columns = count($row); for($j=0; $j<$columns; $j++) { // Processing each columns of the row to ensure that we correctly save the value (eg: add quotes for string - in fact we add quotes for everything, it's easier) @@ -991,11 +1029,11 @@ class Utils $row[$j] = "'".$row[$j]."'"; } } - fwrite($handle,implode(',', $row).");\n"); + fwrite($handle, implode(',', $row).");\n"); } if (GETPOST("nobin_disable_fk")) fwrite($handle, "ALTER TABLE `".$table."` ENABLE KEYS;\n"); // Enabling back the keys/index checking if (!GETPOST("nobin_nolocks")) fwrite($handle, "UNLOCK TABLES;\n"); // Unlocking the table - fwrite($handle,"\n\n\n"); + fwrite($handle, "\n\n\n"); } } diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 295bda85d53..d2aee3e6a30 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -4,6 +4,7 @@ * Copyright (C) 2012-2016 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Raphaël Doursenaud + * Copyright (C) 2019 Frédéric France * * 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 @@ -34,7 +35,7 @@ */ function dol_basename($pathfile) { - return preg_replace('/^.*\/([^\/]+)$/','$1',rtrim($pathfile,'/')); + return preg_replace('/^.*\/([^\/]+)$/', '$1', rtrim($pathfile, '/')); } /** @@ -54,9 +55,9 @@ function dol_basename($pathfile) * @param string $relativename For recursive purpose only. Must be "" at first call. * @param string $donotfollowsymlinks Do not follow symbolic links * @return array Array of array('name'=>'xxx','fullname'=>'/abc/xxx','date'=>'yyy','size'=>99,'type'=>'dir|file',...) - * @see dol_dir_list_indatabase + * @see dol_dir_list_in_database() */ -function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0, $nohook=0, $relativename="", $donotfollowsymlinks=0) +function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excludefilter = null, $sortcriteria = "name", $sortorder = SORT_ASC, $mode = 0, $nohook = 0, $relativename = "", $donotfollowsymlinks = 0) { global $db, $hookmanager; global $object; @@ -68,7 +69,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil $loadsize=($mode==1||$mode==3)?true:false; // Clean parameters - $path=preg_replace('/([\\/]+)$/i','',$path); + $path=preg_replace('/([\\/]+)$/i', '', $path); $newpath=dol_osencode($path); $reshook = 0; @@ -116,9 +117,9 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil $excludefilterarray=array('^\.'); if (is_array($excludefilter)) { - $excludefilterarray=array_merge($excludefilterarray,$excludefilter); + $excludefilterarray=array_merge($excludefilterarray, $excludefilter); } - else if ($excludefilter) $excludefilterarray[]=$excludefilter; + elseif ($excludefilter) $excludefilterarray[]=$excludefilter; // Check if file is qualified foreach($excludefilterarray as $filt) { @@ -140,9 +141,9 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil if ($loaddate || $sortcriteria == 'date') $filedate=dol_filemtime($path."/".$file); if ($loadsize || $sortcriteria == 'size') $filesize=dol_filesize($path."/".$file); - if (! $filter || preg_match('/'.$filter.'/i',$file)) // We do not search key $filter into all $path, only into $file part + if (! $filter || preg_match('/'.$filter.'/i', $file)) // We do not search key $filter into all $path, only into $file part { - preg_match('/([^\/]+)\/[^\/]+$/',$path.'/'.$file,$reg); + preg_match('/([^\/]+)\/[^\/]+$/', $path.'/'.$file, $reg); $level1name=(isset($reg[1])?$reg[1]:''); $file_list[] = array( "name" => $file, @@ -167,15 +168,15 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil } } } - else if (! $isdir && (($types == "files") || ($types == "all"))) + elseif (! $isdir && (($types == "files") || ($types == "all"))) { // Add file into file_list array if ($loaddate || $sortcriteria == 'date') $filedate=dol_filemtime($path."/".$file); if ($loadsize || $sortcriteria == 'size') $filesize=dol_filesize($path."/".$file); - if (! $filter || preg_match('/'.$filter.'/i',$file)) // We do not search key $filter into $path, only into $file + if (! $filter || preg_match('/'.$filter.'/i', $file)) // We do not search key $filter into $path, only into $file { - preg_match('/([^\/]+)\/[^\/]+$/',$path.'/'.$file,$reg); + preg_match('/([^\/]+)\/[^\/]+$/', $path.'/'.$file, $reg); $level1name=(isset($reg[1])?$reg[1]:''); $file_list[] = array( "name" => $file, @@ -194,15 +195,9 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil closedir($dir); // Obtain a list of columns - if (! empty($sortcriteria)) + if (! empty($sortcriteria) && $sortorder) { - $myarray=array(); - foreach ($file_list as $key => $row) - { - $myarray[$key] = (isset($row[$sortcriteria])?$row[$sortcriteria]:''); - } - // Sort the data - if ($sortorder) array_multisort($myarray, $sortorder, $file_list); + $file_list = dol_sort_array($file_list, $sortcriteria, ($sortorder == SORT_ASC ? 'asc' : 'desc')); } } } @@ -224,9 +219,9 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil * @param string $sortorder Sort order (SORT_ASC, SORT_DESC) * @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like description * @return array Array of array('name'=>'xxx','fullname'=>'/abc/xxx','type'=>'dir|file',...) - * @see dol_dir_list + * @see dol_dir_list() */ -function dol_dir_list_in_database($path, $filter="", $excludefilter=null, $sortcriteria="name", $sortorder=SORT_ASC, $mode=0) +function dol_dir_list_in_database($path, $filter = "", $excludefilter = null, $sortcriteria = "name", $sortorder = SORT_ASC, $mode = 0) { global $conf, $db; @@ -248,7 +243,7 @@ function dol_dir_list_in_database($path, $filter="", $excludefilter=null, $sortc $obj = $db->fetch_object($resql); if ($obj) { - preg_match('/([^\/]+)\/[^\/]+$/',DOL_DATA_ROOT.'/'.$obj->filepath.'/'.$obj->filename,$reg); + preg_match('/([^\/]+)\/[^\/]+$/', DOL_DATA_ROOT.'/'.$obj->filepath.'/'.$obj->filename, $reg); $level1name=(isset($reg[1])?$reg[1]:''); $file_list[] = array( "rowid" => $obj->rowid, @@ -313,11 +308,11 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir) global $object; if (! empty($object->id)) { - if (! empty($conf->product->enabled)) $upload_dirold = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2),1,1).'/'.substr(substr("000".$object->id, -2),0,1).'/'.$object->id."/photos"; - else $upload_dirold = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2),1,1).'/'.substr(substr("000".$object->id, -2),0,1).'/'.$object->id."/photos"; + if (! empty($conf->product->enabled)) $upload_dirold = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; + else $upload_dirold = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; - $relativedirold = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $upload_dirold); - $relativedirold = preg_replace('/^[\\/]/','',$relativedirold); + $relativedirold = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dirold); + $relativedirold = preg_replace('/^[\\/]/', '', $relativedirold); $filearrayindatabase = array_merge($filearrayindatabase, dol_dir_list_in_database($relativedirold, '', null, 'name', SORT_ASC)); } @@ -353,7 +348,7 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir) $filearray[$key]['cover']=0; $filearray[$key]['acl']=''; - $rel_filename = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $filearray[$key]['fullname']); + $rel_filename = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $filearray[$key]['fullname']); if (! preg_match('/([\\/]temp[\\/]|[\\/]thumbs|\.meta$)/', $rel_filetorenameafter)) // If not a tmp file { dol_syslog("list_of_documents We found a file called '".$filearray[$key]['name']."' not indexed into database. We add it"); @@ -442,6 +437,18 @@ function dol_is_dir($folder) else return false; } +/** + * Return if path is empty + * + * @param string $dir Path of Directory + * @return boolean True or false + */ +function dol_is_dir_empty($dir) +{ + if (!is_readable($dir)) return false; + return (count(scandir($dir)) == 2); +} + /** * Return if path is a file * @@ -477,7 +484,7 @@ function dol_is_url($url) $tmpprot=array('file','http','https','ftp','zlib','data','ssh','ssh2','ogg','expect'); foreach($tmpprot as $prot) { - if (preg_match('/^'.$prot.':/i',$url)) return true; + if (preg_match('/^'.$prot.':/i', $url)) return true; } return false; } @@ -515,7 +522,7 @@ function dol_dir_is_emtpy($folder) * * @param string $file Filename * @return int <0 if KO, Number of lines in files if OK - * @see dol_nboflines + * @see dol_nboflines() */ function dol_count_nb_of_line($file) { @@ -523,7 +530,7 @@ function dol_count_nb_of_line($file) $newfile=dol_osencode($file); //print 'x'.$file; - $fp=fopen($newfile,'r'); + $fp=fopen($newfile, 'r'); if ($fp) { while (!feof($fp)) @@ -570,19 +577,20 @@ function dol_filemtime($pathoffile) /** * Make replacement of strings into a file. * - * @param string $srcfile Source file (can't be a directory) - * @param array $arrayreplacement Array with strings to replace. Example: array('valuebefore'=>'valueafter', ...) - * @param string $destfile Destination file (can't be a directory). If empty, will be same than source file. - * @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666' - * @param int $indexdatabase 1=index new file into database. - * @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK - * @see dol_copy dolReplaceRegExInFile + * @param string $srcfile Source file (can't be a directory) + * @param array $arrayreplacement Array with strings to replace. Example: array('valuebefore'=>'valueafter', ...) + * @param string $destfile Destination file (can't be a directory). If empty, will be same than source file. + * @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666' + * @param int $indexdatabase 1=index new file into database. + * @param int $arrayreplacementisregex 1=Array of replacement is regex + * @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK + * @see dol_copy() */ -function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, $indexdatabase=0) +function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0, $arrayreplacementisregex = 0) { global $conf; - dol_syslog("files.lib.php::dolReplaceInFile srcfile=".$srcfile." destfile=".$destfile." newmask=".$newmask." indexdatabase=".$indexdatabase); + dol_syslog("files.lib.php::dolReplaceInFile srcfile=".$srcfile." destfile=".$destfile." newmask=".$newmask." indexdatabase=".$indexdatabase." arrayreplacementisregex=".$arrayreplacementisregex); if (empty($srcfile)) return -1; if (empty($destfile)) $destfile=$srcfile; @@ -613,7 +621,17 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, // Create $newpathoftmpdestfile from $newpathofsrcfile $content = file_get_contents($newpathofsrcfile, 'r'); - $content = make_substitutions($content, $arrayreplacement, null); + if (empty($arrayreplacementisregex)) + { + $content = make_substitutions($content, $arrayreplacement, null); + } + else + { + foreach ($arrayreplacement as $key => $value) + { + $content = preg_replace($key, $value, $content); + } + } file_put_contents($newpathoftmpdestfile, $content); @chmod($newpathoftmpdestfile, octdec($newmask)); @@ -637,21 +655,6 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, return 1; } -/** - * Make replacement of strings into a file. - * - * @param string $srcfile Source file (can't be a directory) - * @param array $arrayreplacement Array with strings to replace. Example: array('valuebefore'=>'valueafter', ...) - * @param string $destfile Destination file (can't be a directory). If empty, will be same than source file. - * @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666' - * @param int $indexdatabase Index new file into database. - * @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK - * @see dol_copy dolReplaceInFile - */ -function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile='', $newmask=0, $indexdatabase=0) -{ - // TODO -} /** * Copy a file to another file. @@ -661,9 +664,9 @@ function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile='', $newma * @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666' * @param int $overwriteifexists Overwrite file if exists (1 by default) * @return int <0 if error, 0 if nothing done (dest file already exists and overwriteifexists=0), >0 if OK - * @see dol_delete_file + * @see dol_delete_file() dolCopyDir() */ -function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1) +function dol_copy($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1) { global $conf; @@ -717,9 +720,9 @@ function dol_copy($srcfile, $destfile, $newmask=0, $overwriteifexists=1) * @param int $overwriteifexists Overwrite file if exists (1 by default) * @param array $arrayreplacement Array to use to replace filenames with another one during the copy (works only on file names, not on directory names). * @return int <0 if error, 0 if nothing done (all files already exists and overwriteifexists=0), >0 if OK - * @see dol_copy + * @see dol_copy() */ -function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement=null) +function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null) { global $conf; @@ -809,9 +812,9 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep * @param int $testvirus Do an antivirus test. Move is canceled if a virus is found. * @param int $indexdatabase Index new file into database. * @return boolean True if OK, false if KO - * @see dol_move_uploaded_file + * @see dol_move_uploaded_file() */ -function dol_move($srcfile, $destfile, $newmask=0, $overwriteifexists=1, $testvirus=0, $indexdatabase=1) +function dol_move($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1, $testvirus = 0, $indexdatabase = 1) { global $user, $db, $conf; $result=false; @@ -860,8 +863,8 @@ function dol_move($srcfile, $destfile, $newmask=0, $overwriteifexists=1, $testvi if ($result && $indexdatabase) { // Rename entry into ecm database - $rel_filetorenamebefore = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $srcfile); - $rel_filetorenameafter = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $destfile); + $rel_filetorenamebefore = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $srcfile); + $rel_filetorenameafter = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $destfile); if (! preg_match('/([\\/]temp[\\/]|[\\/]thumbs|\.meta$)/', $rel_filetorenameafter)) // If not a tmp file { $rel_filetorenamebefore = preg_replace('/^[\\/]/', '', $rel_filetorenamebefore); @@ -956,18 +959,18 @@ function dol_unescapefile($filename) */ function dolCheckVirus($src_file) { - global $conf, $db; + global $conf; if (! empty($conf->global->MAIN_ANTIVIRUS_COMMAND)) { if (! class_exists('AntiVir')) { require_once DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php'; } - $antivir = new AntiVir($db); + $antivir=new AntiVir($db); $result = $antivir->dol_avscan_file($src_file); if ($result < 0) // If virus or error, we stop here { - $reterrors = $antivir->errors; + $reterrors=$antivir->errors; return $reterrors; } } @@ -982,6 +985,7 @@ function dolCheckVirus($src_file) * - This function can be used only into a HTML page context. Use dol_move if you are outside. * - Test on antivirus is always done (if antivirus set). * - Database of files is NOT updated (this is done by dol_add_file_process() that calls this function). + * - Extension .noexe may be added if file is executable and MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED is not set. * * @param string $src_file Source full path filename ($_FILES['field']['tmp_name']) * @param string $dest_file Target full path filename ($_FILES['field']['name']) @@ -990,10 +994,10 @@ function dolCheckVirus($src_file) * @param integer $uploaderrorcode Value of PHP upload error code ($_FILES['field']['error']) * @param int $nohook Disable all hooks * @param string $varfiles _FILES var name - * @return int|string >0 if OK, <0 or string if KO - * @see dol_move + * @return int >0 if OK, <0 or string if KO + * @see dol_move() */ -function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan=0, $uploaderrorcode=0, $nohook=0, $varfiles='addedfile') +function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disablevirusscan = 0, $uploaderrorcode = 0, $nohook = 0, $varfiles = 'addedfile') { global $conf, $db, $user, $langs; global $object, $hookmanager; @@ -1045,8 +1049,8 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable $checkvirusarray=dolCheckVirus($src_file); if (count($checkvirusarray)) { - dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: result='.$result.' errors='.join(',',$checkvirusarray), LOG_WARNING); - return 'ErrorFileIsInfectedWithAVirus: '.join(',',$checkvirusarray); + dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: errors='.join(',', $checkvirusarray), LOG_WARNING); + return 'ErrorFileIsInfectedWithAVirus: '.join(',', $checkvirusarray); } } @@ -1060,15 +1064,15 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable // Security: // We refuse cache files/dirs, upload using .. and pipes into filenames. - if (preg_match('/^\./',$src_file) || preg_match('/\.\./',$src_file) || preg_match('/[<>|]/',$src_file)) + if (preg_match('/^\./', basename($src_file)) || preg_match('/\.\./', $src_file) || preg_match('/[<>|]/', $src_file)) { dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING); return -1; } // Security: - // On interdit fichiers caches, remontees de repertoire ainsi que les pipe dans les noms de fichiers. - if (preg_match('/^\./',$dest_file) || preg_match('/\.\./',$dest_file) || preg_match('/[<>|]/',$dest_file)) + // We refuse cache files/dirs, upload using .. and pipes into filenames. + if (preg_match('/^\./', basename($dest_file)) || preg_match('/\.\./', $dest_file) || preg_match('/[<>|]/', $dest_file)) { dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING); return -2; @@ -1134,9 +1138,9 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable * @param boolean $allowdotdot Allow to delete file path with .. inside. Never use this, it is reserved for migration purpose. * @param int $indexdatabase Try to remove also index entries. * @return boolean True if no error (file is deleted or if glob is used and there's nothing to delete), False if error - * @see dol_delete_dir + * @see dol_delete_dir() */ -function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $object=null, $allowdotdot=false, $indexdatabase=1) +function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0, $object = null, $allowdotdot = false, $indexdatabase = 1) { global $db, $conf, $user, $langs; global $hookmanager; @@ -1148,7 +1152,7 @@ function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $obje // Security: // We refuse transversal using .. and pipes into filenames. - if ((! $allowdotdot && preg_match('/\.\./',$file)) || preg_match('/[<>|]/',$file)) + if ((! $allowdotdot && preg_match('/\.\./', $file)) || preg_match('/[<>|]/', $file)) { dol_syslog("Refused to delete file ".$file, LOG_WARNING); return false; @@ -1181,8 +1185,8 @@ function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $obje if (empty($disableglob) && ! empty($file_osencoded)) { $ok=true; - $globencoded=str_replace('[','\[',$file_osencoded); - $globencoded=str_replace(']','\]',$globencoded); + $globencoded=str_replace('[', '\[', $file_osencoded); + $globencoded=str_replace(']', '\]', $globencoded); $listofdir=glob($globencoded); if (! empty($listofdir) && is_array($listofdir)) { @@ -1195,7 +1199,7 @@ function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $obje dol_syslog("Removed file ".$filename, LOG_DEBUG); // Delete entry into ecm database - $rel_filetodelete = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $filename); + $rel_filetodelete = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $filename); if (! preg_match('/(\/temp\/|\/thumbs\/|\.meta$)/', $rel_filetodelete)) // If not a tmp file { $rel_filetodelete = preg_replace('/^[\\/]/', '', $rel_filetodelete); @@ -1217,9 +1221,12 @@ function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $obje } } } - else dol_syslog("Failed to remove file ".$filename, LOG_WARNING); - // TODO Failure to remove can be because file was already removed or because of permission - // If error because it does not exists, we should return true, and we should return false if this is a permission problem + else + { + dol_syslog("Failed to remove file ".$filename, LOG_WARNING); + // TODO Failure to remove can be because file was already removed or because of permission + // If error because it does not exists, we should return true, and we should return false if this is a permission problem + } } } else dol_syslog("No files to delete found", LOG_DEBUG); @@ -1244,13 +1251,13 @@ function dol_delete_file($file, $disableglob=0, $nophperrors=0, $nohook=0, $obje * @param string $dir Directory to delete * @param int $nophperrors Disable all PHP output errors * @return boolean True if success, false if error - * @see dol_delete_file dol_copy + * @see dol_delete_file() dolCopyDir() */ -function dol_delete_dir($dir,$nophperrors=0) +function dol_delete_dir($dir, $nophperrors = 0) { // Security: // We refuse transversal using .. and pipes into filenames. - if (preg_match('/\.\./',$dir) || preg_match('/[<>|]/',$dir)) + if (preg_match('/\.\./', $dir) || preg_match('/[<>|]/', $dir)) { dol_syslog("Refused to delete dir ".$dir, LOG_WARNING); return false; @@ -1270,9 +1277,9 @@ function dol_delete_dir($dir,$nophperrors=0) * @param int $countdeleted Counter to count nb of elements found really deleted * @return int Number of files and directory we try to remove. NB really removed is returned into var by reference $countdeleted. */ -function dol_delete_dir_recursive($dir, $count=0, $nophperrors=0, $onlysub=0, &$countdeleted=0) +function dol_delete_dir_recursive($dir, $count = 0, $nophperrors = 0, $onlysub = 0, &$countdeleted = 0) { - dol_syslog("functions.lib:dol_delete_dir_recursive ".$dir,LOG_DEBUG); + dol_syslog("functions.lib:dol_delete_dir_recursive ".$dir, LOG_DEBUG); if (dol_is_dir($dir)) { $dir_osencoded=dol_osencode($dir); @@ -1319,7 +1326,7 @@ function dol_delete_dir_recursive($dir, $count=0, $nophperrors=0, $onlysub=0, &$ * * @param object $object Object to clean * @return int 0 if error, 1 if OK - * @see dol_convert_file + * @see dol_convert_file() */ function dol_delete_preview($object) { @@ -1347,26 +1354,26 @@ function dol_delete_preview($object) // For new preview files if (file_exists($filepreviewnew) && is_writable($filepreviewnew)) { - if (! dol_delete_file($filepreviewnew,1)) + if (! dol_delete_file($filepreviewnew, 1)) { - $object->error=$langs->trans("ErrorFailedToDeleteFile",$filepreviewnew); + $object->error=$langs->trans("ErrorFailedToDeleteFile", $filepreviewnew); return 0; } } if (file_exists($filepreviewnewbis) && is_writable($filepreviewnewbis)) { - if (! dol_delete_file($filepreviewnewbis,1)) + if (! dol_delete_file($filepreviewnewbis, 1)) { - $object->error=$langs->trans("ErrorFailedToDeleteFile",$filepreviewnewbis); + $object->error=$langs->trans("ErrorFailedToDeleteFile", $filepreviewnewbis); return 0; } } // For old preview files if (file_exists($filepreviewold) && is_writable($filepreviewold)) { - if (! dol_delete_file($filepreviewold,1)) + if (! dol_delete_file($filepreviewold, 1)) { - $object->error=$langs->trans("ErrorFailedToDeleteFile",$filepreviewold); + $object->error=$langs->trans("ErrorFailedToDeleteFile", $filepreviewold); return 0; } } @@ -1379,9 +1386,9 @@ function dol_delete_preview($object) if (file_exists($preview) && is_writable($preview)) { - if ( ! dol_delete_file($preview,1) ) + if ( ! dol_delete_file($preview, 1) ) { - $object->error=$langs->trans("ErrorFailedToOpenFile",$preview); + $object->error=$langs->trans("ErrorFailedToOpenFile", $preview); return 0; } } @@ -1435,7 +1442,7 @@ function dol_meta_create($object) $nblignes = count($object->lines); $client = $object->thirdparty->name . " " . $object->thirdparty->address . " " . $object->thirdparty->zip . " " . $object->thirdparty->town; $meta = "REFERENCE=\"" . $object->ref . "\" - DATE=\"" . dol_print_date($object->date,'') . "\" + DATE=\"" . dol_print_date($object->date, '') . "\" NB_ITEMS=\"" . $nblignes . "\" CLIENT=\"" . $client . "\" AMOUNT_EXCL_TAX=\"" . $object->total_ht . "\" @@ -1447,13 +1454,13 @@ function dol_meta_create($object) $meta .= "ITEM_" . $i . "_QUANTITY=\"" . $object->lines[$i]->qty . "\" ITEM_" . $i . "_AMOUNT_WO_TAX=\"" . $object->lines[$i]->total_ht . "\" ITEM_" . $i . "_VAT=\"" .$object->lines[$i]->tva_tx . "\" - ITEM_" . $i . "_DESCRIPTION=\"" . str_replace("\r\n","",nl2br($object->lines[$i]->desc)) . "\" + ITEM_" . $i . "_DESCRIPTION=\"" . str_replace("\r\n", "", nl2br($object->lines[$i]->desc)) . "\" "; } } - $fp = fopen($file,"w"); - fputs($fp,$meta); + $fp = fopen($file, "w"); + fputs($fp, $meta); fclose($fp); if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); @@ -1478,7 +1485,7 @@ function dol_meta_create($object) * @param string $trackid Track id (used to prefix name of session vars to avoid conflict) * @return void */ -function dol_init_file_process($pathtoscan='', $trackid='') +function dol_init_file_process($pathtoscan = '', $trackid = '') { $listofpaths=array(); $listofnames=array(); @@ -1486,7 +1493,7 @@ function dol_init_file_process($pathtoscan='', $trackid='') if ($pathtoscan) { - $listoffiles=dol_dir_list($pathtoscan,'files'); + $listoffiles=dol_dir_list($pathtoscan, 'files'); foreach($listoffiles as $key => $val) { $listofpaths[]=$val['fullname']; @@ -1495,9 +1502,9 @@ function dol_init_file_process($pathtoscan='', $trackid='') } } $keytoavoidconflict = empty($trackid)?'':'-'.$trackid; - $_SESSION["listofpaths".$keytoavoidconflict]=join(';',$listofpaths); - $_SESSION["listofnames".$keytoavoidconflict]=join(';',$listofnames); - $_SESSION["listofmimes".$keytoavoidconflict]=join(';',$listofmimes); + $_SESSION["listofpaths".$keytoavoidconflict]=join(';', $listofpaths); + $_SESSION["listofnames".$keytoavoidconflict]=join(';', $listofnames); + $_SESSION["listofmimes".$keytoavoidconflict]=join(';', $listofmimes); } @@ -1516,7 +1523,7 @@ function dol_init_file_process($pathtoscan='', $trackid='') * @param int $generatethumbs 1=Generate also thumbs for uploaded image files * @return int <=0 if KO, >0 if OK */ -function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesession=0, $varfiles='addedfile', $savingdocmask='', $link=null, $trackid='', $generatethumbs=1) +function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesession = 0, $varfiles = 'addedfile', $savingdocmask = '', $link = null, $trackid = '', $generatethumbs = 1) { global $db,$user,$conf,$langs; @@ -1546,8 +1553,8 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio if ($savingdocmask) { - $destfull=$upload_dir . "/" . preg_replace('/__file__/',$TFile['name'][$i],$savingdocmask); - $destfile=preg_replace('/__file__/',$TFile['name'][$i],$savingdocmask); + $destfull=$upload_dir . "/" . preg_replace('/__file__/', $TFile['name'][$i], $savingdocmask); + $destfile=preg_replace('/__file__/', $TFile['name'][$i], $savingdocmask); } // dol_sanitizeFileName the file name and lowercase extension @@ -1614,7 +1621,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio { setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); } - else if (preg_match('/ErrorFileIsInfectedWithAVirus/',$resupload)) // Files infected by a virus + elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) // Files infected by a virus { setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); } @@ -1666,7 +1673,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio * @param string $trackid Track id (used to prefix name of session vars to avoid conflict) * @return void */ -function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile=1,$trackid='') +function dol_remove_file_process($filenb, $donotupdatesession = 0, $donotdeletefile = 1, $trackid = '') { global $db,$user,$conf,$langs,$_FILES; @@ -1677,22 +1684,22 @@ function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile= $listofnames=array(); $listofmimes=array(); $keytoavoidconflict = empty($trackid)?'':'-'.$trackid; - if (! empty($_SESSION["listofpaths".$keytoavoidconflict])) $listofpaths=explode(';',$_SESSION["listofpaths".$keytoavoidconflict]); - if (! empty($_SESSION["listofnames".$keytoavoidconflict])) $listofnames=explode(';',$_SESSION["listofnames".$keytoavoidconflict]); - if (! empty($_SESSION["listofmimes".$keytoavoidconflict])) $listofmimes=explode(';',$_SESSION["listofmimes".$keytoavoidconflict]); + if (! empty($_SESSION["listofpaths".$keytoavoidconflict])) $listofpaths=explode(';', $_SESSION["listofpaths".$keytoavoidconflict]); + if (! empty($_SESSION["listofnames".$keytoavoidconflict])) $listofnames=explode(';', $_SESSION["listofnames".$keytoavoidconflict]); + if (! empty($_SESSION["listofmimes".$keytoavoidconflict])) $listofmimes=explode(';', $_SESSION["listofmimes".$keytoavoidconflict]); if ($keytodelete >= 0) { $pathtodelete=$listofpaths[$keytodelete]; $filetodelete=$listofnames[$keytodelete]; - if (empty($donotdeletefile)) $result = dol_delete_file($pathtodelete,1); // The delete of ecm database is inside the function dol_delete_file + if (empty($donotdeletefile)) $result = dol_delete_file($pathtodelete, 1); // The delete of ecm database is inside the function dol_delete_file else $result=0; if ($result >= 0) { if (empty($donotdeletefile)) { $langs->load("other"); - setEventMessages($langs->trans("FileWasRemoved",$filetodelete), null, 'mesgs'); + setEventMessages($langs->trans("FileWasRemoved", $filetodelete), null, 'mesgs'); } if (empty($donotupdatesession)) { @@ -1718,13 +1725,13 @@ function dol_remove_file_process($filenb,$donotupdatesession=0,$donotdeletefile= * @param int $setsharekey Set also the share key * @return int <0 if KO, 0 if nothing done, >0 if OK */ -function addFileIntoDatabaseIndex($dir, $file, $fullpathorig='', $mode='uploaded', $setsharekey=0) +function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uploaded', $setsharekey = 0) { global $db, $user; $result = 0; - $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $dir); + $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $dir); if (! preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) // If not a tmp dir { @@ -1766,7 +1773,7 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig='', $mode='uploaded * @param string $mode How file was created ('uploaded', 'generated', ...) * @return int <0 if KO, 0 if nothing done, >0 if OK */ -function deleteFilesIntoDatabaseIndex($dir, $file, $mode='uploaded') +function deleteFilesIntoDatabaseIndex($dir, $file, $mode = 'uploaded') { global $conf, $db, $user; @@ -1780,7 +1787,7 @@ function deleteFilesIntoDatabaseIndex($dir, $file, $mode='uploaded') $db->begin(); - $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT,'/').'/', '', $dir); + $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $dir); $filename = basename($file); $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); @@ -1820,38 +1827,36 @@ function deleteFilesIntoDatabaseIndex($dir, $file, $mode='uploaded') * @param string $fileinput Input file name * @param string $ext Format of target file (It is also extension added to file if fileoutput is not provided). * @param string $fileoutput Output filename + * @param string $page Page number if we convert a PDF into png * @return int <0 if KO, 0=Nothing done, >0 if OK */ -function dol_convert_file($fileinput, $ext='png', $fileoutput='') +function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '', $page = '') { global $langs; - if (class_exists('Imagick')) { - $image=new Imagick(); + $image=new Imagick(); try { - $ret = $image->readImage($fileinput); + $filetoconvert=$fileinput.(($page != '')?'['.$page.']':''); + //var_dump($filetoconvert); + $ret = $image->readImage($filetoconvert); } catch(Exception $e) { - dol_syslog("Failed to read image using Imagick. Try to install package 'apt-get install ghostscript'.", LOG_WARNING); + $ext = pathinfo($fileinput, PATHINFO_EXTENSION); + dol_syslog("Failed to read image using Imagick (Try to install package 'apt-get install php-imagick ghostscript' and check there is no policy to disable ".$ext." convertion in /etc/ImageMagick*/policy.xml): ".$e->getMessage(), LOG_WARNING); return 0; } if ($ret) { - $ret = $image->setImageFormat($ext); + $ret = $image->setImageFormat($ext); if ($ret) { if (empty($fileoutput)) $fileoutput=$fileinput.".".$ext; $count = $image->getNumberImages(); + if (! dol_is_file($fileoutput) || is_writeable($fileoutput)) { - try { - $ret = $image->writeImages($fileoutput, true); - } - catch(Exception $e) - { - dol_syslog($e->getMessage(), LOG_WARNING); - } + $ret = $image->writeImages($fileoutput, true); } else { @@ -1885,26 +1890,89 @@ function dol_convert_file($fileinput, $ext='png', $fileoutput='') * @param string $mode 'gz' or 'bz' or 'zip' * @return int <0 if KO, >0 if OK */ -function dol_compress_file($inputfile, $outputfile, $mode="gz") +function dol_compress_file($inputfile, $outputfile, $mode = "gz") { + global $conf; + $foundhandler=0; try { + dol_syslog("dol_compress_file mode=".$mode." inputfile=".$inputfile." outputfile=".$outputfile); + $data = implode("", file(dol_osencode($inputfile))); if ($mode == 'gz') { $foundhandler=1; $compressdata = gzencode($data, 9); } elseif ($mode == 'bz') { $foundhandler=1; $compressdata = bzcompress($data, 9); } elseif ($mode == 'zip') { + if (class_exists('ZipArchive') && ! empty($conf->global->MAIN_USE_ZIPARCHIVE_FOR_ZIP_COMPRESS)) + { + $foundhandler=1; + + $rootPath = realpath($inputfile); + + dol_syslog("Class ZipArchive is set so we zip using ZipArchive to zip into ".$outputfile.' rootPath='.$rootPath); + $zip = new ZipArchive; + + if ($zip->open($outputfile, ZipArchive::CREATE) !== true) { + $errormsg="Failed to open file ".$outputfile."\n"; + dol_syslog("dol_compress_file failure - ".$errormsg, LOG_ERR); + return -6; + } + + // Create recursive directory iterator + /** @var SplFileInfo[] $files */ + $files = new RecursiveIteratorIterator( + new RecursiveDirectoryIterator($rootPath), + RecursiveIteratorIterator::LEAVES_ONLY + ); + + foreach ($files as $name => $file) + { + // Skip directories (they would be added automatically) + if (!$file->isDir()) + { + // Get real and relative path for current file + $filePath = $file->getRealPath(); + $relativePath = substr($filePath, strlen($rootPath) + 1); + + // Add current file to archive + $zip->addFile($filePath, $relativePath); + } + } + + // Zip archive will be created only after closing object + $zip->close(); + + dol_syslog("dol_compress_file success - ".count($zip->numFiles)." files"); + return 1; + } + if (defined('ODTPHP_PATHTOPCLZIP')) { $foundhandler=1; include_once ODTPHP_PATHTOPCLZIP.'/pclzip.lib.php'; $archive = new PclZip($outputfile); - $archive->add($inputfile, PCLZIP_OPT_REMOVE_PATH, dirname($inputfile)); - //$archive->add($inputfile); - return 1; + $result = $archive->add($inputfile, PCLZIP_OPT_REMOVE_PATH, dirname($inputfile)); + + if ($result === 0) + { + global $errormsg; + $errormsg=$archive->errorInfo(true); + dol_syslog("dol_compress_file failure - ".$errormsg, LOG_ERR); + if ($archive->errorCode() == PCLZIP_ERR_WRITE_OPEN_FAIL) + { + dol_syslog("dol_compress_file error PCLZIP_ERR_WRITE_OPEN_FAIL", LOG_ERR); + return -4; + } + return -3; + } + else + { + dol_syslog("dol_compress_file success - ".count($result)." files"); + return 1; + } } } @@ -1917,7 +1985,7 @@ function dol_compress_file($inputfile, $outputfile, $mode="gz") } else { - dol_syslog("Try to zip with format ".$mode." with no handler for this format",LOG_ERR); + dol_syslog("Try to zip with format ".$mode." with no handler for this format", LOG_ERR); return -2; } } @@ -1925,7 +1993,7 @@ function dol_compress_file($inputfile, $outputfile, $mode="gz") { global $langs, $errormsg; $langs->load("errors"); - dol_syslog("Failed to open file ".$outputfile,LOG_ERR); + dol_syslog("Failed to open file ".$outputfile, LOG_ERR); $errormsg=$langs->trans("ErrorFailedToWriteInDir"); return -1; } @@ -1938,11 +2006,11 @@ function dol_compress_file($inputfile, $outputfile, $mode="gz") * @param string $outputdir Target dir name * @return array array('error'=>'Error code') or array() if no error */ -function dol_uncompress($inputfile,$outputdir) +function dol_uncompress($inputfile, $outputdir) { - global $langs; + global $conf, $langs; - if (defined('ODTPHP_PATHTOPCLZIP')) + if (defined('ODTPHP_PATHTOPCLZIP') && empty($conf->global->MAIN_USE_ZIPARCHIVE_FOR_ZIP_UNCOMPRESS)) { dol_syslog("Constant ODTPHP_PATHTOPCLZIP for pclzip library is set to ".ODTPHP_PATHTOPCLZIP.", so we use Pclzip to unzip into ".$outputdir); include_once ODTPHP_PATHTOPCLZIP.'/pclzip.lib.php'; @@ -1997,9 +2065,10 @@ function dol_uncompress($inputfile,$outputdir) * @param string $inputdir Source dir name * @param string $outputfile Target file name (output directory must exists and be writable) * @param string $mode 'zip' + * @param string $excludefiles A regex pattern. For example: '/\.log$|\/temp\//' * @return int <0 if KO, >0 if OK */ -function dol_compress_dir($inputdir, $outputfile, $mode="zip") +function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles = '') { $foundhandler=0; @@ -2009,7 +2078,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") { global $langs, $errormsg; $langs->load("errors"); - $errormsg=$langs->trans("ErrorFailedToWriteInDir",$outputfile); + $errormsg=$langs->trans("ErrorFailedToWriteInDir", $outputfile); return -3; } @@ -2030,6 +2099,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") return 1; } else*/ + //if (class_exists('ZipArchive') && ! empty($conf->global->MAIN_USE_ZIPARCHIVE_FOR_ZIP_COMPRESS)) if (class_exists('ZipArchive')) { $foundhandler=1; @@ -2037,6 +2107,13 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") // Initialize archive object $zip = new ZipArchive(); $result = $zip->open($outputfile, ZipArchive::CREATE | ZipArchive::OVERWRITE); + if (! $result) + { + global $langs, $errormsg; + $langs->load("errors"); + $errormsg=$langs->trans("ErrorFailedToWriteInFile", $outputfile); + return -4; + } // Create recursive directory iterator /** @var SplFileInfo[] $files */ @@ -2053,9 +2130,11 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") // Get real and relative path for current file $filePath = $file->getRealPath(); $relativePath = substr($filePath, strlen($inputdir) + 1); - - // Add current file to archive - $zip->addFile($filePath, $relativePath); + if (empty($excludefiles) || ! preg_match($excludefiles, $filePath)) + { + // Add current file to archive + $zip->addFile($filePath, $relativePath); + } } } @@ -2068,7 +2147,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") if (! $foundhandler) { - dol_syslog("Try to zip with format ".$mode." with no handler for this format",LOG_ERR); + dol_syslog("Try to zip with format ".$mode." with no handler for this format", LOG_ERR); return -2; } else @@ -2082,7 +2161,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") $langs->load("errors"); dol_syslog("Failed to open file ".$outputfile, LOG_ERR); dol_syslog($e->getMessage(), LOG_ERR); - $errormsg=$langs->trans("ErrorFailedToWriteInDir",$outputfile); + $errormsg=$langs->trans("ErrorFailedToWriteInDir", $outputfile); return -1; } } @@ -2099,9 +2178,9 @@ function dol_compress_dir($inputdir, $outputfile, $mode="zip") * @param int $mode 0=Return array minimum keys loaded (faster), 1=Force all keys like date and size to be loaded (slower), 2=Force load of date only, 3=Force load of size only * @return string Full path to most recent file */ -function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta|_preview.*\.png)$','^\.'),$nohook=false,$mode='') +function dol_most_recent_file($dir, $regexfilter = '', $excludefilter = array('(\.meta|_preview.*\.png)$','^\.'), $nohook = false, $mode = '') { - $tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,$mode,$nohook); + $tmparray=dol_dir_list($dir, 'files', 0, $regexfilter, $excludefilter, 'date', SORT_DESC, $mode, $nohook); return $tmparray[0]; } @@ -2115,9 +2194,9 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('(\.meta * @param string $refname Ref of object to check permission for external users (autodetect if not provided) * @param string $mode Check permission for 'read' or 'write' * @return mixed Array with access information : 'accessallowed' & 'sqlprotectagainstexternals' & 'original_file' (as a full path name) - * @see restrictedArea + * @see restrictedArea() */ -function dol_check_secure_access_document($modulepart, $original_file, $entity, $fuser='', $refname='', $mode='read') +function dol_check_secure_access_document($modulepart, $original_file, $entity, $fuser = '', $refname = '', $mode = 'read') { global $conf, $db, $user; global $dolibarr_main_data_root, $dolibarr_main_document_root_alt; @@ -2134,6 +2213,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if ($modulepart == 'users') $modulepart='user'; dol_syslog('modulepart='.$modulepart.' original_file='.$original_file.' entity='.$entity); + // We define $accessallowed and $sqlprotectagainstexternals $accessallowed=0; $sqlprotectagainstexternals=''; @@ -2142,8 +2222,6 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, // Find the subdirectory name as the reference. For exemple original_file='10/myfile.pdf' -> refname='10' if (empty($refname)) $refname=basename(dirname($original_file)."/"); - $relative_original_file = $original_file; - // Define possible keys to use for permission check $lire='lire'; $read='read'; $download='download'; if ($mode == 'write') @@ -2293,7 +2371,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $original_file=$conf->adherent->dir_temp.'/'.$original_file; } // Wrapping pour les images des stats produits - elseif (preg_match('/^productstats_/i',$modulepart) && !empty($conf->product->dir_temp)) + elseif (preg_match('/^productstats_/i', $modulepart) && !empty($conf->product->dir_temp)) { if ($fuser->rights->produit->{$lire} || $fuser->rights->service->{$lire}) $accessallowed=1; $original_file=(!empty($conf->product->multidir_temp[$entity])?$conf->product->multidir_temp[$entity]:$conf->service->multidir_temp[$entity]).'/'.$original_file; @@ -2320,7 +2398,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, // Wrapping pour les prelevements elseif ($modulepart == 'prelevement' && !empty($conf->prelevement->dir_output)) { - if ($fuser->rights->prelevement->bons->{$lire} || preg_match('/^specimen/i',$original_file)) $accessallowed=1; + if ($fuser->rights->prelevement->bons->{$lire} || preg_match('/^specimen/i', $original_file)) $accessallowed=1; $original_file=$conf->prelevement->dir_output.'/'.$original_file; } // Wrapping pour les graph energie @@ -2369,11 +2447,11 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for users - else if ($modulepart == 'user' && !empty($conf->user->dir_output)) + elseif ($modulepart == 'user' && !empty($conf->user->dir_output)) { $canreaduser=(! empty($fuser->admin) || $fuser->rights->user->user->{$lire}); if ($fuser->id == (int) $refname) { $canreaduser=1; } // A user can always read its own card - if ($canreaduser || preg_match('/^specimen/i',$original_file)) + if ($canreaduser || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2381,10 +2459,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for third parties - else if (($modulepart == 'company' || $modulepart == 'societe') && !empty($conf->societe->dir_output)) + elseif (($modulepart == 'company' || $modulepart == 'societe' || $modulepart == 'thirdparty') && !empty($conf->societe->dir_output)) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); - if ($fuser->rights->societe->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->societe->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2393,7 +2471,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for contact - else if ($modulepart == 'contact' && !empty($conf->societe->dir_output)) + elseif ($modulepart == 'contact' && !empty($conf->societe->dir_output)) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->societe->{$lire}) @@ -2404,9 +2482,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for invoices - else if (($modulepart == 'facture' || $modulepart == 'invoice') && !empty($conf->facture->dir_output)) + elseif (($modulepart == 'facture' || $modulepart == 'invoice') && !empty($conf->facture->dir_output)) { - if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2414,73 +2492,73 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping for mass actions - else if ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->multidir_output[$entity])) + elseif ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->multidir_output[$entity])) { - if ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->propal->multidir_output[$entity].'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_orders') + elseif ($modulepart == 'massfilesarea_orders') { - if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->commande->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_invoices') + elseif ($modulepart == 'massfilesarea_invoices') { - if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_expensereport') + elseif ($modulepart == 'massfilesarea_expensereport') { - if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->expensereport->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_interventions') + elseif ($modulepart == 'massfilesarea_interventions') { - if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->ficheinter->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_proposal' && !empty($conf->supplier_proposal->dir_output)) + elseif ($modulepart == 'massfilesarea_supplier_proposal' && !empty($conf->supplier_proposal->dir_output)) { - if ($fuser->rights->supplier_proposal->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->supplier_proposal->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->supplier_proposal->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_order') + elseif ($modulepart == 'massfilesarea_supplier_order') { - if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->fournisseur->commande->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_supplier_invoice') + elseif ($modulepart == 'massfilesarea_supplier_invoice') { - if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->fournisseur->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } - else if ($modulepart == 'massfilesarea_contract' && !empty($conf->contrat->dir_output)) + elseif ($modulepart == 'massfilesarea_contract' && !empty($conf->contrat->dir_output)) { - if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2488,9 +2566,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for interventions - else if (($modulepart == 'fichinter' || $modulepart == 'ficheinter') && !empty($conf->ficheinter->dir_output)) + elseif (($modulepart == 'fichinter' || $modulepart == 'ficheinter') && !empty($conf->ficheinter->dir_output)) { - if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2499,9 +2577,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les deplacements et notes de frais - else if ($modulepart == 'deplacement' && !empty($conf->deplacement->dir_output)) + elseif ($modulepart == 'deplacement' && !empty($conf->deplacement->dir_output)) { - if ($fuser->rights->deplacement->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->deplacement->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2509,9 +2587,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping pour les propales - else if (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) + elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) { - if ($fuser->rights->propale->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->propale->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2520,9 +2598,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les commandes - else if (($modulepart == 'commande' || $modulepart == 'order') && !empty($conf->commande->dir_output)) + elseif (($modulepart == 'commande' || $modulepart == 'order') && !empty($conf->commande->dir_output)) { - if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2531,18 +2609,18 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les projets - else if ($modulepart == 'project' && !empty($conf->projet->dir_output)) + elseif ($modulepart == 'project' && !empty($conf->projet->dir_output)) { - if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->projet->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('project').")"; } - else if ($modulepart == 'project_task' && !empty($conf->projet->dir_output)) + elseif ($modulepart == 'project_task' && !empty($conf->projet->dir_output)) { - if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2551,9 +2629,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les commandes fournisseurs - else if (($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') && !empty($conf->fournisseur->commande->dir_output)) + elseif (($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') && !empty($conf->fournisseur->commande->dir_output)) { - if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2562,19 +2640,19 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les factures fournisseurs - else if (($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') && !empty($conf->fournisseur->facture->dir_output)) + elseif (($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') && !empty($conf->fournisseur->facture->dir_output)) { - if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->fournisseur->facture->dir_output.'/'.$original_file; - $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture_fourn WHERE facnumber='".$db->escape($refname)."' AND entity=".$conf->entity; + $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture_fourn WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; } // Wrapping pour les rapport de paiements - else if ($modulepart == 'supplier_payment') + elseif ($modulepart == 'supplier_payment') { - if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2583,9 +2661,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les rapport de paiements - else if ($modulepart == 'facture_paiement' && !empty($conf->facture->dir_output)) + elseif ($modulepart == 'facture_paiement' && !empty($conf->facture->dir_output)) { - if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2594,9 +2672,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for accounting exports - else if ($modulepart == 'export_compta' && !empty($conf->accounting->dir_output)) + elseif ($modulepart == 'export_compta' && !empty($conf->accounting->dir_output)) { - if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2604,18 +2682,18 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les expedition - else if ($modulepart == 'expedition' && !empty($conf->expedition->dir_output)) + elseif ($modulepart == 'expedition' && !empty($conf->expedition->dir_output)) { - if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } $original_file=$conf->expedition->dir_output."/sending/".$original_file; } // Wrapping pour les bons de livraison - else if ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) + elseif ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) { - if ($fuser->rights->expedition->livraison->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->expedition->livraison->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2623,9 +2701,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les actions - else if ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) + elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) { - if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2633,9 +2711,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les actions - else if ($modulepart == 'actionsreport' && !empty($conf->agenda->dir_temp)) + elseif ($modulepart == 'actionsreport' && !empty($conf->agenda->dir_temp)) { - if ($fuser->rights->agenda->allactions->{$read} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->agenda->allactions->{$read} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2643,10 +2721,10 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les produits et services - else if ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') + elseif ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') { if (empty($entity) || (empty($conf->product->multidir_output[$entity]) && empty($conf->service->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); - if (($fuser->rights->produit->{$lire} || $fuser->rights->service->{$lire}) || preg_match('/^specimen/i',$original_file)) + if (($fuser->rights->produit->{$lire} || $fuser->rights->service->{$lire}) || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2655,20 +2733,31 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les lots produits - else if ($modulepart == 'product_batch' || $modulepart == 'produitlot') + elseif ($modulepart == 'product_batch' || $modulepart == 'produitlot') { if (empty($entity) || (empty($conf->productbatch->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); - if (($fuser->rights->produit->{$lire} ) || preg_match('/^specimen/i',$original_file)) + if (($fuser->rights->produit->{$lire} ) || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } if (! empty($conf->productbatch->enabled)) $original_file=$conf->productbatch->multidir_output[$entity].'/'.$original_file; } - // Wrapping pour les contrats - else if ($modulepart == 'contract' && !empty($conf->contrat->dir_output)) + // Wrapping for stock movements + elseif ($modulepart == 'movement' || $modulepart == 'mouvement') { - if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i',$original_file)) + if (empty($entity) || empty($conf->stock->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); + if (($fuser->rights->stock->{$lire} || $fuser->rights->stock->movement->{$lire} || $fuser->rights->stock->mouvement->{$lire}) || preg_match('/^specimen/i', $original_file)) + { + $accessallowed=1; + } + if (! empty($conf->stock->enabled)) $original_file=$conf->stock->multidir_output[$entity].'/movement/'.$original_file; + } + + // Wrapping pour les contrats + elseif ($modulepart == 'contract' && !empty($conf->contrat->dir_output)) + { + if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2677,9 +2766,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les dons - else if ($modulepart == 'donation' && !empty($conf->don->dir_output)) + elseif ($modulepart == 'donation' && !empty($conf->don->dir_output)) { - if ($fuser->rights->don->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->don->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2687,9 +2776,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les dons - else if ($modulepart == 'dolresource' && !empty($conf->resource->dir_output)) + elseif ($modulepart == 'dolresource' && !empty($conf->resource->dir_output)) { - if ($fuser->rights->resource->{$read} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->resource->{$read} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2697,9 +2786,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour les remises de cheques - else if ($modulepart == 'remisecheque' && !empty($conf->banque->dir_output)) + elseif ($modulepart == 'remisecheque' && !empty($conf->bank->dir_output)) { - if ($fuser->rights->banque->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->banque->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2708,7 +2797,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for bank - else if ($modulepart == 'bank' && !empty($conf->bank->dir_output)) + elseif (($modulepart == 'banque' || $modulepart == 'bank') && !empty($conf->bank->dir_output)) { if ($fuser->rights->banque->{$lire}) { @@ -2718,7 +2807,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for export module - else if ($modulepart == 'export' && !empty($conf->export->dir_temp)) + elseif ($modulepart == 'export' && !empty($conf->export->dir_temp)) { // Aucun test necessaire car on force le rep de download sur // le rep export qui est propre a l'utilisateur @@ -2727,35 +2816,35 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for import module - else if ($modulepart == 'import' && !empty($conf->import->dir_temp)) + elseif ($modulepart == 'import' && !empty($conf->import->dir_temp)) { $accessallowed=1; $original_file=$conf->import->dir_temp.'/'.$original_file; } // Wrapping pour l'editeur wysiwyg - else if ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output)) + elseif ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output)) { $accessallowed=1; $original_file=$conf->fckeditor->dir_output.'/'.$original_file; } // Wrapping for backups - else if ($modulepart == 'systemtools' && !empty($conf->admin->dir_output)) + elseif ($modulepart == 'systemtools' && !empty($conf->admin->dir_output)) { if ($fuser->admin) $accessallowed=1; $original_file=$conf->admin->dir_output.'/'.$original_file; } // Wrapping for upload file test - else if ($modulepart == 'admin_temp' && !empty($conf->admin->dir_temp)) + elseif ($modulepart == 'admin_temp' && !empty($conf->admin->dir_temp)) { if ($fuser->admin) $accessallowed=1; $original_file=$conf->admin->dir_temp.'/'.$original_file; } // Wrapping pour BitTorrent - else if ($modulepart == 'bittorrent' && !empty($conf->bittorrent->dir_output)) + elseif ($modulepart == 'bittorrent' && !empty($conf->bittorrent->dir_output)) { $accessallowed=1; $dir='files'; @@ -2764,9 +2853,9 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping pour Foundation module - else if ($modulepart == 'member' && !empty($conf->adherent->dir_output)) + elseif ($modulepart == 'member' && !empty($conf->adherent->dir_output)) { - if ($fuser->rights->adherent->{$lire} || preg_match('/^specimen/i',$original_file)) + if ($fuser->rights->adherent->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed=1; } @@ -2774,7 +2863,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } // Wrapping for Scanner - else if ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp)) + elseif ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp)) { $accessallowed=1; $original_file=$conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file; @@ -2787,45 +2876,58 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, // If modulepart=module Allows any module to open a file if file is in directory called DOL_DATA_ROOT/modulepart else { - if (preg_match('/^specimen/i',$original_file)) $accessallowed=1; // If link to a file called specimen. Test must be done before changing $original_file int full path. + if (preg_match('/^specimen/i', $original_file)) $accessallowed=1; // If link to a file called specimen. Test must be done before changing $original_file int full path. if ($fuser->admin) $accessallowed=1; // If user is admin // Define $accessallowed - if (preg_match('/^([a-z]+)_user_temp$/i',$modulepart,$reg)) + if (preg_match('/^([a-z]+)_user_temp$/i', $modulepart, $reg)) { if (empty($conf->{$reg[1]}->dir_temp)) // modulepart not supported { - dol_print_error('','Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); + dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); exit; } if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_temp.'/'.$fuser->id.'/'.$original_file; } - else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg)) + elseif (preg_match('/^([a-z]+)_temp$/i', $modulepart, $reg)) { if (empty($conf->{$reg[1]}->dir_temp)) // modulepart not supported { - dol_print_error('','Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); + dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); exit; } if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_temp.'/'.$original_file; } - else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg)) + elseif (preg_match('/^([a-z]+)_user$/i', $modulepart, $reg)) { if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported { - dol_print_error('','Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); + dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); exit; } if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed=1; $original_file=$conf->{$reg[1]}->dir_output.'/'.$fuser->id.'/'.$original_file; } + elseif (preg_match('/^massfilesarea_([a-z]+)$/i', $modulepart, $reg)) + { + if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported + { + dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); + exit; + } + if ($fuser->rights->{$reg[1]}->{$lire} || preg_match('/^specimen/i', $original_file)) + { + $accessallowed=1; + } + $original_file=$conf->{$reg[1]}->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; + } else { if (empty($conf->$modulepart->dir_output)) // modulepart not supported { - dol_print_error('','Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); + dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')'); exit; } @@ -2971,4 +3073,3 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre return $file_list; } - From 5948d385a36b149cc3555d6c9a235dd4819c5a98 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Apr 2020 14:46:49 +0200 Subject: [PATCH 162/456] Look and feel v12 --- htdocs/core/lib/functions.lib.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 94a32ceacaf..3bf1be1d772 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3145,13 +3145,14 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'cash-register', 'check', 'close_title', 'company', 'contact', 'contract', 'cubes', 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', - 'intervention', 'language', 'list', 'listlight', 'lot', + 'intervention', 'label', 'language', 'list', 'listlight', 'lot', 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', 'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', - 'object_holiday', 'object_hrm', 'object_intervention', 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', + 'object_holiday', 'object_hrm', 'object_intervention', 'object_label', + 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', 'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', 'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', @@ -3188,7 +3189,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'hrm'=>'umbrella-beach', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', 'email'=>'at', 'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'info-circle', - 'generic'=>'file', 'holiday'=>'umbrella-beach', 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users', + 'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', + 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users', 'sign-out'=>'sign-out-alt', 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star', 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter', From 14a3aa2165ad75986d4960b3ab881bdbd12e26a6 Mon Sep 17 00:00:00 2001 From: Maxime Lecoq Date: Thu, 30 Apr 2020 18:21:25 +0200 Subject: [PATCH 163/456] FIX: add auto incrementation to llx_c_typent.sql --- htdocs/install/mysql/tables/llx_c_typent.sql | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/install/mysql/tables/llx_c_typent.sql b/htdocs/install/mysql/tables/llx_c_typent.sql index 0b15e70b15b..130e9d8784f 100644 --- a/htdocs/install/mysql/tables/llx_c_typent.sql +++ b/htdocs/install/mysql/tables/llx_c_typent.sql @@ -19,11 +19,11 @@ create table llx_c_typent ( - id integer PRIMARY KEY, - code varchar(12) NOT NULL, - libelle varchar(64), - fk_country integer NULL, -- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B) - active tinyint DEFAULT 1 NOT NULL, - module varchar(32) NULL, - position integer NOT NULL DEFAULT 0 + id integer AUTO_INCREMENT PRIMARY KEY, + code varchar(12) NOT NULL, + libelle varchar(64), + fk_country integer NULL, -- Defined only to have specific list for countries that can't use generic list (like argentina that need type A or B) + active tinyint DEFAULT 1 NOT NULL, + module varchar(32) NULL, + position integer NOT NULL DEFAULT 0 )ENGINE=innodb; From b1495e12ce4cec42eaca686bc30f12b5be70a869 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Apr 2020 18:45:00 +0200 Subject: [PATCH 164/456] FIX A variable was erased by a temporary variable --- htdocs/compta/facture/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 934916fa31e..9fa696c69b3 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4202,7 +4202,7 @@ elseif ($id > 0 || ! empty($ref)) $current_situation_counter = array(); foreach ($object->tab_previous_situation_invoice as $prev_invoice) { - $totalpaye = $prev_invoice->getSommePaiement(); + $tmptotalpaidforthisinvoice = $prev_invoice->getSommePaiement(); $total_prev_ht += $prev_invoice->total_ht; $total_prev_ttc += $prev_invoice->total_ttc; $current_situation_counter[] = (($prev_invoice->type == Facture::TYPE_CREDIT_NOTE)?-1:1) * $prev_invoice->situation_counter; @@ -4213,7 +4213,7 @@ elseif ($id > 0 || ! empty($ref)) if (! empty($conf->banque->enabled)) print ''; print '' . price($prev_invoice->total_ht) . ''; print '' . price($prev_invoice->total_ttc) . ''; - print '' . $prev_invoice->getLibStatut(3, $totalpaye) . ''; + print '' . $prev_invoice->getLibStatut(3, $tmptotalpaidforthisinvoice) . ''; print ''; } } From e4edd143c5945c4581a11d1acbb03198af3400da Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Apr 2020 19:41:46 +0200 Subject: [PATCH 165/456] Fix field name --- htdocs/accountancy/expensereport/list.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index e03c717039f..148a1d8fe1f 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -42,6 +42,9 @@ $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + // Select Box $mesCasesCochees = GETPOST('toselect', 'array'); @@ -240,8 +243,8 @@ if ($result) { $arrayofselected = is_array($toselect) ? $toselect : array(); $param = ''; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); if ($search_lineid) $param .= '&search_lineid='.urlencode($search_lineid); if ($search_day) $param .= '&search_day='.urlencode($search_day); if ($search_month) $param .= '&search_month='.urlencode($search_month); @@ -308,7 +311,7 @@ if ($result) { print ''; print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("DateOfLine", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right maxwidth50 '); From 625c7216a986d309f4abbe147e9f8a8eafe85d20 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Apr 2020 19:51:24 +0200 Subject: [PATCH 166/456] Can show date of validation in list --- htdocs/accountancy/expensereport/lines.php | 13 ++++++++++++- htdocs/accountancy/expensereport/list.php | 15 +++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 8cc398a00bf..4cd51fb3a63 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -252,6 +252,9 @@ if ($result) { print ''; print ''; print ''; + if (! empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) { + print ''; + } print ''; if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; @@ -272,7 +275,10 @@ if ($result) { print ''; print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center '); + if (! empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) { + print_liste_field_titre("DateValidation", $_SERVER["PHP_SELF"], "er.date_valid", "", $param, '', $sortfield, $sortorder, 'center '); + } + print_liste_field_titre("DateOfLine", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "erd.total_ht", "", $param, '', $sortfield, $sortorder, 'right '); @@ -299,6 +305,11 @@ if ($result) { // Ref Invoice print ''.$expensereport_static->getNomUrl(1).''; + // Date validation + if (! empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) { + print ''.dol_print_date($db->jdate($objp->date_valid), 'day').''; + } + print ''.dol_print_date($db->jdate($objp->date), 'day').''; print ''.($langs->trans($objp->type_fees_code) == $objp->type_fees_code ? $objp->type_fees_label : $langs->trans(($objp->type_fees_code))).''; diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 148a1d8fe1f..96eebd49b36 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -43,7 +43,7 @@ $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Select Box @@ -186,7 +186,7 @@ if (empty($chartaccountcode)) } // Expense report lines -$sql = "SELECT er.ref, er.rowid as erid, er.date_debut,"; +$sql = "SELECT er.ref, er.rowid as erid, er.date_debut, er.date_valid,"; $sql .= " erd.rowid, erd.fk_c_type_fees, erd.comments, erd.total_ht as price, erd.fk_code_ventilation, erd.tva_tx as tva_tx_line, erd.vat_src_code, erd.date,"; $sql .= " f.id as type_fees_id, f.code as type_fees_code, f.label as type_fees_label, f.accountancy_code as code_buy,"; $sql .= " aa.rowid as aarowid"; @@ -291,6 +291,9 @@ if ($result) { print ''; print ''; print ''; + if (! empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) { + print ''; + } print ''; if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; @@ -311,6 +314,9 @@ if ($result) { print ''; print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "erd.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("ExpenseReport", $_SERVER["PHP_SELF"], "er.ref", "", $param, '', $sortfield, $sortorder); + if (! empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) { + print_liste_field_titre("DateValidation", $_SERVER["PHP_SELF"], "er.date_valid", "", $param, '', $sortfield, $sortorder, 'center '); + } print_liste_field_titre("DateOfLine", $_SERVER["PHP_SELF"], "erd.date, erd.rowid", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre("TypeFees", $_SERVER["PHP_SELF"], "f.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "erd.comments", "", $param, '', $sortfield, $sortorder); @@ -344,6 +350,11 @@ if ($result) { // Ref Expense report print ''.$expensereport_static->getNomUrl(1).''; + // Date validation + if (! empty($conf->global->ACCOUNTANCY_USE_EXPENSE_REPORT_VALIDATION_DATE)) { + print ''.dol_print_date($db->jdate($objp->date_valid), 'day').''; + } + // Date print ''.dol_print_date($db->jdate($objp->date), 'day').''; From fddbe7c9292bbe2d808104e55e89b1df92b6274b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 1 May 2020 07:50:46 +0200 Subject: [PATCH 167/456] $tmpplugin was defined after use --- htdocs/core/class/html.form.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b2c677ed29d..5eaa7d5ede8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6634,11 +6634,11 @@ class Form // Add code for jquery to use multiselect if (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { - $out .= "\n".' - - - - - - - -
    - - - -
    - - - - From a88ab40384f9ec359f289148d0e5ea5052c52c1a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 May 2020 15:18:59 +0200 Subject: [PATCH 187/456] Clean phpcs --- README.md | 2 +- dev/setup/codesniffer/ruleset.xml | 52 ++++++++++--------- htdocs/api/class/api_access.class.php | 2 +- htdocs/api/index.php | 2 +- .../core/class/commondocgenerator.class.php | 2 +- .../core/modules/modEmailCollector.class.php | 7 ++- htdocs/dav/fileserver.php | 2 +- htdocs/debugbar/class/autoloader.php | 2 +- htdocs/don/class/paymentdonation.class.php | 52 +++++++++++-------- htdocs/product/admin/price_rules.php | 2 +- htdocs/product/inventory/inventory.php | 6 +-- 11 files changed, 71 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index 3f329c678a7..f611f333e6a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions: - [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp) -- DoliDeb for Debian or Ubuntu +- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian - DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia Releases can be downloaded from [official website](https://www.dolibarr.org/). diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index f8219fc7119..421acfeed1f 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -67,19 +67,11 @@ - + - - - @@ -99,19 +91,33 @@ + + + + 0 - - + + + @@ -127,7 +133,7 @@ - + @@ -190,13 +196,10 @@ - - 0 - - - 0 - - + + + + 0 @@ -208,7 +211,6 @@ - 0 diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 866de6a53d2..339ddfd2ad6 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -18,7 +18,7 @@ // Create the autoloader for Luracast require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; -call_user_func(function() { +call_user_func(function () { $loader = Luracast\Restler\AutoLoader::instance(); spl_autoload_register($loader); return $loader; diff --git a/htdocs/api/index.php b/htdocs/api/index.php index d27bd39e966..c5edbc74d66 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -44,7 +44,7 @@ if (!$res) die("Include of main fails"); require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php'; -call_user_func(function() { +call_user_func(function () { $loader = Luracast\Restler\AutoLoader::instance(); spl_autoload_register($loader); return $loader; diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 4bcfbafa9d8..1f5ef0a5a9e 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1295,7 +1295,7 @@ abstract class CommonDocGenerator if (!empty($fields)) { // Sort extrafields by rank - uasort($fields, function($a, $b) { + uasort($fields, function ($a, $b) { return ($a->rank > $b->rank) ? -1 : 1; }); diff --git a/htdocs/core/modules/modEmailCollector.class.php b/htdocs/core/modules/modEmailCollector.class.php index ed37a3a70ab..ce8ea9436e8 100644 --- a/htdocs/core/modules/modEmailCollector.class.php +++ b/htdocs/core/modules/modEmailCollector.class.php @@ -282,7 +282,8 @@ class modEmailCollector extends DolibarrModules $tmpresql = $this->db->query($tmpsql); if ($tmpresql) { if ($this->db->num_rows($tmpresql) == 0) { - $descriptionA1 = 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.'; + $descriptionA1 = 'This collector will scan your mailbox to find emails that match some rules and create automatically a ticket (Module Ticket must be enabled) with the email informations. You can use this collector if you provide some support by email, so your ticket request will be automatically generated.'; + $descriptionA1 .= ' If the collector Collect_Responses is also enabled, when you send an email from the ticket, you may also see answers of your customers or partners directly on the ticket view.'; $sqlforexampleA1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; $sqlforexampleA1 .= " VALUES (".$conf->entity.", 'Collect_Ticket_Requets', 'Example to collect ticket requests', '".$this->db->escape($descriptionA1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleA2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; @@ -319,7 +320,9 @@ class modEmailCollector extends DolibarrModules $tmpresql = $this->db->query($tmpsql); if ($tmpresql) { if ($this->db->num_rows($tmpresql) == 0) { - $descriptionC1 = "This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated. If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
    Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can't be found in database (new customer), the lead will be attached to the thirdparty with ID 1."; + $descriptionC1 = "This collector will scan your mailbox to find emails that match some rules and create automatically a lead (Module Project must be enabled) with the email informations. You can use this collector if you want to follow your lead using the module Project (1 lead = 1 project), so your leads will be automatically generated."; + $descriptionC1 .= " If the collector Collect_Responses is also enabled, when you send an email from your leads, proposals or any other object, you may also see answers of your customers or partners directly on the application.
    "; + $descriptionC1 .= "Note: With this initial example, the title of the lead is generated including the email. If the thirdparty can't be found in database (new customer), the lead will be attached to the thirdparty with ID 1."; $sqlforexampleC1 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollector (entity, ref, label, description, source_directory, date_creation, fk_user_creat, status)"; $sqlforexampleC1 .= " VALUES (".$conf->entity.", 'Collect_Leads', 'Example to collect leads', '".$this->db->escape($descriptionC1)."', 'INBOX', '".$this->db->idate(dol_now())."', ".$user->id.", 0)"; $sqlforexampleC2 = "INSERT INTO ".MAIN_DB_PREFIX."emailcollector_emailcollectorfilter (fk_emailcollector, type, date_creation, fk_user_creat, status)"; diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php index ce3157414f5..18b8bc8b07c 100644 --- a/htdocs/dav/fileserver.php +++ b/htdocs/dav/fileserver.php @@ -82,7 +82,7 @@ $tmpDir = $conf->dav->multidir_output[$entity]; // We need root dir, not a dir t // Authentication callback function -$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function($username, $password) { +$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $password) { global $user; global $conf; global $dolibarr_main_authentication, $dolibarr_auto_user; diff --git a/htdocs/debugbar/class/autoloader.php b/htdocs/debugbar/class/autoloader.php index a68ace2c3c0..1d5c85c975d 100644 --- a/htdocs/debugbar/class/autoloader.php +++ b/htdocs/debugbar/class/autoloader.php @@ -4,7 +4,7 @@ * Simple autoloader, so we don't need Composer just for this. */ -spl_autoload_register(function($class) { +spl_autoload_register(function ($class) { if (preg_match('/^DebugBar/', $class) || preg_match('/^'.preg_quote('Psr\Log', '/').'/', $class)) { $file = DOL_DOCUMENT_ROOT.'/includes/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php'; //var_dump($class.' - '.file_exists($file).' - '.$file); diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index ee8156c229e..64644d18971 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -55,11 +55,17 @@ class PaymentDonation extends CommonObject public $fk_donation; public $datec = ''; + public $tms = ''; + public $datep = ''; - public $amount; // Total amount of payment - public $amounts = array(); // Array of amounts + + public $amount; // Total amount of payment + + public $amounts = array(); // Array of amounts + public $typepayment; + public $num_payment; /** @@ -121,14 +127,14 @@ class PaymentDonation extends CommonObject } // Clean parameters - if (isset($this->fk_donation)) $this->fk_donation = (int) $this->fk_donation; - if (isset($this->amount)) $this->amount = trim($this->amount); + if (isset($this->fk_donation)) $this->fk_donation = (int) $this->fk_donation; + if (isset($this->amount)) $this->amount = trim($this->amount); if (isset($this->fk_typepayment)) $this->fk_typepayment = trim($this->fk_typepayment); - if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; - if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat; - if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; + if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); + if (isset($this->note_public)) $this->note_public = trim($this->note_public); + if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; + if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat; + if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; $totalamount = 0; foreach ($this->amounts as $key => $value) // How payment is dispatch @@ -228,26 +234,26 @@ class PaymentDonation extends CommonObject { $obj = $this->db->fetch_object($resql); - $this->id = $obj->rowid; - $this->ref = $obj->rowid; + $this->id = $obj->rowid; + $this->ref = $obj->rowid; - $this->fk_donation = $obj->fk_donation; - $this->datec = $this->db->jdate($obj->datec); - $this->tms = $this->db->jdate($obj->tms); - $this->datep = $this->db->jdate($obj->datep); - $this->amount = $obj->amount; + $this->fk_donation = $obj->fk_donation; + $this->datec = $this->db->jdate($obj->datec); + $this->tms = $this->db->jdate($obj->tms); + $this->datep = $this->db->jdate($obj->datep); + $this->amount = $obj->amount; $this->fk_typepayment = $obj->fk_typepayment; - $this->num_payment = $obj->num_payment; - $this->note_public = $obj->note_public; - $this->fk_bank = $obj->fk_bank; - $this->fk_user_creat = $obj->fk_user_creat; - $this->fk_user_modif = $obj->fk_user_modif; + $this->num_payment = $obj->num_payment; + $this->note_public = $obj->note_public; + $this->fk_bank = $obj->fk_bank; + $this->fk_user_creat = $obj->fk_user_creat; + $this->fk_user_modif = $obj->fk_user_modif; - $this->type_code = $obj->type_code; + $this->type_code = $obj->type_code; $this->type_label = $obj->type_label; $this->bank_account = $obj->fk_account; - $this->bank_line = $obj->fk_bank; + $this->bank_line = $obj->fk_bank; } $this->db->free($resql); diff --git a/htdocs/product/admin/price_rules.php b/htdocs/product/admin/price_rules.php index 6da4d65925b..64bf5702996 100644 --- a/htdocs/product/admin/price_rules.php +++ b/htdocs/product/admin/price_rules.php @@ -141,7 +141,7 @@ for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) { $price_options[$i] = $langs->trans('SellingPrice').' '.$i; } -$genPriceOptions = function($level) use ($price_options) { +$genPriceOptions = function ($level) use ($price_options) { $return = array(); diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index b6021c82cb8..3f0989251b5 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -31,10 +31,10 @@ $langs->loadLangs(array("stocks", "other")); // Get parameters $id = GETPOST('id', 'int'); -$ref = GETPOST('ref', 'alpha'); +$ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); -$confirm = GETPOST('confirm', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$confirm = GETPOST('confirm', 'alpha'); +$cancel = GETPOST('cancel', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); From 99d7cb72a170286366cdb759e6721f8d8beafcbf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 May 2020 15:40:23 +0200 Subject: [PATCH 188/456] Fix duplicate --- .scrutinizer.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 7c43ab24aef..6dbf39bde26 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -194,22 +194,6 @@ tools: - 'test/*' - 'htdocs/includes/*' paths: { } - - php_changetracking: - enabled: false - bug_patterns: - - '\bfix(?:es|ed)?\b' - feature_patterns: - - '\badd(?:s|ed)?\b' - - '\bimplement(?:s|ed)?\b' - filter: - excluded_paths: - - 'build/*' - - 'dev/*' - - 'doc/*' - - 'test/*' - - 'htdocs/includes/*' - paths: { } # Coding-Style / Bug Detection js_hint: From b5abb72c5b5b1ab74cce3700b20bc2c3cf03a9dd Mon Sep 17 00:00:00 2001 From: Marc Guenneugues Date: Sat, 2 May 2020 16:36:40 +0200 Subject: [PATCH 189/456] Add / as a delimiter for replacement pattern in select_produits* --- htdocs/core/class/html.form.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5eaa7d5ede8..f48ce989a7a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2507,7 +2507,7 @@ class Form $label = $objp->label; if (!empty($objp->label_translated)) $label = $objp->label_translated; - if (!empty($filterkey) && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $label, 1); + if (!empty($filterkey) && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $label, 1); $outkey = $objp->rowid; $outref = $objp->ref; @@ -2579,7 +2579,7 @@ class Form if ($outorigin && !empty($conf->global->PRODUCT_SHOW_ORIGIN_IN_COMBO)) $opt .= ' ('.getCountry($outorigin, 1).')'; $objRef = $objp->ref; - if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $objRef, 1); + if (!empty($filterkey) && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $objRef, 1); $outval .= $objRef; if ($outbarcode) $outval .= ' ('.$outbarcode.')'; $outval .= ' - '.dol_trunc($label, $maxlengtharticle); @@ -2948,11 +2948,11 @@ class Form } $objRef = $objp->ref; - if ($filterkey && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $objRef, 1); + if ($filterkey && $filterkey != '') $objRef = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $objRef, 1); $objRefFourn = $objp->ref_fourn; - if ($filterkey && $filterkey != '') $objRefFourn = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $objRefFourn, 1); + if ($filterkey && $filterkey != '') $objRefFourn = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $objRefFourn, 1); $label = $objp->label; - if ($filterkey && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey).')/i', '$1', $label, 1); + if ($filterkey && $filterkey != '') $label = preg_replace('/('.preg_quote($filterkey, '/').')/i', '$1', $label, 1); $optlabel = $objp->ref; if (!empty($objp->idprodfournprice) && ($objp->ref != $objp->ref_fourn)) { From 1929f9132db3c67023ce284a935943a8c47b232a Mon Sep 17 00:00:00 2001 From: proprum <51385888+proprum@users.noreply.github.com> Date: Sat, 2 May 2020 17:25:22 +0200 Subject: [PATCH 190/456] MAIN_NO_CONCAT_DESCRIPTION in contrat/card.php Idem to propal/card.php --- htdocs/contrat/card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 3c64b627a5c..111a446d9ae 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -521,7 +521,8 @@ if (empty($reshook)) } $desc = $prod->description; - $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc = $product_desc; + else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); $fk_unit = $prod->fk_unit; } else From 518853bb9614343369e0fa2c1f3f0430a95072db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 2 May 2020 18:37:34 +0200 Subject: [PATCH 191/456] Add image --- doc/images/background_dolibarr.jpg | Bin 0 -> 175643 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 doc/images/background_dolibarr.jpg diff --git a/doc/images/background_dolibarr.jpg b/doc/images/background_dolibarr.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6c4cc11460d334442b8f53e41054c333a626db18 GIT binary patch literal 175643 zcmbrkby!rv+c$o;S-QKVyE~=3yCs$mS-M35r6m@mL^>o~x&%Q1=`KN#1_c!mR1|&J z=lfpI^ZxO^fBdfB?6tf1nK^UMJu~+`^Esb0e^>v007!K;bu2;5LXt^feS!xg`9y^9XU$z8ZFd06mWoD81C(x>jWZAcAcX(&UH&7p{*yiaBTM{~(dMRVxO;GYW+n9aKV+BxLw5B<`{DX; zj=P`ZKQ`bb0ALKl4T2!b*B2#dDJB?%_HYSCy9#-^;%xly!~_HZrhpcp3J3xyz!&#H z;Ur5y4EGxZpaBoS1qjCdy8=Rh7w-4}toz?e{{INUsBqla0DxM+-3YXohi5RWn24yP z0ILShY*w@20DlxKPZ-K2$SW8n$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-5~y#Fcs5s3aaKXpm@;HCAjS15?g0gh zMh5y6BZ`_w3a}$=lAp;z3RoC~h{8IPUr`WbrFCSWa2Mm21Df}U96b#K7Z~-5lLBr( zb(M$Kug%n{zOEqBLc0Gw_R}h~^O6iOL>6p?Ja4umL08y>?k;NUCh2(ev6$)4F_UW$ zk%Je2_9yv99BeJLO`9a?O4lX;0FSZlPQM-^&7w`F<>1$pjk}e)<&$7*(t5dtKqh{Mw1}B`5OiMpqH`{wQ1o^H z_Y1bnVaPFC*|nEUVb(@bYeSN|}R+f;=vbGmF M0e$3v%zu;r2ThWJWdHyG literal 0 HcmV?d00001 From 81c808692e13f45922f7716b8c698e1537bc2e1a Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Sat, 2 May 2020 22:00:04 +0200 Subject: [PATCH 192/456] NEW Bar Restaurant tab and Auto order --- htdocs/core/lib/takepos.lib.php | 8 ++ htdocs/langs/en_US/cashdesk.lang | 4 +- htdocs/takepos/admin/bar.php | 178 +++++++++++++++++++++++++++++++ htdocs/takepos/admin/setup.php | 55 ---------- htdocs/takepos/ajax/ajax.php | 6 ++ htdocs/takepos/auto_order.php | 29 +++++ htdocs/takepos/genimg/qr.php | 33 ++++++ htdocs/takepos/invoice.php | 7 +- htdocs/takepos/phone.php | 31 ++++-- 9 files changed, 287 insertions(+), 64 deletions(-) create mode 100644 htdocs/takepos/admin/bar.php create mode 100644 htdocs/takepos/auto_order.php create mode 100644 htdocs/takepos/genimg/qr.php diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index 8a883ceef91..729952916ad 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -42,6 +42,14 @@ function takepos_prepare_head() $head[$h][1] = $langs->trans("Receipt"); $head[$h][2] = 'receipt'; $h++; + + if ($conf->global->TAKEPOS_BAR_RESTAURANT) + { + $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/bar.php'; + $head[$h][1] = $langs->trans("BarRestaurant"); + $head[$h][2] = 'bar'; + $h++; + } $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS); for ($i = 1; $i <= $numterminals; $i++) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index f2bc989b953..b22a7b83166 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -105,4 +105,6 @@ CashReport=Cash report MainPrinterToUse=Main printer to use OrderPrinterToUse=Order printer to use MainTemplateToUse=Main template to use -OrderTemplateToUse=Order template to use \ No newline at end of file +OrderTemplateToUse=Order template to use +BarRestaurant=Bar Restaurant +AutoOrder=Customer auto order \ No newline at end of file diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php new file mode 100644 index 00000000000..16fccf85147 --- /dev/null +++ b/htdocs/takepos/admin/bar.php @@ -0,0 +1,178 @@ + + * Copyright (C) 2011-2017 Juanjo Menent + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/takepos/admin/bar.php + * \ingroup takepos + * \brief Setup page for TakePos module - Bar Restaurant features + */ + +require '../../main.inc.php'; // Load $user and permissions +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; + +// Security check +if (!$user->admin) accessforbidden(); + +$langs->loadLangs(array("admin", "cashdesk", "printing")); + +global $db; + +/* + * Actions + */ + +if (GETPOST('action', 'alpha') == 'set') +{ + $db->begin(); + + dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); + + if (!$res > 0) $error++; + + if (!$error) + { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + $db->rollback(); + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + + +/* + * View + */ + +$form = new Form($db); +$formproduct = new FormProduct($db); + +llxHeader('', $langs->trans("CashDeskSetup")); + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); +$head = takepos_prepare_head(); +dol_fiche_head($head, 'bar', 'TakePOS', -1); +print '
    '; + + +// Mode +print '
    '; +print ''; +print ''; + +print '
    '; +print ''; +print ''; +print ''; +print "\n"; + +if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") { + print ''; + + print ''; +} + +print ''; + +print ''; + +if ($conf->global->TAKEPOS_SUPPLEMENTS) +{ + print '\n"; +} + +print ''; + + +print '
    '.$langs->trans("Parameters").''.$langs->trans("Value").'
    '; + print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')'; + print ''; + print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0); + //print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1); + print '
    '; + print $langs->trans("OrderNotes"); + print ''; + print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0); + //print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1); + print '
    '; +print $langs->trans("BasicPhoneLayout"); +print ''; +//print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1); +print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0); +print '
    '; +print $langs->trans("ProductSupplements"); +print ''; +//print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1); +print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0); +print '
    '; + print $langs->trans("SupplementCategory"); + print ''; + print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0); + print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY'); + print "
    '; +print $langs->trans("AutoOrder"); +print ''; +print ajax_constantonoff("TAKEPOS_AUTO_ORDER", array(), $conf->entity, 0, 0, 1, 0); +print '
    '; + +if ($conf->global->TAKEPOS_AUTO_ORDER) +{ + print '
    '; + print ''; + print ''; + print ''; + print "\n"; + + //global $dolibarr_main_url_root; + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file + $sql = "SELECT rowid, entity, label, leftpos, toppos, floor FROM ".MAIN_DB_PREFIX."takepos_floor_tables"; + $resql = $db->query($sql); + $rows = array(); + while ($row = $db->fetch_array($resql)) { + print ''; + } + + print '
    '.$langs->trans("Table").''.$langs->trans("URL").''.$langs->trans("QR").'
    '; + print $langs->trans("Table")." ".$row['label']; + print ''; + print "".$urlwithroot."/takepos/auto_order.php?key=".dol_encode($row['rowid']).""; + print ''; + print ""; + print '
    '; +} + +print '
    '; + +print '
    '; + +print '
    '; + +print "
    \n"; + +print '
    '; + +llxFooter(); +$db->close(); diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 3e12fdce5c9..59fe85e66ef 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -434,19 +434,6 @@ print "\n"; //print $form->selectarray('TAKEPOS_ADDON', $array, (empty($conf->global->TAKEPOS_ADDON) ? '0' : $conf->global->TAKEPOS_ADDON), 0); //print "\n"; -print ''; -print '
    '; - -print '
    '; - -// Bar Restaurant mode -print '
    '; -print ''; - -print ''; -print ''; -print "\n"; - print ''; @@ -455,48 +442,6 @@ print ajax_constantonoff("TAKEPOS_BAR_RESTAURANT", array(), $conf->entity, 0, 0, //print $form->selectyesno("TAKEPOS_BAR_RESTAURANT", $conf->global->TAKEPOS_BAR_RESTAURANT, 1); print "\n"; -if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") { - print ''; - - print ''; -} - -if ($conf->global->TAKEPOS_BAR_RESTAURANT) -{ - print ''; - - print ''; - - if ($conf->global->TAKEPOS_SUPPLEMENTS) - { - print '\n"; - } -} print '
    '.$langs->trans("Other").''.$langs->trans("Value").'
    '; print $langs->trans("EnableBarOrRestaurantFeatures"); print '
    '; - print $langs->trans("OrderPrinters").' ('.$langs->trans("Setup").')'; - print ''; - print ajax_constantonoff("TAKEPOS_ORDER_PRINTERS", array(), $conf->entity, 0, 0, 1, 0); - //print $form->selectyesno("TAKEPOS_ORDER_PRINTERS", $conf->global->TAKEPOS_ORDER_PRINTERS, 1); - print '
    '; - print $langs->trans("OrderNotes"); - print ''; - print ajax_constantonoff("TAKEPOS_ORDER_NOTES", array(), $conf->entity, 0, 0, 1, 0); - //print $form->selectyesno("TAKEPOS_ORDER_NOTES", $conf->global->TAKEPOS_ORDER_NOTES, 1); - print '
    '; - print $langs->trans("BasicPhoneLayout"); - print ''; - //print $form->selectyesno("TAKEPOS_PHONE_BASIC_LAYOUT", $conf->global->TAKEPOS_PHONE_BASIC_LAYOUT, 1); - print ajax_constantonoff("TAKEPOS_PHONE_BASIC_LAYOUT", array(), $conf->entity, 0, 0, 1, 0); - print '
    '; - print $langs->trans("ProductSupplements"); - print ''; - //print $form->selectyesno("TAKEPOS_SUPPLEMENTS", $conf->global->TAKEPOS_SUPPLEMENTS, 1); - print ajax_constantonoff("TAKEPOS_SUPPLEMENTS", array(), $conf->entity, 0, 0, 1, 0); - print '
    '; - print $langs->trans("SupplementCategory"); - print ''; - print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_SUPPLEMENTS_CATEGORY, 'TAKEPOS_SUPPLEMENTS_CATEGORY', 64, 0, 0); - print ajax_combobox('TAKEPOS_SUPPLEMENTS_CATEGORY'); - print "
    '; print '
    '; diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index f3b5ba15716..d1f59325c1f 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -142,4 +142,10 @@ elseif ($action == 'search' && $term != '') { } echo json_encode($object); +} elseif ($action == 'thecheck') { + $place = GETPOST('place', 'alpha'); + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; + $printer = new dolReceiptPrinter($db); + $printer->sendToPrinter($object, $conf->global->{'TAKEPOS_TEMPLATE_TO_USE_FOR_INVOICES'.$term}, $conf->global->{'TAKEPOS_PRINTER_TO_USE'.$term}); } diff --git a/htdocs/takepos/auto_order.php b/htdocs/takepos/auto_order.php new file mode 100644 index 00000000000..5305b4da81f --- /dev/null +++ b/htdocs/takepos/auto_order.php @@ -0,0 +1,29 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/takepos/auto_order.php + * \ingroup takepos + * \brief Public orders for customers + */ + +if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip + +$_SESSION["basiclayout"] = 1; +$_SESSION["publicterminal"] = true; // Is a public customer +require 'phone.php'; diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php new file mode 100644 index 00000000000..23b033f3da5 --- /dev/null +++ b/htdocs/takepos/genimg/qr.php @@ -0,0 +1,33 @@ + + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); +if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); +if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); +if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); +if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); + +require '../../main.inc.php'; // Load $user and permissions +require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; + +$key = GETPOST('key'); + +$module = new modtcpdfbarcode($db); +$result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y'); \ No newline at end of file diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index fa5ca2f83be..f59a3b5c97d 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -47,13 +47,16 @@ $idproduct = GETPOST('idproduct', 'int'); $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant $placeid = 0; // $placeid is ID of invoice -if (empty($user->rights->takepos->run)) { +if ($_SESSION["publicterminal"]) { + $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers +} +else if (empty($user->rights->takepos->run)) { accessforbidden(); } -if ($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') +if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || $_SESSION["publicterminal"]) { // DIRECT LINK TO THIS PAGE FROM MOBILE AND NO TERMINAL SELECTED if ($_SESSION["takeposterminal"] == "") diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index b2526ef885e..224cf3dd1c3 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -37,7 +37,12 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -$place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant +if ($_SESSION["publicterminal"]){ + // Decode place if is a order from customer phone + $key = GETPOST('key'); + $place=dol_decode($key); +} +else $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant $action = GETPOST('action', 'alpha'); $setterminal = GETPOST('setterminal', 'int'); @@ -48,7 +53,10 @@ if ($setterminal > 0) $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter")); -if (empty($user->rights->takepos->run)) { +if ($_SESSION["publicterminal"]) { + $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers +} +else if (empty($user->rights->takepos->run)) { accessforbidden(); } @@ -167,6 +175,14 @@ function Exit(){ window.location.href='../user/logout.php'; } +function CheckPlease(){ + console.log("Request the check to the waiter"); + $.ajax({ + type: "GET", + url: "", + }); +} + @@ -175,10 +191,13 @@ if ($conf->global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] ?>
    - - - - + '.strtoupper(substr($langs->trans('Floors'), 0, 3)).''; + print ''; + print ''; + print ''; + if ($_SESSION["publicterminal"]) print ''; + ?>
    From 35713ef0046b22f31c848fef1ea6facbb004b712 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 3 May 2020 00:05:59 +0200 Subject: [PATCH 193/456] Fix travis --- htdocs/takepos/genimg/qr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index 23b033f3da5..f0c3bea82b9 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -30,4 +30,4 @@ require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; $key = GETPOST('key'); $module = new modtcpdfbarcode($db); -$result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y'); \ No newline at end of file +$result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y'); From ac75cf318eba8edaa0be6ed9fd7bee7f8a31f1d8 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 3 May 2020 00:07:04 +0200 Subject: [PATCH 194/456] Fix travis --- htdocs/takepos/invoice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index f59a3b5c97d..b1641072829 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -50,7 +50,7 @@ $placeid = 0; // $placeid is ID of invoice if ($_SESSION["publicterminal"]) { $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers } -else if (empty($user->rights->takepos->run)) { +elseif (empty($user->rights->takepos->run)) { accessforbidden(); } From 32923daa9decc772155f713ea5aedfa9ff7c029b Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 3 May 2020 00:07:52 +0200 Subject: [PATCH 195/456] Fix travis --- htdocs/takepos/phone.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 224cf3dd1c3..80d67513bf2 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -56,7 +56,7 @@ $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptpri if ($_SESSION["publicterminal"]) { $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers } -else if (empty($user->rights->takepos->run)) { +elseif (empty($user->rights->takepos->run)) { accessforbidden(); } From 8530db6dab7d7d8a068cac0705c47541f5062fc3 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 3 May 2020 00:09:17 +0200 Subject: [PATCH 196/456] Fix travis --- htdocs/takepos/admin/bar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index 16fccf85147..672041d3bb3 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -138,13 +138,13 @@ print ''; print ''; if ($conf->global->TAKEPOS_AUTO_ORDER) -{ +{ print '
    '; print ''; print ''; print ''; print "\n"; - + //global $dolibarr_main_url_root; $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file From fe98e430ceaa18d98a26706c7515e3d09201b86e Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 3 May 2020 00:10:12 +0200 Subject: [PATCH 197/456] Fix travis --- htdocs/core/lib/takepos.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index 729952916ad..d04fa5f77ef 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -42,7 +42,7 @@ function takepos_prepare_head() $head[$h][1] = $langs->trans("Receipt"); $head[$h][2] = 'receipt'; $h++; - + if ($conf->global->TAKEPOS_BAR_RESTAURANT) { $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/bar.php'; From e0ebe85c134bebf41e794026af59b9b475648af7 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 3 May 2020 09:15:12 +0200 Subject: [PATCH 198/456] Fix addline titles --- htdocs/core/tpl/objectline_create.tpl.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 160d323a2c2..5e99146bc53 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -813,7 +813,7 @@ if (!empty($usemargins) && $user->rights->margins->creer) jQuery("#prod_entry_mode_free").prop('checked',true).change(); jQuery("#prod_entry_mode_predef").prop('checked',false).change(); jQuery("#search_idprod, #idprod, #search_idprodfournprice, #buying_price").val(''); - jQuery("#price_ht, #multicurrency_price_ht, #price_ttc, #price_ttc, #fourn_ref, #tva_tx, #buying_price, #title_vat, #title_up_ht, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").show(); + jQuery("#price_ht, #multicurrency_price_ht, #price_ttc, #price_ttc, #fourn_ref, #tva_tx, #buying_price, #title_fourn_ref, #title_vat, #title_up_ht, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").show(); jQuery("#np_marginRate, #np_markRate, .np_marginRate, .np_markRate, #units, #title_units").show(); jQuery("#fournprice_predef").hide(); } @@ -825,11 +825,13 @@ if (!empty($usemargins) && $user->rights->margins->creer) global->MAIN_DISABLE_EDIT_PREDEF_PRICEHT)) { ?> jQuery("#price_ht").val('').show(); jQuery("#multicurrency_price_ht").val('').show(); + jQuery("#title_up_ht, #title_up_ht_currency").show(); jQuery("#price_ht").val('').hide(); jQuery("#multicurrency_price_ht").val('').hide(); + jQuery("#title_up_ht, #title_up_ht_currency").hide(); - jQuery("#price_ttc, #fourn_ref, #tva_tx, #title_vat, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").hide(); + jQuery("#price_ttc, #fourn_ref, #tva_tx, #title_fourn_ref, #title_vat, #title_up_ttc, #title_up_ttc_currency").hide(); jQuery("#np_marginRate, #np_markRate, .np_marginRate, .np_markRate, #units, #title_units").hide(); jQuery("#buying_price").show(); jQuery('#trlinefordates, .divlinefordates').show(); From c3521502deff79b1ca166a51aca9552b13708fcf Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 10:34:56 +0200 Subject: [PATCH 199/456] Update global.inc.php --- htdocs/theme/eldy/global.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 7b8e1373df9..786bdbd431b 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3360,7 +3360,7 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { text-shadow: none !important; - color: unset; + color: rgb(); } tr.liste_titre_topborder td { border-top-width: px; From 87d86f32ee28ca4012a7a977fd4fdd17872b69a5 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 10:40:52 +0200 Subject: [PATCH 200/456] Update usergroups.lib.php --- htdocs/core/lib/usergroups.lib.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 5b7c923001b..003d1260252 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -732,7 +732,34 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; } + + // TextTitleLinkColor + if ($foruserprofile) + { + } + else + { + $default=(empty($colortexttitlelink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlelink))); + print ''; + print ''; + print ''; + + print ''; + } + // BackgroundTableLineOddColor if ($foruserprofile) { From 5c1eb08b3fdbb6fcfa72203d90d58d7795781758 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 3 May 2020 08:42:45 +0000 Subject: [PATCH 201/456] Fixing style errors. --- htdocs/core/lib/usergroups.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 003d1260252..8be3e234273 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -732,7 +732,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; } - + // TextTitleLinkColor if ($foruserprofile) { @@ -759,7 +759,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; } - + // BackgroundTableLineOddColor if ($foruserprofile) { From f299f0f849d7a745cabcfdcc8d8b41347f59dbee Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 10:42:49 +0200 Subject: [PATCH 202/456] Update theme_vars.inc.php --- htdocs/theme/eldy/theme_vars.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index f6324f0146f..823b8168b4c 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -69,6 +69,7 @@ $colorbacklinebreak = '233,228,230'; // line break $colorbackbody = '255,255,255'; $colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120 $colortexttitle = '0,0,0'; +$colortexttitlelink = '10, 20, 100'; $colortext = '0,0,0'; $colortextlink = '10, 20, 100'; $fontsize = '0.86em'; From 2f18b444d7946335604dfd2cd19a831540a2fd37 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 10:44:37 +0200 Subject: [PATCH 203/456] Update style.css.php --- htdocs/theme/eldy/style.css.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 39fcd003335..927d29e1919 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -128,6 +128,7 @@ $colorbacklinebreak = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp $colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY); $colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB); $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE); +$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK); $colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT); $colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortextlink : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK); $fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1); From 44bafb7225555aff485d418b6440ee01a82f694a Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 10:46:48 +0200 Subject: [PATCH 204/456] Update ihm.php --- htdocs/admin/ihm.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index ab67974c920..c83dd83a9c9 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -121,6 +121,10 @@ if ($action == 'update') $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity); + + $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array())))); + if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity); + else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity); $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity); From 30cb4f0151133291de49b144a2c511a85a3c4bf7 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 10:48:16 +0200 Subject: [PATCH 205/456] Update admin.lang --- htdocs/langs/en_US/admin.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 58e5cecf39d..bb1b56d4465 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1803,6 +1803,7 @@ TopMenuDisableImages=Hide images in Top menu LeftMenuBackgroundColor=Background color for Left menu BackgroundTableTitleColor=Background color for Table title line BackgroundTableTitleTextColor=Text color for Table title line +BackgroundTableTitleTextlinkColor=Text color for Table title link line BackgroundTableLineOddColor=Background color for odd table lines BackgroundTableLineEvenColor=Background color for even table lines MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay) From fdb98dd6ed66396087a139c508310b01a7be5a5f Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 10:49:57 +0200 Subject: [PATCH 206/456] Update admin.lang --- htdocs/langs/fr_FR/admin.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 6363b8b710d..6545b71ede3 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1803,6 +1803,7 @@ TopMenuDisableImages=Cacher les images du menu principal LeftMenuBackgroundColor=Couleur de fond pour le menu Gauche BackgroundTableTitleColor=Couleur de fond pour la ligne de titres des liste/tableaux BackgroundTableTitleTextColor=Couleur du texte pour la ligne de titre des tableaux +BackgroundTableTitleTextlinkColor=Couleur du texte pour la ligne de titre lien des tableaux BackgroundTableLineOddColor=Couleur de fond pour les lignes impaires des tables BackgroundTableLineEvenColor=Couleur de fond pour les lignes paires des tales MinimumNoticePeriod=Période de préavis minimum (Votre demande de congé doit être faite avant ce délai) From ef3f121c88a926d7b02a780bceb587bf67abafdf Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 3 May 2020 08:51:50 +0000 Subject: [PATCH 207/456] Fixing style errors. --- htdocs/admin/ihm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index c83dd83a9c9..ba849a267e7 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -121,7 +121,7 @@ if ($action == 'update') $val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity); - + $val=(implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array())))); if ($val == '') dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity); else dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity); From fcee3a68f488d337e2d4295658faed84796010c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 May 2020 13:00:39 +0200 Subject: [PATCH 208/456] Fix sort on file manager of website --- htdocs/theme/eldy/global.inc.php | 5 +++-- htdocs/website/index.php | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index c559fcec9ad..28fa0ecfa65 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1132,6 +1132,9 @@ table[summary="list_of_modules"] .fa-cog { padding-left: 5px; padding-right: 5px; } + + .hideonsmartphone { display: none; } + .hideonsmartphoneimp { display: none !important; } } /* Force values for small screen 570 */ @@ -1189,8 +1192,6 @@ table[summary="list_of_modules"] .fa-cog { max-width: 138px; /* length of input text in the quick search box when using a smartphone and without dolidroid */ } - .hideonsmartphone { display: none; } - .hideonsmartphoneimp { display: none !important; } .noenlargeonsmartphone { width : 50px !important; display: inline !important; } .maxwidthonsmartphone, #search_newcompany.ui-autocomplete-input { max-width: 100px; } .maxwidth50onsmartphone { max-width: 40px; } diff --git a/htdocs/website/index.php b/htdocs/website/index.php index a617d9ae018..ebfbc7a2ac3 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -271,7 +271,11 @@ if (GETPOST('optioncontent')) $algo .= 'content'; if (GETPOST('optionsitefiles')) $algo .= 'sitefiles'; if (empty($sortfield)) { - $sortfield = 'pageurl'; $sortorder = 'ASC'; + if ($action == 'file_manager') { + $sortfield='name'; $sortorder = 'ASC'; + } else { + $sortfield = 'pageurl'; $sortorder = 'ASC'; + } } $searchkey = GETPOST('searchstring', 'none'); From a31eaf2eb813fe7ef1b04b940d756b8176018a40 Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 13:59:40 +0200 Subject: [PATCH 209/456] Update style.css.php --- htdocs/theme/md/style.css.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index dcc9ce34886..5c3de3d7612 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -130,6 +130,7 @@ $colorbacklinebreak = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (emp $colorbackbody = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_BACKBODY) ? $colorbackbody : $conf->global->THEME_ELDY_BACKBODY) : (empty($user->conf->THEME_ELDY_BACKBODY) ? $colorbackbody : $user->conf->THEME_ELDY_BACKBODY); $colortexttitlenotab = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $conf->global->THEME_ELDY_TEXTTITLENOTAB) : (empty($user->conf->THEME_ELDY_TEXTTITLENOTAB) ? $colortexttitlenotab : $user->conf->THEME_ELDY_TEXTTITLENOTAB); $colortexttitle = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLE) ? $colortext : $conf->global->THEME_ELDY_TEXTTITLE) : (empty($user->conf->THEME_ELDY_TEXTTITLE) ? $colortexttitle : $user->conf->THEME_ELDY_TEXTTITLE); +$colortexttitlelink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $conf->global->THEME_ELDY_TEXTTITLELINK) : (empty($user->conf->THEME_ELDY_TEXTTITLELINK) ? $colortexttitlelink : $user->conf->THEME_ELDY_TEXTTITLELINK); $colortext = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXT) ? $colortext : $conf->global->THEME_ELDY_TEXT) : (empty($user->conf->THEME_ELDY_TEXT) ? $colortext : $user->conf->THEME_ELDY_TEXT); $colortextlink = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_TEXTLINK) ? $colortext : $conf->global->THEME_ELDY_TEXTLINK) : (empty($user->conf->THEME_ELDY_TEXTLINK) ? $colortextlink : $user->conf->THEME_ELDY_TEXTLINK); $fontsize = empty($user->conf->THEME_ELDY_ENABLE_PERSONALIZED) ? (empty($conf->global->THEME_ELDY_FONT_SIZE1) ? $fontsize : $conf->global->THEME_ELDY_FONT_SIZE1) : (empty($user->conf->THEME_ELDY_FONT_SIZE1) ? $fontsize : $user->conf->THEME_ELDY_FONT_SIZE1); From dabb2f4ad39e26438d8e528a78124a4eb4f2b41c Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 14:01:42 +0200 Subject: [PATCH 210/456] Update theme_vars.inc.php --- htdocs/theme/md/theme_vars.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php index d15444acb6c..6cdd37fe913 100644 --- a/htdocs/theme/md/theme_vars.inc.php +++ b/htdocs/theme/md/theme_vars.inc.php @@ -65,6 +65,7 @@ $colorbacklinebreak = '214,218,220'; $colorbackbody = '248,248,248'; $colortexttitlenotab = '80,71,5'; $colortexttitle = '20,20,20'; +$colortexttitlelink = '0,0,120'; $colortext = '0,0,0'; $colortextlink = '0,0,120'; $fontsize = '14'; From d81ae29ab7723262a705e20cdf5af5ae3588ae2c Mon Sep 17 00:00:00 2001 From: Anthony Berton <34568357+bb2a@users.noreply.github.com> Date: Sun, 3 May 2020 14:05:18 +0200 Subject: [PATCH 211/456] Update style.css.php --- htdocs/theme/md/style.css.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 5c3de3d7612..2becbf57324 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3399,6 +3399,7 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste } tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a { text-shadow: none !important; + color: rgb(); } tr.liste_titre_topborder td { border-top-width: px; From 77cf9fb569ad67aac1df9c2180656f1b396dcd55 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 May 2020 14:28:23 +0200 Subject: [PATCH 212/456] Add .dolibarr file into CMS --- htdocs/website/class/website.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 2691dd9ebfd..6455b7538e0 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -249,6 +249,12 @@ class Website extends CommonObject // } } + if (! $error) { + $stringtodolibarrfile = "# Some properties for Dolibarr web site CMS\n"; + $stringtodolibarrfile .= "noclone=dir_list_to_exclude_when_cloning_separated_with_comma\n"; + file_put_contents('.dolibarr', $stringtodolibarrfile); + } + // Commit or rollback if ($error) { $this->db->rollback(); From da91a857a5fe7566a51236e94e294f8bff43a84f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 May 2020 14:49:06 +0200 Subject: [PATCH 213/456] Fix pb of lang subdir in cloning website --- htdocs/core/lib/files.lib.php | 9 ++++++--- htdocs/website/class/website.class.php | 7 ++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index bad0bf9f48c..941cb03d6c4 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -720,10 +720,11 @@ function dol_copy($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1) * @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666' * @param int $overwriteifexists Overwrite file if exists (1 by default) * @param array $arrayreplacement Array to use to replace filenames with another one during the copy (works only on file names, not on directory names). + * @param int $excludesubdir 0=Do not exclude subdirectories, 1=Exclude subdirectories, 2=Exclude subdirectories if name is not a 2 chars (used for country codes subdirectories). * @return int <0 if error, 0 if nothing done (all files already exists and overwriteifexists=0), >0 if OK * @see dol_copy() */ -function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null) +function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayreplacement = null, $excludesubdir = 0) { global $conf; @@ -759,8 +760,10 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep { if (is_dir($ossrcfile."/".$file)) { - //var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists"); - $tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$file, $newmask, $overwriteifexists, $arrayreplacement); + if (empty($excludesubdir) || ($excludesubdir == 2 && strlen($file) == 2)) { + //var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists"); + $tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$file, $newmask, $overwriteifexists, $arrayreplacement, $excludesubdir); + } } else { diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 6455b7538e0..4edd2367758 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -251,8 +251,9 @@ class Website extends CommonObject if (! $error) { $stringtodolibarrfile = "# Some properties for Dolibarr web site CMS\n"; - $stringtodolibarrfile .= "noclone=dir_list_to_exclude_when_cloning_separated_with_comma\n"; - file_put_contents('.dolibarr', $stringtodolibarrfile); + $stringtodolibarrfile .= "param=value\n"; + //print $conf->website->dir_output.'/'.$this->ref.'/.dolibarr';exit; + file_put_contents($conf->website->dir_output.'/'.$this->ref.'/.dolibarr', $stringtodolibarrfile); } // Commit or rollback @@ -674,7 +675,7 @@ class Website extends CommonObject if (!$error) { - dolCopyDir($pathofwebsiteold, $pathofwebsitenew, $conf->global->MAIN_UMASK, 0); + dolCopyDir($pathofwebsiteold, $pathofwebsitenew, $conf->global->MAIN_UMASK, 0, null, 2); // Check symlink to medias and restore it if ko $pathtomedias = DOL_DATA_ROOT.'/medias'; // Target From d27ccb02333dfdf9513de33f24d3f478df9a952a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 May 2020 14:58:53 +0200 Subject: [PATCH 214/456] Fix pb of lang subdir in exporting website --- htdocs/website/class/website.class.php | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 4edd2367758..be91f6640a1 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -934,30 +934,34 @@ class Website extends CommonObject $arrayreplacementincss['file=logos%2Fthumbs%2F'.$mysoc->logo] = "file=logos%2Fthumbs%2F__LOGO_KEY__"; } + // Create output directories + dol_syslog("Create containers dir"); + dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/containers'); + dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/medias/image/websitekey'); + dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/medias/js/websitekey'); + + // Copy files into 'containers' $srcdir = $conf->website->dir_output.'/'.$website->ref; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/containers'; - // Create containers dir - dol_syslog("Create containers dir"); - dol_mkdir($conf->website->dir_temp.'/'.$website->ref.'/containers'); - - // Copy files into medias dol_syslog("Copy content from ".$srcdir." into ".$destdir); - dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); + dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename, 2); + // Copy files into medias/image $srcdir = DOL_DATA_ROOT.'/medias/image/'.$website->ref; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/image/websitekey'; dol_syslog("Copy content from ".$srcdir." into ".$destdir); dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); + // Copy files into medias/js $srcdir = DOL_DATA_ROOT.'/medias/js/'.$website->ref; $destdir = $conf->website->dir_temp.'/'.$website->ref.'/medias/js/websitekey'; - // Copy containers files dol_syslog("Copy content from ".$srcdir." into ".$destdir); dolCopyDir($srcdir, $destdir, 0, 1, $arrayreplacementinfilename); + // Make some replacement into some files $cssindestdir = $conf->website->dir_temp.'/'.$website->ref.'/containers/styles.css.php'; dolReplaceInFile($cssindestdir, $arrayreplacementincss); From f42492764d9a6e8821cf6938025c68426dadf3dc Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Sun, 3 May 2020 17:16:25 +0200 Subject: [PATCH 215/456] Update html.formproduct.class.php DEFAULT_WAREHOUSE is not select in sherch --- htdocs/product/class/html.formproduct.class.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index efde996b927..d6ae705b651 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -253,10 +253,12 @@ class FormProduct $comboenhancement = ajax_combobox($htmlname, $events); $out .= $comboenhancement; } - - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; - + + if ($htmlname != 'search_warehouse'){ + if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; + if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; + } + $out .= ''; if ($empty) $out .= ''; foreach ($this->cache_warehouses as $id => $arraytypes) From 33669b6fd8e2300c64e3a6abec008309915739a6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 May 2020 21:15:23 +0200 Subject: [PATCH 217/456] Update html.formproduct.class.php --- htdocs/product/class/html.formproduct.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 4887f749d60..0eeddd15c07 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -254,7 +254,7 @@ class FormProduct $out .= $comboenhancement; } - if ($htmlname != 'search_warehouse'){ + if (strpos($htmlname, 'search_') !== 0) { if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; } From 2eb027833c644a2e946f286f38bad9703c1bf642 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 May 2020 21:25:49 +0200 Subject: [PATCH 218/456] Update card.php --- htdocs/contrat/card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 111a446d9ae..e898ef9e8f4 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -523,6 +523,7 @@ if (empty($reshook)) $desc = $prod->description; if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc = $product_desc; else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); + $fk_unit = $prod->fk_unit; } else From ab20b5cb616f1e10add360171fd6e84a652072c9 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 3 May 2020 19:26:35 +0000 Subject: [PATCH 219/456] Fixing style errors. --- htdocs/contrat/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index e898ef9e8f4..21d46fb2974 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -523,7 +523,7 @@ if (empty($reshook)) $desc = $prod->description; if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) $desc = $product_desc; else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); - + $fk_unit = $prod->fk_unit; } else From 4d6a45d491d3ad303cb6b060053303a44d216f6a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 3 May 2020 22:47:43 +0200 Subject: [PATCH 220/456] Major doxygen fix --- dev/setup/codesniffer/ruleset.xml | 62 +++------ htdocs/bom/class/bom.class.php | 1 - htdocs/core/class/html.formcategory.class.php | 4 + htdocs/core/class/html.formcompany.class.php | 4 + .../core/filemanagerdol/connectors/php/io.php | 31 ++++- .../modules/product/modules_product.class.php | 4 +- htdocs/ecm/class/ecmfiles.class.php | 4 +- htdocs/install/upgrade2.php | 11 +- .../template/class/myobject.class.php | 2 +- htdocs/mrp/class/mo.class.php | 2 +- htdocs/product/class/product.class.php | 16 +-- htdocs/product/index.php | 7 +- htdocs/public/stripe/confirm_payment.php | 4 +- htdocs/resource/class/dolresource.class.php | 6 +- htdocs/ticket/class/utils_diff.class.php | 125 ++++++++---------- htdocs/webservices/server_other.php | 7 +- htdocs/zapier/class/hook.class.php | 1 - test/phpunit/AccountingAccountTest.php | 12 +- test/phpunit/ActionCommTest.php | 12 +- test/phpunit/AdherentTest.php | 12 +- test/phpunit/AdminLibTest.php | 12 +- test/phpunit/BOMTest.php | 12 +- test/phpunit/BankAccountTest.php | 12 +- test/phpunit/BuildDocTest.php | 12 +- test/phpunit/CMailFileTest.php | 12 +- test/phpunit/CategorieTest.php | 12 +- test/phpunit/ChargeSocialesTest.php | 12 +- test/phpunit/CodingPhpTest.php | 12 +- test/phpunit/CodingSqlTest.php | 12 +- test/phpunit/CommandeFournisseurTest.php | 12 +- test/phpunit/CommandeTest.php | 12 +- test/phpunit/CommonInvoiceTest.php | 12 +- test/phpunit/CommonObjectTest.php | 12 +- test/phpunit/CompanyBankAccountTest.php | 12 +- test/phpunit/CompanyLibTest.php | 12 +- test/phpunit/ContactTest.php | 12 +- test/phpunit/ContratTest.php | 12 +- test/phpunit/CoreTest.php | 12 +- test/phpunit/DateLibTest.php | 12 +- test/phpunit/DateLibTzFranceTest.php | 12 +- test/phpunit/DiscountTest.php | 12 +- test/phpunit/EntrepotTest.php | 12 +- test/phpunit/ExpenseReportTest.php | 12 +- test/phpunit/ExportTest.php | 12 +- test/phpunit/FactureFournisseurTest.php | 12 +- test/phpunit/FactureRecTest.php | 12 +- test/phpunit/FactureTest.php | 12 +- test/phpunit/FactureTestRounding.php | 12 +- test/phpunit/FichinterTest.php | 12 +- test/phpunit/FilesLibTest.php | 12 +- test/phpunit/FormAdminTest.php | 12 +- test/phpunit/FormTest.php | 12 +- test/phpunit/Functions2LibTest.php | 12 +- test/phpunit/FunctionsLibTest.php | 12 +- test/phpunit/GetUrlLibTest.php | 12 +- test/phpunit/HolidayTest.php | 12 +- test/phpunit/ImagesLibTest.php | 12 +- test/phpunit/ImportTest.php | 12 +- test/phpunit/JsonLibTest.php | 12 +- test/phpunit/LangTest.php | 12 +- test/phpunit/LesscTest.php | 12 +- test/phpunit/LoanTest.php | 12 +- test/phpunit/MarginsLibTest.php | 12 +- test/phpunit/ModulesTest.php | 12 +- test/phpunit/MouvementStockTest.php | 12 +- test/phpunit/NumberingModulesTest.php | 12 +- test/phpunit/PaypalTest.php | 12 +- test/phpunit/PdfDocTest.php | 12 +- test/phpunit/PgsqlTest.php | 12 +- test/phpunit/PricesTest.php | 12 +- test/phpunit/ProductTest.php | 13 +- test/phpunit/ProjectTest.php | 12 +- test/phpunit/PropalTest.php | 12 +- test/phpunit/RestAPIDocumentTest.php | 12 +- test/phpunit/RestAPIUserTest.php | 12 +- test/phpunit/ScriptsTest.php | 12 +- test/phpunit/SecurityTest.php | 12 +- test/phpunit/SocieteTest.php | 12 +- test/phpunit/SupplierProposalTest.php | 12 +- test/phpunit/TicketTest.php | 12 +- test/phpunit/UserGroupTest.php | 12 +- test/phpunit/UserTest.php | 12 +- test/phpunit/UtilsTest.php | 12 +- test/phpunit/WebservicesOrdersTest.php | 12 +- test/phpunit/WebservicesOtherTest.php | 12 +- test/phpunit/WebservicesProductsTest.php | 13 +- test/phpunit/WebservicesThirdpartyTest.php | 12 +- test/phpunit/WebservicesUserTest.php | 12 +- test/phpunit/XCalLibTest.php | 12 +- 89 files changed, 871 insertions(+), 286 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 421acfeed1f..ad26c7f0bdc 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -187,6 +187,13 @@ + + + + + @@ -222,23 +229,16 @@ + - - - - - - 0 - + - - 0 - + 0 @@ -247,67 +247,38 @@ 0 - 0 - 0 - 0 - - - - - - 5 - - - - + 0 - 0 - - - - 0 - + - 0 + + + + 0 @@ -344,6 +315,7 @@ 0 + 0 diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index a9ed7ee3a00..c2c18dae6e5 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -979,7 +979,6 @@ class BOM extends CommonObject * * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - //public function doScheduledJob($param1, $param2, ...) public function doScheduledJob() { global $conf, $langs; diff --git a/htdocs/core/class/html.formcategory.class.php b/htdocs/core/class/html.formcategory.class.php index 4dd8bed247b..41e39cc93a2 100644 --- a/htdocs/core/class/html.formcategory.class.php +++ b/htdocs/core/class/html.formcategory.class.php @@ -23,6 +23,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + +/** + * Class to manage forms for categories + */ class FormCategory extends Form { /** diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 5f32f5063d6..6fb02454311 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -32,6 +32,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + +/** + * Class of forms component to manage companies + */ class FormCompany extends Form { diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php index 68aa46ef9fb..2a9ac9f146b 100644 --- a/htdocs/core/filemanagerdol/connectors/php/io.php +++ b/htdocs/core/filemanagerdol/connectors/php/io.php @@ -236,8 +236,11 @@ function GetRootPath() return substr($sRealPath, 0, $position); } -// Emulate the asp Server.mapPath function. -// given an url path return the physical directory that it corresponds to +/** + * Emulate the asp Server.mapPath function. + * @param string $path given an url path return the physical directory that it corresponds to + * @return string Path + */ function Server_MapPath($path) { // This function is available only for Apache @@ -338,7 +341,12 @@ function GetCurrentFolder() return $sCurrentFolder; } -// Do a cleanup of the folder name to avoid possible problems +/** + * Do a cleanup of the folder name to avoid possible problems + * + * @param string $sNewFolderName Folder + * @return string Folder sanitized + */ function SanitizeFolderName($sNewFolderName) { $sNewFolderName = stripslashes($sNewFolderName); @@ -349,7 +357,12 @@ function SanitizeFolderName($sNewFolderName) return $sNewFolderName; } -// Do a cleanup of the file name to avoid possible problems +/** + * Do a cleanup of the file name to avoid possible problems + * + * @param string $sNewFileName Folder + * @return string Folder sanitized + */ function SanitizeFileName($sNewFileName) { global $Config; @@ -366,7 +379,15 @@ function SanitizeFileName($sNewFileName) return $sNewFileName; } -// This is the function that sends the results of the uploading process. +/** + * This is the function that sends the results of the uploading process. + * + * @param string $errorNumber errorNumber + * @param string $fileUrl fileUrl + * @param string $fileName fileName + * @param string $customMsg customMsg + * @return void + */ function SendUploadResults($errorNumber, $fileUrl = '', $fileName = '', $customMsg = '') { // Minified version of the document.domain automatic fix script (#1919). diff --git a/htdocs/core/modules/product/modules_product.class.php b/htdocs/core/modules/product/modules_product.class.php index 5031b4079e4..80bc9f7ce0a 100644 --- a/htdocs/core/modules/product/modules_product.class.php +++ b/htdocs/core/modules/product/modules_product.class.php @@ -61,6 +61,9 @@ abstract class ModelePDFProduct extends CommonDocGenerator } } +/** + * Class template for classes of numbering product + */ abstract class ModeleProductCode { /** @@ -97,7 +100,6 @@ abstract class ModeleProductCode */ public function getExample($langs) { - $langs->load("bills"); return $langs->trans("NoExample"); } diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 0c7c4c4cebb..6921b8aabd6 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -772,7 +772,6 @@ class EcmFiles extends CommonObject if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips $result = ''; - $companylink = ''; $label = ''.$langs->trans("MyModule").''; $label .= '
    '; @@ -867,6 +866,9 @@ class EcmFiles extends CommonObject } +/** + * Class of an index line of a document + */ class EcmfilesLine { /** diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 0fb36466a02..765a8796a76 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -1,4 +1,6 @@ * Copyright (C) 2005-2018 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin @@ -1185,8 +1187,13 @@ function migrate_contracts_date1($db, $langs, $conf) print ''; } -/* - * Mise a jour date contrat avec date min effective mise en service si inferieur +/** + * Update contracts with date min real if service date is lower + * + * @param DoliDB $db Database handler + * @param Translate $langs Language + * @param Conf $conf Conf + * @return void */ function migrate_contracts_date2($db, $langs, $conf) { diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index af707c3c87d..fad19564fdc 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -1047,10 +1047,10 @@ class MyObject extends CommonObject /** * Action executed by scheduler * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' + * Use public function doScheduledJob($param1, $param2, ...) to get parameters * * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - //public function doScheduledJob($param1, $param2, ...) public function doScheduledJob() { global $conf, $langs; diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 65ba9597b8a..42d97ee81d9 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1226,10 +1226,10 @@ class Mo extends CommonObject /** * Action executed by scheduler * CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters' + * Use public function doScheduledJob($param1, $param2, ...) to get parameters * * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - //public function doScheduledJob($param1, $param2, ...) public function doScheduledJob() { global $conf, $langs; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 0db9a411b19..2499ee958de 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1443,14 +1443,14 @@ class Product extends CommonObject } } - /* - * Sets an accountancy code for a product. - * Also calls PRODUCT_MODIFY trigger when modified - * - * @param string $type It can be 'buy', 'buy_intra', 'buy_export', 'sell', 'sell_intra' or 'sell_export' - * @param string $value Accountancy code - * @return int <0 KO >0 OK - */ + /** + * Sets an accountancy code for a product. + * Also calls PRODUCT_MODIFY trigger when modified + * + * @param string $type It can be 'buy', 'buy_intra', 'buy_export', 'sell', 'sell_intra' or 'sell_export' + * @param string $value Accountancy code + * @return int <0 KO >0 OK + */ public function setAccountancyCode($type, $value) { global $user, $langs, $conf; diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 4d0f2e220b7..3067cc63733 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -101,7 +101,7 @@ if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useles foreach ($listofsearchfields as $key => $value) { if ($i == 0) print '
    '; - print ''; + print ''; print ''; if ($i == 0) print ''; print ''; @@ -201,7 +201,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA print '
    '; print '
    '.$langs->trans("Table").''.$langs->trans("URL").''.$langs->trans("QR").'
    '.$langs->trans("BackgroundTableTitleTextlinkColor").''; + if ($edit) + { + print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', 'formcolor', 1).' '; + } + else + { + print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default")); + } + print '   ('.$langs->trans("Default").': '.$default.') '; + print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); + print ''; + print '
    '.$langs->trans("Search").'
    '; print ''; - print ''; } diff --git a/htdocs/takepos/auto_order.php b/htdocs/takepos/public/auto_order.php similarity index 83% rename from htdocs/takepos/auto_order.php rename to htdocs/takepos/public/auto_order.php index 5305b4da81f..c97edfdc0e7 100644 --- a/htdocs/takepos/auto_order.php +++ b/htdocs/takepos/public/auto_order.php @@ -16,14 +16,14 @@ */ /** - * \file htdocs/takepos/auto_order.php + * \file htdocs/takepos/public/auto_order.php * \ingroup takepos * \brief Public orders for customers */ if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) -if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip $_SESSION["basiclayout"] = 1; $_SESSION["publicterminal"] = true; // Is a public customer -require 'phone.php'; +require '../phone.php'; From abd37c78f92dbd968982700e574348d1d853638c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 17:07:18 +0200 Subject: [PATCH 226/456] Fix responsive --- htdocs/contrat/index.php | 8 ++++---- htdocs/contrat/list.php | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 1f3a9fa5b99..2a7c9c0d91a 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -360,7 +360,7 @@ if ($result) $obj = $db->fetch_object($result); print ''; - print ''; - print ''; - print ''; - print ''; + + // Ref if (!empty($arrayfields['c.ref']['checked'])) { - print ''; } + if (!empty($arrayfields['c.ref_customer']['checked'])) { print ''; From 821e11ca3c0ba8bc15690835cb25aac56dd917bd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 17:13:31 +0200 Subject: [PATCH 227/456] Look and feel v12 --- htdocs/core/ajax/selectsearchbox.php | 4 ++-- htdocs/langs/en_US/main.lang | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index cd019b9ce38..2f8ad4ab5f7 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -56,7 +56,7 @@ $arrayresult = array(); if (!empty($conf->adherent->enabled) && empty($conf->global->MAIN_SEARCHFORM_ADHERENT_DISABLED) && $user->rights->adherent->lire) { - $arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_user', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_user').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintomember'] = array('position'=>8, 'shortcut'=>'M', 'img'=>'object_member', 'label'=>$langs->trans("SearchIntoMembers", $search_boxvalue), 'text'=>img_picto('', 'object_member').' '.$langs->trans("SearchIntoMembers", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/adherents/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (((!empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || !empty($conf->fournisseur->enabled)) && empty($conf->global->MAIN_SEARCHFORM_SOCIETE_DISABLED) && $user->rights->societe->lire) @@ -86,7 +86,7 @@ if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJE } if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire) { - $arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_task', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_task').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintotasks'] = array('position'=>45, 'img'=>'object_projecttask', 'label'=>$langs->trans("SearchIntoTasks", $search_boxvalue), 'text'=>img_picto('', 'object_projecttask').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if (!empty($conf->propal->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_PROPAL_DISABLED) && $user->rights->propal->lire) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 38a4bcd2bad..fb0808e0953 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -959,7 +959,7 @@ SearchIntoCustomerInvoices=Customer invoices SearchIntoSupplierInvoices=Vendor invoices SearchIntoCustomerOrders=Sales orders SearchIntoSupplierOrders=Purchase orders -SearchIntoCustomerProposals=Customer proposals +SearchIntoCustomerProposals=Commercial proposals SearchIntoSupplierProposals=Vendor proposals SearchIntoInterventions=Interventions SearchIntoContracts=Contracts From 6d894b7abd3bd0c7e47a4e98b817b9d954ca0f1b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 19:08:31 +0200 Subject: [PATCH 228/456] Fix missing link in message --- htdocs/core/class/notify.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index db0e490a6c6..6c0ec1ec62b 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -528,7 +528,7 @@ class Notify $message.= $outputlangs->transnoentities("YouReceiveMailBecauseOfNotification2", $application, $mysoc->name)."\n"; $message.= "\n"; $message.= $mesg; - if ($link) $message.= "\n" . $urlwithroot . $link; + if ($link) $message.= "\n" . $urlwithroot . $link; // if link is already added around the ref into the translation text, then $link must be set to '' $parameters = array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list); if (!isset($action)) $action = ''; @@ -600,6 +600,7 @@ class Notify { foreach($conf->global as $key => $val) { + $reg = array(); if ($val == '' || ! preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifcode.'_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue; $threshold = (float) $reg[1]; @@ -743,7 +744,7 @@ class Notify $message.= $langs->transnoentities("YouReceiveMailBecauseOfNotification2", $application, $mysoc->name)."\n"; $message.= "\n"; $message.= $mesg; - //if ($link) $message.= "\n" . $urlwithroot . $link; // link already added around the ref into the text + if ($link) $message.= "\n" . $urlwithroot . $link; // if link is already added around the ref into the translation text, then $link must be set to '' $message = nl2br($message); From 5e4ef9266ee33bf3df042ed09091e98937686186 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 20:30:02 +0200 Subject: [PATCH 229/456] Fix update template to use for notifications --- htdocs/admin/notification.php | 101 +++++++++++++++++++++++++++------- htdocs/core/lib/admin.lib.php | 10 +++- 2 files changed, 88 insertions(+), 23 deletions(-) diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 97b09861a42..ba92aa1ec21 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -34,10 +34,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Noti $langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails')); // Security check -if (!$user->admin) - accessforbidden(); +if (!$user->admin) { + accessforbidden(); +} $action = GETPOST('action', 'aZ09'); +$error = 0; /* @@ -45,27 +47,48 @@ $action = GETPOST('action', 'aZ09'); */ // Action to update or add a constant -if ($action == 'update' || $action == 'add') +if ($action == 'settemplates') { - $constlineid = GETPOST('rowid', 'int'); - $constname = GETPOST('constname', 'alpha'); + $db->begin(); - $constvalue = (GETPOSTISSET('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname, 'alpha') : GETPOST('constvalue')); - $consttype = (GETPOSTISSET('consttype_'.$constname) ? GETPOST('consttype_'.$constname, 'alphanohtml') : GETPOST('consttype')); - $constnote = (GETPOSTISSET('constnote_'.$constname) ? GETPOST('constnote_'.$constname, 'none') : GETPOST('constnote')); + if (!$error && is_array($_POST)) + { + $reg = array(); + foreach ($_POST as $key => $val) + { + if (!preg_match('/^constvalue_(.*)_TEMPLATE/', $key, $reg)) continue; - $typetouse = empty($oldtypetonewone[$consttype]) ? $consttype : $oldtypetonewone[$consttype]; + $triggername = $reg[1]; + $constvalue = GETPOST($key, 'alpha'); + $consttype = 'emailtemplate:xxx'; + $tmparray=explode(':', $constvalue); + if (! empty($tmparray[0]) && ! empty($tmparray[1])) { + $constvalue = $tmparray[0]; + $consttype = 'emailtemplate:'.$tmparray[1]; + //var_dump($constvalue); + //var_dump($consttype); + $res = dolibarr_set_const($db, $triggername.'_TEMPLATE', $constvalue, $consttype, 0, '', $conf->entity); + if ($res < 0) { + $error++; + break; + } + } else { + $res = dolibarr_del_const($db, $triggername.'_TEMPLATE', $conf->entity); + } + } + } - $res = dolibarr_set_const($db, $constname, $constvalue, $typetouse, 0, $constnote, $conf->entity); - - if (!$res > 0) $error++; if (!$error) { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); } else { + $db->rollback(); + setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -74,12 +97,31 @@ if ($action == 'setvalue' && $user->admin) { $db->begin(); - $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", $_POST["email_from"], 'chaine', 0, '', $conf->entity); + $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "none"), 'chaine', 0, '', $conf->entity); if ($result < 0) $error++; + + if (!$error) + { + $db->commit(); + + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + $db->rollback(); + + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + + +if ($action == 'setfixednotif' && $user->admin) +{ + $db->begin(); + if (!$error && is_array($_POST)) { - //var_dump($_POST); $reg = array(); foreach ($_POST as $key => $val) { @@ -101,7 +143,7 @@ if ($action == 'setvalue' && $user->admin) } elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) { - // Add a new entry + // Add a new entry $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount')); $newval = GETPOST($shortkey.'_key'); } @@ -168,9 +210,18 @@ print ''; print ''; print '
    '.$langs->trans("Categories").'
    '; + print '
    '; $sql = "SELECT c.label, count(*) as nb"; $sql .= " FROM ".MAIN_DB_PREFIX."categorie_product as cs"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid"; @@ -413,7 +413,7 @@ llxFooter(); $db->close(); -/* +/** * Print html activity for product type * * @param int $product_type Type of product @@ -422,7 +422,6 @@ $db->close(); function activitytrim($product_type) { global $conf, $langs, $db; - global $bc; // We display the last 3 years $yearofbegindate = date('Y', dol_time_plus_duree(time(), -3, "y")); diff --git a/htdocs/public/stripe/confirm_payment.php b/htdocs/public/stripe/confirm_payment.php index 25cb358ccea..9a45a2cbeec 100644 --- a/htdocs/public/stripe/confirm_payment.php +++ b/htdocs/public/stripe/confirm_payment.php @@ -129,8 +129,8 @@ try { )); } -/* - * generate payment response +/** + * Generate payment response * * @param \Stripe\PaymentIntent $intent PaymentIntent * @return void diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index 4cda97b39d1..1b4223e1fff 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -871,10 +871,12 @@ class Dolresource extends CommonObject return $resources; } - /* + /** * Return an int number of resources linked to the element * - * @return int + * @param string $element Element type + * @param int $element_id Element id + * @return int Nb of resources loaded */ public function fetchElementResources($element, $element_id) { diff --git a/htdocs/ticket/class/utils_diff.class.php b/htdocs/ticket/class/utils_diff.class.php index 03dff5506b4..84075d395ab 100644 --- a/htdocs/ticket/class/utils_diff.class.php +++ b/htdocs/ticket/class/utils_diff.class.php @@ -20,24 +20,21 @@ class Diff const DELETED = 1; const INSERTED = 2; - /* Returns the diff for two strings. The return value is an array, each of + /** + * Returns the diff for two strings. The return value is an array, each of * whose values is an array containing two values: a line (or character, if * $compareCharacters is true), and one of the constants DIFF::UNMODIFIED (the * line or character is in both strings), DIFF::DELETED (the line or character * is only in the first string), and DIFF::INSERTED (the line or character is * only in the second string). The parameters are: * - * $string1 - the first string - * $string2 - the second string - * $compareCharacters - true to compare characters, and false to compare - * lines; this optional parameter defaults to false + * @param string $string1 First string + * @param string $string2 Second string + * @param string $compareCharacters true to compare characters, and false to compare lines; this optional parameter defaults to false + * @return array Array of diff */ - public static function compare( - $string1, - $string2, - $compareCharacters = false - ) { - + public static function compare($string1, $string2, $compareCharacters = false) + { // initialise the sequences and comparison start and end positions $start = 0; if ($compareCharacters) { @@ -90,12 +87,13 @@ class Diff return $diff; } - /* Returns the diff for two files. The parameters are: + /** + * Returns the diff for two files. The parameters are: * - * $file1 - the path to the first file - * $file2 - the path to the second file - * $compareCharacters - true to compare characters, and false to compare - * lines; this optional parameter defaults to false + * @param string $file1 Path to the first file + * @param string $file2 Path to the second file + * @param boolean $compareCharacters true to compare characters, and false to compare lines; this optional parameter defaults to false + * @return array Array of diff */ public static function compareFiles( $file1, @@ -111,23 +109,18 @@ class Diff ); } - /* Returns the table of longest common subsequence lengths for the specified - * sequences. The parameters are: + /** + * Returns the table of longest common subsequence lengths for the specified sequences. The parameters are: * - * $sequence1 - the first sequence - * $sequence2 - the second sequence - * $start - the starting index - * $end1 - the ending index for the first sequence - * $end2 - the ending index for the second sequence + * @param string $sequence1 the first sequence + * @param string $sequence2 the second sequence + * @param string $start the starting index + * @param string $end1 the ending index for the first sequence + * @param string $end2 the ending index for the second sequence + * @return array array of diff */ - private static function computeTable( - $sequence1, - $sequence2, - $start, - $end1, - $end2 - ) { - + private static function computeTable($sequence1, $sequence2, $start, $end1, $end2) + { // determine the lengths to be compared $length1 = $end1 - $start + 1; $length2 = $end2 - $start + 1; @@ -156,21 +149,18 @@ class Diff return $table; } - /* Returns the partial diff for the specificed sequences, in reverse order. - * The parameters are: + /** + * Returns the partial diff for the specificed sequences, in reverse order. + * The parameters are: * - * $table - the table returned by the computeTable function - * $sequence1 - the first sequence - * $sequence2 - the second sequence - * $start - the starting index + * @param string $table the table returned by the computeTable function + * @param string $sequence1 the first sequence + * @param string $sequence2 the second sequence + * @param string $start the starting index + * @return array array of diff */ - private static function generatePartialDiff( - $table, - $sequence1, - $sequence2, - $start - ) { - + private static function generatePartialDiff($table, $sequence1, $sequence2, $start) + { // initialise the diff $diff = array(); @@ -205,17 +195,17 @@ class Diff return $diff; } - /* Returns a diff as a string, where unmodified lines are prefixed by ' ', + /** + * Returns a diff as a string, where unmodified lines are prefixed by ' ', * deletions are prefixed by '- ', and insertions are prefixed by '+ '. The * parameters are: * - * $diff - the diff array - * $separator - the separator between lines; this optional parameter defaults - * to "\n" + * @param array $diff the diff array + * @param string $separator the separator between lines; this optional parameter defaults to "\n" + * @return string String */ public static function toString($diff, $separator = "\n") { - // initialise the string $string = ''; @@ -242,17 +232,17 @@ class Diff return $string; } - /* Returns a diff as an HTML string, where unmodified lines are contained + /** + * Returns a diff as an HTML string, where unmodified lines are contained * within 'span' elements, deletions are contained within 'del' elements, and * insertions are contained within 'ins' elements. The parameters are: * - * $diff - the diff array - * $separator - the separator between lines; this optional parameter defaults - * to '
    ' + * @param string $diff the diff array + * @param string $separator the separator between lines; this optional parameter defaults to '
    ' + * @return string HTML string */ public static function toHTML($diff, $separator = '
    ') { - // initialise the HTML $html = ''; @@ -283,17 +273,16 @@ class Diff return $html; } - /* Returns a diff as an HTML table. The parameters are: + /** + * Returns a diff as an HTML table. The parameters are: * - * $diff - the diff array - * $indentation - indentation to add to every line of the generated HTML; this - * optional parameter defaults to '' - * $separator - the separator between lines; this optional parameter - * defaults to '
    ' + * @param string $diff the diff array + * @param string $indentation indentation to add to every line of the generated HTML; this optional parameter defaults to '' + * @param string $separator the separator between lines; this optional parameter defaults to '
    ' + * @return string HTML string */ public static function toTable($diff, $indentation = '', $separator = '
    ') { - // initialise the HTML $html = $indentation."\n"; @@ -373,14 +362,16 @@ class Diff return $html.$indentation."
    \n"; } - /* Returns the content of the cell, for use in the toTable function. The + /** + * Returns the content of the cell, for use in the toTable function. The * parameters are: * - * $diff - the diff array - * $indentation - indentation to add to every line of the generated HTML - * $separator - the separator between lines - * $index - the current index, passes by reference - * $type - the type of line + * @param string $diff the diff array + * @param string $indentation indentation to add to every line of the generated HTML + * @param string $separator the separator between lines + * @param string $index the current index, passes by reference + * @param string $type the type of line + * @return string HTML string */ private static function getCellContent($diff, $indentation, $separator, &$index, $type) { diff --git a/htdocs/webservices/server_other.php b/htdocs/webservices/server_other.php index 3944ef5befa..4ae702ade15 100644 --- a/htdocs/webservices/server_other.php +++ b/htdocs/webservices/server_other.php @@ -137,7 +137,12 @@ $server->register( -// Full methods code +/** + * Full methods code + * + * @param string $authentication Authentication string + * @return array Array of data + */ function getVersions($authentication) { global $db, $conf, $langs; diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index 32268b039b4..b985c77434e 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -715,7 +715,6 @@ class Hook extends CommonObject * * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) */ - //public function doScheduledJob($param1, $param2, ...) public function doScheduledJob() { global $conf, $langs; diff --git a/test/phpunit/AccountingAccountTest.php b/test/phpunit/AccountingAccountTest.php index ea1651c5902..b4367e96f49 100644 --- a/test/phpunit/AccountingAccountTest.php +++ b/test/phpunit/AccountingAccountTest.php @@ -73,7 +73,11 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class AccountingAccountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ActionCommTest.php b/test/phpunit/ActionCommTest.php index 34d67341afb..0dd4946f69c 100644 --- a/test/phpunit/ActionCommTest.php +++ b/test/phpunit/ActionCommTest.php @@ -73,7 +73,11 @@ class ActionCommTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class ActionCommTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/AdherentTest.php b/test/phpunit/AdherentTest.php index 89e78b32bd9..f19e88c36a6 100644 --- a/test/phpunit/AdherentTest.php +++ b/test/phpunit/AdherentTest.php @@ -75,7 +75,11 @@ class AdherentTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -91,7 +95,11 @@ class AdherentTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/AdminLibTest.php b/test/phpunit/AdminLibTest.php index 7f3c9030725..e3c38c1df86 100644 --- a/test/phpunit/AdminLibTest.php +++ b/test/phpunit/AdminLibTest.php @@ -73,7 +73,11 @@ class AdminLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class AdminLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/BOMTest.php b/test/phpunit/BOMTest.php index 41cbdd9f247..39268bdeaea 100644 --- a/test/phpunit/BOMTest.php +++ b/test/phpunit/BOMTest.php @@ -74,7 +74,11 @@ class BOMTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class BOMTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index 416a17f0c0f..1007db02dad 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -75,7 +75,11 @@ class BankAccountTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class BankAccountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/BuildDocTest.php b/test/phpunit/BuildDocTest.php index 61d7b7f1199..de4da3790b5 100644 --- a/test/phpunit/BuildDocTest.php +++ b/test/phpunit/BuildDocTest.php @@ -103,7 +103,11 @@ class BuildDocTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -121,7 +125,11 @@ class BuildDocTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CMailFileTest.php b/test/phpunit/CMailFileTest.php index 8029959c22b..d407b67d991 100755 --- a/test/phpunit/CMailFileTest.php +++ b/test/phpunit/CMailFileTest.php @@ -73,7 +73,11 @@ class CMailFileTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class CMailFileTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CategorieTest.php b/test/phpunit/CategorieTest.php index 3c81a7aee21..a62d362a972 100644 --- a/test/phpunit/CategorieTest.php +++ b/test/phpunit/CategorieTest.php @@ -74,7 +74,11 @@ class CategorieTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class CategorieTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ChargeSocialesTest.php b/test/phpunit/ChargeSocialesTest.php index b1a3fd87b30..33349449795 100644 --- a/test/phpunit/ChargeSocialesTest.php +++ b/test/phpunit/ChargeSocialesTest.php @@ -74,7 +74,11 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class ChargeSocialesTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index 733071c0f58..5c3c6d7d54e 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -86,7 +86,11 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index b62b9befcc7..f56d00b5bcd 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -86,7 +86,11 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class CodingSqlTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CommandeFournisseurTest.php b/test/phpunit/CommandeFournisseurTest.php index 7ccbf5d0b76..bebd65634bf 100644 --- a/test/phpunit/CommandeFournisseurTest.php +++ b/test/phpunit/CommandeFournisseurTest.php @@ -75,7 +75,11 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class CommandeFournisseurTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CommandeTest.php b/test/phpunit/CommandeTest.php index ad2920282b2..990ef41f0b7 100644 --- a/test/phpunit/CommandeTest.php +++ b/test/phpunit/CommandeTest.php @@ -73,7 +73,11 @@ class CommandeTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class CommandeTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CommonInvoiceTest.php b/test/phpunit/CommonInvoiceTest.php index 9f4b5998455..5e9c45825ec 100644 --- a/test/phpunit/CommonInvoiceTest.php +++ b/test/phpunit/CommonInvoiceTest.php @@ -73,7 +73,11 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class CommonInvoiceTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CommonObjectTest.php b/test/phpunit/CommonObjectTest.php index e32952c167d..6c68423e8a9 100644 --- a/test/phpunit/CommonObjectTest.php +++ b/test/phpunit/CommonObjectTest.php @@ -74,7 +74,11 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class CommonObjectTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CompanyBankAccountTest.php b/test/phpunit/CompanyBankAccountTest.php index 7410e1f15f9..1979f89fabb 100644 --- a/test/phpunit/CompanyBankAccountTest.php +++ b/test/phpunit/CompanyBankAccountTest.php @@ -74,7 +74,11 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class CompanyBankAccountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CompanyLibTest.php b/test/phpunit/CompanyLibTest.php index c45f6ebd208..ab9eb414634 100644 --- a/test/phpunit/CompanyLibTest.php +++ b/test/phpunit/CompanyLibTest.php @@ -73,7 +73,11 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class CompanyLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ContactTest.php b/test/phpunit/ContactTest.php index 8fdaea0cbe7..0c5687e67c9 100755 --- a/test/phpunit/ContactTest.php +++ b/test/phpunit/ContactTest.php @@ -82,7 +82,11 @@ class ContactTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -92,7 +96,11 @@ class ContactTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ContratTest.php b/test/phpunit/ContratTest.php index 7c302105aa2..d364d6c9dff 100644 --- a/test/phpunit/ContratTest.php +++ b/test/phpunit/ContratTest.php @@ -74,7 +74,11 @@ class ContratTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class ContratTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index c34bbffba95..87c43798a0f 100644 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -76,7 +76,11 @@ class CoreTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class CoreTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index dd32e02cee6..062bdb6dd11 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -74,7 +74,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index 895599becde..7e96e39030e 100644 --- a/test/phpunit/DateLibTzFranceTest.php +++ b/test/phpunit/DateLibTzFranceTest.php @@ -74,7 +74,11 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -88,7 +92,11 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/DiscountTest.php b/test/phpunit/DiscountTest.php index 202c41958d0..9eba2460655 100644 --- a/test/phpunit/DiscountTest.php +++ b/test/phpunit/DiscountTest.php @@ -74,7 +74,11 @@ class DiscountTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class DiscountTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/EntrepotTest.php b/test/phpunit/EntrepotTest.php index 2ab2fc2aff3..27fd3dabbf3 100644 --- a/test/phpunit/EntrepotTest.php +++ b/test/phpunit/EntrepotTest.php @@ -74,7 +74,11 @@ class EntrepotTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class EntrepotTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ExpenseReportTest.php b/test/phpunit/ExpenseReportTest.php index 67467ac6c81..3f6402262c3 100644 --- a/test/phpunit/ExpenseReportTest.php +++ b/test/phpunit/ExpenseReportTest.php @@ -74,7 +74,11 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class ExpenseReportTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ExportTest.php b/test/phpunit/ExportTest.php index 3abec2ee0e1..590accccbed 100644 --- a/test/phpunit/ExportTest.php +++ b/test/phpunit/ExportTest.php @@ -78,7 +78,11 @@ class ExportTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -87,7 +91,11 @@ class ExportTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FactureFournisseurTest.php b/test/phpunit/FactureFournisseurTest.php index b277ba5c1b3..d9cd44a40d2 100644 --- a/test/phpunit/FactureFournisseurTest.php +++ b/test/phpunit/FactureFournisseurTest.php @@ -75,7 +75,11 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class FactureFournisseurTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FactureRecTest.php b/test/phpunit/FactureRecTest.php index 71caddeb491..f89ab4b1f13 100644 --- a/test/phpunit/FactureRecTest.php +++ b/test/phpunit/FactureRecTest.php @@ -75,7 +75,11 @@ class FactureRecTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class FactureRecTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FactureTest.php b/test/phpunit/FactureTest.php index 4e361895fcc..47f3a639b29 100644 --- a/test/phpunit/FactureTest.php +++ b/test/phpunit/FactureTest.php @@ -74,7 +74,11 @@ class FactureTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -87,7 +91,11 @@ class FactureTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FactureTestRounding.php b/test/phpunit/FactureTestRounding.php index 59ecc240461..f0165a88d0b 100644 --- a/test/phpunit/FactureTestRounding.php +++ b/test/phpunit/FactureTestRounding.php @@ -74,7 +74,11 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class FactureTestRounding extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FichinterTest.php b/test/phpunit/FichinterTest.php index ba9408441a1..f78e9250471 100644 --- a/test/phpunit/FichinterTest.php +++ b/test/phpunit/FichinterTest.php @@ -74,7 +74,11 @@ class FichinterTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class FichinterTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index fb3ce8f5814..9d476953381 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -75,7 +75,11 @@ class FilesLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class FilesLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FormAdminTest.php b/test/phpunit/FormAdminTest.php index e6b92b698d9..a434841930c 100644 --- a/test/phpunit/FormAdminTest.php +++ b/test/phpunit/FormAdminTest.php @@ -74,7 +74,11 @@ class FormAdminTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class FormAdminTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FormTest.php b/test/phpunit/FormTest.php index 59cfeb3fa3d..bec23048e9f 100644 --- a/test/phpunit/FormTest.php +++ b/test/phpunit/FormTest.php @@ -74,7 +74,11 @@ class FormTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class FormTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/Functions2LibTest.php b/test/phpunit/Functions2LibTest.php index 4304251d7f1..21fa1f29257 100644 --- a/test/phpunit/Functions2LibTest.php +++ b/test/phpunit/Functions2LibTest.php @@ -77,7 +77,11 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class Functions2LibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/FunctionsLibTest.php b/test/phpunit/FunctionsLibTest.php index dff6b3a7d06..e3dabff6df9 100644 --- a/test/phpunit/FunctionsLibTest.php +++ b/test/phpunit/FunctionsLibTest.php @@ -77,7 +77,11 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -88,7 +92,11 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/GetUrlLibTest.php b/test/phpunit/GetUrlLibTest.php index ba074459f44..268122c8d48 100644 --- a/test/phpunit/GetUrlLibTest.php +++ b/test/phpunit/GetUrlLibTest.php @@ -75,7 +75,11 @@ class GetUrlLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class GetUrlLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/HolidayTest.php b/test/phpunit/HolidayTest.php index cd5a9f28138..e7e3e8749cd 100644 --- a/test/phpunit/HolidayTest.php +++ b/test/phpunit/HolidayTest.php @@ -76,7 +76,11 @@ class HolidayTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class HolidayTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ImagesLibTest.php b/test/phpunit/ImagesLibTest.php index 71474ba1847..3bfb676f3be 100644 --- a/test/phpunit/ImagesLibTest.php +++ b/test/phpunit/ImagesLibTest.php @@ -75,7 +75,11 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class ImagesLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index 9e6b973500a..ce689fda4a4 100644 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -76,7 +76,11 @@ class ImportTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class ImportTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/JsonLibTest.php b/test/phpunit/JsonLibTest.php index 0b5d3dd53e6..7d2678b0ec7 100644 --- a/test/phpunit/JsonLibTest.php +++ b/test/phpunit/JsonLibTest.php @@ -76,7 +76,11 @@ class JsonLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class JsonLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/LangTest.php b/test/phpunit/LangTest.php index 3ff2917a9f2..f4a14373ebe 100644 --- a/test/phpunit/LangTest.php +++ b/test/phpunit/LangTest.php @@ -86,7 +86,11 @@ class LangTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class LangTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/LesscTest.php b/test/phpunit/LesscTest.php index ca64853b381..a4ce302c540 100644 --- a/test/phpunit/LesscTest.php +++ b/test/phpunit/LesscTest.php @@ -86,7 +86,11 @@ class LesscTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class LesscTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/LoanTest.php b/test/phpunit/LoanTest.php index 71a61c80ae0..253e779ac03 100644 --- a/test/phpunit/LoanTest.php +++ b/test/phpunit/LoanTest.php @@ -74,7 +74,11 @@ class LoanTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class LoanTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/MarginsLibTest.php b/test/phpunit/MarginsLibTest.php index fc25d929b38..e451262546d 100644 --- a/test/phpunit/MarginsLibTest.php +++ b/test/phpunit/MarginsLibTest.php @@ -74,7 +74,11 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class MarginsLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ModulesTest.php b/test/phpunit/ModulesTest.php index 5a43de21167..f8feaa8f829 100755 --- a/test/phpunit/ModulesTest.php +++ b/test/phpunit/ModulesTest.php @@ -73,7 +73,11 @@ class ModulesTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class ModulesTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/MouvementStockTest.php b/test/phpunit/MouvementStockTest.php index 85137234a3b..23b6b2b0111 100644 --- a/test/phpunit/MouvementStockTest.php +++ b/test/phpunit/MouvementStockTest.php @@ -76,7 +76,11 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class MouvementStockTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index 099d6d2052c..089a2c2f4cf 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -73,7 +73,11 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class NumberingModulesTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PaypalTest.php b/test/phpunit/PaypalTest.php index 96bfbefdf17..47d8341f501 100644 --- a/test/phpunit/PaypalTest.php +++ b/test/phpunit/PaypalTest.php @@ -75,7 +75,11 @@ class PaypalTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -87,7 +91,11 @@ class PaypalTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PdfDocTest.php b/test/phpunit/PdfDocTest.php index 9c9c0bb666f..276deada0c6 100644 --- a/test/phpunit/PdfDocTest.php +++ b/test/phpunit/PdfDocTest.php @@ -77,7 +77,11 @@ class PdfDocTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class PdfDocTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PgsqlTest.php b/test/phpunit/PgsqlTest.php index 4b2a5f98746..5a09e7fc55a 100644 --- a/test/phpunit/PgsqlTest.php +++ b/test/phpunit/PgsqlTest.php @@ -76,7 +76,11 @@ class PgsqlTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class PgsqlTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PricesTest.php b/test/phpunit/PricesTest.php index d7f9e310088..0c47ec4f275 100755 --- a/test/phpunit/PricesTest.php +++ b/test/phpunit/PricesTest.php @@ -81,7 +81,11 @@ class PricesTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -90,7 +94,11 @@ class PricesTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ProductTest.php b/test/phpunit/ProductTest.php index 8a848416318..650d8a93e37 100644 --- a/test/phpunit/ProductTest.php +++ b/test/phpunit/ProductTest.php @@ -74,7 +74,11 @@ class ProductTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,12 @@ class ProductTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // teardownafterclass + + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ProjectTest.php b/test/phpunit/ProjectTest.php index 84a6411082f..8a7e0540b9a 100644 --- a/test/phpunit/ProjectTest.php +++ b/test/phpunit/ProjectTest.php @@ -75,7 +75,11 @@ class ProjectTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -84,7 +88,11 @@ class ProjectTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index 709c5bbcfb7..068fb53b052 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -74,7 +74,11 @@ class PropalTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class PropalTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/RestAPIDocumentTest.php b/test/phpunit/RestAPIDocumentTest.php index 9ce14a4ac92..65b8c206c9d 100644 --- a/test/phpunit/RestAPIDocumentTest.php +++ b/test/phpunit/RestAPIDocumentTest.php @@ -76,7 +76,11 @@ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase echo "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class RestAPIDocumentTest extends PHPUnit\Framework\TestCase echo __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/RestAPIUserTest.php b/test/phpunit/RestAPIUserTest.php index ea3970e5a4b..9d49d10af73 100644 --- a/test/phpunit/RestAPIUserTest.php +++ b/test/phpunit/RestAPIUserTest.php @@ -80,7 +80,11 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -89,7 +93,11 @@ class RestAPIUserTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index e490054edfa..16884214418 100644 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -86,7 +86,11 @@ class ScriptsTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class ScriptsTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index 4130426d806..5a248006498 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -86,7 +86,11 @@ class SecurityTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -95,7 +99,11 @@ class SecurityTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/SocieteTest.php b/test/phpunit/SocieteTest.php index 070a8999bb2..4ed0771d668 100755 --- a/test/phpunit/SocieteTest.php +++ b/test/phpunit/SocieteTest.php @@ -74,7 +74,11 @@ class SocieteTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -88,7 +92,11 @@ class SocieteTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/SupplierProposalTest.php b/test/phpunit/SupplierProposalTest.php index 42d7e5842a6..27414ecab0a 100644 --- a/test/phpunit/SupplierProposalTest.php +++ b/test/phpunit/SupplierProposalTest.php @@ -77,7 +77,11 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -88,7 +92,11 @@ class SupplierProposalTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/TicketTest.php b/test/phpunit/TicketTest.php index fa7ea8df98f..c13bdcfb959 100644 --- a/test/phpunit/TicketTest.php +++ b/test/phpunit/TicketTest.php @@ -74,7 +74,11 @@ class TicketTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class TicketTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/UserGroupTest.php b/test/phpunit/UserGroupTest.php index fe08af2bce7..7e3cdd24b3a 100644 --- a/test/phpunit/UserGroupTest.php +++ b/test/phpunit/UserGroupTest.php @@ -73,7 +73,11 @@ class UserGroupTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class UserGroupTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/UserTest.php b/test/phpunit/UserTest.php index 3c89bd52d06..10b0bd7b0b7 100644 --- a/test/phpunit/UserTest.php +++ b/test/phpunit/UserTest.php @@ -73,7 +73,11 @@ class UserTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -85,7 +89,11 @@ class UserTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/UtilsTest.php b/test/phpunit/UtilsTest.php index a1b9eafa45e..dd5ba68ca8f 100644 --- a/test/phpunit/UtilsTest.php +++ b/test/phpunit/UtilsTest.php @@ -73,7 +73,11 @@ class UtilsTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -83,7 +87,11 @@ class UtilsTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesOrdersTest.php b/test/phpunit/WebservicesOrdersTest.php index 8afd50a0394..33d842f6d39 100644 --- a/test/phpunit/WebservicesOrdersTest.php +++ b/test/phpunit/WebservicesOrdersTest.php @@ -77,7 +77,11 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class WebservicesOrdersTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesOtherTest.php b/test/phpunit/WebservicesOtherTest.php index 7304e2bf367..34686cbec92 100644 --- a/test/phpunit/WebservicesOtherTest.php +++ b/test/phpunit/WebservicesOtherTest.php @@ -77,7 +77,11 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class WebservicesOtherTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesProductsTest.php b/test/phpunit/WebservicesProductsTest.php index 3d74deb721c..70a8c12a498 100644 --- a/test/phpunit/WebservicesProductsTest.php +++ b/test/phpunit/WebservicesProductsTest.php @@ -84,7 +84,11 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -92,7 +96,12 @@ class WebservicesProductsTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesThirdpartyTest.php b/test/phpunit/WebservicesThirdpartyTest.php index 9aefd6c5ce6..1106164b4ee 100644 --- a/test/phpunit/WebservicesThirdpartyTest.php +++ b/test/phpunit/WebservicesThirdpartyTest.php @@ -94,7 +94,11 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -103,7 +107,11 @@ class WebservicesThirdpartyTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/WebservicesUserTest.php b/test/phpunit/WebservicesUserTest.php index de51431b046..bb68f413741 100644 --- a/test/phpunit/WebservicesUserTest.php +++ b/test/phpunit/WebservicesUserTest.php @@ -77,7 +77,11 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -86,7 +90,11 @@ class WebservicesUserTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; diff --git a/test/phpunit/XCalLibTest.php b/test/phpunit/XCalLibTest.php index 26d5e25c54b..9fb1975a1fd 100644 --- a/test/phpunit/XCalLibTest.php +++ b/test/phpunit/XCalLibTest.php @@ -73,7 +73,11 @@ class XCalLibTest extends PHPUnit\Framework\TestCase print "\n"; } - // Static methods + /** + * setUpBeforeClass + * + * @return void + */ public static function setUpBeforeClass() { global $conf,$user,$langs,$db; @@ -82,7 +86,11 @@ class XCalLibTest extends PHPUnit\Framework\TestCase print __METHOD__."\n"; } - // tear down after class + /** + * tearDownAfterClass + * + * @return void + */ public static function tearDownAfterClass() { global $conf,$user,$langs,$db; From 4b34a6bd4acb766242eaaac072dbe68c9a9466d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 12:43:47 +0200 Subject: [PATCH 221/456] Look and feel --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 075fb95066b..98d781a51c1 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1393,7 +1393,7 @@ class FormFile if ($permtoeditline) { $paramsectiondir = (in_array($modulepart, array('medias', 'ecm')) ? '§ion_dir='.urlencode($relativepath) : ''); - print ''.img_edit('default', 0, 'class="paddingrightonly"').''; + print ''.img_edit('default', 0, 'class="paddingrightonly"').''; } } if ($permonobject) From 3857c082776324938d38fdb0a5d82ca1b156c640 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 13:24:09 +0200 Subject: [PATCH 222/456] Fix quick search on MO --- htdocs/core/ajax/selectsearchbox.php | 21 ++++++++++++------- htdocs/langs/en_US/main.lang | 1 + .../modulebuilder/template/myobject_list.php | 2 +- htdocs/mrp/mo_list.php | 2 +- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index bc5287a51f9..cd019b9ce38 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -75,9 +75,14 @@ if (((!empty($conf->product->enabled) && $user->rights->produit->lire) || (!empt $arrayresult['searchintoproduct'] = array('position'=>30, 'shortcut'=>'P', 'img'=>'object_product', 'label'=>$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'text'=>img_picto('', 'object_product').' '.$langs->trans("SearchIntoProductsOrServices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/product/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } +if (!empty($conf->mrp->enabled) && $user->rights->mrp->read && empty($conf->global->MAIN_SEARCHFORM_MRP_DISABLED)) +{ + $arrayresult['searchintomo'] = array('position'=>35, 'shortcut'=>'', 'img'=>'object_mrp', 'label'=>$langs->trans("SearchIntoMO", $search_boxvalue), 'text'=>img_picto('', 'object_mrp').' '.$langs->trans("SearchIntoMO", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/mrp/mo_list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); +} + if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_PROJECT_DISABLED) && $user->rights->projet->lire) { - $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_projectpub', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_projectpub').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoprojects'] = array('position'=>40, 'shortcut'=>'Q', 'img'=>'object_projectpub', 'label'=>$langs->trans("SearchIntoProjects", $search_boxvalue), 'text'=>img_picto('', 'object_project').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if (!empty($conf->projet->enabled) && empty($conf->global->MAIN_SEARCHFORM_TASK_DISABLED) && $user->rights->projet->lire) { @@ -103,15 +108,15 @@ if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUST if (!empty($conf->supplier_proposal->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->rights->supplier_proposal->lire) { - $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_propal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_propal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED) || ! empty($conf->supplier_order->enabled)) && $user->rights->fournisseur->commande->lire) { - $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : '')); } if ((! empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED) || ! empty($conf->supplier_invoice->enabled)) && $user->rights->fournisseur->facture->lire) { - $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_bill').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintosupplierinvoice'] = array('position'=>120, 'img'=>'object_bill', 'label'=>$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_invoice').' '.$langs->trans("SearchIntoSupplierInvoices", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/facture/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->contrat->enabled) && empty($conf->global->MAIN_SEARCHFORM_CONTRACT_DISABLED) && $user->rights->contrat->lire) @@ -122,6 +127,10 @@ if (!empty($conf->ficheinter->enabled) && empty($conf->global->MAIN_SEARCHFORM_F { $arrayresult['searchintointervention'] = array('position'=>140, 'img'=>'object_intervention', 'label'=>$langs->trans("SearchIntoInterventions", $search_boxvalue), 'text'=>img_picto('', 'object_intervention').' '.$langs->trans("SearchIntoInterventions", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fichinter/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } +if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read) +{ + $arrayresult['searchintotickets'] = array('position'=>145, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); +} // HR if (!empty($conf->user->enabled) && empty($conf->global->MAIN_SEARCHFORM_USER_DISABLED) && $user->rights->user->user->lire) @@ -136,10 +145,6 @@ if (!empty($conf->holiday->enabled) && empty($conf->global->MAIN_SEARCHFORM_HOLI { $arrayresult['searchintoleaves'] = array('position'=>220, 'img'=>'object_holiday', 'label'=>$langs->trans("SearchIntoLeaves", $search_boxvalue), 'text'=>img_picto('', 'object_holiday').' '.$langs->trans("SearchIntoLeaves", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); } -if (!empty($conf->ticket->enabled) && empty($conf->global->MAIN_SEARCHFORM_TICKET_DISABLED) && $user->rights->ticket->read) -{ - $arrayresult['searchintotickets'] = array('position'=>220, 'img'=>'object_ticket', 'label'=>$langs->trans("SearchIntoTickets", $search_boxvalue), 'text'=>img_picto('', 'object_ticket').' '.$langs->trans("SearchIntoTickets", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/ticket/list.php?mainmenu=ticket'.($search_boxvalue ? '&sall='.urlencode($search_boxvalue) : '')); -} /* Do we really need this. We already have a select for users, and we should be able to filter into user list on employee flag diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 7cb9b21791a..38a4bcd2bad 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -953,6 +953,7 @@ SearchIntoMembers=Members SearchIntoUsers=Users SearchIntoProductsOrServices=Products or services SearchIntoProjects=Projects +SearchIntoMO=Manufacturing Orders SearchIntoTasks=Tasks SearchIntoCustomerInvoices=Customer invoices SearchIntoSupplierInvoices=Vendor invoices diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 18c0b1bda2b..a0fcb744bb1 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -108,7 +108,7 @@ if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default sea if (!$sortorder) $sortorder = "ASC"; // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml')); $search = array(); foreach ($object->fields as $key => $val) { diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index b51171e6684..4807c47fb53 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -107,7 +107,7 @@ if ($user->socid > 0) // Protection if external user // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml')); $search = array(); foreach ($object->fields as $key => $val) { From 358bc6d5df27ea701b5d3b6cfde6cd06ee9ea501 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 14:29:25 +0200 Subject: [PATCH 223/456] Fix search on entities --- htdocs/website/index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index ebfbc7a2ac3..0db6aad1d1c 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -282,6 +282,7 @@ $searchkey = GETPOST('searchstring', 'none'); if ($action == 'replacesiteconfirm') { $listofpages = getPagesFromSearchCriterias('', $algo, $searchkey, 1000, $sortfield, $sortorder); + var_dump($listofpages); } @@ -3531,9 +3532,10 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm' || $massaction = print $langs->trans("SearchString"); print ''; print '
    '; - print ''; - print ''; + print ''; + + print ''; print '
    '; print ''; From f6e055309360eb518754e1e84626d7385234f61c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 14:29:57 +0200 Subject: [PATCH 224/456] fix var_dump --- htdocs/website/index.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 0db6aad1d1c..690dc0efe3b 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -282,7 +282,6 @@ $searchkey = GETPOST('searchstring', 'none'); if ($action == 'replacesiteconfirm') { $listofpages = getPagesFromSearchCriterias('', $algo, $searchkey, 1000, $sortfield, $sortorder); - var_dump($listofpages); } From f4a9490e7fa3c7bf54bb204cd2e73c742531524f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 16:55:53 +0200 Subject: [PATCH 225/456] Fix a page with NOLOGIN const set to 1 must be into "public" dir. --- htdocs/takepos/admin/bar.php | 4 ++-- htdocs/takepos/{ => public}/auto_order.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename htdocs/takepos/{ => public}/auto_order.php (83%) diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index 672041d3bb3..7b6e1d9a98c 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -155,9 +155,9 @@ if ($conf->global->TAKEPOS_AUTO_ORDER) print '
    '; print $langs->trans("Table")." ".$row['label']; print ''; - print "".$urlwithroot."/takepos/auto_order.php?key=".dol_encode($row['rowid']).""; + print "".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid']).""; print ''; - print ""; + print ""; print '
    '; + print ''; $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->cid); $staticcontrat->id = $obj->cid; print $staticcontrat->getNomUrl(1, 16); @@ -425,7 +425,7 @@ if ($resql) $obj = $db->fetch_object($resql); print '
    '; + print ''; $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->id = $obj->fk_contrat; print $staticcontrat->getNomUrl(1, 16); @@ -506,7 +506,7 @@ if ($resql) print '
    '; + print ''; $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->id = $obj->fk_contrat; print $staticcontrat->getNomUrl(1, 16); @@ -586,7 +586,7 @@ if ($resql) print '
    '; + print ''; $staticcontrat->ref = ($obj->ref ? $obj->ref : $obj->fk_contrat); $staticcontrat->id = $obj->fk_contrat; print $staticcontrat->getNomUrl(1, 16); diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 70ab37c0380..4b163480035 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2019 Laurent Destailleur + * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2014-2019 Juanjo Menent @@ -612,9 +612,11 @@ while ($i < min($num, $limit)) } print '
    '; + print ''; print $contracttmp->getNomUrl(1); if ($obj->nb_late) print img_warning($langs->trans("Late")); if (!empty($obj->note_private) || !empty($obj->note_public)) { @@ -631,6 +633,7 @@ while ($i < min($num, $limit)) print ''.$contracttmp->getFormatedCustomerRef($obj->ref_customer).'
    '; +print '
    '; + +print ''; + + print '

    '; +print '
    '; +print ''; +print ''; + // Notification per contacts $title = $langs->trans("ListOfNotificationsPerUser"); if (!empty($conf->societe->enabled)) $title = $langs->trans("ListOfNotificationsPerUserOrContact"); @@ -211,7 +262,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { } $helptext = ''; - form_constantes($constantes, 0, $helptext); + form_constantes($constantes, 2, $helptext); } else { print ''; print ''; @@ -248,14 +299,18 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print '
    '; } -print '
    '; -print '* '.$langs->trans("GoOntoUserCardToAddMore").'
    '; -if (!empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").'
    '; +print '
    '; + +print ''; + -print '
    '; print '

    '; +print '
    '; +print ''; +print ''; + print load_fiche_titre($langs->trans("ListOfFixedNotifications"), '', ''); print ''; @@ -333,6 +388,12 @@ foreach ($listofnotifiedevents as $notifiedevent) } print '
    '; +print '
    '; +print '* '.$langs->trans("GoOntoUserCardToAddMore").'
    '; +if (!empty($conf->societe->enabled)) print '** '.$langs->trans("GoOntoContactCardToAddMore").'
    '; + +print '
    '; + print '
    '; print '
    '; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index f2e8e94ab78..b78c0478370 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1409,7 +1409,7 @@ function complete_elementList_with_modules(&$elementList) * * @param array $tableau Array of constants array('key'=>array('type'=>type, 'label'=>label) * where type can be 'string', 'text', 'textarea', 'html', 'yesno', 'emailtemplate:xxx', ... - * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (no form into table), 2=No form nor button at all (form is output by caller, recommanded) + * @param int $strictw3c 0=Include form into table (deprecated), 1=Form is outside table to respect W3C (deprecated), 2=No form nor button at all (form is output by caller, recommended) * @param string $helptext Help * @return void */ @@ -1420,6 +1420,9 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') $form = new Form($db); + if (empty($strictw3c)) { + dol_syslog("Warning: Function form_constantes is calle with parameter strictw3c = 0, this is deprecated. Value must be 2 now.", LOG_DEBUG); + } if (!empty($strictw3c) && $strictw3c == 1) { print "\n".''; @@ -1584,12 +1587,13 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') //var_dump($modelmail); $moreonlabel = ''; if (!empty($arrayofmessagename[$modelmail->label])) $moreonlabel = ' ('.$langs->trans("SeveralLangugeVariatFound").')'; - $arrayofmessagename[$modelmail->label] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; + // The 'label' is the key that is unique if we exclude the language + $arrayofmessagename[$modelmail->label.':'.$tmp[1]] = $langs->trans(preg_replace('/\(|\)/', '', $modelmail->label)).$moreonlabel; } } //var_dump($arraydefaultmessage); //var_dump($arrayofmessagename); - print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value, 'None', 1, 0, '', 0, 0, 0, '', '', 1); + print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value.':'.$tmp[1], 'None', 0, 0, '', 0, 0, 0, '', '', 1); } else // type = 'string' ou 'chaine' { From 2afd38e2f65c555579dd661dd728f15c98e0e3e0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 May 2020 21:59:31 +0200 Subject: [PATCH 230/456] FIX Combo list of available users to filter on the list of leaves. --- htdocs/core/class/html.form.class.php | 54 +++++++++++++-------------- htdocs/holiday/list.php | 8 ++-- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 39a006e0342..93061d200d8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1574,16 +1574,16 @@ class Form // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Return select list of users + * Return the HTML select list of users * - * @param string $selected Id user preselected - * @param string $htmlname Field name in form - * @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue - * @param array $exclude Array list of users id to exclude - * @param int $disabled If select list must be disabled - * @param array $include Array list of users id to include - * @param int $enableonly Array list of users id to be enabled. All other must be disabled - * @param string $force_entity '0' or Ids of environment to force + * @param string $selected Id user preselected + * @param string $htmlname Field name in form + * @param int $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue + * @param array $exclude Array list of users id to exclude + * @param int $disabled If select list must be disabled + * @param array|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me + * @param int $enableonly Array list of users id to be enabled. All other must be disabled + * @param string $force_entity '0' or Ids of environment to force * @return void * @deprecated Use select_dolusers instead * @see select_dolusers() @@ -1598,24 +1598,24 @@ class Form /** * Return select list of users * - * @param string $selected User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed) - * @param string $htmlname Field name in form - * @param int $show_empty 0=list with no empty value, 1=add also an empty value into list - * @param array $exclude Array list of users id to exclude - * @param int $disabled If select list must be disabled - * @param array|string $include Array list of users id to include or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me - * @param array $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled - * @param string $force_entity '0' or Ids of environment to force - * @param int $maxlength Maximum length of string into list (0=no limit) - * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status - * @param string $morefilter Add more filters into sql request (Example: 'employee = 1') - * @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list - * @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. - * @param string $morecss More css - * @param int $noactive Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). - * @param int $outputmode 0=HTML select string, 1=Array - * @param bool $multiple add [] in the name of element and add 'multiple' attribut - * @return string HTML select string + * @param string $selected User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed) + * @param string $htmlname Field name in form + * @param int $show_empty 0=list with no empty value, 1=add also an empty value into list + * @param array $exclude Array list of users id to exclude + * @param int $disabled If select list must be disabled + * @param array|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me + * @param array $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled + * @param string $force_entity '0' or Ids of environment to force + * @param int $maxlength Maximum length of string into list (0=no limit) + * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status + * @param string $morefilter Add more filters into sql request (Example: 'employee = 1') + * @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list + * @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. + * @param string $morecss More css + * @param int $noactive Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). + * @param int $outputmode 0=HTML select string, 1=Array + * @param bool $multiple add [] in the name of element and add 'multiple' attribut + * @return string HTML select string * @see select_dolgroups() */ public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false) diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 2361edf8a27..2277563aaa0 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -1,9 +1,9 @@ - * Copyright (C) 2013-2018 Laurent Destailleur + * Copyright (C) 2013-2020 Laurent Destailleur * Copyright (C) 2012-2016 Regis Houssin * Copyright (C) 2018 Charlene Benke - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Frédéric France * * 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 @@ -476,7 +476,7 @@ if ($resql) $include = ''; - if (!empty($user->rights->holiday->read_all)) $include = 'hierarchyme'; // Can see all + if (empty($user->rights->holiday->read_all)) $include = 'hierarchyme'; // Can see only its hierarchyl print '
    '; print ''."\n"; @@ -488,7 +488,7 @@ if ($resql) if (!empty($arrayfields['cp.ref']['checked'])) { print ''; } From 93e69d515d66542609e281fa2293c82790d108b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 5 May 2020 06:38:24 +0200 Subject: [PATCH 231/456] nowtime is not defined --- htdocs/core/js/lib_notification.js.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 769e0a36157..250eb0231a6 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -37,8 +37,9 @@ if (!($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root.'/' || $_SERVER['HTTP top_httphead('text/javascript; charset=UTF-8'); print 'var login = \''.$_SESSION['dol_login'].'\';'."\n"; + print 'var nowtime = Date.now();'; print 'var time_auto_update = '.$conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY.';'."\n"; // Always defined - print 'var time_js_next_test = (Date.now() + time_auto_update);'."\n"; + print 'var time_js_next_test = (nowtime + time_auto_update);'."\n"; ?> /* Check if permission ok */ From c0b9fef22907d7cc747b28f142a345702e75ae79 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 5 May 2020 08:40:30 +0200 Subject: [PATCH 232/456] Fix issue in status name Before : $commandestatic->LibStatut($obj->nb) shows bad value because bad param Now : $commandestatic->LibStatut($obj->fk_statut) shows good value. --- htdocs/fourn/commande/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 78d6c01679f..dd50efc7591 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -189,7 +189,7 @@ if ($resql) $obj = $db->fetch_object($resql); print ''; - print ''; + print ''; print ''; print "\n"; From d6de46cc05abc417b72624534c84a8075642edf1 Mon Sep 17 00:00:00 2001 From: oscim Date: Tue, 5 May 2020 08:54:52 +0200 Subject: [PATCH 233/456] Update list.php Add massaction for payment invoice --- htdocs/compta/facture/list.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ed773b038bb..7caef50c223 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -297,7 +297,16 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } -if ($massaction == 'withdrawrequest') +if($massaction == 'reglement'){ + + $arrayofselected=is_array($toselect)?$toselect:array(); + + $loc = dol_buildpath('/compta/paiement.php', 2).'?facids='.implode(',', $arrayofselected); + + header('Location: '.$loc); + exit; +} +elseif ($massaction == 'withdrawrequest') { $langs->load("withdrawals"); @@ -657,6 +666,7 @@ if ($resql) 'generate_doc'=>$langs->trans("ReGeneratePDF"), 'builddoc'=>$langs->trans("PDFMerge"), 'presend'=>$langs->trans("SendByMail"), + 'reglement'=>$langs->trans("InvoicePaymentsLimits"), ); if ($conf->prelevement->enabled) { $langs->load("withdrawals"); From 204c788dec7fae27cfe6e0da5d1a6afa34baba67 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 5 May 2020 06:56:54 +0000 Subject: [PATCH 234/456] Fixing style errors. --- htdocs/compta/facture/list.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7caef50c223..a06230ab60b 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -298,7 +298,6 @@ if (empty($reshook)) } if($massaction == 'reglement'){ - $arrayofselected=is_array($toselect)?$toselect:array(); $loc = dol_buildpath('/compta/paiement.php', 2).'?facids='.implode(',', $arrayofselected); From c7753dd2e0198a5a0d8c08684aff391cf1e1571c Mon Sep 17 00:00:00 2001 From: oscim Date: Tue, 5 May 2020 09:44:46 +0200 Subject: [PATCH 235/456] Update list.php --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index a06230ab60b..3d7493312d1 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -300,7 +300,7 @@ if (empty($reshook)) if($massaction == 'reglement'){ $arrayofselected=is_array($toselect)?$toselect:array(); - $loc = dol_buildpath('/compta/paiement.php', 2).'?facids='.implode(',', $arrayofselected); + $loc = dol_buildpath('/compta/paiement.php', 2).'?action=create&facids='.implode(',', $arrayofselected); header('Location: '.$loc); exit; From c14b6884e3f71de24cd27dc4da3d1e0db04bb13d Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 5 May 2020 10:02:36 +0200 Subject: [PATCH 236/456] FIX : missing hook init + table class + $page not set --- htdocs/compta/prelevement/bons.php | 1 + htdocs/compta/prelevement/list.php | 1 + htdocs/compta/prelevement/rejets.php | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 2b67b73c95b..27654de1ad0 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -53,6 +53,7 @@ $search_ref = GETPOST('search_ref', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); $bon=new BonPrelevement($db, ""); +$hookmanager->initHooks(array('withdrawalsreceiptslist')); /* diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 81e58e19cca..eb741b981d9 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -56,6 +56,7 @@ $search_company = GETPOST('search_company', 'alpha'); $statut = GETPOST('statut', 'int'); $bon=new BonPrelevement($db, ""); +$hookmanager->initHooks(array('withdrawalsreceiptslineslist')); $ligne=new LignePrelevement($db, $user); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 333d07a4617..7611945a40d 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -40,6 +40,7 @@ $result = restrictedArea($user, 'prelevement', '', '', 'bons'); // Get supervariables $page = GETPOST('page', 'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $sortorder = GETPOST('sortorder', 'alpha'); $sortfield = GETPOST('sortfield', 'alpha'); @@ -57,6 +58,7 @@ if ($sortorder == "") $sortorder="DESC"; if ($sortfield == "") $sortfield="p.datec"; $rej = new RejetPrelevement($db, $user); +$hookmanager->initHooks(array('withdrawalsreceiptsrejectedlist')); $ligne = new LignePrelevement($db, $user); /* @@ -85,7 +87,7 @@ if ($result) print_barre_liste($langs->trans("WithdrawsRefused"), $page, $_SERVER["PHP_SELF"], $urladd, $sortfield, $sortorder, '', $num); print"\n\n"; - print '
    '; - print ''; + print ''; print '
    '.$commandestatic->LibStatut($obj->nb).''.$commandestatic->LibStatut($obj->fk_statut).''.$obj->nb.' '.$commandestatic->LibStatut($obj->fk_statut, 3).'
    '; + print '
    '; print ''; print_liste_field_titre("Line", $_SERVER["PHP_SELF"], "p.ref", '', $urladd); print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", '', $urladd); From 78a427c9967a398e0fd8d3aaeaa4c1b723a487db Mon Sep 17 00:00:00 2001 From: atm-lena Date: Tue, 5 May 2020 14:35:03 +0200 Subject: [PATCH 237/456] FIX wrong user right's name to top menu "commercial" --- htdocs/core/menus/standard/eldy.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 84555ba23cf..f1859c0fcc5 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -234,7 +234,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = ) ? 1 : 0, 'perms'=>(!empty($user->rights->propal->lire) || !empty($user->rights->commande->lire) || - !empty($user->rights->supplier_order->lire) || + !empty($user->rights->fournisseur->lire) || !empty($user->rights->supplier_proposal->lire) || !empty($user->rights->contrat->lire) || !empty($user->rights->ficheinter->lire) From db591cdcd8b9920455af51ce28267b075cbebf13 Mon Sep 17 00:00:00 2001 From: kamel Date: Tue, 5 May 2020 14:47:31 +0200 Subject: [PATCH 238/456] FIX: show value of the extrafields in the bank list --- htdocs/compta/bank/list.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index eaefdfb6573..457a5986dea 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -556,6 +556,12 @@ foreach ($accounts as $key=>$type) } // Extra fields + if (is_array($objecttmp->array_options)) { + $obj = new stdClass(); + foreach ($objecttmp->array_options as $k => $v) { + $obj->$k = $v; + } + } include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook $parameters = array('arrayfields'=>$arrayfields); From 7e6b5a384d00ea1d92a6b66f84f1a7e11c4df1a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 15:16:30 +0200 Subject: [PATCH 239/456] Code comment --- htdocs/core/class/html.form.class.php | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f48ce989a7a..7073fd41989 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1669,24 +1669,24 @@ class Form /** * Return select list of users * - * @param string $selected User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed) - * @param string $htmlname Field name in form - * @param int $show_empty 0=list with no empty value, 1=add also an empty value into list - * @param array $exclude Array list of users id to exclude - * @param int $disabled If select list must be disabled - * @param array|string $include Array list of users id to include or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me - * @param array $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled - * @param string $force_entity '0' or Ids of environment to force - * @param int $maxlength Maximum length of string into list (0=no limit) - * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status - * @param string $morefilter Add more filters into sql request (Example: 'employee = 1') - * @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list - * @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. - * @param string $morecss More css - * @param int $noactive Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). - * @param int $outputmode 0=HTML select string, 1=Array - * @param bool $multiple add [] in the name of element and add 'multiple' attribut - * @return string HTML select string + * @param string $selected User id or user object of user preselected. If 0 or < -2, we use id of current user. If -1, keep unselected (if empty is allowed) + * @param string $htmlname Field name in form + * @param int $show_empty 0=list with no empty value, 1=add also an empty value into list + * @param array $exclude Array list of users id to exclude + * @param int $disabled If select list must be disabled + * @param array|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me + * @param array $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled + * @param string $force_entity '0' or Ids of environment to force + * @param int $maxlength Maximum length of string into list (0=no limit) + * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status + * @param string $morefilter Add more filters into sql request (Example: 'employee = 1') + * @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list + * @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty. + * @param string $morecss More css + * @param int $noactive Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). + * @param int $outputmode 0=HTML select string, 1=Array + * @param bool $multiple add [] in the name of element and add 'multiple' attribut + * @return string HTML select string * @see select_dolgroups() */ public function select_dolusers($selected = '', $htmlname = 'userid', $show_empty = 0, $exclude = null, $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $maxlength = 0, $showstatus = 0, $morefilter = '', $show_every = 0, $enableonlytext = '', $morecss = '', $noactive = 0, $outputmode = 0, $multiple = false) From 36a0780f148c684e3172a689e2d8e550d0473b52 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 15:20:40 +0200 Subject: [PATCH 240/456] More complete fix for #13817 --- htdocs/core/menus/standard/eldy.lib.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index f1859c0fcc5..17edca45676 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -227,19 +227,21 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $tmpentry = array( 'enabled'=>(!empty($conf->propal->enabled) || !empty($conf->commande->enabled) || - !empty($conf->supplier_order->enabled) || - !empty($conf->supplier_proposal->enabled) || - !empty($conf->contrat->enabled) || + !empty($conf->fournisseur->enabled) || + !empty($conf->supplier_proposal->enabled) || + !empty($conf->supplier_order->enabled) || + !empty($conf->contrat->enabled) || !empty($conf->ficheinter->enabled) ) ? 1 : 0, 'perms'=>(!empty($user->rights->propal->lire) || !empty($user->rights->commande->lire) || !empty($user->rights->fournisseur->lire) || !empty($user->rights->supplier_proposal->lire) || + !empty($user->rights->supplier_order->lire) || !empty($user->rights->contrat->lire) || !empty($user->rights->ficheinter->lire) ), - 'module'=>'propal|commande|supplier_order|supplier_proposal|contrat|ficheinter' + 'module'=>'propal|commande|supplier_proposal|supplier_order|contrat|ficheinter' ); $onlysupplierorder = ! empty($user->rights->fournisseur->commande->lire) && From 797beef79f7c351e59cb566f5909cafc81c23c92 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 15:26:41 +0200 Subject: [PATCH 241/456] Fix --- htdocs/compta/facture/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 3d7493312d1..c5a3d60f99c 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -297,7 +297,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } -if($massaction == 'reglement'){ +if ($massaction == 'makepayment'){ $arrayofselected=is_array($toselect)?$toselect:array(); $loc = dol_buildpath('/compta/paiement.php', 2).'?action=create&facids='.implode(',', $arrayofselected); @@ -665,7 +665,7 @@ if ($resql) 'generate_doc'=>$langs->trans("ReGeneratePDF"), 'builddoc'=>$langs->trans("PDFMerge"), 'presend'=>$langs->trans("SendByMail"), - 'reglement'=>$langs->trans("InvoicePaymentsLimits"), + //'makepayment'=>$langs->trans("InvoicePaymentsLimits"), TODO Blank page when using this ); if ($conf->prelevement->enabled) { $langs->load("withdrawals"); From 1b35380dda4b47606d4ee8172c4152770af65a63 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Mon, 4 May 2020 14:55:24 +0200 Subject: [PATCH 242/456] NEW stats invoice graph with 3 bars --- htdocs/compta/facture/stats/index.php | 4 ++-- htdocs/core/class/dolgraph.class.php | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index f5472196cc2..1a771c8e60b 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -58,8 +58,8 @@ if ($user->socid > 0) $nowyear = strftime("%Y", dol_now()); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; -//$startyear=$year-2; -$startyear = $year - 1; +if(!empty($conf->global->INVOICE_STATS_GRAPHS_SHOW_2_YEARS)) $startyear=$year-2; +else $startyear=$year-1; $endyear = $year; diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 8af46154223..3f1bfa245fb 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -894,7 +894,15 @@ class DolGraph if ($i > $firstlot) $this->stringtoshow .= ', '."\n"; $color = sprintf("%02x%02x%02x", $this->datacolor[$i][0], $this->datacolor[$i][1], $this->datacolor[$i][2]); $this->stringtoshow .= '{ '; - if (!isset($this->type[$i]) || $this->type[$i] == 'bars') $this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "'.($i == $firstlot ? 'center' : 'left').'", barWidth: 0.5 }, '; + if (! isset($this->type[$i]) || $this->type[$i] == 'bars') { + if($nblot == 3) { + if($i == $firstlot) $align = 'right'; + else if($i == $firstlot+1) $align = 'center'; + else $align = 'left'; + $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.$align.'", barWidth: 0.45 }, '; + } + else $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.($i==$firstlot?'center':'left').'", barWidth: 0.5 }, '; + } if (isset($this->type[$i]) && ($this->type[$i] == 'lines' || $this->type[$i] == 'linesnopoint')) $this->stringtoshow .= 'lines: { show: true, fill: false }, points: { show: '.($this->type[$i] == 'linesnopoint' ? 'false' : 'true').' }, '; $this->stringtoshow .= 'color: "#'.$color.'", label: "'.(isset($this->Legend[$i]) ? dol_escape_js($this->Legend[$i]) : '').'", data: d'.$i.' }'; $i++; From eab69c3a598e7d826ce1fbf31b8402ad0063d8b3 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Mon, 4 May 2020 15:19:45 +0200 Subject: [PATCH 243/456] NEW multiselect categorie client stats facturation --- htdocs/compta/facture/stats/index.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 1a771c8e60b..4c0d23c90e2 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; +if(!empty($conf->category->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); @@ -49,6 +50,7 @@ $categ_id = GETPOST('categ_id', 'categ_id'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); +$custcats = GETPOST('custcats', 'array'); // Security check if ($user->socid > 0) { @@ -66,7 +68,7 @@ $endyear = $year; /* * View */ - +if(!empty($conf->category->enabled)) $langs->load('categories'); $form = new Form($db); $formcompany = new FormCompany($db); $formother = new FormOther($db); @@ -93,6 +95,10 @@ $stats = new FactureStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typ if ($mode == 'customer') { if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')'; + if (is_array($custcats) && !empty($custcats)) { + $stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cat ON (f.fk_soc = cat.fk_soc)'; + $stats->where .= ' AND cat.fk_categorie IN ('.implode(',', $custcats).')'; + } } if ($mode == 'supplier') { @@ -256,6 +262,13 @@ if ($mode == 'customer') $filter = 's.client in (1,2,3)'; if ($mode == 'supplier') $filter = 's.fournisseur = 1'; print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1); print ''; +if(!empty($conf->category->enabled) && $mode == 'customer') { + // Customer Category + print ''; + } // ThirdParty Type print ''; print ''; + // MO + if (!empty($conf->mrp->enabled) && $user->rights->mrp->read) + { + $nblines++; + //$ret = $product->load_stats_mo($socid); + if ($ret < 0) dol_print_error($db); + $langs->load("orders"); + print ''; + print ''; + } // Customer proposals if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { @@ -379,7 +397,7 @@ function show_stats_for_company($product, $socid) if ($ret < 0) dol_print_error($db); $langs->load("propal"); print ''; print ''; } - // MO - if (!empty($conf->mrp->enabled) && $user->rights->mrp->read) - { - $nblines++; - //$ret = $product->load_stats_mo($socid); - if ($ret < 0) dol_print_error($db); - $langs->load("orders"); - print ''; - print ''; - } // Customer invoices if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { @@ -469,7 +469,7 @@ function show_stats_for_company($product, $socid) if ($ret < 0) dol_print_error($db); $langs->load("bills"); print ''; - print ''; + print ''; print ''; if ($object->statut == Holiday::STATUS_REFUSED) From db8596743c7c081674420aa3a53edc68c75dd851 Mon Sep 17 00:00:00 2001 From: Vaadasch Date: Thu, 7 May 2020 22:09:55 +0200 Subject: [PATCH 285/456] Update facture.class.php Auto-update dates (if not empty) of services when cloning facture. Actual code is only for month by month. If empty (start or end) => do nothing If set, update for next month if there is only 1d between what had been set and the start (or end) of the month. If there is more than one day from start or end of the month => do nothing, because we're not sure the service is by month Worst case scenario : the facture is cloned, the service is updated with new unwanted dates User need to manually updates date : he would have done that either way --- htdocs/compta/facture/class/facture.class.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 90ed560b3cf..395de47d443 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1177,6 +1177,30 @@ class Facture extends CommonInvoice { unset($object->lines[$i]); unset($object->products[$i]); // Tant que products encore utilise + } + // Bloc to update dates of service (month by month only if previously filled at 1d near start or end of month) + // If it's a service with start and end dates + if ($line->product_type == 1 && !empty($line->date_start) && !empty($line->date_end) ) { + // Get the dates + $start = dol_getdate($line->date_start); + $end = dol_getdate($line->date_end); + + // Get the first and last day of the month + $first = dol_get_first_day($start['year'], $start['mon']); + $last = dol_get_first_day($end['year'], $end['mon']); + + // Get diff betweend start/end of month and previously filled + $diffFirst = num_between_day($first, dol_mktime($start['hours'], $start['minutes'], $start['seconds'], $start['mon'], $start['mday'], $start['year'], 'user')); + $diffLast = num_between_day(dol_mktime($end['hours'], $end['minutes'], $end['seconds'], $end['mon'], $end['mday'], $end['year'], 'user'), $last); + + // If there is <= 1d (or 2?) of start/or/end of month + if ($diffFirst <= 2 && $diffLast <= 2) { + $nextMonth = dol_get_next_month($end['mon'], $end['year']); + $newFirst = dol_get_first_day($nextMonth['year'],$nextMonth['month']); + $newLast = dol_get_last_day($nextMonth['year'],$nextMonth['month']); + $object->lines[$i]->date_start = $newFirst; + $object->lines[$i]->date_end = $newLast; + } } } From 7514a625fdb17a9226185ddc9a7fda64b84f625e Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 7 May 2020 20:11:59 +0000 Subject: [PATCH 286/456] Fixing style errors. --- htdocs/compta/facture/class/facture.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 395de47d443..ffa96fe5237 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1184,7 +1184,7 @@ class Facture extends CommonInvoice // Get the dates $start = dol_getdate($line->date_start); $end = dol_getdate($line->date_end); - + // Get the first and last day of the month $first = dol_get_first_day($start['year'], $start['mon']); $last = dol_get_first_day($end['year'], $end['mon']); @@ -1196,8 +1196,8 @@ class Facture extends CommonInvoice // If there is <= 1d (or 2?) of start/or/end of month if ($diffFirst <= 2 && $diffLast <= 2) { $nextMonth = dol_get_next_month($end['mon'], $end['year']); - $newFirst = dol_get_first_day($nextMonth['year'],$nextMonth['month']); - $newLast = dol_get_last_day($nextMonth['year'],$nextMonth['month']); + $newFirst = dol_get_first_day($nextMonth['year'], $nextMonth['month']); + $newLast = dol_get_last_day($nextMonth['year'], $nextMonth['month']); $object->lines[$i]->date_start = $newFirst; $object->lines[$i]->date_end = $newLast; } From 206b16410ebd615c87ed7fbf120804f53c5d980e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2020 22:52:32 +0200 Subject: [PATCH 287/456] Revert the option to avoid to introduce a feature that is duplicate with already existing view "Events/Agenda". It also keeps a common behaviour between other tools. Maxi debug on messages of tickets --- htdocs/comm/action/class/actioncomm.class.php | 3 +- htdocs/comm/action/list.php | 39 +++++++----- htdocs/contrat/card.php | 5 +- htdocs/core/class/html.formactions.class.php | 63 +++++++++++-------- htdocs/core/lib/functions.lib.php | 6 +- htdocs/core/lib/ticket.lib.php | 2 +- .../install/mysql/migration/11.0.0-12.0.0.sql | 2 +- htdocs/langs/en_US/main.lang | 1 + htdocs/public/ticket/view.php | 2 +- htdocs/societe/card.php | 2 +- htdocs/theme/eldy/timeline.inc.php | 2 +- htdocs/ticket/card.php | 20 ++++-- htdocs/ticket/class/actions_ticket.class.php | 3 +- htdocs/ticket/class/ticket.class.php | 2 +- 14 files changed, 88 insertions(+), 64 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index fac4dc45715..7141d875567 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -405,7 +405,6 @@ class ActionComm extends CommonObject $this->userassigned[$tmpid] = array('id'=>$tmpid, 'transparency'=>$this->transparency); } - $userownerid = $this->userownerid; $userdoneid = $this->userdoneid; @@ -484,7 +483,7 @@ class ActionComm extends CommonObject $sql .= (strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : "null").", "; $sql .= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '') ? "'".$this->db->escape($this->durationp)."'" : "null").", "; // deprecated $sql .= (isset($this->type_id) ? $this->type_id : "null").","; - $sql .= ($code ? ("'".$code."'") : "null").", "; + $sql .= ($code ? ("'".$this->db->escape($code)."'") : "null").", "; $sql .= ($this->ref_ext ? ("'".$this->db->idate($this->ref_ext)."'") : "null").", "; $sql .= ((isset($this->socid) && $this->socid > 0) ? $this->socid : "null").", "; $sql .= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : "null").", "; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index a4b1a9618fb..ef6e21c39cd 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -242,7 +242,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; $sql = "SELECT"; if ($usergroup > 0) $sql .= " DISTINCT"; $sql .= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,"; -$sql .= " a.id, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,"; +$sql .= " a.id, a.code, a.label, a.note, a.datep as dp, a.datep2 as dp2, a.fulldayevent, a.location,"; $sql .= ' a.fk_user_author,a.fk_user_action,'; $sql .= " a.fk_contact, a.note, a.percent as percent,"; $sql .= " a.fk_element, a.elementtype, a.datec, a.tms as datem,"; @@ -385,14 +385,8 @@ if ($resql) print ''; $nav = ''; - //if ($actioncode) $nav.=''; - //if ($resourceid) $nav.=''; if ($filter) $nav .= ''; - //if ($filtert) $nav.=''; - //if ($socid) $nav.=''; if ($showbirthday) $nav .= ''; - //if ($pid) $nav.=''; - //if ($usergroup) $nav.=''; print $nav; dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); @@ -548,6 +542,7 @@ if ($resql) $actionstatic->id = $obj->id; $actionstatic->ref = $obj->id; + $actionstatic->code = $obj->code; $actionstatic->type_code = $obj->type_code; $actionstatic->type_label = $obj->type_label; $actionstatic->type_picto = $obj->type_picto; @@ -583,21 +578,31 @@ if ($resql) if (!empty($arrayfields['c.libelle']['checked'])) { print ''; } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 52144d44d34..25857767e80 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -2227,13 +2227,12 @@ else $MAXEVENT = 10; - $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt', DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id); + $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'contract', $socid, 1, 'listactions', $MAXEVENT, '', $morehtmlright); - + $somethingshown = $formactions->showactions($object, 'contract', $socid, 1, 'listactions', $MAXEVENT, '', $morehtmlcenter); print ''; } diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index b06877c8c3b..352fcebb06b 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -165,13 +165,12 @@ class FormActions * @param string $morecss More css on table * @param int $max Max number of record * @param string $moreparambacktopage More param for the backtopage - * @param string $morehtmlright More html text on right of title line + * @param string $morehtmlcenter More html text on center of title line * @return int <0 if KO, >=0 if OK */ - public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlright = '') + public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlcenter = '') { global $langs, $conf, $user; - global $bc; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; @@ -208,8 +207,9 @@ class FormActions $newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.dol_print_date(dol_now(), 'dayhourlog').'&origin='.$typeelement.'&originid='.$object->id.($object->socid > 0 ? '&socid='.$object->socid : ($socid > 0 ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage)); } + print ''."\n"; - print load_fiche_titre($title, $newcardbutton, '', 0, 0, '', $morehtmlright); + print load_fiche_titre($title, $newcardbutton, '', 0, 0, '', $morehtmlcenter); $page = 0; $param = ''; @@ -230,29 +230,29 @@ class FormActions $cacheusers = array(); $cursorevent = 0; - foreach ($listofactions as $action) + foreach ($listofactions as $actioncomm) { if ($max && $cursorevent >= $max) break; - $ref = $action->getNomUrl(1, -1); - $label = $action->getNomUrl(0, 38); + $ref = $actioncomm->getNomUrl(1, -1); + $label = $actioncomm->getNomUrl(0, 38); print ''; // Ref print ''; // Onwer print ''; + // Type print ''; // Label print ''; // Date - print ''; print ''; print ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 43cee63c1ed..bcf47a58eef 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3155,7 +3155,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'intervention', 'label', 'language', 'list', 'listlight', 'lot', 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', - 'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', + 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label', @@ -3190,7 +3190,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $arrayconvpictotofa = array( 'account'=>'university', 'accountancy'=>'money-check-alt', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'billa'=>'file-excel', 'billd'=>'file-medical', 'bom'=>'cubes', - 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', + 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', 'hrm'=>'umbrella-beach', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', @@ -3263,7 +3263,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $arrayconvpictotomorcess = array( 'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'accountancy'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'bill'=>'bg-infobox-commande', 'billa'=>'bg-infobox-commande', 'billd'=>'bg-infobox-commande', - 'cash-register'=>'bg-infobox-bank_account', 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', + 'cash-register'=>'bg-infobox-bank_account', 'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'conversation'=>'bg-infobox-contrat', 'donation'=>'bg-infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action', 'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat', 'multicurrency'=>'bg-infobox-bank_account', diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index e12531b3846..0a50eb7407f 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -709,7 +709,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out .= $histo[$key]['id']; $out .= ' '; } else { - $out .= $actionstatic->getNomUrl(1, -1).' '; + $out .= $actionstatic->getNomUrl(1, -1, 'valignmiddle').' '; } //if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id) diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 0730511ad99..38d0acb97fa 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -275,4 +275,4 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); - +ALTER TABLE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index fb0808e0953..8c992bf91ca 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -426,6 +426,7 @@ Modules=Modules/Applications Option=Option List=List FullList=Full list +FullConversation=Full conversation Statistics=Statistics OtherStatistics=Other statistics Status=Status diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index 1938c68de3e..af656e69ab0 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -370,7 +370,7 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a } // Message list - print load_fiche_titre($langs->trans('TicketMessagesList'), '', 'messages@ticket'); + print load_fiche_titre($langs->trans('TicketMessagesList'), '', 'object_conversation'); $object->viewTicketMessages(false, true, $object->dao); } else diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index b5400db04b3..195d4df88bb 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -2826,7 +2826,7 @@ else $MAXEVENT = 10; - $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); + $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php index 21e683e42f0..eb13821c221 100644 --- a/htdocs/theme/eldy/timeline.inc.php +++ b/htdocs/theme/eldy/timeline.inc.php @@ -154,7 +154,7 @@ a.timeline-btn:hover border-radius: 50%; text-align: center; left: 18px; - top: 0; + top: 5px; } .timeline > .time-label > span { font-weight: 600; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 7d5ab5fe228..6e400b3eeaa 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -143,6 +143,7 @@ if (empty($reshook)) { $action = 'view'; } + // Action to add an action (not a message) if (GETPOST('add', 'alpha') && $user->rights->ticket->write) { $error = 0; @@ -381,6 +382,7 @@ if (empty($reshook)) { $action = 'view'; } + // Action to add an action (not a message) if ($action == 'add_message' && GETPOSTISSET('btn_add_message') && $user->rights->ticket->read) { $ret = $object->newMessage($user, $action, (GETPOST('private_message', 'alpha') == "on" ? 1 : 0)); @@ -1218,7 +1220,8 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; // add a message - if ($action == 'presend' || $action == 'presend_addmessage') { + if ($action == 'presend' || $action == 'presend_addmessage') + { $action = 'add_message'; // action to use to post the message $modelmail = 'ticket_send'; @@ -1293,8 +1296,8 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd print ''; } - // Show messages on card - if (empty($conf->global->TICKET_HIDE_MESSAGES_ON_CARD)) { + // Show messages on card (Note: this is a duplicate of the view Events/Agenda but on the main tab) + if (! empty($conf->global->TICKET_SHOW_MESSAGES_ON_CARD)) { $param = '&id='.$object->id; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; @@ -1337,16 +1340,23 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd print showDirectPublicLink($object).'
    '; print ''; - if (!empty($conf->global->TICKET_HIDE_MESSAGES_ON_CARD)) { + if (empty($conf->global->TICKET_SHOW_MESSAGES_ON_CARD)) { print '
    '; + $MAXEVENT = 10; + + $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/ticket/messaging.php?id='.$object->id); + $morehtmlcenter .= ' '; + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullList'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/ticket/agenda.php?id='.$object->id); + // List of actions on element include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'ticket', $socid, 1); + $somethingshown = $formactions->showactions($object, 'ticket', $socid, 1, 'listactions', $MAXEVENT, '', $morehtmlcenter); print '
    '; } + print ''; } } diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 9a67c3dd574..9931b12ffa2 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -272,6 +272,7 @@ class ActionsTicket print $langs->trans('User'); print ''; } + print ''; foreach ($this->dao->cache_msgs_ticket as $id => $arraymsgs) { if (!$arraymsgs['private'] @@ -280,7 +281,7 @@ class ActionsTicket //print ''; print ''; print ''; if ($show_user) { print ''; } diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 59fe85e66ef..85406c46faa 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -274,7 +274,7 @@ if (!empty($conf->service->enabled)) print '\n"; diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index f0c3bea82b9..c73e874a465 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -29,5 +29,5 @@ require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; $key = GETPOST('key'); -$module = new modtcpdfbarcode($db); +$module = new modTcpdfbarcode($db); $result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y'); diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 80d67513bf2..eac1f40bfd1 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -31,14 +31,14 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -require '../main.inc.php'; // Load $user and permissions +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -if ($_SESSION["publicterminal"]){ - // Decode place if is a order from customer phone +if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + // Decode place if it is an order from customer phone $key = GETPOST('key'); $place=dol_decode($key); } @@ -53,7 +53,7 @@ if ($setterminal > 0) $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter")); -if ($_SESSION["publicterminal"]) { +if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers } elseif (empty($user->rights->takepos->run)) { diff --git a/htdocs/takepos/public/auto_order.php b/htdocs/takepos/public/auto_order.php index c97edfdc0e7..5b463959b69 100644 --- a/htdocs/takepos/public/auto_order.php +++ b/htdocs/takepos/public/auto_order.php @@ -24,6 +24,10 @@ if (!defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) if (!defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +require '../../main.inc.php'; + $_SESSION["basiclayout"] = 1; $_SESSION["publicterminal"] = true; // Is a public customer -require '../phone.php'; + +define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1); +include '../phone.php'; From 790bef98e5e271cc3750d2f9ff5749b590262ebb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2020 23:45:33 +0200 Subject: [PATCH 291/456] Look and feel v12 --- htdocs/ticket/class/actions_ticket.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 147f6228005..0fb5835cb4c 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -281,7 +281,7 @@ class ActionsTicket //print ''; print ''; print ''; if ($show_user) { print ''; @@ -531,8 +531,8 @@ if ($mode == 'searchkey') { $obj = $db->fetch_object($result); } - print ''.img_edit().''; - print '  '; + print ''.img_edit().''; + print ' '; print ''.img_delete().''; print '  '; $htmltext = $langs->trans("OriginalValueWas", $newlangfileonly->tab_translate[$key]); @@ -541,7 +541,7 @@ if ($mode == 'searchkey') elseif (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { //print $key.'-'.$val; - print ''.img_edit_add($langs->trans("Overwrite")).''; + print ''.img_edit_add($langs->trans("Overwrite")).''; } if (!empty($conf->global->MAIN_FEATURES_LEVEL)) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index ef6e21c39cd..e804213cdce 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -625,7 +625,7 @@ if ($resql) $formatToUse = $obj->fulldayevent ? 'day' : 'dayhour'; // Start date if (!empty($arrayfields['a.datep']['checked'])) { - print ''; } diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 8dc2e418cc8..474a4f03696 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -27,7 +27,7 @@ /** * Show filter form in agenda view * - * @param Object $form Form object + * @param Form $form Form object * @param int $canedit Can edit filter fields * @param int $status Status * @param int $year Year @@ -123,7 +123,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print $langs->trans("ThirdParty").'   '; print ''; } From a649dcecf767cd63a5b30234916b1c7b6613fac9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 03:01:51 +0200 Subject: [PATCH 295/456] Look and field --- htdocs/takepos/admin/bar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index 5c255dc89c7..2508ab56040 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -85,7 +85,7 @@ print ''; print '
    '; print '
    '.$langs->trans("CustomersProspectsCategoriesShort").''; + $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1); + print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%"); + print '
    '.$langs->trans("ThirdPartyType").''; $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. From b2a9791dca9bd3872ba359a77439290167820ce9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 16:33:02 +0200 Subject: [PATCH 244/456] Fix pagination on pages "Related items" --- htdocs/core/lib/product.lib.php | 42 +++++++++---------- htdocs/product/stats/commande.php | 22 ++++------ htdocs/product/stats/commande_fournisseur.php | 20 ++++----- htdocs/product/stats/contrat.php | 21 ++++------ htdocs/product/stats/facture.php | 20 ++++----- htdocs/product/stats/facture_fournisseur.php | 22 ++++------ htdocs/product/stats/mo.php | 22 ++++------ htdocs/product/stats/propal.php | 20 ++++----- htdocs/product/stats/supplier_proposal.php | 22 ++++------ 9 files changed, 90 insertions(+), 121 deletions(-) diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index a6ee33e9a65..0615ff127b0 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -353,6 +353,24 @@ function show_stats_for_company($product, $socid) print ''.$langs->trans("TotalQuantity").'
    '; + print ''.img_object('', 'mrp').' '.$langs->trans("MO").''; + print ''; + print $product->stats_mo['suppliers']; + print ''; + print $product->stats_mo['nb']; + print ''; + print $product->stats_mo['qty']; + print '
    '; - print ''.img_object('', 'propal').' '.$langs->trans("SupplierProposals").''; + print ''.img_object('', 'supplier_proposal').' '.$langs->trans("SupplierProposals").''; print ''; print $product->stats_proposal_supplier['suppliers']; print ''; @@ -415,7 +433,7 @@ function show_stats_for_company($product, $socid) if ($ret < 0) dol_print_error($db); $langs->load("orders"); print '
    '; - print ''.img_object('', 'order').' '.$langs->trans("SuppliersOrders").''; + print ''.img_object('', 'supplier_order').' '.$langs->trans("SuppliersOrders").''; print ''; print $product->stats_commande_fournisseur['suppliers']; print ''; @@ -425,24 +443,6 @@ function show_stats_for_company($product, $socid) print '
    '; - print ''.img_object('', 'mrp').' '.$langs->trans("MO").''; - print ''; - print $product->stats_mo['suppliers']; - print ''; - print $product->stats_mo['nb']; - print ''; - print $product->stats_mo['qty']; - print '
    '; - print ''.img_object('', 'bill').' '.$langs->trans("SuppliersInvoices").''; + print ''.img_object('', 'supplier_invoice').' '.$langs->trans("SuppliersInvoices").''; print ''; print $product->stats_facture_fournisseur['suppliers']; print ''; diff --git a/htdocs/product/stats/commande.php b/htdocs/product/stats/commande.php index 71c1b0f1ef7..9898c13f21b 100644 --- a/htdocs/product/stats/commande.php +++ b/htdocs/product/stats/commande.php @@ -164,26 +164,22 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
    '; + print_barre_liste($langs->trans("CustomersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
    '; print '
    '; print $langs->trans('Period').' ('.$langs->trans("OrderDate").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 7a5b88000e1..61024cdd7ff 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -172,26 +172,22 @@ if ($id > 0 || !empty($ref)) { if ($result) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
    '; + print_barre_liste($langs->trans("SuppliersOrders"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
    '; print '
    '; print $langs->trans('Period').' ('.$langs->trans("OrderDate").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/product/stats/contrat.php b/htdocs/product/stats/contrat.php index 8e61446a834..8f88044d913 100644 --- a/htdocs/product/stats/contrat.php +++ b/htdocs/product/stats/contrat.php @@ -153,27 +153,24 @@ if ($id > 0 || !empty($ref)) if ($result) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; + if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; + if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); + print_barre_liste($langs->trans("Contrats"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - $i = 0; + if (!empty($page)) $option .= '&page='.urlencode($page); + + $i = 0; print '
    '; print ''; diff --git a/htdocs/product/stats/facture.php b/htdocs/product/stats/facture.php index e42afd9f28c..342cd3058a2 100644 --- a/htdocs/product/stats/facture.php +++ b/htdocs/product/stats/facture.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page -$langs->loadLangs(array('companies', 'bills', 'products')); +$langs->loadLangs(array('companies', 'bills', 'products', 'supplier_proposal')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -185,25 +185,21 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); + print_barre_liste($langs->trans("CustomersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + print '
    '; print '
    '; print $langs->trans('Period').' ('.$langs->trans("DateInvoice").') - '; diff --git a/htdocs/product/stats/facture_fournisseur.php b/htdocs/product/stats/facture_fournisseur.php index 29774709e5e..f39d4ab73b3 100644 --- a/htdocs/product/stats/facture_fournisseur.php +++ b/htdocs/product/stats/facture_fournisseur.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page -$langs->loadLangs(array('companies', 'bills', 'products', 'companies')); +$langs->loadLangs(array('companies', 'bills', 'products', 'companies', 'supplier_proposal')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -165,26 +165,22 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], "&id=$product->id", $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
    '; + print_barre_liste($langs->trans("SuppliersInvoices"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
    '; print '
    '; print $langs->trans('Period').' ('.$langs->trans("DateInvoice").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/product/stats/mo.php b/htdocs/product/stats/mo.php index 0a148ad2c8a..51e91aeaaac 100644 --- a/htdocs/product/stats/mo.php +++ b/htdocs/product/stats/mo.php @@ -150,27 +150,23 @@ if ($id > 0 || !empty($ref)) if ($result) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.urlencode($search_month); - if (!empty($search_year)) - $option .= '&search_year='.urlencode($search_year); - if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + + if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); + print_barre_liste($langs->trans("Mos"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); - $i = 0; + if (!empty($page)) $option .= '&page='.urlencode($page); + + $i = 0; print '
    '; print '
    '; diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php index d65b88ccabc..35b93cac8b9 100644 --- a/htdocs/product/stats/propal.php +++ b/htdocs/product/stats/propal.php @@ -169,26 +169,22 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
    '; + print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
    '; print '
    '; print $langs->trans('Period').' ('.$langs->trans("DatePropal").') - '; print $langs->trans('Month').': '; diff --git a/htdocs/product/stats/supplier_proposal.php b/htdocs/product/stats/supplier_proposal.php index a7fede51aa1..5a59cbb9c83 100644 --- a/htdocs/product/stats/supplier_proposal.php +++ b/htdocs/product/stats/supplier_proposal.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page -$langs->loadLangs(array('products', 'companies')); +$langs->loadLangs(array('products', 'companies', 'supplier_proposal')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -169,26 +169,22 @@ if ($id > 0 || !empty($ref)) { $num = $db->num_rows($result); - if (!empty($id)) - $option .= '&id='.$product->id; - if (!empty($search_month)) - $option .= '&search_month='.$search_month; - if (!empty($search_year)) - $option .= '&search_year='.$search_year; if ($limit > 0 && $limit != $conf->liste_limit) $option .= '&limit='.urlencode($limit); + if (!empty($id)) $option .= '&id='.$product->id; + if (!empty($search_month)) $option .= '&search_month='.urlencode($search_month); + if (!empty($search_year)) $option .= '&search_year='.urlencode($search_year); print ''."\n"; if (!empty($sortfield)) print ''; if (!empty($sortorder)) print ''; - if (!empty($page)) { - print ''; - $option .= '&page='.$page; - } - print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], "&id=".$product->id, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit); - print '
    '; + print_barre_liste($langs->trans("Proposals"), $page, $_SERVER["PHP_SELF"], $option, $sortfield, $sortorder, '', $num, $totalofrecords, '', 0, '', '', $limit, 0, 0, 1); + + if (!empty($page)) $option .= '&page='.urlencode($page); + + print '
    '; print '
    '; print $langs->trans('Period').' ('.$langs->trans("DatePropal").') - '; print $langs->trans('Month').': '; From e871e736ebc18b39473b2227b631160444b07498 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 17:54:01 +0200 Subject: [PATCH 245/456] Fix for #5824 --- htdocs/modulebuilder/template/myobject_card.php | 2 +- htdocs/mrp/class/mo.class.php | 2 +- htdocs/mrp/mo_card.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 336b410022a..c0b33be2bf8 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -533,7 +533,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea */ // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete) + if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { print ''.$langs->trans('Delete').''."\n"; } diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 42d97ee81d9..07c6eae52a1 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1008,7 +1008,7 @@ class Mo extends CommonObject } $url = dol_buildpath('/mrp/mo_card.php', 1).'?id='.$this->id; - if ($option = 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id; + if ($option == 'production') $url = dol_buildpath('/mrp/mo_production.php', 1).'?id='.$this->id; if ($option != 'nolink') { diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 59dd5ed7a7c..92f68785856 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -639,7 +639,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete) + if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { print ''.$langs->trans('Delete').''."\n"; } From ea145188b90b5515e6d1fd4bcb5c0de9c1cc3729 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Tue, 5 May 2020 18:14:38 +0200 Subject: [PATCH 246/456] fix filter on date service contrat with hour --- htdocs/contrat/services_list.php | 33 ++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index b8ab4cfe1ce..b250ea23378 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -247,22 +247,31 @@ if ($search_name) $sql .= " AND s.nom LIKE '%".$db->escape($search_name)."%' if ($search_contract) $sql .= " AND c.ref LIKE '%".$db->escape($search_contract)."%' "; if ($search_service) $sql .= " AND (p.ref LIKE '%".$db->escape($search_service)."%' OR p.description LIKE '%".$db->escape($search_service)."%' OR cd.description LIKE '%".$db->escape($search_service)."%')"; if ($socid > 0) $sql .= " AND s.rowid = ".$socid; -$filter_dateouvertureprevue = dol_mktime(0, 0, 0, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear); -if ($filter_dateouvertureprevue != '' && $filter_opouvertureprevue == -1) $filter_opouvertureprevue = '='; -$filter_date1 = dol_mktime(0, 0, 0, $op1month, $op1day, $op1year); -if ($filter_date1 != '' && $filter_op1 == -1) $filter_op1 = '='; +$filter_dateouvertureprevue_start=dol_mktime(0, 0, 0, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear); +$filter_dateouvertureprevue_end=dol_mktime(23, 59, 59, $opouvertureprevuemonth, $opouvertureprevueday, $opouvertureprevueyear); +if ($filter_dateouvertureprevue_start != '' && $filter_opouvertureprevue == -1) $filter_opouvertureprevue = ' BETWEEN '; -$filter_date2 = dol_mktime(0, 0, 0, $op2month, $op2day, $op2year); -if ($filter_date2 != '' && $filter_op2 == -1) $filter_op2 = '='; +$filter_date1_start =dol_mktime(0, 0, 0, $op1month, $op1day, $op1year); +$filter_date1_end =dol_mktime(23, 59, 59, $op1month, $op1day, $op1year); +if ($filter_date1_start != '' && $filter_op1 == -1) $filter_op1 = ' BETWEEN '; -$filter_datecloture = dol_mktime(0, 0, 0, $opcloturemonth, $opclotureday, $opclotureyear); -if ($filter_datecloture != '' && $filter_opcloture == -1) $filter_opcloture = '='; +$filter_date2_start=dol_mktime(0, 0, 0, $op2month, $op2day, $op2year); +$filter_date2_end=dol_mktime(23, 59, 59, $op2month, $op2day, $op2year); +if ($filter_date2_start != '' && $filter_op2 == -1) $filter_op2 = ' BETWEEN '; -if (!empty($filter_opouvertureprevue) && $filter_opouvertureprevue != -1 && $filter_dateouvertureprevue != '') $sql .= " AND cd.date_ouverture_prevue ".$filter_opouvertureprevue." '".$db->idate($filter_dateouvertureprevue)."'"; -if (!empty($filter_op1) && $filter_op1 != -1 && $filter_date1 != '') $sql .= " AND cd.date_ouverture ".$filter_op1." '".$db->idate($filter_date1)."'"; -if (!empty($filter_op2) && $filter_op2 != -1 && $filter_date2 != '') $sql .= " AND cd.date_fin_validite ".$filter_op2." '".$db->idate($filter_date2)."'"; -if (!empty($filter_opcloture) && $filter_opcloture != -1 && $filter_datecloture != '') $sql .= " AND cd.date_cloture ".$filter_opcloture." '".$db->idate($filter_datecloture)."'"; +$filter_datecloture_start=dol_mktime(0, 0, 0, $opcloturemonth, $opclotureday, $opclotureyear); +$filter_datecloture_end=dol_mktime(23, 59, 59, $opcloturemonth, $opclotureday, $opclotureyear); +if ($filter_datecloture_start != '' && $filter_opcloture == -1) $filter_opcloture = ' BETWEEN '; + +if (! empty($filter_opouvertureprevue) && $filter_opouvertureprevue != -1 && $filter_opouvertureprevue != ' BETWEEN ' && $filter_dateouvertureprevue_start != '') $sql.= " AND cd.date_ouverture_prevue ".$filter_opouvertureprevue." '".$db->idate($filter_dateouvertureprevue_start)."'"; +if (! empty($filter_opouvertureprevue) && $filter_opouvertureprevue == ' BETWEEN ') $sql.= " AND '".$db->idate($filter_dateouvertureprevue_end)."'"; +if (! empty($filter_op1) && $filter_op1 != -1 && $filter_op1 != ' BETWEEN ' && $filter_date1_start != '') $sql.= " AND cd.date_ouverture ".$filter_op1." '".$db->idate($filter_date1_start)."'"; +if (! empty($filter_op1) && $filter_op1==' BETWEEN ') $sql.= " AND '".$db->idate($filter_date1_end)."'"; +if (! empty($filter_op2) && $filter_op2 != -1 && $filter_op2 != ' BETWEEN ' && $filter_date2_start != '') $sql.= " AND cd.date_fin_validite ".$filter_op2." '".$db->idate($filter_date2_start)."'"; +if (! empty($filter_op2) && $filter_op2==' BETWEEN ') $sql.= " AND '".$db->idate($filter_date2_end)."'"; +if (! empty($filter_opcloture) && $filter_opcloture != ' BETWEEN ' && $filter_opcloture != -1 && $filter_datecloture_start != '') $sql.= " AND cd.date_cloture ".$filter_opcloture." '".$db->idate($filter_datecloture_start)."'"; +if (! empty($filter_opcloture) && $filter_opcloture==' BETWEEN ') $sql.= " AND '".$db->idate($filter_datecloture_end)."'"; // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; $sql .= $db->order($sortfield, $sortorder); From 49f9e88cc179162ffcc510a82f95011eefd9f126 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 18:16:30 +0200 Subject: [PATCH 247/456] Look and feel v12 --- htdocs/core/lib/usergroups.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 3be6a5b44ba..f25d8058e8f 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -745,7 +745,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default")); } - print '   ('.$langs->trans("Default").': '.$default.') '; + print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); print ''; print ''; From e354e714256ab661736b2edd7f1ef6376d640b35 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 18:19:48 +0200 Subject: [PATCH 248/456] Fix link to themes on dolistore --- htdocs/core/lib/usergroups.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index f25d8058e8f..9ac9383e516 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -359,7 +359,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print $form->textwithpicto($langs->trans("DefaultSkin"), $langs->trans("ThemeDir").' : '.$dirthemestring); print ''; print '
    '; } + /* + * Various Payments + */ + + if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->banque->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) + { + $subtotal_ht = 0; + $subtotal_ttc = 0; + + print ''; + + // Debit + $sql = "SELECT SUM(p.amount) AS amount FROM ".MAIN_DB_PREFIX."payment_various as p"; + $sql .= ' WHERE 1 = 1'; + if (!empty($date_start) && !empty($date_end)) + $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + $sql .= ' GROUP BY p.sens'; + $sql .= ' ORDER BY p.sens'; + + dol_syslog('get various payments', LOG_DEBUG); + $result = $db->query($sql); + if ($result) + { + + // Debit + $obj = $db->fetch_object($result); + if (isset($obj->amount)) + { + $subtotal_ht += -$obj->amount; + $subtotal_ttc += -$obj->amount; + } + print ''; + print "\n"; + if ($modecompta == 'CREANCES-DETTES') print ''; + print '\n"; + print "\n"; + + // Credit + $obj = $db->fetch_object($result); + if (isset($obj->amount)) + { + $subtotal_ht += $obj->amount; + $subtotal_ttc += $obj->amount; + } + print ''; + print "\n"; + if ($modecompta == 'CREANCES-DETTES') print ''; + print '\n"; + print "\n"; + + // Total + $total_ht += $subtotal_ht; + $total_ttc += $subtotal_ttc; + print ''; + if ($modecompta == 'CREANCES-DETTES') + print ''; + print ''; + print ''; + + } + else dol_print_error($db); + } + + /* + * Payement Loan + */ + + if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) + { + $subtotal_ht = 0; + $subtotal_ttc = 0; + + print ''; + + $sql = 'SELECT l.rowid as id, l.label AS label, SUM(p.amount_capital + p.amount_insurance + p.amount_interest) as amount FROM '.MAIN_DB_PREFIX.'payment_loan as p'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'loan AS l ON l.rowid = p.fk_loan'; + $sql .= ' WHERE 1 = 1'; + if (!empty($date_start) && !empty($date_end)) + $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + $sql .= ' GROUP BY p.fk_loan'; + $sql .= ' ORDER BY p.fk_loan'; + + dol_syslog('get loan payments', LOG_DEBUG); + $result = $db->query($sql); + if ($result) + { + require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; + $loan_static = new Loan($db); + while ($obj = $db->fetch_object($result)) + { + $loan_static->id = $obj->id; + $loan_static->ref = $obj->id; + $loan_static->label = $obj->label; + print ''; + print "\n"; + if ($modecompta == 'CREANCES-DETTES') print ''; + print '\n"; + print "\n"; + $subtotal_ht -= $obj->amount; + $subtotal_ttc -= $obj->amount; + } + + $total_ht += $subtotal_ht; + $total_ttc += $subtotal_ttc; + print ''; + if ($modecompta == 'CREANCES-DETTES') + print ''; + print ''; + print ''; + } + else dol_print_error($db); + } + /* * VAT diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index d462007d273..ed3befce56c 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -6,6 +6,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2014 Florian Henry * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -794,6 +795,117 @@ elseif ($modecompta == 'BOOKKEEPING') { // Nothing from this table } +/* + * Various Payments + */ + +if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->banque->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) +{ + + // decaiss + + $sql = "SELECT date_format(p.datep, '%Y-%m') AS dm, SUM(p.amount) AS amount FROM ".MAIN_DB_PREFIX."payment_various as p"; + $sql .= ' WHERE p.sens = 0'; + if (!empty($date_start) && !empty($date_end)) + $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + $sql .= ' GROUP BY dm'; + + dol_syslog("get various payments"); + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; + if ($num) + { + while ($i < $num) + { + $obj = $db->fetch_object($result); + if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; + if (isset($obj->amount)) $decaiss_ttc[$obj->dm] += $obj->amount; + $i++; + } + } + } + else + { + dol_print_error($db); + } + + // encaiss + + $sql = "SELECT date_format(p.datep, '%Y-%m') AS dm, SUM(p.amount) AS amount FROM ".MAIN_DB_PREFIX."payment_various AS p"; + $sql .= ' WHERE p.sens = 1'; + if (!empty($date_start) && !empty($date_end)) + $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + $sql .= ' GROUP BY dm'; + + dol_syslog("get various payments"); + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; + if ($num) + { + while ($i < $num) + { + $obj = $db->fetch_object($result); + if (!isset($encaiss_ttc[$obj->dm])) $encaiss_ttc[$obj->dm] = 0; + if (isset($obj->amount)) $encaiss_ttc[$obj->dm] += $obj->amount; + $i++; + } + } + } + else + { + dol_print_error($db); + } + +} +elseif ($modecompta == 'BOOKKEEPING') { + // Useless with BOOKKEEPING +} + +/* + * Payement Loan + */ + +if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) +{ + + $sql = "SELECT date_format(p.datep, '%Y-%m') AS dm, SUM(p.amount_capital + p.amount_insurance + p.amount_interest) AS amount FROM ".MAIN_DB_PREFIX."payment_loan AS p"; + $sql .= ' WHERE 1 = 1'; + if (!empty($date_start) && !empty($date_end)) + $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; + $sql .= ' GROUP BY dm'; + + dol_syslog("get loan payments"); + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; + if ($num) + { + while ($i < $num) + { + $obj = $db->fetch_object($result); + if (!isset($decaiss_ttc[$obj->dm])) $decaiss_ttc[$obj->dm] = 0; + if (isset($obj->amount)) $decaiss_ttc[$obj->dm] += $obj->amount; + $i++; + } + } + } + else + { + dol_print_error($db); + } + +} +elseif ($modecompta == 'BOOKKEEPING') { + // Not use with BOOKKEEPING +} /* diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 6cd046c5607..8a8c837ac87 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -262,3 +262,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index c60c79513c5..d4c59754898 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -262,3 +262,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Inclure les payments divers dans les rapports +IncludeLoansInResults = Inclure les emprunts dans les rapports From bf8cd51a5aaf32db3dd66bf73c1021ce08f38f4b Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 6 May 2020 13:37:24 +0200 Subject: [PATCH 264/456] Fix somes code formating errors --- htdocs/compta/resultat/clientfourn.php | 8 ++------ htdocs/compta/resultat/index.php | 14 ++++++-------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 59b7999e4ef..27bc4526a3e 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -977,7 +977,6 @@ else $result = $db->query($sql); if ($result) { - // Debit $obj = $db->fetch_object($result); if (isset($obj->amount)) @@ -987,7 +986,7 @@ else } print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; + if ($modecompta == 'CREANCES-DETTES') print ''; print '\n"; print "\n"; @@ -1000,7 +999,7 @@ else } print ''; print "\n"; - if ($modecompta == 'CREANCES-DETTES') print ''; + if ($modecompta == 'CREANCES-DETTES') print ''; print '\n"; print "\n"; @@ -1012,7 +1011,6 @@ else print ''; print ''; print ''; - } else dol_print_error($db); } @@ -1055,7 +1053,6 @@ else $subtotal_ht -= $obj->amount; $subtotal_ttc -= $obj->amount; } - $total_ht += $subtotal_ht; $total_ttc += $subtotal_ttc; print ''; @@ -1067,7 +1064,6 @@ else else dol_print_error($db); } - /* * VAT */ diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index ed3befce56c..10d0f31fe72 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -801,7 +801,6 @@ elseif ($modecompta == 'BOOKKEEPING') { if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->banque->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { - // decaiss $sql = "SELECT date_format(p.datep, '%Y-%m') AS dm, SUM(p.amount) AS amount FROM ".MAIN_DB_PREFIX."payment_various as p"; @@ -863,9 +862,9 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->ba } } -elseif ($modecompta == 'BOOKKEEPING') { - // Useless with BOOKKEEPING -} +// Useless with BOOKKEEPING +//elseif ($modecompta == 'BOOKKEEPING') { +//} /* * Payement Loan @@ -873,7 +872,6 @@ elseif ($modecompta == 'BOOKKEEPING') { if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecompta == "RECETTES-DEPENSES")) { - $sql = "SELECT date_format(p.datep, '%Y-%m') AS dm, SUM(p.amount_capital + p.amount_insurance + p.amount_interest) AS amount FROM ".MAIN_DB_PREFIX."payment_loan AS p"; $sql .= ' WHERE 1 = 1'; if (!empty($date_start) && !empty($date_end)) @@ -903,9 +901,9 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan } } -elseif ($modecompta == 'BOOKKEEPING') { - // Not use with BOOKKEEPING -} +// Useless with BOOKKEEPING +//elseif ($modecompta == 'BOOKKEEPING') { +//} /* From 7bf037ab2ff568e45096d86b5de1d64df7b0239c Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 6 May 2020 13:46:24 +0200 Subject: [PATCH 265/456] Fix blank line at end of control structure --- htdocs/compta/resultat/index.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index 10d0f31fe72..ad81a3943c1 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -860,7 +860,6 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->ba { dol_print_error($db); } - } // Useless with BOOKKEEPING //elseif ($modecompta == 'BOOKKEEPING') { @@ -899,7 +898,6 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan { dol_print_error($db); } - } // Useless with BOOKKEEPING //elseif ($modecompta == 'BOOKKEEPING') { From 889e5db4fbbf8e081f9ab4f6fe34e581bd6477a2 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 6 May 2020 13:55:38 +0200 Subject: [PATCH 266/456] Fix use Form::selectyesno() for added options in admin/compta.php --- htdocs/admin/compta.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index b3c66af76ca..3ccc2a213ac 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -177,20 +177,14 @@ foreach ($list as $key) print ''."\n"; print ''."\n"; print ''; // Option to include loan in results print ''."\n"; print ''."\n"; print ''; print "
    '; - $url = 'https://www.dolistore.com/4-skins'; + $url = 'https://www.dolistore.com/9-skins'; print ''; print $langs->trans('DownloadMoreSkins'); print ''; From 41aaf5363dd3b4807bc52e86a568a94f7d78d825 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 18:53:41 +0200 Subject: [PATCH 249/456] Fix templates --- .../template/myobject_agenda.php | 70 +++++++++-------- .../modulebuilder/template/myobject_card.php | 72 +++++++++--------- .../template/myobject_document.php | 40 ++++++++++ .../modulebuilder/template/myobject_note.php | 76 +++++++++---------- htdocs/mrp/mo_agenda.php | 2 +- htdocs/mrp/mo_card.php | 5 +- htdocs/mrp/mo_document.php | 2 +- htdocs/mrp/mo_note.php | 2 +- 8 files changed, 153 insertions(+), 116 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 559c5ed47b0..9b71971b6cf 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -148,44 +148,42 @@ if ($object->id > 0) $morehtmlref = '
    '; /* - // Ref customer - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $morehtmlref.=' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.=''; + // Ref customer + $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
    '.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
    '; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
    '; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } } - } else { - if (! empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref.=''; - $morehtmlref.=$proj->ref; - $morehtmlref.=''; - } else { - $morehtmlref.=''; - } - } - }*/ + }*/ $morehtmlref .= '
    '; diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index c0b33be2bf8..e92c88f1364 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -331,42 +331,42 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref = '
    '; /* - // Ref bis - $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mymodule->myobject->creer, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mymodule->myobject->creer, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { - if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
    '; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
    '; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (! empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref.=$proj->getNomUrl(); - } else { - $morehtmlref.=''; - } - } - } - */ + // Ref customer + $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
    '.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
    '; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
    '; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ $morehtmlref .= '
    '; diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index 5f3cdf02684..63b114ffc10 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -129,6 +129,46 @@ if ($object->id) // ------------------------------------------------------------ $linkback = ''.$langs->trans("BackToList").''; + $morehtmlref = '
    '; + /* + // Ref customer + $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
    '.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
    '; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
    '; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
    '; + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); print '
    '; diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index f116bf51f5b..aece1f98f29 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -103,45 +103,43 @@ if ($id > 0 || !empty($ref)) $morehtmlref = '
    '; /* - // Ref customer - $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); - $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); - // Project - if (! empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; - if ($permissiontoadd) - { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $morehtmlref.=' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
    '; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
    '; - } else { - $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (! empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref.=''; - $morehtmlref.=$proj->ref; - $morehtmlref.=''; - } else { - $morehtmlref.=''; - } - } - }*/ - $morehtmlref .= '
    '; + // Ref customer + $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
    '.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
    '.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
    '; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
    '; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
    '; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php index 6da02f8d5bd..eee839c8a83 100644 --- a/htdocs/mrp/mo_agenda.php +++ b/htdocs/mrp/mo_agenda.php @@ -169,7 +169,7 @@ if ($object->id > 0) if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= $proj->getNomUrl(); + $morehtmlref .= ': '.$proj->getNomUrl(); } else { $morehtmlref .= ''; } diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 92f68785856..86b2b886dea 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -427,7 +427,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $morehtmlref.=$form->editfieldkey("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', 0, 1); $morehtmlref.=$form->editfieldval("RefBis", 'ref_client', $object->ref_client, $object, $user->rights->mrp->creer, 'string', '', null, null, '', 1);*/ // Thirdparty - $morehtmlref .= $langs->trans('ThirdParty').' : '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + $morehtmlref .= $langs->trans('ThirdParty').' '; + $morehtmlref .= ': '.(is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); // Project if (!empty($conf->projet->enabled)) { @@ -452,7 +453,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= $proj->getNomUrl(); + $morehtmlref .= ' : '.$proj->getNomUrl(); } else { $morehtmlref .= ''; } diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php index a7baa2d9144..48031b6f372 100644 --- a/htdocs/mrp/mo_document.php +++ b/htdocs/mrp/mo_document.php @@ -147,7 +147,7 @@ if ($object->id) if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= $proj->getNomUrl(); + $morehtmlref .= ': '.$proj->getNomUrl(); } else { $morehtmlref .= ''; } diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index e22d3e4b610..d8b72fc348c 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -122,7 +122,7 @@ if ($id > 0 || !empty($ref)) if (!empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref .= $proj->getNomUrl(); + $morehtmlref .= ' : '.$proj->getNomUrl(); } else { $morehtmlref .= ''; } From d6c8988cec406432a4aa45834bbef5745a5074a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 19:29:47 +0200 Subject: [PATCH 250/456] Look and field v12 --- htdocs/contrat/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 21d46fb2974..52144d44d34 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1644,13 +1644,13 @@ else } if ($user->rights->contrat->creer && ($object->statut >= 0)) { - print ''; + print ''; print img_edit(); print ''; } if ($user->rights->contrat->creer && ($object->statut >= 0)) { - print ''; + print ''; print img_delete(); print ''; } From ebe169b9ef0b97282cf1c2f9c254ae72ca57355a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 20:51:29 +0200 Subject: [PATCH 251/456] Fix objects used for profit calculation. --- htdocs/projet/element.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 34dace09e93..23fa6551656 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -526,6 +526,32 @@ $listofreferent = array( */ ); +// Change rules for benefit calculation +if (! empty($conf->global->PROJECT_ELEMENTS_FOR_PLUS_MARGIN)) { + foreach($listofreferent as $key => $element) { + if ($listofreferent[$key]['margin'] == 'add') { + unset($listofreferent[$key]['margin']); + } + } + $newelementforplusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_PLUS_MARGIN); + foreach($newelementforplusmargin as $value) { + $listofreferent[$value]['margin']='add'; + } +} +if (! empty($conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN)) { + foreach($listofreferent as $key => $element) { + if ($listofreferent[$key]['margin'] == 'add') { + unset($listofreferent[$key]['margin']); + } + } + $newelementforplusmargin = explode(',', $conf->global->PROJECT_ELEMENTS_FOR_MINUS_MARGIN); + foreach($newelementforplusmargin as $value) { + $listofreferent[$value]['margin']='minus'; + } +} + + + $parameters = array('listofreferent'=>$listofreferent); $resHook = $hookmanager->executeHooks('completeListOfReferent', $parameters, $object, $action); From 07178fb6c09458801bad16e4e0618e77e96fc583 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 20:52:50 +0200 Subject: [PATCH 252/456] Fix look and feel --- htdocs/admin/const.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 9f3accfe549..bc22a2020fb 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -328,10 +328,10 @@ if ($conf->use_javascript_ajax) { print '
    '; print '
    '; - print ''; + print ''; print '
    '; print '
    '; - print ''; + print ''; print '
    '; } From 650096ea0f4a95b4dd5542f7b2e801e9e94fedcd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 21:27:40 +0200 Subject: [PATCH 253/456] Fix look and feel v12 --- htdocs/modulebuilder/index.php | 49 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 5b90f2a8f98..1be2ac09971 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -2122,7 +2122,7 @@ elseif (!empty($module)) print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print ' '.$langs->trans("LanguageFile").' : '; if (!is_array($dicts) || empty($dicts)) print ''.$langs->trans("NoDictionaries").''; @@ -2867,7 +2867,7 @@ elseif (!empty($module)) print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; @@ -3007,7 +3007,7 @@ elseif (!empty($module)) print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; @@ -3099,12 +3099,13 @@ elseif (!empty($module)) print ''.$langs->trans("HooksDefDesc").'
    '; print '
    '; - print ''; + print ''; print ''; } else @@ -3279,7 +3292,7 @@ elseif (!empty($module)) if (dol_is_file($dirins.'/'.$pathtohook)) { print ''.$pathtohook.''; - print ''; + print ''; print ''; } else @@ -3335,7 +3348,7 @@ elseif (!empty($module)) $pathtofile = $widget['relpath']; print ''; print ''; } @@ -3473,7 +3486,7 @@ elseif (!empty($module)) print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; + print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; print '
    '; @@ -3602,7 +3615,7 @@ elseif (!empty($module)) if (preg_match('/\.md$/i', $spec['name'])) $format = 'markdown'; print ''; + print ''; print ''; print ''; } @@ -3657,7 +3670,7 @@ elseif (!empty($module)) // HTML print ' '.$langs->trans("PathToModuleDocumentation", "HTML").' : '; - if (!dol_is_file($outputfiledoc)) print ''.$langs->trans("FileNotYetGenerated").''; + if (!dol_is_file($outputfiledoc)) print ''.$langs->trans("FileNotYetGenerated").''; else { print ''; print ''; @@ -3670,7 +3683,7 @@ elseif (!empty($module)) // PDF print ' '.$langs->trans("PathToModuleDocumentation", "PDF").' : '; - if (!dol_is_file($outputfiledocpdf)) print ''.$langs->trans("FileNotYetGenerated").''; + if (!dol_is_file($outputfiledocpdf)) print ''.$langs->trans("FileNotYetGenerated").''; else { print ''; print ''; @@ -3744,7 +3757,7 @@ elseif (!empty($module)) print '
    '; print ' '.$langs->trans("PathToModulePackage").' : '; - if (!dol_is_file($outputfilezip)) print ''.$langs->trans("FileNotYetGenerated").''; + if (!dol_is_file($outputfilezip)) print ''.$langs->trans("FileNotYetGenerated").''; else { $relativepath = $modulelowercase.'/bin/'.$FILENAMEZIP; print '
    '.$outputfilezip.''; From eacb1b3b2e399d365bab45e58e3cf184b3d42af7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 21:45:10 +0200 Subject: [PATCH 254/456] Debug modulebuilder --- htdocs/core/lib/files.lib.php | 11 ++++++++++- htdocs/modulebuilder/index.php | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 941cb03d6c4..dbea182fb9b 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -761,8 +761,17 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep if (is_dir($ossrcfile."/".$file)) { if (empty($excludesubdir) || ($excludesubdir == 2 && strlen($file) == 2)) { + $newfile = $file; + // Replace destination filename with a new one + if (is_array($arrayreplacement)) + { + foreach ($arrayreplacement as $key => $val) + { + $newfile = str_replace($key, $val, $newfile); + } + } //var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists"); - $tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$file, $newmask, $overwriteifexists, $arrayreplacement, $excludesubdir); + $tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$newfile, $newmask, $overwriteifexists, $arrayreplacement, $excludesubdir); } } else diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 1be2ac09971..d813c3b291b 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -180,8 +180,10 @@ if ($dirins && $action == 'initmodule' && $modulename) dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject.sql'); dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.sql'); dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject.key.sql'); + dol_delete_file($destdir.'/sql/llx_'.strtolower($modulename).'_myobject_extrafields.key.sql'); dol_delete_file($destdir.'/img/object_myobject.png'); dol_delete_file($destdir.'/class/myobject.class.php'); + dol_delete_dir($destdir.'/class'); dol_delete_dir($destdir.'/sql'); } From fa305fdaca1b7b32e51c8f80233693a2625eec4e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2020 21:49:46 +0200 Subject: [PATCH 255/456] Prepare version 11.0.4 --- ChangeLog | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3b81e0555d5..a7d0282fba5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,84 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 11.0.4 compared to 11.0.3 ***** +FIX: #13749 +FIX: #7594 +FIX: #7594 Expense report multi pagebreak +FIX: Access to undeclared static property: Contact::$table_element +FIX: actions on supplier proposal not saved (bad trigger name) +FIX: Add function "completeTabsHead" to "addreplace" type hook. +FIX: All forms must use newToken() +FIX: Another "Access to undeclared static property: Contact::$table_element" && "Societe::$table_element" +FIX: author search supplier proposal list +FIX: A variable was erased by a temporary variable +FIX: Avoid infinite loop when a fetch is inside a compute field. +FIX: Backto link +FIX: Bad position of total in column +FIX: bad value in currency into discount created from down payment +FIX: buyprice extrafield langfile and tooltip +FIX: Buyprice was updated only if min price for this qty had same qty +FIX: Can switch from double to price type for extrafields +FIX: Can use decimal value in virtual products +FIX: child categories only with good entity rights +FIX: cloning of emailing when no content selected +FIX: closing tags +FIX: Combo list of available users to filter on the list of leaves. +FIX: Compatibility with multicompany, bad numerotation of task. +FIX: consistency of price w/wo vat wrong when price entered with tax +FIX: default value of selectMasssAction broken +FIX: draftordered replenish virtual stock +FIX: Error update SQL into stock reception +FIX: expensereport status in generated pdf +FIX: extra date field incorrect check +FIX: Extrafields of type price must be '' and not '0' if not defined +FIX: Foreign currency lost when splitting a discount +FIX: get remain to pay with rounding decimals +FIX: gzip and bzip2 must use option -f +FIX: IHM, unexpected quote +FIX: keep viewstatut for doli 3.5 +FIX: Link missing into email of some notification +FIX: Look and feel v11 +FIX: md stylesheet to be included by external modules like eldy +FIX: missing array option +FIX: missing default accountancy product buy code +FIX: missing fk_bank during export of suppliers invoices +FIX: missing member entity +FIX: missing selectedlines on supplier order but checkbox are displayed +FIX: Missing token and take into account max date when it can. +FIX: model export list must be sorted by label +FIX: multicurrency manage on hidden conf SUPPLIER_PROPOSAL_UPDATE_PRICE_ON_SUPPlIER_PROPOSAL +FIX: Must escape shell +FIX: Must exclude logs and some dirs for compressed backup +FIX: ordered stock already in $stock +FIX: picture migration script from doli 9.0 +FIX: print pictures on shipment docs +FIX: product get purchase prices +FIX: product purchase prices +FIX: Protection when database has a corrupted product id +FIX: remove unused var, $usercancreate can be change by Multicompany +FIX: replenish stock to buy +FIX: Sanitizing menu parameter +FIX: Send email from bulk action of list of thirdparties +FIX: setup of suggested payment mode on proposals and orders +FIX: Several pb in export of documents +FIX: Situation invoice take into account the credit notes. +FIX: some others modules (like subtotal) use other product_type than 0 or 1 AND must not be considered in this report +FIX: sort by default role makes no sense +FIX: sort on company on member list +FIX: TakePOS buying price +FIX: text version of html emailing (removed the body style) +FIX: The "test smtp connectivity" failed on page to setup mass emailing +FIX: Error logs an Orderline::delete error, but this is an Orderline::insert error +FIX: Translation of tooltips of extrafields +FIX: Use getNomURL instead of hard coded link. Fix limit. +FIX: Use of image into free text for PDF if DOL_DATA_DIR is outside of +FIX: viewstatut to search status +FIX: we must export company mail address on contact vcard only if contact email address is empty +FIX: when we filter a list on a view status, we want this filter to be on bookmark that we create +FIX: Wrong Sql on getListOfTowns api method +FIX: wrong user right's name to top menu "commercial" +FIX: XSS Vulnerability ***** ChangeLog for 11.0.3 compared to 11.0.2 ***** FIX: unit price for selected supplier products not set. NaN was used. From 9f176c5e2d8733114ed712f7d2f8ba8b3b69801a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 01:41:10 +0200 Subject: [PATCH 256/456] Fix trans --- htdocs/langs/en_US/companies.lang | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index f8b3d0354e2..0fad58c9389 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -325,7 +325,8 @@ CompanyDeleted=Company "%s" deleted from database. ListOfContacts=List of contacts/addresses ListOfContactsAddresses=List of contacts/addresses ListOfThirdParties=List of Third Parties -ShowContact=Show contact +ShowCompany=Third Party +ShowContact=Contact-Address ContactsAllShort=All (No filter) ContactType=Contact type ContactForOrders=Order's contact From d9cef1c8d79ac971641fc4304355f5cb44d5b5f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 01:49:19 +0200 Subject: [PATCH 257/456] Fix packager to publish on new web site --- build/makepack-dolibarr.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index c6b8cd330c8..933c5b8f994 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -19,7 +19,7 @@ use Term::ANSIColor; # Change this to defined target for option 98 and 99 $PROJECT="dolibarr"; $PUBLISHSTABLE="eldy,dolibarr\@frs.sourceforge.net:/home/frs/project/dolibarr"; -$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/dolibarr.org/httpdocs/files"; +$PUBLISHBETARC="dolibarr\@vmprod1.dolibarr.org:/home/dolibarr/asso.dolibarr.org/dolibarr_documents/website/www.dolibarr.org/files"; #@LISTETARGET=("TGZ","ZIP","RPM_GENERIC","RPM_FEDORA","RPM_MANDRIVA","RPM_OPENSUSE","DEB","EXEDOLIWAMP","SNAPSHOT"); # Possible packages From 247acdd27446434927a8727506cacdd58985fc8f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 03:47:28 +0200 Subject: [PATCH 258/456] Fix position of custom groups of modules --- htdocs/admin/company.php | 2 +- htdocs/admin/modules.php | 10 ++++++---- htdocs/core/lib/functions.lib.php | 1 + htdocs/core/modules/DolibarrModules.class.php | 2 +- htdocs/theme/eldy/info-box.inc.php | 5 +++++ htdocs/theme/eldy/progress.inc.php | 2 +- htdocs/theme/md/info-box.inc.php | 4 ++++ 7 files changed, 19 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index d4664a13de1..f33a3ea6f93 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -693,7 +693,7 @@ print '
    '; // Sales taxes (VAT, IRPF, ...) -print load_fiche_titre($langs->trans("TypeOfSaleTaxes")); +print load_fiche_titre($langs->trans("TypeOfSaleTaxes"), '', 'object_payment'); print '
    '; + print ''; $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; + print ''; print ''; - print ''; + print ''; + print ''; } else { print ''.$langs->trans("FileNotYetGenerated").''; - print ''; + print ''; + print ''; } print ''; } @@ -3163,6 +3166,14 @@ elseif (!empty($module)) print '
    '; print '
    '; print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; print ''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; @@ -3113,13 +3114,15 @@ elseif (!empty($module)) if (dol_is_file($dirins.'/'.$pathtohook)) { print ''.$pathtohook.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').' '; + print ''.img_picto($langs->trans("Delete"), 'delete').'
    '; + + $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; + print ''; + if (!empty($triggers)) { foreach ($triggers as $trigger) @@ -3171,7 +3182,7 @@ elseif (!empty($module)) print ''; + print ''; print ''; print ''; } @@ -3180,9 +3191,11 @@ elseif (!empty($module)) { print ''; + print ''; + print ''; print ''; } + print '
    '; + print ' '.$langs->trans("DescriptorFile").' : '.$pathtofile.''; + print ''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; + print '
    '; print ' '.$langs->trans("TriggersFile").' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').'
    '; print ' '.$langs->trans("NoTrigger"); - print '
    '; } else @@ -3227,7 +3240,7 @@ elseif (!empty($module)) if (dol_is_file($dirins.'/'.$pathtohook)) { print ''.$pathtohook.''; - print '
    '.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').'
    '.$langs->trans("WidgetFile").' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''; + print ''.img_picto($langs->trans("Edit"), 'edit').''; print ''.img_picto($langs->trans("Delete"), 'delete').'
    '; print ' '.$langs->trans("SpecificationFile").' : '.$pathtofile.''; - print ''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Edit"), 'edit').''.img_picto($langs->trans("Delete"), 'delete').'
    '; print ''; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 926a4c34f70..6a0ff450346 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -412,11 +412,13 @@ foreach ($modulesdir as $dir) } $familyposition = $familyinfo[$familykey]['position']; - if ($external) + $listOfOfficialModuleGroups = array('hr', 'technic', 'interface', 'technic', 'portal', 'financial', 'crm', 'base', 'products', 'srm', 'ecm', 'projects', 'other'); + if ($external && ! in_array($familykey, $listOfOfficialModuleGroups)) { - // TODO Find a solution so modules with their own family are always at end - //var_dump($familyposition); - //$familyposition += 100; + // If module is extern and into a custom group (not into an official predefined one), it must appear at end (custom groups should not be before official groups). + if (is_numeric($familyposition)) { + $familyposition = sprintf("%03d", (int) $familyposition + 100); + } } $orders[$i] = $familyposition."_".$familykey."_".$moduleposition."_".$j; // Sort by family, then by module position then number diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 14531947574..f456ec311ac 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3268,6 +3268,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal', 'resource'=>'bg-infobox-action', 'supplier_invoice'=>'bg-infobox-order_supplier', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal', 'ticket'=>'bg-infobox-contrat', 'title_accountancy'=>'bg-infobox-bank_account', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action', + //'title_setup'=>'bg-infobox-action', 'tools'=>'bg-infobox-action', 'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode' ); if (!empty($arrayconvpictotomorcess[$pictowithouttext])) { diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index cd3fe7922ee..c592cb69959 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2279,7 +2279,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i', '', get_class($this))); print ' -
    +
    '; diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 028039f6c8b..7f62fe39689 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -6,6 +6,11 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> * Component: Info Box * ------------------- */ + +.info-box-module-external span.info-box-icon-version { + background: #999; +} + .info-box { display: block; position: relative; diff --git a/htdocs/theme/eldy/progress.inc.php b/htdocs/theme/eldy/progress.inc.php index b0bd96df1d2..71f25ff35ba 100644 --- a/htdocs/theme/eldy/progress.inc.php +++ b/htdocs/theme/eldy/progress.inc.php @@ -123,7 +123,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> width: 3px; } .progress-group .progress-text { - font-weight: 600; + /* font-weight: 600; */ } .progress-group .progress-number { float: right; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index d9b467f130b..d866cab96a6 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -7,6 +7,10 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> * ------------------- */ +.info-box-module-external span.info-box-icon-version { + background: #999; +} + span.info-box-icon-text { /* hide box text number due to problems */ display: none; } From 30fede216c7cb7b95e5db3d26cf338b88ad62b61 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 04:03:07 +0200 Subject: [PATCH 259/456] Fix Add '_pw' var as var sensibles. --- htdocs/api/class/api_setup.class.php | 2 +- htdocs/core/class/commondocgenerator.class.php | 2 +- htdocs/core/lib/functions.lib.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index ec7a6b89596..fd6432b553f 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -1429,7 +1429,7 @@ class Setup extends DolibarrApi if (!preg_match('/^[a-zA-Z0-9_]+$/', $constantname) || !isset($conf->global->$constantname)) { throw new RestException(500, 'Error Bad or unknown value for constantname'); } - if (preg_match('/(_pass|password|secret|_key|key$)/i', $constantname)) { + if (preg_match('/(_pass|_pw|password|secret|_key|key$)/i', $constantname)) { throw new RestException(403, 'Forbidden'); } diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 1f5ef0a5a9e..df80aab7a1f 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -325,7 +325,7 @@ abstract class CommonDocGenerator foreach ($conf->global as $key => $val) { - if (preg_match('/(_pass|password|secret|_key|key$)/i', $key)) $newval = '*****forbidden*****'; + if (preg_match('/(_pass|_pw|password|secret|_key|key$)/i', $key)) $newval = '*****forbidden*****'; else $newval = $val; $array_other['__['.$key.']__'] = $newval; } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f456ec311ac..28a44562b28 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6523,7 +6523,7 @@ function make_substitutions($text, $substitutionarray, $outputlangs = null) if (dol_textishtml($text, 1)) $msgishtml = 1; $keyfound = $reg[1]; - if (preg_match('/(_pass|password|secret|_key|key$)/i', $keyfound)) $newval = '*****forbidden*****'; + if (preg_match('/(_pass|_pw|password|secret|_key|key$)/i', $keyfound)) $newval = '*****forbidden*****'; else $newval = empty($conf->global->$keyfound) ? '' : $conf->global->$keyfound; $text = preg_replace('/__\['.preg_quote($keyfound, '/').'\]__/', $msgishtml ?dol_htmlentitiesbr($newval) : $newval, $text); } From b09f179a16759ee8213c51ebf0726f57decf3a3c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 04:32:48 +0200 Subject: [PATCH 260/456] NEW Website logs are now into a separated log file. --- htdocs/core/lib/functions.lib.php | 7 +++++++ htdocs/core/lib/website2.lib.php | 5 ++++- htdocs/core/website.inc.php | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 28a44562b28..1a4ab00b7d6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1078,6 +1078,13 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = // If syslog module enabled if (empty($conf->syslog->enabled)) return; + // Check if we are into execution of code of a website + if (defined('USEEXTERNALSERVER') && ! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { + global $website, $websitekey; + if (is_object($website) && ! empty($website->ref)) $suffixinfilename.='_website_'.$website->ref; + elseif (! empty($websitekey)) $suffixinfilename.='_website_'.$websitekey; + } + if ($ident < 0) { foreach ($conf->loghandlers as $loghandlerinstance) diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 6ef17220283..fc56a489d75 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -39,7 +39,10 @@ function dolSaveMasterFile($filemaster) $mastercontent = ''."\n"; $result = file_put_contents($filemaster, $mastercontent); if (!empty($conf->global->MAIN_UMASK)) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index b90da632fac..3e54f6ec2ad 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -19,7 +19,7 @@ /** * \file htdocs/core/website.inc.php * \brief Common file loaded by all website pages (after master.inc.php). It set the new object $weblangs, using parameter 'l'. - * This file is included in top of all container pages. + * This file is included in top of all container pages and is run only when a web page is called. * The global variable $websitekey must be defined. */ From a8222c2651591a657767b8bf95cc04fa37752866 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 05:10:42 +0200 Subject: [PATCH 261/456] Look and feel v12 --- htdocs/admin/menus/index.php | 4 ++-- htdocs/admin/tools/purge.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 56251e48f7b..97f0246ac88 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -277,8 +277,8 @@ print '
    '; print ''; print ''; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 43cf81b41ba..9898e290ddc 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -78,7 +78,7 @@ $form = new Form($db); print load_fiche_titre($langs->trans("Purge"), '', 'title_setup'); -print $langs->trans("PurgeAreaDesc", $dolibarr_main_data_root).'
    '; +print ''.$langs->trans("PurgeAreaDesc", $dolibarr_main_data_root).'
    '; print '
    '; From b6aa766c72078988a0e74d8b5305b96eb9d6d509 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Wed, 6 May 2020 09:37:17 +0200 Subject: [PATCH 262/456] FIX stickler --- htdocs/compta/facture/stats/index.php | 14 +++++++------- htdocs/core/class/dolgraph.class.php | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 4c0d23c90e2..8606e619740 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -262,13 +262,13 @@ if ($mode == 'customer') $filter = 's.client in (1,2,3)'; if ($mode == 'supplier') $filter = 's.fournisseur = 1'; print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1); print '
    '; -if(!empty($conf->category->enabled) && $mode == 'customer') { - // Customer Category - print ''; - } +if(! empty($conf->category->enabled) && $mode == 'customer') { + // Customer Category + print ''; +} // ThirdParty Type print ''; } +// Option to include various payment in results +print ''."\n"; +print ''."\n"; +print ''; + +// Option to include loan in results +print ''."\n"; +print ''."\n"; +print ''; + print "
    '.$langs->trans("TreeMenuPersonalized").'
    '.$langs->trans("CustomersProspectsCategoriesShort").''; - $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1); - print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%"); - print '
    '.$langs->trans("CustomersProspectsCategoriesShort").''; + $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1); + print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%"); + print '
    '.$langs->trans("ThirdPartyType").''; $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 3f1bfa245fb..551fe2b82c0 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -895,11 +895,11 @@ class DolGraph $color = sprintf("%02x%02x%02x", $this->datacolor[$i][0], $this->datacolor[$i][1], $this->datacolor[$i][2]); $this->stringtoshow .= '{ '; if (! isset($this->type[$i]) || $this->type[$i] == 'bars') { - if($nblot == 3) { - if($i == $firstlot) $align = 'right'; - else if($i == $firstlot+1) $align = 'center'; - else $align = 'left'; - $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.$align.'", barWidth: 0.45 }, '; + if($nblot == 3) { + if($i == $firstlot) $align = 'right'; + elseif($i == $firstlot + 1) $align = 'center'; + else $align = 'left'; + $this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "'.$align.'", barWidth: 0.45 }, '; } else $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.($i==$firstlot?'center':'left').'", barWidth: 0.5 }, '; } From 128ec6fd78fa91569f80636a83f90dd8171ad1a1 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 6 May 2020 08:38:36 +0200 Subject: [PATCH 263/456] Add include various payments and loans in accounting report For simplified accouning, behaviour not enable by default and must be enabed in simplified accounting module admin page (or by global settings ACCOUNTING_REPORTS_INCLUDE_VARPAY and ACCOUNTING_REPORTS_INCLUDE_LOAN). --- htdocs/admin/compta.php | 35 ++++++++ htdocs/compta/resultat/clientfourn.php | 116 ++++++++++++++++++++++++- htdocs/compta/resultat/index.php | 112 ++++++++++++++++++++++++ htdocs/langs/en_US/compta.lang | 2 + htdocs/langs/fr_FR/compta.lang | 2 + 5 files changed, 266 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index cdfa15d9069..b3c66af76ca 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -5,6 +5,7 @@ * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2013-2017 Philippe Grand * Copyright (C) 2014 Marcos García + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -83,6 +84,20 @@ if ($action == 'update') } } + $report_include_varpay = GETPOST('ACCOUNTING_REPORTS_INCLUDE_VARPAY', 'alpha'); + if (!empty($report_include_varpay)) + if ($report_include_varpay == 'yes') + if (!dolibarr_set_const($db, 'ACCOUNTING_REPORTS_INCLUDE_VARPAY', 1, 'chaine', 0, '', $conf->entity)) $error++; + if ($report_include_varpay == 'no') + if (!dolibarr_del_const($db, 'ACCOUNTING_REPORTS_INCLUDE_VARPAY', $conf->entity)) $error++; + + $report_include_loan = GETPOST('ACCOUNTING_REPORTS_INCLUDE_LOAN', 'alpha'); + if (!empty($report_include_loan)) + if ($report_include_loan == 'yes') + if (!dolibarr_set_const($db, 'ACCOUNTING_REPORTS_INCLUDE_LOAN', 1, 'chaine', 0, '', $conf->entity)) $error++; + if ($report_include_loan == 'no') + if (!dolibarr_del_const($db, 'ACCOUNTING_REPORTS_INCLUDE_LOAN', $conf->entity)) $error++; + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -158,6 +173,26 @@ foreach ($list as $key) print '
    '."\n"; +print ''."\n"; +print '
    '."\n"; +print ''."\n"; +print '
    \n"; print '

    '; diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 44be66a2218..59b7999e4ef 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -8,6 +8,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2014 Florian Henry * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -38,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php'; // Load translation files required by the page -$langs->loadLangs(array('compta', 'bills', 'donation', 'salaries', 'accountancy')); +$langs->loadLangs(array('compta', 'bills', 'donation', 'salaries', 'accountancy', 'loan')); $date_startmonth = GETPOST('date_startmonth', 'int'); $date_startday = GETPOST('date_startday', 'int'); @@ -953,6 +954,119 @@ else print '
    '.$langs->trans("VariousPayment").'
     ".$langs->trans("Debit")."'.price(-$obj->amount).''.price(-$obj->amount)."
     ".$langs->trans("Credit")."'.price($obj->amount).''.price($obj->amount)."
    '.price($subtotal_ht).''.price($subtotal_ttc).'
    '.$langs->trans("PaymentLoan").'
     ".$loan_static->getNomUrl(1).' - '.$obj->label."'.price(-$obj->amount).''.price(-$obj->amount)."
    '.price($subtotal_ht).''.price($subtotal_ttc).'
     ".$langs->trans("Debit")."'.price(-$obj->amount).''.price(-$obj->amount).''.price(-$obj->amount)."
     ".$langs->trans("Credit")."'.price($obj->amount).''.price($obj->amount).''.price($obj->amount)."
    '.price($subtotal_ht).''.price($subtotal_ttc).'
    '."\n"; -print ''."\n"; +print $form->selectyesno('ACCOUNTING_REPORTS_INCLUDE_VARPAY', (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY))); print '
    '."\n"; -print ''."\n"; +print $form->selectyesno('ACCOUNTING_REPORTS_INCLUDE_LOAN', (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN))); print '
    \n"; From 3dbe9a4af1d18cdf3a9c8404b25d1209d94d07d9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 13:59:15 +0200 Subject: [PATCH 267/456] Fix label --- htdocs/product/admin/stock_extrafields.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/admin/stock_extrafields.php b/htdocs/product/admin/stock_extrafields.php index 0e8f7289b77..22ad53cd0e8 100644 --- a/htdocs/product/admin/stock_extrafields.php +++ b/htdocs/product/admin/stock_extrafields.php @@ -68,7 +68,7 @@ print load_fiche_titre($langs->trans("StockSetup"), $linkback, 'title_setup'); $head = stock_admin_prepare_head(); -dol_fiche_head($head, 'attributes', $langs->trans("Warehouses"), -1, 'stock'); +dol_fiche_head($head, 'attributes', $langs->trans("StockSetup"), -1, 'stock'); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; From bfd4ebd49d40942d8cf8bfa2a2cbd2ff6f5f125e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 14:28:24 +0200 Subject: [PATCH 268/456] FIX Changing password message not visible if a background is set --- htdocs/user/passwordforgotten.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 461ab8e7b4a..0afa158ec58 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -133,7 +133,7 @@ if ($action == 'buildnewpassword' && $username) // Success if ($edituser->send_password($edituser, $newpassword, 1) > 0) { - $message = '
    '.$langs->trans("PasswordChangeRequestSent", $edituser->login, dolObfuscateEmail($edituser->email)).'
    '; + $message = ''; $username = ''; } else From e7ae9c752ea54a59d0ae9406d1043d4d0afb6cf5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 14:48:02 +0200 Subject: [PATCH 269/456] Fix missing trackid --- htdocs/user/class/user.class.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 23d42ba3e65..09f78a7d044 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1972,12 +1972,12 @@ class User extends CommonObject /** * Send new password by email * - * @param User $user Object user that send email + * @param User $fuser Object user that send email * @param string $password New password * @param int $changelater 0=Send clear passwod into email, 1=Change password only after clicking on confirm email. @todo Add method 2 = Send link to reset password * @return int < 0 si erreur, > 0 si ok */ - public function send_password($user, $password = '', $changelater = 0) + public function send_password($fuser, $password = '', $changelater = 0) { // phpcs:enable global $conf, $langs; @@ -1997,8 +1997,8 @@ class User extends CommonObject { // If user has defined its own language (rare because in most cases, auto is used) $outputlangs->getDefaultLang($this->conf->MAIN_LANG_DEFAULT); } - if ($user->conf->MAIN_LANG_DEFAULT) { - $outputlangs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT); + if ($fuser->conf->MAIN_LANG_DEFAULT) { + $outputlangs->setDefaultLang($fuser->conf->MAIN_LANG_DEFAULT); } else { // If user has not defined its own language, we used current language @@ -2028,7 +2028,7 @@ class User extends CommonObject $mesg .= $outputlangs->transnoentitiesnoconv("ClickHereToGoTo", $appli).': '.$url."\n\n"; $mesg .= "--\n"; - $mesg .= $user->getFullName($outputlangs); // Username that make then sending + $mesg .= $fuser->getFullName($outputlangs); // Username that make then sending dol_syslog(get_class($this)."::send_password changelater is off, url=".$url); } @@ -2048,6 +2048,8 @@ class User extends CommonObject dol_syslog(get_class($this)."::send_password changelater is on, url=".$url); } + $trackid = 'use'.$fuser->id; + $mailfile = new CMailFile( $subject, $this->email, @@ -2059,7 +2061,10 @@ class User extends CommonObject '', '', 0, - $msgishtml + $msgishtml, + '', + '', + $trackid ); if ($mailfile->sendfile()) From abdb0cc8c025359c8eb05cc705cd36820bbd46e0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 15:03:57 +0200 Subject: [PATCH 270/456] Fix use correct trackid --- htdocs/user/class/user.class.php | 13 +++++++------ htdocs/user/passwordforgotten.php | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 09f78a7d044..e20c1ca527b 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1972,12 +1972,12 @@ class User extends CommonObject /** * Send new password by email * - * @param User $fuser Object user that send email + * @param User $user Object user that send the email (not the user we send too) * @param string $password New password * @param int $changelater 0=Send clear passwod into email, 1=Change password only after clicking on confirm email. @todo Add method 2 = Send link to reset password * @return int < 0 si erreur, > 0 si ok */ - public function send_password($fuser, $password = '', $changelater = 0) + public function send_password($user, $password = '', $changelater = 0) { // phpcs:enable global $conf, $langs; @@ -1997,8 +1997,9 @@ class User extends CommonObject { // If user has defined its own language (rare because in most cases, auto is used) $outputlangs->getDefaultLang($this->conf->MAIN_LANG_DEFAULT); } - if ($fuser->conf->MAIN_LANG_DEFAULT) { - $outputlangs->setDefaultLang($fuser->conf->MAIN_LANG_DEFAULT); + + if ($this->conf->MAIN_LANG_DEFAULT) { + $outputlangs->setDefaultLang($this->conf->MAIN_LANG_DEFAULT); } else { // If user has not defined its own language, we used current language @@ -2028,7 +2029,7 @@ class User extends CommonObject $mesg .= $outputlangs->transnoentitiesnoconv("ClickHereToGoTo", $appli).': '.$url."\n\n"; $mesg .= "--\n"; - $mesg .= $fuser->getFullName($outputlangs); // Username that make then sending + $mesg .= $user->getFullName($outputlangs); // Username that send email dol_syslog(get_class($this)."::send_password changelater is off, url=".$url); } @@ -2048,7 +2049,7 @@ class User extends CommonObject dol_syslog(get_class($this)."::send_password changelater is on, url=".$url); } - $trackid = 'use'.$fuser->id; + $trackid = 'use'.$this->id; $mailfile = new CMailFile( $subject, diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 0afa158ec58..81e6779b80b 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -131,7 +131,7 @@ if ($action == 'buildnewpassword' && $username) else { // Success - if ($edituser->send_password($edituser, $newpassword, 1) > 0) + if ($edituser->send_password($user, $newpassword, 1) > 0) { $message = ''; $username = ''; From 1ec8b31e46e7ef1d1036f08b4814170ed501618c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 15:15:12 +0200 Subject: [PATCH 271/456] Fix remove action param in url to allow a second try without the error message --- htdocs/core/tpl/passwordforgotten.tpl.php | 1 + htdocs/user/class/user.class.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index ab12b48aa08..63ff6a8a0a7 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -40,6 +40,7 @@ if (!empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax = 1; $php_self = $_SERVER['PHP_SELF']; $php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : ''; +$php_self = str_replace('action=validatenewpassword', '', $php_self); $titleofpage = $langs->trans('SendNewPassword'); diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index e20c1ca527b..11d0cec3654 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1838,7 +1838,7 @@ class User extends CommonObject /** * Change password of a user * - * @param User $user Object user of user making change + * @param User $user Object user of user requesting the change (not the user for who we change the password). May be unknown. * @param string $password New password in clear text (to generate if not provided) * @param int $changelater 1=Change password only after clicking on confirm email * @param int $notrigger 1=Does not launch triggers @@ -2029,7 +2029,7 @@ class User extends CommonObject $mesg .= $outputlangs->transnoentitiesnoconv("ClickHereToGoTo", $appli).': '.$url."\n\n"; $mesg .= "--\n"; - $mesg .= $user->getFullName($outputlangs); // Username that send email + $mesg .= $user->getFullName($outputlangs); // Username that send the email (not the user for who we want to reset password) dol_syslog(get_class($this)."::send_password changelater is off, url=".$url); } From 485896614b4e1cb831b8fcbd84e6e1ce56737bb0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 15:30:00 +0200 Subject: [PATCH 272/456] Add message during password reset --- htdocs/langs/en_US/users.lang | 1 + htdocs/user/passwordforgotten.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index aea4e7676e4..9b75a2ff37e 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Created user will be an external user (because linked to IdPhoneCaller=Id phone caller NewUserCreated=User %s created NewUserPassword=Password change for %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=User %s modified UserDisabled=User %s disabled UserEnabled=User %s activated diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 81e6779b80b..f8c035779d2 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -77,7 +77,8 @@ if ($action == 'validatenewpassword' && $username && $passwordhash) { if (dol_verifyHash($edituser->pass_temp, $passwordhash)) { - $newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0); + setEventMessages('NewPasswordValidated', null, 'mesgs'); + $newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0); dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); header("Location: ".DOL_URL_ROOT.'/'); exit; From 5e6b7fb6b4cb598e5ff1980d2a20b43cf7f01c3c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 15:36:14 +0200 Subject: [PATCH 273/456] Show message after pass reset --- htdocs/user/passwordforgotten.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index f8c035779d2..7f8ad45a06d 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -77,7 +77,10 @@ if ($action == 'validatenewpassword' && $username && $passwordhash) { if (dol_verifyHash($edituser->pass_temp, $passwordhash)) { - setEventMessages('NewPasswordValidated', null, 'mesgs'); + // Clear session + $_SESSION['dol_login'] = ''; + $_SESSION['dol_loginmesg'] = $langs->trans('NewPasswordValidated'); // Save message for the session page + $newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0); dol_syslog("passwordforgotten.php new password for user->id=".$edituser->id." validated in database"); header("Location: ".DOL_URL_ROOT.'/'); From 4c04ace9d8305da6e4bdca000ae8d333f2ba5217 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 15:39:07 +0200 Subject: [PATCH 274/456] fix reset of session --- htdocs/user/passwordforgotten.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index 7f8ad45a06d..b0f3a5aab6c 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -78,7 +78,7 @@ if ($action == 'validatenewpassword' && $username && $passwordhash) if (dol_verifyHash($edituser->pass_temp, $passwordhash)) { // Clear session - $_SESSION['dol_login'] = ''; + unset($_SESSION['dol_login']); $_SESSION['dol_loginmesg'] = $langs->trans('NewPasswordValidated'); // Save message for the session page $newpassword = $edituser->setPassword($user, $edituser->pass_temp, 0); From b3a064d309e2533c911bbf45f246f98309a1e2b8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 May 2020 16:02:34 +0200 Subject: [PATCH 275/456] Fix dup --- ChangeLog | 1 - 1 file changed, 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a7d0282fba5..bcbfb1a959c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,6 @@ English Dolibarr ChangeLog ***** ChangeLog for 11.0.4 compared to 11.0.3 ***** FIX: #13749 -FIX: #7594 FIX: #7594 Expense report multi pagebreak FIX: Access to undeclared static property: Contact::$table_element FIX: actions on supplier proposal not saved (bad trigger name) From 326dc7d36743779fde215dc23a63ea03796dcf1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 6 May 2020 17:59:40 +0200 Subject: [PATCH 276/456] fix html file:///home/fred/Images/S%C3%A9lection_078.png --- htdocs/bookmarks/bookmarks.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 46e9ca315a5..93283cab815 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -60,7 +60,7 @@ function printDropdownBookmarksList() } $searchForm = ''."\n"; - $searchForm .= '
    global->MAIN_OPTIMIZEFORTEXTBROWSER) ? 'onsubmit="return false"' : '').'>'; + $searchForm .= 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' onsubmit="return false"' : '').'>'; $searchForm .= ''; From 91dcf103757d4c8d5898af031bed620b7c186c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 6 May 2020 23:56:02 +0200 Subject: [PATCH 277/456] session_cache_limiter before starting session --- htdocs/modulebuilder/template/css/mymodule.css.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/modulebuilder/template/css/mymodule.css.php b/htdocs/modulebuilder/template/css/mymodule.css.php index a7ce9fce677..af1566c0869 100644 --- a/htdocs/modulebuilder/template/css/mymodule.css.php +++ b/htdocs/modulebuilder/template/css/mymodule.css.php @@ -32,6 +32,11 @@ if (!defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); +session_cache_limiter('public'); +// false or '' = keep cache instruction added by server +// 'public' = remove cache instruction added by server +// and if no cache-control added later, a default cache delay (10800) will be added by PHP. + // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) @@ -48,10 +53,6 @@ if (!$res) die("Include of main fails"); require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; -session_cache_limiter('public'); -// false or '' = keep cache instruction added by server -// 'public' = remove cache instruction added by server and if no cache-control added later, a default cache delay (10800) will be added by PHP. - // Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS /*if (empty($user->id) && ! empty($_SESSION['dol_login'])) { From d4400cf80fce889f4836338ca40a8bff0080ee2e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2020 11:39:32 +0200 Subject: [PATCH 278/456] FIX links into emails of notifications --- htdocs/core/class/notify.class.php | 56 ++++++++++++++---------------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 6c0ec1ec62b..8a03196beef 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -416,34 +416,34 @@ class Notify switch ($notifcode) { case 'BILL_VALIDATE': - $link='/compta/facture/card.php?facid='.$object->id; + $link = '' . $newref . ''; $dir_output = $conf->facture->dir_output; $object_type = 'facture'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInvoiceValidated", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInvoiceValidated", $link); break; case 'BILL_PAYED': - $link='/compta/facture/card.php?facid='.$object->id; + $link ='' . $newref . ''; $dir_output = $conf->facture->dir_output; $object_type = 'facture'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInvoicePayed", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInvoicePayed", $link); break; case 'ORDER_VALIDATE': - $link='/commande/card.php?id='.$object->id; + $link = '' . $newref . ''; $dir_output = $conf->commande->dir_output; $object_type = 'order'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextOrderValidated", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextOrderValidated", $link); break; case 'PROPAL_VALIDATE': - $link='/comm/propal/card.php?id='.$object->id; + $link = '' . $newref . ''; $dir_output = $conf->propal->multidir_output[$object->entity]; $object_type = 'propal'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalValidated", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalValidated", $link); break; case 'PROPAL_CLOSE_SIGNED': - $link='/comm/propal/card.php?id='.$object->id; + $link = '' . $newref . ''; $dir_output = $conf->propal->multidir_output[$object->entity]; $object_type = 'propal'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalClosedSigned", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextProposalClosedSigned", $link); break; case 'FICHINTER_ADD_CONTACT': $link='/fichinter/card.php?id='.$object->id; @@ -452,17 +452,17 @@ class Notify $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionAddedContact", $newref); break; case 'FICHINTER_VALIDATE': - $link='/fichinter/card.php?id='.$object->id; + $link = '' . $newref . ''; $dir_output = $conf->ficheinter->dir_output; $object_type = 'ficheinter'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionValidated", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextInterventionValidated", $link); break; case 'ORDER_SUPPLIER_VALIDATE': $link='/fourn/commande/card.php?id='.$object->id; $dir_output = $conf->fournisseur->commande->dir_output; $object_type = 'order_supplier'; $mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; - $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderValidatedBy", $newref, $user->getFullName($outputlangs)); + $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderValidatedBy", $link, $user->getFullName($outputlangs)); $mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n"; break; case 'ORDER_SUPPLIER_APPROVE': @@ -470,46 +470,46 @@ class Notify $dir_output = $conf->fournisseur->commande->dir_output; $object_type = 'order_supplier'; $mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; - $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $newref, $user->getFullName($outputlangs)); + $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderApprovedBy", $link, $user->getFullName($outputlangs)); $mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n"; break; case 'ORDER_SUPPLIER_REFUSE': - $link='/fourn/commande/card.php?id='.$object->id; + $link = '' . $newref . ''; $dir_output = $conf->fournisseur->commande->dir_output; $object_type = 'order_supplier'; $mesg = $outputlangs->transnoentitiesnoconv("Hello").",\n\n"; - $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderRefusedBy", $newref, $user->getFullName($outputlangs)); + $mesg.= $outputlangs->transnoentitiesnoconv("EMailTextOrderRefusedBy", $link, $user->getFullName($outputlangs)); $mesg.= "\n\n".$outputlangs->transnoentitiesnoconv("Sincerely").".\n\n"; break; case 'SHIPPING_VALIDATE': $link = ''.$newref.''; $dir_output = $conf->expedition->dir_output.'/sending/'; $object_type = 'expedition'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpeditionValidated", $link); break; case 'EXPENSE_REPORT_VALIDATE': $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $link); break; case 'EXPENSE_REPORT_APPROVE': $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $link); break; case 'HOLIDAY_VALIDATE': $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayValidated", $link); break; case 'HOLIDAY_APPROVE': $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; - $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref); + $mesg = $outputlangs->transnoentitiesnoconv("EMailTextHolidayApproved", $link); break; } $ref = dol_sanitizeFileName($newref); @@ -528,7 +528,6 @@ class Notify $message.= $outputlangs->transnoentities("YouReceiveMailBecauseOfNotification2", $application, $mysoc->name)."\n"; $message.= "\n"; $message.= $mesg; - if ($link) $message.= "\n" . $urlwithroot . $link; // if link is already added around the ref into the translation text, then $link must be set to '' $parameters = array('notifcode'=>$notifcode, 'sendto'=>$sendto, 'replyto'=>$replyto, 'file'=>$filename_list, 'mimefile'=>$mimetype_list, 'filename'=>$mimefilename_list); if (!isset($action)) $action = ''; @@ -655,7 +654,7 @@ class Notify break; case 'FICHINTER_ADD_CONTACT': $link = '' . $newref . ''; - $dir_output = $conf->facture->dir_output; + $dir_output = $conf->ficheinter->dir_output; $object_type = 'ficheinter'; $mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact", $link); break; @@ -701,31 +700,31 @@ class Notify $link = ''.$newref.''; $dir_output = $conf->expedition->dir_output.'/sending/'; $object_type = 'order_supplier'; - $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $newref); + $mesg = $langs->transnoentitiesnoconv("EMailTextExpeditionValidated", $link); break; case 'EXPENSE_REPORT_VALIDATE': $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; - $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $newref); + $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportValidated", $link); break; case 'EXPENSE_REPORT_APPROVE': $link = ''.$newref.''; $dir_output = $conf->expensereport->dir_output; $object_type = 'expensereport'; - $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $newref); + $mesg = $langs->transnoentitiesnoconv("EMailTextExpenseReportApproved", $link); break; case 'HOLIDAY_VALIDATE': $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; - $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $newref); + $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayValidated", $link); break; case 'HOLIDAY_APPROVE': $link = ''.$newref.''; $dir_output = $conf->holiday->dir_output; $object_type = 'holiday'; - $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $newref); + $mesg = $langs->transnoentitiesnoconv("EMailTextHolidayApproved", $link); break; } $ref = dol_sanitizeFileName($newref); @@ -744,7 +743,6 @@ class Notify $message.= $langs->transnoentities("YouReceiveMailBecauseOfNotification2", $application, $mysoc->name)."\n"; $message.= "\n"; $message.= $mesg; - if ($link) $message.= "\n" . $urlwithroot . $link; // if link is already added around the ref into the translation text, then $link must be set to '' $message = nl2br($message); From 03fddd48af55363089ad6082be122d407922ced5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2020 12:14:45 +0200 Subject: [PATCH 279/456] Clean some constructors --- htdocs/compta/prelevement/bons.php | 2 +- htdocs/compta/prelevement/card.php | 4 ++-- .../compta/prelevement/class/bonprelevement.class.php | 10 ++++------ .../prelevement/class/ligneprelevement.class.php | 4 +--- .../prelevement/class/rejetprelevement.class.php | 3 ++- htdocs/compta/prelevement/factures.php | 2 +- htdocs/compta/prelevement/fiche-rejet.php | 2 +- htdocs/compta/prelevement/fiche-stat.php | 4 ++-- htdocs/compta/prelevement/line.php | 4 ++-- htdocs/compta/prelevement/list.php | 4 ++-- htdocs/compta/prelevement/rejets.php | 2 +- htdocs/compta/prelevement/stats.php | 2 +- 12 files changed, 20 insertions(+), 23 deletions(-) diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 7f0bd46c450..c7c717e702b 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -54,7 +54,7 @@ $statut = GETPOST('statut', 'int'); $search_ref = GETPOST('search_ref', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); -$bon = new BonPrelevement($db, ""); +$bon = new BonPrelevement($db); $hookmanager->initHooks(array('withdrawalsreceiptslist')); diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 68f40999aa7..4dcd9f33388 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -58,7 +58,7 @@ $pagenext = $page + 1; if (!$sortfield) $sortfield = 'pl.fk_soc'; if (!$sortorder) $sortorder = 'DESC'; -$object = new BonPrelevement($db, ""); +$object = new BonPrelevement($db); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals @@ -321,7 +321,7 @@ if ($id > 0 || $ref) } - $ligne = new LignePrelevement($db, $user); + $ligne = new LignePrelevement($db); /* * Lines into withdraw request diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 0a033e2df53..0c21a3e6d2b 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -83,18 +83,16 @@ class BonPrelevement extends CommonObject * Constructor * * @param DoliDB $db Database handler - * @param string $filename Filename of withdraw receipt */ - public function __construct($db, $filename = '') + public function __construct($db) { global $conf, $langs; - $error = 0; $this->db = $db; - $this->filename = $filename; + $this->filename = ''; - $this->date_echeance = time(); + $this->date_echeance = dol_now(); $this->raison_sociale = ""; $this->reference_remise = ""; @@ -892,7 +890,7 @@ class BonPrelevement extends CommonObject if ($bac->verif() >= 1) { $factures_prev[$i] = $fac; - /* second tableau necessaire pour BonPrelevement */ + /* second array necessary for BonPrelevement */ $factures_prev_id[$i] = $fac[0]; $i++; //dol_syslog(__METHOD__."::RIB is ok", LOG_DEBUG); diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index dd24ad9522c..88b612554df 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -48,14 +48,12 @@ class LignePrelevement * Constructor * * @param DoliDb $db Database handler - * @param User $user Objet user */ - public function __construct($db, $user) + public function __construct($db) { global $conf, $langs; $this->db = $db; - $this->user = $user; // List of language codes for status diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 74626baed13..8c033353637 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -247,6 +247,7 @@ class RejetPrelevement $sendto = $emuser->getFullName($langs)." <".$emuser->email.">"; $from = $this->user->getFullName($langs)." <".$this->user->email.">"; $msgishtml = 1; + $trackid = 'use'.$emuser->id; $arr_file = array(); $arr_mime = array(); @@ -258,7 +259,7 @@ class RejetPrelevement $message = $langs->trans("InfoRejectMessage", $facref, $socname, $amount, $userinfo); - $mailfile = new CMailFile($subject, $sendto, $from, $message, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $this->user->email); + $mailfile = new CMailFile($subject, $sendto, $from, $message, $arr_file, $arr_mime, $arr_name, '', '', 0, $msgishtml, $this->user->email, '', $trackid); $result = $mailfile->sendfile(); if ($result) diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index ec004717946..fb0a5548426 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -53,7 +53,7 @@ $pagenext = $page + 1; if (!$sortfield) $sortfield = 'p.ref'; if (!$sortorder) $sortorder = 'DESC'; -$object = new BonPrelevement($db, ""); +$object = new BonPrelevement($db); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 44be3d1cd01..1cc454a3d4d 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -51,7 +51,7 @@ $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -$object = new BonPrelevement($db, ""); +$object = new BonPrelevement($db); diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 6e8e8390ae8..18028e2059a 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -50,7 +50,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; -$object = new BonPrelevement($db, ""); +$object = new BonPrelevement($db); /* @@ -142,7 +142,7 @@ if ($prev_id > 0 || $ref) /* * Stats */ - $ligne = new LignePrelevement($db, $user); + $ligne = new LignePrelevement($db); $sql = "SELECT sum(pl.amount), pl.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index 6eef29d1e3e..29bb5c435e3 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -90,7 +90,7 @@ if ($action == 'confirm_rejet') if (!$error) { - $lipre = new LignePrelevement($db, $user); + $lipre = new LignePrelevement($db); if ($lipre->fetch($id) == 0) @@ -132,7 +132,7 @@ $h++; if ($id) { - $lipre = new LignePrelevement($db, $user); + $lipre = new LignePrelevement($db); if ($lipre->fetch($id) == 0) { diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index bebb838652d..48f9bcc7c54 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -64,8 +64,8 @@ $search_code = GETPOST('search_code', 'alpha'); $search_company = GETPOST('search_company', 'alpha'); $statut = GETPOST('statut', 'int'); -$bon = new BonPrelevement($db, ""); -$line = new LignePrelevement($db, $user); +$bon = new BonPrelevement($db); +$line = new LignePrelevement($db); $company = new Societe($db); $hookmanager->initHooks(array('withdrawalsreceiptslineslist')); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 928aaba51b1..6d1994b7a4b 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -57,7 +57,7 @@ if ($sortorder == "") $sortorder = "DESC"; if ($sortfield == "") $sortfield = "p.datec"; $rej = new RejetPrelevement($db, $user); -$line = new LignePrelevement($db, $user); +$line = new LignePrelevement($db); $hookmanager->initHooks(array('withdrawalsreceiptsrejectedlist')); diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index c19603df967..c6d1962ff46 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -73,7 +73,7 @@ if ($resql) print '
    '; print load_fiche_titre($langs->trans("WithdrawStatistics"), '', ''); -$ligne = new LignePrelevement($db, $user); +$ligne = new LignePrelevement($db); $sql = "SELECT sum(pl.amount), count(pl.amount), pl.statut"; $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl"; From ad489ab1b409b11f2e39552d63e2fb6cff603115 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Thu, 7 May 2020 12:22:13 +0200 Subject: [PATCH 280/456] NEW show messages on ticket card --- htdocs/ticket/card.php | 919 +++++++++++++++++++++-------------------- 1 file changed, 479 insertions(+), 440 deletions(-) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index b9459a0e161..3d37c46eb90 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -55,6 +55,17 @@ $action = GETPOST('action', 'aZ09'); $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); + +if (GETPOST('actioncode', 'array')) { + $actioncode = GETPOST('actioncode', 'array', 3); + if (!count($actioncode)) $actioncode = '0'; +} else { + $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); +} +$search_agenda_label = GETPOST('search_agenda_label'); + // Initialize technical object to manage hooks of ticket. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('ticketcard', 'globalcard')); @@ -116,493 +127,486 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if ($cancel) -{ - if (!empty($backtopage)) +if (empty($reshook)) { + // Purge search criteria + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers{ { - header("Location: ".$backtopage); - exit; - } - $action = 'view'; -} - -if (GETPOST('add', 'alpha') && $user->rights->ticket->write) { - $error = 0; - - if (!GETPOST("subject", 'alpha')) { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")), null, 'errors'); - $action = 'create'; - } elseif (!GETPOST("message", 'alpha')) { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Message")), null, 'errors'); - $action = 'create'; + $actioncode = ''; + $search_agenda_label = ''; } - if (!$error) { - $db->begin(); + if ($cancel) { + if (!empty($backtopage)) { + header("Location: " . $backtopage); + exit; + } + $action = 'view'; + } - $object->ref = GETPOST("ref", 'alpha'); - $object->fk_soc = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0; - $object->subject = GETPOST("subject", 'alpha'); - $object->message = GETPOST("message", 'none'); + if (GETPOST('add', 'alpha') && $user->rights->ticket->write) { + $error = 0; - $object->type_code = GETPOST("type_code", 'alpha'); - $object->category_code = GETPOST("category_code", 'alpha'); - $object->severity_code = GETPOST("severity_code", 'alpha'); - $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); - $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1; - - $object->fk_project = GETPOST('projectid', 'int'); - - $ret = $extrafields->setOptionalsFromPost(null, $object); - - $id = $object->create($user); - if ($id <= 0) { + if (!GETPOST("subject", 'alpha')) { $error++; - setEventMessage($object->error, $object->errors, 'errors'); + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")), null, 'errors'); + $action = 'create'; + } elseif (!GETPOST("message", 'alpha')) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Message")), null, 'errors'); $action = 'create'; } - if (!$error) - { - // Add contact - $contactid = GETPOST('contactid', 'int'); - $type_contact = GETPOST("type", 'alpha'); + if (!$error) { + $db->begin(); - if ($contactid > 0 && $type_contact) { - $result = $object->add_contact($contactid, GETPOST("type"), 'external'); + $object->ref = GETPOST("ref", 'alpha'); + $object->fk_soc = GETPOST("socid", 'int') > 0 ? GETPOST("socid", 'int') : 0; + $object->subject = GETPOST("subject", 'alpha'); + $object->message = GETPOST("message", 'none'); + + $object->type_code = GETPOST("type_code", 'alpha'); + $object->category_code = GETPOST("category_code", 'alpha'); + $object->severity_code = GETPOST("severity_code", 'alpha'); + $notifyTiers = GETPOST("notify_tiers_at_create", 'alpha'); + $object->notify_tiers_at_create = empty($notifyTiers) ? 0 : 1; + + $object->fk_project = GETPOST('projectid', 'int'); + + $ret = $extrafields->setOptionalsFromPost(null, $object); + + $id = $object->create($user); + if ($id <= 0) { + $error++; + setEventMessage($object->error, $object->errors, 'errors'); + $action = 'create'; } - // altairis: link ticket to project - if (GETPOST('projectid') > 0) { - $object->setProject(GETPOST('projectid')); - } + if (!$error) { + // Add contact + $contactid = GETPOST('contactid', 'int'); + $type_contact = GETPOST("type", 'alpha'); - // Auto assign user - if ($conf->global->TICKET_AUTO_ASSIGN_USER_CREATE) { - $result = $object->assignUser($user, $user->id, 1); - $object->add_contact($user->id, "SUPPORTTEC", 'internal'); - } + if ($contactid > 0 && $type_contact) { + $result = $object->add_contact($contactid, GETPOST("type"), 'external'); + } - // Auto assign contrat - $contractid = 0; - if ($conf->global->TICKET_AUTO_ASSIGN_CONTRACT_CREATE) { - $contrat = new Contrat($db); - $contrat->socid = $object->fk_soc; - $list = $contrat->getListOfContracts(); + // altairis: link ticket to project + if (GETPOST('projectid') > 0) { + $object->setProject(GETPOST('projectid')); + } - if (is_array($list) && !empty($list)) { - if (count($list) == 1) { - $contractid = $list[0]->id; - $object->setContract($contractid); - } else { + // Auto assign user + if ($conf->global->TICKET_AUTO_ASSIGN_USER_CREATE) { + $result = $object->assignUser($user, $user->id, 1); + $object->add_contact($user->id, "SUPPORTTEC", 'internal'); + } + + // Auto assign contrat + $contractid = 0; + if ($conf->global->TICKET_AUTO_ASSIGN_CONTRACT_CREATE) { + $contrat = new Contrat($db); + $contrat->socid = $object->fk_soc; + $list = $contrat->getListOfContracts(); + + if (is_array($list) && !empty($list)) { + if (count($list) == 1) { + $contractid = $list[0]->id; + $object->setContract($contractid); + } else { + } + } + } + + // Auto create fiche intervention + if ($conf->global->TICKET_AUTO_CREATE_FICHINTER_CREATE) { + $fichinter = new Fichinter($db); + $fichinter->socid = $object->fk_soc; + $fichinter->fk_project = GETPOST('projectid', 'int'); + $fichinter->fk_contrat = $contractid; + $fichinter->author = $user->id; + $fichinter->modelpdf = 'soleil'; + $fichinter->origin = $object->element; + $fichinter->origin_id = $object->id; + + // Extrafields + $extrafields->fetch_name_optionals_label($fichinter->table_element); + $array_options = $extrafields->getOptionalsFromPost($fichinter->table_element); + $fichinter->array_options = $array_options; + + $id = $fichinter->create($user); + if ($id <= 0) { + setEventMessages($fichinter->error, null, 'errors'); } } } - // Auto create fiche intervention - if ($conf->global->TICKET_AUTO_CREATE_FICHINTER_CREATE) - { - $fichinter = new Fichinter($db); - $fichinter->socid = $object->fk_soc; - $fichinter->fk_project = GETPOST('projectid', 'int'); - $fichinter->fk_contrat = $contractid; - $fichinter->author = $user->id; - $fichinter->modelpdf = 'soleil'; - $fichinter->origin = $object->element; - $fichinter->origin_id = $object->id; + if (!$error) { + // File transfer + $object->copyFilesForTicket(); + } - // Extrafields - $extrafields->fetch_name_optionals_label($fichinter->table_element); - $array_options = $extrafields->getOptionalsFromPost($fichinter->table_element); - $fichinter->array_options = $array_options; + if (!$error) { + $db->commit(); - $id = $fichinter->create($user); - if ($id <= 0) { - setEventMessages($fichinter->error, null, 'errors'); + if (!empty($backtopage)) { + $url = $backtopage; + } else { + $url = 'card.php?track_id=' . $object->track_id; } - } - } - if (!$error) - { - // File transfer - $object->copyFilesForTicket(); - } - - if (!$error) - { - $db->commit(); - - if (!empty($backtopage)) { - $url = $backtopage; + header("Location: " . $url); + exit; } else { - $url = 'card.php?track_id='.$object->track_id; + $db->rollback(); + setEventMessages($object->error, $object->errors, 'errors'); } - - header("Location: ".$url); - exit; } else { - $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } else { - setEventMessages($object->error, $object->errors, 'errors'); - } -} - -if ($action == 'edit' && $user->rights->ticket->write) { - $error = 0; - - if ($object->fetch(GETPOST('id', 'int')) < 0) { - $error++; - array_push($object->errors, $langs->trans("ErrorTicketIsNotValid")); - $_GET["action"] = $_POST["action"] = ''; - } -} - -if (GETPOST('update', 'alpha') && GETPOST('id', 'int') && $user->rights->ticket->write) { - $error = 0; - - $ret = $object->fetch(GETPOST('id', 'int')); - if ($ret < 0) { - $error++; - array_push($object->errors, $langs->trans("ErrorTicketIsNotValid")); - $action = ''; - } elseif (!GETPOST("label")) { - $error++; - array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label"))); - $action = 'edit'; - } elseif (!GETPOST("subject")) { - $error++; - array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject"))); - $action = 'edit'; } - if (!$error) { - $db->begin(); + if ($action == 'edit' && $user->rights->ticket->write) { + $error = 0; - $object->label = GETPOST("label", 'alphanohtml'); - $object->description = GETPOST("description", 'none'); - - //... - $ret = $object->update($user); - if ($ret <= 0) { + if ($object->fetch(GETPOST('id', 'int')) < 0) { $error++; - setEventMessage($object->error, $object->errors, 'errors'); + array_push($object->errors, $langs->trans("ErrorTicketIsNotValid")); + $_GET["action"] = $_POST["action"] = ''; + } + } + + if (GETPOST('update', 'alpha') && GETPOST('id', 'int') && $user->rights->ticket->write) { + $error = 0; + + $ret = $object->fetch(GETPOST('id', 'int')); + if ($ret < 0) { + $error++; + array_push($object->errors, $langs->trans("ErrorTicketIsNotValid")); + $action = ''; + } elseif (!GETPOST("label")) { + $error++; + array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Label"))); + $action = 'edit'; + } elseif (!GETPOST("subject")) { + $error++; + array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject"))); $action = 'edit'; } - if (!$error && $ret > 0) { - $db->commit(); - } else { - $db->rollback(); - } - } -} + if (!$error) { + $db->begin(); -// Mark as Read -if ($action == "mark_ticket_read" && $user->rights->ticket->write) { - $object->fetch('', '', GETPOST("track_id", 'alpha')); + $object->label = GETPOST("label", 'alphanohtml'); + $object->description = GETPOST("description", 'none'); - if ($object->markAsRead($user) > 0) - { - setEventMessages($langs->trans('TicketMarkedAsRead'), null, 'mesgs'); + //... + $ret = $object->update($user); + if ($ret <= 0) { + $error++; + setEventMessage($object->error, $object->errors, 'errors'); + $action = 'edit'; + } - header("Location: card.php?track_id=".$object->track_id."&action=view"); - exit; - } else { - setEventMessages($object->error, $object->errors, 'errors'); - } - $action = 'view'; -} - -// Assign to someone -if ($action == "assign_user" && GETPOST('btn_assign_user', 'alpha') && $user->rights->ticket->write) { - $object->fetch('', '', GETPOST("track_id", 'alpha')); - $useroriginassign = $object->fk_user_assign; - $usertoassign = GETPOST('fk_user_assign', 'int'); - - /*if (! ($usertoassign > 0)) { - $error++; - array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("AssignedTo"))); - $action = 'view'; - }*/ - - if (!$error) - { - $ret = $object->assignUser($user, $usertoassign); - if ($ret < 0) $error++; - } - - if (!$error) // Update list of contacts - { - // Si déjà un user assigné on le supprime des contacts - if ($useroriginassign > 0) { - $internal_contacts = $object->listeContact(-1, 'internal'); - - foreach ($internal_contacts as $key => $contact) { - if ($contact['code'] == "SUPPORTTEC" && $contact['id'] == $useroriginassign) { - } - { - //print "user à effacer : ".$useroriginassign; - $object->delete_contact($contact['rowid']); - } + if (!$error && $ret > 0) { + $db->commit(); + } else { + $db->rollback(); } } - - if ($usertoassign > 0) $object->add_contact($usertoassign, "SUPPORTTEC", 'internal', $notrigger = 0); } - if (!$error) - { - // Log action in ticket logs table - $object->fetch_user($usertoassign); - $log_action = $langs->trans('TicketLogAssignedTo', $object->user->getFullName($langs)); + // Mark as Read + if ($action == "mark_ticket_read" && $user->rights->ticket->write) { + $object->fetch('', '', GETPOST("track_id", 'alpha')); - setEventMessages($langs->trans('TicketAssigned'), null, 'mesgs'); + if ($object->markAsRead($user) > 0) { + setEventMessages($langs->trans('TicketMarkedAsRead'), null, 'mesgs'); - header("Location: card.php?track_id=".$object->track_id."&action=view"); - exit; - } else { - array_push($object->errors, $object->error); - } - $action = 'view'; -} - -if ($action == 'add_message' && GETPOSTISSET('btn_add_message') && $user->rights->ticket->read) { - $ret = $object->newMessage($user, $action, (GETPOST('private_message', 'alpha') == "on" ? 1 : 0)); - - if ($ret > 0) { - if (!empty($backtopage)) { - $url = $backtopage; - } else { - $url = 'card.php?action=view&track_id='.$object->track_id; - } - - header("Location: ".$url); - exit; - } else { - setEventMessages($object->error, null, 'errors'); - $action = 'presend'; - } -} - -if ($action == "confirm_close" && GETPOST('confirm', 'alpha') == 'yes' && $user->rights->ticket->write) -{ - $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); - - if ($object->close($user)) { - setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs'); - - $url = 'card.php?action=view&track_id='.GETPOST('track_id', 'alpha'); - header("Location: ".$url); - } else { - $action = ''; - setEventMessages($object->error, $object->errors, 'errors'); - } -} - -if ($action == "confirm_public_close" && GETPOST('confirm', 'alpha') == 'yes') { - $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); - if ($_SESSION['email_customer'] == $object->origin_email || $_SESSION['email_customer'] == $object->thirdparty->email) { - $object->close($user); - - // Log action in ticket logs table - $log_action = $langs->trans('TicketLogClosedBy', $_SESSION['email_customer']); - - setEventMessages('
    '.$langs->trans('TicketMarkedAsClosed').'
    ', null, 'mesgs'); - - $url = 'card.php?action=view_ticket&track_id='.GETPOST('track_id', 'alpha'); - header("Location: ".$url); - } else { - setEventMessages($object->error, $object->errors, 'errors'); - $action = ''; - } -} - -if ($action == 'confirm_delete_ticket' && GETPOST('confirm', 'alpha') == "yes" && $user->rights->ticket->delete) { - if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { - if ($object->delete($user) > 0) { - setEventMessages('
    '.$langs->trans('TicketDeletedSuccess').'
    ', null, 'mesgs'); - Header("Location: ".DOL_URL_ROOT."/ticket/list.php"); + header("Location: card.php?track_id=" . $object->track_id . "&action=view"); exit; } else { - $langs->load("errors"); - $mesg = '
    '.$langs->trans($object->error).'
    '; + setEventMessages($object->error, $object->errors, 'errors'); + } + $action = 'view'; + } + + // Assign to someone + if ($action == "assign_user" && GETPOST('btn_assign_user', 'alpha') && $user->rights->ticket->write) { + $object->fetch('', '', GETPOST("track_id", 'alpha')); + $useroriginassign = $object->fk_user_assign; + $usertoassign = GETPOST('fk_user_assign', 'int'); + + /*if (! ($usertoassign > 0)) { + $error++; + array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("AssignedTo"))); + $action = 'view'; + }*/ + + if (!$error) { + $ret = $object->assignUser($user, $usertoassign); + if ($ret < 0) $error++; + } + + if (!$error) // Update list of contacts + { + // Si déjà un user assigné on le supprime des contacts + if ($useroriginassign > 0) { + $internal_contacts = $object->listeContact(-1, 'internal'); + + foreach ($internal_contacts as $key => $contact) { + if ($contact['code'] == "SUPPORTTEC" && $contact['id'] == $useroriginassign) { + } + { + //print "user à effacer : ".$useroriginassign; + $object->delete_contact($contact['rowid']); + } + } + } + + if ($usertoassign > 0) $object->add_contact($usertoassign, "SUPPORTTEC", 'internal', $notrigger = 0); + } + + if (!$error) { + // Log action in ticket logs table + $object->fetch_user($usertoassign); + $log_action = $langs->trans('TicketLogAssignedTo', $object->user->getFullName($langs)); + + setEventMessages($langs->trans('TicketAssigned'), null, 'mesgs'); + + header("Location: card.php?track_id=" . $object->track_id . "&action=view"); + exit; + } else { + array_push($object->errors, $object->error); + } + $action = 'view'; + } + + if ($action == 'add_message' && GETPOSTISSET('btn_add_message') && $user->rights->ticket->read) { + $ret = $object->newMessage($user, $action, (GETPOST('private_message', 'alpha') == "on" ? 1 : 0)); + + if ($ret > 0) { + if (!empty($backtopage)) { + $url = $backtopage; + } else { + $url = 'card.php?action=view&track_id=' . $object->track_id; + } + + header("Location: " . $url); + exit; + } else { + setEventMessages($object->error, null, 'errors'); + $action = 'presend'; + } + } + + if ($action == "confirm_close" && GETPOST('confirm', 'alpha') == 'yes' && $user->rights->ticket->write) { + $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); + + if ($object->close($user)) { + setEventMessages($langs->trans('TicketMarkedAsClosed'), null, 'mesgs'); + + $url = 'card.php?action=view&track_id=' . GETPOST('track_id', 'alpha'); + header("Location: " . $url); + } else { + $action = ''; + setEventMessages($object->error, $object->errors, 'errors'); + } + } + + if ($action == "confirm_public_close" && GETPOST('confirm', 'alpha') == 'yes') { + $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); + if ($_SESSION['email_customer'] == $object->origin_email || $_SESSION['email_customer'] == $object->thirdparty->email) { + $object->close($user); + + // Log action in ticket logs table + $log_action = $langs->trans('TicketLogClosedBy', $_SESSION['email_customer']); + + setEventMessages('
    ' . $langs->trans('TicketMarkedAsClosed') . '
    ', null, 'mesgs'); + + $url = 'card.php?action=view_ticket&track_id=' . GETPOST('track_id', 'alpha'); + header("Location: " . $url); + } else { + setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } } -} -// Set parent company -if ($action == 'set_thirdparty' && $user->rights->societe->creer) { - if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { - $result = $object->setCustomer(GETPOST('editcustomer', 'int')); - $url = 'card.php?action=view&track_id='.GETPOST('track_id', 'alpha'); - header("Location: ".$url); - exit(); - } -} - -if ($action == 'set_progression' && $user->rights->ticket->write) { - if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { - $result = $object->setProgression(GETPOST('progress', 'alpha')); - - $url = 'card.php?action=view&track_id='.$object->track_id; - header("Location: ".$url); - exit(); - } -} - -if ($action == 'setsubject') { - if ($object->fetch(GETPOST('id', 'int'))) { - if ($action == 'setsubject') { - $object->subject = trim(GETPOST('subject', 'alpha')); - } - - if ($action == 'setsubject' && empty($object->subject)) { - $mesg .= ($mesg ? '
    ' : '').$langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")); - } - - if (!$mesg) { - if ($object->update($user) >= 0) { - header("Location: ".$_SERVER['PHP_SELF']."?track_id=".$object->track_id); + if ($action == 'confirm_delete_ticket' && GETPOST('confirm', 'alpha') == "yes" && $user->rights->ticket->delete) { + if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { + if ($object->delete($user) > 0) { + setEventMessages('
    ' . $langs->trans('TicketDeletedSuccess') . '
    ', null, 'mesgs'); + Header("Location: " . DOL_URL_ROOT . "/ticket/list.php"); exit; + } else { + $langs->load("errors"); + $mesg = '
    ' . $langs->trans($object->error) . '
    '; + $action = ''; } - $mesg = $object->error; } } -} -if ($action == 'confirm_reopen' && $user->rights->ticket->manage && !GETPOST('cancel')) { - if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { - // prevent browser refresh from reopening ticket several times - if ($object->fk_statut == Ticket::STATUS_CLOSED) { - $res = $object->setStatut(Ticket::STATUS_ASSIGNED); + // Set parent company + if ($action == 'set_thirdparty' && $user->rights->societe->creer) { + if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { + $result = $object->setCustomer(GETPOST('editcustomer', 'int')); + $url = 'card.php?action=view&track_id=' . GETPOST('track_id', 'alpha'); + header("Location: " . $url); + exit(); + } + } + + if ($action == 'set_progression' && $user->rights->ticket->write) { + if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { + $result = $object->setProgression(GETPOST('progress', 'alpha')); + + $url = 'card.php?action=view&track_id=' . $object->track_id; + header("Location: " . $url); + exit(); + } + } + + if ($action == 'setsubject') { + if ($object->fetch(GETPOST('id', 'int'))) { + if ($action == 'setsubject') { + $object->subject = trim(GETPOST('subject', 'alpha')); + } + + if ($action == 'setsubject' && empty($object->subject)) { + $mesg .= ($mesg ? '
    ' : '') . $langs->trans("ErrorFieldRequired", $langs->transnoentities("Subject")); + } + + if (!$mesg) { + if ($object->update($user) >= 0) { + header("Location: " . $_SERVER['PHP_SELF'] . "?track_id=" . $object->track_id); + exit; + } + $mesg = $object->error; + } + } + } + + if ($action == 'confirm_reopen' && $user->rights->ticket->manage && !GETPOST('cancel')) { + if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { + // prevent browser refresh from reopening ticket several times + if ($object->fk_statut == Ticket::STATUS_CLOSED) { + $res = $object->setStatut(Ticket::STATUS_ASSIGNED); + if ($res) { + // Log action in ticket logs table + $log_action = $langs->trans('TicketLogReopen'); + + $url = 'card.php?action=view&track_id=' . $object->track_id; + header("Location: " . $url); + exit(); + } + } + } + } // Categorisation dans projet + elseif ($action == 'classin' && $user->rights->ticket->write) { + if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { + $object->setProject(GETPOST('projectid', 'int')); + $url = 'card.php?action=view&track_id=' . $object->track_id; + header("Location: " . $url); + exit(); + } + } // Categorisation dans contrat + elseif ($action == 'setcontract' && $user->rights->ticket->write) { + if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { + $object->setContract(GETPOST('contractid', 'int')); + $url = 'card.php?action=view&track_id=' . $object->track_id; + header("Location: " . $url); + exit(); + } + } elseif ($action == "set_message" && $user->rights->ticket->manage) { + // altairis: manage cancel button + if (!GETPOST('cancel')) { + $object->fetch('', '', GETPOST('track_id', 'alpha')); + $oldvalue_message = $object->message; + $fieldtomodify = GETPOST('message_initial'); + + $object->message = $fieldtomodify; + $ret = $object->update($user); + if ($ret > 0) { + $log_action = $langs->trans('TicketInitialMessageModified') . " \n"; + // include the Diff class + dol_include_once('/ticket/class/utils_diff.class.php'); + // output the result of comparing two files as plain text + $log_action .= Diff::toString(Diff::compare(strip_tags($oldvalue_message), strip_tags($object->message))); + + setEventMessages($langs->trans('TicketMessageSuccesfullyUpdated'), null, 'mesgs'); + } + } + + $action = 'view'; + } // Reopen ticket + elseif ($action == 'confirm_set_status' && $user->rights->ticket->write && !GETPOST('cancel')) { + if ($object->fetch(GETPOST('id', 'int'), GETPOST('track_id', 'alpha')) >= 0) { + $new_status = GETPOST('new_status', 'int'); + $old_status = $object->fk_statut; + $res = $object->setStatut($new_status); if ($res) { // Log action in ticket logs table - $log_action = $langs->trans('TicketLogReopen'); + $log_action = $langs->trans('TicketLogStatusChanged', $langs->transnoentities($object->statuts_short[$old_status]), $langs->transnoentities($object->statuts_short[$new_status])); - $url = 'card.php?action=view&track_id='.$object->track_id; - header("Location: ".$url); + $url = 'card.php?action=view&track_id=' . $object->track_id; + header("Location: " . $url); exit(); } } } -} // Categorisation dans projet -elseif ($action == 'classin' && $user->rights->ticket->write) { - if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { - $object->setProject(GETPOST('projectid', 'int')); - $url = 'card.php?action=view&track_id='.$object->track_id; - header("Location: ".$url); - exit(); - } -} // Categorisation dans contrat -elseif ($action == 'setcontract' && $user->rights->ticket->write) { - if ($object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')) >= 0) { - $object->setContract(GETPOST('contractid', 'int')); - $url = 'card.php?action=view&track_id='.$object->track_id; - header("Location: ".$url); - exit(); - } -} elseif ($action == "set_message" && $user->rights->ticket->manage) { - // altairis: manage cancel button - if (!GETPOST('cancel')) { - $object->fetch('', '', GETPOST('track_id', 'alpha')); - $oldvalue_message = $object->message; - $fieldtomodify = GETPOST('message_initial'); - $object->message = $fieldtomodify; + // Action to update one extrafield + if ($action == "update_extras" && !empty($permissiontoadd)) { + $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); + $attributekey = GETPOST('attribute', 'alpha'); + $attributekeylong = 'options_' . $attributekey; + $object->array_options['options_' . $attributekey] = GETPOST($attributekeylong, ' alpha'); + + $result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user); + if ($result > 0) { + setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); + $action = 'view'; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit_extras'; + } + } + + if ($action == "change_property" && GETPOST('btn_update_ticket_prop', 'alpha') && $user->rights->ticket->write) { + $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); + + $object->type_code = GETPOST('update_value_type', 'aZ09'); + $object->severity_code = GETPOST('update_value_severity', 'aZ09'); + $object->category_code = GETPOST('update_value_category', 'aZ09'); + $ret = $object->update($user); if ($ret > 0) { - $log_action = $langs->trans('TicketInitialMessageModified')." \n"; - // include the Diff class - dol_include_once('/ticket/class/utils_diff.class.php'); - // output the result of comparing two files as plain text - $log_action .= Diff::toString(Diff::compare(strip_tags($oldvalue_message), strip_tags($object->message))); + $log_action = $langs->trans('TicketLogPropertyChanged', $oldvalue_label, $newvalue_label); - setEventMessages($langs->trans('TicketMessageSuccesfullyUpdated'), null, 'mesgs'); + setEventMessages($langs->trans('TicketUpdated'), null, 'mesgs'); } - } - - $action = 'view'; -} // Reopen ticket -elseif ($action == 'confirm_set_status' && $user->rights->ticket->write && !GETPOST('cancel')) { - if ($object->fetch(GETPOST('id', 'int'), GETPOST('track_id', 'alpha')) >= 0) { - $new_status = GETPOST('new_status', 'int'); - $old_status = $object->fk_statut; - $res = $object->setStatut($new_status); - if ($res) { - // Log action in ticket logs table - $log_action = $langs->trans('TicketLogStatusChanged', $langs->transnoentities($object->statuts_short[$old_status]), $langs->transnoentities($object->statuts_short[$new_status])); - - $url = 'card.php?action=view&track_id='.$object->track_id; - header("Location: ".$url); - exit(); - } - } -} - -// Action to update one extrafield -if ($action == "update_extras" && !empty($permissiontoadd)) -{ - $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); - $attributekey = GETPOST('attribute', 'alpha'); - $attributekeylong = 'options_'.$attributekey; - $object->array_options['options_'.$attributekey] = GETPOST($attributekeylong, ' alpha'); - - $result = $object->insertExtraFields(empty($triggermodname) ? '' : $triggermodname, $user); - if ($result > 0) - { - setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); $action = 'view'; } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - $action = 'edit_extras'; - } + + + $permissiondellink = $user->rights->ticket->write; + include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be include, not include_once + + // Actions to build doc + $upload_dir = $conf->ticket->dir_output; + $permissiontoadd = $user->rights->ticket->write; + include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; + + // Actions to send emails + $triggersendname = 'TICKET_SENTBYMAIL'; + $paramname = 'id'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_TICKET_TO'; // used to know the automatic BCC to add + $trackid = 'tic' . $object->id; + include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; + + // Set $action to correct value for the case we used presend action to add a message + if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; } -if ($action == "change_property" && GETPOST('btn_update_ticket_prop', 'alpha') && $user->rights->ticket->write) -{ - $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); - - $object->type_code = GETPOST('update_value_type', 'aZ09'); - $object->severity_code = GETPOST('update_value_severity', 'aZ09'); - $object->category_code = GETPOST('update_value_category', 'aZ09'); - - $ret = $object->update($user); - if ($ret > 0) { - $log_action = $langs->trans('TicketLogPropertyChanged', $oldvalue_label, $newvalue_label); - - setEventMessages($langs->trans('TicketUpdated'), null, 'mesgs'); - } - $action = 'view'; -} - - -$permissiondellink = $user->rights->ticket->write; -include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once - -// Actions to build doc -$upload_dir = $conf->ticket->dir_output; -$permissiontoadd = $user->rights->ticket->write; -include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - -// Actions to send emails -$triggersendname = 'TICKET_SENTBYMAIL'; -$paramname = 'id'; -$autocopy = 'MAIN_MAIL_AUTOCOPY_TICKET_TO'; // used to know the automatic BCC to add -$trackid = 'tic'.$object->id; -include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; - -// Set $action to correct value for the case we used presend action to add a message -if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; - - /* * View */ @@ -1213,30 +1217,8 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd // Set $action to correct value for the case we used presend action to add a message if (GETPOSTISSET('actionbis') && $action == 'presend') $action = 'presend_addmessage'; - if ($action != 'presend' && $action != 'presend_addmessage') - { - print '
    '; - print ''; // ancre - - // Show links to link elements - $linktoelem = $form->showLinkToObjectBlock($object, null, array('ticket')); - $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - - // Show direct link to public interface - print '
    '."\n"; - print showDirectPublicLink($object).'
    '; - - print '
    '; - - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'ticket', $socid, 1); - - print '
    '; - } - else - { + // add a message + if ($action == 'presend' || $action == 'presend_addmessage') { $action = 'add_message'; // action to use to post the message $modelmail = 'ticket_send'; @@ -1310,6 +1292,63 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd $formticket->showMessageForm('100%'); print '
    '; } + + // Show messages on card + if (empty($conf->global->TICKET_HIDE_MESSAGES_ON_CARD)) { + $param = '&id='.$object->id; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; + if ($actioncode) $param .= '&actioncode='.urlencode($actioncode); + if ($search_agenda_label) $param .= '&search_agenda_label='.urlencode($search_agenda_label); + + $morehtmlright = ''; + + $messagingUrl = DOL_URL_ROOT . '/ticket/agenda.php?track_id=' . $object->track_id; + $morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fal fa-list-alt imgforviewmode', $messagingUrl, '', 1); + + // Show link to add a message (if read and not closed) + $btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage" && $action != "add_message"; + $url = 'card.php?track_id=' . $object->track_id . '&action=presend_addmessage&mode=init'; + $morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fal fa-comment-dots', $url, 'add-new-ticket-title-button', $btnstatus); + + // Show link to add event (if read and not closed) + $btnstatus = $object->fk_statut < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage" && $action != "add_message";; + $url = dol_buildpath('/comm/action/card.php', 1) . '?action=create&datep=' . date('YmdHi') . '&origin=ticket&originid=' . $object->id . '&projectid=' . $object->fk_project . '&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?track_id=' . $object->track_id); + $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fal fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus); + + print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); + + // List of all actions + $filters = array(); + $filters['search_agenda_label'] = $search_agenda_label; + show_ticket_messaging($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder); + } + + if ($action != 'presend' && $action != 'presend_addmessage') { + print '
    '; + print ''; // ancre + + // Show links to link elements + $linktoelem = $form->showLinkToObjectBlock($object, null, array('ticket')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + + // Show direct link to public interface + print '
    '."\n"; + print showDirectPublicLink($object).'
    '; + print '
    '; + + if (!empty($conf->global->TICKET_HIDE_MESSAGES_ON_CARD)) { + print '
    '; + + // List of actions on element + include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'ticket', $socid, 1); + + print '
    '; + } + print '
    '; + } } } From 7e8cd565f482fcc7e58fa64f67fe4107c63b21cc Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Thu, 7 May 2020 14:35:04 +0200 Subject: [PATCH 281/456] NEW not show linked table on add message action --- htdocs/ticket/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 3d37c46eb90..7d5ab5fe228 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1324,7 +1324,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd show_ticket_messaging($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder); } - if ($action != 'presend' && $action != 'presend_addmessage') { + if ($action != 'presend' && $action != 'presend_addmessage' && $action != 'add_message') { print '
    '; print ''; // ancre From dd1d29f983c4625b4866fb1c61a80f1907cf5f54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 7 May 2020 15:37:32 +0200 Subject: [PATCH 282/456] add some substitutions for date datetime --- htdocs/core/lib/functions.lib.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1a4ab00b7d6..c3da7d0ade4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6358,6 +6358,17 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) { $substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = $object->array_options['options_'.$key]; + if ($extrafields->attribute_type[$key] == 'date') { + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = dol_print_date($object->array_options['options_' . $key], 'day'); + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = dol_print_date($object->array_options['options_' . $key], 'day', 'tzserver', $outputlangs); + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = dol_print_date($object->array_options['options_' . $key],'dayrfc'); + } elseif ($extrafields->attribute_type[$key] == 'datetime') { + $datetime = $object->array_options['options_'.$key]; + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = ($datetime!="0000-00-00 00:00:00" ? dol_print_date($datetime,'dayhour') : ''); + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = ($datetime!="0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour', 'tzserver', $outputlangs) : ''); + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_DAY_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'day', 'tzserver', $outputlangs) : ''); + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhourrfc') : ''); + } } } } From c28e6630bb9bf6fe4a3020e01f8fbb640ce2347f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Thu, 7 May 2020 15:41:21 +0200 Subject: [PATCH 283/456] Update functions.lib.php --- htdocs/core/lib/functions.lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index c3da7d0ade4..43cee63c1ed 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6361,11 +6361,11 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, if ($extrafields->attribute_type[$key] == 'date') { $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = dol_print_date($object->array_options['options_' . $key], 'day'); $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = dol_print_date($object->array_options['options_' . $key], 'day', 'tzserver', $outputlangs); - $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = dol_print_date($object->array_options['options_' . $key],'dayrfc'); + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = dol_print_date($object->array_options['options_' . $key], 'dayrfc'); } elseif ($extrafields->attribute_type[$key] == 'datetime') { $datetime = $object->array_options['options_'.$key]; - $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = ($datetime!="0000-00-00 00:00:00" ? dol_print_date($datetime,'dayhour') : ''); - $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = ($datetime!="0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour', 'tzserver', $outputlangs) : ''); + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour') : ''); + $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour', 'tzserver', $outputlangs) : ''); $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_DAY_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'day', 'tzserver', $outputlangs) : ''); $substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhourrfc') : ''); } From 0cd05887ce95de5496924a941a92f31155a0ed2e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2020 17:21:27 +0200 Subject: [PATCH 284/456] FIX count of open day when date and start are not open should be 0 --- htdocs/core/lib/date.lib.php | 10 +++++++++- htdocs/holiday/card.php | 4 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 123e3297f11..56dfee3988c 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -896,15 +896,23 @@ function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0, if ($timestampStart < $timestampEnd) { $numdays = num_between_day($timestampStart, $timestampEnd, $lastday); + $numholidays = num_public_holiday($timestampStart, $timestampEnd, $country_code, $lastday); $nbOpenDay = $numdays - $numholidays; - $nbOpenDay.= " " . $langs->trans("Days"); + $nbOpenDay.= ' '.$langs->trans("Days"); if ($inhour == 1 && $nbOpenDay <= 3) $nbOpenDay = $nbOpenDay*24 . $langs->trans("HourShort"); return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday)); } elseif ($timestampStart == $timestampEnd) { + $numholidays = 0; + if ($lastday) { + $numholidays = num_public_holiday($timestampStart, $timestampEnd, $country_code, $lastday); + if ($numholidays == 1) return 0; + } + $nbOpenDay=$lastday; + if ($inhour == 1) $nbOpenDay = $nbOpenDay*24 . $langs->trans("HourShort"); return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday)); } diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 9cc287cd28a..6dd218255e5 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -1291,7 +1291,9 @@ else if ($includesunday) $htmlhelp.='
    '.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday")); print $form->textwithpicto($langs->trans('NbUseDaysCP'), $htmlhelp); print '
    '.num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday).''; + print num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); + print '
    '; + $actioncomm = $actionstatic; + // TODO Code common with code into showactions + $imgpicto = ''; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - if ($actionstatic->type_picto) print img_picto('', $actionstatic->type_picto); - else { - if ($actionstatic->type_code == 'AC_RDV') print img_picto('', 'object_group', '', false, 0, 0, '', '').' '; - elseif ($actionstatic->type_code == 'AC_TEL') print img_picto('', 'object_phoning', '', false, 0, 0, '', '').' '; - elseif ($actionstatic->type_code == 'AC_FAX') print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', '').' '; - elseif ($actionstatic->type_code == 'AC_EMAIL') print img_picto('', 'object_email', '', false, 0, 0, '', '').' '; - elseif ($actionstatic->type_code == 'AC_INT') print img_picto('', 'object_intervention', '', false, 0, 0, '', '').' '; - elseif (!preg_match('/_AUTO/', $actionstatic->type_code)) print img_picto('', 'object_other', '', false, 0, 0, '', '').' '; - } + if ($actioncomm->type_picto) { + $imgpicto = img_picto('', $actioncomm->type_picto); + } + else { + if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' '; + elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_other', '', false, 0, 0, '', 'paddingright').' '; + } } + print $imgpicto; + $labeltype = $obj->type_code; if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype = 'AC_OTH'; - if (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; + if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') { + $labeltype = $langs->trans("Message"); + } elseif (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; print dol_trunc($labeltype, 28); print '
    '.$ref.''; - if (!empty($action->userownerid)) + if (!empty($actioncomm->userownerid)) { - if (is_object($cacheusers[$action->userownerid])) + if (is_object($cacheusers[$actioncomm->userownerid])) { - $tmpuser = $cacheusers[$action->userownerid]; + $tmpuser = $cacheusers[$actioncomm->userownerid]; } else { $tmpuser = new User($this->db); - $tmpuser->fetch($action->userownerid); - $cacheusers[$action->userownerid] = $tmpuser; + $tmpuser->fetch($actioncomm->userownerid); + $cacheusers[$actioncomm->userownerid] = $tmpuser; } if ($tmpuser->id > 0) { @@ -260,41 +260,50 @@ class FormActions } } print ''; + // TODO Code common with code into comm/action/list.php $imgpicto = ''; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - if ($action->type_picto) $imgpicto = img_picto('', $action->type_picto); + if ($actioncomm->type_picto) { + $imgpicto = img_picto('', $actioncomm->type_picto); + } else { - if ($action->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; - elseif ($action->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; - elseif ($action->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; - elseif ($action->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; - elseif ($action->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; - elseif (!preg_match('/_AUTO/', $action->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' '; + if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' '; + elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' '; } } print $imgpicto; - print $action->type_short ? $action->type_short : $action->type; + if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') { + print $langs->trans("Message"); + } else { + print $actioncomm->type_short ? $actioncomm->type_short : $actioncomm->type; + } print ''.$label.''.dol_print_date($action->datep, 'dayhour', 'tzuserrel'); - if ($action->datef) + print ''.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel'); + if ($actioncomm->datef) { - $tmpa = dol_getdate($action->datep); - $tmpb = dol_getdate($action->datef); + $tmpa = dol_getdate($actioncomm->datep); + $tmpb = dol_getdate($actioncomm->datef); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) { - if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($action->datef, 'hour', 'tzuserrel'); + if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel'); } - else print '-'.dol_print_date($action->datef, 'dayhour', 'tzuserrel'); + else print '-'.dol_print_date($actioncomm->datef, 'dayhour', 'tzuserrel'); } print ''; - print $action->getLibStatut(3); + print $actioncomm->getLibStatut(3); print '
    '; - print dol_print_date($arraymsgs['datec'], 'dayhour'); + print img_picto('', 'actioncomm', 'class="paddingright"').dol_print_date($arraymsgs['datec'], 'dayhour'); print ''; diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index f94599153f0..4db98cfe7ad 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1559,7 +1559,7 @@ class Ticket extends CommonObject // Insert entry into agenda with code 'TICKET_MSG' include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $actioncomm = new ActionComm($this->db); - $actioncomm->type_code = 'AC_OTH_AUTO'; + $actioncomm->type_code = 'AC_OTH'; $actioncomm->code = 'TICKET_MSG'; if ($this->private) { $actioncomm->code = 'TICKET_MSG_PRIVATE'; From dca3f3b31f2075c4a65056a0d5ca0dfe5941615b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2020 22:59:40 +0200 Subject: [PATCH 288/456] Look adn feel v12 --- htdocs/ticket/class/actions_ticket.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 9931b12ffa2..147f6228005 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -380,8 +380,7 @@ class ActionsTicket global $langs; print '
    '; - print '
    '; - print '
    '; + print '
    '; // Exclude status which requires specific method $exclude_status = array(Ticket::STATUS_CLOSED, Ticket::STATUS_CANCELED); // Exclude actual status @@ -392,7 +391,7 @@ class ActionsTicket foreach ($object->statuts_short as $status => $status_label) { if (!in_array($status, $exclude_status)) { - print '
    '; + print '
    '; if ($status == 1) { @@ -403,13 +402,13 @@ class ActionsTicket $urlforbutton = $_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'&action=set_status&new_status='.$status; } - print ''; + print ''; print img_picto($langs->trans($object->statuts_short[$status]), 'statut'.$status.'.png@ticket').' '.$langs->trans($object->statuts_short[$status]); print ''; print '
    '; } } - print '

    '; + print '

    '; } /** From f23451e1c986143235b7aea6750293b878f0e1f7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2020 23:04:52 +0200 Subject: [PATCH 289/456] Update facture.class.php --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index ffa96fe5237..fd6a6d32642 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1180,7 +1180,7 @@ class Facture extends CommonInvoice } // Bloc to update dates of service (month by month only if previously filled at 1d near start or end of month) // If it's a service with start and end dates - if ($line->product_type == 1 && !empty($line->date_start) && !empty($line->date_end) ) { + if (!empty($line->date_start) && !empty($line->date_end) ) { // Get the dates $start = dol_getdate($line->date_start); $end = dol_getdate($line->date_end); From 830a117aa7ae799cd93021b68408aa177b733cc4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2020 23:39:03 +0200 Subject: [PATCH 290/456] Suggest fix for #13824 --- htdocs/bom/class/bom.class.php | 5 ++++- htdocs/takepos/admin/bar.php | 2 +- htdocs/takepos/admin/setup.php | 2 +- htdocs/takepos/genimg/qr.php | 2 +- htdocs/takepos/phone.php | 8 ++++---- htdocs/takepos/public/auto_order.php | 6 +++++- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index c2c18dae6e5..3e522b3c11f 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -1004,6 +1004,7 @@ class BOM extends CommonObject /** * BOM costs calculation based on cost_price or pmp of each BOM line + * * @return void */ public function calculateCosts() @@ -1022,7 +1023,9 @@ class BOM extends CommonObject } $this->total_cost = price2num($this->total_cost, 'MT'); - $this->unit_cost = price2num($this->total_cost / $this->qty, 'MU'); + if ($this->qty) { + $this->unit_cost = price2num($this->total_cost / $this->qty, 'MU'); + } } } diff --git a/htdocs/takepos/admin/bar.php b/htdocs/takepos/admin/bar.php index 7b6e1d9a98c..5c255dc89c7 100644 --- a/htdocs/takepos/admin/bar.php +++ b/htdocs/takepos/admin/bar.php @@ -157,7 +157,7 @@ if ($conf->global->TAKEPOS_AUTO_ORDER) print '
    '; print "".$urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($row['rowid']).""; print ''; - print ""; + print ""; print '
    '; print $form->textwithpicto($langs->trans("RootCategoryForProductsToSell"), $langs->trans("RootCategoryForProductsToSellDesc")); print ''; -print $form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_ROOT_CATEGORY_ID, 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0); +print img_object('', 'category', 'class="paddingright"').$form->select_all_categories(Categorie::TYPE_PRODUCT, $conf->global->TAKEPOS_ROOT_CATEGORY_ID, 'TAKEPOS_ROOT_CATEGORY_ID', 64, 0, 0); print ajax_combobox('TAKEPOS_ROOT_CATEGORY_ID'); print "
    '; - print img_picto('', 'actioncomm', 'class="paddingright"').dol_print_date($arraymsgs['datec'], 'dayhour'); + print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datec'], 'dayhour'); print ''; From d9a0edcf2b83aa9e9f6e35fefa8e740f1c36ab14 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 8 May 2020 00:01:56 +0200 Subject: [PATCH 292/456] FIX missing file manifest.json.php --- htdocs/theme/md/manifest.json.php | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 htdocs/theme/md/manifest.json.php diff --git a/htdocs/theme/md/manifest.json.php b/htdocs/theme/md/manifest.json.php new file mode 100644 index 00000000000..f8d059752a6 --- /dev/null +++ b/htdocs/theme/md/manifest.json.php @@ -0,0 +1,57 @@ + + * Copyright (C) 2006 Rodolphe Quiedeville + * Copyright (C) 2007-2017 Regis Houssin + * Copyright (C) 2011 Philippe Grand + * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2018 Ferran Marcet + * + * 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FI8TNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/theme/md/manifest.json.php + * \brief File for The Web App + */ + +if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); +if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); +if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); +if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); +if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); +if (! defined('NOLOGIN')) define('NOLOGIN', '1'); +if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); +if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); +if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); + +require_once __DIR__.'/../../main.inc.php'; + +$appli=constant('DOL_APPLICATION_TITLE'); +if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE; + +?> +{ + "name": "", + "icons": [ + { + "src": "", + "sizes": "256x256", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} \ No newline at end of file From 1a9afe6b203b1224ae0e4a641dcefe3c2073eb0a Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 8 May 2020 01:40:25 +0200 Subject: [PATCH 293/456] Fix missing hook params for printFieldListValue --- htdocs/accountancy/bookkeeping/list.php | 2 +- htdocs/adherents/list.php | 2 +- htdocs/adherents/subscription/list.php | 2 +- htdocs/admin/emailcollector_list.php | 2 +- htdocs/asset/list.php | 2 +- htdocs/comm/action/list.php | 2 +- htdocs/comm/propal/list.php | 2 +- htdocs/commande/list.php | 2 +- htdocs/compta/bank/list.php | 2 +- htdocs/compta/cashcontrol/cashcontrol_list.php | 2 +- htdocs/compta/facture/list.php | 2 +- htdocs/contact/list.php | 2 +- htdocs/contrat/list.php | 2 +- htdocs/contrat/services_list.php | 2 +- htdocs/expedition/list.php | 2 +- htdocs/expensereport/list.php | 2 +- htdocs/fichinter/list.php | 2 +- htdocs/fourn/facture/list.php | 2 +- htdocs/holiday/list.php | 2 +- htdocs/product/list.php | 2 +- htdocs/product/stock/list.php | 2 +- htdocs/product/stock/productlot_list.php | 2 +- htdocs/projet/list.php | 2 +- htdocs/projet/tasks/list.php | 2 +- htdocs/projet/tasks/time.php | 2 +- htdocs/reception/list.php | 2 +- htdocs/societe/list.php | 2 +- htdocs/societe/website.php | 2 +- htdocs/supplier_proposal/list.php | 2 +- htdocs/ticket/list.php | 2 +- htdocs/user/list.php | 2 +- htdocs/zapier/hook_list.php | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index d8fe9975da5..129fedf3867 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -966,7 +966,7 @@ while ($i < min($num, $limit)) } // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index c9b7ee42fcf..838e7cd9a5c 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -872,7 +872,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index a582584ae7f..fa47d01cd41 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -524,7 +524,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index 53d9fd8d1f1..9c76c176414 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -479,7 +479,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index fb8c4066a10..ae307bf1a42 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -459,7 +459,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 95a3e6dbe09..410d31fb07e 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -718,7 +718,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index dcc9c7a54c7..eaeea9e3d43 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1065,7 +1065,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index e2b6aa06136..8a023cf7e80 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1075,7 +1075,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index e0d7f7d5c29..ac2caaf94eb 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -529,7 +529,7 @@ foreach ($accounts as $key=>$type) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index 6c59276d600..c13528224c4 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -496,7 +496,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index f5ab943d831..c3bfe93bf30 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1313,7 +1313,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 9903e37cd5e..d51399d21a9 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -936,7 +936,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index c32e45c1b42..857f9609d36 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -744,7 +744,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 29501ddee88..85579d65980 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -687,7 +687,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index d5cda3e2ebb..c3db317c9de 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -591,7 +591,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 5604ee77dc3..7f5e86d9c98 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -761,7 +761,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 03000bdb44d..fd45d2daecb 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -562,7 +562,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index b895bf63513..ddb2ce853b1 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -1058,7 +1058,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 2277563aaa0..18df214f4c6 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -744,7 +744,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index ce3f8f1cd81..cc12bc73349 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1148,7 +1148,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index e4ad265c793..057735c49cc 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -571,7 +571,7 @@ if ($num) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php index 527afee2607..154ede71956 100644 --- a/htdocs/product/stock/productlot_list.php +++ b/htdocs/product/stock/productlot_list.php @@ -476,7 +476,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 650c14c5ee2..f3a8900a148 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -895,7 +895,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php index 3fd85f4082e..7d995965294 100644 --- a/htdocs/projet/tasks/list.php +++ b/htdocs/projet/tasks/list.php @@ -836,7 +836,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index f9069f7efa7..3a5e3c89ae3 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -1332,7 +1332,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0) */ // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$task_time); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$task_time, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index fea2662b93f..7566edfc610 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -885,7 +885,7 @@ if ($resql) include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index e480d68eca4..4e033e5f35e 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1279,7 +1279,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/societe/website.php b/htdocs/societe/website.php index 5d248ec16fd..d5e89459771 100644 --- a/htdocs/societe/website.php +++ b/htdocs/societe/website.php @@ -481,7 +481,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objectwebsiteaccount); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index a133d781337..91ef70c7b94 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -779,7 +779,7 @@ if ($resql) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php index 8d76ef5c5eb..08419e5c46d 100644 --- a/htdocs/ticket/list.php +++ b/htdocs/ticket/list.php @@ -669,7 +669,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column diff --git a/htdocs/user/list.php b/htdocs/user/list.php index eb14f61e982..1ceec68a622 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -655,7 +655,7 @@ while ($i < min($num, $limit)) // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters=array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook=$hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Date creation diff --git a/htdocs/zapier/hook_list.php b/htdocs/zapier/hook_list.php index 56a68ad7300..dbd9239e752 100644 --- a/htdocs/zapier/hook_list.php +++ b/htdocs/zapier/hook_list.php @@ -519,7 +519,7 @@ while ($i < min($num, $limit)) { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column From 42ee755ea5189842673d8d1f374efef088404bfe Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 02:52:55 +0200 Subject: [PATCH 294/456] Look and feel v12 --- htdocs/admin/translation.php | 10 +++++----- htdocs/comm/action/list.php | 4 ++-- htdocs/core/lib/agenda.lib.php | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 520cee44913..c17c2bdcee6 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -365,9 +365,9 @@ if ($mode == 'overwrite') } else { - print ''.img_edit().''; + print ''.img_edit().''; print '   '; - print ''.img_delete().''; + print ''.img_delete().''; } print ''; + print ''; print dol_print_date($db->jdate($obj->dp), $formatToUse); $late = 0; if ($obj->percent == 0 && $obj->dp && $db->jdate($obj->dp) < ($now - $delay_warning)) $late = 1; @@ -638,7 +638,7 @@ if ($resql) // End date if (!empty($arrayfields['a.datep2']['checked'])) { - print ''; + print ''; print dol_print_date($db->jdate($obj->dp2), $formatToUse); print ''; print img_picto('', 'company'); - print $form->select_company($socid, 'search_socid', '', 'SelectThirdParty', 0, 0, null, 0); + print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0); print '
    '; print ''; -print ''; +print ''; print "\n"; if ($conf->global->TAKEPOS_BAR_RESTAURANT && $conf->global->TAKEPOS_PRINT_METHOD != "browser") { From e55d9ed3b89c8f9e477e523e856419f8e8a62765 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 03:02:53 +0200 Subject: [PATCH 296/456] Trans --- htdocs/langs/en_US/cashdesk.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index b22a7b83166..52c2004c1c7 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -95,7 +95,7 @@ PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal TakeposNumpadUsePaymentIcon=Use payment icon on numpad -CashDeskRefNumberingModules=Numbering module for cash desk +CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale From a49635a825360a8cb92acecb92dae14d389693b0 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 8 May 2020 07:45:01 +0200 Subject: [PATCH 297/456] NEW Bookkeeping by account - Add selectfields & hook --- .../accountancy/bookkeeping/listbyaccount.php | 453 ++++++++++++------ 1 file changed, 318 insertions(+), 135 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 78f29e97595..582e54442a5 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -70,6 +70,13 @@ $pagenext = $page + 1; if ($sortorder == "") $sortorder = "ASC"; if ($sortfield == "") $sortfield = "t.doc_date,t.rowid"; +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$object = new BookKeeping($db); +$hookmanager->initHooks(array('bookkeepingbyaccountlist')); + +$formaccounting = new FormAccounting($db); +$form = new Form($db); + if (empty($search_date_start) && empty($search_date_end) && GETPOSTISSET('search_date_startday') && GETPOSTISSET('search_date_startmonth') && GETPOSTISSET('search_date_starthour')) { $sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; $sql .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'"; @@ -96,87 +103,112 @@ if (empty($search_date_start) && empty($search_date_end) && GETPOSTISSET('search } } +$arrayfields = array( + // 't.subledger_account'=>array('label'=>$langs->trans("SubledgerAccount"), 'checked'=>1), + 't.piece_num'=>array('label'=>$langs->trans("TransactionNumShort"), 'checked'=>1), + 't.doc_date'=>array('label'=>$langs->trans("Docdate"), 'checked'=>1), + 't.doc_ref'=>array('label'=>$langs->trans("Piece"), 'checked'=>1), + 't.label_operation'=>array('label'=>$langs->trans("Label"), 'checked'=>1), + 't.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1), + 't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1), + 't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1), + 't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1), + // 't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0), + // 't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0), + // 't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1), +); + +if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']); + + $object = new BookKeeping($db); /* * Action */ -if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers -{ - $search_doc_date = ''; - $search_accountancy_code = ''; - $search_accountancy_code_start = ''; - $search_accountancy_code_end = ''; - $search_label_account = ''; - $search_doc_ref = ''; - $search_label_operation = ''; - $search_direction = ''; - $search_ledger_code = ''; - $search_date_start = ''; - $search_date_end = ''; - $search_date_startyear = ''; - $search_date_startmonth = ''; - $search_date_startday = ''; - $search_date_endyear = ''; - $search_date_endmonth = ''; - $search_date_endday = ''; - $search_debit = ''; - $search_credit = ''; -} +$parameters = array('socid'=>$socid); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -// Must be after the remove filter action, before the export. -$param = ''; -$filter = array(); +if (empty($reshook)) { + include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; -if (!empty($search_date_start)) { - $filter['t.doc_date>='] = $search_date_start; - $param .= '&search_date_startmonth='.GETPOST('search_date_startmonth', 'int').'&search_date_startday='.GETPOST('search_date_startday', 'int').'&search_date_startyear='.GETPOST('search_date_startyear', 'int'); -} -if (!empty($search_date_end)) { - $filter['t.doc_date<='] = $search_date_end; - $param .= '&search_date_endmonth='.GETPOST('search_date_endmonth', 'int').'&search_date_endday='.GETPOST('search_date_endday', 'int').'&search_date_endyear='.GETPOST('search_date_endyear', 'int'); -} -if (!empty($search_doc_date)) { - $filter['t.doc_date'] = $search_doc_date; - $param .= '&doc_datemonth='.GETPOST('doc_datemonth', 'int').'&doc_dateday='.GETPOST('doc_dateday', 'int').'&doc_dateyear='.GETPOST('doc_dateyear', 'int'); -} -if (!empty($search_accountancy_code_start)) { - $filter['t.numero_compte>='] = $search_accountancy_code_start; - $param .= '&search_accountancy_code_start='.urlencode($search_accountancy_code_start); -} -if (!empty($search_accountancy_code_end)) { - $filter['t.numero_compte<='] = $search_accountancy_code_end; - $param .= '&search_accountancy_code_end='.urlencode($search_accountancy_code_end); -} -if (!empty($search_label_account)) { - $filter['t.label_compte'] = $search_label_account; - $param .= '&search_label_compte='.urlencode($search_label_account); -} -if (!empty($search_doc_ref)) { - $filter['t.doc_ref'] = $search_doc_ref; - $param .= '&search_doc_ref='.urlencode($search_doc_ref); -} -if (!empty($search_label_operation)) { - $filter['t.label_operation'] = $search_label_operation; - $param .= '&search_label_operation='.urlencode($search_label_operation); -} -if (!empty($search_direction)) { - $filter['t.sens'] = $search_direction; - $param .= '&search_direction='.urlencode($search_direction); -} -if (!empty($search_ledger_code)) { - $filter['t.code_journal'] = $search_ledger_code; - $param .= '&search_ledger_code='.urlencode($search_ledger_code); -} -if (!empty($search_debit)) { - $filter['t.debit'] = $search_debit; - $param .= '&search_debit='.urlencode($search_debit); -} -if (!empty($search_credit)) { - $filter['t.credit'] = $search_credit; - $param .= '&search_credit='.urlencode($search_credit); -} + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers + { + $search_doc_date = ''; + $search_accountancy_code = ''; + $search_accountancy_code_start = ''; + $search_accountancy_code_end = ''; + $search_label_account = ''; + $search_doc_ref = ''; + $search_label_operation = ''; + $search_direction = ''; + $search_ledger_code = ''; + $search_date_start = ''; + $search_date_end = ''; + $search_date_startyear = ''; + $search_date_startmonth = ''; + $search_date_startday = ''; + $search_date_endyear = ''; + $search_date_endmonth = ''; + $search_date_endday = ''; + $search_debit = ''; + $search_credit = ''; + } + // Must be after the remove filter action, before the export. + $param = ''; + $filter = array(); + + if (!empty($search_date_start)) { + $filter['t.doc_date>='] = $search_date_start; + $param .= '&search_date_startmonth=' . GETPOST('search_date_startmonth', 'int') . '&search_date_startday=' . GETPOST('search_date_startday', 'int') . '&search_date_startyear=' . GETPOST('search_date_startyear', 'int'); + } + if (!empty($search_date_end)) { + $filter['t.doc_date<='] = $search_date_end; + $param .= '&search_date_endmonth=' . GETPOST('search_date_endmonth', 'int') . '&search_date_endday=' . GETPOST('search_date_endday', 'int') . '&search_date_endyear=' . GETPOST('search_date_endyear', 'int'); + } + if (!empty($search_doc_date)) { + $filter['t.doc_date'] = $search_doc_date; + $param .= '&doc_datemonth=' . GETPOST('doc_datemonth', 'int') . '&doc_dateday=' . GETPOST('doc_dateday', 'int') . '&doc_dateyear=' . GETPOST('doc_dateyear', 'int'); + } + if (!empty($search_accountancy_code_start)) { + $filter['t.numero_compte>='] = $search_accountancy_code_start; + $param .= '&search_accountancy_code_start=' . urlencode($search_accountancy_code_start); + } + if (!empty($search_accountancy_code_end)) { + $filter['t.numero_compte<='] = $search_accountancy_code_end; + $param .= '&search_accountancy_code_end=' . urlencode($search_accountancy_code_end); + } + if (!empty($search_label_account)) { + $filter['t.label_compte'] = $search_label_account; + $param .= '&search_label_compte=' . urlencode($search_label_account); + } + if (!empty($search_doc_ref)) { + $filter['t.doc_ref'] = $search_doc_ref; + $param .= '&search_doc_ref=' . urlencode($search_doc_ref); + } + if (!empty($search_label_operation)) { + $filter['t.label_operation'] = $search_label_operation; + $param .= '&search_label_operation=' . urlencode($search_label_operation); + } + if (!empty($search_direction)) { + $filter['t.sens'] = $search_direction; + $param .= '&search_direction=' . urlencode($search_direction); + } + if (!empty($search_ledger_code)) { + $filter['t.code_journal'] = $search_ledger_code; + $param .= '&search_ledger_code=' . urlencode($search_ledger_code); + } + if (!empty($search_debit)) { + $filter['t.debit'] = $search_debit; + $param .= '&search_debit=' . urlencode($search_debit); + } + if (!empty($search_credit)) { + $filter['t.credit'] = $search_credit; + $param .= '&search_credit=' . urlencode($search_credit); + } +} if ($action == 'delmouvconfirm') { $mvt_num = GETPOST('mvt_num', 'int'); @@ -267,14 +299,25 @@ if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($l print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$newcardbutton, '', $limit); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook +if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; +else $moreforfilter = $hookmanager->resPrint; + // Reverse sort order if (preg_match('/^asc/i', $sortorder)) $sortorder = "asc"; else $sortorder = "desc"; print '
    '; -print '
    '.$langs->trans("Parameters").''.$langs->trans("Value").''.$langs->trans("Parameters").''.$langs->trans("Value").'
    '; +print '
    '; -print ''; +// Filters lines +print ''; +// Accountancy account print ''; -print ''; +// Date document +if (!empty($arrayfields['t.doc_date']['checked'])) { + print ''; + print ''; +} +// Ref document +if (!empty($arrayfields['t.doc_ref']['checked'])) { + print ''; +} +// Label operation +if (!empty($arrayfields['t.label_operation']['checked'])) { + print ''; +} +// Debit +if (!empty($arrayfields['t.debit']['checked'])) { + print ''; +} +// Credit +if (!empty($arrayfields['t.credit']['checked'])) { + print ''; +} +// Code journal +if (!empty($arrayfields['t.code_journal']['checked'])) { + print ''; +} + +// Fields from hook +$parameters = array('arrayfields'=>$arrayfields); +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +// Action column print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; +print "\n"; print ''; print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']); -print_liste_field_titre("TransactionNumShort", $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder, 'right '); -print_liste_field_titre("Docdate", $_SERVER['PHP_SELF'], "t.doc_date", "", $param, '', $sortfield, $sortorder, 'center '); -print_liste_field_titre("Piece", $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder); -print_liste_field_titre("Label"); -print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, '', $sortfield, $sortorder, 'right '); -print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, '', $sortfield, $sortorder, 'right '); -print_liste_field_titre("Codejournal", $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center '); -print_liste_field_titre('', $_SERVER["PHP_SELF"], "", $param, "", 'width="60"', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['t.piece_num']['checked'])) print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['t.doc_date']['checked'])) print_liste_field_titre($arrayfields['t.doc_date']['label'], $_SERVER['PHP_SELF'], "t.doc_date", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['t.doc_ref']['checked'])) print_liste_field_titre($arrayfields['t.doc_ref']['label'], $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder); +if (!empty($arrayfields['t.label_operation']['checked'])) print_liste_field_titre($arrayfields['t.label_operation']['label'], $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder); +if (!empty($arrayfields['t.debit']['checked'])) print_liste_field_titre($arrayfields['t.debit']['label'], $_SERVER['PHP_SELF'], "t.debit", "", $param, '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['t.credit']['checked'])) print_liste_field_titre($arrayfields['t.credit']['label'], $_SERVER['PHP_SELF'], "t.credit", "", $param, '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center '); +// Hook fields +$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); +$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; @@ -323,7 +395,10 @@ $sous_total_debit = 0; $sous_total_credit = 0; $displayed_account_number = null; // Start with undefined to be able to distinguish with empty +// Loop on record +// -------------------------------------------------------------------- $i = 0; +$totalarray = array(); while ($i < min($num, $limit)) { $line = $object->lines[$i]; @@ -362,38 +437,149 @@ while ($i < min($num, $limit)) print ''; print ''; print ''; - print ''; - // TODO Add a link according to doc_type and fk_doc - print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Document ref + if (!empty($arrayfields['t.doc_ref']['checked'])) + { + if ($line->doc_type == 'customer_invoice') + { + $langs->loadLangs(array('bills')); + + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $objectstatic = new Facture($db); + $objectstatic->fetch($line->fk_doc); + //$modulepart = 'facture'; + + $filename = dol_sanitizeFileName($line->doc_ref); + $filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); + $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; + $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); + } + elseif ($line->doc_type == 'supplier_invoice') + { + $langs->loadLangs(array('bills')); + + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; + $objectstatic = new FactureFournisseur($db); + $objectstatic->fetch($line->fk_doc); + //$modulepart = 'invoice_supplier'; + + $filename = dol_sanitizeFileName($line->doc_ref); + $filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); + $subdir = get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); + $documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir); + } + elseif ($line->doc_type == 'expense_report') + { + $langs->loadLangs(array('trips')); + + require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; + $objectstatic = new ExpenseReport($db); + $objectstatic->fetch($line->fk_doc); + //$modulepart = 'expensereport'; + + $filename = dol_sanitizeFileName($line->doc_ref); + $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); + $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; + $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); + } + else + { + // Other type + } + + print '\n"; + if (!$i) $totalarray['nbfield']++; + } + + // Label operation + if (!empty($arrayfields['t.label_operation']['checked'])) { + // Affiche un lien vers la facture client/fournisseur + $doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref); + print strlen(length_accounta($line->subledger_account)) == 0 ? '' : ''; + if (!$i) $totalarray['nbfield']++; + } + + // Amount debit + if (!empty($arrayfields['t.debit']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totaldebit'; + $totalarray['val']['totaldebit'] += $line->debit; + } + + // Amount credit + if (!empty($arrayfields['t.credit']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalcredit'; + $totalarray['val']['totalcredit'] += $line->credit; + } + + // Lettering code + if (!empty($arrayfields['t.lettering_code']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Journal code + if (!empty($arrayfields['t.code_journal']['checked'])) + { + $accountingjournal = new AccountingJournal($db); + $result = $accountingjournal->fetch('', $line->code_journal); + $journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); + print ''; + } + + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + // Action column + print ''; - // Affiche un lien vers la facture client/fournisseur - $doc_ref = preg_replace('/\(.*\)/', '', $line->doc_ref); - print strlen(length_accounta($line->subledger_account)) == 0 ? '' : ''; - - - print ''; - print ''; - - $accountingjournal = new AccountingJournal($db); - $result = $accountingjournal->fetch('', $line->code_journal); - $journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); - print ''; - - print ''; - print "\n"; - // Comptabilise le sous-total $sous_total_debit += $line->debit; $sous_total_credit += $line->credit; + if (!$i) $totalarray['nbfield']++; + + print "\n"; + $i++; } @@ -406,23 +592,20 @@ print ''; print ''; print ''; +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; -// Show total -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; print "
    '; print '
    '; print $langs->trans('From').' '; @@ -285,35 +328,64 @@ print $langs->trans('to').' '; print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, 'maxwidth200'); print '
    '; print '
    '; + print $langs->trans('From') . ': '; + print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1); + print '
    '; + print $langs->trans('to') . ': '; + print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1); + print '
    '; -print $langs->trans('From').': '; -print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1); -print '
    '; -print $langs->trans('to').': '; -print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1); -print '
    '; -$searchpicto = $form->showFilterAndCheckAddButtons(0); +$searchpicto = $form->showFilterButtons(); print $searchpicto; print '
     '.$line->piece_num.''.dol_print_date($line->doc_date, 'day').''; - //if ($line->doc_type == 'supplier_invoice') - //if ($line->doc_type == 'customer_invoice') - print $line->doc_ref; + // Document date + if (!empty($arrayfields['t.doc_date']['checked'])) + { + print ''.dol_print_date($line->doc_date, 'day').''; + + print ''; + // Picto + Ref + print '
    '; + + if ($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice' || $line->doc_type == 'expense_report') + { + print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); + print $documentlink; + } else { + print $line->doc_ref; + } + print '
    '; + + print "
    ' . $line->label_operation . '' . $line->label_operation . '
    (' . length_accounta($line->subledger_account) . ')
    '.($line->debit ? price($line->debit) : '').'' . ($line->credit ? price($line->credit) : '') . ''.$line->lettering_code.''.$journaltoshow.''; + if (empty($line->date_export)) { + if ($user->rights->accounting->mouvements->creer) { + print ''.img_edit().''; + } + if ($user->rights->accounting->mouvements->supprimer) { + print ' '.img_delete().''; + } + } print ''.$line->label_operation.''.$line->label_operation.'
    ('.length_accounta($line->subledger_account).')
    '.($line->debit ? price($line->debit) : '').''.($line->credit ? price($line->credit) : '').''.$journaltoshow.''; - print ''.img_edit().' '; - print ''.img_delete().''; - print '
    '.$langs->trans("Total").':'; -print price($total_debit); -print ''; -print price($total_credit); -print '
    "; print '
    '; +// TODO Replace this with mass delete action +if ($user->rights->accounting->mouvements->supprimer_tous) { + print '
    '."\n"; + print ''.$langs->trans("DeleteMvt").''; + print '
    '; +} + print ''; // End of page From 40ffbbe61653f7a5bfea122b1d028b5cc297fcba Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 8 May 2020 13:28:56 +0200 Subject: [PATCH 298/456] Debug --- .../accountancy/bookkeeping/listbyaccount.php | 38 ++++++++++++++----- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 582e54442a5..ff742c356c4 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -120,17 +120,18 @@ $arrayfields = array( if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']); - -$object = new BookKeeping($db); - /* * Action */ +if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } + $parameters = array('socid'=>$socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) { +if (empty($reshook)) +{ include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers @@ -328,15 +329,22 @@ print $langs->trans('to').' '; print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, 'maxwidth200'); print '
    '; print ''; +// Movement number +if (!empty($arrayfields['t.piece_num']['checked'])) +{ + print ''; +} // Date document if (!empty($arrayfields['t.doc_date']['checked'])) { - print ''; print ''; + print '
    '; print $langs->trans('From') . ': '; print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1); - print '
    '; + print '
    '; + print '
    '; print $langs->trans('to') . ': '; print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1); + print '
    '; print ''; } // Ref document @@ -374,7 +382,7 @@ print "\n"; print ''; print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']); -if (!empty($arrayfields['t.piece_num']['checked'])) print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['t.piece_num']['checked'])) print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder); if (!empty($arrayfields['t.doc_date']['checked'])) print_liste_field_titre($arrayfields['t.doc_date']['label'], $_SERVER['PHP_SELF'], "t.doc_date", "", $param, '', $sortfield, $sortorder, 'center '); if (!empty($arrayfields['t.doc_ref']['checked'])) print_liste_field_titre($arrayfields['t.doc_ref']['label'], $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder); if (!empty($arrayfields['t.label_operation']['checked'])) print_liste_field_titre($arrayfields['t.label_operation']['label'], $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder); @@ -436,7 +444,18 @@ while ($i < min($num, $limit)) print ''; print ' '; - print ''.$line->piece_num.''; + if (!$i) $totalarray['nbfield']++; + + // Piece number + if (!empty($arrayfields['t.piece_num']['checked'])) + { + print ''; + $object->id = $line->id; + $object->piece_num = $line->piece_num; + print $object->getNomUrl(1, '', 0, '', 1); + print ''; + if (!$i) $totalarray['nbfield']++; + } // Document date if (!empty($arrayfields['t.doc_date']['checked'])) @@ -553,6 +572,7 @@ while ($i < min($num, $limit)) $result = $accountingjournal->fetch('', $line->code_journal); $journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); print ''.$journaltoshow.''; + if (!$i) $totalarray['nbfield']++; } // Fields from hook @@ -585,7 +605,7 @@ while ($i < min($num, $limit)) // Show sub-total of last shown account print ''; -print ''.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''; +print ''.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''; print ''; print price($sous_total_debit - $sous_total_credit); print ''; From 640158ea4caa3ffc94a0af63494fd509c768dbf0 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Fri, 8 May 2020 13:50:26 +0200 Subject: [PATCH 299/456] NEW Accountancy - Add Fiducial Winfic eWinfic WinSis Compta --- ...ncy-format_Winfic-eWinfic-WinSisCompta.pdf | Bin 0 -> 173394 bytes .../class/accountancyexport.class.php | 96 +++++++++++++++++- htdocs/langs/en_US/accountancy.lang | 3 +- 3 files changed, 95 insertions(+), 4 deletions(-) create mode 100644 dev/resources/iso-normes/Accountancy-format_Winfic-eWinfic-WinSisCompta.pdf diff --git a/dev/resources/iso-normes/Accountancy-format_Winfic-eWinfic-WinSisCompta.pdf b/dev/resources/iso-normes/Accountancy-format_Winfic-eWinfic-WinSisCompta.pdf new file mode 100644 index 0000000000000000000000000000000000000000..2fbaad04699b50eed31cf1373164693fda111714 GIT binary patch literal 173394 zcmbSyWmsHGvu+ZCyE{yRJHsFY!JXi4!5N&vEx5ZUkl^ki1cwmZCAb84_uxV9kiEZq z_Q^i?{J863&8$^zRbBN~_cOdrqa-fL0%YYxr&(Pa9!E#v2CxI{jIGf5`Pt+wp%5cS z%eN3y0FX@%0OSFIcsbb=0bn)>0FaB5mz$GK0l>kg_E-Ys;$o8q=mLP8KyCmC2+|W2 zM2A34AA17)aiOEQJ3`DJN8;i}M`8c_f;Id71c3fW2IS%3{g({P1O8LS0c2gNyUedO!{y(4YMQVH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q#)Wh!BXIM_QVfpBpI7&&kir!wCWbq{PMf_@#kBaXwxy daS;QUo@lTL8S3(zng9SyO?rB16&Xyl{||4v)L#Gq literal 0 HcmV?d00001 diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 1e641564de4..37b00ff43a6 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -5,11 +5,12 @@ * Copyright (C) 2015 Florian Henry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Pierre-Henry Favre - * Copyright (C) 2016-2019 Alexandre Spangaro + * Copyright (C) 2016-2020 Alexandre Spangaro * Copyright (C) 2013-2017 Olivier Geffroy * Copyright (C) 2017 Elarifr. Ari Elbaz * Copyright (C) 2017-2019 Frédéric France * Copyright (C) 2017 André Schild + * Copyright (C) 2020 Guillaume Alexandre * * 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 @@ -52,6 +53,7 @@ class AccountancyExport public static $EXPORT_TYPE_SAGE50_SWISS = 45; public static $EXPORT_TYPE_CHARLEMAGNE = 50; public static $EXPORT_TYPE_QUADRATUS = 60; + public static $EXPORT_TYPE_WINFIC = 70; public static $EXPORT_TYPE_OPENCONCERTO = 100; public static $EXPORT_TYPE_LDCOMPTA = 110; public static $EXPORT_TYPE_LDCOMPTA10 = 120; @@ -105,6 +107,7 @@ class AccountancyExport self::$EXPORT_TYPE_BOB50 => $langs->trans('Modelcsv_bob50'), self::$EXPORT_TYPE_CIEL => $langs->trans('Modelcsv_ciel'), self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus'), + self::$EXPORT_TYPE_WINFIC => $langs->trans('Modelcsv_winfic'), self::$EXPORT_TYPE_EBP => $langs->trans('Modelcsv_ebp'), self::$EXPORT_TYPE_COGILOG => $langs->trans('Modelcsv_cogilog'), self::$EXPORT_TYPE_AGIRIS => $langs->trans('Modelcsv_agiris'), @@ -136,6 +139,7 @@ class AccountancyExport self::$EXPORT_TYPE_BOB50 => 'bob50', self::$EXPORT_TYPE_CIEL => 'ciel', self::$EXPORT_TYPE_QUADRATUS => 'quadratus', + self::$EXPORT_TYPE_WINFIC => 'winfic', self::$EXPORT_TYPE_EBP => 'ebp', self::$EXPORT_TYPE_COGILOG => 'cogilog', self::$EXPORT_TYPE_AGIRIS => 'agiris', @@ -184,6 +188,10 @@ class AccountancyExport 'label' => $langs->trans('Modelcsv_quadratus'), 'ACCOUNTING_EXPORT_FORMAT' => 'txt', ), + self::$EXPORT_TYPE_WINFIC => array( + 'label' => $langs->trans('Modelcsv_winfic'), + 'ACCOUNTING_EXPORT_FORMAT' => 'txt', + ), self::$EXPORT_TYPE_EBP => array( 'label' => $langs->trans('Modelcsv_ebp'), ), @@ -246,7 +254,7 @@ class AccountancyExport $filename = 'general_ledger-'.$this->getFormatCode($formatexportset); $type_export = 'general_ledger'; - global $db; // The tpl file use $db + global $db; // The tpl file use $db include DOL_DOCUMENT_ROOT.'/accountancy/tpl/export_journal.tpl.php'; @@ -269,6 +277,9 @@ class AccountancyExport case self::$EXPORT_TYPE_QUADRATUS : $this->exportQuadratus($TData); break; + case self::$EXPORT_TYPE_WINFIC : + $this->exportWinfic($TData); + break; case self::$EXPORT_TYPE_EBP : $this->exportEbp($TData); break; @@ -548,6 +559,85 @@ class AccountancyExport } } + /** + * Export format : WinFic - eWinfic - WinSis Compta + * + * + * @param array $TData data + * @return void + */ + public function exportWinfic(&$TData) + { + global $conf; + + $end_line = "\r\n"; + + //We should use dol_now function not time however this is wrong date to transfert in accounting + //$date_ecriture = dol_print_date(dol_now(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy + //$date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy + foreach ($TData as $data) { + $code_compta = $data->numero_compte; + if (!empty($data->subledger_account)) + $code_compta = $data->subledger_account; + + $Tab = array(); + //$Tab['type_ligne'] = 'M'; + $Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2); + + //We use invoice date $data->doc_date not $date_ecriture which is the transfert date + //maybe we should set an option for customer who prefer to keep in accounting software the tranfert date instead of invoice date ? + //$Tab['date_ecriture'] = $date_ecriture; + $Tab['date_operation'] = dol_print_date($data->doc_date, '%d%m%Y'); + + $Tab['folio'] = ' 1'; + + $Tab['num_ecriture'] = str_pad(self::trunc($data->piece_num, 6), 6, ' ', STR_PAD_LEFT); + + $Tab['jour_ecriture'] = dol_print_date($data->doc_date, '%d%m%y'); + + $Tab['num_compte'] = str_pad(self::trunc($code_compta, 6), 6, '0'); + + if($data->sens == 'D'){ + $Tab['montant_debit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT); + + $Tab['montant_crebit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT); + } + else{ + $Tab['montant_debit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT); + + $Tab['montant_crebit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT); + } + + $Tab['libelle_ecriture'] = str_pad(self::trunc(dol_string_unaccent($data->doc_ref).' '.dol_string_unaccent($data->label_operation), 30), 30); + + $Tab['lettrage'] = str_repeat(' ', 2); + + $Tab['code_piece'] = str_repeat(' ', 5); + + $Tab['code_stat'] = str_repeat(' ', 4); + + if (!empty($data->date_echeance)) + //$Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); + $Tab['date_echeance'] = dol_print_date($data->date_echeance, '%d%m%Y'); + else + $Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y'); + + $Tab['monnaie'] = '1'; + + $Tab['filler'] = ' '; + + $Tab['ind_compteur'] = ' '; + + $Tab['quantite'] = '0,000000000'; + + $Tab['code_pointage'] = str_repeat(' ', 2); + + $Tab['end_line'] = $end_line; + + print implode('|', $Tab); + } + } + /** * Export format : EBP @@ -930,7 +1020,7 @@ class AccountancyExport } /** - * Export format : LD Compta version 9 & higher + * Export format : LD Compta version 9 * http://www.ldsysteme.fr/fileadmin/telechargement/np/ldcompta/Documentation/IntCptW9.pdf * * @param array $objectLines data diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index ba34d38f36e..eb3229efaee 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -314,12 +314,13 @@ Modelcsv_quadratus=Export for Quadratus QuadraCompta Modelcsv_ebp=Export for EBP Modelcsv_cogilog=Export for Cogilog Modelcsv_agiris=Export for Agiris -Modelcsv_LDCompta=Export for LD Compta (v9 & higher) (Test) +Modelcsv_LDCompta=Export for LD Compta (v9) (Test) Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=Export CSV Configurable Modelcsv_FEC=Export FEC Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland +Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta ChartofaccountsId=Chart of accounts Id ## Tools - Init accounting account on product / service From 7ad80c9bf623a88d215baa7dce03e4446c8b7db2 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 8 May 2020 11:53:11 +0000 Subject: [PATCH 300/456] Fixing style errors. --- htdocs/accountancy/class/accountancyexport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 37b00ff43a6..3bf41e6326f 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -561,7 +561,7 @@ class AccountancyExport /** * Export format : WinFic - eWinfic - WinSis Compta - * + * * * @param array $TData data * @return void From 94d47c2acd4a53ba4ad69f914ac87212983b9ac4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 14:04:17 +0200 Subject: [PATCH 301/456] Fix sql --- htdocs/install/mysql/migration/11.0.0-12.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 38d0acb97fa..238c98b2f6e 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -275,4 +275,4 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); -ALTER TABLE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; +UPDATE TABLE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; From c98663be4a491e133c914972891af7cde7e4ac84 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 14:05:04 +0200 Subject: [PATCH 302/456] Fix sql --- htdocs/install/mysql/migration/11.0.0-12.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 238c98b2f6e..470d48bbf26 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -275,4 +275,4 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); -UPDATE TABLE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; +UPDATE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; From 0138ab3f7c85eb7fb1319f1ec568da8299d9eed8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 14:25:49 +0200 Subject: [PATCH 303/456] Fix $weblangs must be initialized with language of page --- htdocs/core/website.inc.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index 3e54f6ec2ad..5ea21e19fda 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -33,11 +33,6 @@ if (!is_object($website)) $website = new Website($db); $website->fetch(0, $websitekey); } -// Define $weblangs -if (!is_object($weblangs)) -{ - $weblangs = dol_clone($langs); // TODO Use an object lang from a language set into $website object instead of backoffice -} // Define $websitepage if we have $websitepagefile defined if (!$pageid && !empty($websitepagefile)) { @@ -48,10 +43,17 @@ if (!is_object($websitepage)) { $websitepage = new WebsitePage($db); } +// Define $weblangs +if (!is_object($weblangs)) +{ + $weblangs = new Translate($db); +} if ($pageid > 0) { $websitepage->fetch($pageid); + $weblangs->setDefaultLang($websitepage->lang ? $websitepage->lang : 'auto'); + if (!defined('USEDOLIBARREDITOR') && in_array($websitepage->type_container, array('menu', 'other'))) { $weblangs->load("website"); From 6a2bb08107a15da3a4d3ccc640be071a7c3d7d80 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 14:34:02 +0200 Subject: [PATCH 304/456] Fix constructor --- htdocs/core/website.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index 5ea21e19fda..18744fec7a8 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -46,7 +46,7 @@ if (!is_object($websitepage)) // Define $weblangs if (!is_object($weblangs)) { - $weblangs = new Translate($db); + $weblangs = new Translate($db, $conf); } if ($pageid > 0) { From c28a3e85a35cb4df9a6cc4828bcfc82eb035955b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 14:35:03 +0200 Subject: [PATCH 305/456] Fix constructor --- htdocs/core/website.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index 18744fec7a8..b5053fcc814 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -46,7 +46,7 @@ if (!is_object($websitepage)) // Define $weblangs if (!is_object($weblangs)) { - $weblangs = new Translate($db, $conf); + $weblangs = new Translate('', $conf); } if ($pageid > 0) { From b93a3ceb297b7722229ecfbfe6d0eedb16c2f5cc Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Fri, 8 May 2020 17:25:48 +0200 Subject: [PATCH 306/456] TakePOS Auto Order improvements --- htdocs/takepos/css/phone.css | 28 +++++ htdocs/takepos/genimg/qr.php | 7 +- htdocs/takepos/invoice.php | 20 ++-- htdocs/takepos/phone.php | 162 ++++++++++++++++++++++----- htdocs/takepos/public/auto_order.php | 7 +- 5 files changed, 185 insertions(+), 39 deletions(-) diff --git a/htdocs/takepos/css/phone.css b/htdocs/takepos/css/phone.css index 49d833ade17..0f3606071f0 100644 --- a/htdocs/takepos/css/phone.css +++ b/htdocs/takepos/css/phone.css @@ -79,3 +79,31 @@ button.phonebutton { height:90%; font-weight: bold; } + +button.publicphonebutton { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ + width:33%; + height:90%; + font-weight: bold; +} + +button.publicphonebutton2 { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ + width:33%; + font-weight: bold; + padding: 8px 16px; +} diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index c73e874a465..553f5165a0d 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -29,5 +29,8 @@ require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; $key = GETPOST('key'); -$module = new modTcpdfbarcode($db); -$result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y'); +$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); +$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file + +$module = new modtcpdfbarcode($db); +$result = $module->buildBarCode($urlwithroot."/takepos/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y'); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index b1641072829..236b302406d 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -32,7 +32,7 @@ if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', '1'); } if (!defined('NOREQUIREHTML')) { define('NOREQUIREHTML', '1'); } if (!defined('NOREQUIREAJAX')) { define('NOREQUIREAJAX', '1'); } -require '../main.inc.php'; +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; @@ -47,16 +47,11 @@ $idproduct = GETPOST('idproduct', 'int'); $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Bar or Restaurant $placeid = 0; // $placeid is ID of invoice -if ($_SESSION["publicterminal"]) { - $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers -} -elseif (empty($user->rights->takepos->run)) { +if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { accessforbidden(); } - - -if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || $_SESSION["publicterminal"]) +if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == 'phone') || defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { // DIRECT LINK TO THIS PAGE FROM MOBILE AND NO TERMINAL SELECTED if ($_SESSION["takeposterminal"] == "") @@ -629,6 +624,12 @@ $(document).ready(function() { if (selectedline==this.id) return; // If is already selected else selectedline=this.id; selectedtext=$('#'+selectedline).find("td:first").html(); + }); /* Autoselect the line */ @@ -913,7 +914,7 @@ if ($_SESSION["basiclayout"] == 1) $htmlforlines .= '" onclick="AddProduct(\''.$place.'\', '.$row->id.')">'; $htmlforlines .= ''; $htmlforlines .= $row->label; - $htmlforlines .= ''; + $htmlforlines .= '

    '.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'
    '; $htmlforlines .= ''."\n"; } $htmlforlines .= ''; @@ -990,6 +991,7 @@ if ($placeid > 0) } $htmlforlines .= '" id="'.$line->id.'">'; $htmlforlines .= ''; + if ($_SESSION["basiclayout"] == 1) $htmlforlines .= $line->qty." x "; //if ($line->product_label) $htmlforlines.= ''.$line->product_label.''; if (isset($line->product_type)) { diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index eac1f40bfd1..6e912d988dc 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -31,7 +31,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php'; +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE') && isset($_GET['key'])) require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -45,6 +45,7 @@ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { else $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant $action = GETPOST('action', 'alpha'); $setterminal = GETPOST('setterminal', 'int'); +$idproduct = GETPOST('idproduct', 'int'); if ($setterminal > 0) { @@ -53,14 +54,10 @@ if ($setterminal > 0) $langs->loadLangs(array("bills", "orders", "commercial", "cashdesk", "receiptprinter")); -if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { - $_SESSION["takeposterminal"] = 1; // Use Terminal 1 for public customers -} -elseif (empty($user->rights->takepos->run)) { +if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { accessforbidden(); } - /* * View */ @@ -75,7 +72,42 @@ $head = ' top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); ?> - + +fetch($idproduct); + print "".$prod->label."
    "; + print ''; + print "
    ".$prod->description; + print "
    ".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; + print '
    '; + print ''; +} +elseif ($action=="editline"){ + $placeid = GETPOST('placeid', 'int'); + $selectedline = GETPOST('selectedline', 'int'); + $invoice = new Facture($db); + $invoice->fetch($placeid); + foreach ($invoice->lines as $line) + { + if ($line->id == $selectedline) + { + $prod = new Product($db); + $prod->fetch($line->fk_product); + print "".$prod->label."
    "; + print ''; + print "
    ".$prod->description; + print "
    ".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; + print '
    '; + print ''; + print ''; + print ''; + } + } +} +else { +?> -global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print '
    '.$langs->trans('TerminalSelect').'
    '; -?> + global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print '
    '.$langs->trans('TerminalSelect').'
    '; + ?>
    global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"]
    - Date: Fri, 8 May 2020 18:04:38 +0200 Subject: [PATCH 308/456] Fix URLs --- htdocs/takepos/phone.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 7e454a734a3..8714173e45f 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -31,7 +31,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE') && isset($_GET['key'])) require '../main.inc.php'; +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; @@ -71,14 +71,13 @@ $head = ' '; top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); -?> - -'; + if ($action=="productinfo"){ $prod = new Product($db); $prod->fetch($idproduct); print "".$prod->label."
    "; - print ''; + print ''; print "
    ".$prod->description; print "
    ".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; print '
    '; From b89b6d7679546811e13826e74262fa67cd10be75 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Fri, 8 May 2020 18:51:49 +0200 Subject: [PATCH 309/456] Name fix --- htdocs/takepos/genimg/qr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index 553f5165a0d..99f7fced1d0 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -32,5 +32,5 @@ $key = GETPOST('key'); $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file -$module = new modtcpdfbarcode($db); +$module = new modTcpdfbarcode($db); $result = $module->buildBarCode($urlwithroot."/takepos/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y'); From bba8ab657eea7ae7f28e5369ea59b06b1f3f5937 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 8 May 2020 18:57:15 +0200 Subject: [PATCH 310/456] Fix add missing migration --- htdocs/install/mysql/migration/10.0.0-11.0.0.sql | 11 +++++++++++ htdocs/install/mysql/migration/11.0.0-12.0.0.sql | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index bc4b562711b..2a7a8963e9f 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -582,3 +582,14 @@ create table llx_commande_fournisseur_dispatch_extrafields ALTER TABLE llx_commande_fournisseur_dispatch_extrafields ADD INDEX idx_commande_fournisseur_dispatch_extrafields (fk_object); + +create table llx_facturedet_rec_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, -- object id + import_key varchar(14) -- import key +)ENGINE=innodb; + +ALTER TABLE llx_facturedet_rec_extrafields ADD INDEX idx_facturedet_rec_extrafields (fk_object); + diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 470d48bbf26..8a68e763160 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -54,6 +54,15 @@ create table llx_c_shipment_package_type entity integer DEFAULT 1 NOT NULL -- Multi company id )ENGINE=innodb; +create table llx_facturedet_rec_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, -- object id + import_key varchar(14) -- import key +)ENGINE=innodb; + +ALTER TABLE llx_facturedet_rec_extrafields ADD INDEX idx_facturedet_rec_extrafields (fk_object); -- For v12 From 3644a718d8b7fd21deec36617724c9a30e119c15 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Sat, 9 May 2020 01:02:51 +0200 Subject: [PATCH 311/456] 1 --- htdocs/admin/user.php | 24 ++++++++++++++++++++++++ htdocs/langs/en_US/admin.lang | 1 + htdocs/langs/fr_FR/admin.lang | 1 + 3 files changed, 26 insertions(+) diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index fb15a57a87e..60cbadcdd3a 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -177,6 +177,30 @@ else } print ''; +// user hide inactive + +print ''; +print ''.$langs->trans("UserHideInactive").''; +print ' '; + +print ''; +if ($conf->use_javascript_ajax) +{ + print ajax_constantonoff('USER_HIDE_INACTIVE_IN_COMBOBOX'); +} +else +{ + if (empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) + { + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } + else + { + print ''.img_picto($langs->trans("Enabled"), 'on').''; + } +} +print ''; + print ''; print '
    '; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 3cf6e6044db..e97ed8dbc54 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1272,6 +1272,7 @@ RuleForGeneratedPasswords=Rules to generate and validate passwords DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link on the Login page UsersSetup=Users module setup UserMailRequired=Email required to create a new user +UserHideInactive=Hide inactive users UsersDocModules=Document templates for documents generated from user record GroupsDocModules=Document templates for documents generated from a group record ##### HRM setup ##### diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 6545b71ede3..172153852e3 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1272,6 +1272,7 @@ RuleForGeneratedPasswords=Règle pour la génération des mots de passe proposé DisableForgetPasswordLinkOnLogonPage=Cacher le lien "Mot de passe oublié" sur la page de connexion UsersSetup=Configuration du module utilisateurs UserMailRequired=Email requis pour créer un nouvel utilisateur +UserHideInactive=Cacher les utilisateurs inactifs UsersDocModules=Modèles de documents pour les documents générés à partir de la fiche utilisateur GroupsDocModules=Modèles de documents pour les documents générés à partir de la fiche d'un groupe ##### HRM setup ##### From 53eb891a88d9727591ada4601c1f03fed7c22370 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Sat, 9 May 2020 18:48:01 +0200 Subject: [PATCH 312/456] Update list.php --- htdocs/product/stock/list.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index 15b92c83acc..c13243fc9cb 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -549,6 +549,11 @@ if ($num) { print ''; if ($key == 'statut') print $warehouse->getLibStatut(5); + if ($key == 'phone') + { + print dol_print_phone($obj->phone, '', 0, $obj->rowid, 'AC_TEL'); + } + elseif ($key == 'fax') print dol_print_phone($obj->fax, '', 0, $obj->rowid, 'AC_FAX'); else print $warehouse->showOutputField($val, $key, $warehouse->$key, ''); print ''; if (!$i) $totalarray['nbfield']++; From fe241ea321982b4b7ee30cf6ea03e7e5c7a7b3e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 9 May 2020 21:49:12 +0200 Subject: [PATCH 313/456] Fix removed not reliabled info in PHP info --- htdocs/admin/system/phpinfo.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index ce21c1f3ad8..04439d11710 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -143,7 +143,7 @@ $loadedExtensions = array_map('strtolower', get_loaded_extensions(false)); print ''; print ''; print ''; -print ''; +//print ''; print ''; print ''; print ''; @@ -154,7 +154,7 @@ $name = "GD"; print ""; print ""; -print getTableColumn($name, $activatedExtensions); +//print getTableColumn($name, $activatedExtensions); print getTableColumn($name, $loadedExtensions); print getTableColumnFunction($functions); print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions); @@ -165,7 +165,7 @@ $name = "Curl"; print ""; print ""; -print getTableColumn($name, $activatedExtensions); +//print getTableColumn($name, $activatedExtensions); print getTableColumn($name, $loadedExtensions); print getTableColumnFunction($functions); print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions); @@ -178,7 +178,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc print ""; print ""; - print getTableColumn($name, $activatedExtensions); + //print getTableColumn($name, $activatedExtensions); print getTableColumn($name, $loadedExtensions); print getTableColumnFunction($functions); print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions); @@ -191,7 +191,7 @@ $name = "xDebug"; print ""; print ""; -print getTableColumn($name, $activatedExtensions); +//print getTableColumn($name, $activatedExtensions); print getTableColumn($name, $loadedExtensions); print getTableColumnFunction($functions); print getResultColumn($name, $activatedExtensions, $loadedExtensions, $functions); @@ -208,7 +208,6 @@ foreach ($phparray as $key => $value) print '
    '; print '
    '.$langs->trans("Extension").''.$langs->trans("EnabledInSetup").''.$langs->trans("EnabledInSetup").''.$langs->trans("Loaded").''.$langs->trans("FunctionTest").''.$langs->trans("Result").'
    ".$name."
    ".$name."
    ".$name."
    ".$name."
    '; print ''; - //print ''; print ''; print ''; print "\n"; @@ -408,7 +407,7 @@ function getResultColumn($name, array $activated, array $loaded, array $function global $langs; $result = true; - $result = $result && in_array(strtolower($name), $activated); + //$result = $result && in_array(strtolower($name), $activated); $result = $result && in_array(strtolower($name), $loaded); foreach ($functions as $function) From 310c5f9eb665ac0331f3b727c81bf65b668da569 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 9 May 2020 21:56:51 +0200 Subject: [PATCH 314/456] Fix size of field --- htdocs/install/mysql/migration/8.0.0-9.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index 61f4dc544ba..b7fe131c3f9 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -200,7 +200,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter( rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, fk_emailcollector INTEGER NOT NULL, type varchar(128) NOT NULL, - rulevalue varchar(255) NULL, + rulevalue varchar(128) NULL, date_creation datetime NOT NULL, tms timestamp NOT NULL, fk_user_creat integer NOT NULL, From f40e978475751664c2b4cb1245f5c185b890613c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 10 May 2020 06:28:50 +0200 Subject: [PATCH 315/456] Fix delbookkeepingyear - add hook printFieldPreListTitle - Look & Feel v12 --- .../accountancy/bookkeeping/listbyaccount.php | 282 +++++++++++++----- htdocs/langs/en_US/accountancy.lang | 1 + 2 files changed, 213 insertions(+), 70 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index ff742c356c4..49dbb81e77d 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -57,6 +57,12 @@ $search_direction = GETPOST('search_direction', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'alpha'); $search_debit = GETPOST('search_debit', 'alpha'); $search_credit = GETPOST('search_credit', 'alpha'); +$search_lettering_code = GETPOST('search_lettering_code', 'alpha'); +$search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); + +if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) { + $action = 'delbookkeepingyear'; +} // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); @@ -105,6 +111,7 @@ if (empty($search_date_start) && empty($search_date_end) && GETPOSTISSET('search $arrayfields = array( // 't.subledger_account'=>array('label'=>$langs->trans("SubledgerAccount"), 'checked'=>1), + 't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1), 't.piece_num'=>array('label'=>$langs->trans("TransactionNumShort"), 'checked'=>1), 't.doc_date'=>array('label'=>$langs->trans("Docdate"), 'checked'=>1), 't.doc_ref'=>array('label'=>$langs->trans("Piece"), 'checked'=>1), @@ -112,10 +119,6 @@ $arrayfields = array( 't.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1), 't.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1), 't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1), - 't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1), - // 't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0), - // 't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0), - // 't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1), ); if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']); @@ -155,6 +158,8 @@ if (empty($reshook)) $search_date_endday = ''; $search_debit = ''; $search_credit = ''; + $search_lettering_code = ''; + $search_not_reconciled = ''; } // Must be after the remove filter action, before the export. @@ -209,9 +214,62 @@ if (empty($reshook)) $filter['t.credit'] = $search_credit; $param .= '&search_credit=' . urlencode($search_credit); } + if (!empty($search_lettering_code)) { + $filter['t.lettering_code'] = $search_lettering_code; + $param .= '&search_lettering_code='.urlencode($search_lettering_code); + } + if (!empty($search_not_reconciled)) { + $filter['t.reconciled_option'] = $search_not_reconciled; + $param .= '&search_not_reconciled='.urlencode($search_not_reconciled); + } } -if ($action == 'delmouvconfirm') { +if ($action == 'delbookkeeping' && $user->rights->accounting->mouvements->supprimer) { + $import_key = GETPOST('importkey', 'alpha'); + + if (!empty($import_key)) { + $result = $object->deleteByImportkey($import_key); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + + // Make a redirect to avoid to launch the delete later after a back button + header("Location: listbyaccount.php".($param ? '?'.$param : '')); + exit; + } +} +if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouvements->supprimer_tous) { + $delmonth = GETPOST('delmonth', 'int'); + $delyear = GETPOST('delyear', 'int'); + if ($delyear == -1) { + $delyear = 0; + } + $deljournal = GETPOST('deljournal', 'alpha'); + if ($deljournal == -1) { + $deljournal = 0; + } + + if (!empty($delmonth) || !empty($delyear) || !empty($deljournal)) + { + $result = $object->deleteByYearAndJournal($delyear, $deljournal, '', ($delmonth > 0 ? $delmonth : 0)); + if ($result < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } + else + { + setEventMessages("RecordDeleted", null, 'mesgs'); + } + + // Make a redirect to avoid to launch the delete later after a back button + header("Location: listbyaccount.php".($param ? '?'.$param : '')); + exit; + } + else + { + setEventMessages("NoRecordDeleted", null, 'warnings'); + } +} +if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->supprimer) { $mvt_num = GETPOST('mvt_num', 'int'); if (!empty($mvt_num)) { @@ -219,8 +277,13 @@ if ($action == 'delmouvconfirm') { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); } - Header("Location: listbyaccount.php"); - exit(); + else + { + setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); + } + + header("Location: listbyaccount.php?noreset=1".($param ? '&'.$param : '')); + exit; } } @@ -262,22 +325,42 @@ if ($action == 'delmouv') { } if ($action == 'delbookkeepingyear') { $form_question = array(); - $delyear = GETPOST('delyear'); + $delyear = GETPOST('delyear', 'int'); + $deljournal = GETPOST('deljournal', 'alpha'); if (empty($delyear)) { $delyear = dol_print_date(dol_now(), '%Y'); } + $month_array = array(); + for ($i = 1; $i <= 12; $i++) { + $month_array[$i] = $langs->trans("Month".sprintf("%02d", $i)); + } $year_array = $formaccounting->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array'); + $journal_array = $formaccounting->select_journal($deljournal, 'deljournal', '', 1, 1, 1, '', 0, 1); + $form_question['delmonth'] = array( + 'name' => 'delmonth', + 'type' => 'select', + 'label' => $langs->trans('DelMonth'), + 'values' => $month_array, + 'default' => '' + ); $form_question['delyear'] = array( - 'name' => 'delyear', - 'type' => 'select', - 'label' => $langs->trans('DelYear'), - 'values' => $year_array, - 'default' => $delyear + 'name' => 'delyear', + 'type' => 'select', + 'label' => $langs->trans('DelYear'), + 'values' => $year_array, + 'default' => $delyear + ); + $form_question['deljournal'] = array( + 'name' => 'deljournal', + 'type' => 'other', // We don't use select here, the journal_array is already a select html component + 'label' => $langs->trans('DelJournal'), + 'value' => $journal_array, + 'default' => $deljournal ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1, 250); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, '', 1, 300); print $formconfirm; } @@ -304,35 +387,41 @@ $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); +// Reverse sort order +if (preg_match('/^asc/i', $sortorder)) $sortorder = "asc"; +else $sortorder = "desc"; + +$moreforfilter = ''; + +// Accountancy account +$moreforfilter .= '
    '; +$moreforfilter .= $langs->trans('AccountAccounting').': '; +$moreforfilter .= '
    '; +$moreforfilter .= $langs->trans('From').' '; +$moreforfilter .= $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, 'maxwidth200'); +$moreforfilter .= $langs->trans('to').' '; +$moreforfilter .= $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, 'maxwidth200'); +$moreforfilter .= '
    '; +$moreforfilter .= '
    '; + $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; else $moreforfilter = $hookmanager->resPrint; -// Reverse sort order -if (preg_match('/^asc/i', $sortorder)) $sortorder = "asc"; -else $sortorder = "desc"; +print '
    '; +print $moreforfilter; +print '
    '; print '
    '; print '
    '.$langs->trans("Parameter").''.$key.''.$langs->trans("Value").'
    '; // Filters lines print ''; -// Accountancy account -print ''; -// Movement number -if (!empty($arrayfields['t.piece_num']['checked'])) -{ - print ''; + +// Code journal +if (!empty($arrayfields['t.code_journal']['checked'])) { + print ''; } // Date document if (!empty($arrayfields['t.doc_date']['checked'])) { @@ -347,6 +436,11 @@ if (!empty($arrayfields['t.doc_date']['checked'])) { print ''; print ''; } +// Movement number +if (!empty($arrayfields['t.piece_num']['checked'])) +{ + print ''; +} // Ref document if (!empty($arrayfields['t.doc_ref']['checked'])) { print ''; @@ -363,9 +457,13 @@ if (!empty($arrayfields['t.debit']['checked'])) { if (!empty($arrayfields['t.credit']['checked'])) { print ''; } -// Code journal -if (!empty($arrayfields['t.code_journal']['checked'])) { - print ''; +// Lettering code +if (!empty($arrayfields['t.lettering_code']['checked'])) +{ + print ''; } // Fields from hook @@ -381,14 +479,14 @@ print ''; print "\n"; print ''; -print_liste_field_titre("AccountAccountingShort", $_SERVER['PHP_SELF']); -if (!empty($arrayfields['t.piece_num']['checked'])) print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center '); if (!empty($arrayfields['t.doc_date']['checked'])) print_liste_field_titre($arrayfields['t.doc_date']['label'], $_SERVER['PHP_SELF'], "t.doc_date", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['t.piece_num']['checked'])) print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder); if (!empty($arrayfields['t.doc_ref']['checked'])) print_liste_field_titre($arrayfields['t.doc_ref']['label'], $_SERVER['PHP_SELF'], "t.doc_ref", "", $param, "", $sortfield, $sortorder); if (!empty($arrayfields['t.label_operation']['checked'])) print_liste_field_titre($arrayfields['t.label_operation']['label'], $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder); if (!empty($arrayfields['t.debit']['checked'])) print_liste_field_titre($arrayfields['t.debit']['label'], $_SERVER['PHP_SELF'], "t.debit", "", $param, '', $sortfield, $sortorder, 'right '); if (!empty($arrayfields['t.credit']['checked'])) print_liste_field_titre($arrayfields['t.credit']['label'], $_SERVER['PHP_SELF'], "t.credit", "", $param, '', $sortfield, $sortorder, 'right '); -if (!empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['t.lettering_code']['checked'])) print_liste_field_titre($arrayfields['t.lettering_code']['label'], $_SERVER['PHP_SELF'], "t.lettering_code", "", $param, '', $sortfield, $sortorder, 'center '); // Hook fields $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook @@ -419,18 +517,42 @@ while ($i < min($num, $limit)) // Is it a break ? if ($accountg != $displayed_account_number || !isset($displayed_account_number)) { - // Affiche un Sous-Total par compte comptable + + $colspan = $totalarray['nbfield'] - 3; + $colspanend = $totalarray['nbfield'] - 7; + // Show a subtotal by accounting account if (isset($displayed_account_number)) { - print ''; - print "\n"; - print "\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + // Show balance of last shown account + $balance = $sous_total_debit - $sous_total_credit; + print ''; + print ''; + if ($balance > 0 ) + { + print ''; + print ''; + } + else + { + print ''; + print ''; + } + print ''; print ''; } // Show the break account - $colspan = 9; print ""; - print ''; @@ -440,11 +562,28 @@ while ($i < min($num, $limit)) //if (empty($displayed_account_number)) $displayed_account_number='-'; $sous_total_debit = 0; $sous_total_credit = 0; + + $colspan = 0; } print ''; - print ''; - if (!$i) $totalarray['nbfield']++; + + // Journal code + if (!empty($arrayfields['t.code_journal']['checked'])) + { + $accountingjournal = new AccountingJournal($db); + $result = $accountingjournal->fetch('', $line->code_journal); + $journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Document date + if (!empty($arrayfields['t.doc_date']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } // Piece number if (!empty($arrayfields['t.piece_num']['checked'])) @@ -457,13 +596,6 @@ while ($i < min($num, $limit)) if (!$i) $totalarray['nbfield']++; } - // Document date - if (!empty($arrayfields['t.doc_date']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Document ref if (!empty($arrayfields['t.doc_ref']['checked'])) { @@ -565,16 +697,6 @@ while ($i < min($num, $limit)) if (!$i) $totalarray['nbfield']++; } - // Journal code - if (!empty($arrayfields['t.code_journal']['checked'])) - { - $accountingjournal = new AccountingJournal($db); - $result = $accountingjournal->fetch('', $line->code_journal); - $journaltoshow = (($result > 0) ? $accountingjournal->getNomUrl(0, 0, 0, '', 0) : $line->code_journal); - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Fields from hook $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj); $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook @@ -591,25 +713,45 @@ while ($i < min($num, $limit)) } } print ''; + if (!$i) $totalarray['nbfield']++; // Comptabilise le sous-total $sous_total_debit += $line->debit; $sous_total_credit += $line->credit; - if (!$i) $totalarray['nbfield']++; - print "\n"; $i++; } // Show sub-total of last shown account +$colspan = $totalarray['nbfield'] - 3; +$colspanend = $totalarray['nbfield'] - 8; print ''; -print ''; -print ''; -print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +// Show balance of last shown account +$balance = $sous_total_debit - $sous_total_credit; +print ''; +print ''; +if ($balance > 0 ) +{ + print ''; + print ''; +} +else +{ + print ''; + print ''; +} +print ''; print ''; // Show total line diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index eb3229efaee..adf2309ad07 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -121,6 +121,7 @@ InvoiceLinesDone=Bound lines of invoices ExpenseReportLines=Lines of expense reports to bind ExpenseReportLinesDone=Bound lines of expense reports IntoAccount=Bind line with the accounting account +TotalForAccount=Total for accounting account Ventilate=Bind From ff578198d63c4e8f4b852c96c4380f264e38b74c Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 10 May 2020 04:35:52 +0000 Subject: [PATCH 316/456] Fixing style errors. --- htdocs/accountancy/bookkeeping/listbyaccount.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 49dbb81e77d..25f664d955e 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -517,7 +517,6 @@ while ($i < min($num, $limit)) // Is it a break ? if ($accountg != $displayed_account_number || !isset($displayed_account_number)) { - $colspan = $totalarray['nbfield'] - 3; $colspanend = $totalarray['nbfield'] - 7; // Show a subtotal by accounting account From 04480847df1ca79066567d41c58e613ed03a4189 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 10 May 2020 08:28:03 +0200 Subject: [PATCH 317/456] NEW Accountancy balance - Add a button ShowSubtotalByGroup --- htdocs/accountancy/bookkeeping/balance.php | 61 ++++++++++++++-------- htdocs/langs/en_US/accountancy.lang | 1 + 2 files changed, 39 insertions(+), 23 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index b2a25b00ce2..7b99057f73a 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -55,7 +55,7 @@ $pagenext = $page + 1; //if (! $sortfield) $sortfield="p.date_fin"; //if (! $sortorder) $sortorder="DESC"; - +$show_subgroup = GETPOST('show_subgroup', 'alpha'); $search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); $search_date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); @@ -130,10 +130,11 @@ if (!empty($search_accountancy_code_end)) { if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { - $search_accountancy_code_start = ''; - $search_accountancy_code_end = ''; + $show_subgroup = ''; $search_date_start = ''; $search_date_end = ''; + $search_accountancy_code_start = ''; + $search_accountancy_code_end = ''; $filter = array(); } @@ -223,6 +224,12 @@ if ($action != 'export_csv') $moreforfilter .= $form->selectDate($search_date_start ? $search_date_start : -1, 'date_start', 0, 0, 1, '', 1, 0); $moreforfilter .= $langs->trans('DateEnd').': '; $moreforfilter .= $form->selectDate($search_date_end ? $search_date_end : -1, 'date_end', 0, 0, 1, '', 1, 0); + + $moreforfilter .= ' - '; + $moreforfilter .= $langs->trans('ShowSubtotalByGroup').': '; + $moreforfilter .= ''; + + $moreforfilter .= ''; if (!empty($moreforfilter)) { @@ -289,26 +296,31 @@ if ($action != 'export_csv') } print ''; - // Permet d'afficher le compte comptable - if (empty($displayed_account) || $root_account_description != $displayed_account) + if(!empty($show_subgroup)) { - // Affiche un Sous-Total par compte comptable - if ($displayed_account != "") { - print ''; - print "\n"; + // Permet d'afficher le compte comptable + if (empty($displayed_account) || $root_account_description != $displayed_account) { + // Affiche un Sous-Total par compte comptable + if ($displayed_account != "") { + print ''; + print ''; + print ''; + print ''; + print "\n"; + print "\n"; + print ''; + } + + // Show first line of a break + print ''; + print ''; print ''; + + $displayed_account = $root_account_description; + $sous_total_debit = 0; + $sous_total_credit = 0; } - - // Show first line of a break - print ''; - print ''; - print ''; - - $displayed_account = $root_account_description; - $sous_total_debit = 0; - $sous_total_credit = 0; } - // $object->get_compte_racine($line->numero_compte); print ''; @@ -326,12 +338,15 @@ if ($action != 'export_csv') $sous_total_credit += $line->credit; } - print ''; - print "\n"; - print ''; + if(!empty($show_subgroup)) + { + print ''; + print "\n"; + print ''; + } print ''; - print "\n"; + print "\n"; print ''; print "
    '; -print '
    '; -print $langs->trans('From').' '; -print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, 'maxwidth200'); -print '
    '; -print '
    '; -print $langs->trans('to').' '; -print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, 'maxwidth200'); -print '
    '; -print '
    '; + print ''; + print '
    '.$langs->trans("NotReconciled").''; + print '
    '.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).'  
    '.$langs->trans("TotalForAccount").' '.length_accountg($displayed_account_number).':'.price($sous_total_debit).''.price($sous_total_credit).'
    '.$langs->trans("Balance").':'; + print price($sous_total_debit - $sous_total_credit); + print ''; + print price($sous_total_credit - $sous_total_debit); + print '
    '; + print ''; if ($line->numero_compte != "" && $line->numero_compte != '-1') print length_accountg($line->numero_compte).' : '.$object->get_compte_desc($line->numero_compte); else print ''.$langs->trans("Unknown").''; print '
     '.$journaltoshow.''.dol_print_date($line->doc_date, 'day').''.dol_print_date($line->doc_date, 'day').''.$journaltoshow.'
    '.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''; -print price($sous_total_debit - $sous_total_credit); -print ''.$langs->trans("TotalForAccount").' '.$accountg.':'.price($sous_total_debit).''.price($sous_total_credit).'
    '.$langs->trans("Balance").':'; + print price($sous_total_debit - $sous_total_credit); + print ''; + print price($sous_total_credit - $sous_total_debit); + print '
    '.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).' 
    ' . $langs->trans("SubTotal") . ':' . price($sous_total_debit) . '' . price($sous_total_credit) . '' . price(price2num($sous_total_credit - $sous_total_debit)) . '
    ' . $line->numero_compte . ($root_account_description ? ' - ' . $root_account_description : '') . '
    '.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'
    '.length_accountg($line->numero_compte).'
    '.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).' 
    ' . $langs->trans("SubTotal") . ':' . price($sous_total_debit) . '' . price($sous_total_credit) . '' . price(price2num($sous_total_debit - $sous_total_credit)) . '
    '.$langs->trans("AccountBalance").':'.price($total_debit).''.price($total_credit).''.price(price2num($total_debit - $total_credit)).' 
    "; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index eb3229efaee..a3d4437b043 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -235,6 +235,7 @@ UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-par PaymentsNotLinkedToProduct=Payment not linked to any product / service ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance +ShowSubtotalByGroup=Show subtotal by group Pcgtype=Group of account PcgtypeDesc=Group of account are used as predefined 'filter' and 'grouping' criteria for some accounting reports. For example, 'INCOME' or 'EXPENSE' are used as groups for accounting accounts of products to build the expense/income report. From 796f97c6715e16b162c9d23952c63a34d728ee8f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 May 2020 15:08:01 +0200 Subject: [PATCH 318/456] Support tag $capture in input of files --- htdocs/core/class/html.formfile.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 98d781a51c1..26abcf2e721 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -78,9 +78,10 @@ class FormFile * @param string $accept Specifies the types of files accepted (This is not a security check but an user interface facility. eg '.pdf,image/*' or '.png,.jpg' or 'video/*') * @param string $sectiondir If upload must be done inside a particular directory (if sectiondir defined, sectionid must not be) * @param int $usewithoutform 0=Default, 1=Disable
    and style to use in existing area + * @param int $capture 1=Add tag capture="capture" to force use of micro or video recording to generate file. When setting this to 1, you must also provide a value for $accept. * @return int <0 if KO, >0 if OK */ - public function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = '', $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '', $usewithoutform = 0) + public function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = '', $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '', $usewithoutform = 0, $capture = 0) { // phpcs:enable global $conf, $langs, $hookmanager; @@ -170,6 +171,7 @@ class FormFile $out .= ((!empty($conf->global->MAIN_DISABLE_MULTIPLE_FILEUPLOAD) || $conf->browser->layout != 'classic') ? ' name="userfile"' : ' name="userfile[]" multiple'); $out .= (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm) ? ' disabled' : ''); $out .= (!empty($accept) ? ' accept="'.$accept.'"' : ' accept=""'); + $out .= (!empty($capture) ? ' capture="capture"' : ''); $out .= '>'; $out .= ' '; if ($sectionid) { // Show overwrite if exists for ECM module only From 501f1ba2c403f12c90c8a76810bec39540581e64 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 May 2020 15:45:07 +0200 Subject: [PATCH 319/456] Fix look and feel v12 --- htdocs/contrat/document.php | 1 - htdocs/core/ajax/selectsearchbox.php | 2 +- htdocs/core/lib/functions.lib.php | 9 +++++---- htdocs/main.inc.php | 8 ++++---- htdocs/theme/eldy/global.inc.php | 6 +++++- htdocs/theme/md/style.css.php | 2 ++ 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index 7d47b5102ac..fd3b3f66e4a 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -179,7 +179,6 @@ if ($object->id) print '
    '; print '
    '; - print ''; print ''; print ''; diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php index 2f8ad4ab5f7..31a95d1e02c 100644 --- a/htdocs/core/ajax/selectsearchbox.php +++ b/htdocs/core/ajax/selectsearchbox.php @@ -99,7 +99,7 @@ if (!empty($conf->commande->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUS } if (!empty($conf->expedition->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_SHIPMENT_DISABLED) && $user->rights->expedition->lire) { - $arrayresult['searchintoshipment'] = array('position'=>80, 'img'=>'object_sending', 'label'=>$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text'=>img_picto('', 'object_sending').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expedition/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); + $arrayresult['searchintoshipment'] = array('position'=>80, 'img'=>'object_shipment', 'label'=>$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'text'=>img_picto('', 'object_shipment').' '.$langs->trans("SearchIntoCustomerShipments", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/expedition/list.php'.($search_boxvalue ? '?sall='.urlencode($search_boxvalue) : '')); } if (!empty($conf->facture->enabled) && empty($conf->global->MAIN_SEARCHFORM_CUSTOMER_INVOICE_DISABLED) && $user->rights->facture->lire) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index bcf47a58eef..89e76156448 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3162,7 +3162,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', 'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', - 'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', + 'object_shipment', 'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'off', 'on', 'order', @@ -3209,7 +3209,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', 'resource'=>'laptop-house', - 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt', + 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt', 'uparrow'=>'mail-forward', @@ -3273,7 +3273,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4', 'holiday'=>'bg-infobox-holiday', 'invoice'=>'bg-infobox-commande', 'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal', - 'resource'=>'bg-infobox-action', 'supplier_invoice'=>'bg-infobox-order_supplier', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal', + 'resource'=>'bg-infobox-action', + 'supplier_invoice'=>'bg-infobox-order_supplier', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal', 'ticket'=>'bg-infobox-contrat', 'title_accountancy'=>'bg-infobox-bank_account', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action', //'title_setup'=>'bg-infobox-action', 'tools'=>'bg-infobox-action', 'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode' @@ -3291,7 +3292,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'other'=>'#ddd', 'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba', - 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa' + 'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa' ); if (isset($arrayconvpictotocolor[$pictowithouttext])) { $facolor = $arrayconvpictotocolor[$pictowithouttext]; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 6533b4bfe54..8ebd68631cb 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2180,7 +2180,7 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ } else { if (is_array($arrayresult)) { foreach ($arrayresult as $key => $val) { - $searchform .= printSearchForm($val['url'], $val['url'], $val['label'], 'maxwidth125', 'sall', $val['shortcut'], 'searchleft'.$key, img_picto('', $val['img'], '', false, 1, 1)); + $searchform .= printSearchForm($val['url'], $val['url'], $val['label'], 'maxwidth125', 'sall', $val['shortcut'], 'searchleft'.$key, $val['img']); } } } @@ -2453,14 +2453,14 @@ function printSearchForm($urlaction, $urlobject, $title, $htmlmorecss, $htmlinpu $ret .= ''; if ($showtitlebefore) $ret .= '
    '.$title.'
    '; $ret .= '
    '; + $ret .= img_picto('', $img, '', false, 0, 0, '', 'paddingright width20'); $ret .= ''; - //$ret.=''; - $ret .= ''; $ret .= '
    '; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 9e099c6953d..4ec62c217a5 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1027,6 +1027,7 @@ table[summary="list_of_modules"] .fa-cog { /* rule for not too small screen only */ @media only screen and (min-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) { + .width20 { width: 20px; } .width25 { width: 25px; } .width50 { width: 50px; } .width75 { width: 75px; } @@ -1048,6 +1049,7 @@ table[summary="list_of_modules"] .fa-cog { .minwidth500imp { min-width: 500px !important; } } .widthauto { width: auto; } +.width20 { width: 20px; } .width25 { width: 25px; } .width50 { width: 50px; } .width75 { width: 75px; } @@ -6309,7 +6311,9 @@ div.tabsElem a.tab { div.login_block_user, div.login_block_other { clear: both; } .atoplogin, .atoplogin:hover { - color: #000 !important; + color:unset !important; + padding-left: 4px; + padding-right: 4px; } .login_block_elem { padding: 0 !important; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index c995426edd9..71fbb6f50da 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1122,6 +1122,7 @@ table[summary="list_of_modules"] .fa-cog { /* rule for not too small screen only */ @media only screen and (min-width: px) { + .width20 { width: 20px; } .width25 { width: 25px; } .width50 { width: 50px; } .width75 { width: 75px; } @@ -1143,6 +1144,7 @@ table[summary="list_of_modules"] .fa-cog { .minwidth500imp { min-width: 500px !important; } } .widthauto { width: auto; } +.width20 { width: 20px; } .width25 { width: 25px; } .width50 { width: 50px; } .width75 { width: 75px; } From fbbb898d528e526b9ff9b8a7e47d4a027718d96b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 May 2020 18:31:55 +0200 Subject: [PATCH 320/456] Better log --- scripts/cron/cron_run_jobs.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/cron/cron_run_jobs.php b/scripts/cron/cron_run_jobs.php index 24e92c79d0b..79d52c49445 100755 --- a/scripts/cron/cron_run_jobs.php +++ b/scripts/cron/cron_run_jobs.php @@ -227,11 +227,13 @@ if (is_array($qualifiedjobs) && (count($qualifiedjobs) > 0)) { echo "You can also enable module Log if not yet enabled, run again and take a look into dolibarr.log file\n"; dol_syslog("cron_run_jobs.php::run_jobs Error ".$cronjob->error, LOG_ERR); $nbofjobslaunchedko++; + $resultstring = 'KO'; } else { $nbofjobslaunchedok++; + $resultstring = 'OK'; } - echo " - result of run_jobs = ".$result; + echo " - run_jobs ".$resultstring." result = ".$result; // We re-program the next execution and stores the last execution time for this job $result = $cronjob->reprogram_jobs($userlogin, $now); From c511af69fe31ec911679f93de77aeffbc541a952 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 10 May 2020 21:07:49 +0200 Subject: [PATCH 321/456] Debug look and feel v12 --- htdocs/core/class/html.form.class.php | 5 ++- htdocs/core/class/html.formactions.class.php | 5 ++- htdocs/core/lib/agenda.lib.php | 44 ++++++++++--------- htdocs/core/modules/DolibarrModules.class.php | 2 +- .../class/html.formresource.class.php | 5 ++- htdocs/theme/eldy/global.inc.php | 31 +++++++++---- 6 files changed, 55 insertions(+), 37 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index ee24af9f307..5fe411c6260 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -7676,10 +7676,11 @@ class Form * @param int $enableonly Array list of groups id to be enabled. All other must be disabled * @param string $force_entity '0' or Ids of environment to force * @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter) + * @param string $morecss More css to add to html component * @return string * @see select_dolusers() */ - public function select_dolgroups($selected = '', $htmlname = 'groupid', $show_empty = 0, $exclude = '', $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $multiple = false) + public function select_dolgroups($selected = '', $htmlname = 'groupid', $show_empty = 0, $exclude = '', $disabled = 0, $include = '', $enableonly = '', $force_entity = '0', $multiple = false, $morecss = '') { // phpcs:enable global $conf, $user, $langs; @@ -7722,7 +7723,7 @@ class Form include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; $out .= ajax_combobox($htmlname); - $out .= ''; $num = $this->db->num_rows($resql); $i = 0; diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 352fcebb06b..8aa51a66ab7 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -339,9 +339,10 @@ class FormActions * @param int $hideinfohelp 1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value * @param int $multiselect 1=Allow multiselect of action type * @param int $nooutput 1=No output + * @param string $morecss More css to add to SELECT component. * @return string */ - public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0) + public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = '') { // phpcs:enable global $langs, $user, $form, $conf; @@ -371,7 +372,7 @@ class FormActions } else { - $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200', 1); + $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200'.($morecss ? ' '.$morecss : ''), 1); } if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 474a4f03696..532ef091698 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -77,27 +77,29 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh { // Type print ''; - print ''; // Assigned to print ''; - print ''; if ($conf->resource->enabled) @@ -109,9 +111,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print ''; print ''; } } @@ -119,11 +121,11 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh if (!empty($conf->societe->enabled) && $user->rights->societe->lire) { print ''; - print ''; } @@ -133,10 +135,10 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh $formproject = new FormProjets($db); print ''; - print ''; } @@ -145,9 +147,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh { // Status print ''; - print ''; } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index c592cb69959..9543cf74442 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2314,7 +2314,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it print '
    '.$this->getName().' - '.nl2br($this->getDesc()).''; + '.nl2br($this->getDesc()).''; /*print 'getVersion(1).'">'; print $this->getVersion(1); diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index 3c0bb36116e..36d3fc854cc 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -74,9 +74,10 @@ class FormResource * @param string $filterkey Filter on key value * @param int $outputmode 0=HTML select string, 1=Array, 2=without form tag * @param int $limit Limit number of answers + * @param string $morecss More css * @return string HTML string with */ - public function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20) + public function select_resource_list($selected = '', $htmlname = 'fk_resource', $filter = '', $showempty = 0, $showtype = 0, $forcecombo = 0, $event = array(), $filterkey = '', $outputmode = 0, $limit = 20, $morecss = '') { // phpcs:enable global $conf, $user, $langs; @@ -103,7 +104,7 @@ class FormResource } // Construct $out and $outarray - $out .= ''."\n"; if ($showempty) $out .= ''."\n"; $num = 0; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 4ec62c217a5..dc0c77ed67d 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -670,7 +670,9 @@ body[class*="colorblind-"] .text-success{ .editfielda span.fa-pencil-alt:hover, .editfielda span.fa-trash:hover, .editfieldlang:hover { color: var(--colortexttitle) !important; } - +.fawidth30 { + width: 20px; +} .floatnone { float: none !important; } @@ -1137,6 +1139,19 @@ table[summary="list_of_modules"] .fa-cog { .hideonsmartphone { display: none; } .hideonsmartphoneimp { display: none !important; } + + span.pictotitle { + margin-: 0 !important; + } + div.fiche>table.table-fiche-title { + margin-top: 7px !important; + margin-bottom: 15px !important; + } + + select.minwidth100imp, select.minwidth100, select.minwidth200, .widthcentpercentminusx { + width: calc(100% - 30px) !important; + display: inline-block; + } } /* Force values for small screen 570 */ @@ -1145,6 +1160,10 @@ table[summary="list_of_modules"] .fa-cog { body { font-size: ; } + + .box-flex-item { + margin: 3px 2px 3px 2px !important; + } div.refidno { font-size: !important; } @@ -1472,10 +1491,10 @@ body.onlinepaymentbody div.fiche { /* For online payment page */ margin: 20px !important; } div.fiche>table:first-child { - margin-bottom: 15px !important; + margin-bottom: 15px; } div.fiche>table.table-fiche-title { - margin-bottom: 7px !important; + margin-bottom: 7px; } div.fichecenter { width: 100%; @@ -1607,12 +1626,6 @@ td.nobordernopadding.widthpictotitle.col-picto { margin-: 8px; /* margin-bottom: 4px; */ } -@media only screen and (max-width: 767px) -{ - span.pictotitle { - margin-: 0 !important; - } -} .pictoobjectwidth { width: 14px; } From a83af075aa7867a404f5fb125515c120a042756f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 May 2020 00:35:05 +0200 Subject: [PATCH 322/456] Fix responsive --- htdocs/admin/index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index 1a55fbc04ee..1a27d61e55d 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -67,12 +67,12 @@ if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) } } -print ''; -print $langs->trans("SetupDescription1"); +print ''; +print $langs->trans("SetupDescription1").' '; print $langs->trans("AreaForAdminOnly").' '; print $langs->trans("SetupDescription2", $langs->transnoentities("MenuCompanySetup"), $langs->transnoentities("Modules")); -print ''; print "

    "; +print '
    '; print '
    '; From 7300b45bcd9af35dc206830d71708853615eed60 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 May 2020 01:19:33 +0200 Subject: [PATCH 323/456] Responsive --- htdocs/adherents/index.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 44fcb397ddc..6d069386592 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -1,9 +1,9 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2017 Laurent Destailleur + * Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -22,7 +22,7 @@ /** * \file htdocs/adherents/index.php * \ingroup member - * \brief Page accueil module adherents + * \brief Home page of membership module */ require '../main.inc.php'; @@ -339,7 +339,7 @@ if ($resql) $staticmember->ref = $staticmember->getFullName($langs); $statictype->id = $obj->typeid; $statictype->label = $obj->label; - print '
    '; + print ''; print ''; print ''; print ''; @@ -399,12 +399,12 @@ if ($resql) $staticmember->name = $obj->company; } $staticmember->ref = $staticmember->getFullName($langs); - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; //print ''; - print ''; + print ''; print ''; $i++; } From 02ec28281296c16044ecd714230ad935625eb3f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 May 2020 03:34:30 +0200 Subject: [PATCH 324/456] Typo --- 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 3cf6e6044db..9ad7d2cf55a 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1015,7 +1015,7 @@ LocalTax2IsUsedDescES=The IRPF rate by default when creating prospects, invoices LocalTax2IsNotUsedDescES=By default the proposed IRPF is 0. End of rule. LocalTax2IsUsedExampleES=In Spain, freelancers and independent professionals who provide services and companies who have chosen the tax system of modules. LocalTax2IsNotUsedExampleES=In Spain they are businesses not subject to tax system of modules. -RevenueStampDesc=The "tax stamp" or "revenue stamp" is a fixed tax you per invoice (It does not depend on amount of invoice). It can also be a percent tax but using the second or third type of tax is better for percent taxes as tax stamps des not provide any reporting. Only few countries uses this type of tax. +RevenueStampDesc=The "tax stamp" or "revenue stamp" is a fixed tax you per invoice (It does not depend on amount of invoice). It can also be a percent tax but using the second or third type of tax is better for percent taxes as tax stamps does not provide any reporting. Only few countries uses this type of tax. UseRevenueStamp=Use a tax stamp UseRevenueStampExample=The value of tax stamp is defined by default into the setup of dictionaries (%s - %s - %s) CalcLocaltax=Reports on local taxes From a8dcd2d09b2a933f1e5525340e4db31786aece88 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 May 2020 11:53:13 +0200 Subject: [PATCH 325/456] Clean code --- htdocs/core/class/conf.class.php | 2 -- htdocs/core/lib/functions.lib.php | 26 +++++++------------------- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 0a52301e608..dee4edc3298 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -690,8 +690,6 @@ class Conf $this->global->AGENDA_DEFAULT_FILTER_TYPE = '0'; // 'AC_NON_AUTO' does not exists when AGENDA_DEFAULT_FILTER_TYPE is not on. } - if (!isset($this->global->MAIN_USE_OLD_TITLE_BUTTON)) $this->global->MAIN_USE_OLD_TITLE_BUTTON = 0; - if (!isset($this->global->MAIN_JS_GRAPH)) $this->global->MAIN_JS_GRAPH = 'chart'; // Use chart.js library if (empty($this->global->MAIN_MODULE_DOLISTORE_API_SRV)) $this->global->MAIN_MODULE_DOLISTORE_API_SRV = 'https://www.dolistore.com'; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 89e76156448..5f31b07214c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -4523,15 +4523,17 @@ function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $be } if ($page > 0) { - print ''; + print ''; } if ($betweenarrows) { + print ''; print $betweenarrows; + print ''; } if ($nextpage > 0) { - print ''; + print ''; } if ($afterarrows) { @@ -8623,11 +8625,8 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u } $class = 'btnTitle'; + if ($iconClass == 'fa fa-plus-circle') $class .= ' btnTitlePlus'; - // hidden conf keep during button transition TODO: remove this block - if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) { - $class = 'butActionNew'; - } if (!empty($params['morecss'])) $class .= ' '.$params['morecss']; $attr = array( @@ -8642,11 +8641,6 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u if ($status <= 0) { $attr['class'] .= ' refused'; - // hidden conf keep during button transition TODO: remove this block - if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) { - $attr['class'] = 'butActionNewRefused'; - } - $attr['href'] = ''; if ($status == -1) { // disable @@ -8698,18 +8692,12 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u $tag = (empty($attr['href']) ? 'span' : 'a'); - $button = '<'.$tag.' '.$compiledAttributes.' >'; + $button = ''; + $button .= '<'.$tag.' '.$compiledAttributes.' >'; $button .= ''; $button .= ''.$label.''; $button .= ''; - // hidden conf keep during button transition TODO: remove this block - if (!empty($conf->global->MAIN_USE_OLD_TITLE_BUTTON)) { - $button = '<'.$tag.' '.$compiledAttributes.' >'.$label.''; - $button .= ''; - $button .= ''; - } - return $button; } From a2bc46f1c012346c5c0ee5f006c5bd59ccd988ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 May 2020 12:50:24 +0200 Subject: [PATCH 326/456] CSS --- htdocs/core/ajax/ajaxdirtree.php | 4 ++-- htdocs/core/lib/agenda.lib.php | 6 +++--- htdocs/resource/class/html.formresource.class.php | 5 +++-- htdocs/theme/eldy/global.inc.php | 12 +++++++++--- htdocs/theme/eldy/info-box.inc.php | 11 +++++------ 5 files changed, 22 insertions(+), 16 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 04687b77829..3e54532668a 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -428,11 +428,11 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, print (isset($val['cachenbofdoc']) && $val['cachenbofdoc'] >= 0) ? $val['cachenbofdoc'] : ' '; print ''; print ''; // Edit link - print ''; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index 532ef091698..5d450aa4b04 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -109,9 +109,9 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh // Resource print ''; - print ''; @@ -158,7 +158,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh { // Filter on hours print ''; - print ''; + print ''; print "'; } diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 8f2e0973ab3..44fb0865682 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5387,11 +5387,11 @@ class Product extends CommonObject $label_type = 'short_label'; } - $sql = 'select '.$label_type.' from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit; + $sql = 'select '.$label_type.', code from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit; $resql = $this->db->query($sql); if ($resql && $this->db->num_rows($resql) > 0) { $res = $this->db->fetch_array($resql); - $label = $res[$label_type]; + $label = $label_type == 'short' ? $res[$label_type] : $langs->trans('unit' . $res['code']); $this->db->free($resql); return $label; } From 64d2f906bc7cdf2c4bbcb733ca4668ce7eae868e Mon Sep 17 00:00:00 2001 From: atm-greg Date: Mon, 11 May 2020 16:35:58 +0200 Subject: [PATCH 328/456] fix visibility of extrafields in public interface --- htdocs/public/ticket/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php index 1a18954994f..a7f9b49fd58 100644 --- a/htdocs/public/ticket/list.php +++ b/htdocs/public/ticket/list.php @@ -235,7 +235,7 @@ if ($action == "view_ticketlist") if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { if ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate') { - $arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => $extrafields->attributes[$object->table_element]['list'][$key], 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' => $extrafields->attributes[$object->table_element]['perms'][$key]); + $arrayfields["ef.".$key] = array('label' => $extrafields->attributes[$object->table_element]['label'][$key], 'checked' => ($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1, 'position' => $extrafields->attributes[$object->table_element]['pos'][$key], 'enabled' =>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3) && $extrafields->attributes[$object->table_element]['perms'][$key]); } } } From 097de7b3cd934e67a00cb0a9c82bc02e6c47d838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 11 May 2020 18:34:54 +0200 Subject: [PATCH 329/456] Only add empty select if no multiselect --- htdocs/core/class/html.formactions.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 8aa51a66ab7..398e2b8a235 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -353,10 +353,13 @@ class FormActions require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $caction = new CActionComm($this->db); - // Suggest a list with manual events or all auto events - $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot); - array_unshift($arraylist, ' '); // Add empty line at start - //asort($arraylist); + // Suggest a list with manual events or all auto events + $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot); + if (empty($multiselect)) { + // Add empty line at start only if no multiselect + array_unshift($arraylist, ' '); + } + //asort($arraylist); if ($selected == 'manual') $selected = 'AC_OTH'; if ($selected == 'auto') $selected = 'AC_OTH_AUTO'; From 3a46d5a3dddaf7b581f11867cbbd4ee1cd74d9b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 11 May 2020 18:46:54 +0200 Subject: [PATCH 330/456] Update agenda_other.php --- htdocs/admin/agenda_other.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 10bfa13d1ce..c5b196146d5 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -81,8 +81,10 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) } if ($action == 'set') { + $getDefaultFilter = GETPOST('AGENDA_DEFAULT_FILTER_TYPE'); + $defaultfilter = (is_array($getDefaultFilter)) ? implode(',', $getDefaultFilter) : $getDefaultFilter; dolibarr_set_const($db, 'AGENDA_USE_EVENT_TYPE_DEFAULT', GETPOST('AGENDA_USE_EVENT_TYPE_DEFAULT'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', GETPOST('AGENDA_DEFAULT_FILTER_TYPE'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_TYPE', $defaultfilter, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_FILTER_STATUS', GETPOST('AGENDA_DEFAULT_FILTER_STATUS'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'AGENDA_DEFAULT_VIEW', GETPOST('AGENDA_DEFAULT_VIEW'), 'chaine', 0, '', $conf->entity); } @@ -377,7 +379,12 @@ print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; // AGENDA_DEFAULT_FILTER_STATUS From 44d36815bd88eff1960f560de635a37f1cfcbfc7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 May 2020 19:00:27 +0200 Subject: [PATCH 331/456] Look and feel v12 --- htdocs/comm/mailing/card.php | 2 +- htdocs/comm/mailing/list.php | 2 +- htdocs/core/lib/functions.lib.php | 10 ++++++---- htdocs/core/modules/modCollab.class.php | 2 +- htdocs/core/modules/modWebsite.class.php | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 68a6b8db331..e3cb5a9ad97 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -742,7 +742,7 @@ if ($action == 'create') // Print mail form - print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'generic'); + print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'object_email'); dol_fiche_head(); diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index 8feaa5a4d93..8119224bbfa 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -188,7 +188,7 @@ if ($resql) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_email', 0, $newcardbutton, '', $limit, 0, 0, 1); $moreforfilter = ''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 5f31b07214c..20094da216c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3158,13 +3158,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', - 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label', + 'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label', 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', 'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', 'object_shipment', 'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', - 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', + 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', 'off', 'on', 'order', 'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'wrench', @@ -3213,7 +3213,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', 'title_agenda'=>'calendar-alt', 'uparrow'=>'mail-forward', - 'jabber'=>'comment-o' + 'jabber'=>'comment-o', + 'website'=>'globe-americas' ); if ($pictowithouttext == 'off') { $fakey = 'fa-square'; @@ -3292,7 +3293,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'other'=>'#ddd', 'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'resize'=>'#444', 'rss'=>'#cba', - 'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa' + 'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'uparrow'=>'#555', 'globe-americas'=>'#aaa', + 'website'=>'#304' ); if (isset($arrayconvpictotocolor[$pictowithouttext])) { $facolor = $arrayconvpictotocolor[$pictowithouttext]; diff --git a/htdocs/core/modules/modCollab.class.php b/htdocs/core/modules/modCollab.class.php index 5190c8c4d72..345a292cb92 100644 --- a/htdocs/core/modules/modCollab.class.php +++ b/htdocs/core/modules/modCollab.class.php @@ -55,7 +55,7 @@ class modCollab extends DolibarrModules // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of image file used for this module. - $this->picto = 'globe'; + $this->picto = 'website'; // Data directories to create when module is enabled $this->dirs = array("/collab/temp"); diff --git a/htdocs/core/modules/modWebsite.class.php b/htdocs/core/modules/modWebsite.class.php index 3e3b4bae374..60cc93b5d39 100644 --- a/htdocs/core/modules/modWebsite.class.php +++ b/htdocs/core/modules/modWebsite.class.php @@ -55,7 +55,7 @@ class modWebsite extends DolibarrModules // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // Name of image file used for this module. - $this->picto = 'globe'; + $this->picto = 'website'; // Data directories to create when module is enabled $this->dirs = array("/website/temp"); From c4a7923b51a449a86f1fedc50cef32c9feb745ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 11 May 2020 19:02:52 +0200 Subject: [PATCH 332/456] CSS --- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 8a21844ca7c..b6884b164a1 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -880,7 +880,7 @@ select.flat.selectlimit { max-width: 0; overflow: auto; } -.divintdwithtwolinesmax { +.divintowithtwolinesmax { width: 75px; display: -webkit-box; -webkit-box-orient: vertical; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 71fbb6f50da..40e8c5e27b4 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -983,7 +983,7 @@ select.flat.selectlimit { max-width: 0; overflow: auto; } -.divintdwithtwolinesmax { +.divintodwithtwolinesmax { width: 75px; display: -webkit-box; -webkit-box-orient: vertical; From 4d50ba5e370a57c7168e6f4cd2dd4f336fe3d361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 11 May 2020 20:42:47 +0200 Subject: [PATCH 333/456] Fix dolistore search with csrf active --- htdocs/admin/dolistore/ajax/image.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/admin/dolistore/ajax/image.php b/htdocs/admin/dolistore/ajax/image.php index c1bb4e997dc..6349c7461b5 100644 --- a/htdocs/admin/dolistore/ajax/image.php +++ b/htdocs/admin/dolistore/ajax/image.php @@ -1,6 +1,7 @@ . * Copyright (C) 2008-2011 Laurent Destailleur + * Copyright (C) 2020 Frédéric France * * This program is free software; you can redistribute it and/or modifyion 2.0 (the "License"); * it under the terms of the GNU General Public License as published bypliance with the License. @@ -17,6 +18,9 @@ */ if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1); +if (!defined('NOTOKENRENEWAL')) { + define('NOTOKENRENEWAL', 1); +} /** From 75cd7d7e723103fa0edadcb8860a77e908f7e6bb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 03:04:48 +0200 Subject: [PATCH 334/456] Code comment --- htdocs/core/class/commonobjectline.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index 5a09dbfed29..f04e2da11ee 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -54,8 +54,8 @@ abstract class CommonObjectLine extends CommonObject * Returns the translation key from units dictionary. * A langs->trans() must be called on result to get translated value. * - * @param string $type Label type (long or short) - * @return string|int <0 if ko, label if ok + * @param string $type Label type (long or short). This can be a translation key. + * @return string|int <0 if ko, label if ok */ public function getLabelOfUnit($type = 'long') { From d459f9902c7bbc601cf4eda76a4803d65bc3f194 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 03:06:30 +0200 Subject: [PATCH 335/456] Update card.php --- htdocs/product/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index d58e5f8f742..87e86e8e0bc 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -2099,7 +2099,7 @@ else print ''; } From a0998583852dd9ff3a946703210be6aaed326399 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 03:07:23 +0200 Subject: [PATCH 336/456] Update product.class.php --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 44fb0865682..2a56131bdd5 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5391,7 +5391,7 @@ class Product extends CommonObject $resql = $this->db->query($sql); if ($resql && $this->db->num_rows($resql) > 0) { $res = $this->db->fetch_array($resql); - $label = $label_type == 'short' ? $res[$label_type] : $langs->trans('unit' . $res['code']); + $label = ($label_type == 'short' ? $res[$label_type] : 'unit'.$res['code']); $this->db->free($resql); return $label; } From 92d137cde90c6e2ad9c0ac42f46157badf624708 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 03:09:04 +0200 Subject: [PATCH 337/456] Update list.php --- htdocs/product/stock/list.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php index c13243fc9cb..74c2c21cadf 100644 --- a/htdocs/product/stock/list.php +++ b/htdocs/product/stock/list.php @@ -549,12 +549,15 @@ if ($num) { print ''; if ($key == 'statut') print $warehouse->getLibStatut(5); - if ($key == 'phone') - { + if ($key == 'phone') { print dol_print_phone($obj->phone, '', 0, $obj->rowid, 'AC_TEL'); } - elseif ($key == 'fax') print dol_print_phone($obj->fax, '', 0, $obj->rowid, 'AC_FAX'); - else print $warehouse->showOutputField($val, $key, $warehouse->$key, ''); + elseif ($key == 'fax') { + print dol_print_phone($obj->fax, '', 0, $obj->rowid, 'AC_FAX'); + } + else { + print $warehouse->showOutputField($val, $key, $warehouse->$key, ''); + } print ''; if (!$i) $totalarray['nbfield']++; if (!empty($val['isameasure'])) From 6706d28eb7f166754cedbb64c106a1fd3c62cff3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 03:15:19 +0200 Subject: [PATCH 338/456] Update admin.lang --- 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 e97ed8dbc54..7669378aff4 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1272,7 +1272,7 @@ RuleForGeneratedPasswords=Rules to generate and validate passwords DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link on the Login page UsersSetup=Users module setup UserMailRequired=Email required to create a new user -UserHideInactive=Hide inactive users +UserHideInactive=Hide inactive users from all combo lists of users (this may means you won't be able to filter on old users) UsersDocModules=Document templates for documents generated from user record GroupsDocModules=Document templates for documents generated from a group record ##### HRM setup ##### From 3c8452aa3131eb6391ea21edf1a4315370f02d85 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 03:17:55 +0200 Subject: [PATCH 339/456] Update admin.lang --- 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 7669378aff4..c9be1ca2f41 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1272,7 +1272,7 @@ RuleForGeneratedPasswords=Rules to generate and validate passwords DisableForgetPasswordLinkOnLogonPage=Do not show the "Password Forgotten" link on the Login page UsersSetup=Users module setup UserMailRequired=Email required to create a new user -UserHideInactive=Hide inactive users from all combo lists of users (this may means you won't be able to filter on old users) +UserHideInactive=Hide inactive users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on old users on some pages) UsersDocModules=Document templates for documents generated from user record GroupsDocModules=Document templates for documents generated from a group record ##### HRM setup ##### From e4611f29502f5e311e45e6f2eefc23aeab796b45 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 03:36:33 +0200 Subject: [PATCH 340/456] Fix filter on categories --- htdocs/compta/facture/stats/index.php | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 8606e619740..284186b73ce 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -262,33 +262,33 @@ if ($mode == 'customer') $filter = 's.client in (1,2,3)'; if ($mode == 'supplier') $filter = 's.fournisseur = 1'; print $form->selectarray('socid', $companies, $socid, 1, 0, 0, 'style="width: 95%"', 0, 0, 0, '', '', 1); print ''; -if(! empty($conf->category->enabled) && $mode == 'customer') { - // Customer Category - print ''; -} + // ThirdParty Type print ''; + // Category -if ($mode == 'customer') -{ - $cat_type = Categorie::TYPE_CUSTOMER; - $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); +if (! empty($conf->category->enabled)) { + if ($mode == 'customer') + { + $cat_type = Categorie::TYPE_CUSTOMER; + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer")); + } + if ($mode == 'supplier') + { + $cat_type = Categorie::TYPE_SUPPLIER; + $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier")); + } + print ''; } -if ($mode == 'supplier') -{ - $cat_type = Categorie::TYPE_SUPPLIER; - $cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Supplier")); -} -print ''; + // User print ''; + print ''; print ''; print ''; print ''; print "\n"; - print "\n"; print ''; } From d9e26b8569404f2a47329c9a8ff26d5c0cd4af27 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Tue, 12 May 2020 08:38:03 +0200 Subject: [PATCH 342/456] fix template email on prpal list --- htdocs/comm/propal/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index eaeea9e3d43..522e8f5eaa3 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -468,7 +468,7 @@ if ($resql) print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail = "SendPropalRef"; - $modelmail = "proposal_send"; + $modelmail = "propal_send"; $objecttmp = new Propal($db); $trackid = 'pro'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; From 66beb7c14f9b88bb2aa1388f3f3a1356f80e460a Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Tue, 12 May 2020 10:17:47 +0200 Subject: [PATCH 343/456] FIX: Do not show stats panel if the user does not have permissions --- htdocs/comm/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index fcd3823b0c2..82e331eb623 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) - * Copyright (C) 2010-2014 Juanjo Menent + * Copyright (C) 2010-2020 Juanjo Menent * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2015-2019 Frédéric France * Copyright (C) 2015 Marcos García @@ -581,7 +581,7 @@ if ($object->id > 0) $boxstat .= '
    '.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
    '.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize, 1, 1).'
    '; + print ''; print $langs->trans("Type"); - print ''; + print ''; $multiselect = 0; if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list" { $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE)); } - print ''; - print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect); + print ''; + print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500'); print '
    '; + print ''; print $langs->trans("ActionsToDoBy").'   '; - print ''; - print img_picto('', 'user'); - print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print ''; + print img_picto('', 'user', 'class="fawidth30 inline-block"'); + print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500'); if (empty($conf->dol_optimize_smallscreen)) print '   '.$langs->trans("or").' '.$langs->trans("ToUserOfGroup").'   '; - print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit); + else print '
    '; + print img_picto('', 'object_group', 'class="fawidth30 inline-block"'); + print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500'); print '
    '; print $langs->trans("Resource"); - print ''; - print img_picto('', 'object_resource'); - print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2); + print ''; + print img_picto('', 'object_resource', 'class="fawidth30 inline-block"'); + print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500'); print '
    '; + print ''; print $langs->trans("ThirdParty").'   '; - print ''; - print img_picto('', 'company'); - print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0); + print ''; + print img_picto('', 'company', 'class="fawidth30 inline-block"'); + print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0, 'minwidth100 maxwidth500'); print '
    '; + print ''; print $langs->trans("Project").'   '; - print ''; - print img_picto('', 'project'); + print ''; + print img_picto('', 'project', 'class="fawidth30 inline-block"'); print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500'); print '
    '; + print ''; print $langs->trans("Status"); - print '  '; + print '  '; $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100'); print '
    '.$staticmember->getNomUrl(1, 32).''.$staticmember->getNomUrl(1, 32).''.$statictype->getNomUrl(1, 32).''.dol_print_date($db->jdate($obj->datem), 'dayhour').''.$staticmember->LibStatut($obj->statut, ($obj->subscription == 'yes' ? 1 : 0), $db->jdate($obj->date_end_subscription), 3).''.$subscriptionstatic->getNomUrl(1).''.$staticmember->getNomUrl(1, 32, 'subscription').''.get_date_range($db->jdate($obj->date_start), $db->jdate($obj->date_end)).''.$subscriptionstatic->getNomUrl(1).''.$staticmember->getNomUrl(1, 32, 'subscription').''.get_date_range($db->jdate($obj->date_start), $db->jdate($obj->date_end)).''.price($obj->subscription).''.$staticmember->LibStatut($obj->statut,($obj->subscription=='yes'?1:0),$db->jdate($obj->date_end_subscription),5).''.dol_print_date($db->jdate($obj->datem ? $obj->datem : $obj->datec), 'dayhour').''.dol_print_date($db->jdate($obj->datem ? $obj->datem : $obj->datec), 'dayhour').'
    '; - if ($nbofsubdir > 0 && $nboffilesinsubdir > 0) print '+'.$nboffilesinsubdir.' '; + if ($nbofsubdir > 0 && $nboffilesinsubdir > 0) print '+'.$nboffilesinsubdir.' '; print ''.img_edit($langs->trans("Edit").' - '.$langs->trans("View"), 0, 'class="valignmiddle opacitymedium"').'
    '; + print ''; print $langs->trans("Resource"); - print ''; + print ''; print img_picto('', 'object_resource', 'class="fawidth30 inline-block"'); print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500'); print '
    '.$langs->trans("VisibleTimeRange").''.$langs->trans("VisibleTimeRange").'"; print '
    '; print ''; diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php index 36d3fc854cc..4836ed1a0f1 100644 --- a/htdocs/resource/class/html.formresource.class.php +++ b/htdocs/resource/class/html.formresource.class.php @@ -101,10 +101,12 @@ class FormResource { //$minLength = (is_numeric($conf->global->RESOURCE_USE_SEARCH_TO_SELECT)?$conf->global->RESOURCE_USE_SEARCH_TO_SELECT:2); $out .= ajax_combobox($htmlname, $event, $conf->global->RESOURCE_USE_SEARCH_TO_SELECT); + } else { + $out .= ajax_combobox($htmlname); } // Construct $out and $outarray - $out .= ''."\n"; if ($showempty) $out .= ''."\n"; $num = 0; @@ -137,7 +139,6 @@ class FormResource } } $out .= ''."\n"; - $out .= ajax_combobox($htmlname); if ($outputmode != 2) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index dc0c77ed67d..8a21844ca7c 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1899,8 +1899,8 @@ div.tmenuleft } div.tmenucenter { - padding-left: 0px; - padding-right: 3px; + padding-left: 2px; + padding-right: 2px; padding-top: 8px; height: 26px; @@ -3600,6 +3600,12 @@ ul.noborder li:nth-child(even):not(.liste_titre) { @media only screen and (max-width: 767px) { + a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active { + padding: 0px 0px 0px 0px; + } + a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { + padding: 0px 0px 0px 0px; + } .boxstats, .boxstats130 { margin: 3px; } @@ -4882,7 +4888,7 @@ ul.ecmjqft li { ul.ecmjqft a { line-height: 24px; vertical-align: middle; - color: #333; + color: unset; padding: 0px 0px; font-weight:normal; display: inline-block !important; diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 7f62fe39689..3138cd8bfd9 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -15,10 +15,11 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> display: block; position: relative; min-height: 90px; - background: #fff; + /* background: #fff; */ width: 100%; - box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2), 0px 0px 2px rgba(0, 0, 0, 0.1); - border-radius: 2px; + box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); + border-radius: 2px; + border: 1px solid #eee; margin-bottom: 15px; } .info-box.info-box-sm{ @@ -67,7 +68,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> text-align: center; font-size: 45px; line-height: 90px; - background: rgba(0, 0, 0, 0.2); + background: rgba(0, 0, 0, 0.08) !important } .info-box-sm .info-box-icon { height: 80px; @@ -203,8 +204,6 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES .info-box-icon { color: #fff !important; - - background-color: #eee !important; opacity: 0.95; } From 65011c28771601aab882785dd0b1621a6c1f994d Mon Sep 17 00:00:00 2001 From: Tim Otte Date: Mon, 11 May 2020 15:11:23 +0200 Subject: [PATCH 327/456] Fixed the product unit translation --- htdocs/product/card.php | 2 +- htdocs/product/class/product.class.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 87e86e8e0bc..d58e5f8f742 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -2099,7 +2099,7 @@ else print '
    '.$langs->trans('DefaultUnitToShow').''; if ($unit !== '') { - print $langs->trans($unit); + print $unit; } print '
    '.$langs->trans("AGENDA_DEFAULT_FILTER_TYPE").' '."\n"; -$formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1); +$multiselect = 0; +if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) { + // We use an option here because it adds bugs when used on agenda page "peruser" and "list" + $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE)); +} +$formactions->select_type_actions($conf->global->AGENDA_DEFAULT_FILTER_TYPE, "AGENDA_DEFAULT_FILTER_TYPE", '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 1, $multiselect); print '
    '.$langs->trans('DefaultUnitToShow').''; if ($unit !== '') { - print $unit; + print $langs->trans($unit); } print '
    '.$langs->trans("CustomersProspectsCategoriesShort").''; - $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1); - print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%"); - print '
    '.$langs->trans("ThirdPartyType").''; $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print '
    '.$cat_label.''; + $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1); + print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%"); + //print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); + print '
    '.$cat_label.''; -print $formother->select_categories($cat_type, $categ_id, 'categ_id', true); -print '
    '.$langs->trans("CreatedBy").''; print $form->select_dolusers($userid, 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); From 0dccc9cbeb734ebdba69ed29354ec42fc7d3677f Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 12 May 2020 07:27:20 +0200 Subject: [PATCH 341/456] Debug colspan --- htdocs/accountancy/bookkeeping/balance.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 7b99057f73a..85562ebc268 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -302,12 +302,11 @@ if ($action != 'export_csv') if (empty($displayed_account) || $root_account_description != $displayed_account) { // Affiche un Sous-Total par compte comptable if ($displayed_account != "") { - print '
    ' . $langs->trans("SubTotal") . ':
    ' . $langs->trans("SubTotal") . ':' . price($sous_total_debit) . '' . price($sous_total_credit) . '' . price(price2num($sous_total_credit - $sous_total_debit)) . '
    '; $boxstat .= ' + $html .= ' - - - - '; + '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'

    '.$product->description_short->language[$this->lang - 1].''; + // do not load if display none + //$html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; } return $html; } From 410694100d911de889d06f59f43756e6df849b4e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 23:42:01 +0200 Subject: [PATCH 351/456] CSS --- htdocs/theme/eldy/global.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 68e16afecd0..ef39d38a568 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1707,6 +1707,7 @@ div.statusref { margin-top: 8px; margin-bottom: 10px; clear: both; + text-align: right; } div.statusref img { padding-left: 8px; From 63d6b3c47d5629082628cfd08d1a15ad13309149 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 23:44:50 +0200 Subject: [PATCH 352/456] Look and feel v12 --- htdocs/contrat/card.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 25857767e80..9f825cdf009 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1452,7 +1452,7 @@ else print '
    '; - if (!empty($conf->propal->enabled)) + if (!empty($conf->propal->enabled) && $user->rights->propal->lire) { // Box proposals $tmp = $object->getOutstandingProposals(); @@ -599,7 +599,7 @@ if ($object->id > 0) if ($link) $boxstat .= ''; } - if (!empty($conf->commande->enabled)) + if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { // Box commandes $tmp = $object->getOutstandingOrders(); @@ -617,7 +617,7 @@ if ($object->id > 0) if ($link) $boxstat .= ''; } - if (!empty($conf->facture->enabled)) + if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { // Box factures $tmp = $object->getOutstandingBills(); From e1db0ef855173bffda16735f7c4a836c8de68a50 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 12 May 2020 10:57:51 +0200 Subject: [PATCH 344/456] Update index.php --- htdocs/comm/mailing/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index 61187f2e647..6b765d9451f 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -157,6 +157,7 @@ print '
    '; $limit = 10; $sql = "SELECT m.rowid, m.titre, m.nbemail, m.statut, m.date_creat"; $sql .= " FROM ".MAIN_DB_PREFIX."mailing as m"; +$sql .= " WHERE m.entity = ".$conf->entity; $sql .= " ORDER BY m.date_creat DESC"; $sql .= " LIMIT ".$limit; $result = $db->query($sql); From c89e8efec354070f055504c64c11e49fe1827320 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 14:08:28 +0200 Subject: [PATCH 345/456] responsive --- htdocs/takepos/css/pos.css.php | 3 +++ htdocs/takepos/index.php | 9 +++++++-- htdocs/takepos/invoice.php | 2 +- htdocs/theme/eldy/global.inc.php | 1 + htdocs/theme/md/style.css.php | 1 + 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index 5f0006d24fe..6871fcbd68b 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -591,6 +591,9 @@ div#moreinfo, div#infowarehouse { height: calc(45% - 100px); } + div#moreinfo, div#infowarehouse { + padding: 0 5px 0 5px; + } div.div1 { padding-bottom: 0; diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 0688d4a8584..8da96df54d0 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -756,8 +756,13 @@ if (empty($conf->global->TAKEPOS_HIDE_HEAD_BAR)) {
    -
    - trans("Terminal")." "; +
    + + + + trans("Terminal"); ?> + + - '.dol_print_date(dol_now(), "day").''; diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index b1641072829..9f0e6649cf6 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -747,7 +747,7 @@ $( document ).ready(function() { $("#customerandsales").html(''); - $("#customerandsales").append(''); + $("#customerandsales").append(''); global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) { diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 40e8c5e27b4..c7ce5709efd 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1119,6 +1119,7 @@ table[summary="list_of_modules"] .fa-cog { .clearboth { clear:both; } .hideobject { display: none; } .minwidth50 { min-width: 50px; } +.minwidth75 { min-width: 75px; } /* rule for not too small screen only */ @media only screen and (min-width: px) { From e9c405182d07497ed177b60377f44c5f225ff30a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 14:18:31 +0200 Subject: [PATCH 346/456] css --- htdocs/theme/eldy/main_menu_fa_icons.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/main_menu_fa_icons.inc.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php index 5b9395fbc04..c344838458d 100644 --- a/htdocs/theme/eldy/main_menu_fa_icons.inc.php +++ b/htdocs/theme/eldy/main_menu_fa_icons.inc.php @@ -8,7 +8,7 @@ font-style: normal; font-variant: normal; text-rendering: auto; - line-height: 26px; + line-height: 23px; font-size: ; -webkit-font-smoothing: antialiased; text-align:center; From a6708009d790003f14320cfbcdadc972661d494e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 12 May 2020 14:53:03 +0200 Subject: [PATCH 347/456] Add option PROJECT_OPEN_ALWAYS_ON_TAB --- htdocs/projet/class/project.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 1ee17511304..554bc84766a 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1044,6 +1044,9 @@ class Project extends CommonObject if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips $result = ''; + if (! empty($conf->global->PROJECT_OPEN_ALWAYS_ON_TAB)) { + $option = $conf->global->PROJECT_OPEN_ALWAYS_ON_TAB; + } $label = ''; if ($option != 'nolink') $label = ''.$langs->trans("Project").''; @@ -1073,6 +1076,10 @@ class Project extends CommonObject { $url = DOL_URL_ROOT.'/projet/tasks.php?id='.$this->id; } + elseif ($option == 'preview') + { + $url = DOL_URL_ROOT.'/projet/element.php?id='.$this->id; + } else { $url = DOL_URL_ROOT.'/projet/card.php?id='.$this->id; From 8bd1179b8207671f4d33d8f6d156c453b7bf8239 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Tue, 12 May 2020 17:03:24 +0200 Subject: [PATCH 348/456] Update qr.php --- htdocs/takepos/genimg/qr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index 99f7fced1d0..3f27464f5ca 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -33,4 +33,4 @@ $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', t $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file $module = new modTcpdfbarcode($db); -$result = $module->buildBarCode($urlwithroot."/takepos/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y'); +$result = $module->buildBarCode($urlwithroot."/takepos/public/auto_order.php?key=".dol_encode($key), 'QRCODE', 'Y'); From fc2f2c6da71b6c4f7f0b16216f0fba320b52ba1d Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 12 May 2020 17:41:21 +0200 Subject: [PATCH 349/456] FIX : wrong url param --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 9fa696c69b3..cb3aa9cd099 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4837,7 +4837,7 @@ elseif ($id > 0 || ! empty($ref)) { if (! $objectidnext) { - print ''; + print ''; } } From 366ae2f116cfaaed73e07a4b06d0a596ded92582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 12 May 2020 18:44:26 +0200 Subject: [PATCH 350/456] Update dolistore.class.php --- .../admin/dolistore/class/dolistore.class.php | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 230c588f7e4..a229f3c985d 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -248,11 +248,8 @@ class Dolistore // phpcs:enable global $langs, $conf; $html = ""; - $parity = "pair"; $last_month = time() - (30 * 24 * 60 * 60); foreach ($this->products as $product) { - $parity = ($parity == "impair") ? 'pair' : 'impair'; - // check new product ? $newapp = ''; if ($last_month < strtotime($product->date_add)) { @@ -267,7 +264,7 @@ class Dolistore // add image or default ? if ($product->id_default_image != '') { $image_url = DOL_URL_ROOT.'/admin/dolistore/ajax/image.php?id_product='.$product->id.'&id_image='.$product->id_default_image; - $images = ''; + $images = ''; $images .= ''; } else { $images = ''; @@ -306,16 +303,16 @@ class Dolistore //.'
    '.$langs->trans("SeeInMarkerPlace").' //output template - $html .= '
    '.$newapp.$images.'

    '.$product->name->language[$this->lang - 1] .'
    '.$version.'

    - '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.$product->reference.' - '.$langs->trans('Id').': '.$product->id.'

    '.$product->description_short->language[$this->lang - 1].'
    '.$price.' - '.$download_link.'
    '.$price.''.$download_link.'
    '; - // Ligne info remises tiers + // Line info of thirdparty discounts print ''; } print ''; print ''; From b5f3be4599f9f56c30c63297643c88da8d75e956 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 May 2020 00:29:46 +0200 Subject: [PATCH 353/456] Clean phpcs rule file --- dev/setup/codesniffer/ruleset.xml | 77 +++++++++---------- htdocs/compta/bank/class/account.class.php | 3 +- htdocs/product/stats/commande_fournisseur.php | 4 +- htdocs/webservices/server_actioncomm.php | 6 +- 4 files changed, 43 insertions(+), 47 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index ad26c7f0bdc..41526340daf 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -272,12 +272,7 @@ - - - - - - + 0 @@ -310,20 +305,21 @@ - - + 0 - + 0 + - 0 + 0 - + + 0 @@ -332,27 +328,25 @@ - + 0 - + + 0 - - 0 - + + + - 0 + 0 - - 0 - - - 0 - + + + @@ -361,26 +355,26 @@ 0 + - 0 + 0 - + 0 + - - 0 - + 0 0 - + 0 @@ -391,16 +385,16 @@ + + 0 + - - - - + 0 @@ -411,7 +405,6 @@ 0 - 0 @@ -421,15 +414,21 @@ - - - - - + + + + + + + + + + + diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 58115537b1f..3fcbffba3b2 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1672,8 +1672,7 @@ class Account extends CommonObject //Replace the old AccountNumber key with the new BankAccountNumber key $fieldlists = explode( ' ', - preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber', - $conf->global->BANK_SHOW_ORDER_OPTION) + preg_replace('/ ?[^Bank]AccountNumber ?/', 'BankAccountNumber', $conf->global->BANK_SHOW_ORDER_OPTION) ); } } diff --git a/htdocs/product/stats/commande_fournisseur.php b/htdocs/product/stats/commande_fournisseur.php index 61024cdd7ff..c111e075972 100644 --- a/htdocs/product/stats/commande_fournisseur.php +++ b/htdocs/product/stats/commande_fournisseur.php @@ -44,9 +44,7 @@ if (!empty($user->socid)) $result = restrictedArea($user, 'produit|service', $fieldvalue, 'product&product', '', '', $fieldtype); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array( - 'productstatssupplyorder' -)); +$hookmanager->initHooks(array('productstatssupplyorder')); $mesg = ''; diff --git a/htdocs/webservices/server_actioncomm.php b/htdocs/webservices/server_actioncomm.php index bc3d4a78c6a..39ed3b3cdf5 100644 --- a/htdocs/webservices/server_actioncomm.php +++ b/htdocs/webservices/server_actioncomm.php @@ -153,8 +153,8 @@ $server->wsdl->addComplexType( 'sequence', '', array( - 'code' => array('name'=>'code', 'type'=>'xsd:string'), - 'libelle' => array('name'=>'libelle', 'type'=>'xsd:string') + 'code' => array('name'=>'code', 'type'=>'xsd:string'), + 'libelle' => array('name'=>'libelle', 'type'=>'xsd:string') ) ); @@ -164,7 +164,7 @@ $server->wsdl->addComplexType( 'array', 'sequence', '', - array( + array( 'actioncommtype' => array( 'name' => 'actioncommtype', 'type' => 'tns:actioncommtype', From 22301d63d8fedaa2607167232b4ac4df76cd9593 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 May 2020 00:35:10 +0200 Subject: [PATCH 354/456] Replace a ZEND phpcs rule with a PSR2 rule --- dev/setup/codesniffer/ruleset.xml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 41526340daf..e726df6db7c 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -424,11 +424,7 @@ - - - - - + From f0d14662b996b082c701db2318157f9f86d7c957 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 May 2020 00:38:12 +0200 Subject: [PATCH 355/456] Fix scrutinizer --- htdocs/takepos/genimg/qr.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/genimg/qr.php b/htdocs/takepos/genimg/qr.php index c73e874a465..c4d60a52c1b 100644 --- a/htdocs/takepos/genimg/qr.php +++ b/htdocs/takepos/genimg/qr.php @@ -29,5 +29,5 @@ require '../../core/modules/barcode/doc/tcpdfbarcode.modules.php'; $key = GETPOST('key'); -$module = new modTcpdfbarcode($db); +$module = new modTcpdfbarcode(); $result = $module->buildBarCode("http://www.takepos.com", 'QRCODE', 'Y'); From ebbd4413f5985def5e726d974c761e193473d442 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 May 2020 00:47:27 +0200 Subject: [PATCH 356/456] Fix scrutinizer error --- htdocs/accountancy/admin/account.php | 2 +- .../class/accountingaccount.class.php | 17 ++++++----------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 86981e5b5de..cf00519e9d7 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -161,7 +161,7 @@ if (empty($reshook)) if ($action == 'disable') { if ($accounting->fetch($id)) { $mode = GETPOST('mode', 'int'); - $result = $accounting->account_desactivate($id, $mode); + $result = $accounting->accountDeactivate($id, $mode); } $action = 'update'; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index a32918cc5bf..bcd17793db1 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -553,24 +553,19 @@ class AccountingAccount extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Account deactivated + * Deactivate an account (for status active or status reconcilable) * * @param int $id Id - * @param int $mode 0=field active, 1=field active_customer_list, 2=field_active_supplier_list + * @param int $mode 0=field active, 1=field reconcilable * @return int <0 if KO, >0 if OK */ - public function account_desactivate($id, $mode = 0) + public function accountDeactivate($id, $mode = 0) { - // phpcs:enable $result = $this->checkUsage(); - if ($mode == 0) - { - $fieldtouse = 'active'; - } - elseif ($mode == 1) + $fieldtouse = 'active'; + if ($mode == 1) { $fieldtouse = 'reconcilable'; } @@ -582,7 +577,7 @@ class AccountingAccount extends CommonObject $sql .= "SET ".$fieldtouse." = '0'"; $sql .= " WHERE rowid = ".$this->db->escape($id); - dol_syslog(get_class($this)."::account_desactivate ".$fieldtouse." sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::accountDeactivate ".$fieldtouse." sql=".$sql, LOG_DEBUG); $result = $this->db->query($sql); if ($result) { From 0850570e951e98b1b50de544844f9a19e669a97a Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Tue, 12 May 2020 13:15:49 +0200 Subject: [PATCH 357/456] Fix and imporve some points for compta/accounting-flles.php * Fix zip generation for accouning-files if line has no document. The zip file generated if $filesarray contain a line with empty 'files' was unsustainable because it try to add empty files. * Add clickable link to jump on card for other line than Invoice and Supplier Invoice * Add various payment * Use label as ref for paiements of salaries line to display more explicit line --- htdocs/compta/accounting-files.php | 64 +++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 471637461f6..9c26cc0999c 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -37,8 +37,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php' require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; -$langs->loadLangs(array("accountancy", "bills", "companies", "salaries", "compta", "trips")); +$langs->loadLangs(array("accountancy", "bills", "companies", "salaries", "compta", "trips", "banks")); $date_start = GETPOST('date_start', 'alpha'); $date_startDay = GETPOST('date_startday', 'int'); @@ -176,7 +178,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Paiements of salaries if (GETPOST('selectpaymentsofsalaries')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.ref as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, t.datep as date, t.dateep as date_due, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum"; + $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, t.datep as date, t.dateep as date_due, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country"; $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -191,6 +193,14 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT; } + // Various payments + if (GETPOST('selectvariouspayment')) { + if (!empty($sql)) $sql .= " UNION ALL"; + $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.datec as date, t.datep as date_due, 'VariousPayment' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum"; + $sql .= " FROM ".MAIN_DB_PREFIX."payment_various as t"; + $sql .= " WHERE datec between ".$wheretail; + $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; + } if ($sql) { $sql .= $db->order($sortfield, $sortorder); @@ -254,6 +264,12 @@ if (($action == 'searchfiles' || $action == 'dl')) { $upload_dir = $conf->tax->dir_output.'/'.$subdir; $link = "document.php?modulepart=tax&file=".str_replace('/', '%2F', $subdir).'%2F'; break; + case "VariousPayment": + $subdir = ''; + $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->id); + $upload_dir = $conf->bank->dir_output.'/'.$subdir; + $link = "document.php?modulepart=banque&file=".str_replace('/', '%2F', $subdir).'%2F'; + break; default: $subdir = ''; $upload_dir = ''; @@ -394,11 +410,13 @@ if ($result && $action == "dl" && !$error) { foreach ($filesarray as $key => $file) { - foreach ($file['files'] as $filecursor) { - if (file_exists($filecursor["fullname"])) { - $zip->addFile($filecursor["fullname"], $filecursor["relpathnamelang"]); - } - } + if (!empty($file['files'])) { + foreach ($file['files'] as $filecursor) { + if (file_exists($filecursor["fullname"])) { + $zip->addFile($filecursor["fullname"], $filecursor["relpathnamelang"]); + } + } + } $log .= '"'.$langs->trans($file['item']).'"'; if (!empty($conf->multicompany->enabled) && is_object($mc)) @@ -448,6 +466,11 @@ $form = new Form($db); $userstatic = new User($db); $invoice = new Facture($db); $supplier_invoice = new FactureFournisseur($db); +$expensereport = new ExpenseReport($db); +$don = new Don($db); +$salary_payment = new PaymentSalary($db); +$charge_sociales = new ChargeSociales($db); +$various_payment = new PaymentVarious($db); $title = $langs->trans("ComptaFiles").' - '.$langs->trans("List"); $help_url = ''; @@ -492,7 +515,8 @@ $listofchoices = array( 'selectexpensereports'=>array('label'=>'ExpenseReports', 'lang'=>'trips'), 'selectdonations'=>array('label'=>'Donations', 'lang'=>'donation'), 'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'lang'=>'salaries'), - 'selectsocialcontributions'=>array('label'=>'SocialContributions') + 'selectsocialcontributions'=>array('label'=>'SocialContributions'), + 'selectvariouspayment'=>array('label'=>'VariousPayment') ); foreach ($listofchoices as $choice => $val) { $checked = (((!GETPOSTISSET('search') && $action != 'searchfiles') || GETPOST($choice)) ? ' checked="checked"' : ''); @@ -592,14 +616,34 @@ if (!empty($date_start) && !empty($date_stop)) // Ref print ''; // File link From 48183b396ad674fb22e1c9415978d8414b0fd9e8 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 13 May 2020 08:54:42 +0200 Subject: [PATCH 359/456] Fix top menu search method must be GET --- htdocs/main.inc.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 8e05aa34ab8..2beb4f74787 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2002,7 +2002,7 @@ function top_menu_search() $defaultAction = ''; $buttonList = ''; + print ''; + $extrafields_collapse_num_old = $extrafields_collapse_num; print '
    '.$langs->trans('Discount').''; if ($object->thirdparty->remise_percent) print $langs->trans("CompanyHasRelativeDiscount", $object->thirdparty->remise_percent); else print $langs->trans("CompanyHasNoRelativeDiscount"); @@ -1502,8 +1502,6 @@ else } - $colorb = '666666'; - $arrayothercontracts = $object->getListOfContracts('others'); /* @@ -1775,8 +1773,8 @@ else print ''; - print ''; - print '
    '; + print ''; + print '
    '; print '
    '; - if ($data['item'] == 'Invoice') { - $invoice->id = $data['id']; + if ($data['item'] == 'Invoice') { + $invoice->id = $data['id']; $invoice->ref = $data['ref']; print $invoice->getNomUrl(1, '', 0, 0, '', 0, 0, 0); } elseif ($data['item'] == 'SupplierInvoice') { $supplier_invoice->id = $data['id']; $supplier_invoice->ref = $data['ref']; print $supplier_invoice->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + } elseif ($data['item'] == 'ExpenseReport') { + $expensereport->id = $data['id']; + $expensereport->ref = $data['ref']; + print $expensereport->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + } elseif ($data['item'] == 'SalaryPayment') { + $salary_payment->id = $data['id']; + $salary_payment->ref = $data['ref']; + print $salary_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + } elseif ($data['item'] == 'Donation') { + $don->id = $data['id']; + $don->ref = $data['ref']; + print $don->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + } elseif ($data['item'] == 'SocialContributions') { + $charge_sociales->id = $data['id']; + $charge_sociales->ref = $data['ref']; + print $charge_sociales->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + } elseif ($data['item'] == 'VariousPayment') { + $various_payment->id = $data['id']; + $various_payment->ref = $data['ref']; + print $various_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); } else { print $data['ref']; } From b7ae5ffa1d085661bed4906ad4540562e6134219 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 13 May 2020 06:12:45 +0000 Subject: [PATCH 358/456] Fixing style errors. --- htdocs/compta/accounting-files.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 9c26cc0999c..66d36df25b2 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -616,37 +616,37 @@ if (!empty($date_start) && !empty($date_stop)) // Ref print ''; - if ($data['item'] == 'Invoice') { - $invoice->id = $data['id']; + if ($data['item'] == 'Invoice') { + $invoice->id = $data['id']; $invoice->ref = $data['ref']; print $invoice->getNomUrl(1, '', 0, 0, '', 0, 0, 0); - } elseif ($data['item'] == 'SupplierInvoice') { + } elseif ($data['item'] == 'SupplierInvoice') { $supplier_invoice->id = $data['id']; $supplier_invoice->ref = $data['ref']; print $supplier_invoice->getNomUrl(1, '', 0, 0, '', 0, 0, 0); - } elseif ($data['item'] == 'ExpenseReport') { + } elseif ($data['item'] == 'ExpenseReport') { $expensereport->id = $data['id']; $expensereport->ref = $data['ref']; print $expensereport->getNomUrl(1, '', 0, 0, '', 0, 0, 0); - } elseif ($data['item'] == 'SalaryPayment') { + } elseif ($data['item'] == 'SalaryPayment') { $salary_payment->id = $data['id']; $salary_payment->ref = $data['ref']; print $salary_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); - } elseif ($data['item'] == 'Donation') { + } elseif ($data['item'] == 'Donation') { $don->id = $data['id']; $don->ref = $data['ref']; print $don->getNomUrl(1, '', 0, 0, '', 0, 0, 0); - } elseif ($data['item'] == 'SocialContributions') { + } elseif ($data['item'] == 'SocialContributions') { $charge_sociales->id = $data['id']; $charge_sociales->ref = $data['ref']; print $charge_sociales->getNomUrl(1, '', 0, 0, '', 0, 0, 0); - } elseif ($data['item'] == 'VariousPayment') { + } elseif ($data['item'] == 'VariousPayment') { $various_payment->id = $data['id']; $various_payment->ref = $data['ref']; print $various_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); - } else { + } else { print $data['ref']; - } + } print '
    '; print ''; print ''; - print '\n"; From 872518a91fa2f30318f298c5bb630af616ee32e4 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 13 May 2020 16:54:53 +0200 Subject: [PATCH 366/456] Add total by credit/debit for accounting-file.php --- htdocs/compta/accounting-files.php | 104 ++++++++++++++++------------- 1 file changed, 56 insertions(+), 48 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 98d8c9b9983..64332671b5d 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -42,6 +42,10 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +// Constant to define payment sens +const PAY_DEBIT = 0; +const PAY_CREDIT = 1; + $langs->loadLangs(array("accountancy", "bills", "companies", "salaries", "compta", "trips", "banks")); $date_start = GETPOST('date_start', 'alpha'); @@ -144,7 +148,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Customer invoices if (GETPOST('selectinvoices')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total as total_ht, t.total_ttc, t.tva as total_vat, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum"; + $sql .= "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total as total_ht, t.total_ttc, t.tva as total_vat, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum, ".PAY_CREDIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays"; $sql .= " WHERE datef between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -153,7 +157,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Vendor invoices if (GETPOST('selectsupplierinvoices')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum"; + $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays"; $sql .= " WHERE datef between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -162,7 +166,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Expense reports if (GETPOST('selectexpensereports')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.fk_user_author as fk_soc, t.date_fin as date, t.date_fin as date_due, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum"; + $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.fk_user_author as fk_soc, t.date_fin as date, t.date_fin as date_due, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user_author LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country"; $sql .= " WHERE date_fin between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -171,7 +175,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Donations if (GETPOST('selectdonations')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, t.datedon as date, t.datedon as date_due, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum"; + $sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, t.datedon as date, t.datedon as date_due, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_CREDIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."don as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = t.fk_country"; $sql .= " WHERE datedon between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -180,7 +184,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Paiements of salaries if (GETPOST('selectpaymentsofsalaries')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, t.datep as date, t.dateep as date_due, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum"; + $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, t.datep as date, t.dateep as date_due, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country"; $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -189,7 +193,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Social contributions if (GETPOST('selectsocialcontributions')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, t.paye as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.date_creation as date, t.date_ech as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum"; + $sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, t.paye as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.date_creation as date, t.date_ech as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as t"; $sql .= " WHERE date_creation between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -198,7 +202,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Various payments if (GETPOST('selectvariouspayment')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.datep as date, t.datep as date_due, 'VariousPayment' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum"; + $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.datep as date, t.datep as date_due, 'VariousPayment' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, sens"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_various as t"; $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -311,6 +315,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $nofile['thirdparty_code'] = $objd->thirdparty_code; $nofile['country_code'] = $objd->country_code; $nofile['vatnum'] = $objd->vatnum; + $nofile['sens'] = $objd->sens; $filesarray[$nofile['item'].'_'.$nofile['id']] = $nofile; } @@ -329,11 +334,11 @@ if (($action == 'searchfiles' || $action == 'dl')) { $file['ref'] = ($objd->ref ? $objd->ref : $objd->id); $file['fk'] = $objd->fk_soc; $file['item'] = $objd->item; - $file['thirdparty_name'] = $objd->thirdparty_name; $file['thirdparty_code'] = $objd->thirdparty_code; $file['country_code'] = $objd->country_code; $file['vatnum'] = $objd->vatnum; + $file['sens'] = $objd->sens; // Save record into array (only the first time it is found) if (empty($filesarray[$file['item'].'_'.$file['id']])) { @@ -417,7 +422,8 @@ if ($result && $action == "dl" && !$error) $log .= ','.$langs->transnoentitiesnoconv("ThirdParty"); $log .= ','.$langs->transnoentitiesnoconv("Code"); $log .= ','.$langs->transnoentitiesnoconv("Country"); - $log .= ','.$langs->transnoentitiesnoconv("VATIntra")."\n"; + $log .= ','.$langs->transnoentitiesnoconv("VATIntra"); + $log .= ','.$langs->transnoentitiesnoconv("Sens")."\n"; $zipname = $dirfortmpfile.'/'.dol_print_date($date_start, 'dayrfc')."-".dol_print_date($date_stop, 'dayrfc').'_export.zip'; dol_delete_file($zipname); @@ -454,6 +460,7 @@ if ($result && $action == "dl" && !$error) $log .= ',"'.$file['thirdparty_code'].'"'; $log .= ',"'.$file['country_code'].'"'; $log .= ',"'.$file['vatnum'].'"'; + $log .= ',"'.$file['sens'].'"'; $log .= "\n"; } $zip->addFromString('transactions.csv', $log); @@ -605,11 +612,12 @@ if (!empty($date_start) && !empty($date_stop)) { // Sort array by date ASC to calculate balance - $totalET = 0; - $totalIT = 0; - $totalVAT = 0; - $totalDebit = 0; - $totalCredit = 0; + $totalET_debit = 0; + $totalIT_debit = 0; + $totalVAT_debit = 0; + $totalET_credit = 0; + $totalIT_credit = 0; + $totalVAT_credit = 0; // Display array foreach ($TData as $data) @@ -682,11 +690,11 @@ if (!empty($date_start) && !empty($date_stop)) print ''; // Total ET - print '\n"; + print '\n"; // Total IT - print '\n"; + print '\n"; // Total VAT - print '\n"; + print '\n"; print '\n"; @@ -696,42 +704,42 @@ if (!empty($date_start) && !empty($date_stop)) print '\n"; - // Debit - //print '\n"; - // Credit - //print '\n"; - - $totalET += $data['amount_ht']; - $totalIT += $data['amount_ttc']; - $totalVAT += $data['amount_vat']; - - $totalDebit += ($data['amount_ttc'] > 0) ? abs($data['amount_ttc']) : 0; - $totalCredit += ($data['amount_ttc'] > 0) ? 0 : abs($data['amount_ttc']); - - // Balance - //print '\n"; + if ($data['sens']) { + $totalET_credit += $data['amount_ht']; + $totalIT_credit += $data['amount_ttc']; + $totalVAT_credit += $data['amount_vat']; + } else { + $totalET_debit -= $data['amount_ht']; + $totalIT_debit -= $data['amount_ttc']; + $totalVAT_debit -= $data['amount_vat']; + } print "\n"; } + // Total credits print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - /*print ''; - print ''; - print ''; - */ + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + // Total debits + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + // Balance + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print "\n"; } } From ee6e717f4632716ce1e4d6a12301882b17850524 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 13 May 2020 17:47:30 +0200 Subject: [PATCH 367/456] Add payment loan in accounting-files.php --- htdocs/compta/accounting-files.php | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 64332671b5d..a97a0a815b7 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -41,12 +41,13 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; // Constant to define payment sens const PAY_DEBIT = 0; const PAY_CREDIT = 1; -$langs->loadLangs(array("accountancy", "bills", "companies", "salaries", "compta", "trips", "banks")); +$langs->loadLangs(array("accountancy", "bills", "companies", "salaries", "compta", "trips", "banks", "loan")); $date_start = GETPOST('date_start', 'alpha'); $date_startDay = GETPOST('date_startday', 'int'); @@ -207,6 +208,14 @@ if (($action == 'searchfiles' || $action == 'dl')) { $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; } + // Loan payments + if (GETPOST('selectloanspayment')) { + if (!empty($sql)) $sql .= " UNION ALL"; + $sql .= " SELECT t.rowid as id, l.entity, l.label as ref, 1 as paid, (t.amount_capital+t.amount_insurance+t.amount_interest) as total_ht, (t.amount_capital+t.amount_insurance+t.amount_interest) as total_ttc, 0 as total_tva, 0 as fk_soc, t.datep as date, t.datep as date_due, 'LoanPayment' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; + $sql .= " FROM ".MAIN_DB_PREFIX."payment_loan as t LEFT JOIN ".MAIN_DB_PREFIX."loan as l ON l.rowid = t.fk_loan"; + $sql .= " WHERE datep between ".$wheretail; + $sql .= " AND l.entity IN (".($entity == 1 ? '0,1' : $entity).')'; + } if ($sql) { $sql .= $db->order($sortfield, $sortorder); @@ -283,6 +292,13 @@ if (($action == 'searchfiles' || $action == 'dl')) { $link = "document.php?modulepart=banque&file=".str_replace('/', '%2F', $subdir).'%2F'; $modulepart = "banque"; break; + case "LoanPayment": + // Loan payment has no linked file + $subdir = ''; + $upload_dir = $conf->loan->dir_output.'/'.$subdir; + $link = ""; + $modulepart = ""; + break; default: $subdir = ''; $upload_dir = ''; @@ -497,6 +513,7 @@ $don = new Don($db); $salary_payment = new PaymentSalary($db); $charge_sociales = new ChargeSociales($db); $various_payment = new PaymentVarious($db); +$payment_loan = new PaymentLoan($db); $title = $langs->trans("ComptaFiles").' - '.$langs->trans("List"); $help_url = ''; @@ -542,7 +559,8 @@ $listofchoices = array( 'selectdonations'=>array('label'=>'Donations', 'lang'=>'donation'), 'selectpaymentsofsalaries'=>array('label'=>'SalariesPayments', 'lang'=>'salaries'), 'selectsocialcontributions'=>array('label'=>'SocialContributions'), - 'selectvariouspayment'=>array('label'=>'VariousPayment') + 'selectvariouspayment'=>array('label'=>'VariousPayment'), + 'selectloanspayment'=>array('label'=>'PaymentLoan'), ); foreach ($listofchoices as $choice => $val) { $checked = (((!GETPOSTISSET('search') && $action != 'searchfiles') || GETPOST($choice)) ? ' checked="checked"' : ''); @@ -671,6 +689,10 @@ if (!empty($date_start) && !empty($date_stop)) $various_payment->id = $data['id']; $various_payment->ref = $data['ref']; print $various_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + } elseif ($data['item'] == 'LoanPayment') { + $payment_loan->id = $data['id']; + $payment_loan->ref = $data['ref']; + print $payment_loan->getNomUrl(1, '', 0, 0, '', 0, 0, 0); } else { print $data['ref']; } From ac0b735131af206c67d34420ed38a3fff43a8482 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 13 May 2020 18:01:00 +0200 Subject: [PATCH 368/456] Fix use date_ech for social contributions in accounting-file.php --- htdocs/compta/accounting-files.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index a97a0a815b7..f9bc453d999 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -194,9 +194,9 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Social contributions if (GETPOST('selectsocialcontributions')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, t.paye as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.date_creation as date, t.date_ech as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; + $sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, t.paye as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.date_ech as date, t.periode as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as t"; - $sql .= " WHERE date_creation between ".$wheretail; + $sql .= " WHERE t.date_ech between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; //$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT; } From 9f6a5d4cc95097e92eeb94d6524add35ae3a5c3d Mon Sep 17 00:00:00 2001 From: ATM john Date: Thu, 14 May 2020 10:50:20 +0200 Subject: [PATCH 369/456] Fix multicompany supplier product price filter --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 93061d200d8..078cfb2b5f2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2759,7 +2759,7 @@ class Form } if (!empty($conf->barcode->enabled)) $sql .= ", pfp.barcode"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON ( p.rowid = pfp.fk_product AND pfp.entity IN (".getEntity('product').") )"; if ($socid) $sql .= " AND pfp.fk_soc = ".$socid; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid"; // Units From 1bd00b0e8c635db1a8348c97d3933699b92d88db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 12:28:17 +0200 Subject: [PATCH 370/456] Fix to solve feedbacks of https://www.dolibarr.fr/forum/t/email-collector-avec-office-365-bug-et-contournement/32726 --- .../class/emailcollector.class.php | 20 +++++++++++++++---- .../install/mysql/migration/11.0.0-12.0.0.sql | 2 ++ .../llx_emailcollector_emailcollector.sql | 3 ++- htdocs/langs/en_US/admin.lang | 1 + 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 11cf2477720..969b83cac5a 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -100,8 +100,9 @@ class EmailCollector extends CommonObject 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'help'=>'Example: MyCollector1'), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'), 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1), - 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'), - 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), + 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'), + 'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)'), + 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), 'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'), 'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'), //'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105), @@ -173,6 +174,7 @@ class EmailCollector extends CommonObject public $host; + public $hostcharset; public $login; public $password; public $source_directory; @@ -985,9 +987,10 @@ class EmailCollector extends CommonObject $nbemailprocessed = 0; $nbemailok = 0; $nbactiondone = 0; + $charset = ($this->hostcharset ? $this->hostcharset : "UTF-8"); // Scan IMAP inbox - $arrayofemail = imap_search($connection, $search, null, "UTF-8"); + $arrayofemail = imap_search($connection, $search, null, $charset); if ($arrayofemail === false) { // Nothing found or search string not understood @@ -1086,6 +1089,7 @@ class EmailCollector extends CommonObject } $header = imap_fetchheader($connection, $imapemail, 0); + $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines $matches = array(); preg_match_all('/([^: ]+): (.+?(?:\r\n\s(?:.+?))*)\r\n/m', $header, $matches); $headers = array_combine($matches[1], $matches[2]); @@ -1132,7 +1136,10 @@ class EmailCollector extends CommonObject // Can use also imap_mime_header_decode($str) // Can use also mb_decode_mimeheader($str) // Can use also iconv_mime_decode($str, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8') - if (function_exists('imap_mime_header_decode')) { + if (function_exists('iconv_mime_decode')) { + $overview[0]->subject = iconv_mime_decode($overview[0]->subject, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8'); + } + elseif (function_exists('imap_mime_header_decode')) { $elements = imap_mime_header_decode($overview[0]->subject); $newstring = ''; if (!empty($elements)) { @@ -1146,6 +1153,8 @@ class EmailCollector extends CommonObject elseif (function_exists('mb_decode_mimeheader')) { $overview[0]->subject = mb_decode_mimeheader($overview[0]->subject); } + // Removed emojis + $overview[0]->subject = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $overview[0]->subject); // Parse IMAP email structure global $htmlmsg, $plainmsg, $charset, $attachments; @@ -1153,6 +1162,9 @@ class EmailCollector extends CommonObject //$htmlmsg,$plainmsg,$charset,$attachments $messagetext = $plainmsg ? $plainmsg : dol_string_nohtmltag($htmlmsg, 0); + // Removed emojis + $messagetext = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $messagetext); + /*var_dump($plainmsg); var_dump($htmlmsg); var_dump($messagetext);*/ diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 8a68e763160..7daf41a05d3 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -285,3 +285,5 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); UPDATE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; + +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN hostcharset varchar(16) DEFAULT 'UTF-8'; diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index 10f3e4f8b9b..87581f418e8 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -21,7 +21,8 @@ CREATE TABLE llx_emailcollector_emailcollector( ref varchar(128) NOT NULL, label varchar(255), description text, - host varchar(255), + host varchar(255), + hostcharset varchar(16) DEFAULT 'UTF-8', login varchar(128), password varchar(128), source_directory varchar(255) NOT NULL, diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1bd7f3d0297..5ce79a12231 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -40,6 +40,7 @@ WebUserGroup=Web server user/group NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (%s) may be protected (for example by OS permissions or by PHP directive open_basedir). DBStoringCharset=Database charset to store data DBSortingCharset=Database charset to sort data +HostCharset=Host charset ClientCharset=Client charset ClientSortingCharset=Client collation WarningModuleNotActive=Module %s must be enabled From bcaa83eeeca16486d5d3d511ea7290b25146aba5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 14:10:04 +0200 Subject: [PATCH 371/456] FIX dol_concatdesc to escape < Better help --- htdocs/admin/emailcollector_card.php | 4 ++-- htdocs/core/class/translate.class.php | 2 +- htdocs/core/lib/functions.lib.php | 9 +++++---- htdocs/emailcollector/class/emailcollector.class.php | 9 +++++++-- htdocs/langs/en_US/admin.lang | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 74592ff777a..80161eaadc6 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -592,7 +592,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; $htmltext = $langs->transnoentitiesnoconv("OperationParamDesc"); //var_dump($htmltext); - print $form->textwithpicto('', $htmltext); + print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'operationparamtt'); print ''; print ''; print ''; @@ -643,7 +643,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; // Delete print ''; print ''; diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 4f3930a4588..3fc3151030a 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -308,7 +308,7 @@ class Translate continue; } else { - // Convert some strings: Parse and render carriage returns. Also, change '\\s' int '\s' because transifex sync pull the string '\s' into string '\\s' + // Convert some strings: Parse and render carriage returns. Also, change '\\s' into '\s' because transifex sync pull the string '\s' into string '\\s' $this->tab_translate[$key] = str_replace(array('\\n', '\\\\s'), array("\n", '\s'), $value); if ($usecachekey) { $tabtranslatedomain[$key] = $value; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 20094da216c..31716dc3f3c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5794,7 +5794,8 @@ function dolGetFirstLineOfText($text, $nboflines = 1, $charset = 'UTF-8') /** - * Replace CRLF in string with a HTML BR tag + * Replace CRLF in string with a HTML BR tag. + * WARNING: The content after operation contains some HTML tags (the
    ) so be sure to also have encode the special chars of stringtoencode into HTML before. * * @param string $stringtoencode String to encode * @param int $nl2brmode 0=Adding br before \n, 1=Replacing \n by br @@ -6048,7 +6049,7 @@ function dol_textishtml($msg, $option = 0) * * @param string $text1 Text 1 * @param string $text2 Text 2 - * @param bool $forxml false=Use
    instead of \n if html content detected, true=Use
    instead of \n if html content detected + * @param bool $forxml true=Use
    instead of
    if we have to add a br tag * @param bool $invert invert order of description lines (we often use config MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION in this parameter) * @return string Text 1 + new line + Text2 * @see dol_textishtml() @@ -6063,9 +6064,9 @@ function dol_concatdesc($text1, $text2, $forxml = false, $invert = false) } $ret = ''; - $ret .= (!dol_textishtml($text1) && dol_textishtml($text2)) ?dol_nl2br($text1, 0, $forxml) : $text1; + $ret .= (!dol_textishtml($text1) && dol_textishtml($text2)) ? dol_nl2br(dol_escape_htmltag($text1, 0, 1, '', 1), 0, $forxml) : $text1; $ret .= (!empty($text1) && !empty($text2)) ? ((dol_textishtml($text1) || dol_textishtml($text2)) ? ($forxml ? "
    \n" : "
    \n") : "\n") : ""; - $ret .= (dol_textishtml($text1) && !dol_textishtml($text2)) ?dol_nl2br($text2, 0, $forxml) : $text2; + $ret .= (dol_textishtml($text1) && !dol_textishtml($text2)) ? dol_nl2br(dol_escape_htmltag($text2, 0, 1, '', 1), 0, $forxml) : $text2; return $ret; } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 969b83cac5a..2bc6d6db962 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -937,8 +937,8 @@ class EmailCollector extends CommonObject } imap_errors(); // Clear stack of errors. - // $conf->global->MAIL_PREFIX_FOR_EMAIL_ID must be defined $host = dol_getprefix('email'); + //$host = '123456'; // Define the IMAP search string // See https://tools.ietf.org/html/rfc3501#section-6.4.4 for IMAPv4 (PHP not yet compatible) @@ -1081,6 +1081,7 @@ class EmailCollector extends CommonObject dol_syslog("Start of loop on email", LOG_INFO, 1); + $i = 0; foreach ($arrayofemail as $imapemail) { if ($nbemailprocessed > 1000) @@ -1088,6 +1089,8 @@ class EmailCollector extends CommonObject break; // Do not process more than 1000 email per launch (this is a different protection than maxnbcollectedpercollect } + $i++; + $header = imap_fetchheader($connection, $imapemail, 0); $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines $matches = array(); @@ -1095,6 +1098,8 @@ class EmailCollector extends CommonObject $headers = array_combine($matches[1], $matches[2]); //var_dump($headers); + dol_syslog("** Process email ".$i." References: ".$headers['References']); + // If there is a filter on trackid if ($searchfilterdoltrackid > 0) { @@ -1130,7 +1135,7 @@ class EmailCollector extends CommonObject // GET Email meta datas $overview = imap_fetch_overview($connection, $imapemail, 0); - dol_syslog("** Process email - msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." subject=".$overview[0]->subject); + dol_syslog("msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." subject=".$overview[0]->subject); // Decode $overview[0]->subject according to RFC2047 // Can use also imap_mime_header_decode($str) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5ce79a12231..6c139a0f10c 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1939,7 +1939,7 @@ WithoutDolTrackingID=Dolibarr Reference not found in Message ID FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree -OperationParamDesc=Define values to use for action, or how to extract values. For example:
    objproperty1=SET:abc
    objproperty1=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:abc
    objproperty4=EXTRACT:HEADER:X-Myheaderkey.*[^\s]+(.*)
    options_myextrafield=EXTRACT:SUBJECT:([^\s]*)
    object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)

    Use a ; char as separator to extract or set several properties. +OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\s*([^\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)

    Use a ; char as separator to extract or set several properties. OpeningHours=Opening hours OpeningHoursDesc=Enter here the regular opening hours of your company. ResourceSetup=Configuration of Resource module From 4a65b629ee3c93266226208d24806aee8243e168 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 14:29:14 +0200 Subject: [PATCH 372/456] Position of fields --- htdocs/index.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index 36aae1f25b8..7f6e462839b 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -142,11 +142,11 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) 'orders', 'invoices', 'donations', - 'contracts', - 'interventions', 'supplier_proposals', 'supplier_orders', 'supplier_invoices', + 'contracts', + 'interventions', 'ticket' ); diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 2f5e10c1459..afb154408c5 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3643,7 +3643,7 @@ ul.noborder li:nth-child(even):not(.liste_titre) { box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20); } span.boxstatstext { - opacity: 0.7; + opacity: 0.5; line-height: 18px; color: var(--colortext); } From 72c6aa81bb146813ab52f6a95f321ba9918c687c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 May 2020 12:30:59 +0200 Subject: [PATCH 373/456] Trans --- htdocs/langs/en_US/modulebuilder.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index b815cf997cc..135ac1ae9ec 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -83,7 +83,7 @@ ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions SeeExamples=See examples here EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION) -VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update). Using a negative value means field is not shown by default on list but can be selected for viewing). It can be an expression, for example:
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    ($user->rights->holiday->define_holiday ? 1 : 0) +VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update).

    Using a negative value means field is not shown by default on list but can be selected for viewing).

    It can be an expression, for example:
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    ($user->rights->holiday->define_holiday ? 1 : 0) DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.
    Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)

    For document :
    0 = not displayed
    1 = display
    2 = display only if not empty

    For document lines :
    0 = not displayed
    1 = displayed in a column
    3 = display in line description column after the description
    4 = display in description column after the description only if not empty DisplayOnPdf=Display on PDF IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0) From 4a04cecbaae3c6deea391462718f08323965805d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 May 2020 12:49:53 +0200 Subject: [PATCH 374/456] CSS --- htdocs/theme/eldy/global.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index ef39d38a568..60c7ee43bb0 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1611,7 +1611,7 @@ div.nopadding { } td.nobordernopadding.widthpictotitle.col-picto { - color: var(--colortexttitlenotab); + color: #bbb; opacity: 0.85; } .table-list-of-attached-files .col-picto, .table-list-of-links .col-picto { From 0b3e917155c8e4f9f4a6fe676268fd357f6e8df0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 May 2020 13:29:50 +0200 Subject: [PATCH 375/456] CSS --- htdocs/core/tpl/extrafields_view.tpl.php | 21 ++++++++++++++++++--- htdocs/theme/eldy/global.inc.php | 2 +- htdocs/theme/md/style.css.php | 2 +- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index e6cbad245d9..198a3910747 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -52,8 +52,12 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] { $lastseparatorkeyfound = ''; $extrafields_collapse_num = ''; + $extrafields_collapse_num_old = ''; + $i = 0; foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) { + $i++; + // Discard if extrafield is a hidden field on form $enabled = 1; @@ -65,6 +69,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] { $enabled = dol_eval($extrafields->attributes[$object->table_element]['list'][$key], 1); } + $perms = 1; if ($perms && isset($extrafields->attributes[$object->table_element]['perms'][$key])) { @@ -87,6 +92,8 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] $value = $object->array_options["options_".$key]; //var_dump($key.' - '.$value); } + + // Print line tr of extra field if ($extrafields->attributes[$object->table_element]['type'][$key] == 'separate') { $extrafields_collapse_num = ''; @@ -109,13 +116,20 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] } else { - print '
    '; + print ''; + $extrafields_collapse_num_old = $extrafields_collapse_num; print ''; - if(!empty($show_subgroup)) + if (!empty($show_subgroup)) { // Permet d'afficher le compte comptable if (empty($displayed_account) || $root_account_description != $displayed_account) { // Affiche un Sous-Total par compte comptable if ($displayed_account != "") { - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print "\n"; print ''; } // Show first line of a break print ''; - print ''; + print ''; print ''; $displayed_account = $root_account_description; @@ -337,9 +337,9 @@ if ($action != 'export_csv') $sous_total_credit += $line->credit; } - if(!empty($show_subgroup)) + if (!empty($show_subgroup)) { - print ''; + print ''; print "\n"; print ''; } diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index f9bc453d999..6b9be4d285c 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -712,11 +712,11 @@ if (!empty($date_start) && !empty($date_stop)) print ''; // Total ET - print '\n"; + print '\n"; // Total IT - print '\n"; + print '\n"; // Total VAT - print '\n"; + print '\n"; print '\n"; @@ -758,9 +758,9 @@ if (!empty($date_start) && !empty($date_stop)) // Balance print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print "\n"; } diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 9302ed09afb..7c010ea742c 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -379,7 +379,7 @@ class Interfaces print 'Error: Trigger '.$modName.' does not extends DolibarrTriggers
    '; } } - catch(Exception $e) { + catch (Exception $e) { print $e->getMessage(); } diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index a751f584564..b44d7260e97 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -910,7 +910,7 @@ function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0, if ($numholidays == 1) return 0; } - $nbOpenDay=$lastday; + $nbOpenDay = $lastday; if ($inhour == 1) $nbOpenDay = ($nbOpenDay * 24); return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday)); diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 384c4fc3a7e..24811ad854d 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2302,7 +2302,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it if (preg_match('/experimental/i', $version)) $versiontrans .= 'warning'; if (preg_match('/deprecated/i', $version)) $versiontrans .= 'warning'; if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { - print 'getVersion(1).'">'; + print 'getVersion(1).'">'; print $this->getVersion(1); print ''; } diff --git a/htdocs/core/modules/rapport/pdf_paiement.class.php b/htdocs/core/modules/rapport/pdf_paiement.class.php index 024310abb09..103d0fdffba 100644 --- a/htdocs/core/modules/rapport/pdf_paiement.class.php +++ b/htdocs/core/modules/rapport/pdf_paiement.class.php @@ -465,14 +465,14 @@ class pdf_paiement if ($yp > $this->tab_height - 15) { $pdf->SetFillColor(255, 255, 255); - $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array()); + $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array()); $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); $pdf->SetFont('', 'B', $default_font_size - 1); - $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp); + $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp); $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('SubTotal')." : ", 0, 'R', 1); - $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total_page), 0, 'R', 1); + $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height, price($total_page), 0, 'R', 1); $pdf->SetFont('', '', $default_font_size - 1); $pdf->SetFillColor(220, 220, 220); $page++; @@ -523,19 +523,19 @@ class pdf_paiement } // Add line to add total by payment mode if mode reglement for nex line change - if ((($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) && ($mod != $lines[$j+1][2])) + if ((($this->doc_type == 'client' && !empty($conf->global->PAYMENTS_REPORT_GROUP_BY_MOD)) || ($this->doc_type == 'fourn' && !empty($conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD))) && ($mod != $lines[$j + 1][2])) { $pdf->SetFillColor(245, 245, 245); - $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array()); + $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array()); $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); - $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp); + $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp); $pdf->SetFont('', 'I', $default_font_size - 1); $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('Total').' '.$mod." : ", 0, 'R', 1); - $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total_mod), 0, 'R', 1); + $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height, price($total_mod), 0, 'R', 1); $pdf->SetFont('', '', $default_font_size - 1); - $mod = $lines[$j+1][2]; + $mod = $lines[$j + 1][2]; $total_mod = 0; $yp = $yp + 5; if ($yp > $this->tab_height - 5) @@ -551,14 +551,14 @@ class pdf_paiement } $total += $total_page; $pdf->SetFillColor(255, 255, 255); - $pdf->Rect($this->marge_gauche +1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite -3, $this->line_height, 'F', array(), array()); + $pdf->Rect($this->marge_gauche + 1, $this->tab_top + 10 + $yp, $this->posxpaymentamount - $this->marge_droite - 3, $this->line_height, 'F', array(), array()); $pdf->line($this->marge_gauche, $this->tab_top + 10 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 10 + $yp, array('dash'=>1)); $pdf->line($this->marge_gauche, $this->tab_top + 15 + $yp, $this->page_largeur - $this->marge_droite, $this->tab_top + 15 + $yp); - $pdf->SetXY($this->posxdate -1, $this->tab_top + 10 + $yp); + $pdf->SetXY($this->posxdate - 1, $this->tab_top + 10 + $yp); $pdf->SetFont('', 'B'); $pdf->MultiCell($this->posxpaymentamount - 2 - $this->marge_droite, $this->line_height, $langs->transnoentities('Total')." : ", 0, 'R', 1); - $pdf->SetXY($this->posxpaymentamount -1, $this->tab_top + 10 + $yp); - $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount +1, $this->line_height, price($total), 0, 'R', 1); + $pdf->SetXY($this->posxpaymentamount - 1, $this->tab_top + 10 + $yp); + $pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount + 1, $this->line_height, price($total), 0, 'R', 1); $pdf->SetFillColor(220, 220, 220); } } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 2bc6d6db962..bf1a4e26de7 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -1092,7 +1092,7 @@ class EmailCollector extends CommonObject $i++; $header = imap_fetchheader($connection, $imapemail, 0); - $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines + $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines $matches = array(); preg_match_all('/([^: ]+): (.+?(?:\r\n\s(?:.+?))*)\r\n/m', $header, $matches); $headers = array_combine($matches[1], $matches[2]); diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 3d6cec96319..16012022dc9 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -625,7 +625,7 @@ $(document).ready(function() { else selectedline=this.id; selectedtext=$('#'+selectedline).find("td:first").html(); '; -if ($action=="productinfo"){ +if ($action == "productinfo") { $prod = new Product($db); $prod->fetch($idproduct); print "".$prod->label."
    "; @@ -83,7 +83,7 @@ if ($action=="productinfo"){ print '
    '; print ''; } -elseif ($action=="editline"){ +elseif ($action == "editline") { $placeid = GETPOST('placeid', 'int'); $selectedline = GETPOST('selectedline', 'int'); $invoice = new Facture($db); @@ -99,8 +99,8 @@ elseif ($action=="editline"){ print "
    ".$prod->description; print "
    ".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; print '
    '; - print ''; - print ''; + print ''; + print ''; print ''; } } @@ -168,11 +168,11 @@ $( document ).ready(function() { function LoadPlace(placeid){ place=placeid; @@ -197,11 +197,11 @@ function AddProduct(placeid, productid){ function AddProductConfirm(placeid, productid){ place=placeid;
    '.strtoupper(substr($langs->trans('Floors'), 0, 3)).''; print ''; print ''; print ''; } - else{ + else { print ''; print ''; print ''; From 672ea60ffd471b2156bf45c28c60c3dc57223906 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 13:58:34 +0200 Subject: [PATCH 407/456] FIX #13896 --- htdocs/modulebuilder/template/class/myobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index fad19564fdc..2070bedf568 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -440,7 +440,7 @@ class MyObject extends CommonObject if ($resql) { $num = $this->db->num_rows($resql); $i = 0; - while ($i < min($limit, $num)) + while ($i < ($limit ? min($limit, $num) : $num)) { $obj = $this->db->fetch_object($resql); From dc6ae70aa6ddc311b8967dd9bf8d445e70c815a1 Mon Sep 17 00:00:00 2001 From: Langlais115 Date: Fri, 15 May 2020 10:25:56 +0200 Subject: [PATCH 408/456] Fix #13805 Add proper type check to "seuil_stock_alerte" parameter. --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index bb2a1652d8f..7b6892552d1 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1015,7 +1015,7 @@ class Product extends CommonObject $sql .= ", volume = ".($this->volume != '' ? "'".$this->db->escape($this->volume)."'" : 'null'); $sql .= ", volume_units = ".($this->volume_units != '' ? "'".$this->db->escape($this->volume_units)."'" : 'null'); $sql .= ", fk_default_warehouse = ".($this->fk_default_warehouse > 0 ? $this->db->escape($this->fk_default_warehouse) : 'null'); - $sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && $this->seuil_stock_alerte != '') ? "'".$this->db->escape($this->seuil_stock_alerte)."'" : "null"); + $sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && is_numeric($this->seuil_stock_alerte)) ? (int) $this->seuil_stock_alerte : 'null'); $sql .= ", description = '".$this->db->escape($this->description)."'"; $sql .= ", url = ".($this->url ? "'".$this->db->escape($this->url)."'" : 'null'); $sql .= ", customcode = '".$this->db->escape($this->customcode)."'"; From 3295b0d669541c24849f51f772d4487b708ddf3b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 14:14:05 +0200 Subject: [PATCH 409/456] Update viewimage.php --- htdocs/viewimage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 39795b62fd8..c72a4e0424e 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -203,7 +203,7 @@ if (!empty($hashp)) $accessallowed = 1; // When using hashp, link is public so we force $accessallowed $sqlprotectagainstexternals = ''; } -elseif ($conf->global->TAKEPOS_AUTO_ORDER && isset($_GET["publictakepos"])) +elseif (! empty($conf->global->TAKEPOS_AUTO_ORDER) && isset($_GET["publictakepos"])) { $accessallowed = 1; // Only if TakePOS Public Auto Order is enabled and received publictakepos variable } From f35a618699830aadfaedbf5fbcf9bc8dc7b307db Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 14:29:04 +0200 Subject: [PATCH 410/456] Update index.php --- htdocs/takepos/genimg/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index c2bb62b9322..e668b01aacb 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -77,7 +77,7 @@ elseif ($query == "pro") preg_match('@src="([^"]+)"@', $image, $match); $file = array_pop($match); if ($file == "") header('Location: ../../public/theme/common/nophoto.png'); - else header('Location: '.$file.'&cache=1&publictakepos=1'); + else header('Location: '.$file.'&cache=1&publictakepos=1&modulepart=product'); } else { From b8d7a4373c2deeba697b592eb6eb23fa19812e85 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 14:34:24 +0200 Subject: [PATCH 411/456] Update viewimage.php --- htdocs/viewimage.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index c72a4e0424e..b2534ee92dd 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -52,7 +52,7 @@ if (isset($_GET["hashp"]) && !defined("NOLOGIN")) if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip } // Some value of modulepart can be used to get resources that are public so no login are required. -if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) +if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias') { if (!defined("NOLOGIN")) define("NOLOGIN", 1); if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. @@ -60,7 +60,7 @@ if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) } // Used by TakePOS Auto Order -if (isset($_GET["publictakepos"])) +if (isset($_GET["modulepart"]) && $_GET["modulepart"] == 'product' && isset($_GET["publictakepos"])) { if (!defined("NOLOGIN")) define("NOLOGIN", 1); if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. @@ -203,9 +203,11 @@ if (!empty($hashp)) $accessallowed = 1; // When using hashp, link is public so we force $accessallowed $sqlprotectagainstexternals = ''; } -elseif (! empty($conf->global->TAKEPOS_AUTO_ORDER) && isset($_GET["publictakepos"])) +elseif (isset($_GET["publictakepos"])) { - $accessallowed = 1; // Only if TakePOS Public Auto Order is enabled and received publictakepos variable + if (! empty($conf->global->TAKEPOS_AUTO_ORDER)) { + $accessallowed = 1; // Only if TakePOS Public Auto Order is enabled and received publictakepos variable + } } else { From 895833effc017ad4c2817e16d0a9e947b49b497a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 15:00:58 +0200 Subject: [PATCH 412/456] FIX #13864 --- htdocs/projet/card.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index e41c3da3e88..ae91ac0cfac 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -639,20 +639,20 @@ if ($action == 'create' && $user->rights->projet->creer) // Opportunity probability print '
    '; - print ''; print ''; // Opportunity amount print ''; - print ''; + print ''; print ''; } // Budget print ''; - print ''; + print ''; print ''; // Description @@ -897,14 +897,14 @@ elseif ($object->id > 0) // Opportunity probability print ''; - print ''; print ''; // Opportunity amount print ''; - print ''; + print ''; print ''; } @@ -923,7 +923,7 @@ elseif ($object->id > 0) // Budget print ''; - print ''; + print ''; print ''; // Description From 99db3a2991b4b74a38f1c99379f6c06a0c097ca8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 15:15:07 +0200 Subject: [PATCH 413/456] Fix field for opportunities must be visible only if we use opportinities --- htdocs/projet/card.php | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index ae91ac0cfac..6918e6fd57c 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -833,9 +833,22 @@ elseif ($object->id > 0) print ''; + print ''; print ''; // Opportunity probability - print ''; + print ''; print ''; print ''; // Opportunity amount - print ''; + print ''; print ''; print ''; } From 38059ab86190b32c9a5834062b10864ce91fc010 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 15:17:37 +0200 Subject: [PATCH 414/456] Fix trans --- htdocs/langs/en_US/projects.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index cdc0e6b3c95..bb42bff3c87 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -255,7 +255,7 @@ ServiceToUseOnLines=Service to use on lines InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include. ProjectFollowOpportunity=Follow opportunity -ProjectFollowTasks=Follow tasks +ProjectFollowTasks=Follow tasks or time spent Usage=Usage UsageOpportunity=Usage: Opportunity UsageTasks=Usage: Tasks From 86ff60f16152235e51709c4d91effdff8026822f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 15:50:50 +0200 Subject: [PATCH 415/456] Fix break line and set of opportunity fields --- htdocs/accountancy/bookkeeping/balance.php | 2 +- htdocs/core/class/html.formprojet.class.php | 6 ++++-- htdocs/langs/en_US/accountancy.lang | 1 + htdocs/projet/card.php | 19 ++++++++++++++++--- htdocs/theme/eldy/global.inc.php | 3 ++- htdocs/theme/eldy/theme_vars.inc.php | 2 +- htdocs/theme/md/style.css.php | 20 +++++++++++--------- htdocs/theme/md/theme_vars.inc.php | 2 +- 8 files changed, 37 insertions(+), 18 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index b2a25b00ce2..456da29d954 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -294,7 +294,7 @@ if ($action != 'export_csv') { // Affiche un Sous-Total par compte comptable if ($displayed_account != "") { - print ''; + print ''; print "\n"; print ''; } diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index b6c7017e408..bf3db0cc65c 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -620,11 +620,12 @@ class FormProjets * @param int $showallnone Add choice "All" and "None" * @param int $showpercent Show default probability for status * @param string $morecss Add more css + * @param int $noadmininfo 0=Add admin info, 1=Disable admin info * @return int|string The HTML select list of element or '' if nothing or -1 if KO */ - public function selectOpportunityStatus($htmlname, $preselected = '-1', $showempty = 1, $useshortlabel = 0, $showallnone = 0, $showpercent = 0, $morecss = '') + public function selectOpportunityStatus($htmlname, $preselected = '-1', $showempty = 1, $useshortlabel = 0, $showallnone = 0, $showpercent = 0, $morecss = '', $noadmininfo = 0) { - global $conf, $langs; + global $conf, $langs, $user; $sql = "SELECT rowid, code, label, percent"; $sql .= " FROM ".MAIN_DB_PREFIX.'c_lead_status'; @@ -670,6 +671,7 @@ class FormProjets $i++; } $sellist .= ''; + if ($user->admin && !$noadmininfo) $sellist .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } /*else { diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index adf2309ad07..92cc0f0c79e 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -234,6 +234,7 @@ ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unkno ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Third-party account not defined or third party unknown. Blocking error. UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error PaymentsNotLinkedToProduct=Payment not linked to any product / service +OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 6918e6fd57c..15d1d6d9563 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -558,6 +558,19 @@ if ($action == 'create' && $user->rights->projet->creer) print ' '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); + print ''; print '
    '; } if (empty($conf->global->PROJECT_HIDE_TASKS)) @@ -632,20 +645,20 @@ if ($action == 'create' && $user->rights->projet->creer) if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { // Opportunity status - print ''; + print ''; print ''; // Opportunity probability - print ''; + print ''; print ''; print ''; // Opportunity amount - print ''; + print ''; print ''; print ''; } diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index afb154408c5..3e213c3d8e2 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -17,6 +17,7 @@ --colorbacklinepair2: rgb(); --colorbacklinepairhover: rgb(); --colorbacklinepairchecked: rgb(); + --colorbacklinebreak: rgb(); --colorbackbody: rgb(); --colortexttitlenotab: rgb(); --colortexttitle: rgb(); @@ -3289,7 +3290,7 @@ td.evenodd, tr.nohoverpair td, #trlinefordates td { .trforbreak td { font-weight: 500; border-bottom: 1pt solid black !important; - /* background-color: # !important; */ + background-color: var(--colorbacklinebreak) !important; !important; } .trforbreak.nobold td a, .trforbreak.nobold span.secondary { font-weight: normal !important; diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index 823b8168b4c..d2a11725ecf 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -65,7 +65,7 @@ $colorbacklinepair1 = '251,251,251'; // line pair $colorbacklinepair2 = '251,251,251'; // line pair $colorbacklinepairhover = '230,237,244'; // line hover $colorbacklinepairchecked = '230,237,244'; // line checked -$colorbacklinebreak = '233,228,230'; // line break +$colorbacklinebreak = '253,251,250'; // line break $colorbackbody = '255,255,255'; $colortexttitlenotab = '0,113,120'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,113,120, violet: 0,50,120 $colortexttitle = '0,0,0'; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index da2df5eb788..36fb265c42a 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -242,6 +242,7 @@ print '*/'."\n"; --colorbacklinepair2: rgb(); --colorbacklinepairhover: rgb(); --colorbacklinepairchecked: rgb(); + --colorbacklinebreak: rgb(); --colorbackbody: rgb(); --colortexttitlenotab: rgb(); --colortexttitle: rgb(); @@ -3284,10 +3285,10 @@ ul.noborder li:nth-child(odd):not(.liste_titre) { } .impair, .nohover .impair:hover, tr.impair td.nohover { - background: #; + background: var(--colorbacklineimpair1); } #GanttChartDIV { - background-color: #; + background-color: var(--colorbacklineimpair1); } .oddeven, .evenodd, .pair, .nohover .pair:hover, tr.pair td.nohover, .tagtr.oddeven { @@ -3296,25 +3297,26 @@ ul.noborder li:nth-child(odd):not(.liste_titre) { color: #202020; } .pair, .nohover .pair:hover, tr.pair td.nohover { - background-color: #; + background-color: var(--colorbacklinepair1); } + table.dataTable tr.oddeven { - background-color: # !important; + background-color: var(--colorbacklinepair1) !important; } /* For no hover style */ td.oddeven, table.nohover tr.impair, table.nohover tr.pair, table.nohover tr.impair td, table.nohover tr.pair td, tr.nohover td, form.nohover, form.nohover:hover { - background-color: # !important; - background: # !important; + background-color: var(--colorbacklineimpair1) !important; !important; + background: var(--colorbacklineimpair1) !important; !important; } td.evenodd, tr.nohoverpair td, #trlinefordates td { - background-color: # !important; - background: # !important; + background-color: var(--colorbacklinepair1) !important; !important; + background: var(--colorbacklinepair1) !important; !important; } .trforbreak td { font-weight: bold; border-bottom: 1pt solid black !important; - /* background-color: # !important; */ + background-color: var(--colorbacklinebreak) !important; } table.dataTable td { diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php index 6cdd37fe913..ffad2cc66b5 100644 --- a/htdocs/theme/md/theme_vars.inc.php +++ b/htdocs/theme/md/theme_vars.inc.php @@ -61,7 +61,7 @@ $colorbacklinepair1 = '248,248,248'; // line pair $colorbacklinepair2 = '246,246,246'; // line pair $colorbacklinepairhover = '230,237,244'; // line hover $colorbacklinepairchecked = '230,237,244'; // line checked -$colorbacklinebreak = '214,218,220'; +$colorbacklinebreak = '250,246,251'; $colorbackbody = '248,248,248'; $colortexttitlenotab = '80,71,5'; $colortexttitle = '20,20,20'; From 5fe9c45fb25a952c9b38d2f815354ec19c7df1e7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 16:07:39 +0200 Subject: [PATCH 416/456] Fix look and feel v12 --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/projet/card.php | 4 +-- htdocs/societe/card.php | 51 +++++-------------------------- 3 files changed, 11 insertions(+), 46 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 31716dc3f3c..878b85993b5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3149,7 +3149,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ if (empty($srconly) && in_array($pictowithouttext, array( '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', 'accountancy', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', - 'cash-register', 'check', 'close_title', 'company', 'contact', 'contract', 'cubes', + 'cash-register', 'category', 'check', 'close_title', 'company', 'contact', 'contract', 'cubes', 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', 'intervention', 'label', 'language', 'list', 'listlight', 'lot', diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 15d1d6d9563..e79d5bafa59 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -604,7 +604,7 @@ if ($action == 'create' && $user->rights->projet->creer) print '"; } diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 195d4df88bb..6abb7aa9647 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1331,7 +1331,7 @@ else // Country print ''; @@ -1354,16 +1354,16 @@ else // Phone / Fax print ''; - print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning').' '; + print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning').' '; if ($conf->browser->layout == 'phone') print ''; print ''; - print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax').' '; + print 'browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax').' '; // Email / Web print ''; - print ''; + print ''; print ''; - print ''; + print ''; if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -1380,42 +1380,6 @@ else } } - // if (! empty($conf->socialnetworks->enabled)) - // { - // // Skype - // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - // { - // print ''; - // print ''; - // } - // // Twitter - // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - // { - // print ''; - // print ''; - // } - // // Facebook - // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - // { - // print ''; - // print ''; - // } - // // LinkedIn - // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - // { - // print ''; - // print ''; - // } - // } - // Prof ids $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); while ($i <= 6) @@ -1481,9 +1445,10 @@ else //TODO: Place into a function to control showing by country or study better option if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { - print ''; + print ''; } From c43813ccbb7f5671b0d79291066ded0e35abef30 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 16:23:24 +0200 Subject: [PATCH 417/456] Fix responsive of edition of thirdparties --- htdocs/societe/card.php | 62 +++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 40 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 6abb7aa9647..96a9dd7deed 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1396,7 +1396,7 @@ else print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code); print ''; - if (($j % 2) == 1) print ''; + if (($j % $NBCOLS) == ($NBCOLS - 1)) print ''; $j++; } $i++; @@ -1448,6 +1448,7 @@ else print ''; + if ($conf->browser->layout == 'phone') print ''; print ''; @@ -1848,6 +1849,7 @@ else print ''; + if ($conf->browser->layout == 'phone') print ''; print '
    attributes[$object->table_element]['required'][$key])) print ' fieldrequired'; print '">'; if (!empty($extrafields->attributes[$object->table_element]['help'][$key])) print $form->textwithpicto($langs->trans($label), $langs->trans($extrafields->attributes[$object->table_element]['help'][$key])); @@ -161,6 +175,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] //print 'x'.$object->array_options['options_' . $key].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour'); $value = isset($_POST["options_".$key]) ? dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]) : $datenotinstring; } + //TODO Improve element and rights detection if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'none') == $key) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 60c7ee43bb0..2f5e10c1459 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1751,7 +1751,7 @@ img.photorefnoborder { border-bottom: px solid rgb(); /* border-bottom: 2px solid var(--colorbackhmenu1); */ } -.trextrafieldseparator td { +.trextrafieldseparator td, .trextrafields_collapse_last td { /* border-bottom: 2px solid var(--colorbackhmenu1) !important; */ border-bottom: 2px solid rgb() !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index c7ce5709efd..da2df5eb788 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1799,7 +1799,7 @@ img.photorefnoborder { border-bottom: px solid rgb(); } -.trextrafieldseparator td { +.trextrafieldseparator td, .trextrafields_collapse_last td { border-bottom: 1px solid rgb() !important; } .tdhrthin { From 5f400d27b4a7909efcad5f2914cdefddb4d64983 Mon Sep 17 00:00:00 2001 From: "DEMAREST Maxime (Indelog)" Date: Wed, 13 May 2020 15:01:32 +0200 Subject: [PATCH 365/456] Add preview file in compta/accounting-files.php --- htdocs/compta/accounting-files.php | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index c567c5e99ee..98d8c9b9983 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $langs->loadLangs(array("accountancy", "bills", "companies", "salaries", "compta", "trips", "banks")); @@ -232,6 +233,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->ref); $upload_dir = $conf->facture->dir_output.'/'.$subdir; $link = "document.php?modulepart=facture&file=".str_replace('/', '%2F', $subdir).'%2F'; + $modulepart = "facture"; break; case "SupplierInvoice": $tmpinvoicesupplier->fetch($objd->id); @@ -239,18 +241,21 @@ if (($action == 'searchfiles' || $action == 'dl')) { $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->ref); $upload_dir = $conf->fournisseur->facture->dir_output.'/'.$subdir; $link = "document.php?modulepart=facture_fournisseur&file=".str_replace('/', '%2F', $subdir).'%2F'; + $modulepart = "facture_fournisseur"; break; case "ExpenseReport": $subdir = ''; $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->ref); $upload_dir = $conf->expensereport->dir_output.'/'.$subdir; $link = "document.php?modulepart=expensereport&file=".str_replace('/', '%2F', $subdir).'%2F'; + $modulepart = "expensereport"; break; case "SalaryPayment": $subdir = ''; $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->id); $upload_dir = $conf->salaries->dir_output.'/'.$subdir; $link = "document.php?modulepart=salaries&file=".str_replace('/', '%2F', $subdir).'%2F'; + $modulepart = "salaries"; break; case "Donation": $tmpdonation->fetch($objp->id); @@ -258,18 +263,21 @@ if (($action == 'searchfiles' || $action == 'dl')) { $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->id); $upload_dir = $conf->don->dir_output.'/'.$subdir; $link = "document.php?modulepart=don&file=".str_replace('/', '%2F', $subdir).'%2F'; + $modulepart = "don"; break; case "SocialContributions": $subdir = ''; $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->id); $upload_dir = $conf->tax->dir_output.'/'.$subdir; $link = "document.php?modulepart=tax&file=".str_replace('/', '%2F', $subdir).'%2F'; + $modulepart = "tax"; break; case "VariousPayment": $subdir = ''; $subdir .= ($subdir ? '/' : '').dol_sanitizeFileName($objd->id); $upload_dir = $conf->bank->dir_output.'/'.$subdir; $link = "document.php?modulepart=banque&file=".str_replace('/', '%2F', $subdir).'%2F'; + $modulepart = "banque"; break; default: $subdir = ''; @@ -336,7 +344,16 @@ if (($action == 'searchfiles' || $action == 'dl')) { if (empty($filesarray[$file['item'].'_'.$file['id']]['files'])) { $filesarray[$file['item'].'_'.$file['id']]['files'] = array(); } - $filesarray[$file['item'].'_'.$file['id']]['files'][] = array('link' => $link.$file['name'], 'name'=>$file['name'], 'ref'=>$file['ref'], 'fullname' => $file['fullname'], 'relpathnamelang' => $langs->trans($file['item']).'/'.$file['name']); + $filesarray[$file['item'].'_'.$file['id']]['files'][] = array( + 'link' => $link.urlencode($file['name']), + 'name'=>$file['name'], + 'ref'=>$file['ref'], + 'fullname' => $file['fullname'], + 'relpath' => '/'.$file['name'], + 'relpathnamelang' => $langs->trans($file['item']).'/'.$file['name'], + 'modulepart' => $modulepart, + 'subdir' => $subdir, + ); //var_dump($file['item'].'_'.$file['id']); //var_dump($filesarray[$file['item'].'_'.$file['id']]['files']); } @@ -463,7 +480,8 @@ if ($result && $action == "dl" && !$error) * View */ -$form = new Form($db); +$form = new form($db); +$formfile = new FormFile($db); $userstatic = new User($db); $invoice = new Facture($db); $supplier_invoice = new FactureFournisseur($db); @@ -654,8 +672,8 @@ if (!empty($date_start) && !empty($date_stop)) print ''; if (!empty($data['files'])) { - foreach ($data['files'] as $filecursor) { - print ''.($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']).'
    '; + foreach ($data['files'] as $id=>$filecursor) { + print ''.($filecursor['name'] ? $filecursor['name'] : $filecursor['ref']).' '.$formfile->showPreview($filecursor, $filecursor['modulepart'], $filecursor['subdir'].'/'.$filecursor['name']).'
    '; } } print "
    '.$data['paid'].''.price($data['amount_ht'])."'.price($data['sens']?$data['amount_ht']:-$data['amount_ht'])."'.price($data['amount_ttc'])."'.price($data['sens']?$data['amount_ttc']:-$data['amount_ttc'])."'.price($data['amount_vat'])."'.price($data['sens']?$data['amount_vat']:-$data['amount_vat'])."'.$data['thirdparty_name']."'.$data['vatnum']."'.(($data['amount_ttc'] > 0) ? price(abs($data['amount_ttc'])) : '')."'.(($data['amount_ttc'] > 0) ? '' : price(abs($data['amount_ttc'])))."'.price($data['balance'])."
    '.price(price2num($totalET, 'MT')).''.price(price2num($totalIT, 'MT')).''.price(price2num($totalVAT, 'MT')).''.price($totalDebit).''.price($totalCredit).''.price(price2num($totalDebit - $totalCredit, 'MT')).''.$langs->trans('Total').' '.$langs->trans('Income').''.price(price2num($totalET_credit, 'MT')).''.price(price2num($totalIT_credit, 'MT')).''.price(price2num($totalVAT_credit, 'MT')).'
    '.$langs->trans('Total').' '.$langs->trans('Outcome').''.price(price2num($totalET_debit, 'MT')).''.price(price2num($totalIT_debit, 'MT')).''.price(price2num($totalVAT_debit, 'MT')).'
    '.$langs->trans('Total').''.price(price2num($totalET_credit+$totalET_debit, 'MT')).''.price(price2num($totalIT_credit+$totalIT_debit, 'MT')).''.price(price2num($totalVAT_credit+$totalVAT_debit, 'MT')).'
    '; - print ''.img_edit().''; + print ''.img_edit().''; print ' '.img_delete().''; print '
    '; print ''; print ''; - print ''; print ''; print ''; @@ -643,7 +643,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; // Delete print ''; print ''; diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 4f3930a4588..3fc3151030a 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -308,7 +308,7 @@ class Translate continue; } else { - // Convert some strings: Parse and render carriage returns. Also, change '\\s' int '\s' because transifex sync pull the string '\s' into string '\\s' + // Convert some strings: Parse and render carriage returns. Also, change '\\s' into '\s' because transifex sync pull the string '\s' into string '\\s' $this->tab_translate[$key] = str_replace(array('\\n', '\\\\s'), array("\n", '\s'), $value); if ($usecachekey) { $tabtranslatedomain[$key] = $value; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 20094da216c..31716dc3f3c 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5794,7 +5794,8 @@ function dolGetFirstLineOfText($text, $nboflines = 1, $charset = 'UTF-8') /** - * Replace CRLF in string with a HTML BR tag + * Replace CRLF in string with a HTML BR tag. + * WARNING: The content after operation contains some HTML tags (the
    ) so be sure to also have encode the special chars of stringtoencode into HTML before. * * @param string $stringtoencode String to encode * @param int $nl2brmode 0=Adding br before \n, 1=Replacing \n by br @@ -6048,7 +6049,7 @@ function dol_textishtml($msg, $option = 0) * * @param string $text1 Text 1 * @param string $text2 Text 2 - * @param bool $forxml false=Use
    instead of \n if html content detected, true=Use
    instead of \n if html content detected + * @param bool $forxml true=Use
    instead of
    if we have to add a br tag * @param bool $invert invert order of description lines (we often use config MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION in this parameter) * @return string Text 1 + new line + Text2 * @see dol_textishtml() @@ -6063,9 +6064,9 @@ function dol_concatdesc($text1, $text2, $forxml = false, $invert = false) } $ret = ''; - $ret .= (!dol_textishtml($text1) && dol_textishtml($text2)) ?dol_nl2br($text1, 0, $forxml) : $text1; + $ret .= (!dol_textishtml($text1) && dol_textishtml($text2)) ? dol_nl2br(dol_escape_htmltag($text1, 0, 1, '', 1), 0, $forxml) : $text1; $ret .= (!empty($text1) && !empty($text2)) ? ((dol_textishtml($text1) || dol_textishtml($text2)) ? ($forxml ? "
    \n" : "
    \n") : "\n") : ""; - $ret .= (dol_textishtml($text1) && !dol_textishtml($text2)) ?dol_nl2br($text2, 0, $forxml) : $text2; + $ret .= (dol_textishtml($text1) && !dol_textishtml($text2)) ? dol_nl2br(dol_escape_htmltag($text2, 0, 1, '', 1), 0, $forxml) : $text2; return $ret; } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 969b83cac5a..2bc6d6db962 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -937,8 +937,8 @@ class EmailCollector extends CommonObject } imap_errors(); // Clear stack of errors. - // $conf->global->MAIL_PREFIX_FOR_EMAIL_ID must be defined $host = dol_getprefix('email'); + //$host = '123456'; // Define the IMAP search string // See https://tools.ietf.org/html/rfc3501#section-6.4.4 for IMAPv4 (PHP not yet compatible) @@ -1081,6 +1081,7 @@ class EmailCollector extends CommonObject dol_syslog("Start of loop on email", LOG_INFO, 1); + $i = 0; foreach ($arrayofemail as $imapemail) { if ($nbemailprocessed > 1000) @@ -1088,6 +1089,8 @@ class EmailCollector extends CommonObject break; // Do not process more than 1000 email per launch (this is a different protection than maxnbcollectedpercollect } + $i++; + $header = imap_fetchheader($connection, $imapemail, 0); $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines $matches = array(); @@ -1095,6 +1098,8 @@ class EmailCollector extends CommonObject $headers = array_combine($matches[1], $matches[2]); //var_dump($headers); + dol_syslog("** Process email ".$i." References: ".$headers['References']); + // If there is a filter on trackid if ($searchfilterdoltrackid > 0) { @@ -1130,7 +1135,7 @@ class EmailCollector extends CommonObject // GET Email meta datas $overview = imap_fetch_overview($connection, $imapemail, 0); - dol_syslog("** Process email - msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." subject=".$overview[0]->subject); + dol_syslog("msgid=".$overview[0]->message_id." date=".dol_print_date($overview[0]->udate, 'dayrfc', 'gmt')." subject=".$overview[0]->subject); // Decode $overview[0]->subject according to RFC2047 // Can use also imap_mime_header_decode($str) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 5ce79a12231..6c139a0f10c 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1939,7 +1939,7 @@ WithoutDolTrackingID=Dolibarr Reference not found in Message ID FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree -OperationParamDesc=Define values to use for action, or how to extract values. For example:
    objproperty1=SET:abc
    objproperty1=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:abc
    objproperty4=EXTRACT:HEADER:X-Myheaderkey.*[^\s]+(.*)
    options_myextrafield=EXTRACT:SUBJECT:([^\s]*)
    object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)

    Use a ; char as separator to extract or set several properties. +OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\s*([^\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\s([^\s]*)

    Use a ; char as separator to extract or set several properties. OpeningHours=Opening hours OpeningHoursDesc=Enter here the regular opening hours of your company. ResourceSetup=Configuration of Resource module From 9a8e9bdc99ccec244b6b8ae43c5869f0192789a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 14:29:14 +0200 Subject: [PATCH 378/456] Position of fields --- htdocs/index.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index 36aae1f25b8..7f6e462839b 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -142,11 +142,11 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) 'orders', 'invoices', 'donations', - 'contracts', - 'interventions', 'supplier_proposals', 'supplier_orders', 'supplier_invoices', + 'contracts', + 'interventions', 'ticket' ); diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 2f5e10c1459..afb154408c5 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3643,7 +3643,7 @@ ul.noborder li:nth-child(even):not(.liste_titre) { box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20); } span.boxstatstext { - opacity: 0.7; + opacity: 0.5; line-height: 18px; color: var(--colortext); } From 68512e0281da45963a89c6ce890c080062fc61e2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 14:56:15 +0200 Subject: [PATCH 379/456] Look and feel v12 --- .../core/boxes/box_accountancy_last_manual_entries.php | 5 ++++- htdocs/core/boxes/box_boms.php | 5 ++++- htdocs/core/boxes/box_clients.php | 5 ++++- htdocs/core/boxes/box_commandes.php | 5 ++++- htdocs/core/boxes/box_factures_imp.php | 5 ++++- htdocs/core/boxes/box_ficheinter.php | 9 ++++++--- htdocs/core/boxes/box_fournisseurs.php | 2 +- htdocs/core/boxes/box_goodcustomers.php | 5 ++++- htdocs/core/boxes/box_mos.php | 5 ++++- htdocs/core/boxes/box_prospect.php | 4 ++-- htdocs/core/boxes/box_services_contracts.php | 5 ++++- htdocs/core/boxes/box_shipments.php | 5 ++++- htdocs/core/tools.php | 2 +- htdocs/install/default.css | 2 +- htdocs/install/step5.php | 10 +++++----- 15 files changed, 52 insertions(+), 22 deletions(-) diff --git a/htdocs/core/boxes/box_accountancy_last_manual_entries.php b/htdocs/core/boxes/box_accountancy_last_manual_entries.php index f1ee00c6c59..6198c90e663 100644 --- a/htdocs/core/boxes/box_accountancy_last_manual_entries.php +++ b/htdocs/core/boxes/box_accountancy_last_manual_entries.php @@ -140,7 +140,10 @@ class box_accountancy_last_manual_entries extends ModeleBoxes $line++; } - if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoRecordedManualEntries")); + if ($num == 0) $this->info_box_contents[$line][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoRecordedManualEntries") + ); $this->db->free($result); } else { diff --git a/htdocs/core/boxes/box_boms.php b/htdocs/core/boxes/box_boms.php index 57c5ce2e2e2..c75c4c24e8f 100644 --- a/htdocs/core/boxes/box_boms.php +++ b/htdocs/core/boxes/box_boms.php @@ -153,7 +153,10 @@ class box_boms extends ModeleBoxes $line++; } - if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoRecordedOrders")); + if ($num == 0) $this->info_box_contents[$line][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoRecordedOrders") + ); $this->db->free($result); } else { diff --git a/htdocs/core/boxes/box_clients.php b/htdocs/core/boxes/box_clients.php index d82a4aee71e..70718db55b5 100644 --- a/htdocs/core/boxes/box_clients.php +++ b/htdocs/core/boxes/box_clients.php @@ -148,7 +148,10 @@ class box_clients extends ModeleBoxes $line++; } - if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoRecordedCustomers")); + if ($num == 0) $this->info_box_contents[$line][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoRecordedCustomers") + ); $this->db->free($result); } diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index 37a25c8084d..7ec5071b6e3 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -174,7 +174,10 @@ class box_commandes extends ModeleBoxes $line++; } - if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoRecordedOrders")); + if ($num == 0) $this->info_box_contents[$line][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoRecordedOrders") + ); $this->db->free($result); } else { diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 0a44105a853..a374094ea89 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -180,7 +180,10 @@ class box_factures_imp extends ModeleBoxes $line++; } - if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoUnpaidCustomerBills")); + if ($num == 0) $this->info_box_contents[$line][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoUnpaidCustomerBills") + ); $this->db->free($result); } diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index e289c83d541..4125ce92eaa 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -145,13 +145,16 @@ class box_ficheinter extends ModeleBoxes $i++; } - if ($num == 0) $this->info_box_contents[$i][] = array('td' => 'class="center"', 'text'=>$langs->trans("NoRecordedInterventions")); + if ($num == 0) $this->info_box_contents[$i][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoRecordedInterventions") + ); $this->db->free($resql); } else { - $this->info_box_contents[0][] = array( + $this->info_box_contents[0][0] = array( 'td' => '', 'maxlength'=>500, 'text' => ($this->db->error().' sql='.$sql), @@ -160,7 +163,7 @@ class box_ficheinter extends ModeleBoxes } else { - $this->info_box_contents[0][] = array( + $this->info_box_contents[0][0] = array( 'td' => 'class="nohover opacitymedium left"', 'text' => $langs->trans("ReadPermissionNotAllowed") ); diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index 2f55a379362..44dd891bfb8 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -136,7 +136,7 @@ class box_fournisseurs extends ModeleBoxes } if ($num == 0) $this->info_box_contents[$line][0] = array( - 'td' => 'class="center"', + 'td' => 'class="center opacitymedium"', 'text'=>$langs->trans("NoRecordedSuppliers"), ); diff --git a/htdocs/core/boxes/box_goodcustomers.php b/htdocs/core/boxes/box_goodcustomers.php index 79eb6f9ab8e..46dfdff6d23 100644 --- a/htdocs/core/boxes/box_goodcustomers.php +++ b/htdocs/core/boxes/box_goodcustomers.php @@ -142,7 +142,10 @@ class box_goodcustomers extends ModeleBoxes $line++; } - if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoRecordedCustomers")); + if ($num == 0) $this->info_box_contents[$line][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoRecordedCustomers") + ); $this->db->free($result); } diff --git a/htdocs/core/boxes/box_mos.php b/htdocs/core/boxes/box_mos.php index 9b863aa2d5a..ec21d5d00cf 100644 --- a/htdocs/core/boxes/box_mos.php +++ b/htdocs/core/boxes/box_mos.php @@ -149,7 +149,10 @@ class box_mos extends ModeleBoxes $line++; } - if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoRecordedOrders")); + if ($num == 0) $this->info_box_contents[$line][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoRecordedOrders") + ); $this->db->free($result); } else { diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 54ed1c76051..1024ef1d4ec 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -149,8 +149,8 @@ class box_prospect extends ModeleBoxes if ($num == 0) { $this->info_box_contents[$line][0] = array( - 'td' => 'class="center"', - 'text'=>$langs->trans("NoRecordedProspects"), + 'td' => 'class="center opacitymedium"', + 'text'=> $langs->trans("NoRecordedProspects"), ); } diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index f8e6dd22452..7167097672b 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -223,7 +223,10 @@ class box_services_contracts extends ModeleBoxes $i++; } - if ($num == 0) $this->info_box_contents[$i][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoContractedProducts")); + if ($num == 0) $this->info_box_contents[$i][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoContractedProducts") + ); $this->db->free($result); } diff --git a/htdocs/core/boxes/box_shipments.php b/htdocs/core/boxes/box_shipments.php index 26f45bc08db..278ad974cf5 100644 --- a/htdocs/core/boxes/box_shipments.php +++ b/htdocs/core/boxes/box_shipments.php @@ -158,7 +158,10 @@ class box_shipments extends ModeleBoxes $line++; } - if ($num == 0) $this->info_box_contents[$line][0] = array('td' => 'class="center"', 'text'=>$langs->trans("NoRecordedShipments")); + if ($num == 0) $this->info_box_contents[$line][0] = array( + 'td' => 'class="center opacitymedium"', + 'text'=>$langs->trans("NoRecordedShipments") + ); $this->db->free($result); } else { diff --git a/htdocs/core/tools.php b/htdocs/core/tools.php index 348417dd345..accb8eeed00 100644 --- a/htdocs/core/tools.php +++ b/htdocs/core/tools.php @@ -46,7 +46,7 @@ $text = $langs->trans("Tools"); print load_fiche_titre($text, '', 'wrench'); // Show description of content -print '
    '.$langs->trans("ToolsDesc").'


    '; +print '
    '.$langs->trans("ToolsDesc").'


    '; // Show logo diff --git a/htdocs/install/default.css b/htdocs/install/default.css index f0e51caecab..f363789c129 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -53,7 +53,7 @@ div.titre { } span.titre { - font-weight: bold; + /* font-weight: bold; */ background: #FFFFFF; color: rgb(0,113,121); border: 1px solid #bbb; diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index 1609035e415..b74594ce8da 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -384,10 +384,10 @@ if ($action == "set" && $success) print "
    "; - print $langs->trans("YouNeedToPersonalizeSetup")."

    "; + print $langs->trans("YouNeedToPersonalizeSetup")."


    "; print ''; } else @@ -399,7 +399,7 @@ if ($action == "set" && $success) print "
    "; print ''; } } @@ -435,7 +435,7 @@ elseif (empty($action) || preg_match('/upgrade/i', $action)) print "

    "; print '
    '; } else @@ -447,7 +447,7 @@ elseif (empty($action) || preg_match('/upgrade/i', $action)) print "
    "; print ''; } } From 6ec5dd02b61a21154b55812660f09b57b87994dd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 15:27:10 +0200 Subject: [PATCH 380/456] Fix Fatal error with bad triggers --- htdocs/core/class/interfaces.class.php | 89 +++++++++++-------- htdocs/core/modules/DolibarrModules.class.php | 10 ++- .../interface_80_modStripe_Stripe.class.php | 2 +- htdocs/theme/eldy/info-box.inc.php | 4 +- 4 files changed, 59 insertions(+), 46 deletions(-) diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index f1daafeb9e7..9302ed09afb 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -328,48 +328,59 @@ class Interfaces continue; } - $objMod = new $modName($db); + try { + $objMod = new $modName($db); - // Define disabledbyname and disabledbymodule - $disabledbyname = 0; - $disabledbymodule = 1; - $module = ''; + if (is_subclass_of($objMod, 'DolibarrTriggers')) + { + // Define disabledbyname and disabledbymodule + $disabledbyname = 0; + $disabledbymodule = 1; + $module = ''; - // Check if trigger file is disabled by name - if (preg_match('/NORUN$/i', $files[$key])) $disabledbyname = 1; - // Check if trigger file is for a particular module - if (preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php/i', $files[$key], $reg)) - { - $module = preg_replace('/^mod/i', '', $reg[2]); - $constparam = 'MAIN_MODULE_'.strtoupper($module); - if (strtolower($module) == 'all') $disabledbymodule = 0; - elseif (empty($conf->global->$constparam)) $disabledbymodule = 2; - $triggers[$j]['module'] = strtolower($module); + // Check if trigger file is disabled by name + if (preg_match('/NORUN$/i', $files[$key])) $disabledbyname = 1; + // Check if trigger file is for a particular module + if (preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php/i', $files[$key], $reg)) + { + $module = preg_replace('/^mod/i', '', $reg[2]); + $constparam = 'MAIN_MODULE_'.strtoupper($module); + if (strtolower($module) == 'all') $disabledbymodule = 0; + elseif (empty($conf->global->$constparam)) $disabledbymodule = 2; + $triggers[$j]['module'] = strtolower($module); + } + + // We set info of modules + $triggers[$j]['picto'] = $objMod->picto ?img_object('', $objMod->picto, 'class="valignmiddle pictomodule "') : img_object('', 'generic', 'class="valignmiddle pictomodule "'); + $triggers[$j]['file'] = $files[$key]; + $triggers[$j]['fullpath'] = $fullpath[$key]; + $triggers[$j]['relpath'] = $relpath[$key]; + $triggers[$j]['iscoreorexternal'] = $iscoreorexternal[$key]; + $triggers[$j]['version'] = $objMod->getVersion(); + $triggers[$j]['status'] = img_picto($langs->trans("Active"), 'tick'); + if ($disabledbyname > 0 || $disabledbymodule > 1) $triggers[$j]['status'] = ''; + + $text = ''.$langs->trans("Description").':
    '; + $text .= $objMod->getDesc().'
    '; + $text .= '
    '.$langs->trans("Status").':
    '; + if ($disabledbyname == 1) + { + $text .= $langs->trans("TriggerDisabledByName").'
    '; + if ($disabledbymodule == 2) $text .= $langs->trans("TriggerDisabledAsModuleDisabled", $module).'
    '; + } + else + { + if ($disabledbymodule == 0) $text .= $langs->trans("TriggerAlwaysActive").'
    '; + if ($disabledbymodule == 1) $text .= $langs->trans("TriggerActiveAsModuleActive", $module).'
    '; + if ($disabledbymodule == 2) $text .= $langs->trans("TriggerDisabledAsModuleDisabled", $module).'
    '; + } + } + else { + print 'Error: Trigger '.$modName.' does not extends DolibarrTriggers
    '; + } } - - // We set info of modules - $triggers[$j]['picto'] = $objMod->picto ?img_object('', $objMod->picto, 'class="valignmiddle pictomodule "') : img_object('', 'generic', 'class="valignmiddle pictomodule "'); - $triggers[$j]['file'] = $files[$key]; - $triggers[$j]['fullpath'] = $fullpath[$key]; - $triggers[$j]['relpath'] = $relpath[$key]; - $triggers[$j]['iscoreorexternal'] = $iscoreorexternal[$key]; - $triggers[$j]['version'] = $objMod->getVersion(); - $triggers[$j]['status'] = img_picto($langs->trans("Active"), 'tick'); - if ($disabledbyname > 0 || $disabledbymodule > 1) $triggers[$j]['status'] = ''; - - $text = ''.$langs->trans("Description").':
    '; - $text .= $objMod->getDesc().'
    '; - $text .= '
    '.$langs->trans("Status").':
    '; - if ($disabledbyname == 1) - { - $text .= $langs->trans("TriggerDisabledByName").'
    '; - if ($disabledbymodule == 2) $text .= $langs->trans("TriggerDisabledAsModuleDisabled", $module).'
    '; - } - else - { - if ($disabledbymodule == 0) $text .= $langs->trans("TriggerAlwaysActive").'
    '; - if ($disabledbymodule == 1) $text .= $langs->trans("TriggerActiveAsModuleActive", $module).'
    '; - if ($disabledbymodule == 2) $text .= $langs->trans("TriggerDisabledAsModuleDisabled", $module).'
    '; + catch(Exception $e) { + print $e->getMessage(); } $triggers[$j]['info'] = $text; diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 9543cf74442..f9d27fedfa4 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2295,9 +2295,11 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it { print img_object($alttext, 'generic', 'class="inline-block valignmiddle"'); } - print 'getVersion(1).'">'; - print $this->getVersion(1); - print ''; + if ($this->isCoreOrExternalModule() == 'external') { + print 'getVersion(1).'">'; + print $this->getVersion(1); + print ''; + } /*print ''; print '
    '; @@ -2313,7 +2315,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it print '
    - '.$this->getName().' + '.$this->getName().' '.nl2br($this->getDesc()).''; /*print 'getVersion(1).'">'; diff --git a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php index 27138e6099f..e6c2df36ee1 100644 --- a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php +++ b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; /** * Class of triggers for stripe module */ -class InterfaceStripe +class InterfaceStripe extends DolibarrTriggers { /** * @var DoliDB Database handler. diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 3138cd8bfd9..3d9c392f32b 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -8,7 +8,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> */ .info-box-module-external span.info-box-icon-version { - background: #999; + background: #bbb; } .info-box { @@ -74,7 +74,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> height: 80px; width: 80px; font-size: 25px; - line-height: 80px; + line-height: 100px; } .info-box-module .info-box-icon { height: 106px; From 7c01b54d73237b39e8ee45ca0e5784ba8c666adc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 15:42:37 +0200 Subject: [PATCH 381/456] Fix version on module list --- htdocs/admin/modules.php | 4 +++- htdocs/core/modules/DolibarrModules.class.php | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 6a0ff450346..c0f1991835b 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -680,7 +680,9 @@ if ($mode == 'common' || $mode == 'commonkanban') if (preg_match('/development/i', $version)) $versiontrans .= img_warning($langs->trans("Development"), 'style="float: left"'); if (preg_match('/experimental/i', $version)) $versiontrans .= img_warning($langs->trans("Experimental"), 'style="float: left"'); if (preg_match('/deprecated/i', $version)) $versiontrans .= img_warning($langs->trans("Deprecated"), 'style="float: left"'); - $versiontrans .= $objMod->getVersion(1); + if ($objMod->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { + $versiontrans .= $objMod->getVersion(1); + } // Define imginfo $imginfo = "info"; diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index f9d27fedfa4..384c4fc3a7e 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -2295,8 +2295,14 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it { print img_object($alttext, 'generic', 'class="inline-block valignmiddle"'); } - if ($this->isCoreOrExternalModule() == 'external') { - print 'getVersion(1).'">'; + + $version = $this->getVersion(0); + $versiontrans = ''; + if (preg_match('/development/i', $version)) $versiontrans .= 'warning'; + if (preg_match('/experimental/i', $version)) $versiontrans .= 'warning'; + if (preg_match('/deprecated/i', $version)) $versiontrans .= 'warning'; + if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) { + print 'getVersion(1).'">'; print $this->getVersion(1); print ''; } From 3d26351c6b4de6444a4f7230cbfa0d93d165e7e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 16:03:31 +0200 Subject: [PATCH 382/456] Fix function if hours. --- htdocs/core/lib/date.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index ae138bcceec..a751f584564 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -912,7 +912,7 @@ function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0, $nbOpenDay=$lastday; - if ($inhour == 1) $nbOpenDay = $nbOpenDay*24 . $langs->trans("HourShort"); + if ($inhour == 1) $nbOpenDay = ($nbOpenDay * 24); return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday)); } else From b26c1757e6ab26142aa57ab27e53cb847db47b93 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 16:07:23 +0200 Subject: [PATCH 383/456] Prepare v13 --- .../install/mysql/migration/12.0.0-13.0.0.sql | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 htdocs/install/mysql/migration/12.0.0-13.0.0.sql diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql new file mode 100644 index 00000000000..210fe31d1ef --- /dev/null +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -0,0 +1,36 @@ +-- +-- Be carefull to requests order. +-- This file must be loaded by calling /install/index.php page +-- when current version is 13.0.0 or higher. +-- +-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y +-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y +-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; +-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; +-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); +-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; +-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60); +-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name; +-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field); +-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table +-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex +-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- To make pk to be auto increment (postgres): +-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid; +-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid); +-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq'); +-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table; +-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL; +-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL; +-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL; +-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL; +-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL; +-- Note: fields with type BLOB/TEXT can't have default value. + + +-- Missing in v12 + + +-- For v13 + + From 9becb24073c6fc90230289ee0b33170ff517d6a1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 16:40:40 +0200 Subject: [PATCH 384/456] Prepare v13 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 0780154118e..b70419de5f4 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (!defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE', 'Dolibarr'); -if (!defined('DOL_VERSION')) define('DOL_VERSION', '12.0.0-alpha'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (!defined('DOL_VERSION')) define('DOL_VERSION', '13.0.0-alpha'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (!defined('EURO')) define('EURO', chr(128)); From 215cf9e6f804cba007c44cc7c08a68e3b2b38a9a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 16:45:32 +0200 Subject: [PATCH 385/456] Prepare v13 --- htdocs/install/check.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 95e3082cb56..408f4b2a1a8 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -479,7 +479,8 @@ else array('from'=>'8.0.0', 'to'=>'9.0.0'), array('from'=>'9.0.0', 'to'=>'10.0.0'), array('from'=>'10.0.0', 'to'=>'11.0.0'), - array('from'=>'11.0.0', 'to'=>'12.0.0') + array('from'=>'11.0.0', 'to'=>'12.0.0'), + array('from'=>'12.0.0', 'to'=>'13.0.0') ); $count = 0; From 499c2ea30a63c4b5b575576ce02f37f7e554e9b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 16:52:21 +0200 Subject: [PATCH 386/456] FIX #13855 --- htdocs/core/lib/ajax.lib.php | 2 +- htdocs/main.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 64f442633de..1d3e80b90be 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -20,7 +20,7 @@ /** * \file htdocs/core/lib/ajax.lib.php - * \brief Page called by Ajax request for produts + * \brief Page called to enhance interface with Javascript and Ajax features. */ diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index d4d1f84a344..49c48e34ec1 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -317,7 +317,7 @@ if (!defined('NOLOGIN') && !defined('NOIPCHECK') && !empty($dolibarr_main_restri // Loading of additional presentation includes if (!defined('NOREQUIREHTML')) require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; // Need 660ko memory (800ko in 2.2) -if (!defined('NOREQUIREAJAX') && $conf->use_javascript_ajax) require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; // Need 22ko memory +require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; // Need 22ko memory // If install or upgrade process not done or not completely finished, we call the install page. if (!empty($conf->global->MAIN_NOT_INSTALLED) || !empty($conf->global->MAIN_NOT_UPGRADED)) From 949e0f2326a6f3268b511110903aec472315b5b4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 17:27:12 +0200 Subject: [PATCH 387/456] Fix filter on language --- htdocs/website/class/websitepage.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 84eaf0efb27..c63823f51a1 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -332,7 +332,11 @@ class WebsitePage extends CommonObject if ($key == 't.rowid' || $key == 't.fk_website') { $sqlwhere[] = $key.'='.$value; } elseif ($key == 'lang' || $key == 't.lang') { - $sqlwhere[] = $key." = '".$this->db->escape(substr($value, 0, 2))."'"; + $listoflang = array(); + foreach(explode(',', $value) as $tmpvalue) { + $listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'"; + } + $sqlwhere[] = $key." IN (".join(',', $listoflang).")"; } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } From 991996697dd5e1f529d9e1a36eff465e4256ebf3 Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Thu, 14 May 2020 18:03:22 +0200 Subject: [PATCH 388/456] Public photos for customers with TakePOS --- htdocs/takepos/genimg/index.php | 6 +++--- htdocs/takepos/phone.php | 4 ++-- htdocs/takepos/public/auto_order.php | 1 + htdocs/viewimage.php | 12 ++++++++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index a5686054193..c2bb62b9322 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -25,7 +25,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -require '../../main.inc.php'; // Load $user and permissions +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../../main.inc.php'; // Load $user and permissions $id = GETPOST('id', 'int'); $w = GETPOST('w', 'int'); @@ -72,12 +72,12 @@ elseif ($query == "pro") $objProd = new Product($db); $objProd->fetch($id); - $image = $objProd->show_photos('product', $conf->product->multidir_output[$entity], 'small', 1); + $image = $objProd->show_photos('product', $conf->product->multidir_output[$objProd->entity], 'small', 1); preg_match('@src="([^"]+)"@', $image, $match); $file = array_pop($match); if ($file == "") header('Location: ../../public/theme/common/nophoto.png'); - else header('Location: '.$file.'&cache=1'); + else header('Location: '.$file.'&cache=1&publictakepos=1'); } else { diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 8714173e45f..d506c64d2fc 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -77,7 +77,7 @@ if ($action=="productinfo"){ $prod = new Product($db); $prod->fetch($idproduct); print "".$prod->label."
    "; - print ''; + print ''; print "
    ".$prod->description; print "
    ".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; print '
    '; @@ -95,7 +95,7 @@ elseif ($action=="editline"){ $prod = new Product($db); $prod->fetch($line->fk_product); print "".$prod->label."
    "; - print ''; + print ''; print "
    ".$prod->description; print "
    ".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; print '
    '; diff --git a/htdocs/takepos/public/auto_order.php b/htdocs/takepos/public/auto_order.php index c7612711df0..910c00327b4 100644 --- a/htdocs/takepos/public/auto_order.php +++ b/htdocs/takepos/public/auto_order.php @@ -33,4 +33,5 @@ $_SESSION["takeposterminal"] = 1; define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1); if (GETPOSTISSET("mobilepage")) require '../invoice.php'; +elseif (GETPOSTISSET("genimg")) require DOL_DOCUMENT_ROOT.'/takepos/genimg/index.php'; else require '../phone.php'; diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index 3cb23b36fbc..39795b62fd8 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -59,6 +59,14 @@ if ((isset($_GET["modulepart"]) && $_GET["modulepart"] == 'medias')) if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip } +// Used by TakePOS Auto Order +if (isset($_GET["publictakepos"])) +{ + if (!defined("NOLOGIN")) define("NOLOGIN", 1); + if (!defined("NOCSRFCHECK")) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site. + if (!defined("NOIPCHECK")) define("NOIPCHECK", 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip +} + // For multicompany $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); if (is_numeric($entity)) define("DOLENTITY", $entity); @@ -195,6 +203,10 @@ if (!empty($hashp)) $accessallowed = 1; // When using hashp, link is public so we force $accessallowed $sqlprotectagainstexternals = ''; } +elseif ($conf->global->TAKEPOS_AUTO_ORDER && isset($_GET["publictakepos"])) +{ + $accessallowed = 1; // Only if TakePOS Public Auto Order is enabled and received publictakepos variable +} else { // Basic protection (against external users only) From 1bf677f53735d66bbb4e0a7e9c9a8896ec99e95d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 18:14:55 +0200 Subject: [PATCH 389/456] Can set status of a websitepage --- htdocs/core/ajax/objectonoff.php | 11 ++++++++--- htdocs/core/class/commonobject.class.php | 5 ++++- htdocs/core/lib/security.lib.php | 1 + htdocs/website/index.php | 14 +++++++++++++- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php index dd39bce6d4e..6466df89a07 100644 --- a/htdocs/core/ajax/objectonoff.php +++ b/htdocs/core/ajax/objectonoff.php @@ -43,9 +43,9 @@ if (!empty($user->socid)) { $socid = $user->socid; } -if (empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { +/*if (empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { accessforbidden('Calling this file is allowed only when MAIN_DIRECT_STATUS_UPDATE is set'); -} +}*/ /* @@ -75,5 +75,10 @@ if (($action == 'set') && !empty($id)) { $triggerkey = 'COMPANY_UPDATE'; } - $object->setValueFrom($field, $value, $element, $id, $user, $triggerkey); + $tablename = $element; + if ($tablename == 'websitepage') $tablename = 'website_page'; + + $format = 'int'; + + $object->setValueFrom($field, $value, $tablename, $id, $format, '', $user, $triggerkey); } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f3f1b9eaee3..6148b55a5cf 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -8070,7 +8070,10 @@ abstract class CommonObject { if (empty($id) && empty($ref) && empty($morewhere)) return -1; - $sql = 'SELECT '.$this->getFieldList(); + $fieldlist = $this->getFieldList(); + if (empty($fieldlist)) return 0; + + $sql = 'SELECT '.$fieldlist; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element; if (!empty($id)) $sql .= ' WHERE rowid = '.$id; diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 6749f32ffbe..03f1525eb91 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -192,6 +192,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f if ($features == 'mo') $features = 'mrp'; if ($features == 'member') $features = 'adherent'; if ($features == 'subscription') { $features = 'adherent'; $feature2 = 'cotisation'; }; + if ($features == 'websitepage') $features = 'website'; // Get more permissions checks from hooks $parameters = array('features'=>$features, 'objectid'=>$objectid, 'idtype'=>$dbt_select); diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 690dc0efe3b..ac26f2ee7bb 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3170,6 +3170,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') $pageauthorid = $objectpage->fk_user_creat; $pageusermodifid = $objectpage->fk_user_modif; $pageauthoralias = $objectpage->author_alias; + $pagestatus = $objectpage->status; } else { @@ -3178,6 +3179,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') $pageauthorid = $user->id; $pageusermodifid = 0; $pageauthoralias = ''; + $pagestatus = 1; } if (GETPOST('WEBSITE_TITLE', 'alpha')) $pagetitle = GETPOST('WEBSITE_TITLE', 'alpha'); if (GETPOST('WEBSITE_PAGENAME', 'alpha')) $pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha'); @@ -3186,7 +3188,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') if (GETPOST('WEBSITE_IMAGE', 'alpha')) $pageimage = GETPOST('WEBSITE_IMAGE', 'alpha'); if (GETPOST('WEBSITE_KEYWORDS', 'alpha')) $pagekeywords = GETPOST('WEBSITE_KEYWORDS', 'alpha'); if (GETPOST('WEBSITE_LANG', 'aZ09')) $pagelang = GETPOST('WEBSITE_LANG', 'aZ09'); - if (GETPOST('htmlheader', 'none')) $pagehtmlheader = GETPOST('htmlheader', 'none'); + if (GETPOST('htmlheader', 'none')) $pagehtmlheader = GETPOST('htmlheader', 'none'); // Title print '
    '; + if ($action != 'createcontainer') + { + print ''; + } + print '
    attributes[$object->table_element]['required'][$key])) print ' fieldrequired'; print '">'; if (!empty($extrafields->attributes[$object->table_element]['help'][$key])) print $form->textwithpicto($langs->trans($label), $langs->trans($extrafields->attributes[$object->table_element]['help'][$key])); @@ -161,6 +175,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] //print 'x'.$object->array_options['options_' . $key].'-'.$datenotinstring.' - '.dol_print_date($datenotinstring, 'dayhour'); $value = isset($_POST["options_".$key]) ? dol_mktime($_POST["options_".$key."hour"], $_POST["options_".$key."min"], 0, $_POST["options_".$key."month"], $_POST["options_".$key."day"], $_POST["options_".$key."year"]) : $datenotinstring; } + //TODO Improve element and rights detection if ($action == 'edit_extras' && $permok && GETPOST('attribute', 'none') == $key) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 60c7ee43bb0..2f5e10c1459 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1751,7 +1751,7 @@ img.photorefnoborder { border-bottom: px solid rgb(); /* border-bottom: 2px solid var(--colorbackhmenu1); */ } -.trextrafieldseparator td { +.trextrafieldseparator td, .trextrafields_collapse_last td { /* border-bottom: 2px solid var(--colorbackhmenu1) !important; */ border-bottom: 2px solid rgb() !important; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index c7ce5709efd..da2df5eb788 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -1799,7 +1799,7 @@ img.photorefnoborder { border-bottom: px solid rgb(); } -.trextrafieldseparator td { +.trextrafieldseparator td, .trextrafields_collapse_last td { border-bottom: 1px solid rgb() !important; } .tdhrthin { From a796122f7b0e1050df2fe5ac635107e4aa3750be Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 12:28:17 +0200 Subject: [PATCH 376/456] Fix to solve feedbacks of https://www.dolibarr.fr/forum/t/email-collector-avec-office-365-bug-et-contournement/32726 --- .../class/emailcollector.class.php | 20 +++++++++++++++---- .../install/mysql/migration/11.0.0-12.0.0.sql | 2 ++ .../llx_emailcollector_emailcollector.sql | 3 ++- htdocs/langs/en_US/admin.lang | 1 + 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 11cf2477720..969b83cac5a 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -100,8 +100,9 @@ class EmailCollector extends CommonObject 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'help'=>'Example: MyCollector1'), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'), 'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1), - 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'), - 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), + 'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>90, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'), + 'hostcharset' => array('type'=>'varchar(16)', 'label'=>'HostCharset', 'visible'=>-1, 'enabled'=>1, 'position'=>91, 'notnull'=>0, 'searchall'=>0, 'comment'=>"IMAP server charset", 'help'=>'Example: "UTF-8" (May be "US-ASCII" with some Office365)'), + 'login' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>-1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myaccount@gmail.com'), 'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>-1, 'comment'=>"IMAP password", 'help'=>'WithGMailYouCanCreateADedicatedPassword'), 'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox', 'help'=>'Example: INBOX'), //'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105), @@ -173,6 +174,7 @@ class EmailCollector extends CommonObject public $host; + public $hostcharset; public $login; public $password; public $source_directory; @@ -985,9 +987,10 @@ class EmailCollector extends CommonObject $nbemailprocessed = 0; $nbemailok = 0; $nbactiondone = 0; + $charset = ($this->hostcharset ? $this->hostcharset : "UTF-8"); // Scan IMAP inbox - $arrayofemail = imap_search($connection, $search, null, "UTF-8"); + $arrayofemail = imap_search($connection, $search, null, $charset); if ($arrayofemail === false) { // Nothing found or search string not understood @@ -1086,6 +1089,7 @@ class EmailCollector extends CommonObject } $header = imap_fetchheader($connection, $imapemail, 0); + $header = preg_replace('/\r\n\s+/m', ' ', $header); // When a header line is on several lines, merge lines $matches = array(); preg_match_all('/([^: ]+): (.+?(?:\r\n\s(?:.+?))*)\r\n/m', $header, $matches); $headers = array_combine($matches[1], $matches[2]); @@ -1132,7 +1136,10 @@ class EmailCollector extends CommonObject // Can use also imap_mime_header_decode($str) // Can use also mb_decode_mimeheader($str) // Can use also iconv_mime_decode($str, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8') - if (function_exists('imap_mime_header_decode')) { + if (function_exists('iconv_mime_decode')) { + $overview[0]->subject = iconv_mime_decode($overview[0]->subject, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8'); + } + elseif (function_exists('imap_mime_header_decode')) { $elements = imap_mime_header_decode($overview[0]->subject); $newstring = ''; if (!empty($elements)) { @@ -1146,6 +1153,8 @@ class EmailCollector extends CommonObject elseif (function_exists('mb_decode_mimeheader')) { $overview[0]->subject = mb_decode_mimeheader($overview[0]->subject); } + // Removed emojis + $overview[0]->subject = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $overview[0]->subject); // Parse IMAP email structure global $htmlmsg, $plainmsg, $charset, $attachments; @@ -1153,6 +1162,9 @@ class EmailCollector extends CommonObject //$htmlmsg,$plainmsg,$charset,$attachments $messagetext = $plainmsg ? $plainmsg : dol_string_nohtmltag($htmlmsg, 0); + // Removed emojis + $messagetext = preg_replace('/[\x{10000}-\x{10FFFF}]/u', "\xEF\xBF\xBD", $messagetext); + /*var_dump($plainmsg); var_dump($htmlmsg); var_dump($messagetext);*/ diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 8a68e763160..7daf41a05d3 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -285,3 +285,5 @@ ALTER TABLE llx_prelevement_facture ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); UPDATE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; + +ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN hostcharset varchar(16) DEFAULT 'UTF-8'; diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index 10f3e4f8b9b..87581f418e8 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -21,7 +21,8 @@ CREATE TABLE llx_emailcollector_emailcollector( ref varchar(128) NOT NULL, label varchar(255), description text, - host varchar(255), + host varchar(255), + hostcharset varchar(16) DEFAULT 'UTF-8', login varchar(128), password varchar(128), source_directory varchar(255) NOT NULL, diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 1bd7f3d0297..5ce79a12231 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -40,6 +40,7 @@ WebUserGroup=Web server user/group NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (%s) may be protected (for example by OS permissions or by PHP directive open_basedir). DBStoringCharset=Database charset to store data DBSortingCharset=Database charset to sort data +HostCharset=Host charset ClientCharset=Client charset ClientSortingCharset=Client collation WarningModuleNotActive=Module %s must be enabled From ae0e6e4dc8e449be6c0354d1849bc71f80c35355 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 14:10:04 +0200 Subject: [PATCH 377/456] FIX dol_concatdesc to escape < Better help --- htdocs/admin/emailcollector_card.php | 4 ++-- htdocs/core/class/translate.class.php | 2 +- htdocs/core/lib/functions.lib.php | 9 +++++---- htdocs/emailcollector/class/emailcollector.class.php | 9 +++++++-- htdocs/langs/en_US/admin.lang | 2 +- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 74592ff777a..80161eaadc6 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -592,7 +592,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; $htmltext = $langs->transnoentitiesnoconv("OperationParamDesc"); //var_dump($htmltext); - print $form->textwithpicto('', $htmltext); + print $form->textwithpicto('', $htmltext, 1, 'help', '', 0, 2, 'operationparamtt'); print ''; - print ''.img_edit().''; + print ''.img_edit().''; print ' '.img_delete().''; print '
    '; @@ -3381,6 +3383,16 @@ if ($action == 'editmeta' || $action == 'createcontainer') print $doleditor->Create(1, '', true, 'HTML Header', 'html'); print '
    '; + print $langs->trans('Status'); + print ''; + print ajax_object_onoff($objectpage, 'status', 'status', 'Enabled', 'Disabled'); + //print dol_print_date($pagedatecreation, 'dayhour'); + print '
    '; if ($action == 'createcontainer') { From 7daef0d146d1e5145ab44f6a46c52b15a5b525a8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 18:17:08 +0200 Subject: [PATCH 390/456] Fix bad parameters of function --- htdocs/core/ajax/objectonoff.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php index dd39bce6d4e..f7bf1d6299c 100644 --- a/htdocs/core/ajax/objectonoff.php +++ b/htdocs/core/ajax/objectonoff.php @@ -75,5 +75,10 @@ if (($action == 'set') && !empty($id)) { $triggerkey = 'COMPANY_UPDATE'; } - $object->setValueFrom($field, $value, $element, $id, $user, $triggerkey); + $tablename = $element; + if ($tablename == 'websitepage') $tablename = 'website_page'; + + $format = 'int'; + + $object->setValueFrom($field, $value, $tablename, $id, $format, '', $user, $triggerkey); } From d8ee049b4c57491112ecfbbb42e9d3949e0d4468 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 18:41:31 +0200 Subject: [PATCH 391/456] Can select not defined language --- htdocs/website/class/websitepage.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index c63823f51a1..edf1eed51a7 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -333,10 +333,17 @@ class WebsitePage extends CommonObject $sqlwhere[] = $key.'='.$value; } elseif ($key == 'lang' || $key == 't.lang') { $listoflang = array(); + $foundnull = 0; foreach(explode(',', $value) as $tmpvalue) { + if ($tmpvalue == 'null') { + $foundnull++; + continue; + } $listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'"; } - $sqlwhere[] = $key." IN (".join(',', $listoflang).")"; + $stringtouse = $key." IN (".join(',', $listoflang).")"; + if ($foundnull) $stringtouse = '('.$stringtouse.' OR '.$key.' IS NULL)'; + $sqlwhere[] = $stringtouse; } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } From 4cf7f68b6cbc3d3b7d2d9c9d0655468690f9214b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 18:44:05 +0200 Subject: [PATCH 392/456] Fix search on pages --- htdocs/website/class/websitepage.class.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index c63823f51a1..3e518d4d633 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -329,14 +329,23 @@ class WebsitePage extends CommonObject $sqlwhere = array(); if (count($filter) > 0) { foreach ($filter as $key => $value) { - if ($key == 't.rowid' || $key == 't.fk_website') { + if ($key == 't.rowid' || $key == 't.fk_website' || $key == 'status') { $sqlwhere[] = $key.'='.$value; + } elseif ($key == 'type_container') { + $sqlwhere[] = $key."='".$value."'"; } elseif ($key == 'lang' || $key == 't.lang') { $listoflang = array(); + $foundnull = 0; foreach(explode(',', $value) as $tmpvalue) { + if ($tmpvalue == 'null') { + $foundnull++; + continue; + } $listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'"; } - $sqlwhere[] = $key." IN (".join(',', $listoflang).")"; + $stringtouse = $key." IN (".join(',', $listoflang).")"; + if ($foundnull) $stringtouse = '('.$stringtouse.' OR '.$key.' IS NULL)'; + $sqlwhere[] = $stringtouse; } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } From 40fa0933ebfe2e128e8282999e126c136f0c2511 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 18:44:21 +0200 Subject: [PATCH 393/456] Fix on sarch pages --- htdocs/website/class/websitepage.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index edf1eed51a7..3e518d4d633 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -329,8 +329,10 @@ class WebsitePage extends CommonObject $sqlwhere = array(); if (count($filter) > 0) { foreach ($filter as $key => $value) { - if ($key == 't.rowid' || $key == 't.fk_website') { + if ($key == 't.rowid' || $key == 't.fk_website' || $key == 'status') { $sqlwhere[] = $key.'='.$value; + } elseif ($key == 'type_container') { + $sqlwhere[] = $key."='".$value."'"; } elseif ($key == 'lang' || $key == 't.lang') { $listoflang = array(); $foundnull = 0; From a660fd61c9495f4faa3ca10eda2333d86bd1ca7c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 18:55:20 +0200 Subject: [PATCH 394/456] Fix lang must be set to null and not 0 when not defined --- htdocs/website/class/websitepage.class.php | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 3e518d4d633..2a72a222265 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -108,6 +108,29 @@ class WebsitePage extends CommonObject const STATUS_VALIDATED = 1; + /** + * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM) + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * 'index' if we want an index in database. + * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). + * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. + * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). + * 'css' is the CSS style to use on field. For example: 'maxwidth200' + * 'help' is a string visible as a tooltip on field + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel") + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * + * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor. + */ // BEGIN MODULEBUILDER PROPERTIES /** @@ -122,7 +145,7 @@ class WebsitePage extends CommonObject 'description' =>array('type'=>'varchar(255)', 'label'=>'Description', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1), 'image' =>array('type'=>'varchar(255)', 'label'=>'Image', 'enabled'=>1, 'visible'=>1, 'position'=>32, 'searchall'=>0, 'help'=>'Relative path of media. Used if Type is "blogpost"'), 'keywords' =>array('type'=>'varchar(255)', 'label'=>'Keywords', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0), - 'lang' =>array('type'=>'varchar(6)', 'label'=>'Lang', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0), + 'lang' =>array('type'=>'varchar(6)', 'label'=>'Lang', 'enabled'=>1, 'notnull'=>-1, 'visible'=>1, 'position'=>45, 'searchall'=>0), //'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'position'=>1000), 'fk_website' =>array('type'=>'integer', 'label'=>'WebsiteId', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>40, 'searchall'=>0, 'foreignkey'=>'websitepage.rowid'), 'fk_page' =>array('type'=>'integer', 'label'=>'ParentPageId', 'enabled'=>1, 'visible'=>1, 'notnull'=>-1, 'position'=>45, 'searchall'=>0, 'foreignkey'=>'website.rowid'), From 0842259012f041d7f0ed33dbcf9be5d0fc97ddd3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 May 2020 18:55:20 +0200 Subject: [PATCH 395/456] Fix lang must be set to null and not 0 when not defined --- htdocs/website/class/websitepage.class.php | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/htdocs/website/class/websitepage.class.php b/htdocs/website/class/websitepage.class.php index 3e518d4d633..2a72a222265 100644 --- a/htdocs/website/class/websitepage.class.php +++ b/htdocs/website/class/websitepage.class.php @@ -108,6 +108,29 @@ class WebsitePage extends CommonObject const STATUS_VALIDATED = 1; + /** + * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM) + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * 'index' if we want an index in database. + * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). + * 'searchall' is 1 if we want to search in this field when making a search from the quick search button. + * 'isameasure' must be set to 1 if you want to have a total on list for this field. Field type must be summable like integer or double(24,8). + * 'css' is the CSS style to use on field. For example: 'maxwidth200' + * 'help' is a string visible as a tooltip on field + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel") + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * + * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor. + */ // BEGIN MODULEBUILDER PROPERTIES /** @@ -122,7 +145,7 @@ class WebsitePage extends CommonObject 'description' =>array('type'=>'varchar(255)', 'label'=>'Description', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1), 'image' =>array('type'=>'varchar(255)', 'label'=>'Image', 'enabled'=>1, 'visible'=>1, 'position'=>32, 'searchall'=>0, 'help'=>'Relative path of media. Used if Type is "blogpost"'), 'keywords' =>array('type'=>'varchar(255)', 'label'=>'Keywords', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0), - 'lang' =>array('type'=>'varchar(6)', 'label'=>'Lang', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'searchall'=>0), + 'lang' =>array('type'=>'varchar(6)', 'label'=>'Lang', 'enabled'=>1, 'notnull'=>-1, 'visible'=>1, 'position'=>45, 'searchall'=>0), //'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'index'=>true, 'position'=>1000), 'fk_website' =>array('type'=>'integer', 'label'=>'WebsiteId', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>40, 'searchall'=>0, 'foreignkey'=>'websitepage.rowid'), 'fk_page' =>array('type'=>'integer', 'label'=>'ParentPageId', 'enabled'=>1, 'visible'=>1, 'notnull'=>-1, 'position'=>45, 'searchall'=>0, 'foreignkey'=>'website.rowid'), From 3811586cd0654ef0d99c6369177d7b96cf35b50d Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 14 May 2020 20:34:48 +0200 Subject: [PATCH 396/456] FIX Site ec.europa.eu has moved to https:// --- htdocs/societe/checkvat/checkVatPopup.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/checkvat/checkVatPopup.php b/htdocs/societe/checkvat/checkVatPopup.php index 689df14f3d7..e1f940cfab8 100644 --- a/htdocs/societe/checkvat/checkVatPopup.php +++ b/htdocs/societe/checkvat/checkVatPopup.php @@ -28,9 +28,9 @@ require_once NUSOAP_PATH.'/nusoap.php'; $langs->load("companies"); //http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl -$WS_DOL_URL='http://ec.europa.eu/taxation_customs/vies/services/checkVatService'; +$WS_DOL_URL='https://ec.europa.eu/taxation_customs/vies/services/checkVatService'; //$WS_DOL_URL_WSDL=$WS_DOL_URL.'?wsdl'; -$WS_DOL_URL_WSDL='http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'; +$WS_DOL_URL_WSDL='https://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'; $WS_METHOD ='checkVat'; From cb98ec4d232b0be9d776e5b50a0745f307f5b016 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 15 May 2020 01:18:53 +0200 Subject: [PATCH 397/456] Fix datapolicycron --- htdocs/datapolicy/class/datapolicycron.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 0d241f75334..81e9d009a56 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -461,7 +461,7 @@ class DataPolicyCron ) ), ); - + $this->db->begin(); foreach ($arrayofparameters as $key => $params) @@ -470,15 +470,15 @@ class DataPolicyCron { $sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key); - $resql = $db->query($sql); + $resql = $this->db->query($sql); - if ($resql && $db->num_rows($resql) > 0) + if ($resql && $this->db->num_rows($resql) > 0) { - $num = $db->num_rows($resql); + $num = $this->db->num_rows($resql); $i = 0; require_once $params['file']; - $object = new $params['class']($db); + $object = new $params['class']($this->db); while ($i < $num && ! $error) { From e691045c3d6ef5ad11fd9539fc702ed706229165 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 14 May 2020 23:20:39 +0000 Subject: [PATCH 398/456] Fixing style errors. --- htdocs/datapolicy/class/datapolicycron.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 81e9d009a56..ac364c78f30 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -461,7 +461,7 @@ class DataPolicyCron ) ), ); - + $this->db->begin(); foreach ($arrayofparameters as $key => $params) From 100bfb921f0cdb97ed919ce858e8804ecc3bd68d Mon Sep 17 00:00:00 2001 From: Langlais115 Date: Fri, 15 May 2020 10:25:56 +0200 Subject: [PATCH 399/456] Fix #13805 Add proper type check to "seuil_stock_alerte" parameter. --- htdocs/product/class/product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index bb2a1652d8f..7b6892552d1 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -1015,7 +1015,7 @@ class Product extends CommonObject $sql .= ", volume = ".($this->volume != '' ? "'".$this->db->escape($this->volume)."'" : 'null'); $sql .= ", volume_units = ".($this->volume_units != '' ? "'".$this->db->escape($this->volume_units)."'" : 'null'); $sql .= ", fk_default_warehouse = ".($this->fk_default_warehouse > 0 ? $this->db->escape($this->fk_default_warehouse) : 'null'); - $sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && $this->seuil_stock_alerte != '') ? "'".$this->db->escape($this->seuil_stock_alerte)."'" : "null"); + $sql .= ", seuil_stock_alerte = ".((isset($this->seuil_stock_alerte) && is_numeric($this->seuil_stock_alerte)) ? (int) $this->seuil_stock_alerte : 'null'); $sql .= ", description = '".$this->db->escape($this->description)."'"; $sql .= ", url = ".($this->url ? "'".$this->db->escape($this->url)."'" : 'null'); $sql .= ", customcode = '".$this->db->escape($this->customcode)."'"; From bfca151d8553e7e8fe4487d7cf5d73c8459e520f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 11:58:50 +0200 Subject: [PATCH 400/456] Responsive --- htdocs/public/demo/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index c470055dbce..cbed76af71f 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -280,7 +280,7 @@ print ''; print '
    '; print '
    '; -print '
    '.$langs->trans("DemoDesc").'

    '; +print '
    '.$langs->trans("DemoDesc").'

    '; print '
    '.$langs->trans("ChooseYourDemoProfil").'
    '; print '
    '; print '
    '; From ad906fc508d3a712ddcd2133299bf0827d16a0b2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 12:43:48 +0200 Subject: [PATCH 401/456] Fix use SVG logo instead of PNG --- htdocs/cache.manifest | 2 +- htdocs/core/lib/ticket.lib.php | 6 +++--- htdocs/opensurvey/fonctions.php | 2 +- htdocs/public/demo/index.php | 2 +- htdocs/public/members/new.php | 6 +++--- htdocs/public/onlinesign/newonlinesign.php | 2 +- htdocs/public/payment/newpayment.php | 2 +- htdocs/public/payment/paymentko.php | 2 +- htdocs/public/payment/paymentok.php | 2 +- htdocs/theme/dolibarr_logo.png | Bin 9663 -> 14082 bytes htdocs/user/passwordforgotten.php | 8 ++++---- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/htdocs/cache.manifest b/htdocs/cache.manifest index ebbf1aab4eb..5e514a32a47 100644 --- a/htdocs/cache.manifest +++ b/htdocs/cache.manifest @@ -8,7 +8,7 @@ CACHE MANIFEST # Files listed under CACHE will be ALWAYS cached after they are loaded. # And they will be always used from Cache after (even after refresh). CACHE: -theme/dolibarr_logo.png +theme/dolibarr_logo.svg support/ support/index.php diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 0a50eb7407f..1b2a5c1245f 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -230,8 +230,8 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$mysoc->logo); $width = 150; - } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; } } } @@ -254,7 +254,7 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ } print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 30529b49f56..31ec69f3a42 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -121,7 +121,7 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index cbed76af71f..f0caf948770 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -274,7 +274,7 @@ print "\n"; print '
    '; print '
    '; -print ''; +print ''; print '
    '; print '
    '; diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index 5b456893bf9..7f788a84671 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -113,9 +113,9 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); $width = 150; } - elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) + elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; $width = 150; } @@ -130,7 +130,7 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/public/onlinesign/newonlinesign.php b/htdocs/public/onlinesign/newonlinesign.php index 83e757b78f8..2378728a8d3 100644 --- a/htdocs/public/onlinesign/newonlinesign.php +++ b/htdocs/public/onlinesign/newonlinesign.php @@ -191,7 +191,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index ddd1943329e..ea7fd71c9e6 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -793,7 +793,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/public/payment/paymentko.php b/htdocs/public/payment/paymentko.php index 2610219d69d..a3f6d733fcb 100644 --- a/htdocs/public/payment/paymentko.php +++ b/htdocs/public/payment/paymentko.php @@ -245,7 +245,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php index 6b7805cf473..b1d6c149a51 100644 --- a/htdocs/public/payment/paymentok.php +++ b/htdocs/public/payment/paymentok.php @@ -181,7 +181,7 @@ if ($urllogo) print '>'; print ''; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; + print ''; } print ''; } diff --git a/htdocs/theme/dolibarr_logo.png b/htdocs/theme/dolibarr_logo.png index 77c2146191034eb2b02c61b2f67c26fcf5d6aa19..c15f03c821baf1e72192ebaee9c73477f5668810 100644 GIT binary patch literal 14082 zcmch81y>wRur{v2g1dWw7lQjD!QCB#2ZzOFA-F^E;7-s$a1ZY8EQ`Cl!?(HT`wRE( zIXg4E)6-QwU0w6kQ#FyQ$}$*eBxo=&Fc@;OQtB`;a1zktJQO78cB39X54uBelaSLy zfqwi@EFz%4QJrP=++bkP7yo@>>D^~8pnnnrrFDTCPF6rqGgnI(Pft&FTSq%Lb2Dd4 zb|+Ws%rjvUXd}{pjWlh6_LeY;PS#FTQcm`^U(H-ysif6a*(BAKWPNk}pv_4BH3PT< zZJb=f z`yFh8Qg#NfQDPcd!w>lRf?$Y50$KY%^MN;y zniq)wU=nSYJhc^Wxl@oZAi$oU53-c}mE9U9Z|<|*6X~fj&pG5i(2eJU*h5;uMFLw3 zMcNGF{|?yoi~vto9-DmQ8@MOzN-JZRPI|C>Vf_F4j@X1;x8ZE0$$*n>V1c|j#*&|$Sg+68 za`a|(>b>P;uf^4)S>c@7l=As9y1ZEUjNWyx@c2dEbl)I*uPG^*uV`IySLAt4LKt17 zo2+?@|2bWDoH(RQTUy?vkAiJLD8+ANk%6vkh|j!ki(AL(-u_ydi_*Q1WRKunx!oU5 z8UpSnBM#I$6ga)}p})i$ud{$id;=COBb2*t_gGPSji2yg&jAfu{IO1M`N#L%wGhjUN<>T1)sg2_@Z zf6Avpb&lpe(Iv_UuQaY>nqwTU0Wyz8_;blM1?&uzc4W*C3`p%QA_GSEi@}{Cb#N&u zW3AQH2S6p2A`_XcF5nUMM@JBm+#|feRZ8QzMtGUQhY39tKA2uuz%K0GC+{eOlDE>} z=E)zlX$_Gm=EwhRPUqh&$+hu=X(>Ph#l4Qo;k=Y#Ml8@ zzcdVBbQ?eQ9miU450U3tGgMb>#15~pF@=tR$$PL2^TnP?hyH&dZkFe-x z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PGar|6cwE@ajzw+|xCYuCdR@V=>X23fWj-YJhC=JE4*LRh0RyimAVjz7*$1e$mwz zg#o5D)t1)-;C3p2QAYb84VlN?F%37Lq%brp1Hng_m&`>SBW&ygmw!w>m(5Qz{>SjR zBg)^D!`GI zqrRv$kXtF!m=I%VVr32Cf~J#vHcJa1rPYA%rh&S>() zAA6iNOL1XbEkzyFJFt95PM}Ort=kz{HSygo0C0Z1cqziQMAuyUhcWATfz*2!T-z<) zH_h$DrDl7@@Mi%B8&`A#fN3zBZF?-Z>0^vL`tZ!6HUuM$tU6Bw7?q5d+T@WZ+KU1l z<@Qa}#*A&aHLFQ=Mvqo=wEl=Kl3v82d>W;eTK(vqHud-}EpO3V<in%~E*I$(8gB!$>{#TDF8=G-e(iVH_jN2H!)7 z17oYoiuU-v5NPk4iWU%z>ND5@kKM~3)((q4sJ4~%o``l&ejIc8G(Lu~pw2U4EM~lh z`F#m%*iO!3aK!N~ucpF0`}vLbPXIUr&&NVxk)Uq+(aT zQPRNal03_d*~h76%Jwc(?9BC#c0_E_a@!aj!C_pY)OoLR0* zt6R2w)oQ{--M_>2eGWeVjkaYQ^|7l%lvb54r6v>C&}7Oz*=o%8HtAAobCA0VTBA+$ z+)Yfet6)iaN*PB(W;5{w^6i-zXSQ97sMvOzgXPQa4H|CeZ(6o`L)iN8*rZ7P;l>J# z(J5n&_at6-%XVbNuUs3lNqwMn`DVkGdH%%ar?yMaNyA)*u`!bDnS=q4xdv4~+W< z;)6UN9Mb2G`?~7>9}kWP$Aja+@!)uHJUAX4{||GB;Pc0uU}^vW002ovPDHLkV1luw BfOh}@ diff --git a/htdocs/user/passwordforgotten.php b/htdocs/user/passwordforgotten.php index b0f3a5aab6c..83289521538 100644 --- a/htdocs/user/passwordforgotten.php +++ b/htdocs/user/passwordforgotten.php @@ -192,13 +192,13 @@ elseif (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.' $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); $width = 128; } -elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png')) +elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.png'; + $urllogo = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/dolibarr_logo.svg'; } -elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.png')) +elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.png'; + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; } // Security graphical code From 8a2741650a6096bdad3f165ce12aa98d54aa051b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 12:46:55 +0200 Subject: [PATCH 402/456] Fix css --- htdocs/theme/eldy/global.inc.php | 3 +++ htdocs/theme/md/style.css.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index afb154408c5..a6e9258ea39 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1362,6 +1362,9 @@ td.showDragHandle { transition: left 0.5s ease; } +.demologo { + width: 200px; +} div.blockvmenulogo { border-bottom: 0 !important; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index da2df5eb788..38a9ec38fe5 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2471,6 +2471,9 @@ font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align: ; font-weight: normal; color: #999; text-decoration: none; } +.demologo { + width: 200px; +} div.blockvmenulogo { border-bottom: 0 !important; From 949ef8d7d89f413cd8b3c72eb5c5f85a9c409e20 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 12:49:22 +0200 Subject: [PATCH 403/456] Fix css --- htdocs/public/demo/demo.css | 5 ++++- htdocs/theme/eldy/global.inc.php | 3 --- htdocs/theme/md/style.css.php | 3 --- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/htdocs/public/demo/demo.css b/htdocs/public/demo/demo.css index 9328a8ecd1b..b185f8c933f 100644 --- a/htdocs/public/demo/demo.css +++ b/htdocs/public/demo/demo.css @@ -105,8 +105,11 @@ img.demothumb { object-fit: contain; height: 140px; background-position-y: bottom; + background-position-x: right; +} +.demologo { + width: 200px; } - @media only screen and (max-width: 767px) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index a6e9258ea39..afb154408c5 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1362,9 +1362,6 @@ td.showDragHandle { transition: left 0.5s ease; } -.demologo { - width: 200px; -} div.blockvmenulogo { border-bottom: 0 !important; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 38a9ec38fe5..da2df5eb788 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2471,9 +2471,6 @@ font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; } a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align: ; font-weight: normal; color: #999; text-decoration: none; } -.demologo { - width: 200px; -} div.blockvmenulogo { border-bottom: 0 !important; From 91f87d6834ad67d11caf7edc7b932993a0999029 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 13:52:35 +0200 Subject: [PATCH 404/456] Fix bad param of getNomUrl --- htdocs/compta/accounting-files.php | 12 +++---- htdocs/don/class/don.class.php | 22 +++++++++---- htdocs/loan/class/paymentloan.class.php | 42 ++++++++++++++++--------- 3 files changed, 50 insertions(+), 26 deletions(-) diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index f9bc453d999..7d8b819b75c 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -672,27 +672,27 @@ if (!empty($date_start) && !empty($date_stop)) } elseif ($data['item'] == 'ExpenseReport') { $expensereport->id = $data['id']; $expensereport->ref = $data['ref']; - print $expensereport->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $expensereport->getNomUrl(1, 0, 0, '', 0, 0); } elseif ($data['item'] == 'SalaryPayment') { $salary_payment->id = $data['id']; $salary_payment->ref = $data['ref']; - print $salary_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $salary_payment->getNomUrl(1, '', 0, '', 0); } elseif ($data['item'] == 'Donation') { $don->id = $data['id']; $don->ref = $data['ref']; - print $don->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $don->getNomUrl(1, 0, '', 0); } elseif ($data['item'] == 'SocialContributions') { $charge_sociales->id = $data['id']; $charge_sociales->ref = $data['ref']; - print $charge_sociales->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $charge_sociales->getNomUrl(1, 0, 0, 0, 0); } elseif ($data['item'] == 'VariousPayment') { $various_payment->id = $data['id']; $various_payment->ref = $data['ref']; - print $various_payment->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $various_payment->getNomUrl(1, '', 0, 0); } elseif ($data['item'] == 'LoanPayment') { $payment_loan->id = $data['id']; $payment_loan->ref = $data['ref']; - print $payment_loan->getNomUrl(1, '', 0, 0, '', 0, 0, 0); + print $payment_loan->getNomUrl(1, 0, 0, '', 0); } else { print $data['ref']; } diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 77dbd177cbd..59c293e6386 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -916,11 +916,13 @@ class Don extends CommonObject /** * Return clicable name (with picto eventually) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param int $notooltip 1=Disable tooltip - * @return string Chaine avec URL + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param int $notooltip 1=Disable tooltip + * @param string $moretitle Add more text to title tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string Chaine avec URL */ - public function getNomUrl($withpicto = 0, $notooltip = 0) + public function getNomUrl($withpicto = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1) { global $conf, $langs; @@ -928,10 +930,18 @@ class Don extends CommonObject $result = ''; $label = ''.$langs->trans("Donation").''; - if (!empty($this->id)) + if (!empty($this->id)) { $label .= '
    '.$langs->trans('Ref').': '.$this->id; + } + if ($moretitle) $label .= ' - '.$moretitle; - $linkstart = ''; + $url = DOL_URL_ROOT.'/don/card.php?id='.$this->id; + + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; + if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + + $linkstart = ''; $linkend = ''; $result .= $linkstart; diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 485d48dc443..ce152317710 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -507,25 +507,39 @@ class PaymentLoan extends CommonObject /** * Return clicable name (with eventually a picto) * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=No picto - * @param int $maxlen Max length label - * @return string Chaine with URL + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=No picto + * @param int $maxlen Max length label + * @param int $notooltip 1=Disable tooltip + * @param string $moretitle Add more text to title tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL */ - public function getNomUrl($withpicto = 0, $maxlen = 0) + public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1) { - global $langs; + global $langs, $conf; + + if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips $result = ''; - - if (!empty($this->id)) - { - $link = ''; - $linkend = ''; - - if ($withpicto) $result .= ($link.img_object($langs->trans("ShowPayment").': '.$this->ref, 'payment').$linkend.' '); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.($maxlen ?dol_trunc($this->ref, $maxlen) : $this->ref).$linkend; + $label = ''.$langs->trans("Loan").''; + if (!empty($this->id)) { + $label .= '
    '.$langs->trans('Ref').': '.$this->id; } + if ($moretitle) $label .= ' - '.$moretitle; + + $url = DOL_URL_ROOT.'/loan/payment/card.php?id='.$this->id; + + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; + if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + + $linkstart = ''; + $linkend = ''; + + $result .= $linkstart; + if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto != 2) $result .= $this->ref; + $result .= $linkend; return $result; } From 02b40ae8f60cfd76c70453d631af0c21618655ab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 13:54:05 +0200 Subject: [PATCH 405/456] Fix scrutinizer --- htdocs/core/class/interfaces.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 9302ed09afb..4199e51cb68 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -328,6 +328,8 @@ class Interfaces continue; } + $text = ''; + try { $objMod = new $modName($db); From 9699ee7263ec8b591b569251c78d5932dd630da2 Mon Sep 17 00:00:00 2001 From: Scrutinizer Auto-Fixer Date: Fri, 15 May 2020 11:55:31 +0000 Subject: [PATCH 406/456] Scrutinizer Auto-Fixes This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com --- htdocs/accountancy/bookkeeping/balance.php | 16 ++++---- htdocs/compta/accounting-files.php | 12 +++--- htdocs/core/class/interfaces.class.php | 2 +- htdocs/core/lib/date.lib.php | 2 +- htdocs/core/modules/DolibarrModules.class.php | 2 +- .../modules/rapport/pdf_paiement.class.php | 28 +++++++------- .../class/emailcollector.class.php | 2 +- htdocs/takepos/invoice.php | 2 +- htdocs/takepos/phone.php | 38 +++++++++---------- 9 files changed, 52 insertions(+), 52 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 85562ebc268..f443fded501 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -296,23 +296,23 @@ if ($action != 'export_csv') } print '
    ' . $langs->trans("SubTotal") . ':' . price($sous_total_debit) . '' . price($sous_total_credit) . '' . price(price2num($sous_total_credit - $sous_total_debit)) . '
    '.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).'
    ' . $line->numero_compte . ($root_account_description ? ' - ' . $root_account_description : '') . ''.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'
    ' . $langs->trans("SubTotal") . ':' . price($sous_total_debit) . '' . price($sous_total_credit) . '' . price(price2num($sous_total_debit - $sous_total_credit)) . '
    '.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).'
    '.$data['paid'].''.price($data['sens']?$data['amount_ht']:-$data['amount_ht'])."'.price($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'])."'.price($data['sens']?$data['amount_ttc']:-$data['amount_ttc'])."'.price($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'])."'.price($data['sens']?$data['amount_vat']:-$data['amount_vat'])."'.price($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'])."'.$data['thirdparty_name']."
    '.$langs->trans('Total').''.price(price2num($totalET_credit+$totalET_debit, 'MT')).''.price(price2num($totalIT_credit+$totalIT_debit, 'MT')).''.price(price2num($totalVAT_credit+$totalVAT_debit, 'MT')).''.price(price2num($totalET_credit + $totalET_debit, 'MT')).''.price(price2num($totalIT_credit + $totalIT_debit, 'MT')).''.price(price2num($totalVAT_credit + $totalVAT_debit, 'MT')).'
    '.$langs->trans("OpportunityProbability").' %'; - print ''; + print ' %'; + print ''; print '
    '.$langs->trans("OpportunityAmount").'
    '.$langs->trans("Budget").'
    '.$langs->trans("OpportunityProbability").' %'; + print ' %'; print ''; print '
    '.$langs->trans("OpportunityAmount").'
    '.$langs->trans("Budget").'
    '; if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { - print 'usage_opportunity ? ' checked="checked"' : '')).'"> '; + print 'usage_opportunity ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectFollowOpportunity"); print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); + print ''; print '
    '; } if (empty($conf->global->PROJECT_HIDE_TASKS)) @@ -884,8 +897,9 @@ elseif ($object->id > 0) if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + $classfortr = ($object->usage_opportunity ? '' : ' hideobject'); // Opportunity status - print '
    '.$langs->trans("OpportunityStatus").'
    '.$langs->trans("OpportunityStatus").''; print $formproject->selectOpportunityStatus('opp_status', $object->opp_status, 1, 0, 0, 0, 'inline-block valignmiddle'); print '
    '.$langs->trans("OpportunityProbability").'
    '.$langs->trans("OpportunityProbability").' %'; print ''; print '
    '.$langs->trans("OpportunityAmount").'
    '.$langs->trans("OpportunityAmount").'
    '.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).'
    '.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).' 
    '.$langs->trans("OpportunityStatus").'
    '.$langs->trans("OpportunityStatus").''; print $formproject->selectOpportunityStatus('opp_status', GETPOST('opp_status') ?GETPOST('opp_status') : $object->opp_status); print '
    '.$langs->trans("OpportunityProbability").'
    '.$langs->trans("OpportunityProbability").' %'; print ''; print '
    '.$langs->trans("OpportunityAmount").'
    '.$langs->trans("OpportunityAmount").'
    '; $filteronlist = ''; if (!empty($conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST)) $filteronlist = $conf->global->PROJECT_FILTER_FOR_THIRDPARTY_LIST; - $text = $form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300'); + $text = img_picto('', 'company').$form->select_company(GETPOST('socid', 'int'), 'socid', $filteronlist, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 widthcentpercentminusx'); if (empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) && empty($conf->dol_use_jmobile)) { $texthelp = $langs->trans("IfNeedToUseOtherObjectKeepEmpty"); @@ -680,7 +680,7 @@ if ($action == 'create' && $user->rights->projet->creer) print '
    '.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1); $arrayselected = GETPOST('categories', 'array'); - print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); + print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'widthcentpercentminusx', 0, 0); print "
    '.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).''; print img_picto('', 'globe-americas', 'class="paddingrightonly"'); - print $form->select_country((GETPOST('country_id') != '' ?GETPOST('country_id') : $object->country_id)); + print $form->select_country((GETPOST('country_id') != '' ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print '
    '.$form->editfieldkey('Phone', 'phone', '', $object, 0).'
    '.$form->editfieldkey('Fax', 'fax', '', $object, 0).'
    '.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).''.img_picto('', 'object_email').'
    '.img_picto('', 'object_email').'
    '.$form->editfieldkey('Web', 'url', '', $object, 0).''.img_picto('', 'globe').'
    '.img_picto('', 'globe').'
    '.$form->editfieldkey('Skype', 'skype', '', $object, 0).''; - // print 'skype).'">'; - // print '
    '.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).''; - // print 'twitter).'">'; - // print '
    '.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).''; - // print 'facebook).'">'; - // print '
    '.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).''; - // print 'linkedin).'">'; - // print '
    '.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; + print '
    '.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); - print ''.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; + print '
    '.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); print '
    '.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); print '
    '.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); print '
    '; print $formcompany->selectProspectCustomerType($object->client); print '
    '.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).''; print ''; - print ''; + print ''; + if ($conf->browser->layout == 'phone') print ''; print ''; + print '
    '; @@ -1879,15 +1881,18 @@ else || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) { print '
    '.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).''; + print ''.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).''; print $form->selectyesno("fournisseur", $object->fournisseur, 1); print '
    '; if (!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) { print $form->editfieldkey('SupplierCode', 'supplier_code', '', $object, 0); } - print ''; + print ''; print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''; @@ -1944,7 +1951,7 @@ else // Country print ''; @@ -1966,15 +1973,16 @@ else // Phone / Fax print ''; - print ''; + print ''; + if ($conf->browser->layout == 'phone') print ''; print ''; - print ''; + print ''; // EMail / Web print ''; - print ''; + print ''; print ''; - print ''; + print ''; if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { @@ -1990,36 +1998,9 @@ else } } } - // if (! empty($conf->socialnetworks->enabled)) - // { - // // Skype - // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - // { - // print ''; - // print ''; - // } - // // Twitter - // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - // { - // print ''; - // print ''; - // } - // // Facebook - // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - // { - // print ''; - // print ''; - // } - // // LinkedIn - // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - // { - // print ''; - // print ''; - // } - // } // Prof ids - $i = 1; $j = 0; + $i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2); while ($i <= 6) { $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); @@ -2027,13 +2008,13 @@ else { $key = 'idprof'.$i; - if (($j % 2) == 0) print ''; + if (($j % $NBCOLS) == 0) print ''; $idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY'; print ''; - if (($j % 2) == 1) print ''; + if (($j % $NBCOLS) == ($NBCOLS - 1)) print ''; $j++; } $i++; @@ -2058,7 +2039,7 @@ else print ''; } print ''; - + if ($conf->browser->layout == 'phone') print ''; print ''; + if ($conf->browser->layout == 'phone') print ''; print '"; } @@ -963,14 +963,14 @@ elseif ($object->id > 0) // Tags-Categories if ($conf->categorie->enabled) { - print '"; } From 9fb1766266877f15742627356a680d8c7babb537 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 17:14:28 +0200 Subject: [PATCH 419/456] CSS --- htdocs/core/lib/project.lib.php | 4 ++-- htdocs/projet/class/project.class.php | 8 +++++--- htdocs/projet/index.php | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 940c22a59e0..f3690694b01 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -2226,10 +2226,10 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print ''; print ''; - print ''; - print ''; + if ($NBCOLS > 1 && ($j % 2 == 1)) print ''; // Vat is used print ''; @@ -1445,11 +1445,11 @@ else //TODO: Place into a function to control showing by country or study better option if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { - print ''; + print ''; if ($conf->browser->layout == 'phone') print ''; - print ''; } @@ -2019,7 +2019,7 @@ else } $i++; } - if ($j % 2 == 1) print ''; + if ($NBCOLS > 0 && $j % 2 == 1) print ''; // VAT is used print '
    '; if ((!$object->code_fournisseur || $object->code_fournisseur == -1) && $modCodeFournisseur->code_auto) { @@ -1936,7 +1941,9 @@ else // Zip / Town print '
    '.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).''; print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth50onsmartphone'); - print ''.$form->editfieldkey('Town', 'town', '', $object, 0).''; + print '
    '.$form->editfieldkey('Town', 'town', '', $object, 0).''; print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent'); print '
    '.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).''; print img_picto('', 'globe-americas', 'class="paddingrightonly"'); - print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id'); + print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx'); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print '
    '.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).''.img_picto('', 'object_phoning').' '.img_picto('', 'object_phoning').'
    '.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).''.img_picto('', 'object_phoning_fax').'
    '.img_picto('', 'object_phoning_fax').'
    '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).''.img_picto('', 'object_email').'
    '.img_picto('', 'object_email').'
    '.$form->editfieldkey('Web', 'url', GETPOST('url', 'alpha'), $object, 0).''.img_picto('', 'globe').'
    '.img_picto('', 'globe').'
    '.$form->editfieldkey('Skype', 'skype', '', $object, 0).'
    '.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'
    '.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'
    '.$form->editfieldkey('LinkedIn', 'linkedin', '', $object, 0).'
    '.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())).''; print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code); print '
    '.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).''; print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1); if (!isOnlyOneLocalTax(2)) @@ -2132,6 +2113,7 @@ else print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print '
    '.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).''; print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); From bfbe0037b6147c0611642ce10d00141e26e6f8cb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 16:29:18 +0200 Subject: [PATCH 418/456] Fix responsive --- htdocs/projet/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index e79d5bafa59..c4a1eb9a71d 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -680,7 +680,7 @@ if ($action == 'create' && $user->rights->projet->creer) print '
    '.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1); $arrayselected = GETPOST('categories', 'array'); - print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'widthcentpercentminusx', 0, 0); + print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print "
    '.$langs->trans("Categories").''; + print '
    '.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PROJECT, '', 'parent', 64, 0, 1); $c = new Categorie($db); $cats = $c->containing($object->id, Categorie::TYPE_PROJECT); foreach ($cats as $cat) { $arrayselected[] = $cat->id; } - print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); + print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, '0'); print "
    '; - print $projectstatic->getNomUrl(1); + print $projectstatic->getNomUrl(1, '', 0, '', '-', 0 , -1, 'nowraponall'); if (!in_array('projectlabel', $hiddenfields)) print '
    '.dol_trunc($objp->title, 24).''; print '
    '; + print ''; if ($objp->fk_soc > 0) { $thirdpartystatic->id = $objp->fk_soc; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 554bc84766a..417a825a77d 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1026,18 +1026,19 @@ class Project extends CommonObject } /** - * Return clicable name (with picto eventually) + * Return clickable name (with picto eventually) * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option Variant ('', 'nolink') + * @param string $option Variant where the link point to ('', 'nolink') * @param int $addlabel 0=Default, 1=Add label into string, >1=Add first chars into string * @param string $moreinpopup Text to add into popup * @param string $sep Separator between ref and label if option addlabel is set * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param string $morecss More css on a link * @return string String with URL */ - public function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1) + public function getNomUrl($withpicto = 0, $option = '', $addlabel = 0, $moreinpopup = '', $sep = ' - ', $notooltip = 0, $save_lastsearch_value = -1, $morecss = '') { global $conf, $langs, $user, $hookmanager; @@ -1115,6 +1116,7 @@ class Project extends CommonObject if (!$this->public) $picto = 'project'; $linkstart = ''; $linkend = ''; diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 3d6903065ab..f9cab81f43c 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -318,7 +318,7 @@ if ($resql) } print '
    '; + print ''; if ($obj->socid) { $companystatic->id = $obj->socid; From 4a9960797bc84dd65c74131382ec7eede79a342d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 17:27:12 +0200 Subject: [PATCH 420/456] responsive --- htdocs/societe/card.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 96a9dd7deed..681d4a37fc9 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -1401,7 +1401,7 @@ else } $i++; } - if ($j % 2 == 1) print '
    '.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'
    '.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; + print '
    '.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); - print '
    '.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; + print ''.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).''; print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); print '
    '.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).''; From 762ca96203f6bd92050ca547a9dbe48c3324f2a3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 18:28:15 +0200 Subject: [PATCH 421/456] FIX #13841 --- htdocs/admin/dict.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 2ad521f79a2..b7f65ddf91f 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -644,6 +644,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; if ($value == 'color' && empty($_POST['color'])) continue; if ($value == 'formula' && empty($_POST['formula'])) continue; + if ($value == 'dayrule' && empty($_POST['dayrule'])) continue; if ($value == 'sortorder') continue; // For a column name 'sortorder', we use the field name 'position' if ((!isset($_POST[$value]) || $_POST[$value] == '') && (!in_array($listfield[$f], array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking')) // Fields that are not mandatory From a73eccf70d937f15bd9ebb4040e766845f177c9f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 18:41:46 +0200 Subject: [PATCH 422/456] FIX env of browser not loaded in website --- htdocs/core/website.inc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index b5053fcc814..a00de6a3b01 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -27,6 +27,18 @@ include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php'; include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php'; +// Detection browser (copy of code from main.inc.php) +if (isset($_SERVER["HTTP_USER_AGENT"]) && is_object($conf) && empty($conf->browser->name)) +{ + $tmp = getBrowserInfo($_SERVER["HTTP_USER_AGENT"]); + $conf->browser->name = $tmp['browsername']; + $conf->browser->os = $tmp['browseros']; + $conf->browser->version = $tmp['browserversion']; + $conf->browser->layout = $tmp['layout']; // 'classic', 'phone', 'tablet' + //var_dump($conf->browser); + + if ($conf->browser->layout == 'phone') $conf->dol_no_mouse_hover = 1; +} // Define $website if (!is_object($website)) { From ff84fd8118ebe747a9eb07eda0d5dfca19db0cb0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 19:01:12 +0200 Subject: [PATCH 423/456] Fix default language of user. Must separate weblangs and pagelangs. --- htdocs/core/website.inc.php | 7 ++++++- htdocs/langs/en_US/website.lang | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index a00de6a3b01..6456fabf5b3 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -60,11 +60,16 @@ if (!is_object($weblangs)) { $weblangs = new Translate('', $conf); } +if (!is_object($pagelangs)) +{ + $pagelangs = new Translate('', $conf); +} if ($pageid > 0) { $websitepage->fetch($pageid); - $weblangs->setDefaultLang($websitepage->lang ? $websitepage->lang : 'auto'); + $weblangs->setDefaultLang(empty($_COOKIE['weblangs-shortcode']) ? 'auto' : $_COOKIE['weblangs-shortcode']); + $pagelangs->setDefaultLang($websitepage->lang ? $websitepage->lang : $weblangs->shortlang); if (!defined('USEDOLIBARREDITOR') && in_array($websitepage->type_container, array('menu', 'other'))) { diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index f4d88b0d606..2c555b40c20 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -57,7 +57,7 @@ NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template SyntaxHelp=Help on specific syntax tips YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" button in editor. -YouCanEditHtmlSource=
    You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs.

    You can also include content of another Page/Container with the following syntax:
    <?php includeContainer('alias_of_container_to_include'); ?>

    You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

    To add a link to another page, use the syntax:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    To include a link to download a file stored into the documents directory, use the document.php wrapper:
    Example, for a file into documents/ecm (need to be logged), syntax is:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    For a file into documents/medias (open directory for public access), syntax is:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    For a file shared with a share link (open access using the sharing hash key of file), syntax is:
    <a href="/document.php?hashp=publicsharekeyoffile">

    To include an image stored into the documents directory, use the viewimage.php wrapper:
    Example, for an image into documents/medias (open directory for public access), syntax is:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">

    More examples of HTML or dynamic code available on the wiki documentation
    . +YouCanEditHtmlSource=
    You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    You can also include content of another Page/Container with the following syntax:
    <?php includeContainer('alias_of_container_to_include'); ?>

    You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

    To add a link to another page, use the syntax:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    To include a link to download a file stored into the documents directory, use the document.php wrapper:
    Example, for a file into documents/ecm (need to be logged), syntax is:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    For a file into documents/medias (open directory for public access), syntax is:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    For a file shared with a share link (open access using the sharing hash key of file), syntax is:
    <a href="/document.php?hashp=publicsharekeyoffile">

    To include an image stored into the documents directory, use the viewimage.php wrapper:
    Example, for an image into documents/medias (open directory for public access), syntax is:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">

    More examples of HTML or dynamic code available on the wiki documentation
    . ClonePage=Clone page/container CloneSite=Clone site SiteAdded=Website added From 8b79b7f074335f2cc3ea77a8b936121cd0b93fd6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 20:00:59 +0200 Subject: [PATCH 424/456] Update changelog --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bcbfb1a959c..67cf9513a4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -78,7 +78,7 @@ FIX: we must export company mail address on contact vcard only if contact email FIX: when we filter a list on a view status, we want this filter to be on bookmark that we create FIX: Wrong Sql on getListOfTowns api method FIX: wrong user right's name to top menu "commercial" -FIX: XSS Vulnerability +FIX: XSS Vulnerability reported by Mehmet Kelepçe / Gais Cyber Security ***** ChangeLog for 11.0.3 compared to 11.0.2 ***** FIX: unit price for selected supplier products not set. NaN was used. From 791c4b48b64feba1da952d1aef43d79a3d3fb199 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 May 2020 20:08:35 +0200 Subject: [PATCH 425/456] Fix --- htdocs/projet/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index c4a1eb9a71d..6af779a2295 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -580,7 +580,7 @@ if ($action == 'create' && $user->rights->projet->creer) print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '
    '; } - if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print ' '; $htmltext = $langs->trans("ProjectBillTimeDescription"); @@ -871,7 +871,7 @@ elseif ($object->id > 0) print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); print '
    '; } - if (!empty($conf->global->PROJECT_BILL_TIME_SPENT)) + if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_BILL_TIME_SPENT)) { print 'usage_bill_time ? ' checked="checked"' : '')).'"> '; $htmltext = $langs->trans("ProjectBillTimeDescription"); From 24f4a0be1fc420e0f09090b6e1485a895143228b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 May 2020 04:24:23 +0200 Subject: [PATCH 426/456] exclude other log files --- htdocs/admin/tools/export_files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index d9a010019a5..89abae78117 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -135,7 +135,7 @@ elseif (in_array($compression, array('gz', 'bz'))) $file .= '.tar'; // We also exclude '/temp/' dir and 'documents/admin/documents' - $cmd = "tar -cf ".$outputdir."/".$file." --exclude-vcs --exclude 'temp' --exclude 'dolibarr.log' --exclude='documents/admin/documents' -C ".dirname(DOL_DATA_ROOT)." ".basename(DOL_DATA_ROOT); + $cmd = "tar -cf ".$outputdir."/".$file." --exclude-vcs --exclude 'temp' --exclude 'dolibarr.log' --exclude 'dolibarr_*.log' --exclude='documents/admin/documents' -C ".dirname(DOL_DATA_ROOT)." ".basename(DOL_DATA_ROOT); $result = $utils->executeCLI($cmd, $outputfile); From 75ac3773523fc6cd4f2c6c5ef729a14259ede352 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 May 2020 04:26:43 +0200 Subject: [PATCH 427/456] Fix tar command --- htdocs/admin/tools/export_files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 89abae78117..de10759c92d 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -135,7 +135,7 @@ elseif (in_array($compression, array('gz', 'bz'))) $file .= '.tar'; // We also exclude '/temp/' dir and 'documents/admin/documents' - $cmd = "tar -cf ".$outputdir."/".$file." --exclude-vcs --exclude 'temp' --exclude 'dolibarr.log' --exclude 'dolibarr_*.log' --exclude='documents/admin/documents' -C ".dirname(DOL_DATA_ROOT)." ".basename(DOL_DATA_ROOT); + $cmd = "tar -cf ".$outputdir."/".$file." --exclude-vcs --exclude 'temp' --exclude 'dolibarr.log' --exclude 'dolibarr_*.log' --exclude 'documents/admin/documents' -C ".dirname(DOL_DATA_ROOT)." ".basename(DOL_DATA_ROOT); $result = $utils->executeCLI($cmd, $outputfile); From 0781e9e227443a7b31a376335517b1c99921fee3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 May 2020 14:47:12 +0200 Subject: [PATCH 428/456] CSS --- htdocs/theme/eldy/info-box.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index 3d9c392f32b..ca849c58f4b 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -76,6 +76,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> font-size: 25px; line-height: 100px; } +.opened-dash-board-wrap .info-box-sm .info-box-icon { + line-height: 80px; +} .info-box-module .info-box-icon { height: 106px; } @@ -200,6 +203,7 @@ if (!empty($conf->global->THEME_INFOBOX_COLOR_ON_BACKGROUND)) $prefix = 'backgro if (!isset($conf->global->THEME_AGRESSIVENESS_RATIO) && $prefix) $conf->global->THEME_AGRESSIVENESS_RATIO = -50; if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENESS_RATIO = GETPOST('THEME_AGRESSIVENESS_RATIO', 'int'); //var_dump($conf->global->THEME_AGRESSIVENESS_RATIO); + ?> .info-box-icon { From c85233e779099d637c18b3db4d9ba347360750ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 May 2020 15:12:28 +0200 Subject: [PATCH 429/456] Fix CSS --- htdocs/theme/eldy/info-box.inc.php | 3 +- htdocs/theme/md/info-box.inc.php | 109 +++++++++++++++++++++++++++-- 2 files changed, 104 insertions(+), 8 deletions(-) diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index ca849c58f4b..98130f1d03a 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -80,7 +80,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> line-height: 80px; } .info-box-module .info-box-icon { - height: 106px; + height: 107px; } .info-box-icon > img { max-width: 100%; @@ -175,6 +175,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> .info-box-title{ text-transform: uppercase; font-weight: bold; + padding-bottom: 4px; } .info-box-text{ font-size: 0.92em; diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index d866cab96a6..a382173bfde 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -8,21 +8,25 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> */ .info-box-module-external span.info-box-icon-version { - background: #999; -} - -span.info-box-icon-text { /* hide box text number due to problems */ - display: none; + background: #bbb; } .info-box { display: block; + position: relative; min-height: 90px; background: #fff; width: 100%; + /* box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); */ + border-radius: 2px; margin-bottom: 15px; border: 1px solid #ddd; } +.info-box.info-box-sm{ + min-height: 80px; + margin-bottom: 10px; +} + .info-box small { font-size: 14px; } @@ -53,14 +57,26 @@ span.info-box-icon-text { /* hide box text number due to problems */ } .info-box-icon { display: block; + overflow: hidden; float: left; - height: 90px; + /* height: 90px; */ width: 90px; text-align: center; font-size: 45px; line-height: 90px; background: #eee; } +.info-box-sm .info-box-icon { + width: 80px; + font-size: 25px; + line-height: 100px; +} +.opened-dash-board-wrap .info-box-sm .info-box-icon { + line-height: 80px; +} +.info-box-module .info-box-icon { + height: 108px; +} .info-box-icon > img { max-width: 100%; } @@ -71,6 +87,74 @@ span.info-box-icon-text { /* hide box text number due to problems */ padding: 5px 10px; margin-left: 90px; } + +.info-box-icon-text{ + box-sizing: border-box; + display: block; + position: absolute; + width: 90px; + bottom: 0px; + color: #ffffff; + background-color: rgba(0,0,0,0.1); + cursor: default; + + font-size: 10px; + line-height: 15px; + padding: 0px 3px; + text-align: center; + opacity: 0; + -webkit-transition: opacity 0.5s, visibility 0s 0.5s; + transition: opacity 0.5s, visibility 0s 0.5s; +} + +.info-box-icon-version { + box-sizing: border-box; + display: block; + position: absolute; + width: 90px; + bottom: 0px; + color: #ffffff; + background-color: rgba(0,0,0,0.1); + cursor: default; + + font-size: 10px; + line-height: 22px; + padding: 0px 3px; + text-align: center; + opacity: 1; + -webkit-transition: opacity 0.5s, visibility 0s 0.5s; + transition: opacity 0.5s, visibility 0s 0.5s; +} + +.box-flex-item.info-box-module.info-box-module-disabled { + /* opacity: 0.6; */ +} + +.info-box-actions { + position: absolute; + right: 0; + bottom: 0; +} + +global->MAIN_DISABLE_GLOBAL_BOXSTATS) && !empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD)) { ?> +.info-box-icon-text{ + opacity: 1; +} + + +.info-box-sm .info-box-icon-text, .info-box-sm .info-box-icon-version{ + overflow: hidden; + width: 80px; +} +.info-box:hover .info-box-icon-text{ + opacity: 1; +} + +.info-box-content { + padding: 5px 10px; + margin-left: 90px; +} + .info-box-number { display: block; font-weight: bold; @@ -88,6 +172,7 @@ span.info-box-icon-text { /* hide box text number due to problems */ .info-box-title{ text-transform: uppercase; font-weight: bold; + padding-bottom: 5px; } .info-box-text{ font-size: 12px; @@ -152,7 +237,7 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES } .fa-dol-propal:before, .fa-dol-supplier_proposal:before { - content: "\f2b5"; + content: "\f573"; } .fa-dol-facture:before, .fa-dol-invoice_supplier:before { @@ -168,6 +253,9 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES .fa-dol-contrat:before { content: "\f1e6"; } +.fa-dol-ticket:before { + content: "\f3ff"; +} .fa-dol-bank_account:before { content: "\f19c"; } @@ -261,3 +349,10 @@ if (GETPOSTISSET('THEME_AGRESSIVENESS_RATIO')) $conf->global->THEME_AGRESSIVENES height: 0; } +.info-box-module { + min-width: 350px; + max-width: 350px; +} +.info-box-module .info-box-content { + height: 7em; +} From bd4251237b8f72de09541c7dd9abecf7e37c7596 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 May 2020 15:16:40 +0200 Subject: [PATCH 430/456] css --- htdocs/theme/eldy/global.inc.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 3e213c3d8e2..c4f223ebf1f 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1624,6 +1624,13 @@ td.nobordernopadding.widthpictotitle.col-picto { width: unset; color: #999; } + +span.widthpictotitle.pictotitle { +/* background: var(--colortexttitlenotab); + color: #fff; + padding: 10px; + border-radius: 2px;*/ +} .pictotitle { margin-: 8px; /* margin-bottom: 4px; */ From ce0d00a0ae89dd014d9bd95cac70ec660e7a2a25 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 May 2020 15:50:46 +0200 Subject: [PATCH 431/456] CSS --- htdocs/theme/md/info-box.inc.php | 45 +++++++++++++++++++++++++++++--- htdocs/theme/md/style.css.php | 4 +-- 2 files changed, 43 insertions(+), 6 deletions(-) diff --git a/htdocs/theme/md/info-box.inc.php b/htdocs/theme/md/info-box.inc.php index a382173bfde..2dec0087a1b 100644 --- a/htdocs/theme/md/info-box.inc.php +++ b/htdocs/theme/md/info-box.inc.php @@ -2,10 +2,47 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> /*