[Vtigercrm-commits] [vtiger-commits] r10994 - /vtigercrm/branches/5.0.3/modules/Import/ImportSave.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed May 23 16:12:53 EDT 2007


Author: richie
Date: Wed May 23 14:12:48 2007
New Revision: 10994

Log:
* Fixed the issue in import ie., if we left the product active as unmapped then product will not be saved because if we unmap this field then NULL will be tried to insert in discontinued field in vtiger_products But discontinued is NOT NULL so that query will fail and no products will be imported, Fixed #3846

Modified:
    vtigercrm/branches/5.0.3/modules/Import/ImportSave.php

Modified: vtigercrm/branches/5.0.3/modules/Import/ImportSave.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Import/ImportSave.php (original)
+++ vtigercrm/branches/5.0.3/modules/Import/ImportSave.php Wed May 23 14:12:48 2007
@@ -57,6 +57,10 @@
 	//MWC
 	$my_userid = $current_user->id;
 
+	//If we want to set default values for some fields for each entity then we have to set here
+	if($module == 'Products')//discontinued is not null. if we unmap active, NULL will be inserted and query will fail
+		$focus->column_fields['discontinued'] = 'on';
+
 	for($field_count = 0; $field_count < $ret_field_count; $field_count++)
 	{
 		p("col_pos[".$field_count."]=".$col_pos_to_field[$field_count]);





More information about the vtigercrm-commits mailing list