add_societe_via_affaire - PHP Documentation

🔧 fwa_TOOSMART_TOSEVENT_action_add_societe_via_affaire

Fonction pour l'ajout d'un commentaire sur passage au statut perdu de l'affaire
function fwa_TOOSMART_TOSEVENT_action_add_societe_via_affaire(){
    global $navi_id_obje;

    //Création du client avec data vide
    $newClient = fwc7_modify_att_create('','1','2');

    $data = array();
    $data['att8']=fwk7_var_getpost('selectType§defType'); // type
    $data['att9']=fwk7_var_getpost('denomSociete§defDenomSociete'); // Société
    $data['att23']=fwk7_var_getpost('selectSegment§defSegment'); //segment
    $data['att10']=fwk7_var_getpost('selectCivilite§defCivilite'); //civilité
    $data['att1']=fwk7_var_getpost('nom§defNom'); //Nom
    $data['att3']=fwk7_var_getpost('prenom§defPrenom'); //Prénom
    $data['att12']=fwk7_var_getpost('email§defEmail'); //Email
    $isTel = fwk7_var_getpost('tel§defTel');
    preg_match('/^(06|07)\d{8}$/',$isTel)? $data['att6']=$isTel: $data['att5']=$isTel; //Téléphone
    $data['att22']=fwc7_cpt_gen_increment('','1'); //Compteur

    //Modification du client avec les données du formulaire
    fwc7_modify_att_edit('','1',$newClient,$data);

    //Création du contact associé
    fwl_TOOSMART_TOSEVENT_populationPremierContact('',$newClient);
    $wcContact=array();
    $wcContact[]="att8 ='" .$newClient . "' ";
    // ... (truncated)

↩️ Returns

(void)