This commit is contained in:
2024-10-26 14:12:22 -07:00
21 changed files with 2274 additions and 1504 deletions

View File

@@ -6292,6 +6292,34 @@ Public Class ClsInventarios
Return Retorno Return Retorno
End Function End Function
#Region " K P I "
Public Function GetVerComportamiento(CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CveAlmacenes As String) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Inv_VerComportamientoGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePS", SqlDbType.Int).Value = CvePS
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar el comportamiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region
#Region " IDisposable Support " #Region " IDisposable Support "
' IDisposable ' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean) Protected Overridable Sub Dispose(ByVal disposing As Boolean)
@@ -6322,6 +6350,8 @@ Public Class ClsInventarios
End Sub End Sub
#End Region #End Region
End Class End Class

View File

@@ -2844,6 +2844,28 @@ Public Class ClsPaginas
End Set End Set
End Property End Property
Public Shared Property GlobalDTVtaCobranzaTurnos(CveEmpresa As Integer, Optional CveCobranzaTurno As Integer = -1) As DataTable
Get
Dim AppNombre As String = $"GlobalDTVtaCobranzaTurnos-{CveEmpresa}"
If HttpContext.Current.Application(AppNombre) Is Nothing Then
Dim ObjVentas As New ClsVentas
If ObjVentas.GetCobranzaTurnoEstatus(-1, CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjVentas.DtResultados
ObjVentas.Dispose()
End If
If CveCobranzaTurno <> -1 Then
Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), $"CveCobranzaTurno = {CveCobranzaTurno}", "", DataViewRowState.CurrentRows)
GlobalDTVtaCobranzaTurnos = Dv.ToTable
Dv.Dispose()
Else
GlobalDTVtaCobranzaTurnos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
End If
End Get
Set(value As DataTable)
Dim AppNombre As String = $"GlobalDTVtaCobranzaTurnos-{CveEmpresa}"
HttpContext.Current.Application(AppNombre) = value
End Set
End Property
Public Shared Property GlobalDTVtaComplementoCFDI() As DataTable Public Shared Property GlobalDTVtaComplementoCFDI() As DataTable
Get Get
Dim AppNombre As String = "GlobalDTVtaComplementoCFDI" Dim AppNombre As String = "GlobalDTVtaComplementoCFDI"

View File

@@ -455,7 +455,7 @@ Public Class ClsVentas
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "", 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, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1, Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional EsFacturaGlobal As Boolean = False, Optional CveSATPeriodicidad As Integer = -1, Optional CveSATMes As Integer = -1, Optional SATAnio As Integer = -1, Optional CveMotivoDevolucion As Integer = -1,
Optional Addenda As String = "") As Boolean Optional CveCobranzaEstatusTurno As Integer = -1, Optional Addenda As String = "") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd") DataAdapter("PA_VentasAdd")
@@ -570,6 +570,7 @@ Public Class ClsVentas
.Add("@SATAnio", SqlDbType.Int).Value = SATAnio .Add("@SATAnio", SqlDbType.Int).Value = SATAnio
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion .Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
.Add("@CveCobranzaEstatusTurno", SqlDbType.Int).Value = CveCobranzaEstatusTurno
.Add("@Addenda", SqlDbType.VarChar).Value = Addenda .Add("@Addenda", SqlDbType.VarChar).Value = Addenda
End With End With
'SqlTypes.SqlDateTime.Null 'SqlTypes.SqlDateTime.Null

View File

@@ -6137,7 +6137,8 @@
txt.value = SaldoCompra - txtvalue; txt.value = SaldoCompra - txtvalue;
} }
} }
debugger;
let saldoVal = saldo; let saldoVal = saldo;
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) { if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
saldoVal = ToDouble(saldo / TCAnticipo) saldoVal = ToDouble(saldo / TCAnticipo)
@@ -6145,7 +6146,9 @@
saldoVal = ToDouble(saldo * TCAnticipo) saldoVal = ToDouble(saldo * TCAnticipo)
} }
if (saldoVal > SaldoCompra ) { //(Math.round(saldoVal * 100) / 100);
if ((Math.round(saldoVal * 100) / 100) > SaldoCompra ) {
saldo = SaldoCompra; saldo = SaldoCompra;
if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) { if (CveMonedaAnticipo == 1 && CveMonedaOriginal == 2) {
saldoVal = ToDouble(saldo / TCAnticipo); saldoVal = ToDouble(saldo / TCAnticipo);
@@ -6160,7 +6163,8 @@
chk.checked = true; chk.checked = true;
} else { } else {
chk.checked = false; chk.checked = false;
} }
if (ToDouble(txtvalue) > saldoVal) { if (ToDouble(txtvalue) > saldoVal) {
txt.value = FormatoNumero(saldo, 2); txt.value = FormatoNumero(saldo, 2);

View File

@@ -401,6 +401,7 @@ Partial Class Compras_Compras
Public Property CvePersonal As Integer Public Property CvePersonal As Integer
Public Property CveCompra As Integer Public Property CveCompra As Integer
Public Property CvePrePoliza As Integer Public Property CvePrePoliza As Integer
Public Property Fecha As Date
End Class End Class
Private Property ArrAnticipos As ArrayList Private Property ArrAnticipos As ArrayList
Get Get
@@ -1427,7 +1428,7 @@ Partial Class Compras_Compras
End If End If
Next Next
If HayDifIEPS Then Alert("El porcentaje de IEPS del producto no coincide con el especificado.", TipoMensaje.MsgAdvertencia) 'If HayDifIEPS Then Alert("El porcentaje de IEPS del producto no coincide con el especificado.", TipoMensaje.MsgAdvertencia)
If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero) If UsuarioActual.Empresa.Funcionalidad(562).ToEntero > 0 Then CargaGastosServicios(UsuarioActual.Empresa.Funcionalidad(562).ToEntero)
@@ -1985,13 +1986,14 @@ Partial Class Compras_Compras
End If End If
End If End If
Next Next
If EmisorRegimenFiscal = "626" AndAlso Not RetISRResico Then
If EmisorRegimenFiscal = "626" AndAlso Not RetISRResico AndAlso EmisorRFC.Length = 13 AndAlso UsuarioActual.CveEmpresa.Contiene(119, 158) Then 'solo para personas físicas
SbValRet.Append(" La factura no tiene especificado una retención de ISR, ya que el proveedor es Resico. <br/>") SbValRet.Append(" La factura no tiene especificado una retención de ISR, ya que el proveedor es Resico. <br/>")
BtnGuardar.Enabled = False BtnGuardar.Enabled = False
End If End If
If SbValRet.ToString.Trim.Length > 0 Then If SbValRet.ToString.Trim.Length > 0 Then
Alert(SbValRet.ToString, TipoMensaje.MsgAdvertencia) Alert("El porcentaje de IEPS del producto no coincide con el especificado.<br/><br/>" & SbValRet.ToString, TipoMensaje.MsgAdvertencia)
End If End If
Else Else
@@ -3698,12 +3700,26 @@ Partial Class Compras_Compras
ObjProveedor.Dispose() ObjProveedor.Dispose()
End Sub End Sub
Private Sub CargaAnticipos(CveProveedor As Integer, Optional FiltroTipo As String = "-1") Private Sub CargaAnticipos(CveProveedor As Integer, Optional FiltroTipo As String = "-1", Optional PagarDolaresEnPesos As Boolean = False)
Dim ObjMovtos As New ClsMovimientos() Dim ObjMovtos As New ClsMovimientos()
DivPagarConPesos.Visible = False
If DdlMoneda.SelectedValue.ToEntero = 2 Then
DivPagarConPesos.Visible = True
End If
If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, CveMoneda:=-1, SelectTop:=-1, TipoDocto:=FiltroTipo) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then If ObjMovtos.GetAnticiposProveedor(CveProveedor, -1, CveMoneda:=-1, SelectTop:=-1, TipoDocto:=FiltroTipo) AndAlso ObjMovtos.DtResultados.Rows.Count > 0 Then
Dim CveMoneda As Integer = If(ChkPagarConPesos.Checked, 1, If(ChkPagarConDolares.Checked, 2, DdlMoneda.SelectedValue.ToEntero)) Dim CveMoneda As Integer = If(ChkPagarConPesos.Checked, 1, If(ChkPagarConDolares.Checked, 2, DdlMoneda.SelectedValue.ToEntero))
If DdlMoneda.SelectedValue.ToEntero = 1 AndAlso CveCompra > 0 Then DivPagarConDolares.Visible = True Else If CveCompra > 0 Then DivPagarConPesos.Visible = True If DdlMoneda.SelectedValue.ToEntero = 1 AndAlso CveCompra > 0 Then DivPagarConDolares.Visible = True Else If CveCompra > 0 Then DivPagarConPesos.Visible = True
GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Tipo = 'Act' AND CveMoneda = {CveMoneda}")
If PagarDolaresEnPesos Then
GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Tipo = 'Act' CveMoneda = 1")
Else
GVAnticipos.DataSource = ObjMovtos.DtResultados.FiltraParametros($"Tipo = 'Act' AND CveMoneda = {CveMoneda}")
End If
If ObjMovtos.DtResultados.FiltraParametros("Saldo > 0").Rows.Count > 0 Then If ObjMovtos.DtResultados.FiltraParametros("Saldo > 0").Rows.Count > 0 Then
BtnAceptarAnticipos.Enabled = True BtnAceptarAnticipos.Enabled = True
If DdlTipoComprobante.SelectedValue = "Fac" Then ImgAnticiposPendientes.Visible = True If DdlTipoComprobante.SelectedValue = "Fac" Then ImgAnticiposPendientes.Visible = True
@@ -7324,6 +7340,17 @@ Partial Class Compras_Compras
Pago.ImportePago = importeMovimiento + ImporComisionAnticipo Pago.ImportePago = importeMovimiento + ImporComisionAnticipo
Pago.CveIE = Ant.CveIE Pago.CveIE = Ant.CveIE
Pago.TCPago = Ant.TCCompra Pago.TCPago = Ant.TCCompra
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
Pago.TCCambioMoneda = Ant.TCCompra 'GlobalTipoCambio(Now).ToDecimal
If Ant.TCCompra = 1 Then
Pago.TCCambioMoneda = 1 / GlobalTipoCambio(Ant.Fecha).ToDecimal
End If
End If
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1) Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
Pago.OtroGastoIngreso = -ImporComisionAnticipo Pago.OtroGastoIngreso = -ImporComisionAnticipo
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta) ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
@@ -8029,10 +8056,10 @@ Partial Class Compras_Compras
If (TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas) < 0 Then If (TmpDT.Rows(IndiceUltimo)("IVA").ToString.ToDecimal + DiferenciaIVas) < 0 Then
Dim AjusteteDividido As Decimal = Math.Abs(DiferenciaIVas) / CantidadRegistroConIVA Dim AjusteteDividido As Decimal = DiferenciaIVas / CantidadRegistroConIVA
For Each dRow As DataRow In TmpDT.Rows For Each dRow As DataRow In TmpDT.Rows
dRow("IVA") = dRow("IVA").ToString.ToDecimal - AjusteteDividido dRow("IVA") = dRow("IVA").ToString.ToDecimal + AjusteteDividido
Next Next
Else Else
@@ -8555,7 +8582,7 @@ Partial Class Compras_Compras
For Each gvr As GridViewRow In GVAnticipos.Rows For Each gvr As GridViewRow In GVAnticipos.Rows
If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then If gvr.FCCheckBox("Chk") IsNot Nothing AndAlso gvr.FCCheckBox("Chk").Checked Then
ArrAnticipos.Add(New Anticipos With {.CvePrePoliza = gvr.DataKey("CvePrePoliza").ToEntero, .CveIE = gvr.DataKey("CveIE").ToString.ToEntero, .CveCompra = gvr.DataKey("CveCompra").ToEntero, .Importe = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, .ImporteComision = gvr.FCTextBox("TxtComision").Text.ToDecimal, .TCCompra = gvr.DataKey("TCCompra").ToDecimal, .TipoMovto = gvr.DataKey("TipoDocto")}) ArrAnticipos.Add(New Anticipos With {.CvePrePoliza = gvr.DataKey("CvePrePoliza").ToEntero, .CveIE = gvr.DataKey("CveIE").ToString.ToEntero, .CveCompra = gvr.DataKey("CveCompra").ToEntero, .Importe = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal, .ImporteComision = gvr.FCTextBox("TxtComision").Text.ToDecimal, .TCCompra = gvr.DataKey("TCCompra").ToDecimal, .TipoMovto = gvr.DataKey("TipoDocto"), .Fecha = gvr.DataKey("Fecha").ToDate})
End If End If
Next Next

View File

@@ -1584,58 +1584,73 @@ Partial Class Compras_eFacturas
Dim FiInfo As New FileInfo(comprmido) Dim FiInfo As New FileInfo(comprmido)
Using stream As Stream = System.IO.File.OpenRead(FiInfo.FullName) Try
Try Using stream As Stream = System.IO.File.OpenRead(FiInfo.FullName)
Dim reader = ReaderFactory.Open(stream) Try
Dim reader = ReaderFactory.Open(stream)
Dim Multiparte As Boolean = False Dim Multiparte As Boolean = False
If Path.GetExtension(FiInfo.FullName.ToUpper()) = ".RAR" And FiInfo.FullName.ToUpper().Contains(".PART") Then If Path.GetExtension(FiInfo.FullName.ToUpper()) = ".RAR" And FiInfo.FullName.ToUpper().Contains(".PART") Then
'SI ES .RAR, PUEDE SER MULTI PART Y PUEDE TRONAR 'SI ES .RAR, PUEDE SER MULTI PART Y PUEDE TRONAR
Using archive As RarArchive = RarArchive.Open(FiInfo.FullName) Using archive As RarArchive = RarArchive.Open(FiInfo.FullName)
If archive.IsMultipartVolume() Then If archive.IsMultipartVolume() Then
Multiparte = True Multiparte = True
End If
End Using
End If
Dim PdfList As New List(Of String)
If Not Multiparte Then
'puede tronar si el archivo es multiparte
While reader.MoveToNextEntry()
If Not reader.Entry.IsDirectory Then
'Si es un archivo XML, lo leo y lo guardo
Dim nombreArchivo As String = ""
If reader.Entry.FilePath.Contains("/") Then
nombreArchivo = reader.Entry.FilePath.Substring(reader.Entry.FilePath.LastIndexOf("/") + 1)
Else
nombreArchivo = reader.Entry.FilePath
End If End If
End Using
End If
If Path.GetExtension(reader.Entry.FilePath.ToUpper()) = ".XML" Then Dim PdfList As New List(Of String)
reader.WriteEntryToDirectory(String.Format("{0}Temp\Facturas", UsuarioActual.Empresa.Ruta), ExtractOptions.None Or ExtractOptions.Overwrite) If Not Multiparte Then
ListXML.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, nombreArchivo)) 'puede tronar si el archivo es multiparte
While reader.MoveToNextEntry()
If Not reader.Entry.IsDirectory Then
'Si es un archivo XML, lo leo y lo guardo
Dim nombreArchivo As String = ""
If reader.Entry.FilePath.Contains("/") Then
nombreArchivo = reader.Entry.FilePath.Substring(reader.Entry.FilePath.LastIndexOf("/") + 1)
Else
nombreArchivo = reader.Entry.FilePath
End If
If Path.GetExtension(reader.Entry.FilePath.ToUpper()) = ".XML" Then
reader.WriteEntryToDirectory(String.Format("{0}Temp\Facturas", UsuarioActual.Empresa.Ruta), ExtractOptions.None Or ExtractOptions.Overwrite)
ListXML.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, nombreArchivo))
End If
If Path.GetExtension(reader.Entry.FilePath.ToUpper()) = ".PDF" Then
'este sale de un error al leer el pdf, como lo estoy recorriendo de una vez lo guardo y lo vinculo, si la coincidencia es por nombre o número de folio
'string RFCEmisor = BuscaFactura(System.IO.Path.GetFileNameWithoutExtension(reader.Entry.FilePath).ToUpper(), Arreglo, True);
'if (!string.IsNullOrEmpty(RFCEmisor))
' {
'If Not Directory.Exists(String.Format("{0}{1}", Temporal, RFCEmisor)) Then Directory.CreateDirectory(String.Format("{0}{1}", Temporal, RFCEmisor))
'reader.WriteEntryToDirectory(String.Format("{0}{1}", Temporal, ""), ExtractOptions.None Or ExtractOptions.Overwrite)
reader.WriteEntryToDirectory(String.Format("{0}{1}", String.Format("{0}Temp\Facturas", UsuarioActual.Empresa.Ruta), ""), ExtractOptions.None Or ExtractOptions.Overwrite)
ListPDF.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, nombreArchivo))
End If
End If End If
If Path.GetExtension(reader.Entry.FilePath.ToUpper()) = ".PDF" Then End While
'este sale de un error al leer el pdf, como lo estoy recorriendo de una vez lo guardo y lo vinculo, si la coincidencia es por nombre o número de folio End If
'string RFCEmisor = BuscaFactura(System.IO.Path.GetFileNameWithoutExtension(reader.Entry.FilePath).ToUpper(), Arreglo, True); Catch ex As Exception
'if (!string.IsNullOrEmpty(RFCEmisor)) GuardaLogAD("'ERROR :" & ex.Message, eFacturasLog)
' { End Try
'If Not Directory.Exists(String.Format("{0}{1}", Temporal, RFCEmisor)) Then Directory.CreateDirectory(String.Format("{0}{1}", Temporal, RFCEmisor)) End Using
Catch ex As Exception
If UsuarioActual.CveRol = 1 Then
Alert($"Error al procesar archivo: {FiInfo.FullName} Error:{ex.Message} stackTrace: {ex.StackTrace}", TipoMensaje.MsgAdvertencia)
GuardaLogAD($"Error al procesar archivo: {FiInfo.FullName} Error:{ex.Message} stackTrace: {ex.StackTrace}")
Else
Alert("Se presento un error al procesar las solcictudes. comuniquese con soporte tecnico.", TipoMensaje.MsgAdvertencia)
GuardaLogAD($"Error al procesar archivo: {FiInfo.FullName} Error:{ex.Message} stackTrace: {ex.StackTrace}")
End If
Exit Sub
End Try
'reader.WriteEntryToDirectory(String.Format("{0}{1}", Temporal, ""), ExtractOptions.None Or ExtractOptions.Overwrite)
reader.WriteEntryToDirectory(String.Format("{0}{1}", String.Format("{0}Temp\Facturas", UsuarioActual.Empresa.Ruta), ""), ExtractOptions.None Or ExtractOptions.Overwrite)
ListPDF.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, nombreArchivo))
End If
End If
End While
End If
Catch ex As Exception
GuardaLogAD("'ERROR :" & ex.Message, eFacturasLog)
End Try
End Using
Next Next
@@ -1726,6 +1741,7 @@ Partial Class Compras_eFacturas
For Each s As String In ListComprimidos For Each s As String In ListComprimidos
Try Try
File.Delete(s) File.Delete(s)
GuardaLogAD("")
Catch ex As Exception Catch ex As Exception
End Try End Try
Next Next
@@ -2853,11 +2869,14 @@ Partial Class Compras_eFacturas
Dim TipoMensaje As ModExtensiones.TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion Dim TipoMensaje As ModExtensiones.TipoMensaje = ModExtensiones.TipoMensaje.MsgInformacion
Dim ListComprimidos As New List(Of String)
Dim ListXML As New List(Of String)
Dim ListPDF As New List(Of String)
For Each GvRow As GridViewRow In GVSolicitudesPendientes.Rows For Each GvRow As GridViewRow In GVSolicitudesPendientes.Rows
Dim ListComprimidos As New List(Of String)
Dim ListXML As New List(Of String)
Dim ListPDF As New List(Of String)
Dim CveSolicitudActual As Integer = GvRow.DataKey("CveSolicitud").ToEntero() Dim CveSolicitudActual As Integer = GvRow.DataKey("CveSolicitud").ToEntero()
Dim idSolicitud As String = GvRow.DataKey("idSolicitud").Trim() Dim idSolicitud As String = GvRow.DataKey("idSolicitud").Trim()
Dim CveTipoSolicitud As Integer = GvRow.DataKey("CveTipoSolicitud").ToEntero() Dim CveTipoSolicitud As Integer = GvRow.DataKey("CveTipoSolicitud").ToEntero()
@@ -2872,6 +2891,7 @@ Partial Class Compras_eFacturas
Dim ResultadoSolicitudOK As Boolean = False Dim ResultadoSolicitudOK As Boolean = False
Dim api As New GeneralesAPIeFacturas(If(EsProduccion, "http://localhost:4001/", "http://localhost:60281/")) Dim api As New GeneralesAPIeFacturas(If(EsProduccion, "http://localhost:4001/", "http://localhost:60281/"))
Dim Verificar As Boolean = True Dim Verificar As Boolean = True
If idSolicitud.Length = 0 Then If idSolicitud.Length = 0 Then
@@ -2938,6 +2958,7 @@ Partial Class Compras_eFacturas
If File.Exists(destFile) Then If File.Exists(destFile) Then
ListComprimidos.Add(destFile) ListComprimidos.Add(destFile)
'GuardaLogAD($"eFacturas Solicitudes SAT Archivo copiado a {destFile}")
Else Else
sbArchivosFaltantes.AppendFormat("<br/> Folio: {0} Archivo: {1}", Folio, fileName) sbArchivosFaltantes.AppendFormat("<br/> Folio: {0} Archivo: {1}", Folio, fileName)
End If End If

View File

@@ -3533,6 +3533,8 @@
</ReportParameter> </ReportParameter>
<ReportParameter Name="RegimenFiscalCodigo"> <ReportParameter Name="RegimenFiscalCodigo">
<DataType>String</DataType> <DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
</ReportParameters> </ReportParameters>

View File

@@ -85,7 +85,10 @@
<Width>2.06786cm</Width> <Width>2.06786cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>9.78709cm</Width> <Width>7.28712cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>1.78414cm</Width> <Width>1.78414cm</Width>
@@ -282,6 +285,52 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox3">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Serie</Value>
<Style>
<FontSize>8pt</FontSize>
<FontWeight>Bold</FontWeight>
<Color>White</Color>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>None</Style>
<Width>1pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>None</Style>
<Width>1pt</Width>
</BottomBorder>
<BackgroundColor>#9cc3e5</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Textbox13"> <Textbox Name="Textbox13">
@@ -504,6 +553,34 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="SerieLote">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Fields!SerieLote.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>SerieLote</rd:DefaultName>
<Style>
<Border />
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>=IIf(RowNumber(Nothing)=1,"1pt","0pt")</PaddingTop>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Lote"> <Textbox Name="Lote">
@@ -577,6 +654,7 @@
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember />
</TablixMembers> </TablixMembers>
</TablixColumnHierarchy> </TablixColumnHierarchy>
<TablixRowHierarchy> <TablixRowHierarchy>
@@ -593,7 +671,7 @@
<Top>0.17639cm</Top> <Top>0.17639cm</Top>
<Left>0.07701cm</Left> <Left>0.07701cm</Left>
<Height>0.83488cm</Height> <Height>0.83488cm</Height>
<Width>19.71019cm</Width> <Width>19.71022cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -604,10 +682,10 @@
<Height>0.58708in</Height> <Height>0.58708in</Height>
<Style /> <Style />
</Body> </Body>
<Width>7.85374in</Width> <Width>7.79025in</Width>
<Page> <Page>
<PageHeader> <PageHeader>
<Height>3.64919cm</Height> <Height>3.86086cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage> <PrintOnLastPage>true</PrintOnLastPage>
<ReportItems> <ReportItems>
@@ -660,7 +738,7 @@ CIUDAD DE MEXICO</Value>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName> <rd:DefaultName>Textbox6</rd:DefaultName>
<Top>0.93835cm</Top> <Top>0.93835cm</Top>
<Left>4.49034cm</Left> <Left>4.52562cm</Left>
<Height>1.56146cm</Height> <Height>1.56146cm</Height>
<Width>10.79062cm</Width> <Width>10.79062cm</Width>
<ZIndex>1</ZIndex> <ZIndex>1</ZIndex>
@@ -879,7 +957,7 @@ CIUDAD DE MEXICO</Value>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox15</rd:DefaultName> <rd:DefaultName>Textbox15</rd:DefaultName>
<Top>0.00028cm</Top> <Top>0.00028cm</Top>
<Height>0.45889cm</Height> <Height>0.59849cm</Height>
<Width>8.88123cm</Width> <Width>8.88123cm</Width>
<Style> <Style>
<Border> <Border>
@@ -895,7 +973,7 @@ CIUDAD DE MEXICO</Value>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>3.05042cm</Top> <Top>3.05042cm</Top>
<Left>0.07701cm</Left> <Left>0.07701cm</Left>
<Height>0.49294cm</Height> <Height>0.59877cm</Height>
<Width>19.7102cm</Width> <Width>19.7102cm</Width>
<ZIndex>7</ZIndex> <ZIndex>7</ZIndex>
<Style> <Style>
@@ -950,7 +1028,7 @@ CIUDAD DE MEXICO</Value>
</Style> </Style>
</PageHeader> </PageHeader>
<PageFooter> <PageFooter>
<Height>6.20815cm</Height> <Height>6.41982cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage> <PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage> <PrintOnLastPage>true</PrintOnLastPage>
<ReportItems> <ReportItems>
@@ -1296,7 +1374,7 @@ CIUDAD DE MEXICO</Value>
<rd:DefaultName>Textbox29</rd:DefaultName> <rd:DefaultName>Textbox29</rd:DefaultName>
<Top>5.57148cm</Top> <Top>5.57148cm</Top>
<Left>0.07701cm</Left> <Left>0.07701cm</Left>
<Height>0.41981cm</Height> <Height>0.63667cm</Height>
<Width>7.15666cm</Width> <Width>7.15666cm</Width>
<ZIndex>10</ZIndex> <ZIndex>10</ZIndex>
<Style> <Style>
@@ -1322,7 +1400,7 @@ CIUDAD DE MEXICO</Value>
</Style> </Style>
</TextRun> </TextRun>
<TextRun> <TextRun>
<Value>=Parameters!FechaImpresion.Value</Value> <Value>=Format(Now(), "dd/MM/yyyy hh:mm tt")</Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
</Style> </Style>
@@ -1334,7 +1412,7 @@ CIUDAD DE MEXICO</Value>
<rd:DefaultName>Textbox31</rd:DefaultName> <rd:DefaultName>Textbox31</rd:DefaultName>
<Top>5.57148cm</Top> <Top>5.57148cm</Top>
<Left>8.13262cm</Left> <Left>8.13262cm</Left>
<Height>0.41981cm</Height> <Height>0.63667cm</Height>
<Width>6.04844cm</Width> <Width>6.04844cm</Width>
<ZIndex>11</ZIndex> <ZIndex>11</ZIndex>
<Style> <Style>
@@ -1368,7 +1446,7 @@ CIUDAD DE MEXICO</Value>
<rd:DefaultName>Textbox35</rd:DefaultName> <rd:DefaultName>Textbox35</rd:DefaultName>
<Top>5.5362cm</Top> <Top>5.5362cm</Top>
<Left>17.28722cm</Left> <Left>17.28722cm</Left>
<Height>0.45509cm</Height> <Height>0.67195cm</Height>
<Width>2.5cm</Width> <Width>2.5cm</Width>
<ZIndex>12</ZIndex> <ZIndex>12</ZIndex>
<Style> <Style>

File diff suppressed because it is too large Load Diff

View File

@@ -144,6 +144,9 @@
&nbsp;<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex">&nbsp;&nbsp;</a> &nbsp;<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex">&nbsp;&nbsp;</a>
</div>--%> </div>--%>
</li> </li>
<li>
<asp:LinkButton ID="LnkKPIVerComportamiento" Visible="false" runat="server" OnClick="LnkKPIVerComportamiento_Click"><i class="fa fa-list"></i>Ver Comportamiento</asp:LinkButton>
</li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:PostBackTrigger ControlID="ImgImprimir" /> <asp:PostBackTrigger ControlID="ImgImprimir" />
@@ -169,7 +172,7 @@
<div class="row" style="padding-top: 10px; position: relative;"> <div class="row" style="padding-top: 10px; position: relative;">
<asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate">Producto:</asp:Label> <asp:Label runat="server" ID="LblPS" CssClass="col-md-1 truncate">Producto:</asp:Label>
<div class="col-md-2 " style="min-width: 250px; max-width: 300px;"> <div class="col-md-2 " style="min-width: 250px; max-width: 300px;">
<ADS:Dropdownlost ID="ddlProducto2" runat="server" autopostback="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; "></ADS:Dropdownlost> <ADS:Dropdownlost ID="ddlProducto2" runat="server" autopostback="False" DataTextField="PSCodigo" IncluyeTodos="false" DataValueField="CvePS" CssClassDdl="select2me" CssStyle="width: 250px; " Onselectedindexchange="ddlProducto2_selectedindexchange"></ADS:Dropdownlost>
</div> </div>
<label class="col-md-1 truncate" style="max-width: 80px;" id="lblAlm" runat="server">Almacén:</label> <label class="col-md-1 truncate" style="max-width: 80px;" id="lblAlm" runat="server">Almacén:</label>
@@ -716,6 +719,44 @@
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
<div id="DVKPIComportamiento" class="modal ADS fade" role="dialog">
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalComporatmiento" UpdateMode="Conditional">
<ContentTemplate>
<div class="modal-content" style="width:1000px!important">
<div class="modal-header ">
<h4 class="modal-title">
<asp:Literal ID="Literal4" Text="Comportamiento" runat="server"> </asp:Literal></h4>
</div>
<div class="modal-body">
<asp:GridView ID="GVComportamiento" Width="100%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None">
<Columns>
<asp:BoundField HeaderText="" DataField="Agrupador" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Enero" DataField="Enero" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Febrero" DataField="Febrero" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Marzo" DataField="Marzo" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Abril" DataField="Abril" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Mayo" DataField="Mayo" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Junio" DataField="Junio" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Julio" DataField="Julio" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Agosto" DataField="Agosto" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Septiembre" DataField="Septiembre" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Octubre" DataField="Octubre" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Noviembre" DataField="Noviembre" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Diciembre" DataField="Diciembre" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
</Columns>
</asp:GridView>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">Cerrar</button>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content> </asp:Content>

View File

@@ -763,5 +763,54 @@ Partial Class Inventarios_Kardex
ObjOC.Dispose() ObjOC.Dispose()
UpIndicadores.Update() UpIndicadores.Update()
#Region " K P I V E R C O M P O R T A M I E N T O "
#End Region
End Sub End Sub
Protected Sub LnkKPIVerComportamiento_Click(sender As Object, e As EventArgs)
CargaDatosKPIVerCoportamiento()
RegistraScript("$('#DVKPIComportamiento').modal('show');")
End Sub
Private Sub CargaDatosKPIVerCoportamiento()
If ddlProducto2.SelectedValue.ToEntero <= 0 Then
Alert("No hay un producto seleccionado.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ObjInvetarios As New ClsInventarios
Dim FechaInicio As New Date(Now.Year, 1, 1)
Dim FechaFin As New Date(Now.Year, 12, 31)
Dim CveAlmacenes As String = ddlAlmacen.GetSelectedValues()
If ObjInvetarios.GetVerComportamiento(ddlProducto2.SelectedValue.ToEntero, FechaInicio, FechaFin, UsuarioActual.CveEmpresa, CveAlmacenes) Then
GVComportamiento.DataSource = ObjInvetarios.DtResultados
End If
ObjInvetarios.Dispose()
GVComportamiento.DataBind()
UpModalComporatmiento.Update()
End Sub
Protected Sub ddlProducto2_selectedindexchange(sender As Object, e As EventArgs)
LnkKPIVerComportamiento.Visible = False
If ddlProducto2.SelectedValue.ToEntero > 0 And UsuarioActual.CveRol = 1 Then
LnkKPIVerComportamiento.Visible = True
End If
UpAcciones.Update()
End Sub
End Class End Class

View File

@@ -1097,11 +1097,6 @@ Partial Class Inventarios_RecepcionAlmacen
End If End If
If Not UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If ObjCompras.GetCompraDetalle(pCveCompra, UsuarioActual.CveEmpresa) Then
TotalCompraOC = ObjCompras.DtResultados.SUM("Total", "CveTipoPS = 2")
End If
End If
CveSubProyecto = DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero CveSubProyecto = DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero

View File

@@ -1016,13 +1016,12 @@ Partial Class OC_OC
LblPrioridad.Text = "Sucursal" LblPrioridad.Text = "Sucursal"
DdlPrioridad.Visible = False DdlPrioridad.Visible = False
DdlSubProyectoGral.Visible = True DdlSubProyectoGral.Visible = True
End If
If UsuarioActual.CveRol = 1 Then
TrDescuentoEscalonado.Visible = True TrDescuentoEscalonado.Visible = True
TrDescuentoProntoPago.Visible = True TrDescuentoProntoPago.Visible = True
End If End If
If UsuarioActual.Empresa.CveEmpresa = 189 AndAlso CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then If UsuarioActual.Empresa.CveEmpresa = 189 AndAlso CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
BtnEdicionMasiva.Visible = True BtnEdicionMasiva.Visible = True
End If End If

View File

@@ -87,7 +87,7 @@
<asp:UpdatePanel ID="UpDescarga" runat="server"> <asp:UpdatePanel ID="UpDescarga" runat="server">
<ContentTemplate> <ContentTemplate>
<li> <li>
<asp:LinkButton ID="LbPorAtenderPDF" runat="server" OnClick="LbPorAtenderPDF_Click"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF por Atender</asp:LinkButton> <asp:LinkButton ID="LbPorAtenderPDF" runat="server" OnClick="LbPorAtenderPDF_Click" Visible="false"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF por Atender</asp:LinkButton>
</li> </li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>

View File

@@ -368,6 +368,7 @@ Partial Class RepOC
#Region " CONSULTAR " #Region " CONSULTAR "
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click
LbPorAtenderPDF.Visible = False
LbPorAtender.Visible = False LbPorAtender.Visible = False
LbPendientes.Visible = False LbPendientes.Visible = False
LbPendientesPDF.Visible = False LbPendientesPDF.Visible = False
@@ -405,6 +406,11 @@ Partial Class RepOC
UPPIndicador.Update() UPPIndicador.Update()
End If End If
If DtOC IsNot Nothing AndAlso DtOC.Rows.Count > 0 Then
LbPorAtenderPDF.Visible = True
End If
'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA 'SI NO TIENE DATOS, NO MOSTRAR LA COLUMNA
If OC.DtResultados.FiltraParametros("", DistinctColumns:={"UsuarioAsignado"}).FiltroPrimeroValor("UsuarioAsignado") = "" Then If OC.DtResultados.FiltraParametros("", DistinctColumns:={"UsuarioAsignado"}).FiltroPrimeroValor("UsuarioAsignado") = "" Then
GvConsultar.Columns(10).Visible = False GvConsultar.Columns(10).Visible = False
@@ -540,8 +546,18 @@ Partial Class RepOC
Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $"&emsp;<b>Proveedor:</b>&nbsp;{DdlProveedores.txtText.Value }") Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $"&emsp;<b>Proveedor:</b>&nbsp;{DdlProveedores.txtText.Value }")
Dim Cliente = If(ddlcliente.SelectedValue = "-1", "", $"&emsp;<b>Cliente:</b>&nbsp;{ddlcliente.SelectedItem.Text}") Dim Cliente = If(ddlcliente.SelectedValue = "-1", "", $"&emsp;<b>Cliente:</b>&nbsp;{ddlcliente.SelectedItem.Text}")
If DtPorAtender IsNot Nothing AndAlso DtPorAtender.Rows.Count > 0 Then If DtPorAtender IsNot Nothing AndAlso DtPorAtender.Rows.Count > 0 Then
Dim Cantidad As Integer = DtOC.COUNT("CveOrdenCompra")
Dim TotalPesos As Double = DtOC.SUM("Total", "CveMoneda = 1")
Dim TotalDolares As Double = DtOC.SUM("Total", "CveMoneda = 2")
Dim Total As Double = TotalPesos + (TotalDolares * GlobalTipoCambio)
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
@@ -549,6 +565,12 @@ Partial Class RepOC
params.Add(New ReportParameter("SubProyectoHeader", LblSubProyecto.Text)) params.Add(New ReportParameter("SubProyectoHeader", LblSubProyecto.Text))
params.Add(New ReportParameter("Titulo", "REPORTE DE ORDENES DE COMPRA POR ATENDER")) params.Add(New ReportParameter("Titulo", "REPORTE DE ORDENES DE COMPRA POR ATENDER"))
params.Add(New ReportParameter("Cantidad", Cantidad.ToString("###,###,###")))
params.Add(New ReportParameter("TotalPesos", TotalPesos.ToString("$###,###,###.00")))
params.Add(New ReportParameter("TotalDolares", TotalDolares.ToString("$###,###,###.00")))
params.Add(New ReportParameter("Total", Total.ToString("$###,###,###.00")))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", ""))) params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
Dim NombreArchivoDescargar As String = $"RepOCPorAtender{If(DdlProyectos.SelectedValue <> "-1", "_" & DdlProyectos.SelectedItem.Text, "")}_{DateTime.Now.ToShortDateString}" Dim NombreArchivoDescargar As String = $"RepOCPorAtender{If(DdlProyectos.SelectedValue <> "-1", "_" & DdlProyectos.SelectedItem.Text, "")}_{DateTime.Now.ToShortDateString}"

View File

@@ -4079,8 +4079,12 @@
<asp:UpdatePanel ID="UPGvDocumentosFirma" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPGvDocumentosFirma" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:UpdatePanel ID="UpGvDocumentosFirma2" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpGvDocumentosFirma2" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<div class="col-md-12">
<asp:GridView ID="GvDocumentosFirma" runat="server" AutoGenerateColumns="False" DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,DocumentacionFormato,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento" <asp:GridView ID="GvDocumentosFirma" runat="server" AutoGenerateColumns="False" DataKeyNames="CveDocumentacion,Documentacion,Orden,CveDocumentacionElectronica,Adjunto,Estatus,Observacion,Fecha,FechaIng,Usuario,FechaLimite,DocumentacionFormato,FechaVigencia,DiasLimite,AplicaDiasLimite,AplicaFechaVencimiento"
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None"> EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
<Columns> <Columns>
@@ -4149,7 +4153,9 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px"> <asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="ImgDownLoad" runat="server"></asp:Literal> <%--<asp:Literal ID="ImgDownLoad" runat="server" ></asp:Literal>--%>
<asp:LinkButton ID="ImgDownLoad" CssClass="btn btn-circle btn-sm blue" OnClick="ImgDownLoad_Click" runat="server"
Text="<i class='fa fa-download' style='color:white' title='Descargar formato'></i>" CausesValidation="False" />
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -4161,6 +4167,7 @@
</asp:TemplateField>--%> </asp:TemplateField>--%>
</Columns> </Columns>
</asp:GridView> </asp:GridView>
</div>
<asp:UpdatePanel ID="UpImprimir" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpImprimir" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<table runat="server" visible="false" class="table table-hover table-advance Widthall"> <table runat="server" visible="false" class="table table-hover table-advance Widthall">

View File

@@ -7,6 +7,7 @@ Imports System.Data
Imports Microsoft.Reporting.WebForms Imports Microsoft.Reporting.WebForms
Imports System.Globalization Imports System.Globalization
Imports System.Data.SqlTypes Imports System.Data.SqlTypes
Imports DocumentFormat.OpenXml.Drawing.Diagrams
Partial Class RH_Personal Partial Class RH_Personal
Inherits ClsPaginas Inherits ClsPaginas
@@ -4357,6 +4358,7 @@ Partial Class RH_Personal
objRH.Dispose() objRH.Dispose()
End Sub End Sub
Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosFirma.RowDataBound Protected Sub GvDocumentosFirma_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDocumentosFirma.RowDataBound
@@ -4364,7 +4366,8 @@ Partial Class RH_Personal
Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString() Dim Adjunto As String = e.Row.DBCampo("Adjunto").ToString()
Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato") Dim ImgDownLoadFormato As LinkButton = e.Row.FCLinkButton("ImgDownLoadFormato")
Dim ImgDownLoad As Literal = e.Row.FCLiteral("ImgDownLoad")
Dim ImgDownLoad As LinkButton = e.Row.FCLinkButton("ImgDownLoad")
Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired") Dim ImgRequired As Literal = e.Row.FCLiteral("ImgRequired")
Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite") Dim txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False) Dim requerido As Boolean = If(e.Row.DBCampo("Requerido").ToUpper = "TRUE", True, False)
@@ -4417,14 +4420,18 @@ Partial Class RH_Personal
If File.Exists(linkDescargaArchivo) Then If File.Exists(linkDescargaArchivo) Then
ImgDownLoad.Visible = True ImgDownLoad.Visible = True
If extencion.Length > 0 Then ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoad)
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion & "." & extencion)
Else 'If extencion.Length > 0 Then
ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion) ' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion & "." & extencion)
End If 'Else
' ImgDownLoad.Text = String.Format(" <a class='btn btn-circle btn-sm blue' href='{0}' target='_black' download='{1}'><i class='fa fa-download' title='Descargar documento'></i></a>", linkDescarga, CvePersonal & Documentacion)
'End If
Else Else
ImgDownLoad.Visible = False ImgDownLoad.Visible = False
End If End If
Else Else
ImgDownLoad.Visible = False ImgDownLoad.Visible = False
End If End If
@@ -4438,6 +4445,35 @@ Partial Class RH_Personal
End If End If
End Sub End Sub
Protected Sub ImgDownLoad_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim Adjunto As String = GvRow.DataKey("Adjunto").ToString()
Dim ArchivoPath As String = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
DescargarArchivo(ArchivoPath)
End Sub
Protected Sub DescargarArchivo(rutaArchivo As String)
If System.IO.File.Exists(rutaArchivo) Then
Dim nombreArchivo As String = System.IO.Path.GetFileName(rutaArchivo)
Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AddHeader("Content-Disposition", "attachment; filename=" & nombreArchivo)
Response.AddHeader("Content-Length", New System.IO.FileInfo(rutaArchivo).Length.ToString())
Response.WriteFile(rutaArchivo)
Response.End()
Else
End If
End Sub
Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs) Public Sub DownLoadFormato_ClickDocumentacion(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -8160,5 +8196,7 @@ Partial Class RH_Personal
args.IsValid = retorno args.IsValid = retorno
End Sub End Sub
End Class End Class

View File

@@ -1510,7 +1510,7 @@ Partial Class Sistemas_UsuarioDetalle
Dim ObjUsuario As New ClsSisUsuarios() Dim ObjUsuario As New ClsSisUsuarios()
If ObjUsuario.UpdateUsuarioContrasenia(Encripta(ContraseñaPredeterminada), CveUsuario, CveEmpresa) Then If ObjUsuario.UpdateUsuarioContrasenia(Encripta(ContraseñaPredeterminada), CveUsuario, CveEmpresa) Then
Alert("Contraseña Restablecida.<br> La nueva contraseña es: """ & ContraseñaPredeterminada & "", TipoMensaje.MsgInformacion) Alert("Contraseña Restablecida.<br> La nueva contraseña es: """ & ContraseñaPredeterminada & """", TipoMensaje.MsgInformacion)
End If End If
ObjUsuario.Dispose() ObjUsuario.Dispose()

View File

@@ -122,6 +122,11 @@ Partial Class ListadoContratos
Exit Sub Exit Sub
End If End If
If TxtFechaSalida.Text.ToDateTime > TxtFechaRegreso.Text.ToDateTime Then
Alert("La fecha inicial no puede ser mayor al final.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
'Agregamos Contrato 'Agregamos Contrato
Dim ObjContratos As New ClsContratos Dim ObjContratos As New ClsContratos

View File

@@ -6,6 +6,10 @@
<asp:Content ID="Content1" ContentPlaceHolderID="Css" runat="Server"> <asp:Content ID="Content1" ContentPlaceHolderID="Css" runat="Server">
<style type="text/css"> <style type="text/css">
#chart-header > div:nth-child(1) > svg:nth-child(1) > g:nth-child(2) > g:nth-child(2) > g:nth-child(1) > g:nth-child(1) > g:nth-child(1) > g:nth-child(1) > g:nth-child(1) > g:nth-child(1) > g:nth-child(1) > g:nth-child(1) > g:nth-child(1) > g:nth-child(2) > g:nth-child(8){
display:none!important
}
/* #chartdiv { /* #chartdiv {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -851,23 +855,37 @@
// Crear eje X (DateAxis) para el encabezado // Crear eje X (DateAxis) para el encabezado
var xAxisHeader = chartHeader.xAxes.push(new am4charts.DateAxis()); var xAxisHeader = chartHeader.xAxes.push(new am4charts.DateAxis());
xAxisHeader.baseInterval = { timeUnit: "hour", count: 1 }; //xAxisHeader.baseInterval = { timeUnit: "hour", count: 1 };
xAxisHeader.baseInterval = { timeUnit: "day", count: 1 }; // Cambiado a "day"
xAxisHeader.minPeriod = "day"; // Añadido
xAxisHeader.min = minDate.getTime(); xAxisHeader.min = minDate.getTime();
xAxisHeader.max = maxDate.getTime(); xAxisHeader.max = maxDate.getTime();
xAxisHeader.renderer.opposite = false; // Cambiado a false xAxisHeader.renderer.opposite = false; // Cambiado a false
xAxisHeader.renderer.minGridDistance = 50; // Ajusta según sea necesario para evitar superposición xAxisHeader.renderer.minGridDistance = 1; // Ajusta según sea necesario para evitar superposición
xAxisHeader.renderer.minorGridEnabled = true; xAxisHeader.renderer.minorGridEnabled = false;
xAxisHeader.markUnitChange = false; xAxisHeader.markUnitChange = false;
// Configurar las líneas de cuadrícula
xAxisHeader.renderer.grid.template.disabled = false;
xAxisHeader.renderer.grid.template.location = 0;
xAxisHeader.renderer.grid.template.strokeOpacity = 1;
xAxisHeader.renderer.grid.template.strokeWidth = 1;
xAxisHeader.renderer.grid.template.stroke = am4core.color("#000000");
// Asegurar que todas las etiquetas se muestren // Asegurar que todas las etiquetas se muestren
xAxisHeader.renderer.labels.template.forceShow = true; xAxisHeader.renderer.labels.template.forceShow = true;
xAxisHeader.renderer.labels.template.location = 0.5; xAxisHeader.renderer.labels.template.location = 0.5;
xAxisHeader.renderer.labels.template.fontSize = 14; xAxisHeader.renderer.labels.template.fontSize = 14;
xAxisHeader.renderer.labels.template.fontWeight = "bold"; xAxisHeader.renderer.labels.template.fontWeight = "bold";
// Formatear las etiquetas de fecha // Formatear las etiquetas de fecha
xAxisHeader.dateFormatter.dateFormat = "dd/MM"; xAxisHeader.dateFormatter.dateFormat = "dd/MM";
xAxisHeader.periodChangeDateFormats.setKey("day", "dd/MM"); //xAxisHeader.dateFormats.setKey("day", "dd/MM"); // Añadido
xAxisHeader.periodChangeDateFormats.setKey("day", "dd/MM"); // Asegurado
xAxisHeader.periodChangeDateFormats.setKey("month", "MMMM"); // Opcional, si deseas mostrar meses
// Crear eje Y (ValueAxis) para el encabezado (dummy) // Crear eje Y (ValueAxis) para el encabezado (dummy)
var yAxisHeader = chartHeader.yAxes.push(new am4charts.ValueAxis()); var yAxisHeader = chartHeader.yAxes.push(new am4charts.ValueAxis());
@@ -943,6 +961,8 @@
xAxisBody.renderer.labels.template.disabled = true; xAxisBody.renderer.labels.template.disabled = true;
xAxisBody.renderer.grid.template.disabled = true; xAxisBody.renderer.grid.template.disabled = true;
// Añadir la serie al gráfico principal // Añadir la serie al gráfico principal
var seriesBody = chartBody.series.push(new am4charts.ColumnSeries()); var seriesBody = chartBody.series.push(new am4charts.ColumnSeries());
seriesBody.dataFields.openDateX = "fromDate"; seriesBody.dataFields.openDateX = "fromDate";

View File

@@ -10985,16 +10985,23 @@ Partial Class Ventas
AutoConta = True AutoConta = True
End If End If
Try If ErrorList.Count = 0 AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=AutoConta) Then
If AutoConta Then If ObjConta.ValorPolizaDescuadre > 0 Then
If Not ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa) Then ErrorList.Add("Ocurrió un error al validar la prepóliza")
ErrorList.Add("Ocurrió un error al contabilizar, pongase en contacto con soporte técnico") GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
End If
End If End If
Catch ex As Exception End If
ErrorList.Add("Ocurrió un error al contabilizar, pongase en contacto con soporte técnico")
OnError("Ocurrió un error al contabilizar la factura", ex) 'Try
End Try ' If AutoConta Then
' If Not ObjConta.ContabilizarPrePoliza(ObjFactura.CvePrePoliza, ObjFactura.CveUsuario, UsuarioActual.Empresa) Then
' ErrorList.Add("Ocurrió un error al contabilizar, pongase en contacto con soporte técnico")
' End If
' End If
'Catch ex As Exception
' ErrorList.Add("Ocurrió un error al contabilizar, pongase en contacto con soporte técnico")
' OnError("Ocurrió un error al contabilizar la factura", ex)
'End Try
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA")) Then If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA")) Then
ObjVentas.Commit() ObjVentas.Commit()
@@ -15354,15 +15361,12 @@ Partial Class Ventas
End If End If
Next Next
'If Not ErrorPrepoliza AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=AutoConta) Then
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=AutoConta) Then ' If ObjConta.ValorPolizaDescuadre > 0 Then
If ObjConta.ValorPolizaDescuadre > 0 Then ' 'ErrorPrepoliza = True
'ErrorPrepoliza = True ' GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas") ' End If
End If 'End If
End If
If ErrorPrepoliza Then If ErrorPrepoliza Then
Exit For Exit For
End If End If
@@ -15428,11 +15432,11 @@ Partial Class Ventas
End If End If
End If End If
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then 'If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then ' If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas") ' GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
End If ' End If
End If 'End If
End If End If
End If End If
@@ -16409,23 +16413,23 @@ Partial Class Ventas
' Next ' Next
'End If 'End If
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then 'If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then ' If ObjConta.ValorPolizaDescuadre > 0 Then
If ObjConta.ValorPolizaDescuadre = 2 Then ' If ObjConta.ValorPolizaDescuadre = 2 Then
ErrorPrepoliza = True ' ErrorPrepoliza = True
Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError) ' Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
End If ' End If
'ErrorPrepoliza = True ' 'ErrorPrepoliza = True
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas") ' GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
'SIRVE PARA VER LA PREPOLIZA QUE SE VALIDA ' 'SIRVE PARA VER LA PREPOLIZA QUE SE VALIDA
'If ObjConta.GetPrePolizasDetalle(ObjFactura.CvePrePoliza) Then ' 'If ObjConta.GetPrePolizasDetalle(ObjFactura.CvePrePoliza) Then
' Dim DtTest = ObjConta.DtResultados ' ' Dim DtTest = ObjConta.DtResultados
'End If ' 'End If
End If ' End If
Else 'Else
ErrorPrepoliza = True ' ErrorPrepoliza = True
End If 'End If
Return ErrorPrepoliza Return ErrorPrepoliza
Catch ex As Exception Catch ex As Exception