diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 640fa657ffe..2dbbd42988f 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; @@ -262,13 +262,13 @@ 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)) { print ''; - print ''; + print ''; print img_edit(); print '' . "\n"; } else { diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index e73e27efaeb..5d5ebf06843 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; @@ -259,13 +259,13 @@ 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)) { print ''; - print ''; + print ''; print img_edit(); print '' . "\n"; } else { 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)) 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);