|
@@ -1266,7 +1266,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;
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1295,7 +1298,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;
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1323,7 +1329,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;
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1347,7 +1356,7 @@ function pdf_getlinevatrate($object,$i,$outputlangs,$hidedetails=0)
|
|
|
|
|
|
$reshook=0;
|
|
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
- if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
|
|
|
+ if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduce this test in the pdf_xxx function if you don't want your hook to run
|
|
|
{
|
|
|
$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);
|
|
@@ -1389,8 +1398,12 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0)
|
|
|
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
|
$action='';
|
|
|
$reshook = $hookmanager->executeHooks('pdf_getlineupexcltax',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
if (!empty($hookmanager->resPrint)) print $hookmanager->resPrint;
|
|
|
+=======
|
|
|
+ return $hookmanager->resPrint;
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1421,8 +1434,12 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0)
|
|
|
$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
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
if (!empty($hookmanager->resPrint)) print $hookmanager->resPrint;
|
|
|
+=======
|
|
|
+ return $hookmanager->resPrint;
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1448,6 +1465,7 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0)
|
|
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
$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);
|
|
|
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
@@ -1456,6 +1474,21 @@ function pdf_getlineqty($object,$i,$outputlangs,$hidedetails=0)
|
|
|
|
|
|
if(!empty($hookmanager->resPrint)) return $hookmanager->resPrint;
|
|
|
else return $reshook;
|
|
|
+=======
|
|
|
+ if (is_object($hookmanager) && (( $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code) ) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
+ {
|
|
|
+ $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);
|
|
|
+ $parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
|
+ $action='';
|
|
|
+ $reshook = $hookmanager->executeHooks('pdf_getlineqty',$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]->qty;
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1482,6 +1515,7 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0)
|
|
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
$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);
|
|
|
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
@@ -1489,6 +1523,21 @@ function pdf_getlineqty_asked($object,$i,$outputlangs,$hidedetails=0)
|
|
|
$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;
|
|
|
+=======
|
|
|
+ if (is_object($hookmanager) && (( $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code) ) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
+ {
|
|
|
+ $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);
|
|
|
+ $parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
|
+ $action='';
|
|
|
+ $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
|
|
|
+ {
|
|
|
+ if (empty($hidedetails) || $hidedetails > 1) return $object->lines[$i]->qty_asked;
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1515,6 +1564,7 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0)
|
|
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
$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);
|
|
|
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
@@ -1522,6 +1572,21 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0)
|
|
|
$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;
|
|
|
+=======
|
|
|
+ if (is_object($hookmanager) && (( $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code) ) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
+ {
|
|
|
+ $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);
|
|
|
+ $parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
|
+ $action='';
|
|
|
+ $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
|
|
|
+ {
|
|
|
+ if (empty($hidedetails) || $hidedetails > 1) return $object->lines[$i]->qty_shipped;
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1548,6 +1613,7 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0)
|
|
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
$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);
|
|
|
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
@@ -1555,6 +1621,21 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0)
|
|
|
$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;
|
|
|
+=======
|
|
|
+ if (is_object($hookmanager) && (( $object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code) ) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
+ {
|
|
|
+ $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);
|
|
|
+ $parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
|
+ $action='';
|
|
|
+ $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
|
|
|
+ {
|
|
|
+ if (empty($hidedetails) || $hidedetails > 1) return ($object->lines[$i]->qty_asked - $object->lines[$i]->qty_shipped);
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1577,6 +1658,7 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0)
|
|
|
function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = false)
|
|
|
{
|
|
|
global $langs;
|
|
|
+<<<<<<< HEAD
|
|
|
|
|
|
$reshook=0;
|
|
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
@@ -1585,6 +1667,27 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag
|
|
|
$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);
|
|
|
+=======
|
|
|
+ if ($object->lines[$i]->special_code != 3) {
|
|
|
+ if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line))) {
|
|
|
+ $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);
|
|
|
+ }
|
|
|
+ $parameters = array(
|
|
|
+ 'i' => $i,
|
|
|
+ 'outputlangs' => $outputlangs,
|
|
|
+ 'hidedetails' => $hidedetails,
|
|
|
+ 'special_code' => $special_code
|
|
|
+ );
|
|
|
+ $action = '';
|
|
|
+ $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'));
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
$parameters = array(
|
|
|
'i' => $i,
|
|
@@ -1625,6 +1728,7 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0)
|
|
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
$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);
|
|
|
$parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
@@ -1632,6 +1736,21 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0)
|
|
|
$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;
|
|
|
+=======
|
|
|
+ if (is_object($hookmanager) && ( ($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code) ) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
+ {
|
|
|
+ $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);
|
|
|
+ $parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
|
+ $action='';
|
|
|
+ $reshook = $hookmanager->executeHooks('pdf_getlineremisepercent',$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 dol_print_reduction($object->lines[$i]->remise_percent,$outputlangs);
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1653,6 +1772,7 @@ function pdf_getlineremisepercent($object,$i,$outputlangs,$hidedetails=0)
|
|
|
*/
|
|
|
function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = null)
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
$reshook=0;
|
|
|
//if (is_object($hookmanager) && ( (isset($object->lines[$i]->product_type) && $object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line) ) )
|
|
|
if (is_object($hookmanager)) // Old code is commented on preceding line. Reproduct this test in the pdf_xxx function if you don't want your hook to run
|
|
@@ -1664,6 +1784,19 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm
|
|
|
$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;
|
|
|
+=======
|
|
|
+ if ($object->lines[$i]->special_code != 3) {
|
|
|
+ if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line))) {
|
|
|
+ $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);
|
|
|
+ $parameters = array('i' => $i, 'outputlangs' => $outputlangs, 'hidedetails' => $hidedetails, 'special_code' => $special_code);
|
|
|
+ $action = '';
|
|
|
+ $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 . '%';
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
@@ -1703,11 +1836,27 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0)
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
if ($object->lines[$i]->special_code == 3)
|
|
|
{
|
|
|
return $outputlangs->transnoentities("Option");
|
|
|
}
|
|
|
if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->total_ht, 0, $outputlangs);
|
|
|
+=======
|
|
|
+ if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line)))
|
|
|
+ {
|
|
|
+ $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);
|
|
|
+ $parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
|
+ $action='';
|
|
|
+ $reshook = $hookmanager->executeHooks('pdf_getlinetotalexcltax',$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 price($sign * $object->lines[$i]->total_ht, 0, $outputlangs);
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
return '';
|
|
|
}
|
|
@@ -1739,11 +1888,27 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0)
|
|
|
}
|
|
|
if (empty($reshook))
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
if ($object->lines[$i]->special_code == 3)
|
|
|
{
|
|
|
return $outputlangs->transnoentities("Option");
|
|
|
}
|
|
|
if (empty($hidedetails) || $hidedetails > 1) return price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs);
|
|
|
+=======
|
|
|
+ if (is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && ! empty($object->lines[$i]->special_code)) || ! empty($object->lines[$i]->fk_parent_line)))
|
|
|
+ {
|
|
|
+ $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);
|
|
|
+ $parameters = array('i'=>$i,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'special_code'=>$special_code);
|
|
|
+ $action='';
|
|
|
+ $reshook = $hookmanager->executeHooks('pdf_getlinetotalwithtax',$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 price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs);
|
|
|
+ }
|
|
|
+>>>>>>> refs/remotes/origin/3.8
|
|
|
}
|
|
|
return '';
|
|
|
}
|
|
@@ -1776,7 +1941,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)
|
|
|
{
|
|
@@ -1812,7 +1980,7 @@ function pdf_getLinkedObjects($object,$outputlangs)
|
|
|
if ($objecttype == 'propal')
|
|
|
{
|
|
|
$outputlangs->load('propal');
|
|
|
-
|
|
|
+
|
|
|
foreach($objects as $elementobject)
|
|
|
{
|
|
|
$linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefProposal");
|