diff options
author | Mark Wells <mark@freeside.biz> | 2015-04-25 15:02:15 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-04-25 15:02:23 -0700 |
commit | c110da0da864245e47cae019b8a347367cc6430c (patch) | |
tree | e406be890446095b8cd59a5b5c827c62dd063fff /ng_selfservice/quotation_print.php | |
parent | 4fda726fa9f8e709c68ec823edc5ae702723281c (diff) |
selfservice quotations, #33852
Diffstat (limited to 'ng_selfservice/quotation_print.php')
-rw-r--r-- | ng_selfservice/quotation_print.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ng_selfservice/quotation_print.php b/ng_selfservice/quotation_print.php new file mode 100644 index 000000000..9676405d1 --- /dev/null +++ b/ng_selfservice/quotation_print.php @@ -0,0 +1,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']); +} + +?> |