示例#1
0
        }
        $where .= " AND C.{$filtro['field']} {$operador_inicio}{$filtro['value']}{$operador_fin} ";
    }
}
//FIN DE FILTROS
//SE OBTIENE EL LISTADO DE MONEDAS
$i = 0;
$return = array();
if ($currencies = currency_currency::listCurrenciesForLanguage(USED, 'name', OPERATOR_EQUAL, $language, $where)) {
    foreach ($currencies as $c) {
        $return[$i]['id'] = $c->get('id');
        $return[$i]['name'] = $c->get('name') . " (" . $c->get('sign') . ")";
        $return[$i]['default'] = $c->get('default') == YES ? "SI" : "NO";
        $return[$i]['type'] = $c->get('type') == '1' ? "Fija" : "Flotante";
        if ($lastValue = $c->getLastChange()) {
            $return[$i]['cotizacion'] = OOB_numeric::formatPrint($lastValue['value']);
        }
        if ($c->get('type') == '1') {
            $return[$i]['cotizacion'] = OOB_numeric::formatPrint($c->get('value'));
        }
        $i++;
    }
}
//ARRAY CON LOS RESULTADOS
$result = array();
$result["totalCount"] = $i;
$result["topics"] = $return;
//RESULTADO
$obj_comunication = new OOB_ext_comunication();
$obj_comunication->set_data($result);
$obj_comunication->send(true, true);
示例#2
0
 public function getFormatedValue()
 {
     return OOB_numeric::formatPrint($this->value);
 }
示例#3
0
    if ($desde && $hasta) {
        //comparar las fechas desde y hasta
        //return int 0 if the dates are equal, -1 if d1 is before d2, 1 if d1 is after d2
        $res = Date::compare($desde, $hasta);
        if ($res == 1) {
            $errores[] = "INVALID_INTERVAL";
        }
    }
    if (count($errores) == 0) {
        $array_currencies = array();
        if ($values = $moneda->getChanges($desde, $hasta)) {
            //var_dump($values);
            $changes = array();
            $i = 0;
            foreach ($values as $v) {
                $changes[$i]['value'] = OOB_numeric::formatPrint($v['value']);
                $changes[$i]['date'] = $v['date'];
                $i++;
            }
            $ari->t->assign("changes", $changes);
        }
        $ari->t->assign("mostrar", true);
        //var_dump($changes);exit;
    } else {
        $ari->t->assign('error', true);
        foreach ($errores as $e) {
            $ari->t->assign($e, true);
        }
    }
}
$ari->t->assign("formElement", $sp->FormElement());