From 8d659d8078b23992ca49263865f12bf4f4e75a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20L=C3=A9onard?= Date: Sat, 4 May 2019 07:12:13 +0200 Subject: [PATCH 1/7] Fix date format in customer orders documents --- htdocs/core/modules/commande/doc/pdf_einstein.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 9d73384cf3a..0be2f169153 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -1318,7 +1318,7 @@ class pdf_einstein extends ModelePDFCommandes $posy+=4; $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date, "%d %b %Y", false, $outputlangs, true), '', 'R'); + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate")." : " . dol_print_date($object->date, "day", false, $outputlangs, true), '', 'R'); // Get contact if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) From 4b8083832cf013fe3f40edcb16e82a2986e9a162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 4 May 2019 10:13:44 +0200 Subject: [PATCH 2/7] Update thirdparty_lettering_customer.php --- .../bookkeeping/thirdparty_lettering_customer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 640fa657ffe..931754bc266 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -4,7 +4,7 @@ * Copyright (C) 2013 Olivier Geffroy * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2019 Alexandre Spangaro - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-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 @@ -239,7 +239,7 @@ if ($resql) { print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder, 'center '); - print_liste_field_titre("", "","",'','',"",$sortfield,$sortorder,'maxwidthsearch center '); + print_liste_field_titre("", "", "", '', '', "", $sortfield, $sortorder, 'maxwidthsearch center '); print "\n"; $solde = 0; @@ -268,7 +268,7 @@ if ($resql) { if (empty($obj->lettering_code)) { print ''; - print ''; + print ''; print img_edit(); print '' . "\n"; } else { From 4e9b9b61d8bf488ba386f0c3701f709c0439bc23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 4 May 2019 10:16:27 +0200 Subject: [PATCH 3/7] Update thirdparty_lettering_supplier.php --- .../bookkeeping/thirdparty_lettering_supplier.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index e73e27efaeb..4b038a6147e 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -4,7 +4,7 @@ * Copyright (C) 2013 Olivier Geffroy * Copyright (C) 2013 Florian Henry * Copyright (C) 2013-2019 Alexandre Spangaro - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-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 @@ -237,7 +237,7 @@ if ($resql) { print_liste_field_titre("Balancing", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("Codejournal", $_SERVER["PHP_SELF"], "bk.code_journal", "", $param, "", $sortfield, $sortorder, 'center '); print_liste_field_titre("LetteringCode", $_SERVER["PHP_SELF"], "bk.lettering_code", "", $param, "", $sortfield, $sortorder, 'center '); - print_liste_field_titre("", "","",'','',"",$sortfield,$sortorder,'maxwidthsearch center '); + print_liste_field_titre("", "", "", '', '', "", $sortfield, $sortorder, 'maxwidthsearch center '); print "\n"; $solde = 0; @@ -265,7 +265,7 @@ if ($resql) { if (empty($obj->lettering_code)) { print ''; - print ''; + print ''; print img_edit(); print '' . "\n"; } else { From fc520810b78f5fca846009588248e888668f4d21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 4 May 2019 10:17:04 +0200 Subject: [PATCH 4/7] Update thirdparty_lettering_customer.php --- .../accountancy/bookkeeping/thirdparty_lettering_customer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 931754bc266..910ba310792 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -268,7 +268,7 @@ if ($resql) { if (empty($obj->lettering_code)) { print ''; - print ''; + print ''; print img_edit(); print '' . "\n"; } else { From c595a591a2173f253470b78297df1ad560108a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 4 May 2019 10:37:29 +0200 Subject: [PATCH 5/7] Update thirdparty_lettering_customer.php --- .../accountancy/bookkeeping/thirdparty_lettering_customer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 910ba310792..2dbbd42988f 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -262,8 +262,8 @@ if ($resql) { // Journal $accountingjournal = new AccountingJournal($db); - $result = $accountingjournal->fetch('',$obj->code_journal); - $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $obj->code_journal); + $result = $accountingjournal->fetch('', $obj->code_journal); + $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0, 0, 0, '', 0) : $obj->code_journal); print '' . $journaltoshow . ''; if (empty($obj->lettering_code)) { From 0c5d9de13fbcb3d241d3b31614d9c1718a0ee583 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 4 May 2019 10:38:49 +0200 Subject: [PATCH 6/7] Update thirdparty_lettering_supplier.php --- .../accountancy/bookkeeping/thirdparty_lettering_supplier.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 4b038a6147e..5d5ebf06843 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -259,8 +259,8 @@ if ($resql) { // Journal $accountingjournal = new AccountingJournal($db); - $result = $accountingjournal->fetch('',$obj->code_journal); - $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0,0,0,'',0) : $obj->code_journal); + $result = $accountingjournal->fetch('', $obj->code_journal); + $journaltoshow = (($result > 0)?$accountingjournal->getNomUrl(0, 0, 0, '', 0) : $obj->code_journal); print '' . $journaltoshow . ''; if (empty($obj->lettering_code)) { From 9aed9359adc5017d31de8e2169d225f412ce4b1d Mon Sep 17 00:00:00 2001 From: Supermanu Date: Sat, 4 May 2019 12:22:45 +0200 Subject: [PATCH 7/7] FIX: Remove link between categories and project when deleting --- htdocs/projet/class/project.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 09eadbbc8ea..8ebe6f71425 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -688,6 +688,18 @@ class Project extends CommonObject } } + // Remove linked categories. + if (! $error) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX. "categorie_project"; + $sql.= " WHERE fk_project = ". $this->id; + + $result = $this->db->query($sql); + if (! $result) { + $error++; + $this->errors[] = $this->db->lasterror(); + } + } + // Fetch tasks $this->getLinesArray($user);