change one-time charge UI to a full page to avoid conflict with taxproducts, #71394
[freeside.git] / httemplate / edit / quick-charge.html
index 78752c0..2bbbe43 100644 (file)
@@ -1,5 +1,5 @@
-<& /elements/header-popup.html, mt('One-time charge'), '',
-            ( $cgi->param('error') ? '' : 'onload="addRow()"' ),
+<& /elements/header.html, mt('One-time charge'), '',
+            ( ($quotationnum || $cgi->param('error')) ? '' : 'onload="addRow()"' ),
 &>
 
 <LINK REL="stylesheet" TYPE="text/css" HREF="<%$fsurl%>elements/calendar-win2k-2.css" TITLE="win2k-2">
@@ -93,6 +93,18 @@ function bill_now_changed (what) {
 
 </SCRIPT>
 
+<P>
+% if ( $cust_main ) {
+<& /elements/small_custview.html,
+             $cust_main->custnum,
+             scalar($conf->config('countrydefault')),
+             1, #no balance
+&>
+% } else {
+<& /elements/small_prospect_view.html, $prospect_main &>
+% }
+</P>
+
 <FORM ACTION   = "process/quick-charge.cgi"
       NAME     = "QuickChargeForm"
       ID       = "QuickChargeForm"
@@ -183,7 +195,10 @@ function bill_now_changed (what) {
 
       <& /elements/tr-select-taxclass.html, 'curr_value' => $part_pkg->get('taxclass')  &>
 
-      <& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $part_pkg->get('taxproductnum')  &>
+      <& /elements/tr-select-taxproduct.html,
+        'label' => emt('Tax product'),
+        'curr_value' => $part_pkg->get('taxproductnum')
+      &>
 % }
 
 % } else { # new one-time charge
@@ -307,9 +322,14 @@ function bill_now_changed (what) {
 
 <& /elements/tr-select-taxclass.html, 'curr_value' => $cgi->param('taxclass')  &>
 
-<& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $cgi->param('taxproductnum')  &>
+<& /elements/tr-select-taxproduct.html,
+  'label' => emt('Tax product'),
+  'curr_value' => $cgi->param('taxproductnum')
+&>
 
-<& /elements/tr-select-taxoverride.html, 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => $cgi->param('tax_override')  &>
+<& /elements/tr-select-taxoverride.html,
+  'curr_value' => $cgi->param('tax_override')
+&>
 
 % } # if !$cust_pkg
 
@@ -327,13 +347,16 @@ function bill_now_changed (what) {
   </TD>
 </TR>
 
+% my $row = 0;
+% # quotation details are handled by quotation_pkg_detail records, added via link from view/quotation.html
+% # the details below get attached to the part_pkg record, and there's no way to edit that from quotations
+% unless ($quotationnum) {
 <TR>
   <TD></TD>
   <TD><FONT SIZE="-1"><% mt('Optional additional description (also printed on invoice):') |h %> </FONT></TD>
 </TR>
 
-% my $row = 0;
-% foreach (@description) {
+%   foreach (@description) {
     <TR>
       <TD></TD>
       <TD>
@@ -348,8 +371,9 @@ function bill_now_changed (what) {
         >
       </TD>
     </TR>
-% $row++;
-% } 
+%     $row++;
+%   }
+% }
 
 
 </TABLE>