- ( $setup ? time2str("%D",$setup) : "(Not setup)" ), '</TD></TR>',
- '<TR><TD ALIGN="right">Next bill date</TD><TD BGCOLOR="#ffffff">',
- ( $bill ? time2str("%D",$bill) : " " ), '</TD></TR>',
-;
+ ( $setup ? time2str("%D",$setup) : "(Not setup)" ), '</TD></TR>';
+
+print '<TR><TD ALIGN="right">Last bill date</TD><TD BGCOLOR="#ffffff">',
+ ( $cust_pkg->get('last_bill') ? time2str("%D",$cust_pkg->get('last_bill')) : " " ),
+ '</TD></TR>'
+ if $cust_pkg->dbdef_table->column('last_bill');
+
+print '<TR><TD ALIGN="right">Next bill date</TD><TD BGCOLOR="#ffffff">',
+ ( $bill ? time2str("%D",$bill) : " " ), '</TD></TR>';
+