Merge pull request #3745 from atm-arnaud/3.8_fix_propale_facturee
FIX bug invoice classified in propale next update commonobject class …
This commit is contained in:
commit
fc8f4b4d6e
@ -2122,26 +2122,26 @@ class Propal extends CommonObject
|
|||||||
$this->fetchObjectLinked($id,$this->element);
|
$this->fetchObjectLinked($id,$this->element);
|
||||||
foreach($this->linkedObjectsIds as $objecttype => $objectid)
|
foreach($this->linkedObjectsIds as $objecttype => $objectid)
|
||||||
{
|
{
|
||||||
$numi=count($objectid);
|
// Nouveau système du comon object renvoi des rowid et non un id linéaire de 1 à n
|
||||||
for ($i=0;$i<$numi;$i++)
|
// On parcourt donc une liste d'objets en tant qu'objet unique
|
||||||
|
foreach($objectid as $key => $object)
|
||||||
{
|
{
|
||||||
// Cas des factures liees directement
|
// Cas des factures liees directement
|
||||||
if ($objecttype == 'facture')
|
if ($objecttype == 'facture')
|
||||||
{
|
{
|
||||||
$linkedInvoices[] = $objectid[$i];
|
$linkedInvoices[] = $object;
|
||||||
}
|
}
|
||||||
// Cas des factures liees par un autre objet (ex: commande)
|
// Cas des factures liees par un autre objet (ex: commande)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->fetchObjectLinked($objectid[$i],$objecttype);
|
$this->fetchObjectLinked($object,$objecttype);
|
||||||
foreach($this->linkedObjectsIds as $subobjecttype => $subobjectid)
|
foreach($this->linkedObjectsIds as $subobjecttype => $subobjectid)
|
||||||
{
|
{
|
||||||
$numj=count($subobjectid);
|
foreach($subobjectid as $subkey => $subobject)
|
||||||
for ($j=0;$j<$numj;$j++)
|
|
||||||
{
|
{
|
||||||
if ($subobjecttype == 'facture')
|
if ($subobjecttype == 'facture')
|
||||||
{
|
{
|
||||||
$linkedInvoices[] = $subobjectid[$j];
|
$linkedInvoices[] = $subobject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user