validation de la saisie bilan via webservice
This commit is contained in:
parent
890d2c4413
commit
85b1d508ca
@ -19,17 +19,17 @@ class Order extends Scores_Ws_Server
|
||||
* @return string
|
||||
* Retourne la référence de commande
|
||||
*/
|
||||
public function setBilanInput($siren, $date, $type, $source, $private = 0)
|
||||
public function setBilanInput($siren, $date, $type, $source='client', $private = 0)
|
||||
{
|
||||
$this->authenticate();
|
||||
$this->permission('UPLOADBILAN');
|
||||
|
||||
// Check source
|
||||
if (in_array($source, array('extranet', 'infogreffe'))) {
|
||||
|
||||
if (!in_array($source, array('extranet', 'infogreffe'))) {
|
||||
$source = 'client';
|
||||
}
|
||||
// Check Siren
|
||||
else {
|
||||
if ($source == 'client') {
|
||||
if (strlen($siren) != 9 || intval($siren) == 0) {
|
||||
throw new SoapFault('ERR', "SIREN invalid");
|
||||
}
|
||||
@ -106,8 +106,8 @@ class Order extends Scores_Ws_Server
|
||||
|
||||
// Generate filename
|
||||
$siren = $commandeResult->siren;
|
||||
$type = $commandeResult->type;
|
||||
$cloture = $commandeResult->bilanCloture;
|
||||
$type = $commandeResult->bilanType;
|
||||
$cloture = str_replace('-', '', $commandeResult->bilanCloture);
|
||||
$ref = $commandeResult->refCommande;
|
||||
$filename = $siren.'_'.$type.'_'.$cloture.'_'.$ref.'.pdf';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user