X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fquick-charge.html;h=07501a4cf0f075bae1c06d852d36c65d63b9b8ce;hb=bf9b266acafce57cfa532801c00d45dc4eab765c;hp=51cd854ca436a3c919d9c891de31b211810da6e4;hpb=24a7dd6d18a1413ec34b906274365e4b2fef28e8;p=freeside.git
diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html
index 51cd854ca..07501a4cf 100644
--- a/httemplate/edit/quick-charge.html
+++ b/httemplate/edit/quick-charge.html
@@ -1,12 +1,15 @@
-% if ( $quotationnum ) {
-<& /elements/header.html, mt('One-time charge') &>
+% if ( $quotationnum && ! $cust_main ) {
+<& /elements/header.html, mt('Quotation #[_1]: add one-time charge', $quotationnum) &>
% } else {
<& /elements/header-cust_main.html,
- view => 'packages',
+ view => $quotationnum ? 'quotations' : 'packages',
cust_main => $cust_main,
etc => $cgi->param('error') ? '' : 'onload="addRow()"',
&>
-
One-time charge
+<% $quotationnum
+ ? emt('Quotation #[_1]: add one-time charge', $quotationnum)
+ : mt('One-time charge')
+ %>
% }
<& /elements/init_calendar.html &>
@@ -115,6 +118,9 @@ function bill_now_changed (what) {
+
+
+<% mt('Charge') |h %>
% if ( $cust_pkg ) { #modify one-time charge
@@ -131,15 +137,15 @@ function bill_now_changed (what) {
prefix => $money_char,
&>
-% if ( $curuser->access_right('Edit package definition costs') ) {
- <& $field,
- label => mt('Cost'),
- field => 'setup_cost',
- value => sprintf('%.2f',$part_pkg->setup_cost),
- size => 8,
- prefix => $money_char,
- &>
-% }
+% if ( $curuser->access_right('Edit package definition costs') ) {
+ <& $field,
+ label => mt('Cost'),
+ field => 'setup_cost',
+ value => sprintf('%.2f',$part_pkg->setup_cost),
+ size => 8,
+ prefix => $money_char,
+ &>
+% }
% if ( $conf->exists('invoice-unitprice') ) {
<& $field,
@@ -188,7 +194,7 @@ function bill_now_changed (what) {
curr_value => $cust_pkg->get('separate_bill'),
&>
- <% mt('Tax exempt') |h %> |
+ <% mt('Tax exempt') |h %> |
param('setuptax') ? 'CHECKED' : '' %>> |
@@ -198,7 +204,10 @@ function bill_now_changed (what) {
'label' => emt('Tax product'),
'curr_value' => $part_pkg->get('taxproductnum')
&>
-% }
+% }
+
+
+ |
% } else { # new one-time charge
@@ -215,16 +224,6 @@ function bill_now_changed (what) {
-% if ( $curuser->access_right('Edit package definition costs') ) {
- <& /elements/tr-input-text.html,
- label => mt('Cost'),
- field => 'setup_cost',
- value => $setup_cost,
- size => 8,
- prefix => $money_char,
- &>
-% }
-
% if ( $conf->exists('invoice-unitprice') ) {
<% mt('Quantity') |h %> |
@@ -240,98 +239,6 @@ function bill_now_changed (what) {
<& /elements/tr-select-pkg_class.html, 'curr_value' => $classnum &>
-% unless ( $quotationnum ) {
-
-
- <% mt('Invoice now') |h %> |
-
- param('bill_now') ? 'CHECKED' : '' %>
- onClick = "bill_now_changed(this);"
- onChange = "bill_now_changed(this);"
- >
- <% mt('with terms') |h %>
- <& /elements/select-terms.html,
- 'curr_value' => scalar($cgi->param('invoice_terms')),
- 'disabled' => ( $cgi->param('bill_now') ? 0 : 1 ),
- 'agentnum' => $cust_or_prospect->agentnum,
- &>
- |
-
-
-% # false laziness w/misc/order_pkg.html
-
- <% mt('Charge date') |h %> |
-
- param('bill_now')
- ? 'STYLE = "background-color:#dddddd" DISABLED'
- : ''
- %>
- >
-
- param('bill_now') ? '' : 'STYLE="display:none"' %>
- >
- (<% mt('leave blank to charge immediately') |h %>)
- |
-
-
-
-
-<& /elements/tr-checkbox.html,
- label => emt('Invoice this charge separately'),
- field => 'separate_bill',
- value => 'Y'
-&>
-
-% }
-
-% if ( ! $quotationnum && $cust_main->payby =~ /^(CARD|CHEK)$/ ) {
-% my $what = lc(FS::payby->shortname($cust_main->payby));
-
- <% mt("Disable automatic $what charge") |h %> |
- |
-
-% }
-
-
- <% mt('Tax exempt') |h %> |
- param('setuptax') ? 'CHECKED' : '' %>> |
-
-
-<& /elements/tr-select-taxclass.html, 'curr_value' => scalar($cgi->param('taxclass')) &>
-
-<& /elements/tr-select-taxproduct.html,
- 'label' => emt('Tax product'),
- 'curr_value' => scalar($cgi->param('taxproductnum')),
-&>
-
-<& /elements/tr-select-taxoverride.html,
- 'curr_value' => scalar($cgi->param('tax_override')),
-&>
-
-% } # if !$cust_pkg
-
<% mt('Description') |h %> |
@@ -352,7 +259,7 @@ function bill_now_changed (what) {
% unless ($quotationnum) {
|
|
- <% mt('Optional additional description (also printed on invoice):') |h %> |
+ <% mt('Optional additional description (also printed on invoice):') |h %> |
% foreach (@description) {
@@ -374,17 +281,9 @@ function bill_now_changed (what) {
% }
% }
-
-
-% my $label = $cust_pkg
-% ? emt('Modify one-time charge')
-% : emt('Add one-time charge');
-param('error') || $cust_pkg) ? '' :' DISABLED' %>>
-
-
+
-