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
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 "
' IDisposable
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
@@ -6322,6 +6350,8 @@ Public Class ClsInventarios
End Sub
#End Region
End Class

View File

@@ -2844,6 +2844,28 @@ Public Class ClsPaginas
End Set
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
Get
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 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 Addenda As String = "") As Boolean
Optional CveCobranzaEstatusTurno As Integer = -1, Optional Addenda As String = "") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_VentasAdd")
@@ -570,6 +570,7 @@ Public Class ClsVentas
.Add("@SATAnio", SqlDbType.Int).Value = SATAnio
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
.Add("@CveMotivoDevolucion", SqlDbType.Int).Value = CveMotivoDevolucion
.Add("@CveCobranzaEstatusTurno", SqlDbType.Int).Value = CveCobranzaEstatusTurno
.Add("@Addenda", SqlDbType.VarChar).Value = Addenda
End With
'SqlTypes.SqlDateTime.Null

View File

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

View File

@@ -401,6 +401,7 @@ Partial Class Compras_Compras
Public Property CvePersonal As Integer
Public Property CveCompra As Integer
Public Property CvePrePoliza As Integer
Public Property Fecha As Date
End Class
Private Property ArrAnticipos As ArrayList
Get
@@ -1427,7 +1428,7 @@ Partial Class Compras_Compras
End If
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)
@@ -1985,13 +1986,14 @@ Partial Class Compras_Compras
End If
End If
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/>")
BtnGuardar.Enabled = False
End If
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
Else
@@ -3698,12 +3700,26 @@ Partial Class Compras_Compras
ObjProveedor.Dispose()
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()
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
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
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
BtnAceptarAnticipos.Enabled = True
If DdlTipoComprobante.SelectedValue = "Fac" Then ImgAnticiposPendientes.Visible = True
@@ -7324,6 +7340,17 @@ Partial Class Compras_Compras
Pago.ImportePago = importeMovimiento + ImporComisionAnticipo
Pago.CveIE = Ant.CveIE
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.OtroGastoIngreso = -ImporComisionAnticipo
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
@@ -8029,10 +8056,10 @@ Partial Class Compras_Compras
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
dRow("IVA") = dRow("IVA").ToString.ToDecimal - AjusteteDividido
dRow("IVA") = dRow("IVA").ToString.ToDecimal + AjusteteDividido
Next
Else
@@ -8555,7 +8582,7 @@ Partial Class Compras_Compras
For Each gvr As GridViewRow In GVAnticipos.Rows
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
Next

View File

@@ -1584,58 +1584,73 @@ Partial Class Compras_eFacturas
Dim FiInfo As New FileInfo(comprmido)
Using stream As Stream = System.IO.File.OpenRead(FiInfo.FullName)
Try
Dim reader = ReaderFactory.Open(stream)
Try
Using stream As Stream = System.IO.File.OpenRead(FiInfo.FullName)
Try
Dim reader = ReaderFactory.Open(stream)
Dim Multiparte As Boolean = False
If Path.GetExtension(FiInfo.FullName.ToUpper()) = ".RAR" And FiInfo.FullName.ToUpper().Contains(".PART") Then
'SI ES .RAR, PUEDE SER MULTI PART Y PUEDE TRONAR
Using archive As RarArchive = RarArchive.Open(FiInfo.FullName)
If archive.IsMultipartVolume() Then
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
Dim Multiparte As Boolean = False
If Path.GetExtension(FiInfo.FullName.ToUpper()) = ".RAR" And FiInfo.FullName.ToUpper().Contains(".PART") Then
'SI ES .RAR, PUEDE SER MULTI PART Y PUEDE TRONAR
Using archive As RarArchive = RarArchive.Open(FiInfo.FullName)
If archive.IsMultipartVolume() Then
Multiparte = True
End If
End Using
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))
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
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
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))
End While
End If
Catch ex As Exception
GuardaLogAD("'ERROR :" & ex.Message, eFacturasLog)
End Try
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
@@ -1726,6 +1741,7 @@ Partial Class Compras_eFacturas
For Each s As String In ListComprimidos
Try
File.Delete(s)
GuardaLogAD("")
Catch ex As Exception
End Try
Next
@@ -2853,11 +2869,14 @@ Partial Class Compras_eFacturas
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
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 idSolicitud As String = GvRow.DataKey("idSolicitud").Trim()
Dim CveTipoSolicitud As Integer = GvRow.DataKey("CveTipoSolicitud").ToEntero()
@@ -2872,6 +2891,7 @@ Partial Class Compras_eFacturas
Dim ResultadoSolicitudOK As Boolean = False
Dim api As New GeneralesAPIeFacturas(If(EsProduccion, "http://localhost:4001/", "http://localhost:60281/"))
Dim Verificar As Boolean = True
If idSolicitud.Length = 0 Then
@@ -2938,6 +2958,7 @@ Partial Class Compras_eFacturas
If File.Exists(destFile) Then
ListComprimidos.Add(destFile)
'GuardaLogAD($"eFacturas Solicitudes SAT Archivo copiado a {destFile}")
Else
sbArchivosFaltantes.AppendFormat("<br/> Folio: {0} Archivo: {1}", Folio, fileName)
End If

View File

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

View File

@@ -85,7 +85,10 @@
<Width>2.06786cm</Width>
</TablixColumn>
<TablixColumn>
<Width>9.78709cm</Width>
<Width>7.28712cm</Width>
</TablixColumn>
<TablixColumn>
<Width>2.5cm</Width>
</TablixColumn>
<TablixColumn>
<Width>1.78414cm</Width>
@@ -282,6 +285,52 @@
</Textbox>
</CellContents>
</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>
<CellContents>
<Textbox Name="Textbox13">
@@ -504,6 +553,34 @@
</Textbox>
</CellContents>
</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>
<CellContents>
<Textbox Name="Lote">
@@ -577,6 +654,7 @@
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixColumnHierarchy>
<TablixRowHierarchy>
@@ -593,7 +671,7 @@
<Top>0.17639cm</Top>
<Left>0.07701cm</Left>
<Height>0.83488cm</Height>
<Width>19.71019cm</Width>
<Width>19.71022cm</Width>
<Style>
<Border>
<Style>None</Style>
@@ -604,10 +682,10 @@
<Height>0.58708in</Height>
<Style />
</Body>
<Width>7.85374in</Width>
<Width>7.79025in</Width>
<Page>
<PageHeader>
<Height>3.64919cm</Height>
<Height>3.86086cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -660,7 +738,7 @@ CIUDAD DE MEXICO</Value>
</Paragraphs>
<rd:DefaultName>Textbox6</rd:DefaultName>
<Top>0.93835cm</Top>
<Left>4.49034cm</Left>
<Left>4.52562cm</Left>
<Height>1.56146cm</Height>
<Width>10.79062cm</Width>
<ZIndex>1</ZIndex>
@@ -879,7 +957,7 @@ CIUDAD DE MEXICO</Value>
</Paragraphs>
<rd:DefaultName>Textbox15</rd:DefaultName>
<Top>0.00028cm</Top>
<Height>0.45889cm</Height>
<Height>0.59849cm</Height>
<Width>8.88123cm</Width>
<Style>
<Border>
@@ -895,7 +973,7 @@ CIUDAD DE MEXICO</Value>
<KeepTogether>true</KeepTogether>
<Top>3.05042cm</Top>
<Left>0.07701cm</Left>
<Height>0.49294cm</Height>
<Height>0.59877cm</Height>
<Width>19.7102cm</Width>
<ZIndex>7</ZIndex>
<Style>
@@ -950,7 +1028,7 @@ CIUDAD DE MEXICO</Value>
</Style>
</PageHeader>
<PageFooter>
<Height>6.20815cm</Height>
<Height>6.41982cm</Height>
<PrintOnFirstPage>true</PrintOnFirstPage>
<PrintOnLastPage>true</PrintOnLastPage>
<ReportItems>
@@ -1296,7 +1374,7 @@ CIUDAD DE MEXICO</Value>
<rd:DefaultName>Textbox29</rd:DefaultName>
<Top>5.57148cm</Top>
<Left>0.07701cm</Left>
<Height>0.41981cm</Height>
<Height>0.63667cm</Height>
<Width>7.15666cm</Width>
<ZIndex>10</ZIndex>
<Style>
@@ -1322,7 +1400,7 @@ CIUDAD DE MEXICO</Value>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!FechaImpresion.Value</Value>
<Value>=Format(Now(), "dd/MM/yyyy hh:mm tt")</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
@@ -1334,7 +1412,7 @@ CIUDAD DE MEXICO</Value>
<rd:DefaultName>Textbox31</rd:DefaultName>
<Top>5.57148cm</Top>
<Left>8.13262cm</Left>
<Height>0.41981cm</Height>
<Height>0.63667cm</Height>
<Width>6.04844cm</Width>
<ZIndex>11</ZIndex>
<Style>
@@ -1368,7 +1446,7 @@ CIUDAD DE MEXICO</Value>
<rd:DefaultName>Textbox35</rd:DefaultName>
<Top>5.5362cm</Top>
<Left>17.28722cm</Left>
<Height>0.45509cm</Height>
<Height>0.67195cm</Height>
<Width>2.5cm</Width>
<ZIndex>12</ZIndex>
<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>
</div>--%>
</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>
<Triggers>
<asp:PostBackTrigger ControlID="ImgImprimir" />
@@ -169,7 +172,7 @@
<div class="row" style="padding-top: 10px; position: relative;">
<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;">
<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>
<label class="col-md-1 truncate" style="max-width: 80px;" id="lblAlm" runat="server">Almacén:</label>
@@ -716,6 +719,44 @@
</asp:UpdatePanel>
</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 ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -763,5 +763,54 @@ Partial Class Inventarios_Kardex
ObjOC.Dispose()
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
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

View File

@@ -1097,11 +1097,6 @@ Partial Class Inventarios_RecepcionAlmacen
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

View File

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

View File

@@ -87,7 +87,7 @@
<asp:UpdatePanel ID="UpDescarga" runat="server">
<ContentTemplate>
<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>
</ContentTemplate>
<Triggers>

View File

@@ -368,6 +368,7 @@ Partial Class RepOC
#Region " CONSULTAR "
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles btnConsultar.Click
LbPorAtenderPDF.Visible = False
LbPorAtender.Visible = False
LbPendientes.Visible = False
LbPendientesPDF.Visible = False
@@ -405,6 +406,11 @@ Partial Class RepOC
UPPIndicador.Update()
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
If OC.DtResultados.FiltraParametros("", DistinctColumns:={"UsuarioAsignado"}).FiltroPrimeroValor("UsuarioAsignado") = "" Then
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 Cliente = If(ddlcliente.SelectedValue = "-1", "", $"&emsp;<b>Cliente:</b>&nbsp;{ddlcliente.SelectedItem.Text}")
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)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
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("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}", "")))
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">
<ContentTemplate>
<asp:UpdatePanel ID="UpGvDocumentosFirma2" runat="server" UpdateMode="Conditional">
<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"
EmptyDataText="No se encontraron registros de documentos" CssClass="table table-hover table-advance Widthall" GridLines="None">
<Columns>
@@ -4149,7 +4153,9 @@
<asp:TemplateField ItemStyle-HorizontalAlign="Right" ItemStyle-Width="50px">
<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>
</asp:TemplateField>
@@ -4161,6 +4167,7 @@
</asp:TemplateField>--%>
</Columns>
</asp:GridView>
</div>
<asp:UpdatePanel ID="UpImprimir" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<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 System.Globalization
Imports System.Data.SqlTypes
Imports DocumentFormat.OpenXml.Drawing.Diagrams
Partial Class RH_Personal
Inherits ClsPaginas
@@ -4357,6 +4358,7 @@ Partial Class RH_Personal
objRH.Dispose()
End Sub
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 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 txtFechaLimite As TextBox = e.Row.FCTextBox("TxtFechaLimite")
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
ImgDownLoad.Visible = True
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 & "." & extencion)
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
ScriptManager.GetCurrent(Me).RegisterPostBackControl(ImgDownLoad)
'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 & "." & extencion)
'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
ImgDownLoad.Visible = False
End If
Else
ImgDownLoad.Visible = False
End If
@@ -4438,6 +4445,35 @@ Partial Class RH_Personal
End If
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)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
@@ -8160,5 +8196,7 @@ Partial Class RH_Personal
args.IsValid = retorno
End Sub
End Class

View File

@@ -1510,7 +1510,7 @@ Partial Class Sistemas_UsuarioDetalle
Dim ObjUsuario As New ClsSisUsuarios()
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
ObjUsuario.Dispose()

View File

@@ -122,6 +122,11 @@ Partial Class ListadoContratos
Exit Sub
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
Dim ObjContratos As New ClsContratos

View File

@@ -6,6 +6,10 @@
<asp:Content ID="Content1" ContentPlaceHolderID="Css" runat="Server">
<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 {
width: 100%;
height: 100%;
@@ -851,23 +855,37 @@
// Crear eje X (DateAxis) para el encabezado
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.max = maxDate.getTime();
xAxisHeader.renderer.opposite = false; // Cambiado a false
xAxisHeader.renderer.minGridDistance = 50; // Ajusta según sea necesario para evitar superposición
xAxisHeader.renderer.minorGridEnabled = true;
xAxisHeader.renderer.minGridDistance = 1; // Ajusta según sea necesario para evitar superposición
xAxisHeader.renderer.minorGridEnabled = 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
xAxisHeader.renderer.labels.template.forceShow = true;
xAxisHeader.renderer.labels.template.location = 0.5;
xAxisHeader.renderer.labels.template.fontSize = 14;
xAxisHeader.renderer.labels.template.fontWeight = "bold";
// Formatear las etiquetas de fecha
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)
var yAxisHeader = chartHeader.yAxes.push(new am4charts.ValueAxis());
@@ -943,6 +961,8 @@
xAxisBody.renderer.labels.template.disabled = true;
xAxisBody.renderer.grid.template.disabled = true;
// Añadir la serie al gráfico principal
var seriesBody = chartBody.series.push(new am4charts.ColumnSeries());
seriesBody.dataFields.openDateX = "fromDate";

View File

@@ -10985,16 +10985,23 @@ Partial Class Ventas
AutoConta = True
End If
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
If ErrorList.Count = 0 AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
ErrorList.Add("Ocurrió un error al validar la prepóliza")
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
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
End If
'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
ObjVentas.Commit()
@@ -15354,15 +15361,12 @@ Partial Class Ventas
End If
Next
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
'ErrorPrepoliza = True
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
End If
End If
'If Not ErrorPrepoliza AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5, AutoConta:=AutoConta) Then
' If ObjConta.ValorPolizaDescuadre > 0 Then
' 'ErrorPrepoliza = True
' GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
' End If
'End If
If ErrorPrepoliza Then
Exit For
End If
@@ -15428,11 +15432,11 @@ Partial Class Ventas
End If
End If
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
End If
End If
'If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
' If ObjConta.ValorPolizaDescuadre > 0 Then
' GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
' End If
'End If
End If
End If
@@ -16409,23 +16413,23 @@ Partial Class Ventas
' Next
'End If
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
If ObjConta.ValorPolizaDescuadre = 2 Then
ErrorPrepoliza = True
Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
End If
'ErrorPrepoliza = True
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
'If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2, AutoConta:=AutoConta) Then
' If ObjConta.ValorPolizaDescuadre > 0 Then
' If ObjConta.ValorPolizaDescuadre = 2 Then
' ErrorPrepoliza = True
' Alert(ObjConta.MensajePolizaDescuadre, TipoMensaje.MsgError)
' End If
' 'ErrorPrepoliza = True
' GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
'SIRVE PARA VER LA PREPOLIZA QUE SE VALIDA
'If ObjConta.GetPrePolizasDetalle(ObjFactura.CvePrePoliza) Then
' Dim DtTest = ObjConta.DtResultados
'End If
End If
Else
ErrorPrepoliza = True
End If
' 'SIRVE PARA VER LA PREPOLIZA QUE SE VALIDA
' 'If ObjConta.GetPrePolizasDetalle(ObjFactura.CvePrePoliza) Then
' ' Dim DtTest = ObjConta.DtResultados
' 'End If
' End If
'Else
' ErrorPrepoliza = True
'End If
Return ErrorPrepoliza
Catch ex As Exception