| | 799 | else if(!strcmp(gcFunction,"Confirm Modify")) |
| | 800 | { |
| | 801 | if(strcmp(TextAreaSave(cClientName), |
| | 802 | ForeignKey("tClient","cLabel",guContact))) |
| | 803 | { |
| | 804 | sprintf(gcQuery,"SELECT uClient FROM tClient WHERE cLabel='%s' AND uOwner=%u", |
| | 805 | TextAreaSave(cClientName) |
| | 806 | ,uForClient |
| | 807 | ); |
| | 808 | macro_mySQLRunAndStore(res); |
| | 809 | if(mysql_num_rows(res)) |
| | 810 | { |
| | 811 | SetCustomerContactFieldsOn(); |
| | 812 | cClientNameStyle="type_fields_req"; |
| | 813 | gcMessage="<blink>Error: </blink>'Contact Name' already exists for selected company," |
| | 814 | " perhaps you wanted to create it for another company."; |
| | 815 | return(0); |
| | 816 | } |
| | 817 | } |
| | 818 | } |