Fix #3514 More elegant

This commit is contained in:
Juanjo Menent 2015-09-13 00:25:32 +02:00
parent 744e5375d2
commit ba3d8f445c

View File

@ -529,6 +529,7 @@ if (empty($reshook))
// Add product into object
if ($object->id > 0 && $action == 'addin')
{
$thirpdartyid =0 ;
if (GETPOST('propalid') > 0)
{
$propal = new Propal($db);
@ -563,7 +564,7 @@ if (empty($reshook))
$thirpdartyid = $facture->socid;
}
if (isset($thirpdartyid)) {
if ( $thirpdartyid > 0) {
$soc = new Societe($db);
$result = $soc->fetch($thirpdartyid);
if ($result <= 0) {