Correction lien
This commit is contained in:
parent
80757437fa
commit
b4458b38b9
@ -1567,7 +1567,7 @@ class Saisie extends WsScore
|
||||
|
||||
$lienM = new Application_Model_JoLiens();
|
||||
|
||||
//Test si PDetention > 100
|
||||
//Test si PDetention >= 100
|
||||
if ($dataLien['actif']!=0) {
|
||||
$sql = $lienM->select()->from($lienM, array(
|
||||
'idPar', new Zend_Db_Expr('SUM( PDetention ) AS sumDet')
|
||||
@ -1579,7 +1579,7 @@ class Saisie extends WsScore
|
||||
$sql->where('actif=?',1);
|
||||
$result = $lienM->fetchRow($sql);
|
||||
if ( null !== $result ) {
|
||||
if ( $result->sumDet + $dataLien['PDetention'] > 100 ) {
|
||||
if ( (float) ($result->sumDet + $dataLien['PDetention']) > 100.1 ) {
|
||||
throw new SoapFault('ERR', "Erreur Detention sup 100%");
|
||||
}
|
||||
}
|
||||
@ -2142,7 +2142,9 @@ class Saisie extends WsScore
|
||||
* LienRef Fusion or Move LienRef
|
||||
* @param string $action fusion|moveact|movepar
|
||||
* @param int $idLien
|
||||
* Identifiant du lien entre idPar et idAct
|
||||
* @param int $id
|
||||
* Identifiant à affecter (idPar ou idAct)
|
||||
* @throws SoapFault
|
||||
* @return boolean
|
||||
*/
|
||||
@ -2182,7 +2184,7 @@ class Saisie extends WsScore
|
||||
{
|
||||
try {
|
||||
$result = $lienM->update(array('idPar'=>$id, 'idUpdate'=>$this->tabInfoUser['id']),
|
||||
'idAct='.$idLien);
|
||||
'id='.$idLien);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->tabInfoUser['idClient']==1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
@ -2198,7 +2200,7 @@ class Saisie extends WsScore
|
||||
{
|
||||
try {
|
||||
$result = $lienM->update(array('idAct'=>$id, 'idUpdate'=>$this->tabInfoUser['id']),
|
||||
'idPar='.$idLien);
|
||||
'id='.$idLien);
|
||||
} catch (Zend_Db_Exception $e) {
|
||||
if ($this->tabInfoUser['idClient']==1) {
|
||||
throw new SoapFault('ERR', $e->getMessage());
|
||||
|
Loading…
x
Reference in New Issue
Block a user