mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 09:08:09 +01:00
Edition Ligne Travaux Supplémentaires
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.
This commit is contained in:
@@ -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 '<td align="right">' . $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) . '</td>';
|
||||
} else {
|
||||
print '<td align="right"><input size="1" type="text" class="flat right" name="tva_tx" value="' . price($line->tva_tx) . '" readonly />%</td>';
|
||||
@@ -145,7 +145,7 @@ $coldisplay=-1; // We remove first td
|
||||
|
||||
$coldisplay++;
|
||||
print '<td align="right"><input type="text" class="flat right" size="5" id="price_ht" name="price_ht" value="' . (isset($line->pu_ht)?price($line->pu_ht,0,'',0):price($line->subprice,0,'',0)) . '"';
|
||||
if ($this->situation_counter > 1) print ' readonly';
|
||||
if ($line->fk_prev_id != NULL ) print ' readonly';
|
||||
print '></td>';
|
||||
|
||||
if (!empty($conf->multicurrency->enabled) && $this->multicurrency_code != $conf->currency) {
|
||||
@@ -156,7 +156,7 @@ $coldisplay=-1; // We remove first td
|
||||
{
|
||||
$coldisplay++;
|
||||
print '<td align="right"><input type="text" class="flat right" size="5" id="price_ttc" name="price_ttc" value="'.(isset($line->pu_ttc)?price($line->pu_ttc,0,'',0):'').'"';
|
||||
if ($this->situation_counter > 1) print ' readonly';
|
||||
if ($line->fk_prev_id != NULL ) print ' readonly';
|
||||
print '></td>';
|
||||
}
|
||||
?>
|
||||
@@ -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 '<input size="3" type="text" class="flat right" name="qty" id="qty" value="' . $line->qty . '"';
|
||||
if ($this->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
|
||||
<td align="right" class="nowrap"><?php $coldisplay++; ?>
|
||||
<?php if (($line->info_bits & 2) != 2) {
|
||||
print '<input size="1" type="text" class="flat right" name="remise_percent" id="remise_percent" value="' . $line->remise_percent . '"';
|
||||
if ($this->situation_counter > 1) print ' readonly';
|
||||
if ($line->fk_prev_id != NULL ) print ' readonly';
|
||||
print '>%';
|
||||
} else { ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user