コード例 #1
0
 public function GetRejectionCostForProv(Gyuser_Model_Cheques $cheque)
 {
     try {
         $rejectedCost = 'null';
         $gastos_type = $cheque->getRejected_type();
         if ($cheque->getLiquidacion_id()) {
             //the cheque has been passed to a provider
             $pMapper = new Gyuser_Model_ProvidersDataMapper();
             $pList = $pMapper->GetProviderById($cheque->getProvider_id());
             //looks for provider id (not cave)
             if ($gastos_type == "Denuncia") {
                 $rejectedCost = $pList->getGastos_denuncia();
             } elseif ($gastos_type == "Sin Fondos") {
                 $rejectedCost = $pList->getGastos_rechazo();
             }
         }
         return $rejectedCost;
     } catch (Exception $e) {
         echo $e;
     }
 }