+=item last_cust_pkg_reason
+
+Returns the most recent FS::reason associated with the package.
+
+=cut
+
+sub last_cust_pkg_reason {
+ my $self = shift;
+ qsearchs( {
+ 'table' => 'cust_pkg_reason',
+ 'hashref' => { 'pkgnum' => $self->pkgnum, },
+ 'extra_sql'=> "AND date <= ". time,
+ 'order_by' => 'ORDER BY date DESC LIMIT 1',
+ } );
+}
+