From bab82a77b59f5679d0f7d84192120a8eba8385c1 Mon Sep 17 00:00:00 2001 From: mapiolca <32256817+mapiolca@users.noreply.github.com> Date: Sat, 5 Jan 2019 22:42:51 +0100 Subject: [PATCH 1/2] Update card.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Permettre d'ajouter des lignes complémentaires en cas de travaux supplémentaires lors des situations de travaux. --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index aa3b3a8a1a9..61dba965b50 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4582,7 +4582,7 @@ else if ($id > 0 || ! empty($ref)) $ret = $object->printObjectLines($action, $mysoc, $soc, $lineid, 1); // Form to add new line - if ($object->statut == 0 && $usercancreate && $action != 'valid' && $action != 'editline' && ($object->is_first() || !$object->situation_cycle_ref)) + if ($object->statut == 0 && $usercancreate && $action != 'valid' && $action != 'editline') { if ($action != 'editline' && $action != 'selectlines') { From 66e1df753e001f62974ecc61fae7cc4bfeec4d3f Mon Sep 17 00:00:00 2001 From: AXeL-dev Date: Mon, 7 Jan 2019 09:33:24 +0100 Subject: [PATCH 2/2] run_sql function: support for numbers in database prefix --- htdocs/core/lib/admin.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index c67539a8b7c..10ec3b2b85a 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -235,7 +235,7 @@ function run_sql($sqlfile, $silent=1, $entity='', $usesavepoint=1, $handler='', $newsql=$sql; // Replace __+MAX_table__ with max of table - while (preg_match('/__\+MAX_([A-Za-z_]+)__/i',$newsql,$reg)) + while (preg_match('/__\+MAX_([A-Za-z0-9_]+)__/i',$newsql,$reg)) { $table=$reg[1]; if (! isset($listofmaxrowid[$table]))