From a7a005d894150feb93b666a78ca5a258b5fd1c08 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Mar 2011 22:48:34 +0000 Subject: [PATCH] Work on web services --- htdocs/webservices/server_invoice.php | 11 ++++++++--- htdocs/webservices/server_supplier_invoice.php | 4 +++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/htdocs/webservices/server_invoice.php b/htdocs/webservices/server_invoice.php index b5db639015c..224ef7203f1 100755 --- a/htdocs/webservices/server_invoice.php +++ b/htdocs/webservices/server_invoice.php @@ -75,7 +75,8 @@ $server->wsdl->addComplexType( array( 'id' => array('name'=>'id','type'=>'xsd:string'), 'type' => array('name'=>'type','type'=>'xsd:int'), - 'fk_product' => array('name'=>'fk_product','type'=>'xsd:int'), + 'desc' => array('name'=>'desc','type'=>'xsd:string'), + 'fk_product' => array('name'=>'fk_product','type'=>'xsd:int'), 'total_net' => array('name'=>'total_net','type'=>'xsd:double'), 'total_vat' => array('name'=>'total_vat','type'=>'xsd:double'), 'total' => array('name'=>'total','type'=>'xsd:double'), @@ -258,11 +259,15 @@ function getInvoice($authentication,$id,$ref,$ref_ext) $linesresp[]=array( 'id'=>$line->rowid, 'type'=>$line->product_type, - 'total_net'=>$line->total_ht, + 'desc'=>dol_htmlcleanlastbr($line->description), + 'total_net'=>$line->total_ht, 'total_vat'=>$line->total_tva, 'total'=>$line->total_ttc, 'vat_rate'=>$line->tva_tx, - 'qty'=>$line->qty + 'qty'=>$line->qty, + 'product_ref'=>$line->product_ref, + 'product_label'=>$line->product_label, + 'product_desc'=>$line->product_desc, ); $i++; } diff --git a/htdocs/webservices/server_supplier_invoice.php b/htdocs/webservices/server_supplier_invoice.php index f9000705118..993a40e6c28 100755 --- a/htdocs/webservices/server_supplier_invoice.php +++ b/htdocs/webservices/server_supplier_invoice.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2006-2011 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -75,6 +75,7 @@ $server->wsdl->addComplexType( array( 'id' => array('name'=>'id','type'=>'xsd:string'), 'type' => array('name'=>'type','type'=>'xsd:int'), + 'desc' => array('name'=>'desc','type'=>'xsd:string'), 'fk_product' => array('name'=>'fk_product','type'=>'xsd:int'), 'total_net' => array('name'=>'total_net','type'=>'xsd:double'), 'total_vat' => array('name'=>'total_vat','type'=>'xsd:double'), @@ -367,6 +368,7 @@ function getSupplierInvoicesForThirdParty($authentication,$idthirdparty) $linesresp[]=array( 'id'=>$line->rowid, 'type'=>$line->product_type, + 'desc'=>dol_htmlcleanlastbr($line->description), 'total_net'=>$line->total_ht, 'total_vat'=>$line->total_tva, 'total'=>$line->total_ttc,