FIX there is no way to hide or change qty to useful information by module

This commit is contained in:
Alexis Algoud 2015-09-24 16:57:13 +02:00
parent 62792c08eb
commit 688d6e37e2

View File

@ -1341,7 +1341,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{
@ -1371,7 +1374,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{
@ -1428,7 +1434,11 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{
@ -1458,7 +1468,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{
@ -1488,7 +1501,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{
@ -1518,7 +1534,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{
@ -1553,8 +1572,12 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag
'special_code' => $special_code
);
$action = '';
return $hookmanager->executeHooks('pdf_getlineunit', $parameters, $object,
$reshook = $hookmanager->executeHooks('pdf_getlineunit', $parameters, $object,
$action); // Note that $action and $object may have been modified by some hooks
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
} else {
if (empty($hidedetails) || $hidedetails > 1) {
return $langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short'));
@ -1587,7 +1610,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{
@ -1614,7 +1640,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
} else {
if (empty($hidedetails) || $hidedetails > 1) return $object->lines[$i]->situation_percent . '%';
}
@ -1649,7 +1678,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{
@ -1684,7 +1716,10 @@ 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
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
else return $reshook;
}
else
{