[freeside-commits] freeside/FS/FS Schema.pm, 1.239.2.50, 1.239.2.51 cust_bill.pm, 1.299.2.40, 1.299.2.41
Ivan,,,
ivan at wavetail.420.am
Tue Jul 12 16:00:35 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv31938/FS/FS
Modified Files:
Tag: FREESIDE_2_1_BRANCH
Schema.pm cust_bill.pm
Log Message:
fix UI for package editing w/recur_show_zero, add setup_show_zero, RT#9777
Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.239.2.50
retrieving revision 1.239.2.51
diff -u -w -d -r1.239.2.50 -r1.239.2.51
--- Schema.pm 23 Jun 2011 01:56:21 -0000 1.239.2.50
+++ Schema.pm 12 Jul 2011 23:00:33 -0000 1.239.2.51
@@ -1455,6 +1455,8 @@
'reason', 'varchar', '', $char_d, '', '',
'payby', 'char', '', 4, '', '', # CARD/BILL/COMP, should
# be index into payby
+ 'recur_show_zero', 'char', 'NULL', 1, '', '',
+ 'setup_show_zero', 'char', 'NULL', 1, '', '',
# table eventually
'payinfo', 'varchar', 'NULL', 512, '', '', #see cust_main above
'paymask', 'varchar', 'NULL', $char_d, '', '',
@@ -1638,6 +1640,7 @@
'pkgpart', 'int', '', '', '', '',
'svcpart', 'int', '', '', '', '',
'quantity', 'int', '', '', '', '',
+ 'setup_show_zero', 'char', 'NULL', 1, '', '',
'primary_svc','char', 'NULL', 1, '', '',
'hidden', 'char', 'NULL', 1, '', '',
],
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.299.2.40
retrieving revision 1.299.2.41
diff -u -w -d -r1.299.2.40 -r1.299.2.41
--- cust_bill.pm 7 Jul 2011 17:00:58 -0000 1.299.2.40
+++ cust_bill.pm 12 Jul 2011 23:00:33 -0000 1.299.2.41
@@ -4497,13 +4497,21 @@
my $cust_pkg = $cust_bill_pkg->cust_pkg;
- if ( $cust_bill_pkg->setup != 0 && (!$type || $type eq 'S') ) {
+ if ( (!$type || $type eq 'S')
+ && ( $cust_bill_pkg->setup != 0
+ || $cust_bill_pkg->setup_show_zero
+ )
+ )
+ {
warn "$me _items_cust_bill_pkg adding setup\n"
if $DEBUG > 1;
my $description = $desc;
- $description .= ' Setup' if $cust_bill_pkg->recur != 0;
+ $description .= ' Setup'
+ if $cust_bill_pkg->recur != 0
+ || $discount_show_always
+ || $cust_bill_pkg->recur_show_zero;
my @d = ();
unless ( $cust_pkg->part_pkg->hide_svc_detail
@@ -4532,6 +4540,7 @@
push @{ $s->{ext_description} }, @d;
} else {
$s = {
+ _is_setup => 1,
description => $description,
#pkgpart => $part_pkg->pkgpart,
pkgnum => $cust_bill_pkg->pkgnum,
@@ -4708,7 +4717,9 @@
push @b, { %$_ }
if $_->{amount} != 0
|| $discount_show_always
- || $cust_bill_pkg->recur_show_zero;
+ || ( ! $_->{_is_setup} && $cust_bill_pkg->recur_show_zero )
+ || ( $_->{_is_setup} && $cust_bill_pkg->setup_show_zero )
+ ;
$_ = undef;
}
}
More information about the freeside-commits
mailing list