-my $conf = new FS::Conf;
-
-my $curuser = $FS::CurrentUser::CurrentUser;
-
-my($pre, $post) = ('', '');
-if ( $cust_bill->owed > 0 ) {
- $pre = '<B><FONT SIZE="+1" COLOR="#FF0000">Open ';
- $post = '</FONT></B>';
+my $under = '';
+my $invoice;
+if ( $cust_bill->pending ) {
+ $invoice = '<I><FONT SIZE="+1" COLOR="#D05000">' .
+ emt("Pending Invoice #[_1] (Charges of [_2])", $cust_bill->display_invnum, $cust_bill->charged);
+} elsif ( $cust_bill->owed > 0 ) {
+ $invoice = '<B><FONT SIZE="+1" COLOR="#FF0000">' .
+ emt("Open Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed) .
+ '</FONT></B>';
+ if ( $cust_bill->promised_date ) {
+ $under .= '<BR>'. emt('Payment promised on [_1]',
+ time2str($opt{'date_format'}, $cust_bill->promised_date));
+ }
+} else {
+ $invoice = emt("Invoice #[_1] (Balance [_2])",$cust_bill->display_invnum,$cust_bill->owed);