[freeside-commits] freeside/FS/FS cust_bill.pm, 1.350.2.2, 1.350.2.3
Ivan,,,
ivan at wavetail.420.am
Mon Aug 1 22:45:24 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv30866
Modified Files:
Tag: FREESIDE_2_3_BRANCH
cust_bill.pm
Log Message:
fix bundled package display, RT#13866
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.350.2.2
retrieving revision 1.350.2.3
diff -u -w -d -r1.350.2.2 -r1.350.2.3
--- cust_bill.pm 27 Jul 2011 23:27:14 -0000 1.350.2.2
+++ cust_bill.pm 2 Aug 2011 05:45:21 -0000 1.350.2.3
@@ -4608,6 +4608,21 @@
foreach my $cust_bill_pkg ( @$cust_bill_pkgs )
{
+ foreach ( $s, $r, ($opt{skip_usage} ? () : $u ) ) {
+ if ( $_ && !$cust_bill_pkg->hidden ) {
+ $_->{amount} = sprintf( "%.2f", $_->{amount} ),
+ $_->{amount} =~ s/^\-0\.00$/0.00/;
+ $_->{unit_amount} = sprintf( "%.2f", $_->{unit_amount} ),
+ push @b, { %$_ }
+ if $_->{amount} != 0
+ || $discount_show_always
+ || ( ! $_->{_is_setup} && $_->{recur_show_zero} )
+ || ( $_->{_is_setup} && $_->{setup_show_zero} )
+ ;
+ $_ = undef;
+ }
+ }
+
warn "$me _items_cust_bill_pkg considering cust_bill_pkg ".
$cust_bill_pkg->billpkgnum. ", pkgnum ". $cust_bill_pkg->pkgnum. "\n"
if $DEBUG > 1;
@@ -4622,7 +4637,8 @@
)
{
- warn "$me _items_cust_bill_pkg considering display item $display\n"
+ warn "$me _items_cust_bill_pkg considering cust_bill_pkg_display ".
+ $display->billpkgdisplaynum. "\n"
if $DEBUG > 1;
my $type = $display->type;
@@ -4691,6 +4707,7 @@
#pkgpart => $part_pkg->pkgpart,
pkgnum => $cust_bill_pkg->pkgnum,
amount => $cust_bill_pkg->setup,
+ setup_show_zero => $cust_bill_pkg->setup_show_zero,
unit_amount => $cust_bill_pkg->unitsetup,
quantity => $cust_bill_pkg->quantity,
ext_description => \@d,
@@ -4797,6 +4814,7 @@
#pkgpart => $part_pkg->pkgpart,
pkgnum => $cust_bill_pkg->pkgnum,
amount => $amount,
+ recur_show_zero => $cust_bill_pkg->recur_show_zero,
unit_amount => $cust_bill_pkg->unitrecur,
quantity => $cust_bill_pkg->quantity,
ext_description => \@d,
@@ -4818,6 +4836,7 @@
#pkgpart => $part_pkg->pkgpart,
pkgnum => $cust_bill_pkg->pkgnum,
amount => $amount,
+ recur_show_zero => $cust_bill_pkg->recur_show_zero,
unit_amount => $cust_bill_pkg->unitrecur,
quantity => $cust_bill_pkg->quantity,
ext_description => \@d,
@@ -4854,34 +4873,21 @@
$discount_show_always = ($cust_bill_pkg->cust_bill_pkg_discount
&& $conf->exists('discount-show-always'));
+ }
+
foreach ( $s, $r, ($opt{skip_usage} ? () : $u ) ) {
- if ( $_ && !$cust_bill_pkg->hidden ) {
+ if ( $_ ) {
$_->{amount} = sprintf( "%.2f", $_->{amount} ),
$_->{amount} =~ s/^\-0\.00$/0.00/;
$_->{unit_amount} = sprintf( "%.2f", $_->{unit_amount} ),
push @b, { %$_ }
if $_->{amount} != 0
|| $discount_show_always
- || ( ! $_->{_is_setup} && $cust_bill_pkg->recur_show_zero )
- || ( $_->{_is_setup} && $cust_bill_pkg->setup_show_zero )
- ;
- $_ = undef;
- }
+ || ( ! $_->{_is_setup} && $_->{recur_show_zero} )
+ || ( $_->{_is_setup} && $_->{setup_show_zero} )
}
-
}
- #foreach ( $s, $r, ($opt{skip_usage} ? () : $u ) ) {
- # if ( $_ ) {
- # $_->{amount} = sprintf( "%.2f", $_->{amount} ),
- # $_->{amount} =~ s/^\-0\.00$/0.00/;
- # $_->{unit_amount} = sprintf( "%.2f", $_->{unit_amount} ),
- # push @b, { %$_ }
- # if $_->{amount} != 0
- # || $discount_show_always
- # }
- #}
-
warn "$me _items_cust_bill_pkg done considering cust_bill_pkgs\n"
if $DEBUG > 1;
More information about the freeside-commits
mailing list