Skip to content

Commit

Permalink
Merge pull request #1613 from guerinaxel/patch-4
Browse files Browse the repository at this point in the history
Adding var mode_reglement_id to facture
  • Loading branch information
eldy committed Jun 26, 2014
2 parents 0b38fcb + 0d71350 commit 31c60cc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions htdocs/webservices/server_invoice.php
Expand Up @@ -102,6 +102,7 @@
'total' => array('name'=>'total','type'=>'xsd:double'),
'date_start' => array('name'=>'date_start','type'=>'xsd:date'),
'date_end' => array('name'=>'date_end','type'=>'xsd:date'),
'payment_mode_id' => array('name'=>'payment_mode_id','type'=>'xsd:string'),
// From product
'product_id' => array('name'=>'product_id','type'=>'xsd:int'),
'product_ref' => array('name'=>'product_ref','type'=>'xsd:string'),
Expand Down Expand Up @@ -329,6 +330,7 @@ function getInvoice($authentication,$id='',$ref='',$ref_ext='')
'status'=> $invoice->statut,
'close_code' => $invoice->close_code?$invoice->close_code:'',
'close_note' => $invoice->close_note?$invoice->close_note:'',
'payment_mode_id' => $invoice->mode_reglement_id?$invoice->mode_reglement_id:'',
'lines' => $linesresp
));
}
Expand Down Expand Up @@ -454,6 +456,7 @@ function getInvoicesForThirdParty($authentication,$idthirdparty)
'status'=> $invoice->statut,
'close_code' => $invoice->close_code?$invoice->close_code:'',
'close_note' => $invoice->close_note?$invoice->close_note:'',
'payment_mode_id' => $invoice->mode_reglement_id?$invoice->mode_reglement_id:'',
'lines' => $linesresp
);
}
Expand Down Expand Up @@ -518,6 +521,7 @@ function createInvoice($authentication,$invoice)
$newobject->statut=0; // We start with status draft
$newobject->fk_project=$invoice['project_id'];
$newobject->date_creation=$now;
$newobject->mode_reglement_id = $invoice['payment_mode_id'];

// Trick because nusoap does not store data with same structure if there is one or several lines
$arrayoflines=array();
Expand Down

0 comments on commit 31c60cc

Please sign in to comment.