| | 841 | else if(!strcmp(gcFunction,"Confirm Modify")) |
| | 842 | { |
| | 843 | if(strcmp(TextAreaSave(cClientName), |
| | 844 | ForeignKey("tClient","cLabel",guContact))) |
| | 845 | { |
| | 846 | sprintf(gcQuery,"SELECT uClient FROM tClient WHERE cLabel='%s' AND uOwner=%u", |
| | 847 | TextAreaSave(cClientName) |
| | 848 | ,uForClient |
| | 849 | ); |
| | 850 | macro_mySQLRunAndStore(res); |
| | 851 | if(mysql_num_rows(res)) |
| | 852 | { |
| | 853 | SetCustomerContactFieldsOn(); |
| | 854 | cClientNameStyle="type_fields_req"; |
| | 855 | gcMessage="<blink>Error: </blink>'Contact Name' already exists for selected company," |
| | 856 | " perhaps you wanted to create it for another company."; |
| | 857 | return(0); |
| | 858 | } |
| | 859 | } |
| | 860 | } |