diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 8f89239ca..597854f57 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -5768,6 +5768,7 @@ Public Class ClsContabilidad
.Add("@Opcion", SqlDbType.Int).Value = Opcion
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
+ .Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 800).Direction = ParameterDirection.Output
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
End With
diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb
index 9832061b6..2a531ef0d 100644
--- a/App_Code/modExtensiones.vb
+++ b/App_Code/modExtensiones.vb
@@ -54,8 +54,8 @@ Namespace Extensiones
' BaseDatos = CType(System.Web.HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.BaseDatosNombre
'End If
-
- Return String.Format("Data Source=192.168.0.2;Initial Catalog={0};User Id=JCaudillo;Password=JCau127*953;pooling=True; Min Pool Size=10;Application Name=SIG;", BaseDatos)
+ Return ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
+ ' Return String.Format("Data Source=192.168.0.2;Initial Catalog={0};User Id=JCaudillo;Password=JCau127*953;pooling=True; Min Pool Size=10;Application Name=SIG;", BaseDatos)
End Function
diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx
index a1d1c9720..faf915fda 100644
--- a/Ashx/SIGWeb.ashx
+++ b/Ashx/SIGWeb.ashx
@@ -247,13 +247,13 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
'ObjProveedores.Dispose()
Dim dt As DataTable = DirectCast(context.Application(AppNombre), DataTable).FiltraParametros($"CveEmpresa = {CveEmpresa}")
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
- DtRetorno = dt.FiltraParametros($"RazonSocial like '%{Name}%'")
+ DtRetorno = dt.FiltraParametros($"NombreCortoProveedor like '%{Name}%'")
End If
End If
If DtRetorno IsNot Nothing AndAlso DtRetorno.Rows.Count > 0 Then
DtRetorno.Columns("CveProveedor").ColumnName = "id"
- DtRetorno.Columns("RazonSocial").ColumnName = "text"
+ DtRetorno.Columns("NombreCortoProveedor").ColumnName = "text"
retorno = JsonConvert.SerializeObject(DtRetorno).ToString
context.Response.Write(retorno)
Else
diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb
index ccc628c7f..33aa8f9b5 100644
--- a/Inventarios/TraspasoAlmacen.aspx.vb
+++ b/Inventarios/TraspasoAlmacen.aspx.vb
@@ -804,7 +804,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 24).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
- CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 3, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
+ CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtual, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="TA/V", CveMovimientoRelacionado:=CveMovimientoSalida)
FolioVirtualSalida = ObjInventario.Folio
Dim dtvirtual As DataTable = Nothing
@@ -829,11 +829,11 @@ Partial Class Inventarios_TraspasoAlmacen
'AGREGAMOS LA ENTRADA
If Not ChkTransitorio.Checked Then 'SI NO ES TRANSITORIO SE HACE LA RECEPCION DE INMEDIATO
If Not ErrorMovInv Then
- Dim TipoMovimientoEntrada = 9
+ Dim TipoMovimientoEntrada = 36
AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero)
CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"),
- CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G")
+ CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/G")
FolioEntrada = ObjInventario.Folio
If CveMovimientoEntrada <= 0 Then
TextoError = "Ocurrió un error al generar el movimiento de entrada"
diff --git a/OC/OC.aspx b/OC/OC.aspx
index c42828217..edde3253c 100644
--- a/OC/OC.aspx
+++ b/OC/OC.aspx
@@ -2556,9 +2556,11 @@
-
-
-
+ <%----%>
+
+
+<%--
+ --%>
diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb
index d557bfdb9..d77b1c6be 100644
--- a/OC/OC.aspx.vb
+++ b/OC/OC.aspx.vb
@@ -1294,7 +1294,12 @@ Partial Class OC
HplCompraContabilizada.Text = "No"
End If
- DdlProveedores.ddl.SelectedValueExist(objOC.CveProveedor.ToString)
+ DdlProveedores.SelectedValue = objOC.CveProveedor.ToString
+ If DdlProveedores.SelectedValue.ToEntero > 0 Then
+ DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString
+ Else
+ DdlProveedores.SelectedText = "-"
+ End If
'CARGAMOS LA SUCURSAL SI NO EXISTE SE AGREGA MATRIZ
Dim CveProveedorSucursal As Integer = IIf(objOC.CveProveedorSucursal.ToEntero = -1, 0, objOC.CveProveedorSucursal.ToEntero).ToString.ToEntero
@@ -1330,7 +1335,12 @@ Partial Class OC
lblFolio.Text = "REQ " + objOC.Folio.ToString
lblTipoPadreHijo.Text = "OC"
ChkCotizacion.Visible = True
- DdlProveedores.ddl.SelectedValueExist(objOC.CveProveedor.ToString)
+ DdlProveedores.SelectedValue = objOC.CveProveedor.ToString
+ If DdlProveedores.SelectedValue.ToEntero > 0 Then
+ DdlProveedores.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {objOC.CveProveedor}").Rows(0)("RazonSocial").ToString
+ Else
+ DdlProveedores.SelectedText = "-"
+ End If
If objOC.CveProveedorSucursal.ToEntero > 0 Then
DivProveedorSucursal.Visible = True
@@ -1741,20 +1751,25 @@ Partial Class OC
CboUnidadMedida.DataBind()
End Sub
Private Sub CargaProveedores()
- If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
+ If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
DdlProveedores.setEsWebService(True)
- DdlProveedores.Attributes.Add("metodo", "getproveedores")
+ DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
+ DdlProveedores.SelectedText = "Seleccione"
+ DdlProveedores.SelectedValue = "-1"
+ DdlProveedorCot.setEsWebService(True)
+ DdlProveedorCot.Attributes.Add("data-metodo", "getproveedores")
Else
- GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
+
DdlProveedores.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
DdlProveedores.DataBind()
DdlProveedores.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
- End If
- 'DdlProveedores.Items.Insert(0, New ListItem("Seleccione", "-1"))
- DdlProveedorCot.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
- DdlProveedorCot.DataBind()
- DdlProveedorCot.Items.Insert(0, New ListItem("Seleccione", "-1"))
+ DdlProveedorCot.DataSource = GlobalDTCompProveedores(CveEmpresaActual)
+ DdlProveedorCot.DataBind()
+ DdlProveedorCot.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
+
+ End If
+
UPProv.Update() : UPPEmp.Update()
End Sub
@@ -2105,6 +2120,8 @@ Partial Class OC
Return True
End If
+
+
'SI ES REQUISICION, NO REQUIERE COTIZACION Y ES ESTATUSFINALOK... ENTONCES DEBE DE TENER UN PROVEEDOR SELECCIONADO Y LOS PRECIOS CAPTURADOS
'If (TipoOC = "REQ" And ChkCotizacion.Checked = False And CboE.SelectedValue.ToEntero = CveEstatusFinalOK) OrElse TipoOC = "OC" Then
' If Not UsuarioActual.TienePermisoProceso(179) Then 'PERMISO PARA GENERAR CON O
@@ -2222,6 +2239,13 @@ Partial Class OC
TieneError = True
End If
+ 'Valida que tenga proveedore
+ If (EsNuevo = True AndAlso TipoOC.ToUpper = "OC"4) AndAlso DdlProveedores.SelectedValue.ToEntero() <= 0 Then
+ Alert("Debe seleccionar un proveedor.", TipoMensaje.MsgAdvertencia)
+ TieneError = True
+ End If
+
+
'VALIDA QUE ANTES DE QUE PUEDA MANDARLA A SUPERVISADA SE TIENE QUE SELECCIONAR UN PROVEEDOR
If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
If (TipoOC.ToUpper = "REQ" And CboE.SelectedValue.ToEntero.Contiene(CveEstatusSupervisada, CveEstatusFinalOK)) AndAlso DdlProveedores.SelectedValue.ToEntero() <= 0 Then
@@ -5966,7 +5990,7 @@ Partial Class OC
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
- Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
+ Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
Dim unnamed As Integer = 0
Dim cols As Integer
diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx
index 65c6a5138..950384fe7 100644
--- a/Ventas/Ventas.aspx
+++ b/Ventas/Ventas.aspx
@@ -812,7 +812,7 @@
-
+
Turno:
@@ -3252,11 +3252,8 @@
-
Kilometraje
-
-
-
-
+
Kilometraje
+
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 48155a9b4..f26c4f117 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -2523,7 +2523,8 @@ Partial Class Ventas
DivDdlCuentaTarjetaCredito.Attributes.Add("class", "col-md-4")
DivContadoOtros.Visible = True
TrKilometraje.Visible = True
- TrKilometrajeTxt.Visible = True
+ TrPedido.Visible = False
+ ' TrKilometrajeTxt.Visible = True
End If
End If
@@ -2582,8 +2583,9 @@ Partial Class Ventas
LkbEstadodeCaja.Visible = True
LkbIngreso.Visible = True
LkbRetiro.Visible = True
- UpTurno.Update()
+ UpTurno.Visible = True
Else
+ UpTurno.Visible = False
'Ingresar un nuevo Turno
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
End If
@@ -6464,22 +6466,32 @@ Partial Class Ventas
End If
'Valida si en caso de que el detalle tenga llantas o polizas se agreguén kilometraje/serie en la parte de observaciones(solo para el caso de empresas llanteras)
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
+
+ If txtkilometraje.text.toentero = 0 Then
+ 'cuando es la clasificacion de llantas
+ Dim FaltaObservacion As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion = 20342").ToEntero
+ If FaltaObservacion = 20342 Then
+ Alert("No se ha especificado el kilometraje.", TipoMensaje.MsgAdvertencia)
+ Exit Sub
+ End If
+
+ End If
+
If TxtObsFact.Text = "" Then
Dim FaltaObservacion As Integer = -1
- For Each PS As GridViewRow In GvPS.Rows
- Dim PsRenglon As GridViewRow = PS
- Dim CveClasificacion As Integer = PsRenglon.DataKey("CveClasificacion").ToEntero
- If CveClasificacion = 20345 Or CveClasificacion = 20342 Then
- FaltaObservacion = CveClasificacion
- Exit For
- End If
- Next
+ 'For Each PS As GridViewRow In GvPS.Rows
+ ' Dim PsRenglon As GridViewRow = PS
+ ' Dim CveClasificacion As Integer = PsRenglon.DataKey("CveClasificacion").ToEntero
+ ' If CveClasificacion = 20345 Or CveClasificacion = 20342 Then
+ ' FaltaObservacion = CveClasificacion
+ ' Exit For
+ ' End If
+ '
+ FaltaObservacion = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion = 20345").ToEntero
+ 'cuando es la clasificacion de polizas
If FaltaObservacion = 20345 Then
Alert("No se ha especificado la serie para la poliza en la sección de Observaciones", TipoMensaje.MsgAdvertencia)
Exit Sub
- ElseIf FaltaObservacion = 20342 Then
- Alert("No se ha especificado el kilometraje para la llanta en el sección de Observaciones", TipoMensaje.MsgAdvertencia)
- Exit Sub
End If
End If
End If
@@ -9127,7 +9139,7 @@ Partial Class Ventas
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, CveAcercamientoCRM:=CveAcercamientoCRM,
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
- Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then
+ Kilometraje:=TxtKilometraje.Text.todouble) Then
ErrorList.Add("Ocurrió un error al Generar la Venta. Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
@@ -14278,7 +14290,7 @@ Partial Class Ventas
'AGREGA PS ADICIONAL
- If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso Not UsuarioActual.TienePermisoProceso(284) AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then
+ If UsuarioActual.Empresa.Funcionalidad(561).ToString = "1" AndAlso Not UsuarioActual.TienePermisoProceso(285) AndAlso GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows.Count > 0 AndAlso Not SeActualiza Then
For Each Dr As DataRow In GlobalDTPSAdicionales(CvePS, UsuarioActual.CveEmpresa).Rows
Dim CvePSAdicional As Integer = Dr("CvePSAdicional").ToString.ToEntero
@@ -16410,7 +16422,7 @@ Partial Class Ventas
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero,
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
- OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then
+ OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
OcurrioError = True
End If
@@ -22082,7 +22094,7 @@ Partial Class Ventas
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero, CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero,
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
- TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=If(TrKilometrajeTxt.Visible AndAlso IsNumeric(TxtKilometraje.Text), TxtKilometraje.Text.ToDouble, -1)) Then
+ TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble) Then
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
OcurrioError = True
End If