[Vtigercrm-developers] Problem in save quotes

Webmaster (Abos) webmaster at vtigercrmfrance.org
Wed Feb 15 11:11:18 PST 2006


Problem on quotes, vtiger 4.2.2.

When save a quote without opportunities, no quote saved.
This problem seem to be appear with recent mysql versions (>4.0.24)

/modules/Quotes/Save.php

near line 50


foreach($focus->column_fields as $fieldname => $val)
{
if(isset($_REQUEST[$fieldname]))
{
$value = $_REQUEST[$fieldname];
//echo '<BR>';
//echo $fieldname." ".$value;
//echo '<BR>';
$focus->column_fields[$fieldname] = $value;
}
}

Replace with

foreach($focus->column_fields as $fieldname => $val)
{
if(isset($_REQUEST[$fieldname]))
{
$value = $_REQUEST[$fieldname];

// New Lines HERE
if(empty($value))
{
$value = 'null';
}

//echo '<BR>';
//echo $fieldname." ".$value;
//echo '<BR>';
$focus->column_fields[$fieldname] = $value;
}
}


And same thing for other modules

include/utils.php


Near line 3127

  elseif($module == 'Quotes' && $name == 'Potential Name')
{
$potential_id = $adb->query_result($list_result,$i-1,"potentialid");
$potential_name = getPotentialName($potential_id);
$value = '<a
ref="index.php?module=Potentials&action=DetailView&record='.$potential_id.'">'.$potential_name.'</a>';

}


Replace with

elseif($module == 'Quotes' && $name == 'Potential Name')
{
$potential_id = $adb->query_result($list_result,$i-1,"potentialid");
if(!empty($potential_id))
{
$potential_name = getPotentialName($potential_id);
$value = '<a
href="index.php?module=Potentials&action=DetailView&record='.$potential_id.'">'.$potential_name.'</a>';

}
else
{
$value = '';
}
}

Thanks to thierry2006 french users ;-)




 



More information about the vtigercrm-developers mailing list