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 ) {
62 '<TR CLASS="row' . $row . '">'.
65 if ( $detail['pkgnum'] ) {
67 '<A HREF="quotation_remove_pkg.php?pkgnum=' .
68 $detail['pkgnum'] . '">'.
69 '<IMG SRC="images/cross.png" /></A>'
74 '<TD>'. htmlspecialchars($detail['description']). '</TD>'.
75 '<TD CLASS="amount">'. $detail['amount']. '</TD>'.
84 '<TD CLASS="amount">'. $section['subtotal']. '</TD>'.
92 $pkgselect = $freeside->mason_comp( array(
93 'session_id' => $_COOKIE['session_id'],
94 'comp' => '/elements/select-part_pkg.html',
95 'args' => array( 'onchange' , 'enable_order_pkg()',
96 'empty_label' , 'Select package',
97 'form_name' , 'AddPkgForm',
100 if ( isset($pkgselect['error']) && $pkgselect['error'] ) {
101 $error = $pkgselect['error'];
102 header('Location:index.php?error='. urlencode($pkgselect));
107 <SCRIPT TYPE="text/javascript">
108 function enable_order_pkg () {
109 document.AddPkgForm.submit.disabled =
110 (document.AddPkgForm.pkgpart.value == '');
114 <DIV STYLE="border-top: 1px solid; padding: 1ex">
115 <? $error = $_REQUEST['error']; include('elements/error.php'); ?>
117 <FORM NAME="AddPkgForm" ACTION="quotation_add_pkg.php" METHOD=POST>
118 <? echo $pkgselect['output']; ?>
119 <INPUT NAME="submit" TYPE="submit" VALUE="Add package" <? if ( ! isset($_REQUEST['pkgpart']) ) { echo 'DISABLED'; } ?>>
122 <? if ( $can_order ) { ?>
123 <FORM NAME="OrderQuoteForm" ACTION="quotation_order.php" METHOD=POST>
124 <INPUT TYPE="submit" VALUE="Confirm this order" <? if ( !$can_order ) { echo 'DISABLED'; } ?>>
129 <? include('elements/menu_footer.php'); ?>
130 <? include('elements/footer.php'); ?>