diff options
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/edit/part_bill_event.cgi | 2 | ||||
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 24 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 3 | ||||
-rwxr-xr-x | httemplate/misc/bill.cgi | 3 |
4 files changed, 24 insertions, 8 deletions
diff --git a/httemplate/edit/part_bill_event.cgi b/httemplate/edit/part_bill_event.cgi index c80d51c8f..8e5dcd1fc 100755 --- a/httemplate/edit/part_bill_event.cgi +++ b/httemplate/edit/part_bill_event.cgi @@ -402,7 +402,7 @@ Invoice Event #<% $hashref->{eventpart} ? $hashref->{eventpart} : "(NEW)" %> % % 'apply' => { % 'name' => 'Apply unapplied payments and credits', -% 'code' => '$cust_main->apply_payments; $cust_main->apply_credits; "";', +% 'code' => '$cust_main->apply_payments_and_credits; "";', % 'weight' => 70, % }, % diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index c70ef74fa..f970508da 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -117,23 +117,40 @@ Tax information <INPUT TYPE="checkbox" NAME="recurtax" VALUE="Y" <% $hashref->{recurtax} eq 'Y' ? ' CHECKED' : '' %>> </TD> </TR> + % my $conf = new FS::Conf; % if ( $conf->exists('enable_taxclasses') ) { - <TR> <TD align="right">Tax class</TD> <TD> <% include('/elements/select-taxclass.html', $hashref->{taxclass} ) %> </TD> </TR> -% } else { +% } else { <% include('/elements/select-taxclass.html', $hashref->{taxclass} ) %> + % } +</TABLE> +<BR> +Line-item revenue recognition +<% ntable("#cccccc", 2) %> +% tie my %weight, 'Tie::IxHash', +% 'pay_weight' => 'Payment', +% 'credit_weight' => 'Credit' +% ; +% foreach my $weight (keys %weight) { + <TR> + <TD ALIGN="right"><% $weight{$weight} %> weight</TD> + <TD> + <INPUT TYPE="text" NAME="<% $weight %>" SIZE=6 VALUE=<% $hashref->{$weight} || 0 %>> + </TD> + </TR> +% } </TABLE> </TD></TR></TABLE> @@ -250,7 +267,8 @@ Tax information % 'form_action' => 'process/part_pkg.cgi', % 'form_elements' => \@form_elements, % 'form_text' => [ qw(pkg comment promo_code clone pkgnum pkgpart), -% @fixups +% qw(pay_weight credit_weight), #keys(%weight), +% @fixups, % ], % 'form_checkbox' => [ qw(setuptax recurtax disabled) ], % 'form_radio' => \@form_radio, diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 505973dc7..26d6debcd 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -142,8 +142,7 @@ % if ( $conf->exists('backend-realtime') && ! $error ) { % % my $berror = $new->bill; -% $new->apply_payments; -% $new->apply_credits; +% $new->apply_payments_and_credits; % $berror ||= $new->collect( 'realtime' => 1 ); % warn "Warning, error billing during backend-realtime: $berror" if $berror; % diff --git a/httemplate/misc/bill.cgi b/httemplate/misc/bill.cgi index 6e4cc265d..8d4b4ac65 100755 --- a/httemplate/misc/bill.cgi +++ b/httemplate/misc/bill.cgi @@ -14,8 +14,7 @@ %#&eidiot($error) if $error; % %unless ( $error ) { -% $cust_main->apply_payments; -% $cust_main->apply_credits; +% $cust_main->apply_payments_and_credits; % % $error = $cust_main->collect( % # 'invoice-time'=>$time, |