Skip to content
Snippets Groups Projects
Commit 2cb96db4 authored by Prasad's avatar Prasad
Browse files

Updated comment

parent a70b77f7
No related branches found
No related tags found
No related merge requests found
......@@ -11,21 +11,21 @@ if (defined('VTIGER_UPGRADE')) {
// Ensure related-tab for ModComments on Inventory modules (if missed in previous migration)
$modCommentsInstance = Vtiger_Module_Model::getInstance('ModComments');
$modCommentFieldInstance = Vtiger_Field_Model::getInstance('related_to', $modCommentsInstance);
foreach(getInventoryModules() as $refModuleName) {
$refModuleModel = Vtiger_Module_Model::getInstance($refModuleName);
$rs = $db->pquery("SELECT 1 FROM vtiger_relatedlists WHERE tabid=? and related_tabid=? and relationfieldid=? limit 1", array(
$refModuleModel->id, $modCommentsInstance->id, $modCommentFieldInstance->id
));
if (!$db->num_rows($rs)) {
$refModuleModel->setRelatedList($modCommentsInstance, "ModComments", '', 'get_comments', $modCommentFieldInstance->id);
}
}
$modCommentFieldInstance = Vtiger_Field_Model::getInstance('related_to', $modCommentsInstance);
foreach(getInventoryModules() as $refModuleName) {
$refModuleModel = Vtiger_Module_Model::getInstance($refModuleName);
$rs = $db->pquery("SELECT 1 FROM vtiger_relatedlists WHERE tabid=? and related_tabid=? and relationfieldid=? limit 1", array(
$refModuleModel->id, $modCommentsInstance->id, $modCommentFieldInstance->id
));
if (!$db->num_rows($rs)) {
$refModuleModel->setRelatedList($modCommentsInstance, "ModComments", '', 'get_comments', $modCommentFieldInstance->id);
}
}
// Resize column width to text (instead of varchar)
$db->pquery("ALTER TABLE vtiger_shorturls MODIFY COLUMN handler_data text");
// Resize column width to text (instead of varchar)
$db->pquery("ALTER TABLE vtiger_shorturls MODIFY COLUMN handler_data text");
// Disabling the mass edit for the inventory line item fields.
$db->pquery("UPDATE vtiger_field set masseditable = 0 where columnname in ('discount_percent','discount_amount')
and tablename in ('vtiger_quotes','vtiger_purchaseorder','vtiger_salesorder','vtiger_invoice')", array());
// Disabling the mass edit for the inventory line item discount fields.
$db->pquery("UPDATE vtiger_field set masseditable = 0 where columnname in ('discount_percent','discount_amount')
and tablename in ('vtiger_quotes','vtiger_purchaseorder','vtiger_salesorder','vtiger_invoice')", array());
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment