commit
c14349f1ea
@ -1197,7 +1197,10 @@ function pdf_getlinenum($object,$i,$outputlangs,$hidedetails=0)
|
||||
{
|
||||
$special_code = $object->lines[$i]->special_code;
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
// TODO add hook function
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlinenum',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1223,7 +1226,10 @@ function pdf_getlineref($object,$i,$outputlangs,$hidedetails=0)
|
||||
{
|
||||
$special_code = $object->lines[$i]->special_code;
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
// TODO add hook function
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineref',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1248,7 +1254,10 @@ function pdf_getlineref_supplier($object,$i,$outputlangs,$hidedetails=0)
|
||||
{
|
||||
$special_code = $object->lines[$i]->special_code;
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
// TODO add hook function
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineref_supplier',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1275,7 +1284,8 @@ function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlinevatrate',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlinevatrate',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1305,7 +1315,8 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlineupexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineupexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1330,10 +1341,10 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0)
|
||||
{
|
||||
$special_code = $object->lines[$i]->special_code;
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
foreach($object->hooks as $modules)
|
||||
{
|
||||
if (method_exists($modules[$special_code],'pdf_getlineupwithtax')) return $modules[$special_code]->pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails);
|
||||
}
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineupwithtax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1362,7 +1373,8 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlineqty',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineqty',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1392,7 +1404,8 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlineqty_asked',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineqty_asked',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1422,7 +1435,8 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlineqty_shipped',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineqty_shipped',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1452,7 +1466,8 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlineqty_keeptoship',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineqty_keeptoship',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1487,8 +1502,8 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag
|
||||
'special_code' => $special_code
|
||||
);
|
||||
$action = '';
|
||||
return $hookmanager->executeHooks('pdf_getlineunit', $parameters, $object,
|
||||
$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineunit', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
} else {
|
||||
if (empty($hidedetails) || $hidedetails > 1) {
|
||||
return $langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short'));
|
||||
@ -1521,7 +1536,8 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlineremisepercent',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineremisepercent',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1548,7 +1564,8 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm
|
||||
if (!empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i' => $i, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails, 'special_code' => $special_code);
|
||||
$action = '';
|
||||
return $hookmanager->executeHooks('pdf_getlineprogress', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlineprogress', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
} else {
|
||||
if (empty($hidedetails) || $hidedetails > 1) return $object->lines[$i]->situation_percent . '%';
|
||||
}
|
||||
@ -1583,7 +1600,8 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlinetotalexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlinetotalexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1618,7 +1636,8 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0)
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
return $hookmanager->executeHooks('pdf_getlinetotalwithtax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$reshook = $hookmanager->executeHooks('pdf_getlinetotalwithtax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1656,7 +1675,10 @@ function pdf_getTotalQty($object,$type,$outputlangs)
|
||||
{
|
||||
$special_code = $object->lines[$i]->special_code;
|
||||
if (! empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line);
|
||||
// TODO add hook function
|
||||
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
||||
$action='';
|
||||
$reshook = $hookmanager->executeHooks('pdf_getTotalQty',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
return $hookmanager->resPrint;
|
||||
}
|
||||
else if ($type==0 && $object->lines[$i]->product_type == 0)
|
||||
{
|
||||
@ -1692,7 +1714,7 @@ function pdf_getLinkedObjects($object,$outputlangs)
|
||||
if ($objecttype == 'propal')
|
||||
{
|
||||
$outputlangs->load('propal');
|
||||
|
||||
|
||||
foreach($objects as $elementobject)
|
||||
{
|
||||
$linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefProposal");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user