Ejemplo n.º 1
0
 /**
  * Import Event of the module
  * @access private
  */
 function import_Event($modulenode, $moduleInstance, $eventnode)
 {
     $event_condition = '';
     $event_dependent = '[]';
     if (!empty($eventnode->condition)) {
         $event_condition = "{$eventnode->condition}";
     }
     if (!empty($eventnode->dependent)) {
         $event_dependent = "{$eventnode->dependent}";
     }
     Vtiger_Event::register($moduleInstance, (string) $eventnode->eventname, (string) $eventnode->classname, (string) $eventnode->filename, (string) $event_condition, (string) $event_dependent);
 }
Ejemplo n.º 2
0
 /**
  * Update Event of the module
  * @access private
  */
 function update_Event($modulenode, $moduleInstance, $eventnode)
 {
     Vtiger_Event::register($moduleInstance, $eventnode->eventname, $eventnode->classname, $eventnode->filename);
     // TODO Handle event property update
 }
$viewField = new Vtiger_Field();
$viewField->name = 'default_record_view';
$viewField->label = 'Default Record View';
$viewField->table = 'vtiger_users';
$viewField->column = 'default_record_view';
$viewField->columntype = 'VARCHAR(10)';
$viewField->typeofdata = 'V~O';
$viewField->uitype = 16;
$viewField->defaultvalue = 'Summary';
$moreInfoBlock->addField($viewField);
$viewField->setPicklistValues(array('Summary', 'Detail'));
Migration_Index_View::ExecuteQuery('UPDATE vtiger_users SET default_record_view = ?', array('Summary'));
$InvoiceInstance = Vtiger_Module::getInstance('Invoice');
Vtiger_Event::register($InvoiceInstance, 'vtiger.entity.aftersave', 'InvoiceHandler', 'modules/Invoice/InvoiceHandler.php');
$POInstance = Vtiger_Module::getInstance('PurchaseOrder');
Vtiger_Event::register($POInstance, 'vtiger.entity.aftersave', 'PurchaseOrderHandler', 'modules/PurchaseOrder/PurchaseOrderHandler.php');
$InvoiceBlockInstance = Vtiger_Block::getInstance('LBL_INVOICE_INFORMATION', $InvoiceInstance);
$field1 = Vtiger_Field::getInstance('received', $InvoiceInstance);
if (!$field1) {
    $field1 = new Vtiger_Field();
    $field1->name = 'received';
    $field1->label = 'Received';
    $field1->table = 'vtiger_invoice';
    $field1->uitype = 72;
    $field1->displaytype = 3;
    $field1->typeofdata = 'N~O';
    $field1->defaultvalue = 0;
    $InvoiceBlockInstance->addField($field1);
}
$field2 = Vtiger_Field::getInstance('balance', $InvoiceInstance);
if (!$field2) {
Ejemplo n.º 4
0
            } else {
                $labelInfo = getEntityName($row['setype'], array(intval($row['crmid'])));
            }
            if ($labelInfo) {
                $label = html_entity_decode($labelInfo[$row['crmid']], ENT_QUOTES);
                Migration_Index_View::ExecuteQuery('UPDATE vtiger_crmentity SET label=? WHERE crmid=? AND setype=?', array($label, $row['crmid'], $row['setype']));
            }
            if (intval($row['crmid']) > $lastMaxCRMId) {
                $lastMaxCRMId = intval($row['crmid']);
            }
        }
        $rs = null;
        unset($rs);
    } while (true);
    $homeModule = Vtiger_Module::getInstance('Home');
    Vtiger_Event::register($homeModule, 'vtiger.entity.aftersave', 'Vtiger_RecordLabelUpdater_Handler', 'modules/Vtiger/handlers/RecordLabelUpdater.php');
    echo "Record Update Handler was updated successfully";
}
// To update the Campaign related status value in database as in language file
$updateQuery = "update vtiger_campaignrelstatus set campaignrelstatus=? where campaignrelstatus=?";
Migration_Index_View::ExecuteQuery($updateQuery, array('Contacted - Unsuccessful', 'Contacted - Unsuccessful'));
echo 'Campaign related status value is updated';
//92 ends
//93 starts
//93 ends
//94 starts
$result = $adb->pquery('SELECT 1 FROM vtiger_currencies WHERE currency_name = ?', array('Libya, Dinar'));
if (!$adb->num_rows($result)) {
    Migration_Index_View::ExecuteQuery('INSERT INTO vtiger_currencies (currencyid, currency_name, currency_code, currency_symbol) VALUES(?, ?, ?, ?)', array($adb->getUniqueID('vtiger_currencies'), 'Libya, Dinar', 'LYD', 'LYD'));
}
//Start: Customer - Feature #17656 Allow users to add/remove date format with the date fields in workflow send mail task.
Ejemplo n.º 5
0
 function actualizeRegister()
 {
     Vtiger_Event::register('Calendar4You', 'vtiger.entity.aftersave', 'GoogleSync4YouHandler', 'modules/Calendar4You/GoogleSync4YouHandler.php');
     Vtiger_Event::register('Calendar4You', 'vtiger.entity.beforedelete', 'GoogleSync4YouHandler', 'modules/Calendar4You/GoogleSync4YouHandler.php');
 }