From 90b2d41b02b02b9e1e74bbedb356537d9d5e4299 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Mon, 19 Oct 2020 14:19:34 +0200 Subject: [PATCH] FIX pb of duplicate event on command when refreshing the page after command classification as billed or closed --- htdocs/commande/card.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 6a51dcd4aaa..bd0d7c469a5 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1282,14 +1282,10 @@ if (empty($reshook)) exit(); } - //Used to not reclass as billed a command which is already billed by refreshing the page - if (strpos($_SERVER["REQUEST_URI"],'action=classifybilled') && $object->billed) - { - header("Location: $_SERVER[PHP_SELF]?id=$object->id"); - exit(); - } - //Used to not reclass as closed command which is already closed by refreshing the page - if (strpos($_SERVER["REQUEST_URI"],'action=confirm_shipped') && Commande::STATUS_CLOSED) + //Used to not reclass as a billed or closed command which is already billed by refreshing the page + if (strpos($_SERVER["REQUEST_URI"], 'action=classifybilled') && $object->billed + || strpos($_SERVER["REQUEST_URI"], 'action=confirm_shipped') && Commande::STATUS_CLOSED + ) { header("Location: $_SERVER[PHP_SELF]?id=$object->id"); exit();