[freeside-commits] freeside/httemplate/edit/process part_pkg.cgi, 1.40, 1.41

Jeff Finucane,420,, jeff at wavetail.420.am
Mon Jul 20 07:26:14 PDT 2009


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv9329/httemplate/edit/process

Modified Files:
	part_pkg.cgi 
Log Message:
bundle bill linked packages into top line total when desired #5724

Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/part_pkg.cgi,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- part_pkg.cgi	29 Jun 2009 13:53:24 -0000	1.40
+++ part_pkg.cgi	20 Jul 2009 14:26:12 -0000	1.41
@@ -163,16 +163,28 @@
     'target_table' => 'part_pkg',
     'base_field'   => 'src_pkgpart',
     'target_field' => 'dst_pkgpart',
-    'hashref'      => { 'link_type' => 'bill' },
-    'params'       => [ map $cgi->param($_), grep /^bill_dst_pkgpart/, $cgi->param ],
-  },
-  { 'link_table'   => 'part_pkg_link',
-    'target_table' => 'part_pkg',
-    'base_field'   => 'src_pkgpart',
-    'target_field' => 'dst_pkgpart',
-    'hashref'      => { 'link_type' => 'svc' },
-    'params'       => [ map $cgi->param($_), grep /^svc_dst_pkgpart/, $cgi->param ],
+    'hashref'      => { 'link_type' => 'svc', 'hidden' => '' },
+    'params'       => [ map $cgi->param($_),
+                        grep /^svc_dst_pkgpart/, $cgi->param
+                      ],
   },
+  map { 
+    my $hidden = $_;
+    { 'link_table'   => 'part_pkg_link',
+      'target_table' => 'part_pkg',
+      'base_field'   => 'src_pkgpart',
+      'target_field' => 'dst_pkgpart',
+      'hashref'      => { 'link_type' => 'bill', 'hidden' => $hidden },
+      'params'       => [ map { $cgi->param($_) }
+                          grep { my $param = "bill_dst_pkgpart__hidden";
+                                 my $digit = '';
+                                 (($digit) = /^bill_dst_pkgpart(\d+)/ ) &&
+                                 $cgi->param("$param$digit") eq $hidden;
+                               }
+                          $cgi->param
+                        ],
+    },
+  } ( '', 'Y' ),
 );
 
 foreach my $override_class ($cgi->param) {



More information about the freeside-commits mailing list