Merge pull request #10765 from altatof/sd8

FIX : supplier discount was not retrieved when choosing a product
This commit is contained in:
Laurent Destailleur 2019-03-07 13:26:44 +01:00 committed by GitHub
commit e96f84a3d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,15 +260,17 @@ else {
if ($senderissupplier != 2)
{
$ajaxoptions=array(
'update' => array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with which ajax json response key
'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for exemple shown we select a disabled option into combo)
'update' => array('qty'=>'qty','remise_percent' => 'discount','idprod' => 'idprod'), // html id tags that will be edited with each ajax json response key
'option_disabled' => 'idthatdoesnotexists', // html id to disable once select is done
'warning' => $langs->trans("NoPriceDefinedForThisSupplier") // translation of an error saved into var 'warning' (for exemple shown we select a disabled option into combo)
);
$alsoproductwithnosupplierprice=0;
}
else
{
$ajaxoptions = array();
$ajaxoptions = array(
'update' => array('remise_percent' => 'discount') // html id tags that will be edited with each ajax json response key
);
$alsoproductwithnosupplierprice=1;
}