+function print_hidden_script($type_no)
+{
+ global $path_to_root;
+ include_once($path_to_root . "/includes/types.inc");
+ $action = "";
+
+ switch ($type_no)
+ {
+ case systypes::sales_order() :
+ $action = "$path_to_root/reporting/rep109.php";
+ $ar = array(
+ 'PARAM_0' => 0, // from - these values are updated in print_document_link()
+ 'PARAM_1' => 0, // to
+ 'PARAM_2' => "", // currency
+ 'PARAM_3' => "", // bank account
+ 'PARAM_4' => 0, // email
+ 'PARAM_5' => 0, // quote
+ 'PARAM_6' => ""); // comments
+ break;
+ case systypes::cust_dispatch() :
+ $action = "$path_to_root/reporting/rep110.php";
+ $ar = array(
+ 'PARAM_0' => 0, // from - these values are updated in print_document_link()
+ 'PARAM_1' => 0, // to
+ 'PARAM_2' => 0, // email
+ 'PARAM_3' => ""); // comments
+ break;
+ case 10 : // Sales Invoice
+ case 11 : // Customer Credit Note
+ $action = "$path_to_root/reporting/rep107.php";
+ $ar = array(
+ 'PARAM_0' => 0, // from - these values are updated in print_document_link()
+ 'PARAM_1' => 0, // to
+ 'PARAM_2' => "", // currency
+ 'PARAM_3' => "", // bank account
+ 'PARAM_4' => 0, // email
+ 'PARAM_5' => "", // paylink
+ 'PARAM_6' => ""); // comments
+ break;
+ case systypes::po() :
+ $action = "$path_to_root/reporting/rep209.php";
+ $ar = array(
+ 'PARAM_0' => 0, // from - these values are updated in print_document_link()
+ 'PARAM_1' => 0, // to
+ 'PARAM_2' => "", // currency
+ 'PARAM_3' => "", // bank account
+ 'PARAM_4' => 0, // email
+ 'PARAM_5' => ""); // comments
+ break;
+ }
+ $st = "<form method='post' name='pdf_form' action='$action'>";
+ foreach ($ar as $key => $value)
+ {
+ $st .= "<input type='hidden' name='$key' value='$value' />";