+
+% my $lock_locationnum = scalar($cgi->param('lock_locationnum'));
+% my $contact_title = $lock_locationnum ? 'Contact'
+% : 'Contact and Location';
+<FONT CLASS="fsinnerbox-title"><% mt($contact_title) |h %></FONT>
+<TABLE CLASS="fsinnerbox">
+
+<& /elements/tr-select-contact.html,
+ 'cgi' => $cgi,
+ 'cust_main' => $cust_main,
+ 'prospect_main' => $prospect_main,
+&>
+
+% if ( $cgi->param('lock_locationnum') ) {
+
+ <INPUT TYPE = "hidden"
+ NAME = "locationnum"
+ ID = "locationnum"
+ VALUE = "<% scalar($cgi->param('lock_locationnum')) |h %>"
+ >
+
+% } else {
+
+ <& /elements/tr-select-cust_location.html,
+ 'cgi' => $cgi,
+ 'cust_main' => $cust_main,
+ 'prospect_main' => $prospect_main,
+ &>
+
+% }
+
+</TABLE>
+
+% unless ( $cgi->param('lock_locationnum') ) {
+
+ <& /elements/standardize_locations.html,
+ 'form' => "OrderPkgForm",
+ 'callback' => 'document.OrderPkgForm.submit()',
+ 'with_census' => 1,
+ 'with_census_functions' => 1,
+ &>
+
+% }
+
+% if ($quotationnum) {
+<BR>
+<FONT CLASS="fsinnerbox-title"><% mt('Quotation details') |h %></FONT>
+<TABLE ID="QuotationDetailTable" CLASS="fsinnerbox">
+ <TR>
+ <TD></TD>
+ <TD>
+ <SELECT NAME="copy_on_order">
+ <OPTION VALUE=""<% $copy_on_order ? '' : ' SELECTED' %>>
+ <% emt('Details will only appear on quotation') %>
+ </OPTION>
+ <OPTION VALUE="Y"<% $copy_on_order ? ' SELECTED' : '' %>>
+ <% emt('Copy details to invoice when placing order') %>
+ </OPTION>
+ </SELECT>
+ </TD>
+ </TR>
+<& /edit/elements/detail-table.html,
+ id => 'QuotationDetailTable',
+ details => $details->{'quotation_detail'},
+ field => 'quotation_detail',
+ &>
+</TABLE>
+% } else {
+<BR>
+<FONT CLASS="fsinnerbox-title"><% mt('Invoice details') |h %></FONT>
+<TABLE ID="InvoiceDetailTable" CLASS="fsinnerbox">
+<& /edit/elements/detail-table.html,
+ id => 'InvoiceDetailTable',
+ details => $details->{'invoice_detail'},
+ field => 'invoice_detail',
+ &>