Skip to content
Snippets Groups Projects
Commit f8968775 authored by Philippe Grand's avatar Philippe Grand
Browse files

to use within shipping pdf

parent 303f547b
No related branches found
No related tags found
No related merge requests found
...@@ -992,6 +992,33 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0) ...@@ -992,6 +992,33 @@ function pdf_getlineqty_shipped($object,$i,$outputlangs,$hidedetails=0)
} }
} }
/**
* Return line keep to ship quantity
* @param object Object
* @param $i Current line number
* @param outputlang Object lang for output
* @param hidedetails Hide value
* 0 = no
* 1 = yes
* 2 = just special lines
*/
function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0)
{
if ($object->lines[$i]->special_code != 3)
{
if (! empty($object->hooks) && (( $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);
return $object->hooks[$special_code]->pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails);
}
else
{
if (empty($hidedetails) || $hidedetails > 1) return ($object->lines[$i]->qty_asked - $object->lines[$i]->qty_shipped);
}
}
}
/** /**
* Return line remise percent * Return line remise percent
* @param object Object * @param object Object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment