Skip to content

Commit

Permalink
FIX Can't modifiy the payment code that is reserved
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 3, 2024
1 parent 9af159c commit 1d35417
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion htdocs/admin/dict.php
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,15 @@ function fieldList($fieldlist, $obj = null, $tabname = '', $context = '')
} elseif ($value == 'price' || preg_match('/^amount/i', $value)) {
print '<td><input type="text" class="flat minwidth75" value="'.price((!empty($obj->{$value}) ? $obj->{$value} : '')).'" name="'. $value .'"></td>';
} elseif ($value == 'code' && isset($obj->{$value})) {
print '<td><input type="text" class="flat minwidth75 maxwidth100" value="'.(!empty($obj->{$value}) ? $obj->{$value} : '').'" name="'. $value .'"></td>';
print '<td>';
if ($tabname == 'c_paiement' && in_array($obj->{$value}, array('LIQ', 'CB', 'VIR'))) {
// Case of code that should not be modified
print '<input type="hidden" class="flat minwidth75 maxwidth100" value="'.(!empty($obj->{$value}) ? $obj->{$value} : '').'" name="'. $value .'">';
print $obj->{$value};
} else {
print '<input type="text" class="flat minwidth75 maxwidth100" value="'.(!empty($obj->{$value}) ? $obj->{$value} : '').'" name="'. $value .'">';
}
print '</td>';
} elseif ($value == 'unit') {
print '<td>';
$units = array(
Expand Down

0 comments on commit 1d35417

Please sign in to comment.