protected static function SynchronizeOwner($ownerType, $ownerID, $checkPerms = true, $totalInfo = array()) { $ownerType = strtoupper(strval($ownerType)); $ownerID = intval($ownerID); if (!is_array($totalInfo)) { $totalInfo = array(); } if ($ownerType === 'D') { CCrmDeal::SynchronizeProductRows($ownerID, $checkPerms); } elseif ($ownerType === CCrmQuote::OWNER_TYPE) { CCrmQuote::SynchronizeProductRows($ownerID, $checkPerms, $totalInfo); } elseif ($ownerType === 'L') { CCrmLead::SynchronizeProductRows($ownerID); } }