From 5d4f7029209ab1d2daf0c49b417d3f34014b3956 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Sun, 15 Sep 2019 16:38:03 +0200 Subject: [PATCH 01/14] Remove bas copy / paste --- htdocs/societe/paymentmodes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index 4a34a2b360f..922fea064ec 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -481,7 +481,7 @@ if (empty($reshook)) $_POST['lang_id'] = GETPOST('lang_idrib'.GETPOST('companybankid', 'int'), 'alpha'); $_POST['model'] = GETPOST('modelrib'.GETPOST('companybankid', 'int'), 'alpha'); } - https://dashboard.stripe.com/search?query=risk_level%3Ahighest&account=acct_1CVGWQLYhjvFj9Sz + $id = $socid; $upload_dir = $conf->societe->multidir_output[$object->entity]; $permissioncreate=$user->rights->societe->creer; From eb70411ae0d7fd2faeccad56a50d5ab3d303d597 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Sep 2019 11:01:09 +0200 Subject: [PATCH 02/14] Css demo --- htdocs/public/demo/demo.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/demo/demo.css b/htdocs/public/demo/demo.css index d137b7be456..e84b67f4b7d 100644 --- a/htdocs/public/demo/demo.css +++ b/htdocs/public/demo/demo.css @@ -99,7 +99,7 @@ img.demothumb { width: 110px; } .demobackground { - background-image: url('dolibarr_demo_ban.jpg'); + background-image: linear-gradient(to bottom, rgba(200,200,255,0.8), rgba(210,220,255,0.5)), url('dolibarr_demo_ban.jpg'); background-size: cover; object-fit: contain; height: 140px; From f5dd4f4f9e9252d22de40542df2370ddea47f6ad Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Sep 2019 11:08:34 +0200 Subject: [PATCH 03/14] css --- htdocs/public/demo/demo.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/demo/demo.css b/htdocs/public/demo/demo.css index e84b67f4b7d..99cda615b48 100644 --- a/htdocs/public/demo/demo.css +++ b/htdocs/public/demo/demo.css @@ -99,7 +99,7 @@ img.demothumb { width: 110px; } .demobackground { - background-image: linear-gradient(to bottom, rgba(200,200,255,0.8), rgba(210,220,255,0.5)), url('dolibarr_demo_ban.jpg'); + background-image: linear-gradient(to bottom, rgba(250,250,255,0.7), rgba(250,250,255,0.4)), url('dolibarr_demo_ban.jpg'); background-size: cover; object-fit: contain; height: 140px; From abee6dceaa872333fc50b4afdb73a68da2c53fb5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Sep 2019 11:16:58 +0200 Subject: [PATCH 04/14] Fix css demo --- htdocs/public/demo/demo.css | 5 +++-- htdocs/public/demo/index.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/public/demo/demo.css b/htdocs/public/demo/demo.css index 99cda615b48..f84aa4ab14c 100644 --- a/htdocs/public/demo/demo.css +++ b/htdocs/public/demo/demo.css @@ -28,8 +28,9 @@ a:hover { /*border: 1px solid #bbb; border-radius: 8px; -moz-border-radius: 8px;*/ - background: -webkit-linear-gradient(bottom, rgb(255,255,255) 85%, rgb(255,255,255) 100%); + + max-width: 346px; } .csscolumns { margin-top: 6px; @@ -99,7 +100,7 @@ img.demothumb { width: 110px; } .demobackground { - background-image: linear-gradient(to bottom, rgba(250,250,255,0.7), rgba(250,250,255,0.4)), url('dolibarr_demo_ban.jpg'); + background-image: linear-gradient(to bottom, rgba(250,250,255,0.5), rgba(250,250,255,0.4)), url('dolibarr_demo_ban.jpg'); background-size: cover; object-fit: contain; height: 140px; diff --git a/htdocs/public/demo/index.php b/htdocs/public/demo/index.php index 62de885eac6..d2633d9c708 100644 --- a/htdocs/public/demo/index.php +++ b/htdocs/public/demo/index.php @@ -336,7 +336,7 @@ foreach ($demoprofiles as $profilearray) print ''."\n"; print ''."\n"; - print '
'."\n"; + print '
'."\n"; print '
'; From 23777fd5ff4ca3ed7748f49dea6461555f2ee463 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Sep 2019 11:19:02 +0200 Subject: [PATCH 05/14] Fix css --- htdocs/public/demo/demo.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/public/demo/demo.css b/htdocs/public/demo/demo.css index f84aa4ab14c..7f482367eba 100644 --- a/htdocs/public/demo/demo.css +++ b/htdocs/public/demo/demo.css @@ -23,7 +23,7 @@ a:hover { font-weight: normal; color: #444444 !important; - margin: 8px 0px 8px 2px; + margin: 8px 2px 8px 2px; /*border: 1px solid #bbb; border-radius: 8px; From 5233e7d8adcff6e95f5886a828a731050c9d63ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Sep 2019 18:29:04 +0200 Subject: [PATCH 06/14] FIX do not output return code on screen after a select of bank account --- htdocs/cashdesk/index.php | 6 +++--- htdocs/compta/bank/ligne.php | 2 +- htdocs/paybox/admin/paybox.php | 2 +- htdocs/paypal/admin/paypal.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 8bd64c76e2b..9efe1b8ed7f 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -157,7 +157,7 @@ print ''.$langs->trans("CashDeskBankAccountForSell").''; print ''; $defaultknown=0; if (! empty($conf->global->CASHDESK_ID_BANKACCOUNT_CASH) && $conf->global->CASHDESK_ID_BANKACCOUNT_CASH > 0) $defaultknown=1; // If a particular stock is defined, we disable choice -print $form->select_comptes(((GETPOST('bankid_cash') > 0)?GETPOST('bankid_cash'):$conf->global->CASHDESK_ID_BANKACCOUNT_CASH), 'CASHDESK_ID_BANKACCOUNT_CASH', 0, "courant=2", ($defaultknown?0:2)); +$form->select_comptes(((GETPOST('bankid_cash') > 0)?GETPOST('bankid_cash'):$conf->global->CASHDESK_ID_BANKACCOUNT_CASH), 'CASHDESK_ID_BANKACCOUNT_CASH', 0, "courant=2", ($defaultknown?0:2)); print ''; print "\n"; @@ -166,7 +166,7 @@ print ''.$langs->trans("CashDeskBankAccountForCheque").' print ''; $defaultknown=0; if (! empty($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE) && $conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE > 0) $defaultknown=1; // If a particular stock is defined, we disable choice -print $form->select_comptes(((GETPOST('bankid_cheque') > 0)?GETPOST('bankid_cheque'):$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE), 'CASHDESK_ID_BANKACCOUNT_CHEQUE', 0, "courant=1", ($defaultknown?0:2)); +$form->select_comptes(((GETPOST('bankid_cheque') > 0)?GETPOST('bankid_cheque'):$conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE), 'CASHDESK_ID_BANKACCOUNT_CHEQUE', 0, "courant=1", ($defaultknown?0:2)); print ''; print "\n"; @@ -175,7 +175,7 @@ print ''.$langs->trans("CashDeskBankAccountForCB").''; print ''; $defaultknown=0; if (! empty($conf->global->CASHDESK_ID_BANKACCOUNT_CB) && $conf->global->CASHDESK_ID_BANKACCOUNT_CB > 0) $defaultknown=1; // If a particular stock is defined, we disable choice -print $form->select_comptes(((GETPOST('bankid_cb') > 0)?GETPOST('bankid_cb'):$conf->global->CASHDESK_ID_BANKACCOUNT_CB), 'CASHDESK_ID_BANKACCOUNT_CB', 0, "courant=1", ($defaultknown?0:2)); +$form->select_comptes(((GETPOST('bankid_cb') > 0)?GETPOST('bankid_cb'):$conf->global->CASHDESK_ID_BANKACCOUNT_CB), 'CASHDESK_ID_BANKACCOUNT_CB', 0, "courant=1", ($defaultknown?0:2)); print ''; print "\n"; diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index 40906bfd455..7581b0c4985 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -323,7 +323,7 @@ if ($result) print ''; if (! $objp->rappro && ! $bankline->getVentilExportCompta()) { - print $form->select_comptes($acct->id, 'accountid', 0, '', 0); + $form->select_comptes($acct->id, 'accountid', 0, '', 0); } else { diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index abad76ce228..8f946a30001 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -197,7 +197,7 @@ if (! empty($conf->banque->enabled)) { print ''; print $langs->trans("BankAccount").''; - print $form->select_comptes($conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); + $form->select_comptes($conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); print ''; } diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index aefcb50369a..545fe9c368c 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -214,7 +214,7 @@ if (! empty($conf->banque->enabled)) { print ''; print $langs->trans("BankAccount").''; - print $form->select_comptes($conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); + $form->select_comptes($conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS, 'PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); print ''; } From e3480780cfd6a89bd06142ccc7d10e48aeea83da Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Sep 2019 18:31:40 +0200 Subject: [PATCH 07/14] Fix label on "Connect" button on Simple POS module --- htdocs/cashdesk/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 9efe1b8ed7f..94b3e4445f7 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -191,7 +191,7 @@ print "\n";
-
+
From 8d794049148f49af4d9531922606752ee6a38288 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 16 Sep 2019 18:40:58 +0200 Subject: [PATCH 08/14] Fix css for responsive --- htdocs/cashdesk/index.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 1 + htdocs/theme/md/style.css.php | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 94b3e4445f7..57dc1cbb394 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -96,11 +96,11 @@ else trans("Login"); ?> - + trans("Password"); ?> - + Date: Tue, 17 Sep 2019 12:08:33 +0200 Subject: [PATCH 09/14] FIX form not closed. --- htdocs/projet/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index c025fe91ab5..e1938fa05be 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -48,7 +48,6 @@ $sortorder = GETPOST("sortorder", 'alpha'); $max=3; - /* * View */ @@ -76,12 +75,14 @@ else $titleall=$langs->trans("AllAllowedProjects").'

'; $morehtml=''; -$morehtml.='
'; +$morehtml.=''; +$morehtml.=''; $morehtml.=''; $morehtml.=''; +$morehtml.='
'; print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'title_project.png', 0, $morehtml); From a91f39ea3e99501512dc5fb6a52dc67d4610f615 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Sep 2019 12:08:33 +0200 Subject: [PATCH 10/14] FIX selection of project i am contact of. --- htdocs/projet/index.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index c025fe91ab5..22be3ab35db 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -48,19 +48,17 @@ $sortorder = GETPOST("sortorder", 'alpha'); $max=3; - /* * View */ $companystatic=new Societe($db); $projectstatic=new Project($db); -$userstatic=new User($db); $form=new Form($db); $formfile=new FormFile($db); $projectset = ($mine?$mine:(empty($user->rights->projet->all->lire)?0:2)); -$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $projetset, 1); +$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $projectset, 1); //var_dump($projectsListId); llxHeader("", $langs->trans("Projects"), "EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"); @@ -74,14 +72,15 @@ $titleall=$langs->trans("AllAllowedProjects"); if (! empty($user->rights->projet->all->lire) && ! $socid) $titleall=$langs->trans("AllProjects"); else $titleall=$langs->trans("AllAllowedProjects").'

'; - $morehtml=''; -$morehtml.='
'; +$morehtml.=''; +$morehtml.=''; $morehtml.=''; $morehtml.=''; +$morehtml.='
'; print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', '', '', '', 0, -1, 'title_project.png', 0, $morehtml); @@ -164,7 +163,6 @@ print_projecttasks_array($db, $form, $socid, $projectsListId, 0, 0, $listofoppst print '
'; - // Last modified projects $sql = "SELECT p.rowid, p.ref, p.title, p.fk_statut, p.tms as datem,"; $sql.= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.canvas"; From 64c53e2e8556c0e2f28b645c223fb70c5235fc3f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Sep 2019 12:19:33 +0200 Subject: [PATCH 11/14] Fix "project i am contact for" filter --- htdocs/projet/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/index.php b/htdocs/projet/index.php index 4c4ae4c71cf..3ca6296f81d 100644 --- a/htdocs/projet/index.php +++ b/htdocs/projet/index.php @@ -57,7 +57,7 @@ $form=new Form($db); $formfile=new FormFile($db); $projectset = ($mine?$mine:(empty($user->rights->projet->all->lire)?0:2)); -$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $projetset, 1); +$projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, $projectset, 1); //var_dump($projectsListId); From 3f6afa810c7b7dc2cede1cb867dc9e47637fa315 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Sep 2019 17:55:30 +0200 Subject: [PATCH 12/14] Code comment --- htdocs/core/lib/date.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index 6ed17305096..ea5027de1ee 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -323,6 +323,7 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date) * 0 =Input date is local date using PHP server timezone * @return int Date as a timestamp * 19700101020000 -> 7200 with gm=1 + * 19700101000000 -> 0 with gm=1 * * @see dol_print_date(), dol_mktime(), dol_getdate() */ From a43253eab844c8caecc148c23b4dd5025e5ee1a2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 17 Sep 2019 18:49:56 +0200 Subject: [PATCH 13/14] Fix for deposit not correctly closed --- htdocs/compta/facture/card.php | 2 +- htdocs/install/mysql/migration/repair.sql | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index ff5a280a118..6b24807c007 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4982,7 +4982,7 @@ elseif ($id > 0 || ! empty($ref)) } // Classify paid - if ($object->statut == 1 && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0)) + if (($object->statut == 1 && $object->paye == 0 && $usercanissuepayment && (($object->type != Facture::TYPE_CREDIT_NOTE && $object->type != Facture::TYPE_DEPOSIT && $resteapayer <= 0) || ($object->type == Facture::TYPE_CREDIT_NOTE && $resteapayer >= 0))) || ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 0 && $object->total_ttc > 0 && $resteapayer == 0 && $usercanissuepayment && empty($discount->id)) ) { diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 51fe48dcda2..4d87203b068 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -468,6 +468,12 @@ UPDATE llx_accounting_bookkeeping set date_creation = tms where date_creation IS -- UPDATE llx_facturedet_rec set label = NULL WHERE label IS NOT NULL; +-- Note to make all deposit as payed when there is already a discount generated from it. +--drop table tmp_invoice_deposit_mark_as_available; +--create table tmp_invoice_deposit_mark_as_available as select * from llx_facture as f where f.type = 3 and f.paye = 0 and f.rowid in (select fk_facture_source from llx_societe_remise_except); +--update llx_facture set paye = 1 where rowid in (select rowid from tmp_invoice_deposit_mark_as_available); + + -- Note to migrate from old counter aquarium to new one -- drop table tmp; From 2286cc2a5f8c815462a3319c60e1549bd8ef8257 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Sep 2019 20:16:39 +0200 Subject: [PATCH 14/14] Fix autojump when 1 record found --- htdocs/contrat/list.php | 2 +- htdocs/modulebuilder/template/myobject_list.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 79745113f88..9709eed637d 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -321,7 +321,7 @@ if (! $resql) $num = $db->num_rows($resql); // Direct jump if only one record found -if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall) +if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $sall && ! $page) { $obj = $db->fetch_object($resql); $id = $obj->rowid; diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index a2bd9d39fe7..b7baf32089f 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -291,7 +291,7 @@ else } // Direct jump if only one record found -if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) +if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && ! $page) { $obj = $db->fetch_object($resql); $id = $obj->rowid;