diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php
index 136ade4df3c..f39d827b03e 100644
--- a/htdocs/commande/card.php
+++ b/htdocs/commande/card.php
@@ -618,7 +618,7 @@ else if ($action == 'addline' && $user->rights->commande->creer) {
$filter = array('t.fk_product' => $prod->id,'t.fk_soc' => $object->thirdparty->id);
$result = $prodcustprice->fetch_all('', '', 0, 0, $filter);
- if ($result >= 0)
+ if ($result >= 0)
{
if (count($prodcustprice->lines) > 0)
{
@@ -628,9 +628,9 @@ else if ($action == 'addline' && $user->rights->commande->creer) {
$prod->tva_tx = $prodcustprice->lines [0]->tva_tx;
}
}
- else
- {
- setEventMessage($prodcustprice->error,'errors');
+ else
+ {
+ setEventMessage($prodcustprice->error,'errors');
}
}
@@ -2152,9 +2152,16 @@ if ($action == 'create' && $user->rights->commande->creer) {
}
else
{
- print '
| ';
+ print '| attribute_required [$key])) print ' class="fieldrequired"';
- print '>' . $label . ' | ';
+ print '>' . $label . ' | ';
+ if (($object->statut == 0 || $extrafields->attribute_alwayseditable[$key]) && $user->rights->propal->creer && ($action != 'edit_extras' || GETPOST('attribute') != $key))
+ print '' . img_edit().' | ';
+
+ print ' ';
+ print ' | ';
+
// Convert date into timestamp format
if (in_array($extrafields->attribute_type [$key], array('date','datetime')))
{
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 245f187d166..22246fc8f03 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -3341,10 +3341,16 @@ if ($action == 'create')
if ($extrafields->attribute_type [$key] == 'separate') {
print $extrafields->showSeparator($key);
} else {
- print ' |
| attribute_required [$key]))
- print ' class="fieldrequired"';
- print '>' . $label . ' | ';
+ print ' |
';
+ print '| attribute_required [$key])) print ' class="fieldrequired"';
+ print '>' . $label . ' | ';
+ if (($object->statut == 0 || $extrafields->attribute_alwayseditable[$key]) && $user->rights->propal->creer && ($action != 'edit_extras' || GETPOST('attribute') != $key))
+ print '' . img_edit().' | ';
+
+ print ' ';
+ print ' | ';
+
// Convert date into timestamp format
if (in_array($extrafields->attribute_type [$key], array('date','datetime'))) {
$value = isset($_POST["options_" . $key]) ? dol_mktime($_POST["options_" . $key . "hour"], $_POST["options_" . $key . "min"], 0, $_POST["options_" . $key . "month"], $_POST["options_" . $key . "day"], $_POST["options_" . $key . "year"]) : $db->jdate($object->array_options ['options_' . $key]);
|