-function getPDFOpenScript($link_text, $ar_params) {
- $st = "document.pdf_form.LANG.value='" . $_SESSION['language']->code . "';";
- foreach ($ar_params as $key => $value) {
- $st .= "document.pdf_form.{$key}.value = '{$value}';";
+ switch ($type_no)
+ {
+ case systypes::sales_order() :
+ $action = "$path_to_root/reporting/rep109.php";
+ $_POST['PARAM_2'] = ""; // currency
+ $_POST['PARAM_3'] = ""; // bank account
+ $_POST['PARAM_4'] = 0; // email
+ $_POST['PARAM_5'] = 0; // quote
+ $_POST['PARAM_6'] = ""; // comments
+ $params = 7;
+ break;
+ case systypes::cust_dispatch() :
+ $action = "$path_to_root/reporting/rep110.php";
+ $_POST['PARAM_2'] = 0; // email
+ $_POST['PARAM_3'] = ""; // comments
+ $params = 4;
+ break;
+ case 10 : // Sales Invoice
+ case 11 : // Customer Credit Note
+ $action = "$path_to_root/reporting/rep107.php";
+ $_POST['PARAM_2'] = ""; // currency
+ $_POST['PARAM_3'] = ""; // bank account
+ $_POST['PARAM_4'] = 0; // email
+ $_POST['PARAM_5'] = ""; // paylink
+ $_POST['PARAM_6'] = ""; // comments
+ $params = 7;
+ break;
+ case systypes::po() :
+ $action = "$path_to_root/reporting/rep209.php";
+ $_POST['PARAM_2'] = ""; // currency
+ $_POST['PARAM_3'] = ""; // bank account
+ $_POST['PARAM_4'] = 0; // email
+ $_POST['PARAM_5'] = ""; // comments
+ $params = 6;
+ break;