Fix: error when creating an invoice from a project
This commit is contained in:
parent
f4e1484cb9
commit
68ffff7c19
@ -1374,6 +1374,12 @@ if ($_GET['action'] == 'create')
|
|||||||
$subelement = $regs[2];
|
$subelement = $regs[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($element == 'project')
|
||||||
|
{
|
||||||
|
$projectid=$_GET['originid'];
|
||||||
|
}
|
||||||
|
else if (in_array($element,array('order','commande','propal','contrat','contract')))
|
||||||
|
{
|
||||||
// For compatibility
|
// For compatibility
|
||||||
if ($element == 'order') { $element = $subelement = 'commande'; }
|
if ($element == 'order') { $element = $subelement = 'commande'; }
|
||||||
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; }
|
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; }
|
||||||
@ -1395,6 +1401,7 @@ if ($_GET['action'] == 'create')
|
|||||||
$remise_absolue = (!empty($object->remise_absolue)?$object->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0));
|
$remise_absolue = (!empty($object->remise_absolue)?$object->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0));
|
||||||
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
|
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$res=$soc->fetch($socid);
|
$res=$soc->fetch($socid);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user