+sub pkg_status_row_expire {
+ my $cust_pkg = shift;
+ my %opt = @_;
+ return unless $cust_pkg->get('expire');
+
+ my $title;
+
+ if ( $cust_pkg->get('change_to_pkg') ) {
+ if ( $cust_pkg->change_to_pkg->pkgpart != $cust_pkg->pkgpart ) {
+ $title = mt('Will change to <b>[_1]</b> on',
+ $cust_pkg->change_to_pkg->part_pkg->pkg);
+ } elsif ( $cust_pkg->change_to_pkg->locationnum != $cust_pkg->locationnum )
+ {
+ $title = mt('Will <b>change location</b> on');
+ } else {
+ # FS::cust_pkg->change_later should have prevented this, but
+ # just so that we can display _something_
+ $title = '<font color="#ff0000">Unknown package change</font>';
+ }
+
+ } else {
+
+ $title = emt('Expires');
+ if ( $opt{curuser}->access_right('Cancel customer package later')) {
+ $title = '<FONT SIZE=-1>( '. pkg_unexpire_link($cust_pkg). ' ) </FONT>'. $title;
+ }
+
+ }
+
+ pkg_status_row( $cust_pkg, $title, 'expire', %opt );
+}
+