Ejemplo n.º 1
0
        public string LiquidarServicio(Entidad.LiquidarServicioInput Parametros)
        {
            var Resultado = DB2Helper.ExecuteDb2Scalar(CommandType.StoredProcedure, "SP_LIQUIDAR_ORD_TRABAJO_WEB_TODOS", Parametros);

            if (Resultado == null)
            {
                Resultado = "OK";
            }

            return(Resultado.ToString());
        }
Ejemplo n.º 2
0
 public string LiquidarServicio(Entidad.LiquidarServicioInput Parametros)
 {
     return(ejecuta.LiquidarServicio(Parametros));
 }
Ejemplo n.º 3
0
        public JsonResult LiquidarServicio(string ORDEN, string CODSERV, string CANTSOLI, string PESOSOLI,
                                           string TRF, string MONEDA, string CUADRILLA, string OBSERVACION, string CANTATEN, string PESOATEN,
                                           string FACTURAR, string VALORIZADO, string FINIREE, string HINIREE, string FFINREE, string HFINREE, string ZONA, string FECHA)
        {
            string Resultado = "";

            var fechaSTR = FECHA.Substring(6, 4) + FECHA.Substring(3, 2) + FECHA.Substring(0, 2);
            var HoraSTR  = DateTime.Now.ToString("HHmmss");


            Entidad.LiquidarServicioInput input = new Entidad.LiquidarServicioInput();
            input.IN_NORDTR   = Convert.ToDecimal(ORDEN);
            input.IN_CSRVNV   = Convert.ToDecimal(CODSERV);
            input.IN_NCRRLT   = 1;
            input.IN_CCMPN    = "EZ";
            input.IN_CDVSN    = "N";
            input.IN_CRBCTC   = Convert.ToDecimal(CODSERV); //Preguntar
            input.IN_QSRVC    = Convert.ToDecimal(CANTSOLI);
            input.IN_PSRVC    = Convert.ToDecimal(PESOSOLI);
            input.IN_ITRFSR   = Convert.ToDecimal(TRF);
            input.IN_CMNDA5   = Convert.ToDecimal(MONEDA);
            input.IN_CPRVD    = "";
            input.IN_CCDRLL   = Convert.ToDecimal(CUADRILLA);
            input.IN_TOBSRV   = OBSERVACION;
            input.IN_QATNAN   = Convert.ToDecimal(CANTATEN);
            input.IN_PATNAN   = Convert.ToDecimal(PESOATEN);
            input.IN_TOBSR1   = OBSERVACION;
            input.IN_FLIQSR   = Convert.ToDecimal(fechaSTR);
            input.IN_HLIQSR   = Convert.ToDecimal(HoraSTR);
            input.IN_ULIQSR   = (string)Session["Usuario"];
            input.IN_SESTSR   = "L";
            input.IN_SESTRG   = "A";
            input.IN_TOBSR    = OBSERVACION;
            input.IN_SQNCB    = FACTURAR;
            input.IN_SESFAC   = "";
            input.IN_SVLRZ    = VALORIZADO;
            input.IN_FINREE   = FINIREE == "" ? 0 : Convert.ToDecimal(Convert.ToDateTime(FINIREE).ToString("yyyyMMdd"));
            input.IN_HINREE   = HINIREE == "" ? 0 : Convert.ToDecimal(Convert.ToDateTime(HINIREE).ToString("HHmmss"));
            input.IN_FFIREE   = FFINREE == "" ? 0 : Convert.ToDecimal(Convert.ToDateTime(FFINREE).ToString("yyyyMMdd"));
            input.IN_HFIREE   = HFINREE == "" ? 0 : Convert.ToDecimal(Convert.ToDateTime(HFINREE).ToString("HHmmss"));
            input.IN_CZNLLN   = 1;
            input.IN_LIBRERIA = (string)Session["Libreria"];
            Resultado         = NgOredenTrabajo.LiquidarServicio(input);
            if (Resultado == "OK")
            {
                DateTimeOffset do1   = new DateTimeOffset(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second, new TimeSpan(-5, 0, 0));
                string         fecha = do1.Year.ToString();
                fecha += do1.Month.ToString().Length == 1 ? '0' + do1.Month.ToString() : do1.Month.ToString();
                fecha += do1.Day.ToString().Length == 1 ? '0' + do1.Day.ToString() : do1.Day.ToString();

                long Fultac = long.Parse(fecha);
                long Hultac = long.Parse(DateTime.Now.ToString("HHmmss"));

                Entidad.OrdenTrabajoAuditoriaInput auditoria = new Entidad.OrdenTrabajoAuditoriaInput();
                auditoria.NORDTR   = long.Parse(ORDEN);
                auditoria.SESFAC   = "L";
                auditoria.OBSERV   = CODSERV + ", Servicio Liquidado ";
                auditoria.FECCRE   = Fultac;
                auditoria.HORCRE   = Hultac;
                auditoria.LIBRERIA = (string)Session["Libreria"];
                var tempo = NgOredenTrabajo.AuditoriaOrdenTrabajo(auditoria);
            }
            return(Json(Resultado));
        }