1 Customer 2->Vehicle 3->Service 4->Sale 5->Customer & Vehicle
$GLOBALS['selected_dms_type_name'] = $selected_dms_type;
switch ($selected_dms_type_id) {
case 1:
aha_insert_customer($selected_dms_id,$selected_dms_name,$selected_dms_type_id,$selected_dms_type,$row_data,$db);
// $GLOBALS['data_count_list'] = "
Accepted ".$selected_dms_type." | ".$GLOBALS['customer_inserted_count']." |
";
// $GLOBALS['data_count_list'] = $GLOBALS['data_count_list']."Not Inserted ".$selected_dms_type." | ".$GLOBALS['customer_not_inserted_coun']." |
";
break;
case 2:
aha_insert_vehicles($selected_dms_id,$selected_dms_name,$selected_dms_type_id,$selected_dms_type,$row_data,$db);
// $GLOBALS['data_count_list'] = "Accepted ".$selected_dms_type." | ".$GLOBALS['vehicle_inserted_count']." |
";
// $GLOBALS['data_count_list'] = $GLOBALS['data_count_list']."Not Inserted ".$selected_dms_type." | ".$GLOBALS['vehicle_not_inserted_count']." |
";
break;
case 3:
aha_insert_service($selected_dms_id,$selected_dms_name,$selected_dms_type_id,$selected_dms_type,$row_data,$db);
// $GLOBALS['data_count_list'] = "Accepted ".$selected_dms_type." | ".$GLOBALS['service_inserted_count']." |
";
// $GLOBALS['data_count_list'] = $GLOBALS['data_count_list']."Not Inserted ".$selected_dms_type." | ".$GLOBALS['service_not_inserted_count']." |
";
break;
case 4:
aha_insert_sale($selected_dms_id,$selected_dms_name,$selected_dms_type_id,$selected_dms_type,$row_data,$db);
// $GLOBALS['data_count_list'] = "Accepted ".$selected_dms_type." | ".$GLOBALS['sale_inserted_count']." |
";
// $GLOBALS['data_count_list'] = $GLOBALS['data_count_list']."Not Inserted ".$selected_dms_type." | ".$GLOBALS['sale_not_inserted_count']." |
";
break;
}
}
////// START aha POWER INSERTTION /////////
function aha_insert_customer($selected_dms_id,$selected_dms_name,$selected_dms_type_id,$selected_dms_type,$row_data,$db){
//aha Power
//personal information
$row_customer_id = checkExist($row_data,$GLOBALS['database_type_fields']['customer_id']);
$row_salutation = checkExist($row_data,$GLOBALS['database_type_fields']['salutation']);
$row_first_name = checkExist($row_data,$GLOBALS['database_type_fields']['first_name']);
$row_middle_name = checkExist($row_data,$GLOBALS['database_type_fields']['middle_name']);
$row_last_name = checkExist($row_data,$GLOBALS['database_type_fields']['last_name']);
$row_suffix = checkExist($row_data,$GLOBALS['database_type_fields']['suffix']);
$row_customer_name = checkExist($row_data,$GLOBALS['database_type_fields']['customer_name']); //corporation
$row_gender = checkExist($row_data,$GLOBALS['database_type_fields']['gender']);
$row_birthday = checkExist($row_data,$GLOBALS['database_type_fields']['birthday']);
$row_nationality = checkExist($row_data,$GLOBALS['database_type_fields']['nationality']);
$row_marital_status = checkExist($row_data,$GLOBALS['database_type_fields']['marital_status']);
$row_no_of_children = checkExist($row_data,$GLOBALS['database_type_fields']['no_of_children']);
$row_hobby = checkExist($row_data,$GLOBALS['database_type_fields']['hobby']);
$row_spouse = checkExist($row_data,$GLOBALS['database_type_fields']['spouse']);
$row_occupation = checkExist($row_data,$GLOBALS['database_type_fields']['occupation']);
//contact information
$row_email_1 = checkExist($row_data,$GLOBALS['database_type_fields']['email_1']);
$row_email_2 = checkExist($row_data,$GLOBALS['database_type_fields']['email_2']);
$row_mobile_1 = checkExist($row_data,$GLOBALS['database_type_fields']['mobile_1']);
$row_mobile_2 = checkExist($row_data,$GLOBALS['database_type_fields']['mobile_2']);
$row_business_phone = checkExist($row_data,$GLOBALS['database_type_fields']['business_phone']);
$row_fax_phone = checkExist($row_data,$GLOBALS['database_type_fields']['fax_phone']);
$row_residential_phone = checkExist($row_data,$GLOBALS['database_type_fields']['residential_phone']);
$row_address_1 = checkExist($row_data,$GLOBALS['database_type_fields']['address_1']);
$row_city_1 = checkExist($row_data,$GLOBALS['database_type_fields']['city_1']);
$row_state_1 = checkExist($row_data,$GLOBALS['database_type_fields']['state_1']);
$row_postal_1 = checkExist($row_data,$GLOBALS['database_type_fields']['postal_1']);
$row_address_2 = checkExist($row_data,$GLOBALS['database_type_fields']['address_2']);
$row_city_2 = checkExist($row_data,$GLOBALS['database_type_fields']['city_2']);
$row_state_2 = checkExist($row_data,$GLOBALS['database_type_fields']['state_2']);
$row_postal_2 = checkExist($row_data,$GLOBALS['database_type_fields']['postal_2']);
//other information
$row_source_inquiry = checkExist($row_data,$GLOBALS['database_type_fields']['source_inquiry']);
$row_business_name = checkExist($row_data,$GLOBALS['database_type_fields']['business_name']);
$row_contact_person = checkExist($row_data,$GLOBALS['database_type_fields']['contact_person']);
$row_date_created = checkExist($row_data,$GLOBALS['database_type_fields']['date_created']);
$row_time_created = checkExist($row_data,$GLOBALS['database_type_fields']['time_created']);
$row_company = checkExist($row_data,$GLOBALS['database_type_fields']['company']);
$row_dealer = checkExist($row_data,$GLOBALS['database_type_fields']['dealer']);
$row_affiliation = checkExist($row_data,$GLOBALS['database_type_fields']['affiliation']);
$row_religion = checkExist($row_data,$GLOBALS['database_type_fields']['religion']);
$row_viber = checkExist($row_data,$GLOBALS['database_type_fields']['viber']);
$row_telegram = checkExist($row_data,$GLOBALS['database_type_fields']['telegram']);
$row_facebook = checkExist($row_data,$GLOBALS['database_type_fields']['facebook']);
$row_instagram = checkExist($row_data,$GLOBALS['database_type_fields']['instagram']);
$row_whatsapp = checkExist($row_data,$GLOBALS['database_type_fields']['whatsapp']);
$row_website = checkExist($row_data,$GLOBALS['database_type_fields']['website']);
$row_nature_of_work = checkExist($row_data,$GLOBALS['database_type_fields']['nature_of_work']);
$row_profession = checkExist($row_data,$GLOBALS['database_type_fields']['profession']);
//personal information
$data_customer_id = /*($row_customer_id);*/ md5((validateNumber(removeNonNumeric(($row_customer_id)))));
$data_salutation = (($row_salutation));
$data_first_name = (($row_first_name));
$data_middle_name = (($row_middle_name));
$data_last_name = (($row_last_name));
$data_suffix = (($row_suffix));
$data_customer_name =(($row_customer_name)); //corporation
$data_gender = (strtolower(($row_gender)));
$data_birthday = (fix_date(($row_birthday),false));
$data_nationality = (($row_nationality));
$data_marital_status = (strtolower(($row_marital_status)));
$data_no_of_children = (($row_no_of_children));
$data_hobby = (($row_hobby));
$data_spouse = (($row_spouse));
$data_occupation = (($row_occupation));
//contact information
$data_email_1 = ((($row_email_1)));
$data_email_2 = ((($row_email_2)));
$data_mobile_1 = (validateNumber(removeNonNumeric(($row_mobile_1))));
$data_mobile_2 = (removeNonNumeric(($row_mobile_2)));
$data_business_phone = (removeNonNumeric(($row_business_phone)));
$data_fax_phone = (removeNonNumeric(($row_fax_phone)));
$data_residential_phone = (removeNonNumeric(($row_residential_phone)));
$data_address_1 = (($row_address_1));
$data_city_1 = (($row_city_1));
$data_state_1 = (($row_state_1));
$data_postal_1 = (($row_postal_1));
$data_address_2 = (($row_address_2));
$data_city_2 = (($row_city_2));
$data_state_2 = (($row_state_2));
$data_postal_2 = (($row_postal_2));
//other information
$data_source_inquiry = (isset($GLOBALS['source_map'][(($row_source_inquiry))])) ? $GLOBALS['source_map'][(($row_source_inquiry))] : (($row_source_inquiry));
// $data_source_inquiry = (isset($GLOBALS['source_map'][(($row_source_inquiry))])) ? $GLOBALS['source_map'][(($row_source_inquiry))] : ($row_source_inquiry);
//$data_sales_person = (($row_sales_person));
$data_business_name = (($row_business_name));
$data_contact_person = (($row_contact_person ));
$data_date_created = (fix_date(($row_date_created),false));
$data_time_created = (($row_time_created));
// $data_dealer = (($row_dealer));
$data_company = (isset($GLOBALS['company_map'][(($row_company))])) ? $GLOBALS['company_map'][(($row_company))] : (($row_company));
$data_dealer = (isset($GLOBALS['dealer_map'][(($row_dealer))])) ? $GLOBALS['dealer_map'][(($row_dealer))] : (($row_dealer));
$data_affiliation = $row_affiliation;
$data_religion = $row_religion;
$data_viber = $row_viber;
$data_telegram = $row_telegram;
$data_facebook = $row_facebook;
$data_instagram = $row_instagram;
$data_whatsapp = $row_whatsapp;
$data_website = $row_website;
$data_nature_of_work = $row_nature_of_work;
$data_profession = $row_profession;
if(intval($GLOBALS['company']) === 0){
if(!isNotEmpty($data_company)){
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['no_company']) )) ;
$GLOBALS['not_inserted_list_v2'][] = array_merge(array($GLOBALS['no_company']),$row_data);
$GLOBALS['no_company_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
$GLOBALS['company'] = getCompanyNameCode($data_company,$db);
if(intval($GLOBALS['company']) === 0){
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['no_company']) )) ;
$GLOBALS['not_inserted_list_v2'][] = array_merge(array($GLOBALS['no_company']),$row_data);
$GLOBALS['no_company_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
}
if(intval($GLOBALS['dealer']) === 0){
if(!isNotEmpty($data_dealer)){
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['no_dealer']) )) ;
$GLOBALS['no_dealer_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
$get_company_dealer_id = getDealerNameID($data_dealer,$db);
if($get_company_dealer_id <> 0){
$GLOBALS['company_dealer_id'] = $get_company_dealer_id;
}else{
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['no_dealer']) )) ;
$GLOBALS['no_dealer_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
}
//check if customer_id not empty
if(!isNotEmpty($data_customer_id)){
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['customer_empty_id']) )) ;
$GLOBALS['customer_empty_id_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
$data_customer_id = $data_customer_id.'_'.$selected_dms_id.$GLOBALS['company_dealer_id'];
//check if email not empty
// if(!isNotEmpty($data_email_1) || strpos($data_email_1, 'NOEMAIL') !== false){
// //$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['no_email_address']) )) ;
// $GLOBALS['no_email_address_count']++;
// $GLOBALS['customer_not_inserted_count']++;
// return 0;
// }
if(!validateEmail($data_email_2) || strpos($data_email_2, 'NOEMAIL') !== false){
$data_email_2 = "";
}
//check email format
if(!validateEmail($data_email_1) || strpos($data_email_1, 'NOEMAIL') !== false){
$data_email_1 = "";
// $GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['invalid_email_address']) )) ;
// $GLOBALS['invalid_email_address_count']++;
// $GLOBALS['customer_not_inserted_count']++;
// return 0;
}
//check if first name and last name and company name is not empty
if(!isNotEmpty($data_customer_name) ){
if(!isNotEmpty($data_first_name) || !isNotEmpty($data_last_name)){
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['customer_name_empty']) )) ;
$GLOBALS['customer_name_empty_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
}
if(!isNotEmpty($data_first_name) || !isNotEmpty($data_last_name)){
if(!isNotEmpty($data_customer_name) ){
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['customer_name_empty']) )) ;
$GLOBALS['customer_name_empty_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
}
// if(recordCount(" COUNT(id) ","customer_dms","customer_dms_id", $data_customer_id,false,$db) > 0){
// //$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['customer_already_exists']))) ;
// $GLOBALS['customer_not_inserted_coun']++;
// return 0;
// }
if(!isNotEmpty($data_mobile_1)){
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['no_mobile_number']) )) ;
$GLOBALS['no_mobile_number_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
if(isNotEmpty($data_first_name) && isNotEmpty($data_last_name)){
if(strlen($data_mobile_1) != 13){
$GLOBALS['not_inserted_list_v2'][] = array_merge(array($GLOBALS['invalid_mobile']),$row_data);
$GLOBALS['invalid_mobile_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
}
//check if data is already exists before insert
if(checkMasterData($data_customer_name,$data_first_name,$data_last_name,$data_email_1,$db) > 0){
$customer_master_record_data = getMasterRecord($data_customer_name,$data_first_name,$data_last_name,$data_email_1,$db);
if(
$customer_master_record_data['company_dealer_id'] == $GLOBALS['company_dealer_id']
|| ($customer_master_record_data['customer_dms_id'] == $data_customer_id)
){
//$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>$data_mobile_1/*''*/,'problem'=>$GLOBALS['customer_already_exists']))) ;
$GLOBALS['customer_duplicate_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}else{
// echo $customer_master_record_data['customer_dms_id'] .' -- '. $data_customer_id.'
';
//insert to master record
insertMasterRecord($selected_dms_id, $customer_master_record_data['customer_record_id'],$data_customer_id,$db);
$GLOBALS['customer_sharing_count']++;
$GLOBALS['customer_inserted_count']++;
return 1;
}
}
if(isNotEmpty($data_email_1)){
$remove_str = ["+", "/", "*"];
$replace_remove_str = ["", "", ""];
$email_address = str_replace($remove_str, $replace_remove_str ,$data_email_1);
$email_address = addslashes($email_address);
$new_arr_email = preg_grep( "/\b$email_address\b/", $GLOBALS['customer_contact']);
if(count($new_arr_email) > 0){
$GLOBALS['not_inserted_list_v2'][] = array_merge(array($GLOBALS['email_already_exists']),$row_data);
$GLOBALS['email_already_exists_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
//check if email already registered
if(recordCount('count(id)','customer_contact','email_1',$data_email_1,true,$db) > 0){
$GLOBALS['not_inserted_list_v2'][] = array_merge(array($GLOBALS['email_already_exists']),$row_data);
$GLOBALS['email_already_exists_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
}
if(recordCount('count(id)','customer_contact','mobile_phone_1',$data_mobile_1,true,$db) > 0){
$GLOBALS['not_inserted_list_v2'][] = array_merge(array($GLOBALS['mobile_already_exists']),$row_data);
$GLOBALS['mobile_already_exists_count']++;
$GLOBALS['customer_not_inserted_count']++;
return 0;
}
// if(isNotEmpty($data_mobile_1)){
// if((isNotEmpty($data_first_name) && isNotEmpty($data_last_name))){
// if(countCustomerMobileIndividual($data_mobile_1,$data_last_name,$db) > 0){
// // if(
// // ($check_data_mobile_1 == $data_mobile_1) &&
// // ($check_data_last_name <> $data_last_name)
// // ){
// //$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['mobile_already_exists']) )) ;
// $GLOBALS['mobile_already_exists_count']++;
// $GLOBALS['customer_not_inserted_count']++;
// return 0;
// }
// }else{
// //compare current to fetch number
// if(countCustomerMobileCorporation($data_mobile_1,$db) > 0){
// // if($data_mobile_1 == $check_data_mobile_1){
// //$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['mobile_already_exists']) )) ;
// $GLOBALS['mobile_already_exists_count']++;
// $GLOBALS['customer_not_inserted_count']++;
// return 0;
// }
// }
// }else{
// //$GLOBALS['not_inserted_list'] = array_merge($GLOBALS['not_inserted_list'] ,array( array('id'=>'Row no.: '. $GLOBALS['current_data_row'],'type'=>'','problem'=>$GLOBALS['no_mobile_number']) )) ;
// $GLOBALS['no_mobile_number_count']++;
// $GLOBALS['customer_not_inserted_count']++;
// return 0;
// }
//no data
$data_suffix_id = "0";
$data_mode_of_contact_id = "0";
$interest_category_id = "1";
$interest_list_id = getInterestID($interest_category_id,$data_hobby,$db);
$affiliation_category_id = "1";
$affiliations_list_id = getAffiliationID($affiliation_category_id,$data_affiliation,$db);
//data need to get id
$data_nature_of_work_id = getNatureOfWorkID($data_nature_of_work,$db);
$data_profession_id = getProfessionID($data_profession,$db);
$data_religion_id = getReligionID($data_religion,$db);
$data_gender_id = getGenderID($data_gender);
$data_nationality_id = getNationality($data_nationality,$db);
$data_marital_status_id = getMaritalID($data_marital_status);
$data_source_of_contact_id = getLeadSourceID($data_source_inquiry,$db);
//modify date fields
$data_dob = (fix_date($data_birthday,true));
//format addresses
//address_1
$address_details = getCityAndState($data_address_1,$data_city_1,$data_state_1,$db);
$address_1 = ($address_details[0]);
$address_1_city = ($address_details[1]);
$address_1_state = ($address_details[2]);
$address_1_postal = ($data_postal_1);
//address_2
$address_2 = ($data_address_2);
$address_2_city = "0";
$address_2_state = "0";
$address_2_postal = "";
//business address
$business_address = "";
$business_state_id = "0";
$business_city_id = "0";
$business_postal = "0";
// if(contains($data_customer_id,$data_customer_name,$data_first_name, $data_last_name, $data_email_1,$data_mobile_1, $GLOBALS['customer_data_individual'], $GLOBALS['customer_contact'])){
// return 0;
// }
// if(contains($data_customer_id,$data_customer_name,$data_first_name, $data_last_name, $data_email_1,$data_mobile_1, $GLOBALS['customer_data_individual'], $GLOBALS['customer_contact'])){
// return 0;
// }
insertCustomerAllData($data_customer_id,
$data_customer_name,
$data_salutation,
$data_first_name,
$data_middle_name,
$data_last_name,
$data_suffix_id,
$data_gender_id,
$data_nationality_id,
$data_dob,
$data_marital_status_id,
$data_source_of_contact_id,
$data_mode_of_contact_id,
$data_spouse,
$data_no_of_children,
$data_occupation,
$data_contact_person,
//$data_sales_person,
$data_date_created,
$data_time_created,
$selected_dms_id,
$address_1,
$address_2,
$address_1_state,
$address_2_state,
$address_1_city,
$address_2_city,
$address_1_postal,
$address_2_postal,
$data_email_1,
$data_email_2,
$data_business_phone,
$data_fax_phone,
$data_mobile_1,
$data_mobile_2,
$data_residential_phone,
$data_business_name,
$business_address,
$business_state_id,
$business_city_id ,
$business_postal,
// $interest_id,
// $data_hobby,
$interest_list_id,
$affiliations_list_id,
$data_religion_id,
$data_viber,
$data_telegram,
$data_facebook,
$data_instagram,
$data_whatsapp,
$data_website,
$data_nature_of_work_id,
$data_profession_id,
$db);
// insertCustomerAllData($data_customer_id,
// $data_customer_name,
// $data_salutation,
// $data_first_name,
// $data_middle_name,
// $data_last_name,
// $data_suffix_id,
// $data_gender_id,
// $data_nationality_id,
// $data_dob,
// $data_marital_status_id,
// $data_source_of_contact_id,
// $data_mode_of_contact_id,
// $data_spouse,
// $data_no_of_children,
// $data_occupation,
// $data_contact_person,
// //$data_sales_person,
// $data_date_created,
// $data_time_created,
// $selected_dms_id,
// $address_1,
// $address_2,
// $address_1_state,
// $address_2_state,
// $address_1_city,
// $address_2_city,
// $address_1_postal,
// $address_2_postal,
// $data_email_1,
// $data_email_2,
// $data_business_phone,
// $data_fax_phone,
// $data_mobile_1,
// $data_mobile_2,
// $data_residential_phone,
// $data_business_name,
// $business_address,
// $business_state_id,
// $business_city_id ,
// $business_postal,
// $interest_id,
// $data_hobby,
// $db);
}
function aha_insert_vehicles($selected_dms_id,$selected_dms_name,$selected_dms_type_id,$selected_dms_type,$row_data,$db){
echo "Vehicle";
}
function aha_insert_service($selected_dms_id,$selected_dms_name,$selected_dms_type_id,$selected_dms_type,$row_data,$db){
echo "Service";
}
function aha_insert_sale($selected_dms_id,$selected_dms_name,$selected_dms_type_id,$selected_dms_type,$row_data,$db){
echo "Sales";
}
?>