From dd0f6b38290a6660b2a68b0bd1960cd882c1d110 Mon Sep 17 00:00:00 2001 From: Pierre Ardoin <32256817+mapiolca@users.noreply.github.com> Date: Tue, 29 Jan 2019 11:30:14 +0100 Subject: [PATCH] =?UTF-8?q?Edition=20Ligne=20Travaux=20Suppl=C3=A9mentaire?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correction pour permettre l'édition si la ligne n'existe pas dans une précédente situation. Permet l'édition d'une ligne si elle a été ajouté dans la situation actuelle. --- htdocs/core/tpl/objectline_edit.tpl.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index d3dc9807c5a..62387001de5 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -99,7 +99,7 @@ $coldisplay=-1; // We remove first td } // Do not allow editing during a situation cycle - if (empty($this->situation_cycle_ref) || $this->situation_counter == 1) + if ($line->fk_prev_id == NULL ) { // editeur wysiwyg require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -137,7 +137,7 @@ $coldisplay=-1; // We remove first td } $coldisplay++; - if ($this->situation_counter == 1 || !$this->situation_cycle_ref) { + if ($line->fk_prev_id == NULL ) { print '' . $form->load_tva('tva_tx', $line->tva_tx.($line->vat_src_code?(' ('.$line->vat_src_code.')'):''), $seller, $buyer, 0, $line->info_bits, $line->product_type, false, 1) . ''; } else { print '%'; @@ -145,7 +145,7 @@ $coldisplay=-1; // We remove first td $coldisplay++; print 'situation_counter > 1) print ' readonly'; + if ($line->fk_prev_id != NULL ) print ' readonly'; print '>'; if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) { @@ -156,7 +156,7 @@ $coldisplay=-1; // We remove first td { $coldisplay++; print 'situation_counter > 1) print ' readonly'; + if ($line->fk_prev_id != NULL ) print ' readonly'; print '>'; } ?> @@ -167,7 +167,7 @@ $coldisplay=-1; // We remove first td // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; print 'situation_counter > 1) print ' readonly'; + if ($line->fk_prev_id != NULL ) print ' readonly'; print '>'; } else { ?>   @@ -186,7 +186,7 @@ $coldisplay=-1; // We remove first td info_bits & 2) != 2) { print 'situation_counter > 1) print ' readonly'; + if ($line->fk_prev_id != NULL ) print ' readonly'; print '>%'; } else { ?>