Ejemplo n.º 1
0
     break;
 case 'update':
     break;
 case 'delete':
     break;
 case 'imprimir':
     $expPrint = new ExpertoImpresion();
     $text = "";
     if ($oData['listado'] == 'true') {
         $text = $exp->getTextForPrintListadoDeCarga($id);
         $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text));
         exit;
     }
     if ($oData['presupuestos'] == 'true') {
         $expVta = new ExpertoVentas();
         $text = $expVta->getTextForPrintVentasDeRepartoPresupuesto($id);
         $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text));
         exit;
     }
     if ($oData['factb'] == 'true') {
         $expVta = new ExpertoVentas();
         $text = $expVta->getTextForPrintVentasDeReparto_B($id);
         $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text));
         exit;
     }
     if ($oData['facta'] == 'true') {
         $expVta = new ExpertoVentas();
         $text = $expVta->getTextForPrintVentasDeReparto_A($id);
         $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text));
         exit;
     }
Ejemplo n.º 2
0
     }
     break;
 case "imprimir":
     $expPrint = new ExpertoImpresion();
     $text = "";
     switch ($oData["tipo_vta"]) {
         case "A":
             $text = $exp->getTextForPrintVentasDeReparto_A($oData["id_reparto"], $oData["id_venta"]);
             $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text));
             break;
         case "B":
             $text = $exp->getTextForPrintVentasDeReparto_B($oData["id_reparto"], $oData["id_venta"]);
             $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text));
             break;
         case "P":
             $text = $exp->getTextForPrintVentasDeRepartoPresupuesto($oData["id_reparto"], $oData["id_venta"]);
             $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text));
             break;
         case "SD":
             $text = $exp->getTextForPrintSaldoDeudorDeReparto($oData["id_reparto"], $oData["id_cliente"]);
             $expPrint->imprimir(reemplazarCaracteresEspecialesPorAscii($text));
             break;
     }
     break;
 case "reloadListAll":
     $fecha_fin = $oData["fecha_fin"];
     $fecha_inicio = $oData["fecha_inicio"];
     $data = $exp->getAllVentas($fecha_inicio, $fecha_fin);
     echo "<script>       var data = \"{$data}\";\n                            parent.mygrid.clearAll();\n                            parent.mygrid.parse(data, 'xml');\n                            parent.mygrid.filterByAll();\n                    </script>";
     exit;
     break;