),
'generate' => array(
'desc' => 'Generate notifications for a table, eg. cash_invoice',
- 'default' => 0,
+ 'default' => '',
'short' => 'g',
'min' => 0,
- 'max' => 0,
+ 'max' => 1,
),
);
if (is_a($w, 'DB_DataObject')) {
$w->generateNotifications();
}
-
+ if (!empty($opts['generate'])) {
+ $w = DB_DataObject::factory($opts['generate']);
+ if (is_a($w, 'DB_DataObject')) {
+ $w->generateNotifications();
+ }
+ exit;
+
+
+ }
//DB_DataObject::debugLevel(1);
$w = DB_DataObject::factory($this->table);