'min' => 0,
'max' => 0,
),
+ 'generate' => array(
+ 'desc' => 'Generate notifications for a table, eg. cash_invoice',
+ 'default' => '',
+ 'short' => 'g',
+ 'min' => 0,
+ 'max' => 1,
+ ),
);
var $target = 'Core/NotifySend';
var $evtype = ''; // any notification...
// this script should only handle EMAIL notifications..
-
+ var $force = false;
function getAuth()
{
$ff = HTML_FlexyFramework::get();
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);
}
- function setCompany() {
- $co = DB_DataObject::Factory('Companies');
- if(!$co->get('code', 'MediaWatchMe')) {
- $this->errors[] = 'Invalid Supplier Code: MediaWatchMe';
- }
- $this->company = $co->id;
- }
-
function output()
{
die("Done\n");