PM-2398 El contador de listados en home muestran datos incorrectos

This commit is contained in:
Brayan Pereyra
2015-04-23 12:06:04 -04:00
parent b30275a36d
commit 52f0930b31
2 changed files with 18 additions and 4 deletions

View File

@@ -104,9 +104,21 @@ class ListCanceled extends BaseListCanceled {
$oListInbox->removeAll($data['APP_UID']);
$users = new Users();
$users->refreshTotal($data['USR_UID'], 'removed', 'inbox');
if (!empty($data['APP_STATUS_CURRENT']) && $data['APP_STATUS_CURRENT'] == 'DRAFT') {
$users->refreshTotal($data['USR_UID'], 'removed', 'draft');
} else {
$users->refreshTotal($data['USR_UID'], 'removed', 'inbox');
}
$users->refreshTotal($data['USR_UID'], 'add', 'canceled');
//Update - WHERE
$criteriaWhere = new Criteria("workflow");
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $data["APP_UID"], Criteria::EQUAL);
//Update - SET
$criteriaSet = new Criteria("workflow");
$criteriaSet->add(ListParticipatedLastPeer::APP_STATUS, 'CANCELLED');
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
$con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME );
try {
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );