예제 #1
0
function unit_crearSolCoti($sbIdSolic)
{
    FnCrm::crearSolCoti($sbIdSolic);
    $bnSolicit = BeanFactory::getBean("opalo_solicitudes", $sbIdSolic);
    $bnSoliCot = BeanFactory::newBean("opalo_solicitudes_cotizacion");
    $bnSoliCos = $bnSoliCot->get_full_list('', "opalo_solicitudes_cotizacion.name like '" . $bnSolicit->name . "%'");
    if ($bnSoliCos != null) {
        echo $bnSolicit->name . "se creo la solicitud de cotizacion <br>";
        foreach ($bnSoliCos as $bnISolCot) {
            echo $bnISolCot->name . "<br>";
        }
    } else {
        echo "fallo con " . $bnSolicit->name . "<br>";
    }
}
예제 #2
0
   Req Asociado:       RQ - Prototipo SRM Ópalo - 3
   Nombre         :    minAmounAr
   
   Parámetros         Descripción
   ============	===================
   REQUEST          Id de la solicitud
   
   
   Historia de Modificaciones
   Fecha             Autor             Modificación
   =========         =========         ====================
   
   ******************************************************************************/
if ($_REQUEST["modulo"] == 'opalo_solicitudes') {
    $sbIdSolic = $_REQUEST["idSolicitud"];
    $bnSoliCoti = FnCrm::crearSolCoti($_REQUEST["idSolicitud"]);
    $arCampos = array("boAprobad" => "boAprobad");
    FnCrm::aprobarBooleano($_REQUEST["idSolicitud"], "opalo_solicitudes", $arCampos);
    $bnSupAnou = FnCrm::crSupplierAnouncement($sbIdSolic);
    FnCrm::crRelationship($bnSupAnou, $bnSoliCoti, 'opalo_solicitudes_cotizacion', 'opalo_convocatoria', 'opalo_convocatoria_opalo_solicitudes_cotizacion_1', 0);
    FnCrm::crRelationship($bnSupAnou, null, 'opalo_proveedores', 'opalo_convocatoria', 'opalo_convocatoria_opalo_proveedores_1', 1);
    $sbAnounId = $bnSupAnou->id;
    echo '<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>';
    echo "<input type = 'hidden' id ='tmp_sbAnounId' name = 'tmp_sbAnounId' value = '{$sbAnounId}'>";
    require_once 'custom/opalo/js/refreshParent.js';
    //FnCrm :: minAmounAr($sbIdSolic);
    echo "se aprobo la solicitud exitosamente";
}
if ($_REQUEST['modulo'] == 'opalo_solicitudes_cotizacion') {
    $arCampos = array("boAprobad" => "boAprobad");
    $arRetValu = FnCrm::prepararDatos($_REQUEST["idSolicitud"]);