Fix: invoice supplier, disable "add" button and show error message if a
product with no supplier price is selected
This commit is contained in:
parent
7394525388
commit
878f54b1e9
@ -1805,7 +1805,9 @@ else
|
|||||||
$var=! $var;
|
$var=! $var;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td colspan="4">';
|
print '<td colspan="4">';
|
||||||
$form->select_produits_fournisseurs($object->socid,'','idprodfournprice');
|
|
||||||
|
$ajaxoptions=array('disabled' => 'addPredefinedProductButton', 'error' => $langs->trans("NoPriceDefinedForThisSupplier"));
|
||||||
|
$form->select_produits_fournisseurs($object->socid, '', 'idprodfournprice', '', '', $ajaxoptions);
|
||||||
|
|
||||||
if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print '<br>';
|
if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) print '<br>';
|
||||||
|
|
||||||
@ -1824,7 +1826,7 @@ else
|
|||||||
print '<td align="right"><input type="text" name="qty" value="1" size="1"></td>';
|
print '<td align="right"><input type="text" name="qty" value="1" size="1"></td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '<td align="center" valign="middle" colspan="2"><input type="submit" class="button" value="'.$langs->trans("Add").'"></td>';
|
print '<td align="center" valign="middle" colspan="2"><input type="submit" id="addPredefinedProductButton" class="button" value="'.$langs->trans("Add").'"></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user