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 { ?>