diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb
index c348cebec..daee7399b 100644
--- a/App_Code/ClsVentas.vb
+++ b/App_Code/ClsVentas.vb
@@ -460,7 +460,8 @@ Public Class ClsVentas
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
- Optional RetISR As Double = -1, Optional Kilometraje As Double = 0) As Boolean
+ Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveVendedor As Integer = -1, Optional ObsAlm As String = "", Optional FormaPaqueteria As Integer = -1,
+ Optional CorreoNot As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUpdate")
@@ -491,6 +492,10 @@ Public Class ClsVentas
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
+ .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
+ .Add("@ObservacionesAlm", SqlDbType.NVarChar).Value = ObsAlm
+ .Add("@FormaPaqueteria", SqlDbType.Int).Value = FormaPaqueteria
+ .Add("@CorreoNotificacion", SqlDbType.NVarChar).Value = CorreoNot
End With
Try
diff --git a/Ashx/SIGGPSRCService.ashx b/Ashx/SIGGPSRCService.ashx
index fdf23c18b..33e0b4b40 100644
--- a/Ashx/SIGGPSRCService.ashx
+++ b/Ashx/SIGGPSRCService.ashx
@@ -15,6 +15,17 @@ using System.Text;
public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
{
+ public bool EsProduccion
+ {
+ get
+ {
+ if (System.Configuration.ConfigurationManager.AppSettings["EsProduccion"] == null)
+ return false;
+ else
+ return (System.Configuration.ConfigurationManager.AppSettings["EsProduccion"].ToString() == "1");
+ }
+ }
+
private Usuario ValidaUsuarioSistema(int CveEmpresa)
{
Usuario UsuarioActual = null;
@@ -85,8 +96,28 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
{
try
{
- context.Response.ContentType = "application/json";
- IniciarTransmision(context);
+ context.Response.ContentType = "text/plain";
+ bool retorno = false;
+ string Metodo = context.Request["Metodo"] == null ? "" : context.Request["Metodo"];
+ switch (Metodo)
+ {
+ case "EjecutaServicio":
+ ModExtensiones.GuardaLogAD("Servicio Ejecutado...........", "LogServicioConfiable");
+ IniciarTransmision(context);
+ retorno = true;
+ break;
+ default:
+ break;
+ }
+ if (retorno)
+ {
+ context.Response.Write("True");
+ }
+ else
+ {
+ context.Response.Write("False");
+ }
+
}
catch (Exception ex)
{
@@ -147,16 +178,26 @@ public class SIGGPSRCService : IHttpHandler, IRequiresSessionState
this.OnError("Ocurrió un error al enviar los datos", ex);
}
ObjGPS.Dispose();
+
DtTrackings.Dispose();
DtTrackings = null;
- var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray());
+ if (ListaEventos.Count > 0)
+ {
+
+ var respuesta = WS.GPSAssetTracking(Token.token, ListaEventos.ToArray());
+ context.Response.Write(JsonConvert.SerializeObject(respuesta));
+ }
WS.Close();
- context.Response.Write(JsonConvert.SerializeObject(respuesta));
-
+ //context.Response.Write(JsonConvert.SerializeObject(new { idJob = "1", exception = "" }));
}
- private string UserService => "demo_cedis_corp";
- private string PasswordService => "xxxxxxxx";
+
+
+
+
+ private string UserService => EsProduccion ? "ws_avl_opsat" : "demo_cedis_corp";
+ private string PasswordService => EsProduccion ? "eiHv##889iWfz#&2" : "xxxxxxxx";
+
}
\ No newline at end of file
diff --git a/GPS/RecursoConfiableTracking.aspx.vb b/GPS/RecursoConfiableTracking.aspx.vb
index 7faaaf405..f88665cbe 100644
--- a/GPS/RecursoConfiableTracking.aspx.vb
+++ b/GPS/RecursoConfiableTracking.aspx.vb
@@ -29,7 +29,7 @@ Partial Class GPS_RecursoConfiableTracking
DdlDispositivoFiltro.DataBind()
DdlDispositivoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
- DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("PlacasVehiculo <> ''")
+ DdlDispositivo.DataSource = GlobalDTDispositivosUsuarios(UsuarioActual.CveCliente, UsuarioActual.CveUsuario).FiltraParametros("PlacasVehiculo IS NOT NULL AND PlacasVehiculo <> ''")
DdlDispositivo.DataBind()
DdlDispositivo.Items.Insert(0, New ListItem("Seleccione", "-1"))
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx b/Inventarios/PaquetesArmadoDesarmado.aspx
index b6b4271e3..403797160 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx
@@ -216,18 +216,38 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Inventarios/PaquetesArmadoDesarmado.aspx.vb b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
index ba212c0e1..8af94a12a 100644
--- a/Inventarios/PaquetesArmadoDesarmado.aspx.vb
+++ b/Inventarios/PaquetesArmadoDesarmado.aspx.vb
@@ -240,14 +240,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End If
Next
+ Dim AplicaSerie As String = ""
If ErrorExistencias Then
Alert(TextoExistencias, TipoMensaje.MsgAdvertencia)
Else
- CveTipoPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
+ AplicaSerie = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlPaqueteArmado.SelectedValue.ToEntero).FiltroPrimeroValor("AplicaSerie")
BtnGuadarArmado.Visible = True
End If
- If CveTipoPS = 5 Then
+ If AplicaSerie = "True" Then
DivSeriesPaqueteArmado.Visible = True
Dim Dt As New DataTable
Dt.Columns.Add("Row", GetType(Integer))
@@ -468,6 +469,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
For Each Gvr As GridViewRow In GvDatosArmado.Rows
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
+ Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
+ Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
+ Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
If Gvr.DataKey("Inv_CveMetodoInventario").ToString.ToEntero = 5 Then
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
If Not ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenArmado.SelectedValue.ToEntero, FechaMovto:=Fecha.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Dr("Serie").ToString, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente)) >= 1 Then
@@ -476,7 +480,8 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
Exit For
End If
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, Serie:=Dr("Serie").ToString) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, 1, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1,
+ CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Dr("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad.ToDate) Then
MensajeError = "Ocurrió un error al guardar los detalles con serie del movimiento de salida. Por favor vuelva a intentar."
TieneError = True
Exit For
@@ -488,7 +493,9 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End If
Else
- If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1) Then
+ If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.DataKey("Cantidad").ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero,
+ Gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote,
+ FechaCaducidad:=FechaCaducidad.ToDate) Then
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
TieneError = True
Exit For
@@ -661,44 +668,44 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
'If Tipo = 1 Then
BtnGuadarArmado.Visible = False
- DivSeriesPaqueteArmado.Visible = False
- GvDatosArmado.Columns(4).Visible = False
+ DivSeriesPaqueteArmado.Visible = False
+ GvDatosArmado.Columns(4).Visible = False
- LbPaqueteArmado.Text = ""
- CvePaqueteArmado = -1
- LbCantidadArmado.Text = ""
- LbAlmacenArmado.Text = ""
- CveAlmacenArmado = -1
- LbFechaArmado.Text = ""
- TxtObservacionesArmado.Text = ""
- UpGeneralesArmado.Update()
+ LbPaqueteArmado.Text = ""
+ CvePaqueteArmado = -1
+ LbCantidadArmado.Text = ""
+ LbAlmacenArmado.Text = ""
+ CveAlmacenArmado = -1
+ LbFechaArmado.Text = ""
+ TxtObservacionesArmado.Text = ""
+ UpGeneralesArmado.Update()
- GvDatosArmado.DataBind()
- UpDatosArmado.Update()
- UpSeriesPaqueteArmado.Update()
+ GvDatosArmado.DataBind()
+ UpDatosArmado.Update()
+ UpSeriesPaqueteArmado.Update()
'Else
LbPaqueteDesarmado.Text = ""
- CvePaqueteDesarmado = -1
- LbCantidadDesarmado.Text = ""
- LbAlmacenDesarmado.Text = ""
- CveAlmacenDesarmado = -1
- LbFechaDesarmado.Text = ""
- TxtObservacionesDesarmado.Text = ""
- UpGeneralesDesarmado.Update()
+ CvePaqueteDesarmado = -1
+ LbCantidadDesarmado.Text = ""
+ LbAlmacenDesarmado.Text = ""
+ CveAlmacenDesarmado = -1
+ LbFechaDesarmado.Text = ""
+ TxtObservacionesDesarmado.Text = ""
+ UpGeneralesDesarmado.Update()
- BtnGuadarDesarmado.Visible = False
- TotalDesarmado.Visible = False
+ BtnGuadarDesarmado.Visible = False
+ TotalDesarmado.Visible = False
- DtSeriesDesarmado.Clear()
- GvDatosDesarmado.Columns(4).Visible = False
- DivSeriesPaqueteDesarmado.Visible = False
- GvSeriesPaqueteDesarmado.DataBind()
- BtnAgregarSerieDesarmado.Enabled = True
+ DtSeriesDesarmado.Clear()
+ GvDatosDesarmado.Columns(4).Visible = False
+ DivSeriesPaqueteDesarmado.Visible = False
+ GvSeriesPaqueteDesarmado.DataBind()
+ BtnAgregarSerieDesarmado.Enabled = True
- LbTotalCalculado.Text = "0.00"
+ LbTotalCalculado.Text = "0.00"
- GvDatosDesarmado.DataBind()
+ GvDatosDesarmado.DataBind()
UpDatosDesarmado.Update()
UpSeriesPaqueteDesarmado.Update()
@@ -730,6 +737,19 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
e.Row.FCButton("BtnSerie").Visible = False
End If
+ If e.Row.DataKey("AplicaSeccion") = "False" Then
+ e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
+ Else
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
+ e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
+ e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
+ End If
+
+ e.Row.FCTextBox("TxtCaducidad").Visible = e.Row.DataKey("AplicaCaducidad") = "True"
+
+ e.Row.FCTextBox("TxtLote").Visible = e.Row.DataKey("AplicaLote") = "True"
+
+ e.Row.FCTextBox("TxtSerie").Visible = e.Row.DataKey("AplicaSerie") = "True"
''FUNCIONALIDAD PISTOLA DE CODIGOS
'If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
' e.Row.FCTextBox("TbCantidadF").Enabled = False
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index d8d8caf02..cb0957bcf 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -3403,6 +3403,8 @@
+
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 6bf46ad1a..65b1df597 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -2049,6 +2049,7 @@ Partial Class Ventas
DdlSubProyectoDatos.Enabled = False
BtnEmitirImprimir.Visible = False
BtnCrearApartirDe.Visible = True
+ BtnEditar.Visible = True
'DdlEstatus.Enabled = True
DivFechaAnticipoCliente.Visible = True
@@ -4450,36 +4451,41 @@ Partial Class Ventas
End If
End If
+ If UsuarioActual.Empresa.Funcionalidad(280) = "1" Then
+ RblPaqueteria.SelectedValue = If(DbRowVenta("FormaPaqueteria").ToString = "", "1", DbRowVenta("FormaPaqueteria").ToString)
+ RblPaqueteria.Enabled = False
+ End If
+
If UsuarioActual.CveEmpresa = 48 Then
- TxtFecha.AutoPostBack = True
- End If
-
- CargaCodigoUnico()
-
- 'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
- If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
- Dim DtOCGeneradas As DataTable = Nothing
- If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
- DtOCGeneradas = ObjVentas.DtResultados.Copy()
+ TxtFecha.AutoPostBack = True
End If
- If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
- LtGenerarOC.Visible = False
- Else
- LtGenerarOC.Visible = True
+
+ CargaCodigoUnico()
+
+ 'SI ES COTIZACION PUEDE GENERAR UNA OC PARA MODIFICAR LOS IMPORTES
+ If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(583) = "1" Then
+ Dim DtOCGeneradas As DataTable = Nothing
+ If ObjVentas.GetVentasCotizacionesOC(Me.CveVenta, -1, UsuarioActual.CveEmpresa) Then
+ DtOCGeneradas = ObjVentas.DtResultados.Copy()
+ End If
+ If DtOCGeneradas IsNot Nothing AndAlso DtOCGeneradas.Rows.Count > 0 Then
+ LtGenerarOC.Visible = False
+ Else
+ LtGenerarOC.Visible = True
+ End If
End If
- End If
- DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
+ DdlTipoRetencion.SelectedValueExist(DbRowVenta("CveTipoRetencion").ToString())
- CargaPS(-1, DdlPS)
+ CargaPS(-1, DdlPS)
- UpPS.Update()
- UpContado.Update()
- UpEstatus.Update()
- Retorno = True
+ UpPS.Update()
+ UpContado.Update()
+ UpEstatus.Update()
+ Retorno = True
- Else
- ViewState("CveVenta") = -1
+ Else
+ ViewState("CveVenta") = -1
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)
End If
End If
@@ -4747,7 +4753,7 @@ Partial Class Ventas
End Function
Private Sub CargarAlmacenes()
- If CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot" Then
+ If (CveVenta > 0 And DdlTipoComprobante.SelectedValue <> "Cot") AndAlso Not (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
DivAlmacen.Visible = False
Else
Dim DTAlmacen As DataTable
@@ -6340,6 +6346,10 @@ Partial Class Ventas
e.Row.FCCheckBox("cbInv").Visible = False
End If
+ If (CveVenta > 0 AndAlso EsCreaApartirDe AndAlso UsuarioActual.CveEmpresa = 141) Then
+ e.Row.FCCheckBox("cbInv").Visible = True
+ End If
+
End If
End Sub
@@ -15907,7 +15917,7 @@ Partial Class Ventas
GvPS.DataBind()
'RECARGA GV INVENTARIO
- If Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot" Then
+ If (Not CveVenta > 0 Or DdlTipoComprobante.SelectedValue = "Cot") OrElse (UsuarioActual.CveEmpresa = 141 AndAlso EsCreaApartirDe) Then
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
CargaGVInv(DtInv)
End If
@@ -24989,6 +24999,19 @@ Partial Class Ventas
GvPS.Columns(17).Visible = True
GvPS.Columns(18).Visible = True
+ CambiaTipoDocto()
+ CambiaSucursalGeneral()
+ CargaAnticipos(CveCliente)
+ CargaRestriccionesCreditoCliente(CveVenta:=-1)
+
+ If UsuarioActual.CveEmpresa = 141 Then
+ TabAlmacen.Visible = True
+ DivAlmacen.Visible = True
+ CargaGVInv(TmpDT.FiltraParametros("CveTipoPS = 2"))
+ End If
+
+ BloqueaCondiconesPago()
+
UpnTools.Update()
UpCliente.Update()
UpParametros.Update()
@@ -24999,13 +25022,8 @@ Partial Class Ventas
UPCondicionesPago.Update()
UpDetalle.Update()
UpEstatus.Update()
-
- CambiaTipoDocto()
- CambiaSucursalGeneral()
- CargaAnticipos(CveCliente)
- CargaRestriccionesCreditoCliente(CveVenta:=-1)
- BloqueaCondiconesPago()
UpParametros.Update()
+ UpINV.Update()
End Sub
#End Region
@@ -25953,4 +25971,48 @@ Partial Class Ventas
End If
ObjVentas.Dispose()
End Sub
+
+ Protected Sub BtnEditar_Click() Handles BtnEditar.Click
+ Dim Opcion As String = BtnEditar.Text
+ If Opcion = "Editar" Then
+ EditarHabilitarCampos()
+ ElseIf Opcion = "Guardar" Then
+ GuardarValoresEditados()
+ End If
+ End Sub
+
+ Private Sub EditarHabilitarCampos()
+ 'Datos de emisión
+ DdlVendedor.Enabled = True
+
+ 'Observaciones
+ TxtObsFact.Enabled = True
+ TxtOrdenCompra.Enabled = True
+ TxtPedidoContrato.Enabled = True
+ TxtObsAlmacen.Enabled = True
+ RblPaqueteria.Enabled = True
+
+ 'Acciones
+ BtnEditar.Text = "Guardar"
+
+ UpParametros.Update()
+ UPObservaciones.Update()
+ UpFacturar.Update()
+ End Sub
+
+ Private Sub GuardarValoresEditados()
+ Dim ObjVentas As New ClsVentas()
+ If ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, DdlMoneda.SelectedValue.ToEntero(),
+ TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim, UsuarioActual.CveEmpresa, CveVenta, DdlMetodoPago33.SelectedValue.ToEntero, DdlFormaPago33.SelectedValue.ToEntero,
+ TipoDocto:=DdlTipoComprobante.SelectedValue, OrdenCompra:=TxtOrdenCompra.Text, PedidoContrato:=TxtPedidoContrato.Text, ObsAlm:=TxtObsAlmacen.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero,
+ CorreoNot:=TxtCorreoNotificaciones.Text) Then
+ CargaVenta()
+ BtnEditar.Text = "Editar"
+ Alert("Actualizado correctamente")
+ UpParametros.Update()
+ UPObservaciones.Update()
+ UpFacturar.Update()
+ End If
+ ObjVentas.Dispose()
+ End Sub
End Class
\ No newline at end of file