예제 #1
0
function sendMail($sbSolCoId, $bnSupAnou)
{
    $arNombTab = array(1 => 'opalo_cotizaciones_items');
    $arSelFiel = array(0 => "opalo_cotizaciones_items.name ");
    $arWhereFi = array(0 => "opalo_cotizaciones_items.parent_type", 1 => "opalo_cotizaciones_items.parent_id");
    $arWhereVa = array(0 => "opalo_solicitudes_cotizacion", 1 => $sbSolCoId);
    $arJoinFi1 = array();
    $arJoinFi2 = array();
    $arFielDes = FnCrm::getFields($arNombTab, $arSelFiel, $arWhereFi, $arWhereVa, $arJoinFi1, $arJoinFi2, 0);
    $arNombTab = array(1 => 'opalo_proveedores_opalo_solicitudes_cotizacion_1_c');
    $arSelFiel = array(0 => "opalo_prova919eedores_ida ");
    $arWhereFi = array(0 => "opalo_prov5077izacion_idb", 1 => "deleted");
    $arWhereVa = array(0 => $sbSolCoId, 1 => '0');
    $arJoinFi1 = array();
    $arJoinFi2 = array();
    $arSupplId = FnCrm::getFields($arNombTab, $arSelFiel, $arWhereFi, $arWhereVa, $arJoinFi1, $arJoinFi2, 0);
    foreach ($arFielDes as $key => $item) {
        $arFielDes[$key]['proveedores'] = $arSupplId;
    }
    $sbAsuntEm = $bnSupAnou->sbMsjHead;
    $arFromEma['from'] = "*****@*****.**";
    $arFromEma['from_name'] = "Juan";
    $sbContent = $bnSupAnou->sbMsjBody;
    FnCrm::sendEmailWithItems(1, $arFielDes, $sbAsuntEm, $sbContent, $arFromEma);
}
예제 #2
0
function smarty_function_opalo_contratos($params, &$smarty)
{
    $arSelFiel = array("*" => "*");
    $arWhereFi = array(0 => "parent_id", 1 => "parent_type", 2 => "opalo_cotizaciones_items.proveedor_seleccionado");
    $arWhereVa = array(0 => $params['sbSolCoti'], 1 => "opalo_solicitudes_cotizacion", 2 => $params['sbSupplId']);
    $arTblValu = array(0 => "opalo_items_solicitud_cotizacion", 1 => "opalo_cotizaciones_items");
    $arJoinFi1 = array(0 => "opalo_items_solicitud_cotizacion.id_proveedor", 1 => "opalo_items_solicitud_cotizacion.id_item_solicitud");
    $arJoinFi2 = array(0 => "opalo_cotizaciones_items.proveedor_seleccionado", 1 => "opalo_cotizaciones_items.id");
    $items = FnCrm::getFields($arTblValu, $arSelFiel, $arWhereFi, $arWhereVa, $arJoinFi1, $arJoinFi2);
    //echo "<pre>",print_r($items),"</pre>";
    //die();
    $smarty->assign('items', json_encode($items));
    $smarty->assign('params', $params);
    $smarty->assign('parent_type', $params['parent_type']);
    return $smarty->fetch("custom/opalo/partials/contratos_detail.tpl");
}
예제 #3
0
function sendMail($sbSolCoId)
{
    $arNombTab = array(1 => 'opalo_cotizaciones_items');
    $arSelFiel = array(0 => "opalo_cotizaciones_items.name ", 1 => "opalo_cotizaciones_items.proveedor_seleccionado");
    $arWhereFi = array(0 => "opalo_cotizaciones_items.parent_type", 1 => "opalo_cotizaciones_items.parent_id");
    $arWhereVa = array(0 => "opalo_solicitudes_cotizacion", 1 => $sbSolCoId);
    $arJoinFi1 = array();
    $arJoinFi2 = array();
    $arFielDes = FnCrm::getFields($arNombTab, $arSelFiel, $arWhereFi, $arWhereVa, $arJoinFi1, $arJoinFi2, 0);
    //
    foreach ($arFielDes as $key => $value) {
        $arFielDes[$key]['proveedores'][]['opalo_prova919eedores_ida'] = $value['proveedor_seleccionado'];
        unset($arFielDes[$key]['proveedor_seleccionado']);
    }
    $sbAsuntEm = "Usted fue seleccionado";
    $arFromEma['from'] = "*****@*****.**";
    $arFromEma['from_name'] = "Juan";
    $sbContent = "\n        Buenos dias, \n        el correo es para informarle que usted fue seleccionado para suministrar los items:\n        ";
    FnCrm::sendEmailWithItems(1, $arFielDes, $sbAsuntEm, $sbContent, $arFromEma);
}