From 1abef27a1aadfb0634fbda395dc5d873deaa6329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 16 Nov 2020 13:52:35 +0100 Subject: [PATCH 1/3] fix delivery_date --- htdocs/fourn/class/fournisseur.commande.class.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 5f2771594de..7777245fec8 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -9,7 +9,7 @@ * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2018 Nicolas ZABOURI - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * Copyright (C) 2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify @@ -3107,8 +3107,11 @@ class CommandeFournisseur extends CommonOrder if (empty($this->delivery_date) && !empty($this->date_livraison)) $this->delivery_date = $this->date_livraison; // For backward compatibility - if (empty($this->delivery_date)) $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); - else $text = $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->date_delivery, 'day'); + if (empty($this->delivery_date)) { + $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); + } else { + $text = $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->delivery_date, 'day'); + } $text .= ' '.($conf->commande->fournisseur->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->fournisseur->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today"); return $text; From 4ef4792469fcfc20f883f35b07af3927c2f88525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 16 Nov 2020 13:57:59 +0100 Subject: [PATCH 2/3] Update fournisseur.commande.class.php --- htdocs/fourn/class/fournisseur.commande.class.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 7777245fec8..229bf0f0c08 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -121,7 +121,7 @@ class CommandeFournisseur extends CommonOrder public $date_livraison; /** - * Delivery date + * @var int Date expected for delivery */ public $delivery_date; @@ -132,16 +132,6 @@ class CommandeFournisseur extends CommonOrder public $total_ttc; public $source; - /** - * @deprecated - * @see $note_private, $note_public - */ - public $note; - - public $note_private; - public $note_public; - public $model_pdf; - /** * @var int ID */ From 1a21ace02d646a5c37962d4f431d54a35b014aea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 18 Nov 2020 12:42:33 +0100 Subject: [PATCH 3/3] Update fournisseur.commande.class.php --- 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 229bf0f0c08..6ac872d7555 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3100,7 +3100,7 @@ class CommandeFournisseur extends CommonOrder if (empty($this->delivery_date)) { $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); } else { - $text = $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->delivery_date, 'day'); + $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->delivery_date, 'day'); } $text .= ' '.($conf->commande->fournisseur->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->fournisseur->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today");