Commit 16220f38 authored by Estéban Ristich's avatar Estéban Ristich
Browse files

Fix Issue #62 Update get recipe

parent 7ac6d2c3
......@@ -14,17 +14,36 @@ $logged_level = $_SESSION['logged_level'];
unset($erreur);
$description = param_post('description');
$equipment_id = param_post('equipment');
$supplier_id = param_post('company');
$notice = param_post('notice');
$date = param_post('date');
$description = param_post('description');
$equipment_id = param_post('equipment');
$supplier_id = param_post('company');
$recipe = param_post('recipe');
$date = param_post('date');
$intervention_id = param_post('id');
$pdo = connect_db_or_alert();
$new = True;
if (isset($id) && !empty($id))
$new = false;
var_dump($description);
var_dump($equipment_id);
var_dump($supplier_id);
var_dump($date);
$res = set_new_intervention($pdo, $description, $supplier_id, $equipment_id, $date);
if ($recipe != '') {
$id_recipe = set_recipe_new($pdo, $equipment_id, 'recipe');
if (!$id_recipe) {
$title = 'Erreur appareil';
$action = 'equipment-view.php?id='.$equipment_id;
$message_text = ($logged_level > 3 ? $err_msg : 'Erreur dans l\'ajout d\'une fiche d\'intervention à appareil (pas au format PDF ?)');
include_once('include/message-box.php');
exit();
}
}
if ($new) {
$res = set_new_intervention($pdo, $description, $supplier_id, $equipment_id, $date);
}
?>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment