This commit is contained in:
AbrahamCastilloV
2024-01-12 10:13:36 -07:00
37 changed files with 1675 additions and 865 deletions

View File

@@ -3548,12 +3548,21 @@ Public Class ClsPaginas
End Property
Property GlobalDTAC_PD_Programas(CveEjeRector As Integer) As DataTable
Get
Dim CveEmpresa As Integer = 48
Dim AppNombre As String = $"GlobalDTAC_PD_Programas-{CveEmpresa}"
'sino existe, recarga los datos
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Using ObjAC As New ClsAC
If ObjAC.GetClasificacionAdministrativa(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjAC.DtResultados
End Using
End If
GlobalDTAC_PD_Programas = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
If CveEjeRector <> -1 Then
Dim Dv As New DataView(DirectCast(Application("GlobalDTAC_PD_Programas"), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows)
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEjeRector = {0}", CveEjeRector), "", DataViewRowState.CurrentRows)
GlobalDTAC_PD_Programas = Dv.ToTable
Dv.Dispose()
Else
GlobalDTAC_PD_Programas = DirectCast(Application("GlobalDTAC_PD_Programas"), DataTable)
GlobalDTAC_PD_Programas = DirectCast(Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
@@ -5454,7 +5463,7 @@ Public Class ClsPaginas
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText
Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
Vta.FechaTimbrado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText
Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText
End If
@@ -5573,7 +5582,7 @@ Public Class ClsPaginas
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then
Vta.FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText
Vta.NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("noCertificadoSAT").InnerText
Vta.FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
Vta.FechaTimbrado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText.ToDate
Vta.SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloCFD").InnerText
Vta.SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("selloSAT").InnerText
End If
@@ -5651,7 +5660,7 @@ Public Class ClsPaginas
'ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme.Replace("https", "http"), Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)
'Dim CadenaOriginals As String = "||1.0|" + Vta.FolioFiscal + "|" + Vta.FechaCertificacion.ToString("yyyy-MM-dd") + "T" + Vta.FechaCertificacion.ToString("HH:mm:ss") + "|" + Vta.SelloCFDi + "|" + Vta.NoSerieCertificado + "||"
Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version.Contiene("3.3", "4.0"), "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
Dim CadenaOriginals As String = String.Format("||{0}|{1}|{2}T{3}|{4}|{5}||", If(Vta.Version.Contiene("3.3", "4.0"), "1.1", "1.0"), Vta.FolioFiscal, Vta.FechaTimbrado.ToString("yyyy-MM-dd"), Vta.FechaTimbrado.ToString("HH:mm:ss"), Vta.SelloCFDi, Vta.NoSerieCertificado)
If Not ImagenCBB.Exists Then ImgCBB = ""
Dim RutaFormato As String = ""
Dim RutaFormatoDefault As String = ""
@@ -5717,7 +5726,7 @@ Public Class ClsPaginas
params.Add(New ReportParameter("DomicilioSucursal", DomicilioSucursal))
params.Add(New ReportParameter("Vencimiento", Vta.FechaVencimiento.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("FolioFiscal", Vta.FolioFiscal))
params.Add(New ReportParameter("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaCertificacion.ToString("yyyy-MM-dd"), Vta.FechaCertificacion.ToString("HH:mm:ss"))))
params.Add(New ReportParameter("FechaCertificacion", String.Format("{0}T{1}", Vta.FechaTimbrado.ToString("yyyy-MM-dd"), Vta.FechaTimbrado.ToString("HH:mm:ss"))))
params.Add(New ReportParameter("SelloCFDI", Vta.SelloCFDi))
params.Add(New ReportParameter("CadenaSAT", CadenaOriginals))
params.Add(New ReportParameter("SelloSAT", Vta.SelloSAT))

View File

@@ -1908,9 +1908,22 @@ Public Class ClsRH
End Try
Return Retorno
End Function
Public Function PA_RH_PersonalSalarioMenorAlMinimo(cveEmpresa As Int32, calculaSalarioV As Boolean, guardar As Boolean, cveRegistroPatronal As Int32, salarioZonaA As Decimal, salarioZonaB As Decimal, salarioZonaC As Decimal, fecha As DateTime) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_RH_PersonalSalarioMenorAlMinimo", CommandType.StoredProcedure)
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
addParameters("@CalculaSalarioV", SqlDbType.Bit, calculaSalarioV)
addParameters("@Guardar", SqlDbType.Bit, guardar)
addParameters("@CveRegistroPatronal", SqlDbType.Int, cveRegistroPatronal)
addParameters("@SalarioZonaA", SqlDbType.Money, salarioZonaA)
addParameters("@SalarioZonaB", SqlDbType.Money, salarioZonaB)
addParameters("@SalarioZonaC", SqlDbType.Money, salarioZonaC)
addParameters("@Fecha", SqlDbType.Date, fecha)
retorno = RunQuery("Ocurrió un error al obtener el personal con salario menor al minimo.")
Return retorno
End Function
Public Function GetPersonalMasivo(CveTurno As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveSupervisor As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1) As Boolean
Dim Retorno As Boolean = False
'Data = New DataTable
@@ -1947,7 +1960,7 @@ Public Class ClsRH
NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String,
CveJornada As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Beneficiario As String, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1,
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1,
Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1) As Boolean
Optional Pensionado As Boolean = False, Optional CveMedioTransporte As Integer = -1, Optional CveRegistroPatronal As Integer = -1, Optional CveEmpresaAsignado As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1, Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "A") As Boolean
Dim Retorno As Boolean = False
Dim noguardoXcurp As Boolean = False
@@ -2036,6 +2049,7 @@ Public Class ClsRH
.Add("@CveTipoTrabajador", SqlDbType.Int).Value = CveTipoTrabajador
.Add("@NetoPeriodo", SqlDbType.Money).Value = NetoPeriodo
.Add("@TipoSangre", SqlDbType.VarChar).Value = TipoSangre
.Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
@@ -2079,7 +2093,7 @@ Public Class ClsRH
Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1,
Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1, Optional Pensionado As Boolean = False, Optional CveRegistroPatronal As Integer = -1,
Optional CveEmpresaAsignado As Integer = -1, Optional CveMedioTransporte As Integer = -1, Optional EsReserva As Integer = -1, Optional Fiscalizable As Integer = -1, Optional CveTipoTrabajador As Integer = -1, Optional NetoPeriodo As Decimal = -1,
Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1) As Boolean
Optional TipoSangre As String = "-1", Optional CveSubTipoPeriodo As Integer = -1, Optional AreaGeografica As String = "") As Boolean
Dim Retorno As Boolean = False
@@ -2174,6 +2188,8 @@ Public Class ClsRH
.Add("@CveTipoTrabajador", SqlDbType.Int).Value = CveTipoTrabajador
.Add("@NetoPeriodo", SqlDbType.Money).Value = NetoPeriodo
.Add("@TipoSangre", SqlDbType.VarChar).Value = TipoSangre
.Add("@AreaGeografica", SqlDbType.VarChar).Value = AreaGeografica
.Add("@CveSubTipoPeriodo", SqlDbType.Int).Value = CveSubTipoPeriodo
End With

View File

@@ -129,26 +129,6 @@ Public Class ClsRutas
GC.SuppressFinalize(Me)
End Sub
#End Region
Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Trans_RutasGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
End Class

View File

@@ -339,6 +339,30 @@ Public Class ClsTransportes
End Function
#End Region
#Region "Rutas"
Public Function GetRutas(CveRuta As Integer, CveUsuario As Integer, CveEmpresa As Integer, Ruta As String, Estatus As Boolean, FechaIng As DateTime) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Trans_RutasGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@Ruta", SqlDbType.VarChar).Value = Ruta
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener las rutas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
#End Region
#Region "Tarifas"
Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean
Dim Retorno As Boolean = False

View File

@@ -424,7 +424,7 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Double, Descuento As Double, Amortizacion As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Double,
Public Function AddVenta(TipoDocto As String, FolioFact As Integer, CveCliente As Integer, CveClienteSucursal As Integer, SubTotal As Decimal, Descuento As Decimal, Amortizacion As Decimal, IVA As Decimal, RetIVA As Decimal, RetISR As Decimal, Total As Decimal,
CveMoneda As Integer, TipoCambio As Double, CveMetodoPago As Integer, CondicionesPago As Integer, FormaPago As Integer, FechaVencimiento As DateTime, Fecha As DateTime, MotivoDescuento As String, Observaciones As String, FechaEjecucion As DateTime,
CveVendedor As Integer, Alfa1 As String, Alfa2 As String, Alfa3 As String, Num1 As Double, Num2 As Double, Num3 As Double,
Fech1 As Date, Fech2 As Date, Fech3 As Date, CveCorte As Integer, NumeroPersonas As Integer, CvePrePoliza As Integer, CveUsuario As Integer, CveEmpresa As Integer,
@@ -438,7 +438,8 @@ Public Class ClsVentas
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False,
Optional FechaParaSurtir As DateTime = MinFecha
) As Boolean
Dim Retorno As Boolean = False
@@ -449,15 +450,15 @@ Public Class ClsVentas
.Add("@FolioFact", SqlDbType.Int).Value = FolioFact
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@SubTotal", SqlDbType.Float).Value = SubTotal.RoundSQL
.Add("@Descuento", SqlDbType.Float).Value = Descuento.RoundSQL
.Add("@Amortizacion", SqlDbType.Float).Value = Amortizacion.RoundSQL
.Add("@IVA", SqlDbType.Float).Value = IVA.RoundSQL
.Add("@IEPS", SqlDbType.Float).Value = IEPS.RoundSQL
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA.RoundSQL
.Add("@RetISR", SqlDbType.Float).Value = RetISR.RoundSQL
.Add("@ImpuestoLocal", SqlDbType.Float).Value = ImpuestoLocal.RoundSQL
.Add("@Total", SqlDbType.Float).Value = Total.RoundSQL
.Add("@SubTotal", SqlDbType.Money).Value = SubTotal.RoundSQL
.Add("@Descuento", SqlDbType.Money).Value = Descuento.RoundSQL
.Add("@Amortizacion", SqlDbType.Money).Value = Amortizacion.RoundSQL
.Add("@IVA", SqlDbType.Money).Value = IVA.RoundSQL
.Add("@IEPS", SqlDbType.Money).Value = IEPS.RoundSQL
.Add("@RetIVA", SqlDbType.Money).Value = RetIVA.RoundSQL
.Add("@RetISR", SqlDbType.Money).Value = RetISR.RoundSQL
.Add("@ImpuestoLocal", SqlDbType.Money).Value = ImpuestoLocal.RoundSQL
.Add("@Total", SqlDbType.Money).Value = Total.RoundSQL
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@TipoCambio", SqlDbType.Float).Value = TipoCambio
.Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago
@@ -480,7 +481,7 @@ Public Class ClsVentas
.Add("@Fech3", SqlDbType.VarChar).Value = IIf(Fech3.ToString.Contiene("1/1/0001 12:00:00 a. m.", "01/01/0001 12:00:00 a. m."), "-1", Fech3.ToString("yyyy/MM/dd"))
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
.Add("@NumeroPersonas", SqlDbType.Int).Value = NumeroPersonas
.Add("@Propina", SqlDbType.Float).Value = Propina
.Add("@Propina", SqlDbType.Money).Value = Propina
.Add("@CveVentaTerminal", SqlDbType.Int).Value = CveVentaTerminal
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@AtencionA", SqlDbType.VarChar).Value = AtencionA
@@ -544,6 +545,7 @@ Public Class ClsVentas
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = If(FechaParaSurtir = MinFecha, Fecha, FechaParaSurtir)
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
@@ -568,35 +570,33 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function UpdateVentas(SubTotal As Double, Descuento As Double, IVA As Double, IEPS As Double, Total As Double, CveMoneda As Integer, TipoCambio As Double,
Fecha As Date, Observaciones As String, CveEmpresa As Integer, CveVenta As Integer, CveMetodoPago As Integer, FormaPago As Integer,
Public Function UpdateVentas(SubTotal As Decimal, Descuento As Decimal, IVA As Decimal, IEPS As Decimal, Total As Decimal, CveMoneda As Integer, TipoCambio As Decimal,
Fecha As Date, Observaciones As String, CveEmpresa As Integer, CveVenta As Integer,
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1,
Optional AtencionA As String = "", Optional PedidoContrato As String = "", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Decimal = -1,
Optional RetISR As Decimal = -1, Optional Kilometraje As Decimal = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1,
Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_VentasUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@SubTotal", SqlDbType.Float).Value = SubTotal
.Add("@Descuento", SqlDbType.Float).Value = Descuento
.Add("@IVA", SqlDbType.Float).Value = IVA
.Add("@IEPS", SqlDbType.Float).Value = IEPS
.Add("@Total", SqlDbType.Float).Value = Total
.Add("@SubTotal", SqlDbType.Money).Value = SubTotal
.Add("@Descuento", SqlDbType.Money).Value = Descuento
.Add("@IVA", SqlDbType.Money).Value = IVA
.Add("@IEPS", SqlDbType.Money).Value = IEPS
.Add("@Total", SqlDbType.Money).Value = Total
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@TipoCambio", SqlDbType.Float).Value = TipoCambio
.Add("@RetIVA", SqlDbType.Float).Value = RetIVA
.Add("@RetISR", SqlDbType.Float).Value = RetISR
.Add("@TipoCambio", SqlDbType.Money).Value = TipoCambio
.Add("@RetIVA", SqlDbType.Money).Value = RetIVA
.Add("@RetISR", SqlDbType.Money).Value = RetISR
.Add("@Fecha", SqlDbType.Date).Value = Fecha
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
.Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto
.Add("@CveMetodoPago", SqlDbType.Int).Value = CveMetodoPago
.Add("@CondicionesPago", SqlDbType.Int).Value = CondicionesPago
.Add("@FormaPago", SqlDbType.Int).Value = FormaPago
.Add("@AtencionA", SqlDbType.VarChar).Value = AtencionA
.Add("@Vigencia", SqlDbType.Date).Value = Vigencia
.Add("@PedidoContrato", SqlDbType.VarChar).Value = PedidoContrato
@@ -605,7 +605,7 @@ Public Class ClsVentas
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveClienteSucursal", SqlDbType.Int).Value = CveClienteSucursal
.Add("@OrdenCompra", SqlDbType.VarChar).Value = OrdenCompra
.Add("@Kilometraje", SqlDbType.Float).Value = Kilometraje
.Add("@Kilometraje", SqlDbType.Money).Value = Kilometraje
.Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi
.Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
@@ -1382,7 +1382,8 @@ Public Class ClsVentas
CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1,
Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Decimal = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1,
Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Decimal = 0, Optional PorcentajeRetIVA As Double = 0,
Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Decimal = 0D) As Boolean
Optional ImporteRetISR As Decimal = 0, Optional PorcentajeRetISR As Decimal = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1,
Optional NumTurnos As Decimal = 0D, Optional EstatusAlmacen As Integer = 0) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasDetalleAdd")
@@ -1415,6 +1416,7 @@ Public Class ClsVentas
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
.Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo
.Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos
.Add("@EstatusAlmacen", SqlDbType.Int).Value = EstatusAlmacen
End With
Try

View File

@@ -7094,7 +7094,6 @@ Namespace Modelos
Public Property FacturarSucursal As Boolean = False
'Public Property Sucursal As SucursalModel
Public Property SubProyecto As Modelos.SubProyectoModel
Public Property DtDetalle As Data.DataTable
Public Property DtMercancias As Data.DataTable
Public Property DtDetalleAC As Data.DataTable
@@ -7108,7 +7107,6 @@ Namespace Modelos
Public Property DtDesgloseImpuestos As Data.DataTable
Public Property DtDocumentosRelacionados As Data.DataTable
Public Property DtNCVinculadas As Data.DataTable
Public Property DtAnticipos As Data.DataTable
Public Property DtPromociones As Data.DataTable
Public Property DtImpuestosLocales As Data.DataTable
@@ -7122,10 +7120,8 @@ Namespace Modelos
Public Property DtDocumentacionCliente As Data.DataTable
Public Property DtContratosSerieDetalle As Data.DataTable
Public Property DtOtrosConceptos As Data.DataTable
Public Property DtRemisionesDocumentosRelacionados As Data.DataTable
Public Property DtInventario As Data.DataTable
'Public Property DtAnticipoAmortizacion As Data.DataTable
Public Property DtRemConceptosSurtidos As Data.DataTable
Public Property UsadosBonificacion As List(Of Integer)
Public Property TipoBonificacion As Integer = 0
@@ -7176,7 +7172,6 @@ Namespace Modelos
Public Property RefDocto As String = ""
Public Property RealizarDevolucionAlmacen As Boolean
Public Property CveAlmacenDevolucionVenta As Integer
Public Property TipoDocumento As String
@@ -7224,28 +7219,6 @@ Namespace Modelos
End Select
End Get
End Property
Public ReadOnly Property TipodeComprobanteSAT As ClbNegBICFDv3_2.TipoDeComprobante
Get
Select Case TipoDocto
Case "Ing"
Return ClbNegBICFDv3_2.TipoDeComprobante.ingreso
Case "Egs"
Return ClbNegBICFDv3_2.TipoDeComprobante.egreso
Case "Dev"
Return ClbNegBICFDv3_2.TipoDeComprobante.egreso
Case "Cot"
Return Nothing
Case "Rem"
Return Nothing
Case "Nom"
Return Nothing
Case "Ant"
Return ClbNegBICFDv3_2.TipoDeComprobante.ingreso
Case Else
Return Nothing
End Select
End Get
End Property
Public ReadOnly Property ClaseDoctoSat As Integer
Get
Select Case TipoDocto
@@ -7293,7 +7266,6 @@ Namespace Modelos
Return retorno
End Get
End Property
Public Property CondicionesPago As Integer = 0 ' 0 - Contado, 1 - Credito (CHECAR)
Public ReadOnly Property CondicionesPagoText As String
@@ -7308,7 +7280,6 @@ Namespace Modelos
Return retorno
End Get
End Property
Public Property MotivoDescuento As String = ""
Public Property EsGarantia As Boolean = False
@@ -7433,24 +7404,21 @@ Namespace Modelos
Public Property Num1 As Double = 0
Public Property Num2 As Double = 0
Public Property Num3 As Double = 0
Public Property DiasCredito As Integer
Public Property EsDiasCreditoFijo As Boolean
Public Property CveCorte As Integer = -1
'Public Property CveMesa As Integer = -1
Public Property NumeroPersonas As Integer = 0
<ComponentModel.DataAnnotations.Schema.NotMapped>
Public Property FechaPago As Date
Public Property CveNCaVincular As Integer
Public Property FolioFiscal As String = ""
Public Property NoSerieCertificado As String
Public Property SelloCFDi As String = ""
Public Property SelloSAT As String = ""
Public Property FechaEmision As Date
Public Property FechaCertificacion As Date
Public Property FechaTimbrado As Date
Public Property NoSerieCertificadoContribuyente As String
Public Property NumeroCuenta As String = ""
Public Property CveTipoAmortizacionAnticipo As Integer = -1
@@ -7564,8 +7532,8 @@ Namespace Modelos
Public Property VendedorCodigo As String = ""
Public Property CveSucursalEjecucion As Integer
Public Property FechaEjecucion As DateTime
Public Property FechaParaSurtir As DateTime = MinFecha
Public Property CveSucursalCobranza As Integer
Public Property CveSubProyectoCobranza As Integer
Public Property CveSubProyectoEjecucion As Integer
Public Property CveOS As Integer
@@ -7578,25 +7546,16 @@ Namespace Modelos
Public Property TipoEstatus As Integer = 0
Public Property CveCondicionEntrega As Integer = -1
Public Property CondicionEntrega As String = ""
Public Property TipoRelacion As String
Public Property UUIDRelacionados As List(Of String)
Public Property CveVentaRelacion As Integer = -1
Public Property ImporteRelacion As Decimal
Public Property EsNCAmortizacion As Boolean
Public Property Kilometraje As Decimal
Public Property CveTipoRetencion As Integer
Public Property VentaDesglosaIEPS As Boolean
Public Property CveMotivoCancelacion As Integer = -1
Public Property MotivoCancelacion As String = ""
Public Property TipoContable As Integer = -1
#End Region

View File

@@ -227,12 +227,12 @@ Namespace ADSSession
Case OpcionSession.getListasession
retorno = _dicSessionobj.Values.ToList()
Case OpcionSession.CerrarSession
Dim objlist = _dicSessionobj.Values.ToList()
Dim objlist As List(Of ADSSessionObj) = _dicSessionobj.Values.ToList()
For Each user As ADSSession.ADSSessionObj In objlist
If CveUsuario = user.CveUsuario Then 'AndAlso (CveEmpresa = -1 OrElse CveEmpresa = user.CveEmpresa) Then
Dim taspsig As String = user.ASPSIG '"94C6AC57E8599390A4B7B8AB41FEABEF466D9B31120BE06D78110E66265F1ACC5616297BF3B88EDCEE71EBCFE35484308F62C8017EAC29FB3F0FB45CEC09E8F03DFBB4A4DD890D45755B7A30185C6D01F20AEFA74BE3A25FD12D536B20DCB8D9940A3D95"
Dim tsessionID As String = user.SessionID
Dim url = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString()
Dim url As String = System.Configuration.ConfigurationManager.AppSettings("urlcerrarSession").ToString()
Dim cookie As String = String.Format("ASP.NET_SessionId={0};.ASPXSIG={1}", tsessionID, taspsig)
sendURL(url, cookie)
End If

View File

@@ -7,8 +7,7 @@ Imports System.Xml
Imports Extensiones
Imports iText.Barcodes.Dmcode
Imports Microsoft.Reporting.WebForms
Imports Stimulsoft.Report
Imports Stimulsoft.Report.Web
Partial Class PopUpVerFactura
Inherits ClsPaginas
@@ -3400,12 +3399,8 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
If RegenerarPDF Then
Archivo.Delete()
If UsuarioActual.Empresa.CvePlataforma = 2 Then
GeneraPDFVtaPyMe(Vta, "PDF")
Else
ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, RegenerarQR:=True), Vta.SerieFolio, "PDF")
Vta = Nothing
End If
ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, RegenerarQR:=True), Vta.SerieFolio, "PDF")
Vta = Nothing
Else
HttpContext.Current.Response.Clear()
HttpContext.Current.Response.ClearContent()
@@ -3418,20 +3413,11 @@ Partial Class PopUpVerFactura
Archivo = Nothing
End If
Else
'04/05/2018 - Se agrega seccion pruebas para generar factura venta .mrt para PyME
If UsuarioActual.Empresa.CvePlataforma = 2 Then
GeneraPDFVtaPyMe(Vta, "PDF")
Else
ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=Guardar, SubReportData:=CartaPorte), Vta.SerieFolio, "PDF")
Vta = Nothing
End If
ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=Guardar, SubReportData:=CartaPorte), Vta.SerieFolio, "PDF")
Vta = Nothing
End If
End If
End If
End Sub
#End Region
@@ -6530,65 +6516,6 @@ Partial Class PopUpVerFactura
End Sub
#End Region
#Region "OP = VTA - PyME"
' 04/05/2018 - Pruebas de impresion de factura PyME
Private Sub GeneraPDFVtaPyMe(Venta As Modelos.Factura, Optional Formato As String = "PDF")
Dim Directorio1 As String = String.Format("{0}Formatos\Factura.mrt", UsuarioActual.Empresa.Ruta)
Dim File As FileInfo = New FileInfo(Directorio1)
If File.Exists Then
Dim Reporte As StiReport = New StiReport()
Reporte.Load(Directorio1)
Reporte.Dictionary.DataSources.Clear()
Dim ds As DataSet = New DataSet()
Venta.DtDetalle.TableName = "Datos"
ds.Tables.Add(Venta.DtDetalle)
Reporte.RegData(ds)
Reporte.Dictionary.Variables("Empresa").Value = UsuarioActual.Empresa.Empresa
Reporte.Dictionary.Variables("Tipo").Value = "Ingreso"
Reporte.Dictionary.Variables("RFC").Value = UsuarioActual.Empresa.RFC
Reporte.Dictionary.Variables("Serie").Value = Venta.Serie
Reporte.Dictionary.Variables("Folio").Value = Venta.Folio.ToString()
Reporte.Dictionary.Variables("ClienteNombre").Value = Venta.Cliente.Nombre
Reporte.Dictionary.Variables("ClienteDireccion").Value = Venta.Cliente.Direccion
Reporte.Dictionary.Variables("ClienteLugar").Value = Venta.Cliente.Ciudad
Reporte.Dictionary.Variables("ClienteRFC").Value = Venta.Cliente.RFC
Reporte.Dictionary.Variables("DomicilioExpedicion").Value = Venta.SubProyecto.Direccion
Dim SubtTotal As Decimal = (Venta.DtDetalle.SUM("PU") * Venta.DtDetalle.SUM("Cantidad")) '* 0.16 lleva el IVA?
Dim IVA As Decimal = SubtTotal * 0.16D 'lleva IVA?
Dim Total As Decimal = SubtTotal + IVA
'Reporte.Dictionary.Variables("Importe").Value =
Reporte.Dictionary.Variables("ImporteLetra").Value = Total.Texto2Letras()
Reporte.Dictionary.Variables("SubTotal").Value = SubtTotal.ToString()
Reporte.Dictionary.Variables("IVA").Value = IVA.ToString()
Reporte.Dictionary.Variables("Total").Value = Total.ToString()
Reporte.Dictionary.Variables("UsoCFDI").Value = Venta.UsoCFDI
Reporte.Dictionary.Variables("MetodoPago").Value = Venta.MetodoPago33
Reporte.Dictionary.Variables("FormaPago").Value = Venta.FormaPago33
Reporte.Dictionary.Variables("QR").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad"
Reporte.Dictionary.Variables("SelloCFDI").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsadlajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsadlajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad"
Reporte.Dictionary.Variables("SelloSAT").Value = "lajgkfjsldasdhjsakd229312974tedghjbsadskuuhdkjsad"
Reporte.Dictionary.Synchronize()
StiReportResponse.ResponseAsPdf(Me, Reporte)
Else
RegistraScript("alert('No hay un formato de factura predefinido,favor de comunicar a soporte tecnico')")
End If
End Sub
#End Region
#Region "OP = ENTREGAS - Entregas por realizar"
Public Sub ImprimeEntregasPorRealizar(CveAsignacionEntrega As Long, pUsuarioEntregar As String)

View File

@@ -30,7 +30,7 @@ Partial Class General_CatRimTamanios
End If
End Sub
#Region "CARGAS"
#Region "CARGAS"
Private Sub CargaCombos()
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind()

View File

@@ -4,8 +4,7 @@ Imports System.Data
Imports System.Math
Imports ClosedXML.Excel
Imports Extensiones
Imports GemBox.Spreadsheet
Imports log4net.Filter
Partial Class General_SaldosIniciales
Inherits ClsPaginas
@@ -1601,14 +1600,14 @@ Partial Class General_SaldosIniciales
Dim Fecha As Date = Row("Fecha").ToString().ToDate
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate
Dim ImpuestoLocal As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString().ToDecimal, 0D)
Dim Amortizacion As Double = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString().ToDouble, 0.0)
Dim Amortizacion As Decimal = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString().ToDecimal, 0)
Dim SubTotal As Decimal = Row("SubTotal").ToString().ToDecimal
Dim IVA As Decimal = Row("IVA").ToString().ToDecimal
Dim Total As Decimal = Row("Total").ToString().ToDecimal
Dim Saldo As Decimal = Row("Saldo").ToString().ToDecimal
Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
Dim RetIVA As Decimal = Row("Ret IVA").ToString().ToDecimal
Dim RetISR As Double = Row("Ret ISR").ToString().ToDouble
Dim RetISR As Decimal = Row("Ret ISR").ToString().ToDecimal
Dim Moneda As String = Row("Moneda").ToString()
Dim TipoCambio As String = Row("Tipo Cambio").ToString()
Dim CveMoneda As Integer = 1

View File

@@ -2070,7 +2070,10 @@ Partial Class Inventarios_EntradasSalidas
ErrorMovInv = True
End If
Next
Else
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovtoAlmacen, tValorInventario, tValorInventario, CveConceptoContable, TxtObservaciones.Text.Trim, TxtObservaciones.Text.Trim, CveMovimientoAlmacen:=CveMovimiento, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
ErrorMovInv = True
End If
End If
End If
Else
@@ -4433,7 +4436,7 @@ Partial Class Inventarios_EntradasSalidas
#End Region
#Region "GUARDAR"
#Region "GUARDAR CAMBIO INVENTARIO FISICO "
Private Sub BtnAplicarCambioInvFisico_Click(sender As Object, e As EventArgs) Handles BtnAplicarCambioInvFisico.Click
If GvEntradas.Rows.Count = 0 And GvSalidas.Rows.Count = 0 Then

View File

@@ -192,7 +192,7 @@
</div>
<div class="col-md-10">
<asp:DropDownList ID="DdlAlmacen" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlAlmacen_SelectedIndexChanged" DataTextField="Almacen" AppendDataBoundItems="true" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="320px"></asp:DropDownList>
<asp:DropDownList ID="DdlAlmacen" runat="server" DataTextField="Almacen" AppendDataBoundItems="true" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="320px"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVAlmacen" runat="server" ControlToValidate="DdlAlmacen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Almacen''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RFVAlmacen" Width="350px"></ajax:ValidatorCalloutExtender>
</div>

View File

@@ -474,7 +474,7 @@ Partial Class Inventarios_RecepcionAlmacen
CargaPendientes()
CargaPermisos()
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True
Dim PermisoEspecialCambioFecha As Boolean = False
If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True
@@ -591,9 +591,7 @@ Partial Class Inventarios_RecepcionAlmacen
UpGenerales.Update()
End Sub
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
RecargaporAlmacenes()
End Sub
Private Sub RecargaporAlmacenes()
CveTipoAlmacen = -1

View File

@@ -209,7 +209,7 @@
<asp:UpdatePanel ID="UpEncabezado" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="dvCa" style="width:100%;visibility:hidden;top:40px">
<table id="dTable" class="correcto table Widthall "><tr>
<table id="dTable" class="correcto table Widthall " runat="server"><tr>
<td id="dvArt" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px;width:32.5%;"><b>Producto</b></td>
<td id="dvCan" runat="server" class="dataTables_scrollHead" style="text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:30%;border-style: solid;"><b>Cantidad</b></td>
<td id="dvImp" runat="server" class="dataTables_scrollHead" style="text-align:center!important;width: 37.5%;font-size:14px;"><b>Importe</b></td>

View File

@@ -3,6 +3,7 @@ Option Strict On
Imports System.Data
Imports System.IO
Imports DocumentFormat.OpenXml.Office2013.Excel
Imports Extensiones
Imports Microsoft.Reporting.WebForms
@@ -101,13 +102,31 @@ Partial Class Inventarios_ReporteEntradasSalidas
Private Sub CargaPermisos()
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
If Not TienePermisoImportes Then
GvM.Columns(0).HeaderStyle.Width = 268
GvM.Columns(4).HeaderStyle.Width = 269
GvM.Columns(6).HeaderStyle.Width = 133
GvM.Columns(7).HeaderStyle.Width = 133
GvM.Columns(8).HeaderStyle.Width = 133
GvM.Columns(10).HeaderStyle.Width = 134
GvM.CssClass = "table table-smallpadding table-striped table-hover ScrollAD"
GvM.Width = 1074
dvArt.Attributes.Add("style", "text-align:center!important; font-size:14px;width:537px;")
dvCan.Attributes.Add("style", "text-align:center!important; font-size:14px; border-right-color: white!important;border-left-color: white!important;width:537px;border-style: solid;")
dTable.Attributes.Add("class", "correcto table")
dTable.Attributes.Add("style", "width:1074px;")
End If
dvImp.Visible = TienePermisoImportes
GvM.Columns(11).Visible = TienePermisoImportes
GvM.Columns(12).Visible = TienePermisoImportes
GvM.Columns(13).Visible = TienePermisoImportes
GvM.Columns(14).Visible = TienePermisoImportes
GvM.Columns(15).Visible = TienePermisoImportes
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
GvM.Columns(9).Visible = True
End If
@@ -303,7 +322,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
e.Row.CssClass = "Totales"
Dim Almacenes As String = If(DdlAlmacen.GetSelectedValuesM = "", "-1", DdlAlmacen.GetSelectedValuesM)
'e.Row.Cells(0).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("Codigo")}</a>"
'e.Row.Cells(0).Text = $"<a Class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("Codigo")}</a>"
e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={DdlPS.txtValue.Value}&CveMoneda={DdlMoneda.SelectedValue}&CveProveedor={DdlProveedor.txtValue.Value}&CveConcepto={DdlTipoMovimiento.SelectedValue}&FechaI={TxtFechaI.Text}&FechaF={TxtFechaF.Text}&CveAlmacen={Almacenes}&CvePersonal={DdlPersonal.SelectedValue}&Tipo={DdlMovs.SelectedValue.ToEntero}'>{e.Row.DataKey("PS")}</a>"
'e.Row.Cells(4).Text = $"<a class='Texto' href='./RepExistenciasCostos.aspx?CvePS={e.Row.DataKey("CvePS")}&CveMoneda={e.Row.DataKey("CveMoneda")}&CveProveedor={e.Row.DataKey("CveProveedor")}&CveConcepto={e.Row.DataKey("CveConcepto")}&FechaI={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&FechaF={e.Row.DataKey("FechaF").ToDate().ToString("dd/MM/yyyy")}&CveAlmacen={e.Row.DataKey("CveAlmacen")}&CvePersonal={e.Row.DataKey("CvePersonal")}'>{e.Row.DataKey("PS")}</a>"

View File

@@ -2932,6 +2932,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim RowsCargados As Integer = 0
Dim RowsNoCargados As Integer = 0
Dim NoPSConSerie As Integer = 0
DtMovimientos.Clear()
Try
Dim DtPS As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
For Each RowExcel As DataRow In dt.Rows
@@ -2970,23 +2971,23 @@ Partial Class Inventarios_TraspasoAlmacen
End If
If Valido AndAlso (Cantidad > 0 AndAlso RowPS("VentaMinima").ToString.ToDecimal > 0) Then
If Cantidad Mod RowPS("VentaMinima").ToString.ToDecimal <> 0 Then
Valido = False
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
End If
If Cantidad Mod RowPS("VentaMinima").ToString.ToDecimal <> 0 Then
Valido = False
ProductosNoCargados.AppendFormat("{0},", RowPS("PSCodigo").ToString())
End If
End If
If Valido Then
Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), If(Not String.IsNullOrEmpty(Lote), Lote, "-1"), FechaCaducidad)
End If
If Valido Then
Valido = ValidaExistencia(Cantidad, CveProducto, CveUnidadMedida, -1, If(Not String.IsNullOrEmpty(Serie), Serie, "-1"), If(Not String.IsNullOrEmpty(Lote), Lote, "-1"), FechaCaducidad)
End If
If Valido Then
AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
RowsCargados = RowsCargados + 1
Else
RowsNoCargados = RowsNoCargados + 1
ProductosNoCargados.AppendFormat("{0},", RowPS("PS").ToString())
End If
If Valido Then
AgregarPS(Cantidad, CveProducto, CveUnidadMedida, Observaciones, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(Not String.IsNullOrEmpty(Serie), Serie, ""), Lote:=Lote, FechaCaducidad:=FechaCaducidad, Limpia:=False)
RowsCargados = RowsCargados + 1
Else
RowsNoCargados = RowsNoCargados + 1
ProductosNoCargados.AppendFormat("{0},", RowPS("PSCodigo").ToString())
End If
Else
RowsNoCargados = RowsNoCargados + 1

View File

@@ -203,10 +203,7 @@
<asp:BoundField DataField="Concepto" HeaderText="Concepto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="EstatusOrdenServicio" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="FechaIng" HeaderText="Fecha Ingreso" DataFormatString="{0:d}" ItemStyle-Width="130px" />
<asp:TemplateField ItemStyle-Width="120px">
<HeaderTemplate>
Fecha Servicio
</HeaderTemplate>
<asp:TemplateField ItemStyle-Width="120px" HeaderText="Fecha Servicio">
<ItemTemplate>
<asp:Literal ID="LtlFechaServicio" runat="server" Visible="false" Text='<%# Eval("FechaCita", "{0:d}")%>'> ></asp:Literal>
@@ -224,10 +221,7 @@
</div>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-Width="60px">
<HeaderTemplate>
Hora Servicio
</HeaderTemplate>
<asp:TemplateField ItemStyle-Width="60px" HeaderText="Hora Servicio">
<ItemTemplate>
<asp:Literal ID="LtlHoraServicio" runat="server" Visible="false" Text='<%# Eval("HoraCita", "{0:t}")%>'> ></asp:Literal>
<cc1:TimeSelector ID="TimeSelector" runat="server" DisplaySeconds="false" DisplayButtons="false" Visible="false" SelectedTimeFormat="TwentyFour" Width="60px" Height="20px" CssClass="test" >

View File

@@ -45,6 +45,12 @@ Partial Class OS_Asignaciones
CargaClientes()
CargaSubProyecto()
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
GvNA.Columns(2).HeaderText = "Hospital"
GvNA.Columns(7).HeaderText = "Fecha Cirugía"
GvNA.Columns(8).HeaderText = "Hora Cirugía"
End If
If UsuarioActual.TienePermisoProceso(171) Then
CargaOrdenesServiciosAsignadasXPersona()
CargaOrdenesServiciosNoAsignadas()

View File

@@ -31,6 +31,9 @@
<li>
<asp:LinkButton ID="LnkModalCargaMasiva" OnClick="LnkModalCargaMasiva_Click" runat="server"><i class="fa fa-save"></i> Carga masiva</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="lnksalariomenoralminimo" OnClick="lnksalariomenoralminimo_Click" runat="server"><i class="fa fa-save"></i> Salario menor al mínimo</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkGuardarCambios" OnClick="LnkGuardarCambios_Click" runat="server"><i class="fa fa-save"></i> Guardar</asp:LinkButton>
</li>
@@ -946,7 +949,48 @@
</asp:UpdatePanel>
</div>
<div id="DmodalSalariomenoralminimo" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpdatePanel1" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Actualización de salarios mínimos </h4>
</div>
<div class="modal-body">
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="fa fa-upload font-green"></i>
<span class="caption-subject bold uppercase">Actualización de salarios mínimos </span>
<!-- Caudillo-->
</div>
<div class="tools">
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body rowpadding ">
</div>
</div>
</div>
<div class="modal-footer">
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">

View File

@@ -952,6 +952,11 @@ public partial class RH_CalculoSBC : ClsPaginas
}
}
protected void lnksalariomenoralminimo_Click(object sender, EventArgs e)
{
}
}
public class archivosD
{

View File

@@ -1196,7 +1196,8 @@ Partial Class RH_CatPersonal
-1, DdlSubProyectoAsignadoAdd.SelectedValue.ToEntero, "",
DdlSupervisor.SelectedValue.ToEntero, "", "", DdlJornada.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, "", -1, CveUniforme:=-1,
TelefonoExtension:="", CelularPersonal:="", TelefonoMarcadoRapido:="", ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=isSindicalizado, CvePais:=151,
CveMedioTransporte:=DdlMedioTransporte.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero()
CveMedioTransporte:=DdlMedioTransporte.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(),
AreaGeografica:=DdlAreageografica.SelectedValue
) Then
Dim filesgral As List(Of Archivo) = TxtFoto.getfiles().Archivos
Dim filemove As String = ""

View File

@@ -118,6 +118,9 @@
<li>
<asp:LinkButton ID="LnkModsalario" OnClick="LnkModsalario_Click" runat="server"><i class="fa fa-pencil"></i> Modificar salario </asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkModsalarioIMSS" OnClick="LnkModsalarioIMSS_Click" runat="server"><i class="fa fa-pencil"></i> Modificar salario IMSS</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkContratoAgropecuaria" OnClick="LnkContratoAgropecuaria_Click" runat="server"><i class="fa fa-list-alt"></i> Contrato </asp:LinkButton>
@@ -1506,6 +1509,16 @@
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DDlTipoSalario" Text="Tipo Salario:"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlAreageografica" runat="server" CssClass="form-control input-sm select2me" Width="100%" ValidationGroup="GrpGuardarAddS">
<asp:ListItem Selected="True" Text="A" Value="A"></asp:ListItem>
<asp:ListItem Text="B" Value="B"></asp:ListItem>
<asp:ListItem Text="C" Value="C"></asp:ListItem>
</asp:DropDownList>
<asp:Label runat="server" AssociatedControlID="DdlAreageografica" Text="Area geografica:"></asp:Label>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlRegimenContratacion" Width="100%" runat="server" AppendDataBoundItems="true" DataTextField="ClaveRegimenContratacion" CssClass="form-control input-sm select2me" DataValueField="CveSATRegimenContratacion" ValidationGroup="GrpGuardar">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -5703,6 +5716,59 @@
</asp:UpdatePanel>
</div>
<div id="DmodamodificarsalarioIMSS" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UpModSalarioIMSS" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content rowpadding">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" runat="server" style="text-align: left">Modificar salario</h4>
</div>
<div class="modal-body">
<div>
<div style="width: 200px; display: inline-block;">
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtFechamodIMSS" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtFechamodIMSSSalario">Fecha:</asp:Label>
<ajax:MaskedEditExtender ID="MEETxtFechamodIMSSS" runat="server" TargetControlID="TxtFechamodIMSSSalario" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEETxtFechamodIMSSS" TargetControlID="TxtFechamodIMSSSalario" PopupButtonID="LnkFechaModImssSalario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVTxtFechamodIMSSS" runat="server" ControlToValidate="TxtFechamodIMSSSalario" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarModSalarioIMSS"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVTxtFechamodIMSSS" runat="server" ControlToValidate="TxtFechamodIMSSSalario" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaNacimiento''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarModSalarioIMSS"></asp:CompareValidator>
</div>
</div>
<div style="width: 80px; display: inline-block;">
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaModImssSalario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
</div>
<div class="form-group form-md-line-input">
<asp:TextBox ID="TxtMImssSalarioDiarioImSS" Enabled="false" CssClass="form-control" runat="server"></asp:TextBox>
<asp:Label runat="server" AssociatedControlID="TxtMImssSalarioDiarioImSS">Salario diario(IMSS):</asp:Label>
</div>
</div>
<div class="modal-footer">
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton ID="LnkModificarSalarioIMSSGuardar" OnClick="LnkModificarSalarioIMSSGuardar_Click" ValidationGroup="GrpGuardarModSalarioIMSS" CssClass="btn btn-primary" runat="server">Guardar</asp:LinkButton>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="DVDescargaDocumentoParametrosModal" class="modal ADS fade" role="dialog">

View File

@@ -2,16 +2,10 @@
Option Strict On
Imports Extensiones
'Imports System.Runtime.InteropServices
Imports System.IO
'Imports Word = Microsoft.Office.Interop.Word
Imports System.Data
Imports Microsoft.Reporting.WebForms
Imports System.Globalization
Imports System.Xml
Imports System.Web.Script.Services
Imports System.Linq
Partial Class RH_Personal
Inherits ClsPaginas
@@ -1149,6 +1143,11 @@ Partial Class RH_Personal
GVAsistencia.Columns(1).Visible = True
End If
If UsuarioActual.TienePermisoProceso(372) Then
TxtSalarioDiarioImSS.Enabled = True
TxtSalarioDiarioIntegrado.Enabled = True
End If
End Sub
Private Sub SetPermisos()
'Permisos
@@ -1702,6 +1701,7 @@ Partial Class RH_Personal
TxtCodigo.Text = ObjPersonal.Codigo
DdlEscolaridad.SelectedValue = ObjPersonal.CveEscolaridad.ToString()
DdlEstadoCivil.SelectedValueExist(ObjPersonal.CveEstadoCivil.ToString())
DdlAreageografica.SelectedValueExist(drow("Areageografica").ToString())
DdlGenero.SelectedValue = ObjPersonal.CveGenero.ToString()
TxtFechaNacimiento.Text = ObjPersonal.FechaNacimiento.ToShortDateString
TxtRFC.Text = ObjPersonal.RFC
@@ -2051,7 +2051,8 @@ Partial Class RH_Personal
UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero(), TxtBeneficiario.Text.Trim, DdlSubproyectoZona.SelectedValue.ToEntero(), CveUniforme:=DdlUniforme.SelectedValue.ToEntero(),
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(),
Sindicalizado:=ChkSindicalizado.Checked, Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(), CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(),
CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero, CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo) Then
CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero, CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo,
AreaGeografica:=DdlAreageografica.SelectedValue) Then
If Archivo.Exists Then
@@ -2137,7 +2138,8 @@ Partial Class RH_Personal
TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario,
CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), Pensionado:=ChkPensionado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero(),
CveRegistroPatronal:=DdlRegistroPatronal.SelectedValue.ToEntero(), CveEmpresaAsignado:=DdlEmpresaAsignada.SelectedValue.ToEntero(), EsReserva:=If(chkEsReserva.Checked, 1, 0),
Fiscalizable:=If(chkNoFiscalizar.Checked, 0, 1), CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo) Then
Fiscalizable:=If(chkNoFiscalizar.Checked, 0, 1), CveTipoTrabajador:=DdlTipoTrabajador.SelectedValue.ToEntero(), NetoPeriodo:=TxtNetoPeriodo.Text.ToDecimal, TipoSangre:=DdlTipoSangre.SelectedValue, CveSubTipoPeriodo:=CveSubTipoPeriodo,
AreaGeografica:=DdlAreageografica.SelectedValue) Then
'Funcion usa RH Familiares
If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then
@@ -7038,6 +7040,35 @@ Partial Class RH_Personal
UpModSalario.Update()
End Sub
Protected Sub LnkModificarSalarioIMSSGuardar_Click(sender As Object, e As EventArgs)
Using ObjPersonal As ClsRH = New ClsRH()
ObjPersonal.IniciaTransacSQL()
If ObjPersonal.UpdateSalarios(CvePersonal, TxtFechamodIMSS.Text.ToDate().ToString("yyyy/MM/dd"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
TxtSalarioDiario.Text.ToDecimal(), TxtSDI.Text.ToDecimal(), TxtMImssSalarioDiarioImSS.Text.ToDecimal(),
TxtSalarioDiario.Text.ToDecimal()) Then
ObjPersonal.Commit()
TxtSalarioCotizado.Text = TxtMImssSalarioDiarioImSS.Text
UpModSalario.Update()
UpDatos.Update()
Alert("Se ha actualizado el salario", TipoMensaje.ToastInformacion)
Else
ObjPersonal.RollBack()
End If
End Using
End Sub
Protected Sub LnkModsalarioIMSS_Click(sender As Object, e As EventArgs)
TxtMImssSalarioDiarioImSS.Text = TxtSalarioCotizado.Text
RegistraScript("$('#DmodamodificarsalarioIMSS').modal()")
UpModSalarioIMSS.Update()
End Sub
Protected Sub UpdatePersonalAlta_Click(sender As Object, e As EventArgs)
End Sub
@@ -8065,5 +8096,6 @@ Partial Class RH_Personal
ddlSubTipoPeriodo.SelectedValueExist(CveSubTipoPeriodo.ToString())
UpDatos.Update()
End Sub
End Class

View File

@@ -45,7 +45,7 @@ Partial Class ListadoViajes
ObjAF.Dispose()
'Lista Rutas'
Dim ObjRutas As New ClsRutas()
Dim ObjRutas As New ClsTransportes()
If ObjRutas.GetRutas(-1, -1, -1, "", True, DateTime.Now) Then
If ObjRutas.DtResultados.Rows.Count > 0 Then
@@ -54,18 +54,16 @@ Partial Class ListadoViajes
DdlRutas.Items.Insert(0, New ListItem("Seleccione Ruta", ""))
End If
End If
ObjRutas.Dispose()
'Lista Destinos'
Dim ObjDestinos As New ClsTransportes()
If ObjDestinos.GetDestinos() Then
If ObjDestinos.DtResultados.Rows.Count > 0 Then
DdlPartida.DataSource = ObjDestinos.DtResultados
If ObjRutas.GetDestinos() Then
If ObjRutas.DtResultados.Rows.Count > 0 Then
DdlPartida.DataSource = ObjRutas.DtResultados
DdlPartida.DataBind()
DdlPartida.Items.Insert(0, New ListItem("Seleccione Partida", ""))
DdlDestino.DataSource = ObjDestinos.DtResultados
DdlDestino.DataSource = ObjRutas.DtResultados
DdlDestino.DataBind()
DdlDestino.Items.Insert(0, New ListItem("Seleccione Destino", ""))
End If

View File

@@ -258,20 +258,15 @@ Partial Class Ventas_ClientesAbonar
Private Sub CargaCuentas()
DdlCuenta.Items.Clear()
Dim CveTipoCuenta As Integer = 2
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then CveTipoCuenta = -1 'que se muestren todas, para empresa acumuladores
Dim dt As DataTable
Dim CveTipoCuenta As Integer = -1
If UsuarioActual.CveEmpresa = 119 Then CveTipoCuenta = 2 'solo las cuentas de cheques
If UsuarioActual.CveEmpresa.Contiene(7, 11, 12, 122, 145) Then
dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=-1).FiltraParametros(" CveTipoCuenta in (1,2) ")
Else
dt = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa, CveTipoCuenta:=CveTipoCuenta)
End If
If ChkPagarPesos.Checked Then
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
RegistraScript("CambiaPesosDolares();")

View File

@@ -1871,7 +1871,7 @@ Partial Class PV
Dim ObjAC As ClsContPAQi = Nothing
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero
Dim TipoCambio As Double = TxtTipoCambio.Text.ToDouble
Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal
Try
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
If DdlMoneda.SelectedValue.ToEntero <> 2 AndAlso ChkConvertirDolares.Checked Then
@@ -1960,7 +1960,7 @@ Partial Class PV
'Actualizo los parametros de la venta
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
UsuarioActual.CveEmpresa, CveVenta,
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:="", AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero,
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero, TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,

File diff suppressed because it is too large Load Diff

View File

@@ -14,13 +14,24 @@ Partial Class Ventas_PVCobranza
Set(value As Integer)
ViewState("CveCorte") = value
End Set
End Property
Private Property DineroCaja As Double
Get
Return If(IsNothing(ViewState("DineroCaja")), 0, ViewState("DineroCaja").ToString().ToDecimal())
End Get
Set(value As Double)
ViewState("DineroCaja") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
CveCorte = 0
CargaFiltros()
CargaCorteCaja()
If UsuarioActual.TienePermisoProceso(371) Then
CargaCorteCaja()
End If
End If
End Sub
@@ -59,31 +70,118 @@ Partial Class Ventas_PVCobranza
DdlCuentaTarjetaDebito.DataBind()
DdlCuentaCheque.DataBind()
DdlCuentaTransferencia.DataBind()
TxtImporteEfectivo.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteCredito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteDebito.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteCheque.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteTransferencia.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtImporteOtrosContado.Attributes.Add("onKeyUp", "CalculaTotalPagoContado();")
TxtEfectivoEnCaja.Attributes.Add("onKeyUp", "CalculaDiferencia();")
TxtEfectivoCajaBloqueo.Attributes.Add("onKeyUp", "CalculaDiferenciaBloqueo();")
End Sub
Private Sub CargaCorteCaja()
Dim DebeCerrarCorte As Boolean = False
'Checar si hay un Turno Abierto
Dim ObjPVenta As New ClsPuntoVenta
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then
CveCorte = ObjPVenta.CveCorte
End If
End If
ObjPVenta.Dispose()
Private Sub CargaCorteCaja()
Dim DebeCerrarCorte As Boolean = False
'Checar si hay un Turno Abierto
Dim ObjPVenta As New ClsPuntoVenta
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then
CveCorte = ObjPVenta.CveCorte
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-5)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < NowADS().Date Then
DebeCerrarCorte = True
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
Else
LblTurno.Text = ObjPVenta.FechaInicial.ToShortDateString
BtnIniciarTurno.Visible = False
LkbEstadodeCaja.Visible = True
LkbIngreso.Visible = True
LkbRetiro.Visible = True
UpTurno.Visible = True
End If
Else
UpTurno.Visible = False
'Ingresar un nuevo Turno
RegistraScript("window.onload = function MuestraCorteCaja() { document.getElementById(""C_btnShow"").click(); }")
End If
End If
ObjPVenta.Dispose()
If DebeCerrarCorte Then
CargaDatosCorte()
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueo"").click(); }")
End If
End Sub
Private Sub CargaDatosCorte()
Dim ObjPVenta As New ClsPuntoVenta
Dim Total As Double
If ObjPVenta.GetVta_Cortes("-1", "-1", UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, 0) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then
Total = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble + ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble + ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble - ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble
DineroCaja = Total
LblEfectivoEsperado.Text = Total.FormatoNumero(2)
LblEfectivoBloqueo.Text = Total.FormatoNumero(2)
Dim Dt As New DataTable
Dt.Columns.Add("Descripcion", GetType(String))
Dt.Columns.Add("Importe", GetType(Decimal))
Dim Dr1 As DataRow = Dt.NewRow
Dr1("Descripcion") = "Fondo de Caja"
Dr1("Importe") = ObjPVenta.DtResultados(0)("ImporteInicial").ToString().ToDouble
Dt.Rows.Add(Dr1)
Dim Dr2 As DataRow = Dt.NewRow
Dr2("Descripcion") = "Ventas en Efectivo"
Dr2("Importe") = ObjPVenta.DtResultados(0)("VentasEfectivo").ToString().ToDouble
Dt.Rows.Add(Dr2)
Dim Dr21 As DataRow = Dt.NewRow
Dr21("Descripcion") = "Devoluciones"
Dr21("Importe") = ObjPVenta.DtResultados(0)("Devoluciones").ToString().ToDouble
Dt.Rows.Add(Dr21)
'Dim Dr3 = Dt.NewRow
'Dr3("Descripcion") = "Propinas"
'Dr3("Importe") = ObjPVenta.DtResultados(0)("Propina").ToString().ToDouble
'Dt.Rows.Add(Dr3)
Dim Dr4 As DataRow = Dt.NewRow
Dr4("Descripcion") = "Entradas"
Dr4("Importe") = ObjPVenta.DtResultados(0)("Ingresado").ToString().ToDouble
Dt.Rows.Add(Dr4)
Dim Dr5 As DataRow = Dt.NewRow
Dr5("Descripcion") = "Salidas"
Dr5("Importe") = ObjPVenta.DtResultados(0)("Retirado").ToString().ToDouble
Dt.Rows.Add(Dr5)
Dim Dr6 As DataRow = Dt.NewRow
Dr6("Descripcion") = "Total"
Dr6("Importe") = Total
Dt.Rows.Add(Dr6)
GvDineroCaja.DataSource = Dt
GvDineroCaja.DataBind()
UpDineroCaja.Update()
UpTerminarCorte.Update()
End If
End If
ObjPVenta.Dispose()
End Sub
Private Sub CargaDatos()
Dim ObjMovtos As New ClsMovimientos()
@@ -276,6 +374,128 @@ Partial Class Ventas_PVCobranza
End If
Return Retorno
End Function
End Function
Protected Sub BtnCerrarCaja_Click(sender As Object, e As EventArgs)
RegistraScript("$('#DivEstadoCaja').modal('hide')")
RegistraScript("$('#DivTerminarCorte').modal()", "divterminarcorte")
End Sub
Protected Sub LkbIngreso_Click(sender As Object, e As EventArgs)
CargaIngresoEgreso(1)
End Sub
Public Sub CargaIngresoEgreso(Opcion As Integer)
RegistraScript("$('#DivIngresoEgreso').modal()")
If Opcion = 1 Then
LblTituloIE.Text = "Ingreso de Efectivo: "
HdnTipoMovimiento.Value = "1"
ElseIf Opcion = 0 Then
LblTituloIE.Text = "Retiro de Efectivo: "
HdnTipoMovimiento.Value = "0"
End If
UpIngresoEgreso.Update()
End Sub
Protected Sub LkbRetiro_Click(sender As Object, e As EventArgs)
CargaIngresoEgreso(0)
End Sub
Private Sub LkbEstadodeCaja_Click(sender As Object, e As EventArgs) Handles LkbEstadodeCaja.Click
CargaDatosCorte()
CargaVentasPago()
CargaEntradasSalidas()
RegistraScript("$('#DivEstadoCaja').modal()")
End Sub
Private Sub CargaVentasPago()
Dim ObjPVenta As New ClsPuntoVenta
If ObjPVenta.GetVta_MetodosPago(CveCorte) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then
GvMetodosPago.DataSource = ObjPVenta.DtResultados
GvMetodosPago.DataBind()
UpMetodosPago.Update()
End If
End If
ObjPVenta.Dispose()
End Sub
Private Sub CargaEntradasSalidas()
Dim ObjPVenta As New ClsPuntoVenta
'Salida
If ObjPVenta.GetVta_MovimientosCajas(CveCorte, 0) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then
GvEgresos.DataSource = ObjPVenta.DtResultados
GvEgresos.DataBind()
UpEgresos.Update()
End If
End If
'Entrada
If ObjPVenta.GetVta_MovimientosCajas(CveCorte, 1) Then
If ObjPVenta.DtResultados.Rows.Count > 0 Then
GvIngresos.DataSource = ObjPVenta.DtResultados
GvIngresos.DataBind()
UpIngresos.Update()
End If
End If
ObjPVenta.Dispose()
End Sub
Private Sub BtnCerrarTurno_Click(sender As Object, e As EventArgs) Handles BtnCerrarTurno.Click
Dim ObjPVenta As New ClsPuntoVenta
If TxtEfectivoEnCaja.Text.Trim <> "" Then
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
Dim Liga As String = "document.location.href=""/Ventas/PVCobranza.aspx"";"
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
End If
End If
ObjPVenta.Dispose()
End Sub
Private Sub BtnCerrarBloqueo_Click(sender As Object, e As EventArgs) Handles BtnCerrarBloqueo.Click
Dim ObjPVenta As New ClsPuntoVenta
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, NowADS(), UsuarioActual.CveEmpresa) Then
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
Dim Liga As String = "document.location.href=""/Ventas/PVCobranza.aspx"";"
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
End If
Else
Alert("Debe especificar el efectivo en caja", TipoMensaje.MsgAdvertencia)
RegistraScript("window.onload = function MuestraPantallaBloqueo() { document.getElementById(""C_btnShowBloqueo"").click(); }")
End If
ObjPVenta.Dispose()
End Sub
Private Sub BtnIniciarTurno_Click(sender As Object, e As EventArgs) Handles BtnIniciarTurno.Click
Dim ObjPVenta As New ClsPuntoVenta
ObjPVenta.AddVtaCortes(NowADS(), TxtDineroCaja.Text.ToDecimal, UsuarioActual.CveUsuario, TxtDescripcionCaja.Text, UsuarioActual.CveEmpresa)
CveCorte = ObjPVenta.CveCorte
LblTurno.Text = NowADS().ToShortDateString
UpTurno.Visible = True
LkbEstadodeCaja.Visible = True
LkbIngreso.Visible = True
LkbRetiro.Visible = True
BtnIniciarTurno.Visible = False
ObjPVenta.Dispose()
RegistraScript("$('#DivCorteDeCaja').hide();")
UpTurno.Update()
End Sub
Private Sub BtnAceptarIE_Click(sender As Object, e As EventArgs) Handles BtnAceptarIE.Click
Dim ObjPVenta As New ClsPuntoVenta
If TxtCantidadIE.Text.ToEntero() > 0 Then
If ObjPVenta.AddVta_MovimientosCajas(CveCorte, UsuarioActual.CveUsuario, TxtCantidadIE.Text.ToDouble, TxtDescripcionIE.Text, HdnTipoMovimiento.Value.ToEntero(), NowADS()) Then
TxtCantidadIE.Text = ""
TxtDescripcionIE.Text = ""
RegistraScript("$('#DivIngresoEgreso').modal('hide')", "divingresoegreso")
Alert("El movimiento se realizó correctamente")
UpIngresoEgreso.Update()
End If
End If
ObjPVenta.Dispose()
End Sub
End Class

View File

@@ -389,13 +389,14 @@
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
<%--<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
<%--<asp:BoundField HeaderText="Ret. ISR" DataField="RetISR" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Sub. Máximo" DataField="MAX_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
<asp:BoundField HeaderText="Sub. Promedio" DataField="AVG_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
<asp:BoundField HeaderText="Sub. Mínimo" DataField="MIN_SubTotal" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" Visible="false" />
@@ -423,7 +424,7 @@
</div>
<div class="modal-body">
<table class="table table-striped table-advance table-hover Widthall">
<tbody>
<tbody>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" />
@@ -444,6 +445,12 @@
<td style="text-align: left;">
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></td>
</tr>
<tr>
<td style="text-align: left;">
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" Visible ="false" />
</td>
<td style="text-align: left;"> </td>
</tr>
</tbody>
</table>
</div>

View File

@@ -53,8 +53,6 @@ Partial Class Ventas_RepProductosServicios
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargarMarcas()
SetValues()
End If
End Sub
@@ -115,8 +113,6 @@ Partial Class Ventas_RepProductosServicios
divClasif2.Visible = True
DdlGrupo.Items.Add(New ListItem("Clasificacion2", "25"))
LblServicioDomicilioFiltro.Visible = True
DVServicioDomicilio.Visible = True
@@ -142,6 +138,12 @@ Partial Class Ventas_RepProductosServicios
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
DdlPS.ddl.DataBind()
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
End If
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
ChkIEPS.Visible = True
ChkIEPS.Checked = True
GvDatos.Columns(6).Visible = True
End If
'CargaEstatus
@@ -334,43 +336,48 @@ Partial Class Ventas_RepProductosServicios
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
If ChkMaxSub.Checked Then
If ChkIEPS.Checked Then
GvDatos.Columns(6).Visible = True
Else
GvDatos.Columns(6).Visible = False
End If
If ChkAVGSub.Checked Then
If ChkMaxSub.Checked Then
GvDatos.Columns(7).Visible = True
Else
GvDatos.Columns(7).Visible = False
End If
If ChkMinSub.Checked Then
If ChkAVGSub.Checked Then
GvDatos.Columns(8).Visible = True
Else
GvDatos.Columns(8).Visible = False
End If
If ChkMaxTot.Checked Then
If ChkMinSub.Checked Then
GvDatos.Columns(9).Visible = True
Else
GvDatos.Columns(9).Visible = False
End If
If ChkAvgTot.Checked Then
If ChkMaxTot.Checked Then
GvDatos.Columns(10).Visible = True
Else
GvDatos.Columns(10).Visible = False
End If
If ChkMinTot.Checked Then
If ChkAvgTot.Checked Then
GvDatos.Columns(11).Visible = True
Else
GvDatos.Columns(11).Visible = False
End If
If ChkMinTot.Checked Then
GvDatos.Columns(12).Visible = True
Else
GvDatos.Columns(12).Visible = False
End If
UPDatos.Update()
End Sub
#End Region

View File

@@ -399,13 +399,13 @@
<%--3--%>
<asp:BoundField HeaderText="Suc. Cob." DataField="SubProyectoCobranza" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" Visible="false" />
<%--4--%>
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Left" />
<%--5--%>
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
<%--6--%>
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Right" />
<%--7--%>
<asp:BoundField HeaderText="Código" DataField="CodigoProducto" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Código" DataField="CodigoProducto" ItemStyle-Width="2.5%" ItemStyle-HorizontalAlign="Left" />
<%--8--%>
<asp:BoundField HeaderText="Producto/Servicio" DataField="PS" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />
<%--9--%>
@@ -413,13 +413,13 @@
<%--10--%>
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
<%--11--%>
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
<%--12--%>
<asp:BoundField HeaderText="Desc" DataField="Descuento" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
<%--13--%>
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" />
<%--14--%>
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="7.5%" ItemStyle-HorizontalAlign="Right" />
<%--15--%>
<asp:BoundField HeaderText="RFC" DataField="RFC" ItemStyle-Width="5%" Visible="false" />
<%--16--%>

View File

@@ -579,12 +579,18 @@
<asp:Literal ID="LtlKm" runat="server" Text='<%# Eval("Kilometraje") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- 39--%>
<%-- 40--%>
<asp:TemplateField HeaderText="TC" Visible="false">
<ItemTemplate>
<asp:Literal ID="LtlTC" runat="server" Text='<%# Eval("TipoCambio") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<%-- 41--%>
<asp:TemplateField HeaderText="Descripción Venta" Visible="false">
<ItemTemplate>
<asp:Literal ID="LtlDescripcionVenta" runat="server" Text='<%# Eval("DescripcionVenta") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
@@ -732,6 +738,11 @@
<td style="text-align: left;"> </td>
<td style="text-align: left;"><asp:CheckBox ID="ChkKilometraje" runat="server" Visible="False" Text="&nbsp; Kilometraje" /></td>
</tr>
<tr>
<td style="text-align: left;"></td>
<td style="text-align: left;"> </td>
<td style="text-align: left;"><asp:CheckBox ID="ChkDescripcionVenta" runat="server" Visible="true" Text="&nbsp; Descripción Venta" /></td>
</tr>
</tbody>
</table>

View File

@@ -705,6 +705,8 @@ Partial Class RepVentaDetalle
If ChkTC.Checked Then ListPersonalizada.Add("TC")
If ChkDescripcionVenta.Checked Then ListPersonalizada.Add("DescripcionVenta")
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
'Alert("Personalizacion guardada")
End If
@@ -889,6 +891,9 @@ Partial Class RepVentaDetalle
Case "Kilometraje"
ChkKilometraje.Checked = True
Exit Select
Case "DescripcionVenta"
ChkDescripcionVenta.Checked = True
Exit Select
Case Else
Exit Select
End Select
@@ -947,6 +952,8 @@ Partial Class RepVentaDetalle
GvDatos.Columns(38).Visible = ChkUsoCFDI.Checked
GvDatos.Columns(39).Visible = ChkKilometraje.Checked
GvDatos.Columns(40).Visible = ChkTC.Checked
GvDatos.Columns(41).Visible = ChkDescripcionVenta.Checked
Personalizo = 1
If Personalizo = 1 Then

View File

@@ -366,13 +366,13 @@
</ItemTemplate>
</asp:TemplateField>
<%--2--%>
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="7.5%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<%--3--%>
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--4--%>
<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" Visible="false" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--5--%>
<asp:BoundField HeaderText="Sub Total 2" DataField="SubTotal2" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Sub Total 2" DataField="SubTotal2" ItemStyle-Width="7.5%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<%--6--%>
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--7--%>
@@ -384,7 +384,7 @@
<%--10--%>
<asp:BoundField HeaderText="Imp. Locales" DataField="TotalImpuestos" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--11--%>
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
<%--12--%>
<asp:BoundField HeaderText="Sub. Máximo" DataField="MAX_SubTotal" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--13--%>

View File

@@ -390,7 +390,7 @@ Partial Class Ventas_RepVentas
CveMoneda = e.Row.DBCampo("CveMoneda").ToString.ToEntero
End If
Dim CveSubProyecto = "-1", CveProyecto = "-1"
Dim CveSubProyecto As String = "-1", CveProyecto As String = "-1"
If DdlGrupo.SelectedValue.ToEntero = 19 Then
CveSubProyecto = e.Row.DBCampo("CveCentroCosto")
CveProyecto = e.Row.DBCampo("CveCentroCostoProyecto")
@@ -411,7 +411,7 @@ Partial Class Ventas_RepVentas
If e.Row.DBCampo("Mes").ToEntero() > 0 Then
Dim Anio As Integer = FechaFRef.Year
Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero()
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
Dim lastDayOfMonth As Integer = DateTime.DaysInMonth(Anio, Mes)
Dim Dia As Integer = FechaFRef.Day
@@ -423,7 +423,7 @@ Partial Class Ventas_RepVentas
FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy")
End If
Dim FechaFinalRef = New DateTime(Anio, Mes, Dia)
Dim FechaFinalRef As New DateTime(Anio, Mes, Dia)
'ASIGNAR LA FECHA FINAL DEL GRUPO, SI ES MENOR A LA FECHA DEL FILTRO
If FechaF <> "-1" Then
@@ -435,9 +435,6 @@ Partial Class Ventas_RepVentas
Else
FechaFinal = FechaFinalRef.ToString("dd/MM/yyyy")
End If
End If
Case 3 ' AÑO/MES
@@ -445,13 +442,13 @@ Partial Class Ventas_RepVentas
Dim FechaFRef As DateTime = FechaF.ToDateTime()
Dim separator As Char = "/".ToCharArray().FirstOrDefault()
Dim AnioMes = e.Row.DBCampo("AnioMes").Split(separator)
Dim AnioMes As String() = e.Row.DBCampo("AnioMes").Split(separator)
Dim Anio As Integer = AnioMes(0).ToEntero()
Dim Mes As Integer = AnioMes(1).ToEntero()
If Anio > 0 AndAlso Mes > 0 Then
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
Dim lastDayOfMonth As Integer = DateTime.DaysInMonth(Anio, Mes)
Dim DiaFinal As Integer = FechaFRef.Day
@@ -469,8 +466,7 @@ Partial Class Ventas_RepVentas
End If
End If
Dim FechaFinalRef = New DateTime(Anio, Mes, DiaFinal)
Dim FechaFinalRef As New DateTime(Anio, Mes, DiaFinal)
'ASIGNAR LA FECHA FINAL DEL GRUPO, SI ES MENOR A LA FECHA DEL FILTRO
If FechaF <> "-1" Then
If FechaFRef < FechaFinalRef Then
@@ -504,7 +500,6 @@ Partial Class Ventas_RepVentas
e.Row.Attributes.Add("style", "background:#CCCCCC !important")
End If
If DdlGrupo.SelectedValue.ToEntero = 21 Then
If e.Row.DBCampo("GPO").Contains("Total") Then
e.Row.CssClass = "Totales"
@@ -517,8 +512,6 @@ Partial Class Ventas_RepVentas
e.Row.Cells(6).BackColor = Drawing.Color.Transparent
End If
End If
End If
End If
End Sub
@@ -818,9 +811,8 @@ Partial Class Ventas_RepVentas
If DdlClienteClasificacion.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Clasificación Cliente</b>: {0}", DdlClienteClasificacion.SelectedItem.Text)
If DdlCondicionesPago.SelectedValue <> "-1" Then StrFiltro.AppendFormat("&emsp;<b>Condiciones Pago</b>: {0}", DdlCondicionesPago.SelectedItem.Text)
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim dt As DataTable = DtVentas '.FiltraParametros("", "Orden") '.FiltraParametros("Total > 0", DistinctColumns:={"GPO", "Cantidad", "SubTotal", "Descuento", "Amortizacion", "IVA", "Total"})
Dim FechaI, FechaF As String
FechaI = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", "-1", txtFechaI.Text)
@@ -964,7 +956,7 @@ Partial Class Ventas_RepVentas
End Sub
Private Sub CalcularIntervaloRepHP()
Dim PrevMondayDate = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday))
Dim PrevMondayDate As Date = DateTime.Today.AddDays(-Weekday(Today.AddDays(-1), Microsoft.VisualBasic.FirstDayOfWeek.Monday))
Dim Sunday As DateTime = PrevMondayDate.AddDays(6)
txtFechaIHP.Text = PrevMondayDate.ToString("dd/MM/yyyy")

View File

@@ -446,16 +446,14 @@
:</b></td>
<td align="left">
<div class="row align-items-start">
<div class="col-md-10">
<asp:DropDownList ID="DdlSucursalCliente" runat="server" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
<div class="col-md-12">
<asp:DropDownList ID="DdlSucursalCliente" runat="server" Width="100%" AutoPostBack="true" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
</asp:DropDownList>
</div>
<div class="col-md-2" style="padding: inherit;">
<asp:LinkButton ID="LnkAgregarSucursal" Visible="false" runat="server" CssClass="btn btn-primary btn-circle btn-xs" Text="<i class='fa fa-plus' aria-hidden='true'></i>" OnClick="LnkAgregarSucursal_Click"></asp:LinkButton>
</div>
</div>
</div>
</td>
<td align="left">
<asp:LinkButton ID="LnkAgregarSucursal" Visible="false" runat="server" CssClass="btn btn-primary btn-circle btn-xs" Text="<i class='fa fa-plus' aria-hidden='true'></i>" OnClick="LnkAgregarSucursal_Click"></asp:LinkButton>
<b>
<asp:Label ID="LtlTitleRFCSucursal" runat="server" Text=""></asp:Label></b>
</td>
@@ -584,16 +582,16 @@
</tr>
<tr runat="server" id="TrVentasMedicas2" visible="false">
<td runat="server" id="TdRequiereTecnico1" visible="false">
<td runat="server" id="TdRequiereTecnico1" visible="true">
<b>Requiere Técnico:</b>
</td>
<td runat="server" id="TdRequiereTecnico2" visible="false">
<td runat="server" id="TdRequiereTecnico2" visible="true">
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" CssClass="chksino" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico:" />
</td>
<td runat="server" id="TdFechaOS1" visible="false">
<td runat="server" id="TdFechaOS1" visible="true">
<b>Fecha de Cirugia:</b>
</td>
<td runat="server" id="TdFechaOS2" visible="false">
<td runat="server" id="TdFechaOS2" visible="true">
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" ></asp:TextBox>
</td>
</tr>
@@ -1978,12 +1976,13 @@
</div>
<div runat="server" id="DVMEEFechaEje" visible="true">
<ajax:MaskedEditExtender ID="MEEFechaEje" runat="server" TargetControlID="TxtFechaEjecucion" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VcoRFVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<ajax:CalendarExtender runat="server" ID="CEFechaEje" TargetControlID="TxtFechaEjecucion" PopupButtonID="ImgCalendarFechaEje" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha de Ejecución''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpEmitirImprimir"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaEje" runat="server" ControlToValidate="TxtFechaEjecucion" Display="None" ErrorMessage="El campo <b>''Fecha Ejecución''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpEmitirImprimir"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VcoRFVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VcoCVFechaEje" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaEje" Width="350px"></ajax:ValidatorCalloutExtender>
&nbsp;
</td>
@@ -4095,7 +4094,7 @@
</tr>
<tr align="left" id="TrObsMedico1" visible="false" runat="server">
<%--<tr align="left" id="TrObsMedico1" visible="false" runat="server">
<td>Médico:&nbsp;</td>
</tr>
<tr align="left" id="TrObsMedico2" visible="false" runat="server">
@@ -4116,7 +4115,7 @@
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</tr>--%>
</table>
@@ -8407,13 +8406,13 @@
<%--Tipo Venta--%>
<div class="row" runat="server" visible="True" id="DvModalTipoVentaPasoTipo">
<div class="col-md-4">
<div class="col-md-3">
</div>
<div class="col-md-4" style="text-align: left!important">
<div class="col-md-6" style="text-align: left!important">
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" RepeatDirection="Vertical" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged" Style="margin-top: 10px!important">
</asp:RadioButtonList>
</div>
<div class="col-md-4">
<div class="col-md-3">
</div>
</div>
@@ -8491,7 +8490,7 @@
<div runat="server" visible="False" id="DvModalTipoVentaPasoRequiereOS">
<div class="row">
<div class="form-group col-md-6 form-md-line-input input-iconright ">
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Requiere Técnico:</asp:Label>
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="ChkRequiereTecnicoModal">Requiere Técnico:</asp:Label>
<asp:CheckBox ID="ChkRequiereTecnicoModal" CssClass="chksino" runat="server" OnCheckedChanged="ChkRequiereTecnicoModal_CheckedChanged" AutoPostBack="true" Text="Requiere Técnico" />
</div>
<div class="form-group col-md-6 form-md-line-input input-iconright " runat="server" id="DvModalRequiereOSFecha" visible="false">
@@ -8547,6 +8546,40 @@
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
<script type="text/javascript">
function impresionDirecta(url){
var frame = document.createElement('iframe');
frame.setAttribute('src', url);
//must be in the DOM to work in Firefox/IE
document.body.appendChild(frame);
//since it's in the DOM we need to hide it (lest we ruin our page layout)
//can't use 'display:none' or 'visibility:hidden' because you can't get focus (needed for IE)
//'z-index:-1' & 'opacity:0' wont help if there is no background in the elements above it and someone clicks through to it
frame.style.position = 'absolute';
frame.style.left = '-9999px';
//when it is loaded, print it
function printFrame() {
//have to get focus in IE
frame.contentWindow.focus();
//print!
frame.contentWindow.print();
/* cant remove the element because print() is non-blocking in FF
* (I.e. it would remove the frame before it was printed!)
//cleanup
//document.body.removeChild(frame);*/
};
//if it was cached, it may already be done (onload wont fire, IE8)
if (frame.contentWindow && frame.contentDocument.readyState == 'complete')
printFrame();
else {
if (frame.addEventListener)
//W3C
frame.addEventListener('load', printFrame, false);
else
//IE<9
frame.attachEvent('onload', printFrame);
}
}
function pageLoad()
{
//ABRIR EL DROPDOWN DE PS DESPUES DE ASIGNAR CANTIDAD

View File

@@ -2282,6 +2282,53 @@ Partial Class Ventas
End Set
End Property
#Region "VENTA MEDICA"
Property EsVentaMedica As Boolean
Get
If ViewState("EsVentaMedica") Is Nothing Then
ViewState("EsVentaMedica") = False
End If
Return Boolean.Parse(ViewState("EsVentaMedica").ToString)
End Get
Set(value As Boolean)
ViewState("EsVentaMedica") = value
End Set
End Property
Property SeEstaFActurandoVentaMedica As Boolean
Get
If ViewState("SeEstaFActurandoVentaMedica") Is Nothing Then
ViewState("SeEstaFActurandoVentaMedica") = False
End If
Return Boolean.Parse(ViewState("SeEstaFActurandoVentaMedica").ToString)
End Get
Set(value As Boolean)
ViewState("SeEstaFActurandoVentaMedica") = value
End Set
End Property
Public Property CveTipoVenta As Integer
Get
If ViewState("CveTipoVenta") Is Nothing Then
ViewState("CveTipoVenta") = -1
End If
Return ViewState("CveTipoVenta").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveTipoVenta") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -3391,7 +3438,7 @@ Partial Class Ventas
End If
End If
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
If CveVenta <= 0 Then
EsVentaMedica = True
CargaTiposVenta()
@@ -5819,14 +5866,16 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
If DbRowVenta("CveMedico").ToString.ToEntero > 0 Then
TrObsMedico1.Visible = True
TrObsMedico2.Visible = True
TrObsProcedimiento1.Visible = True
TrObsProcedimiento2.Visible = True
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
DdlMedicoObservaciones.SelectedValueExist(DbRowVenta("CveMedico").ToString)
DdlProcedimientoObservaciones.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
TrVentasMedicas1.Visible = True
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
DdlMedico.Enabled = False
DdlProcedimiento.Enabled = False
End If
@@ -10528,6 +10577,10 @@ Partial Class Ventas
OnError("Ocurrió un error al limpiar los datos", ex)
End Try
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
RegistraScript($"impresionDirecta('/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", CveVenta))}');", "Imprimir")
End If
Else
ObjVentas.RollBack()
@@ -11558,6 +11611,7 @@ Partial Class Ventas
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DvModalRequiereOSFecha.Visible Then
ObjFactura.Alfa1 = TxtFechaOS.Text.Trim
ObjFactura.FechaEjecucion = TxtFechaOS.Text.Trim.ToDateTime
ObjFactura.FechaParaSurtir = TxtFechaOS.Text.Trim.ToDateTime
Else
ObjFactura.Alfa1 = TxtAlfa1.Text.Trim
End If
@@ -13189,6 +13243,18 @@ Partial Class Ventas
Dim DescripcionVenta As String = ""
If TxtDescripcionVenta.Text <> "" Then DescripcionVenta = TxtDescripcionVenta.Text
Dim CveMedico As Integer = -1
Dim CveProcedimiento As Integer = -1
Dim CveTipoVentaGuardar As Integer = -1
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
CveMedico = DdlMedico.SelectedValue.ToEntero
CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
CveTipoVentaGuardar = If(SeEstaFActurandoVentaMedica, CveTipoVenta, RBLTipoVenta.SelectedValue.ToEntero)
End If
If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC,
factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC,
factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento,
@@ -13206,7 +13272,7 @@ Partial Class Ventas
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Else
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
@@ -13316,13 +13382,16 @@ Partial Class Ventas
CargaNCDT(factura.CveVentaPadre, DdlTipoComprobante.SelectedValue, factura.Total, NuevaFactura:=NuevaFactura, ObjVentas:=ObjVentas)
End If
Dim EsatusAlmacen As Integer = If(RBLTipoVenta.SelectedValue = "5" AndAlso EsVentaMedica AndAlso DdlTipoComprobante.SelectedValue = "Ped", 1, 0) ', EstatusAlmacen:=EsatusAlmacen
'Se agregan los PS
For Each Row As DataRow In TmpDTDetalle.Rows
If Not ObjVentas.AddVentaDetalle(ObjVentas.CveVenta, Row("CvePS").ToString().ToEntero(), Row("Cantidad").ToString().ToDecimal, Row("CveUM").ToString().ToEntero(),
Row("PU").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDecimal, Math.Round((Row("Total").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6),
Row("Obs").ToString(), Row("Descuento").ToString().ToDecimal(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(),
CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDecimal, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDecimal, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDecimal,
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then
PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDecimal, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDecimal,
PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDecimal, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(),
CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal(), EstatusAlmacen:=EsatusAlmacen) Then
ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
Exit For
Else
@@ -16282,7 +16351,6 @@ Partial Class Ventas
End Function
#End Region
#Region " BTN ELIMINAR "
Protected Sub BtnEmitir_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnEmitir.Click
@@ -16363,6 +16431,7 @@ Partial Class Ventas
Else
MensajeAlert.Append("Ocurrió un error al generar el PDF. Por favor vuelva a entrar a la factura para imprimir el PDF. ")
End If
End If
'IMPRESION
@@ -16557,8 +16626,6 @@ Partial Class Ventas
End Sub
#End Region
#Region " VISTA PREVIA "
Protected Sub BtnVistaPrevia_Click(sender As Object, e As System.EventArgs) Handles BtnVistaPrevia.Click
VistaPreviaNew()
@@ -16567,195 +16634,6 @@ Partial Class Ventas
#End Region
#Region "I M A G E - B U T T O N S"
'Protected Function CancelarFactura(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjAC As ClsContPAQi, ByRef ObjBancos As ClsBancos) As Boolean
' Dim IDPoliza As Integer = -1
' Dim CvePrePoliza As Integer
' Dim CvePlantillaPoliza As Integer
' Dim ErrorCancelar As Boolean = False
' Dim Mensaje As String = ""
' Try
' ObjFacturaDevolucion.TipoDocto = ObjFactura.TipoDocto
' Dim TipoContable As Integer = -1
' If ObjFacturaDevolucion.TipoDocto.Contiene("Egs", "Dev") Then
' CvePlantillaPoliza = 7
' ElseIf ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Rem", "Ant") Then
' CvePlantillaPoliza = 4
' End If
' If UsuarioActual.Empresa.Funcionalidad(706) = "1" AndAlso Then
' End If
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), NowADS(), NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
' ObjFacturaDevolucion.CveVenta = CveVenta
' ObjFacturaDevolucion.CvePrePoliza = CvePrePoliza
' If NuevaFactura = 1 AndAlso UsuarioActual.TienePermisoProceso(222) Then
' If ObjVentas.GetVentaDetalle(ObjFacturaDevolucion.CveVenta) Then
' TmpDT = ObjVentas.DtResultados
' TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
' TmpDT.Columns.Add("TieneProntoPago", GetType(String))
' TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
' End If
' ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
' Else
' ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
' End If
' If Not ErrorCancelar Then
' ErrorCancelar = GuardarVentaImpuestosLocales(ObjVentas, ObjConta, ObjFacturaDevolucion, -1)
' End If
' If CveEstatus = 4 Then
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then
' Mensaje = "El nuevo estatus se guardó correctamente"
' Else
' ErrorCancelar = True
' End If
' 'Si se está mandando a Cancelada SAT
' ElseIf CveEstatus = 5 Then
' Dim DT As DataTable = Nothing
' If FolioFiscal = "" Then
' Dim XmlDoc As New XmlDocument
' XmlDoc.Load(Ruta & "XML\" & DdlTipoComprobante.SelectedValue & "\" & VentaFolio & ".xml")
' ViewState("FolioFiscal") = XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
' End If
' Dim ObjCancelacion As New Timbrado
' Dim Total As Decimal = TxtTotal.Text.ToDecimal
' Dim RFCReceptor As String = HdnRFCVenta.Value
' If Not ObjVentas.UpdateEstatusFactura(13, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then 'Marcamos la factura como refacturada, si no se cancelo en el SAT el estatus nos dejara cancelarla despues
' ErrorCancelar = True
' End If
' Dim RespCancelacion = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC)
' If RespCancelacion.Verificado Then
' 'falta verificar traer el acuse y reenviarlo
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
' Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
' IDPoliza = IDMPoliza.IdPoliza
' If IDMPoliza.IdPoliza <= 0 Then
' Mensaje = "No se pudo generar la poliza"
' ErrorCancelar = True
' End If
' End If
' If Not ErrorCancelar Then
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, ObjCancelacion.CancelacionAcuse, NowADS(), CveVenta, IDPoliza, CvePAC:=UsuarioActual.Empresa.CvePAC) Then
' Mensaje = "El nuevo estatus se guardó correctamente"
' Else
' ErrorCancelar = True
' End If
' End If
' Else
' ErrorCancelar = True
' End If
' ObjCancelacion = Nothing
' End If
' Catch ex As Exception
' GuardaLog("CancelF." & ex.ToString())
' ErrorCancelar = True
' End Try
' Return Not ErrorCancelar
'End Function
'Protected Function CancelarFactura2(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjAC As ClsContPAQi, ObjBancos As ClsBancos) As Boolean
' Dim IDPoliza As Integer = -1
' Dim CvePrePoliza As Integer
' Dim CvePlantillaPoliza As Integer
' Dim ErrorCancelar As Boolean = False
' Dim Mensaje As String = ""
' CreaObjetosVenta()
' If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
' CvePlantillaPoliza = 7
' ElseIf ObjFactura.TipoDocto.Contiene("Ing", "Rem") Then
' CvePlantillaPoliza = 4
' End If
' CvePrePoliza = ObjConta.AddPrePolizas("Ventas/GuardaEstatus", CvePlantillaPoliza, TxtTotal.Text.ToDouble, TxtTotal.Text.Replace(",", "").ToDouble, DdlMoneda.SelectedValue.ToEntero(), NowADS(), NombreCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
' ObjFactura.CveVenta = CveVenta
' ObjFactura.CvePrePoliza = CvePrePoliza
' If HplSaldoAuxiliar.Text.ToDecimal > 0 Then
' ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFactura, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
' End If
' If Not ErrorCancelar Then
' ErrorCancelar = GuardarVentaImpuestosLocales(ObjVentas, ObjConta, ObjFactura, -1)
' End If
' If CveEstatus = 4 Then
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, "", NowADS(), CveVenta, IDPoliza) Then
' Mensaje = "El nuevo estatus se guardó correctamente"
' Else
' ErrorCancelar = True
' End If
' 'Si se está mandando a Cancelada SAT
' ElseIf CveEstatus = 5 Then
' Dim DT As DataTable = Nothing
' If FolioFiscal = "" Then
' Dim XmlDoc As New XmlDocument
' XmlDoc.Load(Ruta & "XML\" & DdlTipoComprobante.SelectedValue & "\" & VentaFolio & ".xml")
' ViewState("FolioFiscal") = XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
' End If
' 'Si es cancelar en el SAT:
' Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI
' Dim Respuesta As New ClbNegBICFDv3_2.ClsNegRespuesta
' Respuesta = CFDi.CancelaCFdi(UsuarioActual.Empresa.BIUsuario, UsuarioActual.Empresa.BIContraseña, Ruta & "Certificados\" & UsuarioActual.Empresa.ArchivoPfx, UsuarioActual.Empresa.ContraseñaKey, UsuarioActual.Empresa.RFC, FolioFiscal, "http://208.43.160.178/srvCFDi/service1.asmx")
' If Respuesta Is Nothing Then
' 'Alert("La factura no se pudo cancelar. <br />Posbiles causas:<br />&nbsp;&nbsp;- Los servicios del SAT están ocupados.<br />&nbsp;&nbsp;- El Folio Fiscal no ha quedado registrado.", TipoMensaje.MsgError)
' Me.GuardaLog(CFDi.MsgError)
' ErrorCancelar = True
' Mensaje = "La factura no se pudo cancelar. <br />Posbiles causas:<br />&nbsp;&nbsp;- Los servicios del SAT están ocupados.<br />&nbsp;&nbsp;- El Folio Fiscal no ha quedado registrado."
' ElseIf Respuesta.NoCertificadoSAT <> String.Empty Then
' If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
' Dim IDMPoliza As Modelos.RetornoPolizaConta = GenerarPolizaAC(ObjAC, ObjFacturaDevolucion, True)
' IDPoliza = IDMPoliza.IdPoliza
' If IDMPoliza.IdPoliza <= 0 Then
' Mensaje = "No se pudo generar la poliza"
' ErrorCancelar = True
' End If
' End If
' If Not ErrorCancelar Then
' If ObjVentas.UpdateEstatusFactura(CveEstatus, FolioFiscal, Respuesta.NoCertificadoSAT, Respuesta.FechaTimbrado, CveVenta, IDPoliza) Then
' Mensaje = "El nuevo estatus se guardó correctamente"
' Else
' ErrorCancelar = True
' End If
' End If
' End If
' End If
' Return Not ErrorCancelar
'End Function
Protected Sub ImgBtnAddC_Click(sender As Object, e As ImageClickEventArgs) Handles ImgBtnAddC.Click
Dim Row As DataRow = Nothing
Row = DTmpC.NewRow
@@ -21695,13 +21573,18 @@ Partial Class Ventas
UPCondicionesPago.Update()
If Me.PermiteCredito Then RBLPago.Enabled = True
DdlVendedor.Enabled = True
DdlSucursalCliente.Enabled = True
ModalidadEdicion = True
ViewState("CveClienteAnterior") = CveCliente
DdlMedicoObservaciones.Enabled = True
DdlProcedimientoObservaciones.Enabled = True
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
TrVentasMedicas1.Visible = True
DdlMedico.Enabled = True
DdlProcedimiento.Enabled = True
End If
Dim CantidadFacturadaRemision As Decimal = 0
@@ -21777,8 +21660,9 @@ Partial Class Ventas
Dim ObjCGame As New ClsCGame(ObjVentas.IniciaTransacSQL())
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
Dim TipoCambio As Double = TxtTipoCambio.Text.ToDouble
Dim TipoCambio As Decimal = TxtTipoCambio.Text.ToDecimal
EditoRemision = True
CveClienteSucursal = DdlClienteSucursal.SelectedValue.ToEntero
Try
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS
If DdlMoneda.SelectedValue.ToEntero() <> 2 AndAlso ChkConvertirDolares.Checked Then
@@ -21853,14 +21737,13 @@ Partial Class Ventas
Moneda = 1
End If
'Actualizo los parametros de la venta
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal, TxtIVA.Text.ToDecimal, TxtIEPS.Text.ToDecimal, TxtTotal.Text.ToDecimal, Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
UsuarioActual.CveEmpresa, CveVenta,
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:="Rem", CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedicoObservaciones.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimientoObservaciones.SelectedValue.ToEntero) Then
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
OcurrioError = True
End If
@@ -30295,7 +30178,7 @@ Partial Class Ventas
End If
Dim Moneda As Integer = DdlMoneda.SelectedValue.ToEntero()
Dim TipoCambio As Double = TxtTipoCambio.Text.Trim.ToDecimal
Dim TipoCambio As Decimal = TxtTipoCambio.Text.Trim.ToDecimal
If DdlMoneda.SelectedValue.ToEntero() <> 1 AndAlso ChkConvertirDoctoPesos.Checked Then
TipoCambio = 1
Moneda = 1
@@ -30384,17 +30267,20 @@ Partial Class Ventas
'ACTUALIZA VENTA
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDouble(), LblDescuentos.Text.ToDouble(), TxtIVA.Text.ToDouble(), TxtIEPS.Text.ToDouble(), TxtTotal.Text.ToDouble(),
'ACTUALIZA VENTA
If Not ObjVentas.UpdateVentas(TxtSubTotal.Text.ToDecimal, LblDescuentos.Text.ToDecimal(), TxtIVA.Text.ToDecimal(), TxtIEPS.Text.ToDecimal(), TxtTotal.Text.ToDecimal(),
Moneda, TipoCambio, TxtFecha.Text.Trim.ToDate, TxtObsFact.Text.Trim,
UsuarioActual.CveEmpresa, CveVenta, 0, 0,
UsuarioActual.CveEmpresa, CveVenta,
Vigencia:=TxtFechaVencimientoCotizacion.Text.Trim.ToDate, CondicionesPago:=If(RBLPago.SelectedValue = "2", 0, 1),
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(), CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(),
CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal,
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDouble, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero()) Then
TipoDocto:=DdlTipoComprobante.SelectedValue, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(), CveVendedor:=DdlVendedor.SelectedValue.ToEntero()) Then
MensajeError = "Ocurrió un error al actualizar la información de la cotización"
OcurrioError = True
End If
'ELIMINA DETALLES
If Not ObjVentas.RemoveVentasDetalle(CveVenta) Then
MensajeError = "Ocurrió un error al actualizar las partidas de la cotización"
@@ -32179,6 +32065,8 @@ Partial Class Ventas
End Function
Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String)
If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then
Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -32212,6 +32100,9 @@ Partial Class Ventas
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso TipoDoctoNuevo = "Ing" Then
SeEstaFActurandoVentaMedica = True
End If
If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then
Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia)
@@ -33655,6 +33546,12 @@ Partial Class Ventas
DdlUsoCFDI.Enabled = True
End If
If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso CveTipoVenta.Contiene(1, 3, 5) Then
TrVentasMedicas1.Visible = True
DdlMedico.Enabled = True
DdlProcedimiento.Enabled = True
End If
If UsuarioActual.TienePermisoProceso(289) Then
If LblSeTimbro.Text = "No" Then
DdlUsoCFDI.Enabled = False
@@ -33693,8 +33590,12 @@ Partial Class Ventas
Dim ObjVentas As New ClsVentas()
ObjVentas.IniciaTransacSQL()
'DdlMedicoObservaciones.Enabled = True
'DdlProcedimientoObservaciones.Enabled = True
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim) Then
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero) Then
TieneError = True
End If
@@ -35015,19 +34916,6 @@ Partial Class Ventas
End Set
End Property
Property EsVentaMedica As Boolean
Get
If ViewState("EsVentaMedica") Is Nothing Then
ViewState("EsVentaMedica") = False
End If
Return Boolean.Parse(ViewState("EsVentaMedica").ToString)
End Get
Set(value As Boolean)
ViewState("EsVentaMedica") = value
End Set
End Property
@@ -36013,7 +35901,7 @@ Partial Class Ventas
RBLTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
RBLTipoVenta.DataBind()
RBLTipoVenta.Items.Add(New ListItem("Otros", "5"))
RBLTipoVenta.Items.Add(New ListItem("Otros", "99"))
TrVentasMedicas1.Visible = True
TrVentasMedicas2.Visible = True
@@ -36032,8 +35920,7 @@ Partial Class Ventas
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
DdlProcedimientoModal.DataBind()
DdlProcedimientoObservaciones.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa)
DdlProcedimientoObservaciones.DataBind()
End Sub
@@ -36044,8 +35931,7 @@ Partial Class Ventas
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
DdlMedicoModal.DataBind()
DdlMedicoObservaciones.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa)
DdlMedicoObservaciones.DataBind()
End Sub
@@ -36096,7 +35982,11 @@ Partial Class Ventas
End Sub
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
TdFechaOS1.Visible = ChkRequiereTecnico.Checked
TdFechaOS2.Visible = ChkRequiereTecnico.Checked
UpCliente.Update()
End Sub
@@ -36123,7 +36013,7 @@ Partial Class Ventas
Select Case RBLTipoVenta.SelectedValue
Case "1" ' Fuera de linea
Case "1", "5" '1 Fuera de linea || 5 Consignación - Uso material
ChkRequiereTecnicoModal.Checked = True
ChkRequiereTecnicoModal.Enabled = True
DvModalRequiereOSFecha.Visible = True
@@ -36137,13 +36027,13 @@ Partial Class Ventas
DvModalRequiereOSFecha.Visible = False
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
DVGvProductosProcedimiento.Visible = False
Case "4" 'Consigna
Case "4" 'Consignación
ChkRequiereTecnicoModal.Checked = False
DvModalTipoVentaPasoRequiereOS.Visible = False
DvModalRequiereOSFecha.Visible = False
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
DVGvProductosProcedimiento.Visible = False
Case "5" ' Otros
Case "99" ' Otros
LnkDvModalTipoVentaAceptar.Visible = False
UpDvModalTipoVenta.Update()
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
@@ -36246,6 +36136,8 @@ Partial Class Ventas
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
If DdlClienteSucursalCliente() > 0 Then
ViewState("CveCliente") = DdlClienteSucursalCliente()
Else
@@ -36275,18 +36167,43 @@ Partial Class Ventas
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
'si es pago directo es factura
If RBLTipoVenta.SelectedValue.Contiene("2") Then
If RBLTipoVenta.SelectedValue.Contiene("2") Then 'si es pago directo es factura
DdlTipoComprobante.SelectedValueExist("Ing")
TdRequiereTecnico1.Visible = True
TdRequiereTecnico2.Visible = True
Else
TrVentasMedicas1.Visible = True
TrVentasMedicas2.Visible = True
TdFechaOS1.Visible = True
TdFechaOS2.Visible = True
ChkRequiereTecnico.Checked = True
ChkRequiereTecnico.Enabled = False
ElseIf RBLTipoVenta.SelectedValue.Contiene("3") Then ' A vista
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
DdlTipoComprobante.SelectedValueExist("Ped")
TrVentasMedicas1.Visible = False
TrVentasMedicas2.Visible = False
ChkRequiereTecnico.Enabled = True
ElseIf RBLTipoVenta.SelectedValue.Contiene("4") Then ' consignacion
DdlTipoComprobante.SelectedValueExist("Ing")
TrVentasMedicas1.Visible = False
TrVentasMedicas2.Visible = False
ChkRequiereTecnico.Enabled = True
Else
DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Pedido", "Ped"))
DdlTipoComprobante.SelectedValueExist("Ped")
TrVentasMedicas1.Visible = True
TrVentasMedicas2.Visible = True
TdFechaOS1.Visible = True
TdFechaOS2.Visible = True
ChkRequiereTecnico.Enabled = True
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
TdFechaOS1.Visible = ChkRequiereTecnicoModal.Checked
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
End If
DdlTipoComprobante.Enabled = False