This commit is contained in:
AbrahamCastilloV
2024-01-29 17:47:46 -07:00
27 changed files with 3994 additions and 242 deletions

View File

@@ -2065,7 +2065,7 @@ Public Class ClsInventarios
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1,
Optional ExcluyeTransitorios As Integer = -1, Optional TopSelect As Integer = 10000,
Optional IncluyeProximaLlegada As Boolean = False) As Boolean
Optional IncluyeProximaLlegada As Boolean = False, Optional BuscarEnTabla As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_ExistenciasGet")
@@ -2090,7 +2090,7 @@ Public Class ClsInventarios
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
.Add("@IncluyeProximaLlegada", SqlDbType.Int).Value = IncluyeProximaLlegada
.Add("@TopSelect", SqlDbType.Int).Value = TopSelect
.Add("@BuscarEnTabla", SqlDbType.Bit).Value = BuscarEnTabla
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
End With
Try
@@ -3404,13 +3404,14 @@ Public Class ClsInventarios
' Return Retorno
'End Function
Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer) As Boolean
Public Function ActualizarEsDevolucionVenta(CveVenta As Integer, Valor As Integer, Optional AplicaDevolucionCompleta As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("Vta_UpdateDevolucionVenta")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@Valor", SqlDbType.Int).Value = Valor
.Add("@AplicaDevolucionCompleta", SqlDbType.Bit).Value = AplicaDevolucionCompleta
End With
Try

View File

@@ -6117,6 +6117,16 @@ Namespace Modelos
End If
End If
'EMPRESA HOSPITALARIA - SI ES PEDIDO LA DEVOLUCION SE DEBE HACER DESPUES DE CANCELAR EL PEDIDO
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFactura.TipoDocto = "Ped" Then
If Not RealizarDevolucionAlmacen AndAlso TieneAlmacen Then
If Not ObjInventario.ActualizarEsDevolucionVenta(ObjFactura.CveVenta, 1, AplicaDevolucionCompleta:=True) Then
ErrorCancelar = True
MensajeError = "No se pudo actualizar el estatus de almacen del pedido"
End If
End If
End If
End If
'CANCELA CONTRATOS

View File

@@ -9,6 +9,7 @@ Imports Extensiones
Imports iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms
Imports Modelos
Imports Stimulsoft.Base.Context
Partial Class PopUpVerFactura
@@ -3372,10 +3373,42 @@ Partial Class PopUpVerFactura
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion")))
Dim ObjVentas As New ClsVentas()
If ObjVentas.GetVenta(CveVentaConsulta, UsuarioActual.CveEmpresa, False) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
Dim dtVentas As DataTable = ObjVentas.DtResultados
params.Add(New ReportParameter("ClienteCodigo", dtVentas.Rows(0)("ClienteCodigo").ToString))
params.Add(New ReportParameter("ClienteNombre", dtVentas.Rows(0)("ClienteNombre").ToString))
params.Add(New ReportParameter("ClienteSucursal", dtVentas.Rows(0)("SucursalCliente").ToString))
params.Add(New ReportParameter("ClienteRFC", dtVentas.Rows(0)("ClienteRFC").ToString))
params.Add(New ReportParameter("ClienteCalle", dtVentas.Rows(0)("ClienteDireccion").ToString))
params.Add(New ReportParameter("ClienteNoExt", dtVentas.Rows(0)("ClienteNoExt").ToString))
params.Add(New ReportParameter("ClienteColonia", dtVentas.Rows(0)("ColoniaCliente").ToString))
params.Add(New ReportParameter("ClienteCiudad", dtVentas.Rows(0)("ClienteCiudad").ToString))
params.Add(New ReportParameter("ClienteEstado", dtVentas.Rows(0)("ClienteEstado").ToString))
params.Add(New ReportParameter("ClienteMunicipio", dtVentas.Rows(0)("SucClienteCiudad").ToString))
params.Add(New ReportParameter("ClienteCP", dtVentas.Rows(0)("CPCliente").ToString))
End If
ObjVentas.Dispose()
If CveCliente = 819998 Then
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
End If

View File

@@ -793,7 +793,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo: support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -807,7 +807,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.80781cm</Top>
<Left>4.60107cm</Left>
<Height>1.56146cm</Height>
<Width>10.0923cm</Width>
<Width>11.13886cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>

View File

@@ -648,7 +648,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo: support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -662,7 +662,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.93835cm</Top>
<Left>4.49034cm</Left>
<Height>1.56146cm</Height>
<Width>9.99987cm</Width>
<Width>10.79062cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>

View File

@@ -1446,14 +1446,82 @@
</Border>
</Style>
</Tablix>
<Textbox Name="Textbox36">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Observaciones.Value</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=IIF( LEN(Parameters!Documentacion.Value) &gt; 0, "Proveedor:","")</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Documentacion.Value</Value>
<Style>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>2.0612cm</Top>
<Left>0.10068cm</Left>
<Height>1.27434cm</Height>
<Width>13.15003cm</Width>
<ZIndex>1</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Height>0.88788in</Height>
<Height>1.35487in</Height>
<Style />
</Body>
<Width>10.19535in</Width>
<Page>
<PageHeader>
<Height>5.15937cm</Height>
<Height>4.53319cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1532,7 +1600,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
<Value>Teléfono: +52 551 563 3271 Correo:support@smsmedicalsolutions.com</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
@@ -1546,7 +1614,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.63635cm</Top>
<Left>7.67902cm</Left>
<Height>1.52889cm</Height>
<Width>10.41731cm</Width>
<Width>11.02585cm</Width>
<ZIndex>2</ZIndex>
<Style>
<Border>
@@ -1770,57 +1838,169 @@ CIUDAD DE MEXICO</Value>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Textbox36">
<Textbox Name="Textbox9">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Observaciones.Value</Value>
<Value>Cliente: </Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Proveedor: </Value>
<Style>
<FontWeight>Bold</FontWeight>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!Documentacion.Value</Value>
<Value>=Parameters!ClienteCodigo.Value</Value>
<Style>
<FontWeight>Normal</FontWeight>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> - </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteNombre.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=IIF(LEN(Parameters!ClienteSucursal.Value)&gt; 0,"Sucursal: ","")</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=IIF(LEN(Parameters!ClienteSucursal.Value)&gt;0, Parameters!ClienteSucursal.Value &amp; " ","")</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> RFC: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteRFC.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>
Calle: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCalle.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteNoExt.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>. Colonia: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteColonia.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value> Ciudad: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCiudad.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
Estado: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteEstado.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.
Municipio y/o Delegación: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteMunicipio.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>. CP: </Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!ClienteCP.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
<TextRun>
<Value>.</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>2.27107cm</Top>
<Left>0.13678cm</Left>
<Height>2.8883cm</Height>
<Width>13.15003cm</Width>
<rd:DefaultName>Textbox7</rd:DefaultName>
<Top>2.2681cm</Top>
<Left>0.06622cm</Left>
<Height>2.12398cm</Height>
<Width>20.93288cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
@@ -2532,6 +2712,72 @@ CIUDAD DE MEXICO</Value>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCodigo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteNombre">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteSucursal">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteRFC">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCalle">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteNoExt">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteColonia">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCiudad">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteEstado">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteMunicipio">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="ClienteCP">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="Logo">

File diff suppressed because it is too large Load Diff

View File

@@ -117,6 +117,19 @@ Partial Class Inventarios_EntregaAlmacen
End Set
End Property
Private Property CveTipoVenta As Integer
Get
If ViewState("CveTipoVenta") Is Nothing Then
ViewState("CveTipoVenta") = -1
End If
Return CType(ViewState("CveTipoVenta"), Integer)
End Get
Set(value As Integer)
ViewState("CveTipoVenta") = value
End Set
End Property
Private Property TipoEstatus As Integer
Get
@@ -320,15 +333,15 @@ Partial Class Inventarios_EntregaAlmacen
End Property
Private Property PedidoBloqueCantidad As Boolean
Private Property BloqueCantidad As Boolean
Get
If ViewState("PedidoBloqueCantidad") Is Nothing Then
ViewState("PedidoBloqueCantidad") = False
If ViewState("BloqueCantidad") Is Nothing Then
ViewState("BloqueCantidad") = False
End If
Return Boolean.Parse(ViewState("PedidoBloqueCantidad").ToString)
Return Boolean.Parse(ViewState("BloqueCantidad").ToString)
End Get
Set(value As Boolean)
ViewState("PedidoBloqueCantidad") = value
ViewState("BloqueCantidad") = value
End Set
End Property
@@ -675,6 +688,7 @@ Partial Class Inventarios_EntregaAlmacen
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
CveVentaSurtir = CveVenta
CveOSSurtir = CveOS
CveTipoVenta = drE("CveTipoVenta").ToString().ToEntero
CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
CveContrato = drE("CveContrato").ToString().ToEntero()
@@ -842,14 +856,19 @@ Partial Class Inventarios_EntregaAlmacen
End If
ObjInventario.Dispose()
UpGenerales.Update()
If CveAlmacen <= 0 Then CargaGvDatos()
UpGenerales.Update()
If (EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped") Or (UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso CveTipoVenta <> 3) Then
BloqueCantidad = True
Else
BloqueCantidad = False
End If
If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped" Then
PedidoBloqueCantidad = True
End If
If CveAlmacen <= 0 Then CargaGvDatos()
@@ -1106,7 +1125,7 @@ Partial Class Inventarios_EntregaAlmacen
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) Then
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
e.Row.FCTextBox("TxtCaducidad").Enabled = True
@@ -1120,7 +1139,7 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(e.Row.DBCampo("AplicaLote")) Then
e.Row.FCTextBox("TxtLote").Visible = True
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) Then
If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) OrElse UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
e.Row.FCTextBox("TxtLote").ReadOnly = False
e.Row.FCTextBox("TxtLote").Enabled = True
Else
@@ -1165,7 +1184,7 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCCheckBox("cbInv").Enabled = False
End If
If PedidoBloqueCantidad Then
If BloqueCantidad Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
End If
@@ -1839,8 +1858,21 @@ Partial Class Inventarios_EntregaAlmacen
End If
ObjVentaInv.Dispose()
If TipoEstatus = 5 Or EsDevolucionVenta.Contiene(2, 3) Then
Alert("No se puede surtir esta venta, verifique que no esté cancelada o ya registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia)
Dim VerificaCancelada As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso TipoDocto = "Ped" Then
VerificaCancelada = False
End If
If VerificaCancelada Then
If TipoEstatus = 5 Then
Alert("No se puede surtir esta venta, verifique que no esté cancelada", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
If EsDevolucionVenta.Contiene(2, 3) Then
Alert("No se puede surtir esta venta, verifique que no esté registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
@@ -2739,10 +2771,12 @@ Partial Class Inventarios_EntregaAlmacen
End If
'se registra
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
ErrorMovInv = True
End If
If Not ErrorMovInv Then
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
ErrorMovInv = True
End If
End If
Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN
ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError)
End If

View File

@@ -131,10 +131,15 @@ Partial Class Inventarios_Default
RestringirAlmacenes = 1 'restringue los almacenes:Consignación,Productos Financieros Asignados,,roductos Financieros,Consumo Interno,Activo Fijo,Merma,Consignación de Contrato,Devolucion proveedor,
End If
Dim BuscarEnTabla As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(715) = "1" Then
BuscarEnTabla = True
End If
Dim ObjInventarios As New ClsInventarios()
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero,
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100) Then
ExcluyeTransitorios:=1, RestringirAlmacenes:=RestringirAlmacenes, TopSelect:=100, BuscarEnTabla:=BuscarEnTabla) Then
CargaPS(CvePS)
If ObjInventarios.DtResultados.Rows.Count > 0 Then

View File

@@ -180,19 +180,18 @@
<asp:Label ID="LtlFechaFactura" runat="server" ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="~/Ventas/Clientes.aspx?CveCliente={0}" Target="_blank" HeaderText="Cliente" ControlStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left" DataTextField="Nombre" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" ItemStyle-Width="100px" />
<asp:BoundField HeaderText="Tipo Venta" DataField="TipoVenta" Visible="false" />
<asp:BoundField HeaderText="Médico" DataField="Medico" Visible="false" />
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Acción" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:HyperLink ID="lnkSurtir" NavigateUrl='<%# Eval("CveVenta", "/Inventarios/EntregaAlmacen.aspx?CveVenta={0}") %>' runat="server" CssClass="btn btn-sm blue" Text="Surtir <i class='fa fa-arrow-right' ></i>"></asp:HyperLink>
<asp:HyperLink ID="LnkRecibir" Visible="false" NavigateUrl='<%# Eval("CveVenta", "/Inventarios/EntregaAlmacen.aspx?CveVenta={0}") %>' runat="server" CssClass="btn btn-sm yellow-gold" Text="recibir <i class='fa fa-arrow-left' ></i>"></asp:HyperLink>
<asp:HyperLink ID="LnkRecibir" Visible="false" NavigateUrl='<%# Eval("CveVenta", "/Inventarios/EntregaAlmacen.aspx?CveVenta={0}") %>' runat="server" CssClass="btn btn-sm yellow-gold" Text="Recibir <i class='fa fa-arrow-left' ></i>"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>

View File

@@ -82,8 +82,10 @@ Partial Class RepNotasSinAlmacen
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then ' es empresa hospitalaria
GvVentas.Columns(2).HeaderText = "Fecha Cirugía"
GvVentas.Columns(3).HeaderText = "Hospital"
GvVentas.Columns(5).Visible = False ' subproyecto
GvVentas.Columns(6).Visible = True
GvVentas.Columns(7).Visible = True
GvVentas.Columns(8).Visible = True
TxtFechaF.Text = NowADS.AddDays(3).ToShortDateString
GvVentas.Columns(0).ItemStyle.Width = Unit.Pixel(120)
@@ -310,8 +312,6 @@ Partial Class RepNotasSinAlmacen
CargaDatos()
End If
End Sub
@@ -324,8 +324,6 @@ Partial Class RepNotasSinAlmacen
e.Row.Cells(2).Text = $"{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy")}"
End If
If e.Row.DataKey("EsDevolucionVenta").ToEntero = 1 Then
e.Row.FCHyperLink("lnkSurtir").Visible = False
e.Row.FCHyperLink("LnkRecibir").Visible = True

View File

@@ -190,7 +190,8 @@
<div class="portlet-body">
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" ClientIDMode="Static"
DataKeyNames="CveOSDetalle, CveOS,CveUsuarioAtendio,TipoEstatus,EstatusOrdenServicio,CveSubProyecto,Folio,FechaCita,FechaCitaOS"
CssClass="table table-striped table-hover Widthall table-advance" GridLines="None">
data-sort="true"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="">
<ItemTemplate>

View File

@@ -498,10 +498,13 @@ Partial Class OS_Asignaciones
Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector)
TMSelector.Date = FechaCita
e.Row.Cells(7).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.Ticks.ToString)
e.Row.Cells(8).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.ToString("HHmm"))
End If
End If
UpOS.Update()

View File

@@ -2913,8 +2913,46 @@ Partial Class OS_OrdenesServicios
DdlUsuarioAtendio.DataBind()
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
CargaTecnicoDdlUsuarioAtendio()
End Sub
Private Sub CargaTecnicoDdlUsuarioAtendio()
Dim ObjOS As New ClsOS
Dim DtOSSubProyectos As New DataTable
Dim TecnicosSubProyectos As New DataTable
Dim TecnicosResultado As New DataTable
If ObjOS.GetOrdenesServiciosNoAsignadas(-1, DdlSubProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
DtOSSubProyectos = ObjOS.DtResultados.FiltraParametros("", "", {"CveSubProyecto", "SubProyecto"})
End If
If DtOSSubProyectos IsNot Nothing Then
If ObjOS.GetSubProyectosEstatusInicial(-1, 3, UsuarioActual.CveEmpresa) Then
TecnicosSubProyectos = ObjOS.DtResultados
End If
For Each SubProyecto As DataRow In DtOSSubProyectos.Rows
Dim TecnicosSubProyectoAux As DataTable = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}'", SubProyecto.Item("SubProyecto")))
If TecnicosSubProyectoAux.Rows.Count > 0 Then
Dim EstatusDeTipoProcesoMenor As Integer = TecnicosSubProyectoAux.Rows(0).Item("CveEstatusOrdenServicio").ToString.ToEntero
Dim dtAuxiliar As New DataTable
dtAuxiliar = TecnicosSubProyectos.FiltraParametros(String.Format("SubProyecto = '{0}' AND CveEstatusOrdenServicio = {1}", SubProyecto.Item("SubProyecto"), EstatusDeTipoProcesoMenor), "", {"CveUsuario", "Nombre"})
TecnicosResultado.Merge(dtAuxiliar)
End If
Next
End If
ObjOS.Dispose()
DdlUsuarioAtendio.DataSource = TecnicosResultado
DdlUsuarioAtendio.DataBind()
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
End Sub
Private Sub LnkTecnico_Click(sender As Object, e As EventArgs) Handles LnkTecnico.Click
RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico"))
End Sub

View File

@@ -155,6 +155,11 @@
</ContentTemplate>
</asp:UpdatePanel>
<div class="" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron ordenes de servicio con los filtros especificados"

View File

@@ -175,7 +175,7 @@ Partial Class UserControl_AddMedico
ClsPaginas.Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}"
Application(AppNombre) = Nothing
RegistraScript($"fncRegargaMedicos({CveMedicoNuevo});")
RegistraScript($"fncRegargaMedicos({If(CveMedicoNuevo > 0, CveMedicoNuevo, CveMedico) });")
RegistraScript("$('#BtnCancelarMedico').click();")
End If

View File

@@ -17,7 +17,7 @@
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'Nombre del Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarProcedimiento"></asp:RequiredFieldValidator>
<label for="<%= TxtProcedimiento.ClientID.ToString()%>">Nombre Procedimiento:</label>
</div>
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server" visible="false">
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox>
</div>

View File

@@ -1,5 +1,7 @@
<%@ Page Title="Catálogo de Médicos" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="CatMedicos.aspx.vb" Inherits="Ventas_CatMedicos" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
</asp:Content>
@@ -380,9 +382,25 @@
<div id="DvModalAddMedico" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content" style="max-width:600px!important;max-height:505px!important">
<%--<UserControl:AddMedico runat="server" ID="AddMedicoControl" />--%>
<UserControl:AddMedico runat="server" ID="AddMedicoControl" />
</div>
<asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" />
<asp:HiddenField ID="HdnCveMedicoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
<%--<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
<div class="modal-dialog" style="min-width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate>
@@ -406,9 +424,7 @@
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtCedulaProfecional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<%--<asp:RequiredFieldValidator ID="RfvTxtCedulaProfecional" runat="server" ControlToValidate="TxtCedulaProfecional" CssClass="help-block errorimput"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cédula Profecional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>--%>
<asp:TextBox ID="TxtCedulaProfecional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
<label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label>
</div>
</div>
@@ -563,8 +579,6 @@
</div>
</div>
</div>
</div>
</div>
@@ -576,7 +590,7 @@
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>--%>
<div id="DVAgregarEspecialidad" class="modal ADS fade" role="dialog">
@@ -698,6 +712,12 @@
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function fncRegargaMedicos(CveNuevoMedico) {
$("#HdnCveMedicoNuevo").val(CveNuevoMedico)
$('#BtnRecargaMedicos').click();
}
</script>
</asp:Content>

View File

@@ -51,20 +51,16 @@ Partial Class Ventas_CatMedicos
If Not Page.IsPostBack Then
If Request("EsFrame") IsNot Nothing AndAlso Request("EsFrame").ToEntero = 1 Then
EsFrame = True
End If
CargaCombos()
CargaEspecialidad()
CargaSubEspecialidad(-1)
'CargaEspecialidad()
'CargaSubEspecialidad(-1)
CargaDatos()
BtnConsultar_Click(Nothing, Nothing)
If EsFrame Then
LnkAgregarMedico_Click(Nothing, Nothing)
Else
CargaDatos()
BtnConsultar_Click(Nothing, Nothing)
End If
End If
@@ -95,41 +91,41 @@ Partial Class Ventas_CatMedicos
End Sub
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
'Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
Dim ProcesoOK = False
Dim ObjVentas As New ClsVentas
' Dim ProcesoOK = False
' Dim ObjVentas As New ClsVentas
Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
' Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
' Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
If CveMedico > 0 Then
If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked,
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
ProcesoOK = True
End If
Else
If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) > 0 Then
ProcesoOK = True
End If
End If
' If CveMedico > 0 Then
' If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked,
' UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
' ProcesoOK = True
' End If
' Else
' If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario,
' UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) > 0 Then
' ProcesoOK = True
' End If
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
If ProcesoOK Then
Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
RegistraScript("$('#DVAgregarMedico').modal('hide');")
CargaDatos()
CargaGlobal()
UpDatos.Update()
End If
' If ProcesoOK Then
' Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
' RegistraScript("$('#DVAgregarMedico').modal('hide');")
' CargaDatos()
' CargaGlobal()
' UpDatos.Update()
' End If
End Sub
'End Sub
#Region "G V D A T O S"
@@ -171,36 +167,10 @@ Partial Class Ventas_CatMedicos
Public Sub LnkAgregarMedico_Click(sender As Object, e As EventArgs)
LbAgregar.Text = "Agregar"
LtlTituloModal.Text = "Agregar Médico"
TxtMedico.Text = ""
TxtCedulaProfecional.Text = ""
TxtFechaNacimiento.Text = ""
TxtNotas.Text = ""
TxtDiasAtencion.Text = ""
TxtHorario.Text = ""
TxtLugar.Text = ""
TxtConsultorio.Text = ""
TxtMail.Text = ""
TxtTelefono.Text = ""
TxtCelular.Text = ""
DdlEspecialidad.SelectedValueExist(-1)
DdlSubEspecialidad.SelectedValueExist(-1)
TxtTorre.Text = ""
DVUsuarioFechaIng.Visible = False
TxtFechaIng.Text = ""
TxtUsuario.Text = ""
DVEstatus.Visible = False
ChkEstatus.Checked = True
UpModal.Update()
CveMedico = -1
RegistraScript("$('#DVAgregarMedico').modal();")
AddMedicoControl.CveMedico = -1
AddMedicoControl.LimpiarControles()
UpModalAddMedico.Update()
RegistraScript("$('#DvModalAddMedico').modal();")
End Sub
Public Sub Edit_Click(sender As Object, e As EventArgs)
@@ -209,34 +179,41 @@ Partial Class Ventas_CatMedicos
CveMedico = GvRow.DataKey("CveMedico").ToEntero
TxtMedico.Text = GvRow.DataKey("Medico")
TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
TxtNotas.Text = GvRow.DataKey("Notas")
TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
TxtHorario.Text = GvRow.DataKey("Horario")
TxtLugar.Text = GvRow.DataKey("Lugar")
TxtConsultorio.Text = GvRow.DataKey("Consultorio")
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
TxtMail.Text = GvRow.DataKey("Mail")
TxtTelefono.Text = GvRow.DataKey("Telefono")
TxtCelular.Text = GvRow.DataKey("Celular")
DdlEspecialidad.SelectedValueExist(-1)
DdlEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
CargaSubEspecialidad(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
TxtTorre.Text = GvRow.DataKey("Torre")
AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Medico"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"), GvRow.DataKey("DiasAtencion"),
GvRow.DataKey("Horario"), GvRow.DataKey("Lugar"), GvRow.DataKey("Consultorio"), Boolean.Parse(GvRow.DataKey("Estatus")), GvRow.DataKey("Mail"), GvRow.DataKey("Telefono"),
GvRow.DataKey("Celular"), GvRow.DataKey("CveMedicoEspecialidad").ToEntero, GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero, GvRow.DataKey("Torre"),
GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"))
DVUsuarioFechaIng.Visible = True
TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
TxtUsuario.Text = GvRow.DataKey("Usuario")
DVEstatus.Visible = True
LbAgregar.Text = "Actualizar"
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
'TxtMedico.Text = GvRow.DataKey("Medico")
'TxtCedulaProfecional.Text = GvRow.DataKey("CedulaProfesional")
'TxtFechaNacimiento.Text = GvRow.DataKey("FechaNacimiento").ToDate().ToString("dd/MM/yyyy")
'TxtNotas.Text = GvRow.DataKey("Notas")
'TxtDiasAtencion.Text = GvRow.DataKey("DiasAtencion")
'TxtHorario.Text = GvRow.DataKey("Horario")
'TxtLugar.Text = GvRow.DataKey("Lugar")
'TxtConsultorio.Text = GvRow.DataKey("Consultorio")
'ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
'TxtMail.Text = GvRow.DataKey("Mail")
'TxtTelefono.Text = GvRow.DataKey("Telefono")
'TxtCelular.Text = GvRow.DataKey("Celular")
'DdlEspecialidad.SelectedValueExist(-1)
'DdlEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
'CargaSubEspecialidad(GvRow.DataKey("CveMedicoEspecialidad").ToEntero)
'DdlSubEspecialidad.SelectedValueExist(GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero)
'TxtTorre.Text = GvRow.DataKey("Torre")
UpModal.Update()
RegistraScript("$('#DVAgregarMedico').modal();")
'DVUsuarioFechaIng.Visible = True
'TxtFechaIng.Text = GvRow.DataKey("FechaIng").ToDateTime.ToString("dd/MM/yyyy hh:mm:ss tt")
'TxtUsuario.Text = GvRow.DataKey("Usuario")
'DVEstatus.Visible = True
'LbAgregar.Text = "Actualizar"
'LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
'UpModal.Update()
UpModalAddMedico.Update()
RegistraScript("$('#DvModalAddMedico').modal();")
End Sub
@@ -402,7 +379,7 @@ Partial Class Ventas_CatMedicos
ObjVentas.Dispose()
If ProcesoOK Then
CargaEspecialidad()
'CargaEspecialidad()
Alert($"Especialidad {If(CveMedicoEspecialidad > 0, "actualizada", "agregada")} correctamente.")
RegistraScript("$('#DVAgregarEspecialidad').modal('hide');")
End If
@@ -415,47 +392,47 @@ Partial Class Ventas_CatMedicos
UpModalEspecialidad.Update()
End Sub
Sub CargaEspecialidad()
Dim ObjVentas As New ClsVentas
'Sub CargaEspecialidad()
' Dim ObjVentas As New ClsVentas
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
'GvEspecialidad.DataSource = ObjVentas.DtResultados
DdlEspecialidad.DataSource = ObjVentas.DtResultados
Else
'GvEspecialidad.DataSource = Nothing
End If
' If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
' 'GvEspecialidad.DataSource = ObjVentas.DtResultados
' DdlEspecialidad.DataSource = ObjVentas.DtResultados
' Else
' 'GvEspecialidad.DataSource = Nothing
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
'GvEspecialidad.DataBind()
' 'GvEspecialidad.DataBind()
DdlEspecialidad.DataBind()
DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
' DdlEspecialidad.DataBind()
' DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
UpModal.Update()
'UpEspecialidad.Update()
' UpModal.Update()
' 'UpEspecialidad.Update()
End Sub
'End Sub
Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
Dim ObjVentas As New ClsVentas
'Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
' Dim ObjVentas As New ClsVentas
If ObjVentas.GetMedicosSubEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
If CveMedicoEspecialidad > 0 Then
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveMedicoEspecialidad = {CveMedicoEspecialidad}")
Else
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados
End If
End If
' If ObjVentas.GetMedicosSubEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
' If CveMedicoEspecialidad > 0 Then
' DdlSubEspecialidad.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveMedicoEspecialidad = {CveMedicoEspecialidad}")
' Else
' DdlSubEspecialidad.DataSource = ObjVentas.DtResultados
' End If
' End If
ObjVentas.Dispose()
' ObjVentas.Dispose()
DdlSubEspecialidad.DataBind()
DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
UpModal.Update()
' DdlSubEspecialidad.DataBind()
' DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
' UpModal.Update()
End Sub
'End Sub
Protected Sub LnkEditarEspecialidad_Click(sender As Object, e As EventArgs)
@@ -491,7 +468,7 @@ Partial Class Ventas_CatMedicos
ObjVentas.Dispose()
If ProcesoOK Then
CargaEspecialidad()
'CargaEspecialidad()
Alert("Especialidad eliminada correctamente")
End If
@@ -502,14 +479,14 @@ Partial Class Ventas_CatMedicos
Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
'Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
' CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
'End Sub
Protected Sub BtnRecargaMedicos_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
End Class

View File

@@ -153,7 +153,7 @@
<div class="col-md-2">
<asp:DropDownList runat="server" ID="Ddlclasificacion" CssClass="form-control input-sm select2me" DataValueField="CveClasificacion" DataTextField="Clasificacion" Width="90%"></asp:DropDownList>
</div>
<div class="col-md-1 " >Número de Parte / Código:</div>
<div class="col-md-1" >Código:</div>
<div class="col-md-1">
<asp:TextBox runat="server" ID="TxtCodigo" Width="90%" CssClass="form-control input-sm"></asp:TextBox>
</div>
@@ -212,7 +212,7 @@
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" SortExpression="OrdenarGV" />
<asp:BoundField DataField="TipoPS" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
<asp:BoundField DataField="UnidadMedida" HeaderText="U.M." ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="Codigo" HeaderText="Número de Parte / Código:" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:HyperLinkField ItemStyle-CssClass="Izquierda Texto" HeaderText="Producto o Servicio" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" DataTextField="PS" DataNavigateUrlFields="CvePS" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="30%" />
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
<asp:BoundField DataField="AplicaParaVenta" HeaderText="Aplica Para Venta" Visible="false" ItemStyle-Width="20px" />
@@ -229,6 +229,7 @@
<asp:BoundField DataField="Marca" HeaderText="Marca" Visible="false" ItemStyle-Width="20px" />
<asp:BoundField DataField="VentaMinima" HeaderText="Venta Mínima" Visible="false" ItemStyle-Width="20px" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
<asp:BoundField DataField="CodigoBarras" HeaderText="Código Barras" Visible="false" />
<asp:BoundField DataField="NumeroParte" HeaderText="Número de Parte" Visible="false" />
<asp:BoundField DataField="Compuesto" HeaderText="Compuesto" Visible="false" />
<asp:BoundField DataField="RegistroRSCO" HeaderText="RSCO" Visible="false" />
</Columns>
@@ -314,6 +315,16 @@
<td style="text-align: left;">
<asp:CheckBox ID="ChkRSCO" runat="server" Text="RSCO" /></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkNumParte" runat="server" Text="Número Parte" /></td>
<td style="text-align: left;">
</td>
<td style="text-align: left;">
</td>
<td style="text-align: left;">
</td>
</tr>
</tbody>
</table>
</div>

View File

@@ -123,8 +123,9 @@ Partial Class CatPS
GvDatos.Columns(12).Visible = ChkMarca.Checked
GvDatos.Columns(13).Visible = ChkVentaMinima.Checked
GvDatos.Columns(14).Visible = ChkCodigoBarras.Checked
GvDatos.Columns(15).Visible = ChkCompuesto.Checked
GvDatos.Columns(16).Visible = ChkRSCO.Checked
GvDatos.Columns(15).Visible = ChkNumParte.Checked
GvDatos.Columns(16).Visible = ChkCompuesto.Checked
GvDatos.Columns(17).Visible = ChkRSCO.Checked
If ChkAplicaVenta.Checked OrElse
ChkProductosServiciosSAT.Checked OrElse

View File

@@ -1179,7 +1179,7 @@
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input" id="DivNoDesglosaIVA" runat="server">
El cliente No desglosa IVA:
El cliente desglosa IVA:
<asp:CheckBox ID="ChkNoDesglosaIVA" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
</div>
</div>

View File

@@ -1566,7 +1566,7 @@ Partial Class Clientes
If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA
ChkNoDesglosaIVA.Checked = Not ObjClientes.NoDesglosaIVA
DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString())
ChkCargoUsado.Checked = ObjClientes.CargoUsados
ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado
@@ -2642,7 +2642,7 @@ Partial Class Clientes
ApellidoPaternoPF:=IIf(TxtApellidoPaterno.Text = "", "-1", TxtApellidoPaterno.Text).ToString(), ApellidoMaternoPF:=IIf(TxtApellidoMaterno.Text = "", "-1", TxtApellidoMaterno.Text).ToString(), NombresPF:=IIf(TxtNombres.Text = "", "-1", TxtNombres.Text).ToString(),
RequiereOC:=ChkRequiereOC.Checked, LT:=LT, LG:=LG, EsDistribuidor:=ChkEsDistribuidor.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero(), CargoUsado:=ChkCargoUsado.Checked, BonificacionUsado:=ChkBonificacionUsado.Checked, CveTipoRetencion:=DdlTipoRetencion.SelectedValue.ToEntero(), CorreoEntregaCompras:=TxtCorreoEntregaCompras.Text, CorreoEntregaAlmacen:=TxtCorreoEntregaAlmacen.Text, CveSATEstado:=DdlEstadoSAT.SelectedValue.ToEntero(),
CveAdminTrayecto:=If(DdlAdminTrayecto.SelectedValue.ToEntero() <= 0, 0, DdlAdminTrayecto.SelectedValue.ToEntero()),
NoDesglosaIVA:=ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
NoDesglosaIVA:=Not ChkNoDesglosaIVA.Checked, CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, RepresentanteLegal:=TxtRepresentanteLegal.Text, ComExtCalle:=TxtComExtCalle.Text.Trim(), ComExtNumExt:=TxtComExtNumero.Text.Trim(), ComExtCP:=TxtComExtCP.Text.Trim(), FechaLimiteCredito:=FechaLimiteCredito,
Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked) Then
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then

View File

@@ -102,7 +102,7 @@
<div class="row">
<div class="form-group form-md-line-input input-iconright col-xs-4">
<asp:TextBox ID="TxtCodigo" CssClass="form-control " runat="server" MaxLength="50"></asp:TextBox>
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Número de Parte / Código:</label>
<label class="truncate" style="padding-left: 16px;" for="<%= TxtCodigo.ClientID.ToString()%>">Código:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-4">

View File

@@ -383,11 +383,9 @@ Partial Class ProductosyServicios
LtlNumberParte.Text = "Código CPK"
Else
LtlNumberParte.Text = "Número de parte"
LtlNumberParte.Text = "Número de Parte"
End If
divPrecio.Visible = UsuarioActual.Empresa.Funcionalidad(404) = "" ' si tiene lista de precio, se oculta el precio por ps
If UsuarioActual.CveEmpresa = 1 Then

View File

@@ -2687,10 +2687,10 @@
<Columns>
<asp:TemplateField HeaderText="Cantidad">
<ItemTemplate>
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadConversion", "{0:#,##0.##}") %>' Width="50px"></asp:TextBox>
<asp:TextBox ID="TxtCantidad" runat="server" Text='<%# Eval("CantidadConversion", "{0:#,##0.##}") %>' Width="60px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="CodigoPS" HeaderText="Producto ó Servicio" />
<asp:BoundField DataField="CodigoPS" HeaderText="Producto" />
<asp:TemplateField HeaderText="Valor Unitario">
<ItemTemplate>
<asp:TextBox ID="TxtValorUnitario" runat="server" Width="60px"></asp:TextBox>
@@ -8675,16 +8675,20 @@
}
//FUNCIONES PARA COMERCIO EXTERIOR
function CalculaTotalUSD(TotalUSD, ValorUnitario, TxtCantidad) {
TotalUSD.innerText = FormatoNumero(ToDouble(ValorUnitario.value) * ToDouble(TxtCantidad.value), 2);
}
function CalculaPU_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
TxtValorUnitario.value = FormatoNumero(ToDouble(TotalUSD) / ToDouble(TxtCantidad.value), 6);
if(ToDouble(TxtCantidad.value) > 0){
TxtValorUnitario.value = ((ToDouble(TotalUSD) / ToDouble(TxtCantidad.value)).toFixed(6)).toString();
}else{
TxtValorUnitario.value = "0";
}
}
function CalculaCantidad_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
TxtCantidad.value = FormatoNumero(ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value), 6);
if (ToDouble(TxtValorUnitario.value) > 0) {
TxtCantidad.value = ((ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value)).toFixed(6)).toString();
}else{
TxtCantidad.value = "0";
}
}
function LimitaCantidadAplicaDev(Cantidad, TxtCantidadAplicaDevolucion) {

View File

@@ -2602,8 +2602,6 @@ Partial Class Ventas
End If
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
@@ -5663,6 +5661,10 @@ Partial Class Ventas
ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
TxtTipoCambio.Enabled = True
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
TrVistaPrevia.Visible = True
End If
End If
'Si es Empresa de Acumuladores
@@ -11497,7 +11499,7 @@ Partial Class Ventas
End Function
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False, Optional TipoDoctoViejo As String = "")
Private Sub CreaObjetosVenta(Optional VistaPrevia As Boolean = False, Optional EsCancelacion As Boolean = False, Optional TipoDoctoViejo As String = "", Optional TipoDoctoVistaPrevia As String = "")
If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
@@ -11521,6 +11523,11 @@ Partial Class Ventas
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
If VistaPrevia AndAlso Not String.IsNullOrEmpty(TipoDoctoVistaPrevia) Then
ObjFactura.TipoDocto = TipoDoctoVistaPrevia
End If
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS
@@ -15586,7 +15593,12 @@ Partial Class Ventas
Exit Sub
End If
CreaObjetosVenta(True)
Dim TipoDoctoVistaPrevia As String = ""
If CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso BtnsFacturar.Visible = True Then
TipoDoctoVistaPrevia = "Ing"
End If
CreaObjetosVenta(True, TipoDoctoVistaPrevia:=TipoDoctoVistaPrevia)
If ObjFactura Is Nothing Or (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then
Alert("Ocurrió un error al procesar los datos para la vista previa. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgError)
@@ -16940,6 +16952,21 @@ Partial Class Ventas
CvePrecioListaPS = CvePrecioListaSugerido
End If
Dim CvePrecioListaPredeterminada = -1
Dim AplicaPredeterminado As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso RBLTipoVenta.SelectedValue = "2" Then
AplicaPredeterminado = True
CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero()
If CvePrecioListaPredeterminada > 0 Then
CvePrecioListaPS = CvePrecioListaPredeterminada
End If
End If
If AplicaPredeterminado AndAlso CvePrecioListaPredeterminada <= 0 Then
Alert("No hay una lista de precios predeterminada", TipoMensaje.MsgAdvertencia)
End If
If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
@@ -16949,6 +16976,10 @@ Partial Class Ventas
ObjPS.Dispose()
End If
If AplicaPredeterminado AndAlso PrecioSugerido <= 0 Then
Alert("El producto y/o servicio no tiene asignado un valor en la lista de precios predeterminada", TipoMensaje.MsgAdvertencia)
End If
If PrecioSugerido = 0 Then
Dim ObjInventarios As New ClsInventarios
Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDecimal, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
@@ -24469,8 +24500,9 @@ Partial Class Ventas
ChkDevAlm.Checked = True
End If
'LOS PEDIDOS SE DEBE CANCELAR EN UN PROCESO DISTINTO
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Ped" Then
ChkDevAlm.Checked = True
ChkDevAlm.Checked = False
End If
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
@@ -36088,6 +36120,8 @@ Partial Class Ventas
Dim dRow As DataRow = objVenta.DtResultados.Rows(0)
DdlMedico.SelectedValueExist(dRow("CveMedico").ToString.ToEntero)
DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero)
TxtPaciente.Text = dRow("Paciente").ToString
TxtEpisodio.Text = dRow("Episodio").ToString
SeEstaFActurandoVentaMedica = True
CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero
ChkRequiereTecnico_CheckedChanged(Nothing, Nothing)
@@ -36704,9 +36738,5 @@ Partial Class Ventas
CargaAnticipos(CveCliente)
End Sub
End Class