X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=896e8b2d2c073298cba8c4d7e0501105ff34a194;hb=e3df7e4b96abfda72201bf3598b6bfd449bfb2a1;hp=1ff70009c12f79f95b98be86d74d6fb22036566b;hpb=55daa3803103f841d0fb2b559040115908724da8;p=freeside.git diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 1ff70009c..896e8b2d2 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -1,11 +1,16 @@ -<& /elements/header-popup.html, mt('One-time charge'), '', - ( ($quotationnum || $cgi->param('error')) ? '' : 'onload="addRow()"' ), +% if ( $quotationnum ) { +<& /elements/header.html, mt('One-time charge') &> +% } else { +<& /elements/header-cust_main.html, + view => 'packages', + cust_main => $cust_main, + etc => $cgi->param('error') ? '' : 'onload="addRow()"', &> +

One-time charge

+% } - - - - +<& /elements/init_calendar.html &> + <& /elements/error.html &> @@ -15,9 +20,9 @@ function enable_quick_charge (e) { if ( document.QuickChargeForm.amount.value && document.QuickChargeForm.pkg.value ) { - document.QuickChargeForm.submitButton.disabled = false; + document.QuickChargeForm.submit.disabled = false; } else { - document.QuickChargeForm.submitButton.disabled = true; + document.QuickChargeForm.submit.disabled = true; } % if ( $curuser->option('disable_enter_submit_onetimecharge') ) { @@ -39,7 +44,7 @@ function enable_quick_charge (e) { function validate_quick_charge () { var pkg = document.QuickChargeForm.pkg.value; - var pkg_regex = /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]]*)$/ ; + var pkg_regex = XRegExp('^([\\p{L}\\p{N} \_\!\@\#\$\%\&\(\)\+\;\:\'\"\,\.\?\/\=\\-\\[\\]]*)$'); var amount = document.QuickChargeForm.amount.value; var amount_regex = /^\s*\$?\s*(\d*(\.?\d{1,2}))\s*$/ ; var rval = true; @@ -93,18 +98,24 @@ function bill_now_changed (what) { +

+% if ( $prospect_main ) { +<& /elements/small_prospect_view.html, $prospect_main &> +% } +

+
- +
% if ( $cust_pkg ) { #modify one-time charge @@ -183,13 +194,16 @@ 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 - + - + + + + -<& /elements/tr-select-taxclass.html, 'curr_value' => $cgi->param('taxclass') &> +<& /elements/tr-select-taxclass.html, 'curr_value' => scalar($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' => scalar($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' => scalar($cgi->param('tax_override')), +&> % } # if !$cust_pkg - +
<% mt('Amount to charge') |h %> <% mt('Amount to charge') |h %> <% $money_char %>exists('invoice-unitprice') ) {
<% mt('Quantity') |h %> <% mt('Quantity') |h %> - <% mt('Invoice now') |h %><% mt('Invoice now') |h %> - <% mt('Charge date') |h %> <% mt('Charge date') |h %> - <% mt('Tax exempt') |h %> <% mt('Tax exempt') |h %> param('setuptax') ? 'CHECKED' : '' %>>
<% mt('Description') |h %> <% mt('Description') |h %> param('error') || $cust_pkg) ? '' :' DISABLED' %>> @@ -427,8 +446,11 @@ function bill_now_changed (what) { - - +% if ( $quotationnum ) { + <& /elements/footer.html &> +% } else { + <& /elements/footer-cust_main.html &> +% } <%init> my $curuser = $FS::CurrentUser::CurrentUser;