Fix #3514 More elegant
This commit is contained in:
parent
744e5375d2
commit
ba3d8f445c
@ -529,6 +529,7 @@ if (empty($reshook))
|
|||||||
// Add product into object
|
// Add product into object
|
||||||
if ($object->id > 0 && $action == 'addin')
|
if ($object->id > 0 && $action == 'addin')
|
||||||
{
|
{
|
||||||
|
$thirpdartyid =0 ;
|
||||||
if (GETPOST('propalid') > 0)
|
if (GETPOST('propalid') > 0)
|
||||||
{
|
{
|
||||||
$propal = new Propal($db);
|
$propal = new Propal($db);
|
||||||
@ -563,7 +564,7 @@ if (empty($reshook))
|
|||||||
$thirpdartyid = $facture->socid;
|
$thirpdartyid = $facture->socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($thirpdartyid)) {
|
if ( $thirpdartyid > 0) {
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$result = $soc->fetch($thirpdartyid);
|
$result = $soc->fetch($thirpdartyid);
|
||||||
if ($result <= 0) {
|
if ($result <= 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user