summaryrefslogtreecommitdiff
path: root/ng_selfservice/quotation_print.php
blob: 9676405d15224b2576c0c25bd9b6943adbba7eda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<? require('elements/session.php');

$args = array(
    'session_id' => $_COOKIE['session_id'],
    'format'     => 'pdf'
);

$results = $freeside->quotation_print($args);
if ( isset($results['document']) ) {
    header('Content-Type: application/pdf');
    header('Content-Disposition: filename=quotation.pdf');
    print($results['document']->scalar);
} else {
    header("Location: quotation.php?error=" . $results['error']);
}

?>