Removed delivery in a batch cannot be voided after the invoice is made. Fixed.
[fa-stable.git] / reporting / includes / reporting.inc
index 0267687d115a6d1efd81c24ea488655f02969ac1..dd4b5a5c2214c579f251174f6a72e875265b1899 100644 (file)
@@ -14,7 +14,7 @@
 // or display_note(print_document_link($order_no, _("Print this order")));
 // You only need full parameter list for invoices/credit notes
 
-function print_document_link($doc_no, $link_text, $link=true, $type_no, 
+function print_document_link($doc_no, $link_text, $link, $type_no, 
        $icon=false, $class='printlink', $id='', $email=0, $extra=0)
 {
        global $path_to_root;
@@ -145,7 +145,8 @@ function print_link($link_text, $rep, $pars = array(), $dir = '',
 
        $id = default_focus($id);
        foreach($pars as $par => $val) {
-               $pars[$par] = "$par=".urlencode($val);
+               if ($val != null)
+                       $pars[$par] = "$par=".urlencode($val);
        }
        $pars[] = 'REP_ID='.urlencode($rep);
        $url .= implode ('&', $pars);