separate setup and recur discounts, #14092
[freeside.git] / httemplate / view / cust_main / packages / status.html
index 7e125f7..13bd202 100644 (file)
@@ -461,10 +461,11 @@ sub pkg_status_row_changed {
     my $part_pkg = $old->part_pkg;
     $html .= pkg_status_row_colspan(
       $cust_pkg, 
-      emt("Changed from [_1]: [_2]",
-             $cust_pkg->change_pkgnum,
-             $part_pkg->pkg_comment(cust_pkg=>$old, nopartpkg=>1)
-         ),
+#      emt("Changed from [_1]: [_2]",
+#             $cust_pkg->change_pkgnum,
+#             $part_pkg->pkg_comment(cust_pkg=>$old, nopartpkg=>1)
+#         ),
+      '',
       '',
       'size'    => '-1',
       'align'   => 'right',
@@ -529,17 +530,25 @@ sub pkg_status_row_discount {
 
     my $discount = $cust_pkg_discount->discount;
 
-    my $label = '<B>'.emt('Discount').'</B>: '. $discount->description;
-    if ( $discount->months ) {
+    my $label = '<SPAN STYLE="font-size: small"><B>';
+    if ( $cust_pkg_discount->setuprecur eq 'setup' ) {
+      $label .= emt('Setup Discount');
+    } else {
+      $label .= emt('Recurring Discount');
+    }
+    $label .= '</B>: '. $discount->description;
+    warn Dumper $cust_pkg_discount;
+    if ( $discount->months > 0 and $cust_pkg_discount->months_used > 0 ) {
       my $remaining = $discount->months - $cust_pkg_discount->months_used;
       $remaining = sprintf('%.2f', $remaining) if $remaining =~ /\./;
-      $label .= emt("([_1] months remaining)",$remaining);
+      $label .= <br> . emt("([_1] months remaining)",$remaining);
     }
+    $label .= '</SPAN>';
 
-    $label .= ' <FONT SIZE="-1">('.
-                '<A HREF="../misc/delete-cust_pkg_discount.html?'.
-                  $cust_pkg_discount->pkgdiscountnum.
-                '">'.emt('remove discount').'</A>)</FONT>';
+    #$label .= ' <FONT SIZE="-1">('.
+    #            '<A HREF="../misc/delete-cust_pkg_discount.html?'.
+    #              $cust_pkg_discount->pkgdiscountnum.
+    #            '">'.emt('remove discount').'</A>)</FONT>';
 
     $html .= pkg_status_row_colspan( $cust_pkg, $label, '', %opt );