9 background-color: #ddf;
14 border-collapse: collapse;
25 background-color: #eee;
28 background-color: #fff;
32 <? $title ='Plan a new service order'; include('elements/header.php'); ?>
33 <? $current_menu = 'services_new.php'; include('elements/menu.php'); ?>
36 $quotation = $freeside->quotation_info(array(
37 'session_id' => $_COOKIE['session_id'],
42 if ( isset($quotation['sections']) and count($quotation['sections']) > 0 ) {
44 # there are other ways this could be formatted, yes.
45 # if you want the HTML-formatted quotation, use quotation_print().
47 '<INPUT STYLE="float: right" TYPE="button" onclick="window.location.href=\'quotation_print.php\'" value="Download a quotation" />'.
48 '<H3>Order summary</H3>'.
51 foreach ( $quotation['sections'] as $section ) {
53 '<TABLE CLASS="section">'.
55 '<TH COLSPAN=4>'. htmlspecialchars($section['description']).'</TH>'.
60 foreach ( $section['detail_items'] as $detail ) {
61 if (isset($detail['description'])) {
63 '<TR CLASS="row' . $row . '">'.
66 if ( $detail['pkgnum'] ) {
68 '<A HREF="quotation_remove_pkg.php?pkgnum=' .
69 $detail['pkgnum'] . '">'.
70 '<IMG SRC="images/cross.png" /></A>'
75 '<TD>'. htmlspecialchars($detail['description']). '</TD>'.
76 '<TD CLASS="amount">'. $detail['amount']. '</TD>'.
81 # total rows; a 3.x-ism
85 '<TD>'. htmlspecialchars($detail['total_item']). '</TD>'.
86 '<TD CLASS="amount">'. $detail['total_amount']. '</TD>'.
91 if (isset($section['subtotal'])) {
96 '<TD CLASS="amount">'. $section['subtotal']. '</TD>'.
104 $pkgselect = $freeside->mason_comp( array(
105 'session_id' => $_COOKIE['session_id'],
106 'comp' => '/elements/select-part_pkg.html',
107 'args' => array( 'onchange' , 'enable_order_pkg()',
108 'empty_label' , 'Select package',
109 'form_name' , 'AddPkgForm',
112 if ( isset($pkgselect['error']) && $pkgselect['error'] ) {
113 $error = $pkgselect['error'];
114 header('Location:index.php?error='. urlencode($pkgselect));
119 <SCRIPT TYPE="text/javascript">
120 function enable_order_pkg () {
121 document.AddPkgForm.submit.disabled =
122 (document.AddPkgForm.pkgpart.value == '');
126 <DIV STYLE="border-top: 1px solid; padding: 1ex">
127 <? $error = $_REQUEST['error']; include('elements/error.php'); ?>
129 <FORM NAME="AddPkgForm" ACTION="quotation_add_pkg.php" METHOD=POST>
130 <? echo $pkgselect['output']; ?>
131 <INPUT NAME="submit" TYPE="submit" VALUE="Add package" <? if ( ! isset($_REQUEST['pkgpart']) ) { echo 'DISABLED'; } ?>>
134 <? if ( $can_order ) { ?>
135 <FORM NAME="OrderQuoteForm" ACTION="quotation_order.php" METHOD=POST>
136 <INPUT TYPE="submit" VALUE="Confirm this order" <? if ( !$can_order ) { echo 'DISABLED'; } ?>>
141 <? include('elements/menu_footer.php'); ?>
142 <? include('elements/footer.php'); ?>