From: vincent@cubedesigners.com Date: Mon, 6 Aug 2012 17:33:21 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b7981c4fcfc8e909eff2d0911a2350a89a880a9b;p=cubeextranet.git --- diff --git a/inc/extranet/Controlleur/class.extranet.ajax.php b/inc/extranet/Controlleur/class.extranet.ajax.php index 8d90b23f2..fef184b0a 100644 --- a/inc/extranet/Controlleur/class.extranet.ajax.php +++ b/inc/extranet/Controlleur/class.extranet.ajax.php @@ -427,9 +427,9 @@ class extranetAjax { public static function valideFacture($args, &$x) { global $core; $dao = new extranetDAOFacture($core->con); - $dao->valide($args[1]); + $id=$dao->valide($args[1]); - $x->addTruePopup('/voirfacture/' . $args[1]); + $x->addTruePopup('/voirfacture/' . $id); $x->addRedirection(SITE_PATH . 'factures'); } diff --git a/inc/extranet/DAO/class.extranet.dao.facture.php b/inc/extranet/DAO/class.extranet.dao.facture.php index 77c4d8cf7..181d5da48 100644 --- a/inc/extranet/DAO/class.extranet.dao.facture.php +++ b/inc/extranet/DAO/class.extranet.dao.facture.php @@ -317,7 +317,7 @@ class extranetDAOFacture extends commonDAO { $new_id = $facture_id; } - return $this->changeStatus($new_id, 1); + return $new_id; } public function idBrouillonToIdNormal($facture_id) { diff --git a/inc/ws/Controlleur/class.ws.ajax.php b/inc/ws/Controlleur/class.ws.ajax.php index 12213be86..5fcb0b128 100644 --- a/inc/ws/Controlleur/class.ws.ajax.php +++ b/inc/ws/Controlleur/class.ws.ajax.php @@ -332,7 +332,7 @@ class wsAjax extends cubeAjax { $data = array(); $data['nom'] = $_POST['new_book_project_nom']; $data['chef'] = $core->user->utilisateur_id; - $data['client'] = $book->proprietaire_id; + $data['client'] = $book->facturable_id; $data['devis'] = 0; $data['projet_id'] = 'new'; $project = $daoProjet->sauve($data);