Changeset 713 for trunk/phpbms/modules
- Timestamp:
- 01/05/10 11:43:59 (2 years ago)
- Location:
- trunk/phpbms/modules/bms
- Files:
-
- 2 modified
-
clients_import.php (modified) (1 diff)
-
include/clients.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/phpbms/modules/bms/clients_import.php
r702 r713 128 128 // the forms list. 129 129 130 $list = array("phpBMS csv file" => 0, "Sugar CRM (v5. 0)" => 1);130 $list = array("phpBMS csv file" => 0, "Sugar CRM (v5.5.0)" => 1); 131 131 $default = 0; 132 132 if(isset($_POST["importType"])) -
trunk/phpbms/modules/bms/include/clients.php
r710 r713 1189 1189 case "employees": 1190 1190 case "ticker_symbol": 1191 case "id": 1191 1192 if($data) 1192 1193 $addComments .= "\n".str_replace("_"," ",$name).": ".trim($data); … … 1276 1277 $this->revertID = $theid; 1277 1278 1279 $theuuid = getUuid($this->table->db, "tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083", (int) $theid); 1280 1278 1281 //If it is a sugarcrm import, insert the shipping address as well 1279 1282 $addressVerify = array(); … … 1299 1302 `addresstorecord`.`defaultshipto` = '0' 1300 1303 WHERE 1301 `addresstorecord`.`recordid` = '". ((int) $theid)."'1304 `addresstorecord`.`recordid` = '".mysql_real_escape_string($theuuid)."' 1302 1305 AND 1303 `addresstorecord`.`tabledefid` = ' 2';1306 `addresstorecord`.`tabledefid` = 'tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083'; 1304 1307 "; 1305 1308 … … 1307 1310 1308 1311 $variables["title"] = "Main Shipping Address"; 1309 $variables["tabledefid"] = 2;1310 $variables["recordid"] = $the id;1312 $variables["tabledefid"] = "tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083"; 1313 $variables["recordid"] = $theuuid; 1311 1314 $variables["defaultshipto"] = 1; 1312 1315 $variables["primary"] = 0; 1313 1316 $variables["existingaddressid"] = false; 1317 $variables["uuid"] = uuid($this->table->address->prefix); 1314 1318 1315 1319 $addressVerify = $this->table->address->verifyVariables($variables);//verify address … … 1391 1395 `addresses2`.`custom8` AS `shipcustom8` 1392 1396 FROM 1393 ((((clients INNER JOIN addresstorecord AS `addresstorecord1` ON clients. id = addresstorecord1.recordid AND addresstorecord1.tabledefid=2 AND addresstorecord1.primary=1) INNER JOIN addresses AS addresses1 ON addresstorecord1.addressid = addresses1.id)LEFT JOIN addresstorecord AS `addresstorecord2` on clients.id = addresstorecord2.recordid AND addresstorecord2.tabledefid=2 AND addresstorecord2.primary=0 AND addresstorecord2.defaultshipto=1) LEFT JOIN addresses AS addresses2 ON addresstorecord2.addressid = addresses2.id)1397 ((((clients INNER JOIN addresstorecord AS `addresstorecord1` ON clients.uuid = addresstorecord1.recordid AND addresstorecord1.tabledefid='tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083' AND addresstorecord1.primary=1) INNER JOIN addresses AS addresses1 ON addresstorecord1.addressid = addresses1.uuid)LEFT JOIN addresstorecord AS `addresstorecord2` on clients.uuid = addresstorecord2.recordid AND addresstorecord2.tabledefid='tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083' AND addresstorecord2.primary=0 AND addresstorecord2.defaultshipto=1) LEFT JOIN addresses AS addresses2 ON addresstorecord2.addressid = addresses2.uuid) 1394 1398 WHERE 1395 1399 `clients`.`id` IN (".$inStatement.") … … 1437 1441 1438 1442 //list of values that should not be displayed 1439 $removalArray = array("id", "modifiedby", "modifieddate", "createdby", "creationdate", "notes", "title", "shiptoname" );1443 $removalArray = array("id", "modifiedby", "modifieddate", "createdby", "creationdate", "notes", "title", "shiptoname", "uuid"); 1440 1444 //gets the address table's columnnames/information (fields) 1441 1445 $addressArray = $this->table->address->fields;