Exemplo n.º 1
0
        }
    }
}
/* --------------------------------------------------------------------------- */
/* We ask to generate the document */
/* --------------------------------------------------------------------------- */
if (isset($_POST['generate'])) {
    $act = new Follow_Up($cn);
    $act->fromArray($_POST);
    if ($act->ag_id == 0) {
        $act->save();
        $ag_id = $act->ag_id;
    } else {
        $act->Update();
    }
    $act->generate_document($_POST['doc_mod'], $_POST);
    $sub_action = 'detail';
}
/* for delete  */
if (isset($_POST['delete']) && $_POST['delete'] == "1") {
    $sub_action = 'delete';
}
if ($sub_action == "") {
    $sub_action = "list";
}
// if correction is asked go to directly to add_action
if (isset($_POST['corr'])) {
    $ag_comment = urldecode($_POST['ag_comment']);
    $sub_action = "add_action";
}
// if this page is called from another menu (customer, supplier,...)