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

View File

@@ -6117,6 +6117,16 @@ Namespace Modelos
End If End If
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 End If
'CANCELA CONTRATOS 'CANCELA CONTRATOS

View File

@@ -9,6 +9,7 @@ Imports Extensiones
Imports iText.Barcodes.Dmcode Imports iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports Modelos Imports Modelos
Imports Stimulsoft.Base.Context
Partial Class PopUpVerFactura Partial Class PopUpVerFactura
@@ -3372,10 +3373,42 @@ Partial Class PopUpVerFactura
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero
DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}") DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}")
Dim CveVentaConsulta As Integer = DtMovimientos.FiltroPrimeroValor("CveVenta").ToEntero
params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion"))) 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 If CveCliente = 819998 Then
RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc" RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc"
End If End If

View File

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

View File

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

View File

@@ -1446,14 +1446,82 @@
</Border> </Border>
</Style> </Style>
</Tablix> </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> </ReportItems>
<Height>0.88788in</Height> <Height>1.35487in</Height>
<Style /> <Style />
</Body> </Body>
<Width>10.19535in</Width> <Width>10.19535in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>5.15937cm</Height> <Height>4.53319cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage> <PrintOnLastPage>true</PrintOnLastPage>
<ReportItems> <ReportItems>
@@ -1532,7 +1600,7 @@ CIUDAD DE MEXICO</Value>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value> <Value>Teléfono: +52 551 563 3271 Correo:support@smsmedicalsolutions.com</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
@@ -1546,7 +1614,7 @@ CIUDAD DE MEXICO</Value>
<Top>0.63635cm</Top> <Top>0.63635cm</Top>
<Left>7.67902cm</Left> <Left>7.67902cm</Left>
<Height>1.52889cm</Height> <Height>1.52889cm</Height>
<Width>10.41731cm</Width> <Width>11.02585cm</Width>
<ZIndex>2</ZIndex> <ZIndex>2</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -1770,57 +1838,169 @@ CIUDAD DE MEXICO</Value>
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<Textbox Name="Textbox36"> <Textbox Name="Textbox9">
<CanGrow>true</CanGrow> <CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Paragraphs> <Paragraphs>
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=Parameters!Observaciones.Value</Value> <Value>Cliente: </Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>7pt</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>
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>=Parameters!Documentacion.Value</Value> <Value>=Parameters!ClienteCodigo.Value</Value>
<Style> <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> </Style>
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox31</rd:DefaultName> <rd:DefaultName>Textbox7</rd:DefaultName>
<Top>2.27107cm</Top> <Top>2.2681cm</Top>
<Left>0.13678cm</Left> <Left>0.06622cm</Left>
<Height>2.8883cm</Height> <Height>2.12398cm</Height>
<Width>13.15003cm</Width> <Width>20.93288cm</Width>
<ZIndex>9</ZIndex> <ZIndex>9</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -2532,6 +2712,72 @@ CIUDAD DE MEXICO</Value>
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </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> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="Logo"> <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 Set
End Property 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 Private Property TipoEstatus As Integer
Get Get
@@ -320,15 +333,15 @@ Partial Class Inventarios_EntregaAlmacen
End Property End Property
Private Property PedidoBloqueCantidad As Boolean Private Property BloqueCantidad As Boolean
Get Get
If ViewState("PedidoBloqueCantidad") Is Nothing Then If ViewState("BloqueCantidad") Is Nothing Then
ViewState("PedidoBloqueCantidad") = False ViewState("BloqueCantidad") = False
End If End If
Return Boolean.Parse(ViewState("PedidoBloqueCantidad").ToString) Return Boolean.Parse(ViewState("BloqueCantidad").ToString)
End Get End Get
Set(value As Boolean) Set(value As Boolean)
ViewState("PedidoBloqueCantidad") = value ViewState("BloqueCantidad") = value
End Set End Set
End Property End Property
@@ -675,6 +688,7 @@ Partial Class Inventarios_EntregaAlmacen
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString() LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
CveVentaSurtir = CveVenta CveVentaSurtir = CveVenta
CveOSSurtir = CveOS CveOSSurtir = CveOS
CveTipoVenta = drE("CveTipoVenta").ToString().ToEntero
CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).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() CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
CveContrato = drE("CveContrato").ToString().ToEntero() CveContrato = drE("CveContrato").ToString().ToEntero()
@@ -842,14 +856,19 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
ObjInventario.Dispose() ObjInventario.Dispose()
UpGenerales.Update() UpGenerales.Update()
If CveAlmacen <= 0 Then CargaGvDatos()
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 CveAlmacen <= 0 Then CargaGvDatos()
If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped" Then
PedidoBloqueCantidad = True
End If
@@ -1106,7 +1125,7 @@ Partial Class Inventarios_EntregaAlmacen
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro '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 e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
e.Row.FCTextBox("TxtCaducidad").Enabled = True e.Row.FCTextBox("TxtCaducidad").Enabled = True
@@ -1120,7 +1139,7 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(e.Row.DBCampo("AplicaLote")) Then If CBool(e.Row.DBCampo("AplicaLote")) Then
e.Row.FCTextBox("TxtLote").Visible = True e.Row.FCTextBox("TxtLote").Visible = True
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro '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").ReadOnly = False
e.Row.FCTextBox("TxtLote").Enabled = True e.Row.FCTextBox("TxtLote").Enabled = True
Else Else
@@ -1165,7 +1184,7 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCCheckBox("cbInv").Enabled = False e.Row.FCCheckBox("cbInv").Enabled = False
End If End If
If PedidoBloqueCantidad Then If BloqueCantidad Then
e.Row.FCTextBox("TbCantidadF").Enabled = False e.Row.FCTextBox("TbCantidadF").Enabled = False
End If End If
@@ -1839,8 +1858,21 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
ObjVentaInv.Dispose() ObjVentaInv.Dispose()
If TipoEstatus = 5 Or EsDevolucionVenta.Contiene(2, 3) Then Dim VerificaCancelada As Boolean = True
Alert("No se puede surtir esta venta, verifique que no esté cancelada o ya registrado su movimiento en almacen", TipoMensaje.MsgAdvertencia)
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 Exit Sub
End If End If
@@ -2739,10 +2771,12 @@ Partial Class Inventarios_EntregaAlmacen
End If End If
'se registra 'se registra
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then If Not ErrorMovInv Then
ErrorMovInv = True If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
End If ErrorMovInv = True
End If
End If
Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN Else 'REGISTRO LA PREPOLIZA DE COSTO VS ALMACEN - SALIDA ALMACEN
ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError) ErrorMovInv = Not GenerarPrePoliza(ObjInventario, ObjVentas, ObjConta, CveMovimiento, TextoError)
End If 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, 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 End If
Dim BuscarEnTabla As Boolean = False
If UsuarioActual.Empresa.Funcionalidad(715) = "1" Then
BuscarEnTabla = True
End If
Dim ObjInventarios As New ClsInventarios() Dim ObjInventarios As New ClsInventarios()
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), 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, 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) CargaPS(CvePS)
If ObjInventarios.DtResultados.Rows.Count > 0 Then If ObjInventarios.DtResultados.Rows.Count > 0 Then

View File

@@ -180,19 +180,18 @@
<asp:Label ID="LtlFechaFactura" runat="server" ></asp:Label> <asp:Label ID="LtlFechaFactura" runat="server" ></asp:Label>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </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: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="Total" DataField="Total" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" ItemStyle-Width="100px" /> <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="Médico" DataField="Medico" Visible="false" />
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" /> <asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" Visible="false" />
<asp:TemplateField ItemStyle-Width="70px" HeaderText="Acción" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-Width="70px" HeaderText="Acción" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <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="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> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>

View File

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

View File

@@ -190,7 +190,8 @@
<div class="portlet-body"> <div class="portlet-body">
<asp:GridView ID="GvNA" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron Órdenes de Servicio No Asignadas" ClientIDMode="Static" <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" 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> <Columns>
<asp:TemplateField HeaderText=""> <asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>

View File

@@ -498,10 +498,13 @@ Partial Class OS_Asignaciones
Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector) Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector)
TMSelector.Date = FechaCita 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
End If End If
UpOS.Update() UpOS.Update()

View File

@@ -2913,8 +2913,46 @@ Partial Class OS_OrdenesServicios
DdlUsuarioAtendio.DataBind() DdlUsuarioAtendio.DataBind()
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1")) DdlUsuarioAtendio.Items.Insert(0, New ListItem("Sin Asignar", "-1"))
CargaTecnicoDdlUsuarioAtendio()
End Sub 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 Private Sub LnkTecnico_Click(sender As Object, e As EventArgs) Handles LnkTecnico.Click
RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico")) RegistraScript(String.Format("$('#{0}').modal('show');", "DivCambiarTecnico"))
End Sub End Sub

View File

@@ -155,6 +155,11 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </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"> <asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron ordenes de servicio con los filtros especificados" <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.") ClsPaginas.Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}" Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}"
Application(AppNombre) = Nothing Application(AppNombre) = Nothing
RegistraScript($"fncRegargaMedicos({CveMedicoNuevo});") RegistraScript($"fncRegargaMedicos({If(CveMedicoNuevo > 0, CveMedicoNuevo, CveMedico) });")
RegistraScript("$('#BtnCancelarMedico').click();") RegistraScript("$('#BtnCancelarMedico').click();")
End If 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> 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> <label for="<%= TxtProcedimiento.ClientID.ToString()%>">Nombre Procedimiento:</label>
</div> </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> <label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox> <asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox>
</div> </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" %> <%@ 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 Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
<link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" /> <link href="/Metronic/assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.css" rel="stylesheet" />
</asp:Content> </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;"> <div class="modal-dialog" style="min-width: 450px;">
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional"> <asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
@@ -406,9 +424,7 @@
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group form-md-line-input input-iconright"> <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: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>--%>
<label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label> <label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label>
</div> </div>
</div> </div>
@@ -563,8 +579,6 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@@ -576,7 +590,7 @@
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</div> </div>--%>
<div id="DVAgregarEspecialidad" class="modal ADS fade" role="dialog"> <div id="DVAgregarEspecialidad" class="modal ADS fade" role="dialog">
@@ -698,6 +712,12 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script>
function fncRegargaMedicos(CveNuevoMedico) {
$("#HdnCveMedicoNuevo").val(CveNuevoMedico)
$('#BtnRecargaMedicos').click();
}
</script>
</asp:Content> </asp:Content>

View File

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

View File

@@ -153,7 +153,7 @@
<div class="col-md-2"> <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> <asp:DropDownList runat="server" ID="Ddlclasificacion" CssClass="form-control input-sm select2me" DataValueField="CveClasificacion" DataTextField="Clasificacion" Width="90%"></asp:DropDownList>
</div> </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"> <div class="col-md-1">
<asp:TextBox runat="server" ID="TxtCodigo" Width="90%" CssClass="form-control input-sm"></asp:TextBox> <asp:TextBox runat="server" ID="TxtCodigo" Width="90%" CssClass="form-control input-sm"></asp:TextBox>
</div> </div>
@@ -212,7 +212,7 @@
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" SortExpression="OrdenarGV" /> <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="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="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: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="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" /> <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="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="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="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="Compuesto" HeaderText="Compuesto" Visible="false" />
<asp:BoundField DataField="RegistroRSCO" HeaderText="RSCO" Visible="false" /> <asp:BoundField DataField="RegistroRSCO" HeaderText="RSCO" Visible="false" />
</Columns> </Columns>
@@ -314,6 +315,16 @@
<td style="text-align: left;"> <td style="text-align: left;">
<asp:CheckBox ID="ChkRSCO" runat="server" Text="RSCO" /></td> <asp:CheckBox ID="ChkRSCO" runat="server" Text="RSCO" /></td>
</tr> </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> </tbody>
</table> </table>
</div> </div>

View File

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

View File

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

View File

@@ -1566,7 +1566,7 @@ Partial Class Clientes
If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal) If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA ChkNoDesglosaIVA.Checked = Not ObjClientes.NoDesglosaIVA
DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString()) DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString())
ChkCargoUsado.Checked = ObjClientes.CargoUsados ChkCargoUsado.Checked = ObjClientes.CargoUsados
ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado 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(), 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(), 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()), 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 Genero:=GeneroCliente, CveAlmacenAsignado:=DdlAlmacenAsignado.SelectedValue.ToEntero, UsaProductoAlterno:=ChkProductoAlterno.Checked) Then
If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then If Not ObjClientes.LimpiaImpuestosLocales(Me.CveCliente) Then

View File

@@ -102,7 +102,7 @@
<div class="row"> <div class="row">
<div class="form-group form-md-line-input input-iconright col-xs-4"> <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> <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> <i></i>
</div> </div>
<div class="form-group form-md-line-input input-iconright col-xs-4"> <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" LtlNumberParte.Text = "Código CPK"
Else Else
LtlNumberParte.Text = "Número de parte" LtlNumberParte.Text = "Número de Parte"
End If End If
divPrecio.Visible = UsuarioActual.Empresa.Funcionalidad(404) = "" ' si tiene lista de precio, se oculta el precio por ps divPrecio.Visible = UsuarioActual.Empresa.Funcionalidad(404) = "" ' si tiene lista de precio, se oculta el precio por ps
If UsuarioActual.CveEmpresa = 1 Then If UsuarioActual.CveEmpresa = 1 Then

View File

@@ -2687,10 +2687,10 @@
<Columns> <Columns>
<asp:TemplateField HeaderText="Cantidad"> <asp:TemplateField HeaderText="Cantidad">
<ItemTemplate> <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> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField DataField="CodigoPS" HeaderText="Producto ó Servicio" /> <asp:BoundField DataField="CodigoPS" HeaderText="Producto" />
<asp:TemplateField HeaderText="Valor Unitario"> <asp:TemplateField HeaderText="Valor Unitario">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtValorUnitario" runat="server" Width="60px"></asp:TextBox> <asp:TextBox ID="TxtValorUnitario" runat="server" Width="60px"></asp:TextBox>
@@ -8675,16 +8675,20 @@
} }
//FUNCIONES PARA COMERCIO EXTERIOR //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) { 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) { 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) { function LimitaCantidadAplicaDev(Cantidad, TxtCantidadAplicaDevolucion) {

View File

@@ -2602,8 +2602,6 @@ Partial Class Ventas
End If End If
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante 'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
@@ -5663,6 +5661,10 @@ Partial Class Ventas
ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324) ChkConvertirDoctoPesos.Enabled = Not UsuarioActual.TienePermisoProceso(324)
TxtTipoCambio.Enabled = True TxtTipoCambio.Enabled = True
End If End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
TrVistaPrevia.Visible = True
End If
End If End If
'Si es Empresa de Acumuladores 'Si es Empresa de Acumuladores
@@ -11497,7 +11499,7 @@ Partial Class Ventas
End Function 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 If Me.CveVenta > 0 AndAlso NuevaFactura <> 1 Then
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion) ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=EsCancelacion)
@@ -11521,6 +11523,11 @@ Partial Class Ventas
ObjFactura.Moneda = DdlMoneda.SelectedItem.Text ObjFactura.Moneda = DdlMoneda.SelectedItem.Text
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}") ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {DdlMoneda.SelectedValue}")
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.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.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS
@@ -15586,7 +15593,12 @@ Partial Class Ventas
Exit Sub Exit Sub
End If 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 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) 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 CvePrecioListaPS = CvePrecioListaSugerido
End If 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 If CvePrecioListaPS > 0 Then
Dim ObjPS As New ClsProductosServicios Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
@@ -16949,6 +16976,10 @@ Partial Class Ventas
ObjPS.Dispose() ObjPS.Dispose()
End If 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 If PrecioSugerido = 0 Then
Dim ObjInventarios As New ClsInventarios 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) 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 ChkDevAlm.Checked = True
End If End If
'LOS PEDIDOS SE DEBE CANCELAR EN UN PROCESO DISTINTO
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Ped" Then If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso ObjFacturaCancelacion.TipoDocto = "Ped" Then
ChkDevAlm.Checked = True ChkDevAlm.Checked = False
End If End If
resp = ObjFacturaCancelacion.CancelarFactura(ChkDevAlm.Checked, ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion) 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) Dim dRow As DataRow = objVenta.DtResultados.Rows(0)
DdlMedico.SelectedValueExist(dRow("CveMedico").ToString.ToEntero) DdlMedico.SelectedValueExist(dRow("CveMedico").ToString.ToEntero)
DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero) DdlProcedimiento.SelectedValueExist(dRow("CveProcedimiento").ToString.ToEntero)
TxtPaciente.Text = dRow("Paciente").ToString
TxtEpisodio.Text = dRow("Episodio").ToString
SeEstaFActurandoVentaMedica = True SeEstaFActurandoVentaMedica = True
CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero CveTipoVenta = dRow("CveTipoVenta").ToString.ToEntero
ChkRequiereTecnico_CheckedChanged(Nothing, Nothing) ChkRequiereTecnico_CheckedChanged(Nothing, Nothing)
@@ -36704,9 +36738,5 @@ Partial Class Ventas
CargaAnticipos(CveCliente) CargaAnticipos(CveCliente)
End Sub End Sub
End Class End Class