PATCH-MVI: Rectify part_svc failure when no exports exist for a service

Aidan Mountford aidan at oz.to
Sun Mar 28 21:33:42 PST 2004


Ivan,

The patch below fixes issues with part_svc
when there are no part_exports available for a
given svc.

I have a large number of other patches you may
wish to include.

If you want i will begin sending them through .

A


Index: httemplate/edit/part_svc.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/part_svc.cgi,v
retrieving revision 1.40
diff -c -3 -r1.40 part_svc.cgi
*** httemplate/edit/part_svc.cgi        13 Feb 2004 13:53:24 -0000      1.40
--- httemplate/edit/part_svc.cgi        29 Mar 2004 05:19:26 -0000
***************
*** 173,181 ****

        my $columns = 3;
        my $count = 0;
!       my @part_export =
!         map { qsearch( 'part_export', {exporttype => $_ } ) }
!           keys %{FS::part_export::export_info($layer)};
        $html .= '<BR><BR>'. table().
                 table(). "<TR><TH COLSPAN=$columns>Exports</TH></TR><TR>";
        foreach my $part_export ( @part_export ) {
--- 201,210 ----

        my $columns = 3;
        my $count = 0;
!       my $export_info= FS::part_export::export_info($layer);
!       my @part_export =
!           map { if ($_) { qsearch( 'part_export', {exporttype => $_ }
) } }
!              keys %{$export_info};
        $html .= '<BR><BR>'. table().
                 table(). "<TR><TH COLSPAN=$columns>Exports</TH></TR><TR>";
        foreach my $part_export ( @part_export ) {





More information about the freeside-devel mailing list