fix links for previous/next period inbound calls, RT#73652
authorIvan Kohler <ivan@freeside.biz>
Wed, 14 Dec 2016 18:10:28 +0000 (10:10 -0800)
committerIvan Kohler <ivan@freeside.biz>
Wed, 14 Dec 2016 18:10:28 +0000 (10:10 -0800)
fs_selfservice/FS-SelfService/cgi/view_cdr_details.html

index d2be287..40eed80 100644 (file)
 <TABLE WIDTH="100%">
   <TR>
     <TD WIDTH="50%">
-<%= if ($previous < $beginning) {
-    $OUT .= qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;!;
-    $OUT .= qq!inbound=1;! if $inbound;
-    $OUT .= qq!beginning=$previous;ending=$beginning">Previous period</A>!;
-    }else{
+<%=
+    $ahref = qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;!;
+    $ahref = qq!inbound=1;! if $inbound;
+    if ($previous < $beginning) {
+      $OUT .= $ahref.
+              qq!beginning=$previous;ending=$beginning">Previous period</A>!;
+    } else {
       '';
-    } %>
+    }
+%>
     </TD>
     <TD  WIDTH="50%" ALIGN="right">
-<%= if ($next > $ending) {
-    $OUT .= qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;!;
-    $OUT .= qq!inbound=1;! if $inbound;
-    $OUT .= qq!beginning=$ending;ending=$next">Next period</A>!;
-    }else{
+<%= 
+    if ($next > $ending) {
+      $OUT .= $ahref. qq!beginning=$ending;ending=$next">Next period</A>!;
+    } else {
       '';
-    }%>
+    }
+%>
     </TD>
   </TR>
 </TABLE>