X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_svc.cgi;h=9fb359d1ddbf270c4efbcd19149e9dca1e6f7c67;hp=c8adebcd6ab4687b91af5526b4e521bcf2df2d08;hb=3ef62a0570055da710328937e7f65dbb2c027c62;hpb=a7c1b602f88c177db34477ed4cdc1f72603f8995 diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi index c8adebcd6..9fb359d1d 100755 --- a/httemplate/browse/part_svc.cgi +++ b/httemplate/browse/part_svc.cgi @@ -8,7 +8,9 @@ if ( $cgi->param('showdisabled') ) { %search = ( 'disabled' => '' ); } -my @part_svc = qsearch('part_svc', \%search ); +my @part_svc = + sort { $a->getfield('svcpart') <=> $b->getfield('svcpart') } + qsearch('part_svc', \%search ); my $total = scalar(@part_svc); %> @@ -22,6 +24,14 @@ function part_export_areyousure(href) { Services are items you offer to your customers.

+ +
Add a new service definition or  +

+ <%= $total %> services <%= $cgi->param('showdisabled') ? do { $cgi->param('showdisabled', 0); @@ -38,9 +48,7 @@ function part_export_areyousure(href) { Modifier -<% foreach my $part_svc ( sort { - $a->getfield('svcpart') <=> $b->getfield('svcpart') - } @part_svc ) { +<% foreach my $part_svc ( @part_svc ) { my $hashref = $part_svc->hashref; my $svcdb = $hashref->{svcdb}; my @dfields = fields($svcdb); @@ -66,11 +74,15 @@ function part_export_areyousure(href) { <%= $hashref->{svcdb} %> ><%= itable() %> <% - my @part_export = qsearch('part_export', { svcpart => $part_svc->svcpart } ); - foreach my $part_export ( @part_export ) { +# my @part_export = +map { qsearchs('part_export', { exportnum => $_->exportnum } ) } qsearch('export_svc', { svcpart => $part_svc->svcpart } ) ; + foreach my $part_export ( + map { qsearchs('part_export', { exportnum => $_->exportnum } ) } + qsearch('export_svc', { svcpart => $part_svc->svcpart } ) + ) { %> - <%= $part_export->exporttype %> to <%= $part_export->machine %> + <%= $part_export->exporttype %> to <%= $part_export->machine %> <% } %> @@ -90,10 +102,6 @@ function part_export_areyousure(href) { %> <% } %> - - - param('showdisabled') ? 7 : 8 %>>Add a new service definition -