X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=379aaaea44004320699309438cee53f054673086;hb=30026a09a72bb16b8c7e17035250b9d797bd47e2;hp=05a375ac73756f3225f08c5f1cfac219d5e5d0c9;hpb=80a28e539bd4ad11a309e5f98402beea648fee67;p=freeside.git diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 05a375ac7..379aaaea4 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -1,11 +1,12 @@ <& /elements/header-popup.html, mt('One-time charge'), '', - ( $cgi->param('error') ? '' : 'onload="addRow()"' ), + ( ($quotationnum || $cgi->param('error')) ? '' : 'onload="addRow()"' ), &> + <& /elements/error.html &> @@ -39,7 +40,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; @@ -169,7 +170,22 @@ function bill_now_changed (what) { noinit => 1, } &> -% } + + <& /elements/tr-checkbox.html, + label => emt('Invoice this charge separately'), + field => 'separate_bill', + value => 'Y', + curr_value => $cust_pkg->get('separate_bill'), + &> + + <% mt('Tax exempt') |h %> + param('setuptax') ? 'CHECKED' : '' %>> + + + <& /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') &> +% } % } else { # new one-time charge @@ -269,6 +285,12 @@ function bill_now_changed (what) { }); +<& /elements/tr-checkbox.html, + label => emt('Invoice this charge separately'), + field => 'separate_bill', + value => 'Y' +&> + % } % if ( ! $quotationnum && $cust_main->payby =~ /^(CARD|CHEK)$/ ) { @@ -306,13 +328,16 @@ function bill_now_changed (what) { +% 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) { <% mt('Optional additional description (also printed on invoice):') |h %> -% my $row = 0; -% foreach (@description) { +% foreach (@description) { @@ -327,8 +352,9 @@ function bill_now_changed (what) { > -% $row++; -% } +% $row++; +% } +% }