-- merge e119
This commit is contained in:
@@ -6064,6 +6064,45 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetVentasPedimento(CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Inv_VentasPedimentosGet")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al consultar los productos por serie.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateVentasDetalleNumeroPedimento(CveVenta As Integer, CveVentaDetalle As Integer, NumeroPedimento As String) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_VentasDetalleNumeroPedimentoUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
|
||||||
|
.Add("@NumeroPedimento", SqlDbType.VarChar).Value = NumeroPedimento
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar el pedimento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region " IDisposable Support "
|
#Region " IDisposable Support "
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
|||||||
@@ -4426,7 +4426,7 @@ Public Class ClsPaginas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Shared Function GetCurrentPageViewState() As System.Web.UI.StateBag
|
Private Shared Function GetCurrentPageViewState() As System.Web.UI.StateBag
|
||||||
Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page)
|
Dim page As Page = TryCast(HttpContext.Current.CurrentHandler, Page)
|
||||||
Dim viewStateProp = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)
|
Dim viewStateProp As Reflection.PropertyInfo = page?.[GetType]().GetProperty("ViewState", Reflection.BindingFlags.FlattenHierarchy Or Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)
|
||||||
Return CType(viewStateProp?.GetValue(page), System.Web.UI.StateBag)
|
Return CType(viewStateProp?.GetValue(page), System.Web.UI.StateBag)
|
||||||
End Function
|
End Function
|
||||||
Public Shared Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoConfirmacion As String = "", Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "")
|
Public Shared Sub Alert(Mensaje As String, Optional pOpcion As TipoMensaje = TipoMensaje.MsgInformacion, Optional JSBtnAceptar As String = "", Optional timeout As Integer = 5, Optional ShowCloseButton As Boolean = True, Optional TextoConfirmacion As String = "", Optional TextoSegundoBoton As String = "", Optional JSBtn2 As String = "")
|
||||||
@@ -4521,11 +4521,11 @@ Public Class ClsPaginas
|
|||||||
End Sub
|
End Sub
|
||||||
Public Sub NotificacionesPendientes(Nota As String)
|
Public Sub NotificacionesPendientes(Nota As String)
|
||||||
'incremento el contador de alertas
|
'incremento el contador de alertas
|
||||||
Dim Type = Master.GetType
|
Dim Type As System.Type = Master.GetType
|
||||||
Dim Prop = Type.GetProperty("countNotificaciones")
|
Dim Prop As Reflection.PropertyInfo = Type.GetProperty("countNotificaciones")
|
||||||
Prop.SetValue(Master, 1 + CInt(Prop.GetValue(Master)))
|
Prop.SetValue(Master, 1 + CInt(Prop.GetValue(Master)))
|
||||||
'end incremento contador de alertas
|
'end incremento contador de alertas
|
||||||
Dim ltl = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal)
|
Dim ltl As Literal = DirectCast(Master.FindControl("LtlMNotificaciones"), Literal)
|
||||||
ltl.Text = String.Format(" {0} {1}", ltl.Text, Nota)
|
ltl.Text = String.Format(" {0} {1}", ltl.Text, Nota)
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub Confirmacion(Mensaje As String, Tipo As String, FuncionOK As String, FuncionCancel As String)
|
Public Sub Confirmacion(Mensaje As String, Tipo As String, FuncionOK As String, FuncionCancel As String)
|
||||||
@@ -4628,7 +4628,7 @@ Public Class ClsPaginas
|
|||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR, Content_Disposition)
|
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR, Content_Disposition)
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub ImprimirPDFStimulsoft(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment")
|
Public Sub ImprimirPDFStimul(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment")
|
||||||
Dim lrds As New List(Of ReportDataSource)
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
Dim rds As New ReportDataSource
|
Dim rds As New ReportDataSource
|
||||||
rds.Name = RDSName
|
rds.Name = RDSName
|
||||||
@@ -4638,7 +4638,7 @@ Public Class ClsPaginas
|
|||||||
If Formato.ToLower() = "excel" Then
|
If Formato.ToLower() = "excel" Then
|
||||||
Extension = "xlsx"
|
Extension = "xlsx"
|
||||||
End If
|
End If
|
||||||
ImprimirbytesPDF(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension)
|
ImprimirbytesPDF(StreamBytesStimul("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension)
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
|
Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
|
||||||
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
|
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
|
||||||
@@ -5110,7 +5110,7 @@ Public Class ClsPaginas
|
|||||||
#End Region
|
#End Region
|
||||||
#Region "IMPRIMIR FACTURA"
|
#Region "IMPRIMIR FACTURA"
|
||||||
|
|
||||||
Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimulsoft As Boolean = False) As Byte()
|
Public Function PdfFactura(ByRef Vta As Modelos.Factura, Optional AplicaPagare As String = "0", Optional Guardar As Boolean = True, Optional SubReportData As Modelos.MSubReportData = Nothing, Optional UsarStimul As Boolean = False) As Byte()
|
||||||
Dim retorno As Byte() = Nothing
|
Dim retorno As Byte() = Nothing
|
||||||
' Dim ObjVentas As New ClsVentas
|
' Dim ObjVentas As New ClsVentas
|
||||||
'DATOS GENERALES
|
'DATOS GENERALES
|
||||||
@@ -5947,7 +5947,7 @@ Public Class ClsPaginas
|
|||||||
lrds.Add(rds3)
|
lrds.Add(rds3)
|
||||||
Dim rds4 As New ReportDataSource With {.Name = "DataSet4", .Value = If(Vta.DtDocumentosRelacionados IsNot Nothing, Vta.DtDocumentosRelacionados, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
Dim rds4 As New ReportDataSource With {.Name = "DataSet4", .Value = If(Vta.DtDocumentosRelacionados IsNot Nothing, Vta.DtDocumentosRelacionados, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte
|
||||||
lrds.Add(rds4)
|
lrds.Add(rds4)
|
||||||
If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimulsoft Then
|
If UsuarioActual.Empresa.Funcionalidad(707) = "1" OrElse UsarStimul Then
|
||||||
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
If Vta.Cliente.CodigoRegimenFiscal.ToString.Length > 0 Then
|
||||||
params.Add(New ReportParameter("ClienteRegimenFiscal", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
|
params.Add(New ReportParameter("ClienteRegimenFiscal", $"{Vta.Cliente.CodigoRegimenFiscal}-{Vta.Cliente.RegimenFiscal}"))
|
||||||
End If
|
End If
|
||||||
@@ -5993,11 +5993,11 @@ Public Class ClsPaginas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then
|
||||||
Dim ArchivoStimulsfot As New System.IO.FileInfo(RutaFormato.Replace(".rdlc", ".mrt"))
|
Dim ArchivoStimulsfot As New System.IO.FileInfo(RutaFormato.Replace(".rdlc", ".mrt"))
|
||||||
If ArchivoStimulsfot.Exists Then
|
If ArchivoStimulsfot.Exists Then
|
||||||
UsarStimulsoft = True
|
UsarStimul = True
|
||||||
params.Add(New ReportParameter("RegimenFiscalEmpresa", String.Format("{0} - {1}", UsuarioActual.Empresa.CodigoRegimenFiscal, UsuarioActual.Empresa.RegimenFiscal)))
|
params.Add(New ReportParameter("RegimenFiscalEmpresa", String.Format("{0} - {1}", UsuarioActual.Empresa.CodigoRegimenFiscal, UsuarioActual.Empresa.RegimenFiscal)))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Not UsarStimulsoft Then
|
If Not UsarStimul Then
|
||||||
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
Dim Archivo As New System.IO.FileInfo(RutaFormato)
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
|
|
||||||
@@ -6029,7 +6029,7 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
|
RutaFormato = RutaFormato.Replace(".rdlc", ".mrt")
|
||||||
retorno = StreamBytesStimulsoft("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
|
retorno = StreamBytesStimul("Facturas", RutaFormato, lrds, params, NombreArchivo:=NombreArchivo, Formato:="PDF")
|
||||||
If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(707) = "1" Then
|
||||||
Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
|
Dim ArchivoPDF As New System.IO.FileInfo(String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio))
|
||||||
If Guardar Then
|
If Guardar Then
|
||||||
@@ -6057,7 +6057,7 @@ Public Class ClsPaginas
|
|||||||
End Try
|
End Try
|
||||||
Return retorno
|
Return retorno
|
||||||
End Function
|
End Function
|
||||||
Protected Function StreamBytesStimulsoft(Opcion As String, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional NombreDataSource As String = "Datos") As Byte()
|
Protected Function StreamBytesStimul(Opcion As String, RutaReporte As String, DataSource As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional NombreDataSource As String = "Datos") As Byte()
|
||||||
'limpio ReportViwer
|
'limpio ReportViwer
|
||||||
Dim sw As Stopwatch = Stopwatch.StartNew()
|
Dim sw As Stopwatch = Stopwatch.StartNew()
|
||||||
|
|
||||||
@@ -6119,12 +6119,12 @@ Public Class ClsPaginas
|
|||||||
New JProperty("parametros", paramsArray),
|
New JProperty("parametros", paramsArray),
|
||||||
New JProperty("dataSource", dataSourceArray)
|
New JProperty("dataSource", dataSourceArray)
|
||||||
)
|
)
|
||||||
Dim data = New StringContent(payload.ToString(), Encoding.UTF8, "application/json")
|
Dim data As New StringContent(payload.ToString(), Encoding.UTF8, "application/json")
|
||||||
Using httpClient = New HttpClient()
|
Using httpClient As New HttpClient()
|
||||||
Using request = New HttpRequestMessage(HttpMethod.Post, Url)
|
Using request As New HttpRequestMessage(HttpMethod.Post, Url)
|
||||||
'request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
'request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||||
request.Content = New StringContent(payload.ToString(), Encoding.UTF8, "application/json")
|
request.Content = New StringContent(payload.ToString(), Encoding.UTF8, "application/json")
|
||||||
Dim response = httpClient.SendAsync(request).Result
|
Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result
|
||||||
If response.StatusCode = Net.HttpStatusCode.OK Then
|
If response.StatusCode = Net.HttpStatusCode.OK Then
|
||||||
Bytes = response.Content.ReadAsByteArrayAsync().Result
|
Bytes = response.Content.ReadAsByteArrayAsync().Result
|
||||||
End If
|
End If
|
||||||
@@ -7521,7 +7521,7 @@ Public Class ClsPaginas
|
|||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveVentaAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
Else
|
Else
|
||||||
'Agregamos Nacional
|
'Agregamos Nacional
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
@@ -7533,7 +7533,7 @@ Public Class ClsPaginas
|
|||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, Pago.Referencia, Concepto, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
Else
|
Else
|
||||||
'Agregamos Nacional
|
'Agregamos Nacional
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveCompraAmortizacion, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
|
|||||||
@@ -411,7 +411,8 @@ Public Class ClsProductosServicios
|
|||||||
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
|
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
|
||||||
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
|
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
|
||||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Integer
|
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||||
|
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "") As Integer
|
||||||
Dim Retorno As Integer = -1
|
Dim Retorno As Integer = -1
|
||||||
|
|
||||||
DataAdapter("PA_ProductosServiciosAdd")
|
DataAdapter("PA_ProductosServiciosAdd")
|
||||||
@@ -509,6 +510,8 @@ Public Class ClsProductosServicios
|
|||||||
'Nuevo MLopez 18/11/2022
|
'Nuevo MLopez 18/11/2022
|
||||||
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
|
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
|
||||||
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
|
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
|
||||||
|
.Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
|
||||||
|
.Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -643,7 +646,8 @@ Public Class ClsProductosServicios
|
|||||||
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1,
|
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1,
|
||||||
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
|
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
|
||||||
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
|
||||||
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Boolean
|
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1,
|
||||||
|
Optional NombreComercial As String = "", Optional NotasAdicionales As String = "") As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -740,6 +744,8 @@ Public Class ClsProductosServicios
|
|||||||
'Nuevo MLopez 18/11/2022
|
'Nuevo MLopez 18/11/2022
|
||||||
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
|
.Add("@CveTipoEmpacado", SqlDbType.Int).Value = CveTipoEmpacado
|
||||||
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
|
.Add("@CveTipoOrganico", SqlDbType.Int).Value = CveTipoOrganico
|
||||||
|
.Add("@NombreComercial", SqlDbType.VarChar).Value = NombreComercial
|
||||||
|
.Add("@NotasAdicionales", SqlDbType.VarChar).Value = NotasAdicionales
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
|
|||||||
@@ -1476,11 +1476,14 @@ Public Class ClsVentas
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar el documento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al eliminar el detalle de la venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "V E N T A - P R E S U P U E S T O"
|
#Region "V E N T A - P R E S U P U E S T O"
|
||||||
|
|||||||
@@ -4162,14 +4162,6 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
|
||||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
ErrorList.Add("No se pudo simplificar los movimientos")
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ContPAQ El movimiento 1 es el de Venta
|
'ContPAQ El movimiento 1 es el de Venta
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
|
|
||||||
@@ -7123,7 +7115,7 @@ Namespace Modelos
|
|||||||
Public Property CvePAC As Integer
|
Public Property CvePAC As Integer
|
||||||
Public Property CveAnticipo As Integer
|
Public Property CveAnticipo As Integer
|
||||||
Public Property RemisionesLista As List(Of Integer)
|
Public Property RemisionesLista As List(Of Integer)
|
||||||
Public Property CveAlmacen As Integer
|
Public Property CveAlmacen As Integer = -1
|
||||||
Public Property GenerarSalidaAlmacen As Boolean = False
|
Public Property GenerarSalidaAlmacen As Boolean = False
|
||||||
Public Property CveConceptoMovimiento As Integer
|
Public Property CveConceptoMovimiento As Integer
|
||||||
Public Property MovimientoObservaciones As String
|
Public Property MovimientoObservaciones As String
|
||||||
@@ -7331,7 +7323,7 @@ Namespace Modelos
|
|||||||
Public Property TipoCambioDolares As Decimal
|
Public Property TipoCambioDolares As Decimal
|
||||||
Public Property ConvertirPesos As Boolean
|
Public Property ConvertirPesos As Boolean
|
||||||
Public Property ConvertirDolares As Boolean
|
Public Property ConvertirDolares As Boolean
|
||||||
Public Property FormaPago As Integer
|
Public Property FormaPago As Integer = 0
|
||||||
|
|
||||||
Public ReadOnly Property FormaPagoText As String
|
Public ReadOnly Property FormaPagoText As String
|
||||||
Get
|
Get
|
||||||
@@ -7346,7 +7338,7 @@ Namespace Modelos
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Property CondicionesPago As Integer
|
Public Property CondicionesPago As Integer = 0 ' 0 - Contado, 1 - Credito (CHECAR)
|
||||||
|
|
||||||
Public ReadOnly Property CondicionesPagoText As String
|
Public ReadOnly Property CondicionesPagoText As String
|
||||||
Get
|
Get
|
||||||
@@ -7597,10 +7589,10 @@ Namespace Modelos
|
|||||||
Public Property NumeroContrato As String = ""
|
Public Property NumeroContrato As String = ""
|
||||||
Public Property PedidoContrato As String = ""
|
Public Property PedidoContrato As String = ""
|
||||||
Public Property OrdenCompra As String = ""
|
Public Property OrdenCompra As String = ""
|
||||||
Public Property CveMetodoPago As Integer
|
Public Property CveMetodoPago As Integer = 0
|
||||||
Public Property MetodoPago As String = ""
|
Public Property MetodoPago As String = ""
|
||||||
Public Property ClaveMetodoPagoSAT As String = ""
|
Public Property ClaveMetodoPagoSAT As String = ""
|
||||||
Public Property CveMetodoPago33 As Integer
|
Public Property CveMetodoPago33 As Integer = 1
|
||||||
Public Property MetodoPago33 As String = ""
|
Public Property MetodoPago33 As String = ""
|
||||||
Public Property CveFormaPago33 As Integer
|
Public Property CveFormaPago33 As Integer
|
||||||
Public Property MetodoPagoSAT33 As String = ""
|
Public Property MetodoPagoSAT33 As String = ""
|
||||||
|
|||||||
@@ -252,255 +252,6 @@ Public Class Timbrado
|
|||||||
MsgCancelacion.AppendFormat("CvePAC:{0}", CvePACCancelacion)
|
MsgCancelacion.AppendFormat("CvePAC:{0}", CvePACCancelacion)
|
||||||
|
|
||||||
Select Case CvePACCancelacion
|
Select Case CvePACCancelacion
|
||||||
Case 1
|
|
||||||
MsgCancelacion.AppendFormat("1.1")
|
|
||||||
Try
|
|
||||||
Dim CFDi As New ClbNegBICFDv3_2.ClsNegEDI
|
|
||||||
Dim Respuesta As New ClbNegBICFDv3_2.ClsNegRespuesta
|
|
||||||
Respuesta = CFDi.CancelaCFdi(Empresa.BIUsuario, Empresa.BIContraseña, Empresa.Ruta & "Certificados\" & Empresa.ArchivoPfx, Empresa.ContraseñaKey, Empresa.RFC, FolioFiscal, "http://portalbiinform.com.mx/srvCFDi/service1.asmx")
|
|
||||||
|
|
||||||
If Respuesta IsNot Nothing AndAlso Respuesta.SelloSAT <> "" Then
|
|
||||||
Dim xml64 As String = ""
|
|
||||||
Dim myXml As String = Respuesta.SelloSAT
|
|
||||||
Dim resp As XElement = XElement.Parse(myXml)
|
|
||||||
For Each elem As XElement In resp.Descendants
|
|
||||||
If elem.Name = "xmlBase64" Then xml64 = elem.Value
|
|
||||||
Next
|
|
||||||
|
|
||||||
'If Respuesta.UUDI.Contiene("0", "201", "202") Then
|
|
||||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
|
||||||
xmlDoc.LoadXml(If(xml64 = "", Respuesta.SelloSAT, Encoding.UTF8.GetString(Convert.FromBase64String(xml64))))
|
|
||||||
Dim AcuseChild = xmlDoc.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.Name.Equals("Acuse", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
|
|
||||||
|
|
||||||
Dim FoliosChild = AcuseChild.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Folios", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
|
|
||||||
Dim SignatureChild = AcuseChild.ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Signature", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
|
|
||||||
|
|
||||||
Dim prefixFol As String = FoliosChild.Prefix
|
|
||||||
If prefixFol <> "" Then prefixFol = $"{prefixFol}:" 'se le agregan los ":" si tiene prefijo
|
|
||||||
|
|
||||||
CancelacionState = xmlDoc.GetElementsByTagName($"{prefixFol}EstatusUUID")(0).InnerText.ToEntero
|
|
||||||
'verificación basada en el resultado del xml.
|
|
||||||
If CancelacionState.Contiene(201, 202) Then
|
|
||||||
|
|
||||||
Dim prefixSig = SignatureChild.Prefix
|
|
||||||
If prefixSig <> "" Then prefixSig = $"{prefixSig}:" 'se le agregan los ":" si tiene prefijo
|
|
||||||
Dim SignatureValue = xmlDoc.GetElementsByTagName($"{prefixSig}SignatureValue")
|
|
||||||
CancelacionAcuse = If(SignatureValue.Count < 1, SignatureValue(0).InnerText, SignatureValue(0).InnerText)
|
|
||||||
Try
|
|
||||||
CancelacionFecha = AcuseChild.Attributes("Fecha").Value.ToDate
|
|
||||||
Catch ex As Exception
|
|
||||||
CancelacionFecha = xmlDoc.GetElementsByTagName("CancelaCFDResult")(0).Attributes("Fecha").Value.ToDate
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Retorno.Verificado = True
|
|
||||||
Retorno.CancelacionFecha = CancelacionFecha
|
|
||||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
|
||||||
End If
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
Me.GuardaLog(CFDi.MsgError)
|
|
||||||
End If
|
|
||||||
Respuesta = Nothing
|
|
||||||
CFDi = Nothing
|
|
||||||
Catch ex As Exception
|
|
||||||
GuardaLog($"{ex.Message}")
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Case 2
|
|
||||||
MsgCancelacion.AppendFormat("2.1")
|
|
||||||
Dim ArchivoLLave As String = $"{Empresa.Ruta}Certificados\{Empresa.ArchivoKey}"
|
|
||||||
Dim ArchivoCertificado As String = $"{Empresa.Ruta}Certificados\{Empresa.ArchivoCer}"
|
|
||||||
Dim UsuarioServicio As String = If(CvePACCancelacion = 2, Empresa.RFC, "rene.molina@adsistemas.mx")
|
|
||||||
Dim ClaveServicio As String = If(CvePACCancelacion = 2, Empresa.RFC.ToLower, "rene2018")
|
|
||||||
Dim Clave As String = Empresa.ContraseñaKey
|
|
||||||
Dim UrlServicio As String = "" ' Produccion
|
|
||||||
Select Case CvePACCancelacion
|
|
||||||
Case 2
|
|
||||||
UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL"
|
|
||||||
Case 4
|
|
||||||
UrlServicio = "http://192.168.0.2:8080/ADSistemas/Timbrado.asmx?WSDL"
|
|
||||||
End Select
|
|
||||||
|
|
||||||
If Not Empresa.FacturaProduccion Then
|
|
||||||
ArchivoLLave = $"{Empresa.Ruta}Certificados\CSD01_AAA010101AAA.key"
|
|
||||||
ArchivoCertificado = $"{Empresa.Ruta}Certificados\CSD01_AAA010101AAA.cer"
|
|
||||||
Select Case CvePACCancelacion
|
|
||||||
Case 2
|
|
||||||
UsuarioServicio = "fgomez"
|
|
||||||
ClaveServicio = "12121212"
|
|
||||||
UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL"
|
|
||||||
Case 4
|
|
||||||
UsuarioServicio = "UserTest"
|
|
||||||
ClaveServicio = "1234567890"
|
|
||||||
UrlServicio = "http://192.168.0.2:8080/ADSistemas/Timbrado.asmx?WSDL"
|
|
||||||
End Select
|
|
||||||
End If
|
|
||||||
|
|
||||||
#Region "Valida"
|
|
||||||
If Not File.Exists(ArchivoCertificado) Then
|
|
||||||
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
|
||||||
Retorno.Verificado = False
|
|
||||||
End If
|
|
||||||
If Not File.Exists(ArchivoLLave) Then
|
|
||||||
Alert("El archivo de llave privada no existe", TipoMensaje.MsgError)
|
|
||||||
Retorno.Verificado = False
|
|
||||||
End If
|
|
||||||
If Empresa.ContraseñaKey = "" Then
|
|
||||||
Alert("La clave no puede ser vacía", TipoMensaje.MsgError)
|
|
||||||
Retorno.Verificado = False
|
|
||||||
End If
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region "Variables"
|
|
||||||
Dim llaveByte As Byte(), certByte As Byte()
|
|
||||||
Dim llaveBase64 As String = "", certBase64 As String = ""
|
|
||||||
Dim cfdi As New RVCFDI.GeneraCFDI()
|
|
||||||
Dim complemento As String = ""
|
|
||||||
Dim complementoConcepto As String = ""
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region "Verifica"
|
|
||||||
Try
|
|
||||||
llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave)
|
|
||||||
llaveBase64 = Convert.ToBase64String(llaveByte)
|
|
||||||
Catch ex As Exception
|
|
||||||
Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError)
|
|
||||||
Retorno.Verificado = False
|
|
||||||
End Try
|
|
||||||
|
|
||||||
|
|
||||||
Try
|
|
||||||
certByte = System.IO.File.ReadAllBytes(ArchivoCertificado)
|
|
||||||
certBase64 = Convert.ToBase64String(certByte)
|
|
||||||
Catch ex As Exception
|
|
||||||
Alert($"Error al leer el certificado: {ex.Message}", TipoMensaje.MsgError)
|
|
||||||
Retorno.Verificado = False
|
|
||||||
End Try
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
|
|
||||||
Dim base64 As String
|
|
||||||
Dim ObjCancelacion As New RVCancelacion.Cancelacion()
|
|
||||||
|
|
||||||
Dim xmlCancelacion As String = ObjCancelacion.crearXMLCancelacion(certBase64, llaveBase64, Clave, FolioFiscal)
|
|
||||||
If (ObjCancelacion.MensajeDeError = "") Then
|
|
||||||
|
|
||||||
base64 = CodificarABase64(xmlCancelacion)
|
|
||||||
|
|
||||||
Dim objWS As RVCFDI.WSGeneraCFDI.Service = Nothing
|
|
||||||
Dim objAuthSoapHD As RVCFDI.WSGeneraCFDI.AuthSoapHd
|
|
||||||
Dim objResponse As RVCFDI.WSGeneraCFDI.StructCfd
|
|
||||||
Dim objCancel As RVCFDI.WSGeneraCFDI.StructCancel
|
|
||||||
|
|
||||||
Try
|
|
||||||
|
|
||||||
|
|
||||||
'Variables de consumo de servicio web
|
|
||||||
objWS = New RVCFDI.WSGeneraCFDI.Service()
|
|
||||||
objAuthSoapHD = New RVCFDI.WSGeneraCFDI.AuthSoapHd()
|
|
||||||
'creacion de Autorizacion de cabecera Soap
|
|
||||||
objCancel = New RVCFDI.WSGeneraCFDI.StructCancel()
|
|
||||||
'Configura el servicio
|
|
||||||
objWS.Url = UrlServicio
|
|
||||||
|
|
||||||
objAuthSoapHD.strPassword = ClaveServicio
|
|
||||||
objAuthSoapHD.strUserName = UsuarioServicio
|
|
||||||
'Coloca la cabecera
|
|
||||||
objWS.AuthSoapHdValue = objAuthSoapHD
|
|
||||||
'Obtiene el resultado
|
|
||||||
objCancel = objWS.CancelTicket(base64)
|
|
||||||
'Valida la respuesta
|
|
||||||
''Codigos del SAT
|
|
||||||
''201 - El folio se ha cancelado con éxito.
|
|
||||||
''202 - El CFDI ya había sido cancelado previamente.
|
|
||||||
''203 - UUID no corresponde al emisor.
|
|
||||||
''204 - El CFDI no aplica para cancelación.
|
|
||||||
''205 - El UUID no existe o no ha sido procesado por el SAT.
|
|
||||||
''402 - El Contribuyente no se encuentra el la LCO o la validez de obligaciones se reporta como negativa.
|
|
||||||
CancelacionState = objCancel.state
|
|
||||||
CancelacionMensaje = objCancel.Descripcion
|
|
||||||
|
|
||||||
If objCancel.state.Contiene(0, 201, 202) Then
|
|
||||||
CancelacionFecha = Now
|
|
||||||
|
|
||||||
Select Case CvePACCancelacion
|
|
||||||
Case 2
|
|
||||||
Dim solicitud As New WSRVConsultas.Service1SoapClient
|
|
||||||
Dim resp As New WSRVConsultas.resp_Acuse()
|
|
||||||
resp = solicitud.ConsultarAcuseCancelacion(RFCEmisor, UsuarioServicio, ClaveServicio, FolioFiscal, CancelacionFecha.ToShortDateString)
|
|
||||||
CancelacionMensaje = objCancel.Descripcion
|
|
||||||
|
|
||||||
If (resp.Estado = 0) Then
|
|
||||||
|
|
||||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
|
||||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)))
|
|
||||||
Dim xpath As String = "Acuse/Folios"
|
|
||||||
Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath)
|
|
||||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
|
||||||
|
|
||||||
xpath = "Acuse/Signature"
|
|
||||||
nodes = xmlDoc.SelectNodes(xpath)
|
|
||||||
|
|
||||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
|
||||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
|
||||||
Retorno.Verificado = True
|
|
||||||
Retorno.CancelacionFecha = CancelacionFecha
|
|
||||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
|
||||||
Else
|
|
||||||
CancelacionAcuse = resp.MensajeDeError
|
|
||||||
Retorno.Verificado = True
|
|
||||||
Retorno.CancelacionFecha = CancelacionFecha
|
|
||||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
|
||||||
End If
|
|
||||||
solicitud = Nothing
|
|
||||||
Case 4
|
|
||||||
|
|
||||||
Dim solicitud As New WSGF.Service1SoapClient
|
|
||||||
Dim resp As New WSGF.StructXml()
|
|
||||||
resp = solicitud.GetAcuse(RFCEmisor, UsuarioServicio, ClaveServicio, FolioFiscal)
|
|
||||||
CancelacionMensaje = objCancel.Descripcion
|
|
||||||
|
|
||||||
If (resp.Estado = 0) Then
|
|
||||||
|
|
||||||
Dim xmlDoc As New System.Xml.XmlDocument()
|
|
||||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.CfdiB64)))
|
|
||||||
Dim xpath As String = "Acuse/Folios"
|
|
||||||
Dim nodes As XmlNodeList = xmlDoc.SelectNodes(xpath)
|
|
||||||
CancelacionState = xmlDoc.GetElementsByTagName("EstatusUUID")(0).InnerText.ToEntero
|
|
||||||
|
|
||||||
xpath = "Acuse/Signature"
|
|
||||||
nodes = xmlDoc.SelectNodes(xpath)
|
|
||||||
|
|
||||||
CancelacionAcuse = xmlDoc.GetElementsByTagName("SignatureValue")(0).InnerText
|
|
||||||
CancelacionFecha = xmlDoc.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate
|
|
||||||
Retorno.Verificado = True
|
|
||||||
Retorno.CancelacionFecha = CancelacionFecha
|
|
||||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
|
||||||
Else
|
|
||||||
CancelacionAcuse = resp.Descripcion
|
|
||||||
Retorno.Verificado = True
|
|
||||||
Retorno.CancelacionAcuse = CancelacionAcuse
|
|
||||||
End If
|
|
||||||
solicitud = Nothing
|
|
||||||
End Select
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
CancelacionMensaje += $" | ex: {ex}"
|
|
||||||
Retorno.Verificado = False
|
|
||||||
End Try
|
|
||||||
|
|
||||||
'Libera memoria
|
|
||||||
objWS.Dispose()
|
|
||||||
objResponse = Nothing
|
|
||||||
objAuthSoapHD = Nothing
|
|
||||||
GC.Collect()
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
Case 3
|
Case 3
|
||||||
MsgCancelacion.AppendFormat("3.1")
|
MsgCancelacion.AppendFormat("3.1")
|
||||||
@@ -522,7 +273,6 @@ Public Class Timbrado
|
|||||||
AmbienteProductivo = False
|
AmbienteProductivo = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
#Region "Valida"
|
#Region "Valida"
|
||||||
If Not File.Exists(ArchivoCertificado) Then
|
If Not File.Exists(ArchivoCertificado) Then
|
||||||
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
||||||
@@ -537,7 +287,6 @@ Public Class Timbrado
|
|||||||
Retorno.Verificado = False
|
Retorno.Verificado = False
|
||||||
End If
|
End If
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Dim conector As New Profact.TimbraCFDI40.Conector(AmbienteProductivo)
|
Dim conector As New Profact.TimbraCFDI40.Conector(AmbienteProductivo)
|
||||||
|
|
||||||
If Not AmbienteProductivo Then
|
If Not AmbienteProductivo Then
|
||||||
@@ -545,16 +294,17 @@ Public Class Timbrado
|
|||||||
Else
|
Else
|
||||||
conector.EstableceCredenciales("vSGxMFWnNRy/nDoowxqrqw==|Sia123654")
|
conector.EstableceCredenciales("vSGxMFWnNRy/nDoowxqrqw==|Sia123654")
|
||||||
End If
|
End If
|
||||||
MsgCancelacion.AppendFormat("-3.2")
|
|
||||||
Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacion
|
|
||||||
resultadoCancelacion = conector.CancelaCFDI40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion)
|
|
||||||
CancelacionFecha = Now
|
|
||||||
Dim resp As Profact.TimbraCFDI.ResultadoConsulta
|
Dim resp As Profact.TimbraCFDI.ResultadoConsulta
|
||||||
|
MsgCancelacion.AppendFormat("-3.2")
|
||||||
|
Dim resultadoCancelacion As Profact.TimbraCFDI.ResultadoCancelacionAck
|
||||||
|
resultadoCancelacion = conector.CancelaCFDIAck40(RFCEmisor, FolioFiscal, CodigoSATMotivoCancelacion, FolioSustitucion)
|
||||||
|
CancelacionFecha = Now
|
||||||
|
|
||||||
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
|
resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal)
|
||||||
MsgCancelacion.AppendFormat("-3.3")
|
MsgCancelacion.AppendFormat("-3.3")
|
||||||
|
|
||||||
'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE (CODIGO DE ERROR "330279")
|
'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE (CODIGO DE ERROR "330279")
|
||||||
If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279") Then
|
If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279", "330280") Then
|
||||||
MsgCancelacion.AppendFormat("-3.4")
|
MsgCancelacion.AppendFormat("-3.4")
|
||||||
CancelacionMensaje = resultadoCancelacion.Descripcion
|
CancelacionMensaje = resultadoCancelacion.Descripcion
|
||||||
Retorno.CancelacionFecha = CancelacionFecha
|
Retorno.CancelacionFecha = CancelacionFecha
|
||||||
@@ -563,7 +313,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
MsgCancelacion.AppendFormat("-3.4.1")
|
MsgCancelacion.AppendFormat("-3.4.1")
|
||||||
Try
|
Try
|
||||||
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)))
|
xmlDoc.LoadXml(Encoding.UTF8.GetString(Convert.FromBase64String(resultadoCancelacion.Xml)))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
If resp.NumeroError.ToEntero() > 0 Then
|
If resp.NumeroError.ToEntero() > 0 Then
|
||||||
CancelacionMensaje = resp.Descripcion
|
CancelacionMensaje = resp.Descripcion
|
||||||
@@ -592,13 +342,11 @@ Public Class Timbrado
|
|||||||
Else
|
Else
|
||||||
Retorno.Verificado = False
|
Retorno.Verificado = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgCancelacion.AppendFormat("-3.5")
|
MsgCancelacion.AppendFormat("-3.5")
|
||||||
CancelacionAcuse = resp.NumeroError
|
CancelacionAcuse = resp.NumeroError
|
||||||
CancelacionMensaje = resultadoCancelacion.Descripcion
|
CancelacionMensaje = resultadoCancelacion.Descripcion
|
||||||
Retorno.Verificado = True
|
Retorno.Verificado = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 4
|
Case 4
|
||||||
@@ -610,7 +358,6 @@ Public Class Timbrado
|
|||||||
Dim Clave As String = Empresa.ContraseñaKey
|
Dim Clave As String = Empresa.ContraseñaKey
|
||||||
Dim UrlServicio As String = "" ' Produccion
|
Dim UrlServicio As String = "" ' Produccion
|
||||||
|
|
||||||
'UrlServicio = "http://alterno.gofac.com.mx/cfdi/timbrado.asmx?WSDL" ' alterno
|
|
||||||
UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL"
|
UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL"
|
||||||
|
|
||||||
If Not Empresa.FacturaProduccion Then
|
If Not Empresa.FacturaProduccion Then
|
||||||
@@ -620,9 +367,7 @@ Public Class Timbrado
|
|||||||
UsuarioServicio = "UserTest"
|
UsuarioServicio = "UserTest"
|
||||||
ClaveServicio = "1234567890"
|
ClaveServicio = "1234567890"
|
||||||
'UrlServicio = "http://juancalderon-001-site6.ftempurl.com/cancelacion.asmx?WSDL"
|
'UrlServicio = "http://juancalderon-001-site6.ftempurl.com/cancelacion.asmx?WSDL"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
#Region "Valida"
|
#Region "Valida"
|
||||||
If Not File.Exists(ArchivoCertificado) Then
|
If Not File.Exists(ArchivoCertificado) Then
|
||||||
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
||||||
@@ -644,8 +389,6 @@ Public Class Timbrado
|
|||||||
Dim objCan As New GoFac.GoCfdi()
|
Dim objCan As New GoFac.GoCfdi()
|
||||||
Dim complemento As String = ""
|
Dim complemento As String = ""
|
||||||
Dim complementoConcepto As String = ""
|
Dim complementoConcepto As String = ""
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Verifica"
|
#Region "Verifica"
|
||||||
@@ -656,8 +399,6 @@ Public Class Timbrado
|
|||||||
Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError)
|
Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError)
|
||||||
Retorno.Verificado = False
|
Retorno.Verificado = False
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
certByte = System.IO.File.ReadAllBytes(ArchivoCertificado)
|
certByte = System.IO.File.ReadAllBytes(ArchivoCertificado)
|
||||||
certBase64 = Convert.ToBase64String(certByte)
|
certBase64 = Convert.ToBase64String(certByte)
|
||||||
@@ -759,7 +500,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
If result IsNot Nothing Then
|
If result IsNot Nothing Then
|
||||||
If result.statusOk Then
|
If result.statusOk Then
|
||||||
Dim cancelacion = result.cancelaciones.First()
|
Dim cancelacion As PADECancelacion = result.cancelaciones.First()
|
||||||
If cancelacion IsNot Nothing Then
|
If cancelacion IsNot Nothing Then
|
||||||
'EN PROCESO, CANCELABLE SIN ACEPTACION,CANCEALDO PREVIAMENTE
|
'EN PROCESO, CANCELABLE SIN ACEPTACION,CANCEALDO PREVIAMENTE
|
||||||
If cancelacion.codigo.Contiene("96", "201", "202") Then
|
If cancelacion.codigo.Contiene("96", "201", "202") Then
|
||||||
@@ -1549,7 +1290,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
Dim y As Integer = 0
|
Dim y As Integer = 0
|
||||||
|
|
||||||
For Each Tras In ObjCFDITimbre.Traslados
|
For Each Tras As CFDITraslados In ObjCFDITimbre.Traslados
|
||||||
comprobante.Impuestos.Traslados(y) = New Profact.TimbraCFDI40.ComprobanteImpuestosTraslado()
|
comprobante.Impuestos.Traslados(y) = New Profact.TimbraCFDI40.ComprobanteImpuestosTraslado()
|
||||||
comprobante.Impuestos.Traslados(y).Base = Tras.Base.RoundSQL(NumDecimalesImporte)
|
comprobante.Impuestos.Traslados(y).Base = Tras.Base.RoundSQL(NumDecimalesImporte)
|
||||||
comprobante.Impuestos.Traslados(y).Impuesto = Tras.Impuesto
|
comprobante.Impuestos.Traslados(y).Impuesto = Tras.Impuesto
|
||||||
@@ -1588,7 +1329,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
|
|
||||||
If ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe) > 0 Then
|
If ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe) > 0 Then
|
||||||
Dim Imp = New Profact.TimbraCFDI.Complementos.ImpuestoLocal.ImpuestosLocales()
|
Dim Imp As New Profact.TimbraCFDI.Complementos.ImpuestoLocal.ImpuestosLocales()
|
||||||
Imp.version = "1.0"
|
Imp.version = "1.0"
|
||||||
Imp.TotaldeRetenciones = ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe).FormatoNumero().ToDecimal
|
Imp.TotaldeRetenciones = ObjCFDITimbre.RetencionesLocales.Sum(Function(x) x.Importe).FormatoNumero().ToDecimal
|
||||||
Imp.TotaldeTraslados = 0
|
Imp.TotaldeTraslados = 0
|
||||||
@@ -2064,7 +1805,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
Dim j As Integer = 0
|
Dim j As Integer = 0
|
||||||
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {}
|
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {}
|
||||||
For Each transp In concep.MercanciasCantidadTransporta
|
For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
|
||||||
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j) = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta
|
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j) = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta
|
||||||
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).Cantidad = transp.Cantidad
|
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).Cantidad = transp.Cantidad
|
||||||
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).IDOrigen = transp.IDOrigen
|
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta(j).IDOrigen = transp.IDOrigen
|
||||||
@@ -2484,7 +2225,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
If Not String.IsNullOrEmpty(resultadoTimbre.Detalle) Then
|
If Not String.IsNullOrEmpty(resultadoTimbre.Detalle) Then
|
||||||
Try
|
Try
|
||||||
Dim Resultados = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle)
|
Dim Resultados As JArray = Newtonsoft.Json.Linq.JArray.Parse(resultadoTimbre.Detalle)
|
||||||
|
|
||||||
If Resultados.Count > 0 Then
|
If Resultados.Count > 0 Then
|
||||||
If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then
|
If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then
|
||||||
@@ -2620,13 +2361,13 @@ Public Class Timbrado
|
|||||||
|
|
||||||
If ObjCFDITimbre.Retenciones.Sum(Function(x) x.Importe) > 0 Then
|
If ObjCFDITimbre.Retenciones.Sum(Function(x) x.Importe) > 0 Then
|
||||||
''se acumulan los importes
|
''se acumulan los importes
|
||||||
For Each Ret In ObjCFDITimbre.Retenciones
|
For Each Ret As CFDIRetenciones In ObjCFDITimbre.Retenciones
|
||||||
cfdi.Retencion(Ret.Impuesto, Ret.Importe)
|
cfdi.Retencion(Ret.Impuesto, Ret.Importe)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''se acumulan los importes
|
''se acumulan los importes
|
||||||
For Each Tras In ObjCFDITimbre.Traslados
|
For Each Tras As CFDITraslados In ObjCFDITimbre.Traslados
|
||||||
cfdi.Traslado(Tras.Base, Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe)
|
cfdi.Traslado(Tras.Base, Tras.Impuesto, Tras.TipoFactor, Tras.TasaOCuota, Tras.Importe)
|
||||||
Next
|
Next
|
||||||
#End Region
|
#End Region
|
||||||
@@ -2791,7 +2532,7 @@ Public Class Timbrado
|
|||||||
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
||||||
If concep.ValorMercancia <= 0 Then concep.Moneda = ""
|
If concep.ValorMercancia <= 0 Then concep.Moneda = ""
|
||||||
cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
||||||
For Each transp In concep.MercanciasCantidadTransporta
|
For Each transp As CFDICartaPorteMercanciaTransporta In concep.MercanciasCantidadTransporta
|
||||||
cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
||||||
Next
|
Next
|
||||||
Next
|
Next
|
||||||
@@ -3380,11 +3121,11 @@ Public Class Timbrado
|
|||||||
#Region "Timbra"
|
#Region "Timbra"
|
||||||
If RespGeneracionXML = "" Then
|
If RespGeneracionXML = "" Then
|
||||||
'OBTENER EL XML DE LA VARIABLE PRIVADA "_xml" YA QUE NO ES ACCESIBLE POR MEDIO DE LA PROPIEDAD "XML" ANTES DE TIMBRAR
|
'OBTENER EL XML DE LA VARIABLE PRIVADA "_xml" YA QUE NO ES ACCESIBLE POR MEDIO DE LA PROPIEDAD "XML" ANTES DE TIMBRAR
|
||||||
Dim valorXML = ""
|
Dim valorXML As String = ""
|
||||||
Try
|
Try
|
||||||
|
|
||||||
Dim tipo = GetType(GoFac.Cfdi4)
|
Dim tipo As Type = GetType(GoFac.Cfdi4)
|
||||||
Dim info = tipo.GetField("_xml", BindingFlags.NonPublic Or BindingFlags.Instance)
|
Dim info As FieldInfo = tipo.GetField("_xml", BindingFlags.NonPublic Or BindingFlags.Instance)
|
||||||
valorXML = info?.GetValue(cfdi).ToString()
|
valorXML = info?.GetValue(cfdi).ToString()
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
valorXML = ""
|
valorXML = ""
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim ObjUsuarios As New ClsSisUsuarios
|
Dim ObjUsuarios As New ClsSisUsuarios
|
||||||
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
||||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||||
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||||
UsuarioActual.CveEmpresa = CveEmpresa
|
UsuarioActual.CveEmpresa = CveEmpresa
|
||||||
CreaObjetoEmpresa(UsuarioActual)
|
CreaObjetoEmpresa(UsuarioActual)
|
||||||
@@ -87,11 +87,11 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||||
Dim retorno As String = ""
|
Dim retorno As String = ""
|
||||||
Try
|
Try
|
||||||
Dim Metodo = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
Dim Metodo As String = If(context.Request("Metodo") = Nothing, "", context.Request("Metodo").ToString())
|
||||||
|
|
||||||
If Metodo = "BASF_POG40" Then
|
If Metodo = "BASF_POG40" Then
|
||||||
context.Response.ContentType = "application/json"
|
context.Response.ContentType = "application/json"
|
||||||
Dim Auth = ValidarSolicitud(context)
|
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||||
|
|
||||||
If Auth.IsSucces Then
|
If Auth.IsSucces Then
|
||||||
retorno = ConsultaDatos(context)
|
retorno = ConsultaDatos(context)
|
||||||
@@ -104,7 +104,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
|
|
||||||
If Metodo = "ConsultarProductos" Then
|
If Metodo = "ConsultarProductos" Then
|
||||||
context.Response.ContentType = "application/json"
|
context.Response.ContentType = "application/json"
|
||||||
Dim Auth = ValidarSolicitud(context)
|
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||||
|
|
||||||
If Auth.IsSucces Then
|
If Auth.IsSucces Then
|
||||||
retorno = ConsultaProductos(context)
|
retorno = ConsultaProductos(context)
|
||||||
@@ -116,7 +116,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
|
|
||||||
If Metodo = "ConsultarClasificaciones" Then
|
If Metodo = "ConsultarClasificaciones" Then
|
||||||
context.Response.ContentType = "application/json"
|
context.Response.ContentType = "application/json"
|
||||||
Dim Auth = ValidarSolicitud(context)
|
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||||
|
|
||||||
If Auth.IsSucces Then
|
If Auth.IsSucces Then
|
||||||
retorno = ConsultaClasificaciones(context)
|
retorno = ConsultaClasificaciones(context)
|
||||||
@@ -181,7 +181,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim RespuestaError As New ResponseMsgError
|
Dim RespuestaError As New ResponseMsgError
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim strFecha = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString())
|
Dim strFecha As String = If(context.Request("Fecha") = Nothing, "", context.Request("Fecha").ToString())
|
||||||
|
|
||||||
If String.IsNullOrEmpty(strFecha) Then
|
If String.IsNullOrEmpty(strFecha) Then
|
||||||
RespuestaError.message = "Debe especificar una fecha"
|
RespuestaError.message = "Debe especificar una fecha"
|
||||||
@@ -238,7 +238,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim RespuestaError As New ResponseMsgError
|
Dim RespuestaError As New ResponseMsgError
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim CveClasificacion = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString())
|
Dim CveClasificacion As String = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString())
|
||||||
|
|
||||||
If String.IsNullOrEmpty(CveClasificacion) Then
|
If String.IsNullOrEmpty(CveClasificacion) Then
|
||||||
CveClasificacion = "-1"
|
CveClasificacion = "-1"
|
||||||
@@ -282,7 +282,7 @@ Public Class E119 : Implements IHttpHandler
|
|||||||
Dim Clasificaciones As JArray = Nothing
|
Dim Clasificaciones As JArray = Nothing
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion", "CveCategoria", "Categoria"}).DataTableToJSONIPP())
|
Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).DataTableToJSONIPP())
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
RespuestaError.message = "no se pudo obtener los datos"
|
RespuestaError.message = "no se pudo obtener los datos"
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
|||||||
@@ -222,7 +222,8 @@ Partial Class Bancos_DepositosCaja
|
|||||||
|
|
||||||
NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
NuevaCvePrePoliza = ObjConta.AddPrePolizas("DepCaja", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=1)
|
||||||
|
|
||||||
|
Dim IntermediarioFactura As Boolean = False
|
||||||
|
If UsuarioActual.CveEmpresa = 145 Then IntermediarioFactura = True
|
||||||
If ChkIntermediario.Checked Then
|
If ChkIntermediario.Checked Then
|
||||||
|
|
||||||
CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero
|
CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero
|
||||||
@@ -238,8 +239,10 @@ Partial Class Bancos_DepositosCaja
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, ImporteInter, 51, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario) Then
|
If Not IntermediarioFactura Then ' si factura no se manda al gasto sino se disminuye solo lo depositado
|
||||||
OcurrioError = True
|
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, ImporteInter, 51, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario) Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If IVA <> 0 Then
|
If IVA <> 0 Then
|
||||||
@@ -306,6 +309,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
|
Dim i As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||||
|
|
||||||
If Gvr.FCCheckBox("ChkFactura").Checked Then
|
If Gvr.FCCheckBox("ChkFactura").Checked Then
|
||||||
@@ -315,6 +319,12 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
|
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
|
||||||
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
|
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
|
||||||
|
|
||||||
|
'si es el primero, se descuenta la "comisión"
|
||||||
|
If i = 0 AndAlso IntermediarioFactura Then
|
||||||
|
Importe = Importe - ImporteInter
|
||||||
|
i += 1
|
||||||
|
End If
|
||||||
|
|
||||||
'Datos de las Prepolizas A Cancelar
|
'Datos de las Prepolizas A Cancelar
|
||||||
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
|
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
|
||||||
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
||||||
@@ -328,7 +338,6 @@ Partial Class Bancos_DepositosCaja
|
|||||||
End If
|
End If
|
||||||
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then
|
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, Importe * TipoCambio, 30, SerieFolio, String.Format("Depósito Bancario: {0}", SerieFolio), CveClasificacion:=CveClasificacion, CveSubProyecto:=tCveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
@@ -350,9 +350,9 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
Private Function GuardaTXT() As Boolean
|
Private Function GuardaTXT() As Boolean
|
||||||
Dim Retorno = True
|
Dim Retorno As Boolean = True
|
||||||
Try
|
Try
|
||||||
Dim Ruta = ""
|
Dim Ruta As String = ""
|
||||||
Dim FileName As String = Path.GetFileName(FUTxt.PostedFile.FileName)
|
Dim FileName As String = Path.GetFileName(FUTxt.PostedFile.FileName)
|
||||||
NombreArchivo = FileName
|
NombreArchivo = FileName
|
||||||
Dim Extension As String = Path.GetExtension(FUTxt.PostedFile.FileName)
|
Dim Extension As String = Path.GetExtension(FUTxt.PostedFile.FileName)
|
||||||
@@ -438,7 +438,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LBRegenerar_Click(sender As Object, e As EventArgs)
|
Protected Sub LBRegenerar_Click(sender As Object, e As EventArgs)
|
||||||
Dim CveBLE = CType(sender, LinkButton).CommandArgument.ToEntero
|
Dim CveBLE As Integer = CType(sender, LinkButton).CommandArgument.ToEntero
|
||||||
Dim DtRegenerar As New DataTable
|
Dim DtRegenerar As New DataTable
|
||||||
|
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
@@ -523,11 +523,11 @@ Partial Class Bancos_PagoElectronico
|
|||||||
TotalAcumulado = 0
|
TotalAcumulado = 0
|
||||||
|
|
||||||
''VALIDA CUENTAS DEPOSITOS
|
''VALIDA CUENTAS DEPOSITOS
|
||||||
Dim ErrorCuenta = False
|
Dim ErrorCuenta As Boolean = False
|
||||||
Dim ProveedoresError As StringBuilder = New StringBuilder
|
Dim ProveedoresError As StringBuilder = New StringBuilder
|
||||||
ProveedoresError.AppendFormat("<table width='600px'><thead><tr><td width='300px'>Proveedor</td><td width='150px'>Cuenta</td><td width='150px'>Error</td></tr></thead><tbody>")
|
ProveedoresError.AppendFormat("<table width='600px'><thead><tr><td width='300px'>Proveedor</td><td width='150px'>Cuenta</td><td width='150px'>Error</td></tr></thead><tbody>")
|
||||||
Dim TotalDetalles As Integer = 0
|
Dim TotalDetalles As Integer = 0
|
||||||
Dim EsBancomer = False
|
Dim EsBancomer As Boolean = False
|
||||||
For Each gvr As DataRow In DtTemp.Rows
|
For Each gvr As DataRow In DtTemp.Rows
|
||||||
If gvr("CveCuentaDeposito").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then
|
If gvr("CveCuentaDeposito").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then
|
||||||
DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString))
|
DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString))
|
||||||
@@ -626,7 +626,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Descargas.AppendFormat("<li><a href=""#"" class=""Texto"" onclick=""fncg();"">Descargar Reporte</a></li>", NombreArchivo)
|
Descargas.AppendFormat("<li><a href=""#"" class=""Texto"" onclick=""fncg();"">Descargar Reporte</a></li>", NombreArchivo)
|
||||||
|
|
||||||
|
|
||||||
Dim TextoErrorProveedores = ""
|
Dim TextoErrorProveedores As String = ""
|
||||||
If ProveedoresError.Length > 160 Then TextoErrorProveedores = String.Format("<br /><br /><br />Proveedores con Error: <br/><br/>------------------------------------------------------------------<br/>{0}<br /><br />", ProveedoresError.ToString)
|
If ProveedoresError.Length > 160 Then TextoErrorProveedores = String.Format("<br /><br /><br />Proveedores con Error: <br/><br/>------------------------------------------------------------------<br/>{0}<br /><br />", ProveedoresError.ToString)
|
||||||
|
|
||||||
Alert(String.Format("<br />El Layout fue creado satisfactoriamente.{1}<br />Descargas:<ul>{0}</ul>", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion)
|
Alert(String.Format("<br />El Layout fue creado satisfactoriamente.{1}<br />Descargas:<ul>{0}</ul>", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion)
|
||||||
@@ -639,7 +639,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub CrearDetalle()
|
Protected Sub CrearDetalle()
|
||||||
Dim Resultado = True
|
Dim Resultado As Boolean = True
|
||||||
Dim CuentaDeposito As String = ""
|
Dim CuentaDeposito As String = ""
|
||||||
Dim TipoCuentaDeposito As String = ""
|
Dim TipoCuentaDeposito As String = ""
|
||||||
Dim TipoCuenta As String = ""
|
Dim TipoCuenta As String = ""
|
||||||
@@ -710,7 +710,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
|
|
||||||
''LLENA DT PARA REPORTE
|
''LLENA DT PARA REPORTE
|
||||||
Dim Row = DtAlta.NewRow()
|
Dim Row As DataRow = DtAlta.NewRow()
|
||||||
Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
||||||
Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
|
Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
|
||||||
Row("TipoCuenta") = TipoCuentaDeposito
|
Row("TipoCuenta") = TipoCuentaDeposito
|
||||||
@@ -722,7 +722,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
'Persona Moral
|
'Persona Moral
|
||||||
If DTPendienteActual(0)("RFC").ToString.Length = 12 Then
|
If DTPendienteActual(0)("RFC").ToString.Length = 12 Then
|
||||||
Dim fecha As String = DTPendienteActual(0)("FechaIng").ToString
|
Dim fecha As String = DTPendienteActual(0)("FechaIng").ToString
|
||||||
Dim NombreProveedor = DTPendienteActual(0)("RazonSocial").ToString.Replace("‚"c, Vacio).Replace("‚"c, Vacio).ToUpper.PadRight(50)
|
Dim NombreProveedor As String = DTPendienteActual(0)("RazonSocial").ToString.Replace("‚"c, Vacio).Replace("‚"c, Vacio).ToUpper.PadRight(50)
|
||||||
NombreProveedor = If(NombreProveedor.Length > 50, NombreProveedor.Substring(0, 50), NombreProveedor)
|
NombreProveedor = If(NombreProveedor.Length > 50, NombreProveedor.Substring(0, 50), NombreProveedor)
|
||||||
|
|
||||||
'Campo 18-20 del detalle
|
'Campo 18-20 del detalle
|
||||||
@@ -759,7 +759,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Dim NombreComplejo As New List(Of String)
|
Dim NombreComplejo As New List(Of String)
|
||||||
|
|
||||||
'ignoramos cualquier palabra del nombre que tenga un length igual o menor a 2
|
'ignoramos cualquier palabra del nombre que tenga un length igual o menor a 2
|
||||||
For index = 0 To Nombre.Length - 1
|
For index As Integer = 0 To Nombre.Length - 1
|
||||||
If Nombre(index).Length > 2 Then
|
If Nombre(index).Length > 2 Then
|
||||||
NombreComplejo.Add(Nombre(index))
|
NombreComplejo.Add(Nombre(index))
|
||||||
End If
|
End If
|
||||||
@@ -772,10 +772,10 @@ Partial Class Bancos_PagoElectronico
|
|||||||
ElseIf NombreComplejo.Count = 4 Then
|
ElseIf NombreComplejo.Count = 4 Then
|
||||||
DetalleTexto &= String.Format("F{0}{1}{2}{3}", Vacio.PadRight(70), (NombreComplejo.Item(0) & " " & NombreComplejo.Item(1)).PadRight(20).Substring(0, 20), NombreComplejo.Item(2).PadRight(20).Substring(0, 20), NombreComplejo.Item(3).PadRight(20).Substring(0, 20))
|
DetalleTexto &= String.Format("F{0}{1}{2}{3}", Vacio.PadRight(70), (NombreComplejo.Item(0) & " " & NombreComplejo.Item(1)).PadRight(20).Substring(0, 20), NombreComplejo.Item(2).PadRight(20).Substring(0, 20), NombreComplejo.Item(3).PadRight(20).Substring(0, 20))
|
||||||
ElseIf NombreComplejo.Count > 4 Then
|
ElseIf NombreComplejo.Count > 4 Then
|
||||||
Dim Nombres = ""
|
Dim Nombres As String = ""
|
||||||
|
|
||||||
'todas las palabras menos las 2 ultimas forman parte del nombre
|
'todas las palabras menos las 2 ultimas forman parte del nombre
|
||||||
For index = 0 To NombreComplejo.Count - 3
|
For index As Integer = 0 To NombreComplejo.Count - 3
|
||||||
If Nombres <> "" Then Nombres += " "
|
If Nombres <> "" Then Nombres += " "
|
||||||
Nombres += NombreComplejo.Item(index)
|
Nombres += NombreComplejo.Item(index)
|
||||||
Next
|
Next
|
||||||
@@ -810,7 +810,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
|
HeaderTexto &= String.Format("{0}{1}", IdentificadoUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
|
||||||
'Campos #6-8 del Header
|
'Campos #6-8 del Header
|
||||||
HeaderTexto &= String.Format("00").PadRight(586)
|
HeaderTexto &= String.Format("00").PadRight(586)
|
||||||
Dim HeaderLength = HeaderTexto.Length
|
Dim HeaderLength As Integer = HeaderTexto.Length
|
||||||
|
|
||||||
''''' LLENADO DE TRAILER
|
''''' LLENADO DE TRAILER
|
||||||
TrailerTexto = String.Format("T{0}{1}{2}", Registros.ToString.PadLeft(10, PadCeros), Vacio.PadRight(50, PadCeros), Vacio.PadRight(575))
|
TrailerTexto = String.Format("T{0}{1}{2}", Registros.ToString.PadLeft(10, PadCeros), Vacio.PadRight(50, PadCeros), Vacio.PadRight(575))
|
||||||
@@ -873,18 +873,18 @@ Partial Class Bancos_PagoElectronico
|
|||||||
'Insertar en LayoutEnvios
|
'Insertar en LayoutEnvios
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
ObjBancos.IniciaTransacSQL()
|
ObjBancos.IniciaTransacSQL()
|
||||||
Dim ErrorLayout = False
|
Dim ErrorLayout As Boolean = False
|
||||||
|
|
||||||
Dim TotalDetalles As Integer = 0
|
Dim TotalDetalles As Integer = 0
|
||||||
|
|
||||||
'CREA CARPETA SI NO EXISTE
|
'CREA CARPETA SI NO EXISTE
|
||||||
Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/", UsuarioActual.CveEmpresa))
|
Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/", UsuarioActual.CveEmpresa))
|
||||||
Dim exists = System.IO.Directory.Exists(path)
|
Dim exists As Boolean = System.IO.Directory.Exists(path)
|
||||||
If Not exists Then
|
If Not exists Then
|
||||||
System.IO.Directory.CreateDirectory(path)
|
System.IO.Directory.CreateDirectory(path)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveIEs = ""
|
Dim CveIEs As String = ""
|
||||||
CreaDtPago()
|
CreaDtPago()
|
||||||
|
|
||||||
For Each gvr As DataRow In DTTemp.Rows
|
For Each gvr As DataRow In DTTemp.Rows
|
||||||
@@ -915,7 +915,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
'GUARDAMOS EL ENVIO SI NO ES REGENERACION
|
'GUARDAMOS EL ENVIO SI NO ES REGENERACION
|
||||||
Else
|
Else
|
||||||
Dim CveLayoutEnvio = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta)
|
Dim CveLayoutEnvio As Integer = ObjBancos.AddLayoutEnvios(NombreArchivo, Date.Now, CveCuenta)
|
||||||
|
|
||||||
If CveLayoutEnvio > 0 Then
|
If CveLayoutEnvio > 0 Then
|
||||||
For Each dr As DataRow In DTTemp.Rows
|
For Each dr As DataRow In DTTemp.Rows
|
||||||
@@ -937,7 +937,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
|
|
||||||
Dim Des = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
Dim Des As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||||
Dim Descargas As New StringBuilder()
|
Dim Descargas As New StringBuilder()
|
||||||
Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?File={0}"" target='_blank'>TXT</a></li>", NombreArchivo)
|
Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?File={0}"" target='_blank'>TXT</a></li>", NombreArchivo)
|
||||||
' Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?REPORTE=S"" target='_blank'>Reporte</a></li>", NombreArchivo)
|
' Descargas.AppendFormat("<li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?REPORTE=S"" target='_blank'>Reporte</a></li>", NombreArchivo)
|
||||||
@@ -978,7 +978,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
|
|
||||||
''CLAVE DE REGISTRO PARA CONTROL PROPIO ADSISTEMAS -- orita se esta guardando en el campo #9
|
''CLAVE DE REGISTRO PARA CONTROL PROPIO ADSISTEMAS -- orita se esta guardando en el campo #9
|
||||||
Dim Cve = String.Format("CVEIE{0}", DTPendienteActual(0)("CveIE").ToString).ToUpper 'cveIE
|
Dim Cve As String = String.Format("CVEIE{0}", DTPendienteActual(0)("CveIE").ToString).ToUpper 'cveIE
|
||||||
|
|
||||||
|
|
||||||
''''' LLENADO DE DETALLE
|
''''' LLENADO DE DETALLE
|
||||||
@@ -1002,17 +1002,15 @@ Partial Class Bancos_PagoElectronico
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'OBTENEMOS EL CORREO DEL PROVEEDOR
|
'OBTENEMOS EL CORREO DEL PROVEEDOR
|
||||||
Dim Correo = CorreoNotificacionesEmpresa.ToUpper.PadRight(50)
|
Dim Correo As String = CorreoNotificacionesEmpresa.ToUpper.PadRight(50)
|
||||||
'Correo = If(Correo.Length > 0, Correo.ToUpper.PadRight(50), Vacio.PadRight(50))
|
'Correo = If(Correo.Length > 0, Correo.ToUpper.PadRight(50), Vacio.PadRight(50))
|
||||||
|
|
||||||
'Campos 24-50 del Detalle 0 1 2 3 4 5 6 7 8 9
|
'Campos 24-50 del Detalle 0 1 2 3 4 5 6 7 8 9
|
||||||
DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), DateTime.Now.ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52))
|
DetalleTexto &= String.Format("{0}{1}FA{2}{3}01{4}N{5}{6}{7}{7}{7}{6}N {7}700{8}{9}{7}", Divisa, Vacio.PadLeft(20), Importe.FormatoNumero.Replace(",", "").Replace(".", "").PadLeft(15, PadCeros), Vacio.PadRight(15, PadCeros), Correo, Vacio.PadRight(12, PadCeros), DateTime.Now.ToString("yyyy-MM-dd"), "0001-01-01", Observaciones.PadRight(700), Vacio.PadRight(52))
|
||||||
TotalAcumulado += Importe.ToDouble
|
TotalAcumulado += Importe.ToDouble
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
''LLENA DTPAGOS PARA REPORTE
|
''LLENA DTPAGOS PARA REPORTE
|
||||||
Dim Row = DtPago.NewRow()
|
Dim Row As DataRow = DtPago.NewRow()
|
||||||
Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
||||||
|
|
||||||
If DTPendienteActual(0)("CIE").ToString <> "" Then
|
If DTPendienteActual(0)("CIE").ToString <> "" Then
|
||||||
@@ -1070,7 +1068,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
|
|
||||||
Protected Sub BtnCargarAlta_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCargarAlta_Click(sender As Object, e As EventArgs)
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
|
|
||||||
If FUTxt.HasFile Then
|
If FUTxt.HasFile Then
|
||||||
If Not GuardaTXT() Then
|
If Not GuardaTXT() Then
|
||||||
@@ -1090,18 +1088,18 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Texto = sr.ReadToEnd()
|
Texto = sr.ReadToEnd()
|
||||||
sr.Close()
|
sr.Close()
|
||||||
|
|
||||||
Dim TextoArreglo() = Texto.Split(CChar(vbCrLf))
|
Dim TextoArreglo As String() = Texto.Split(CChar(vbCrLf))
|
||||||
|
|
||||||
'Alert(TextoArreglo.Length.ToString)
|
'Alert(TextoArreglo.Length.ToString)
|
||||||
|
|
||||||
'LEE LINEA POR LINEA
|
'LEE LINEA POR LINEA
|
||||||
Dim RespuestaHeader = "", RespuestaDetalle = "", RespuestaTrailer = "", CveCuentasDeposito = ""
|
Dim RespuestaHeader As String = "", RespuestaDetalle As String = "", RespuestaTrailer As String = "", CveCuentasDeposito As String = ""
|
||||||
CreaDtAlta()
|
CreaDtAlta()
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
Dim Row As DataRow = Nothing
|
Dim Row As DataRow = Nothing
|
||||||
Dim TipoCuentaDeposito = ""
|
Dim TipoCuentaDeposito As String = ""
|
||||||
|
|
||||||
For i = 0 To TextoArreglo.Length - 1 Step 1
|
For i As Integer = 0 To TextoArreglo.Length - 1 Step 1
|
||||||
'Valida que el primer renglon sea el HEADER
|
'Valida que el primer renglon sea el HEADER
|
||||||
If i = 0 Then
|
If i = 0 Then
|
||||||
If TextoArreglo(i).Substring(0, 1) <> "H" Then
|
If TextoArreglo(i).Substring(0, 1) <> "H" Then
|
||||||
@@ -1211,10 +1209,10 @@ Partial Class Bancos_PagoElectronico
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'DIVIDE DETALLE
|
'DIVIDE DETALLE
|
||||||
Dim Detalle() = RespuestaDetalle.Split(CChar(vbCrLf))
|
Dim Detalle As String() = RespuestaDetalle.Split(CChar(vbCrLf))
|
||||||
|
|
||||||
'DIVIDE TRAILER
|
'DIVIDE TRAILER
|
||||||
Dim Trailer() = RespuestaTrailer.Split(CChar(vbCrLf))
|
Dim Trailer As String() = RespuestaTrailer.Split(CChar(vbCrLf))
|
||||||
|
|
||||||
'ARMADO DE RESPUESTA
|
'ARMADO DE RESPUESTA
|
||||||
Respuesta.AppendFormat("<br/>Resumen de respuesta: {0} <br/>", RespuestaHeader)
|
Respuesta.AppendFormat("<br/>Resumen de respuesta: {0} <br/>", RespuestaHeader)
|
||||||
@@ -1225,9 +1223,9 @@ Partial Class Bancos_PagoElectronico
|
|||||||
'For i = 0 To Detalle.Length - 1
|
'For i = 0 To Detalle.Length - 1
|
||||||
' Respuesta.AppendFormat("<tr><td align='center'>{0}</td>{1}</tr>", i + 1, Detalle(i).Trim)
|
' Respuesta.AppendFormat("<tr><td align='center'>{0}</td>{1}</tr>", i + 1, Detalle(i).Trim)
|
||||||
'Next
|
'Next
|
||||||
Dim i = 1
|
Dim i As Integer = 1
|
||||||
Dim Style = ""
|
Dim Style As String = ""
|
||||||
Dim TotalExitos = 0, TotalFracasos = 0
|
Dim TotalExitos As Integer = 0, TotalFracasos As Integer = 0
|
||||||
For Each dr As DataRow In DtAlta.Rows
|
For Each dr As DataRow In DtAlta.Rows
|
||||||
|
|
||||||
If dr("estatus").ToString.Trim.Contiene("OPERACION EXITOSA", "ALTA TERCERO EXITOSO") Then
|
If dr("estatus").ToString.Trim.Contiene("OPERACION EXITOSA", "ALTA TERCERO EXITOSO") Then
|
||||||
@@ -1258,11 +1256,11 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
If CveCuentasDeposito <> "" Then
|
If CveCuentasDeposito <> "" Then
|
||||||
Dim ObjIE As New ClsBancos
|
Dim ObjIE As New ClsBancos
|
||||||
Dim ErrorDB = False
|
Dim ErrorDB As Boolean = False
|
||||||
ObjIE.IniciaTransacSQL()
|
ObjIE.IniciaTransacSQL()
|
||||||
Dim ArrayCuentasDeposito() = CveCuentasDeposito.Split(","c)
|
Dim ArrayCuentasDeposito As String() = CveCuentasDeposito.Split(","c)
|
||||||
|
|
||||||
For index = 0 To ArrayCuentasDeposito.Length - 1
|
For index As Integer = 0 To ArrayCuentasDeposito.Length - 1
|
||||||
If Not ObjIE.UpdateCuentaDepositoPagoElectronico(ArrayCuentasDeposito(index).ToEntero) Then
|
If Not ObjIE.UpdateCuentaDepositoPagoElectronico(ArrayCuentasDeposito(index).ToEntero) Then
|
||||||
ErrorDB = True
|
ErrorDB = True
|
||||||
End If
|
End If
|
||||||
@@ -1323,8 +1321,8 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
|
|
||||||
Protected Sub BtnCargarPago_Click(sender As Object, e As System.EventArgs)
|
Protected Sub BtnCargarPago_Click(sender As Object, e As System.EventArgs)
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
Dim TextoErrorArchivo = "Ocurrió un problema al leer el archivo, por favor revise que el archivo sea el correcto e intente de nuevo."
|
Dim TextoErrorArchivo As String = "Ocurrió un problema al leer el archivo, por favor revise que el archivo sea el correcto e intente de nuevo."
|
||||||
|
|
||||||
If FUTxt.HasFile Then
|
If FUTxt.HasFile Then
|
||||||
If Not GuardaTXT() Then
|
If Not GuardaTXT() Then
|
||||||
@@ -1342,17 +1340,17 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Dim sr As New System.IO.StreamReader(NombreArchivo)
|
Dim sr As New System.IO.StreamReader(NombreArchivo)
|
||||||
Texto = sr.ReadToEnd()
|
Texto = sr.ReadToEnd()
|
||||||
sr.Close()
|
sr.Close()
|
||||||
Dim TextoArreglo() = Texto.Split(CChar(vbCrLf))
|
Dim TextoArreglo As String() = Texto.Split(CChar(vbCrLf))
|
||||||
|
|
||||||
'INICIALIZA VARIABLES
|
'INICIALIZA VARIABLES
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
Dim RespuestaHeader = "", RespuestaDetalle = "", RespuestaTrailer = "", Proveedor = "", CuentaAbono = "", Estatus = "", CveIEs = "", EstatusIEs = "", FechaMovto = "", Correos = ""
|
Dim RespuestaHeader As String = "", RespuestaDetalle As String = "", RespuestaTrailer As String = "", Proveedor As String = "", CuentaAbono As String = "", Estatus As String = "", CveIEs As String = "", EstatusIEs As String = "", FechaMovto As String = "", Correos As String = ""
|
||||||
Dim Row As DataRow = Nothing
|
Dim Row As DataRow = Nothing
|
||||||
Dim Convenio = ""
|
Dim Convenio As String = ""
|
||||||
CreaDtPago()
|
CreaDtPago()
|
||||||
|
|
||||||
'LEE LINEA POR LINEA
|
'LEE LINEA POR LINEA
|
||||||
For i = 0 To TextoArreglo.Length - 1
|
For i As Integer = 0 To TextoArreglo.Length - 1
|
||||||
'Valida que el primer renglon sea el HEADER
|
'Valida que el primer renglon sea el HEADER
|
||||||
If i = 0 Then
|
If i = 0 Then
|
||||||
If TextoArreglo(i).Substring(0, 1) <> "H" Then
|
If TextoArreglo(i).Substring(0, 1) <> "H" Then
|
||||||
@@ -1504,7 +1502,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
If Not ErrorArchivo Then
|
If Not ErrorArchivo Then
|
||||||
|
|
||||||
'DIVIDE HEADER
|
'DIVIDE HEADER
|
||||||
Dim Header() = RespuestaHeader.Split(CChar("|"))
|
Dim Header As String() = RespuestaHeader.Split(CChar("|"))
|
||||||
'TRADUCE CODIGO RESPUESTA HEADER
|
'TRADUCE CODIGO RESPUESTA HEADER
|
||||||
If Header(0) = "01" Then
|
If Header(0) = "01" Then
|
||||||
RespuestaHeader = "ACEPTADO TOTAL"
|
RespuestaHeader = "ACEPTADO TOTAL"
|
||||||
@@ -1516,14 +1514,14 @@ Partial Class Bancos_PagoElectronico
|
|||||||
RespuestaHeader += String.Format("<br/>Cuenta Cargo: {0}", Header(1))
|
RespuestaHeader += String.Format("<br/>Cuenta Cargo: {0}", Header(1))
|
||||||
|
|
||||||
'DIVIDE DETALLE
|
'DIVIDE DETALLE
|
||||||
Dim Detalle() = RespuestaDetalle.Split(CChar(vbCrLf))
|
Dim Detalle As String() = RespuestaDetalle.Split(CChar(vbCrLf))
|
||||||
|
|
||||||
'ARMADO DE RESPUESTA
|
'ARMADO DE RESPUESTA
|
||||||
Respuesta.AppendFormat("<br/>Resumen de respuesta: {0}<br/>", RespuestaHeader)
|
Respuesta.AppendFormat("<br/>Resumen de respuesta: {0}<br/>", RespuestaHeader)
|
||||||
Respuesta.AppendFormat("Numero de movimientos: {0} <br/><br/>", Detalle.Length.ToString)
|
Respuesta.AppendFormat("Numero de movimientos: {0} <br/><br/>", Detalle.Length.ToString)
|
||||||
Respuesta.Append("----------------------------------------------------- Detalle de los movimientos -------------------------------------------------- <br/> ")
|
Respuesta.Append("----------------------------------------------------- Detalle de los movimientos -------------------------------------------------- <br/> ")
|
||||||
Respuesta.Append("<table width='700px'><thead><tr><td width='30px' align='center'>#</td><td width='200px'>Proveedor</td><td width='50px'>Importe($)</td><td width='10px'></td><td width='30px' align='center'>Moneda</td><td width='300px'>Estatus</td></tr></thead><tbody>")
|
Respuesta.Append("<table width='700px'><thead><tr><td width='30px' align='center'>#</td><td width='200px'>Proveedor</td><td width='50px'>Importe($)</td><td width='10px'></td><td width='30px' align='center'>Moneda</td><td width='300px'>Estatus</td></tr></thead><tbody>")
|
||||||
For i = 0 To Detalle.Length - 1
|
For i As Integer = 0 To Detalle.Length - 1
|
||||||
Respuesta.AppendFormat("<tr><td align='center'>{0}</td>{1}</tr>", i + 1, Detalle(i).Trim)
|
Respuesta.AppendFormat("<tr><td align='center'>{0}</td>{1}</tr>", i + 1, Detalle(i).Trim)
|
||||||
Next
|
Next
|
||||||
Respuesta.Append("</tbody></table> ---------------------------------------------------------------------------------------------------------------------- <br/>")
|
Respuesta.Append("</tbody></table> ---------------------------------------------------------------------------------------------------------------------- <br/>")
|
||||||
@@ -1535,17 +1533,17 @@ Partial Class Bancos_PagoElectronico
|
|||||||
If Not ErrorArchivo Then
|
If Not ErrorArchivo Then
|
||||||
If CveIEs <> "" Then
|
If CveIEs <> "" Then
|
||||||
Dim ObjIE As New ClsBancos
|
Dim ObjIE As New ClsBancos
|
||||||
Dim ErrorDB = False
|
Dim ErrorDB As Boolean = False
|
||||||
ObjIE.IniciaTransacSQL()
|
ObjIE.IniciaTransacSQL()
|
||||||
Dim ArrayCveIEs() = CveIEs.Split(","c)
|
Dim ArrayCveIEs As String() = CveIEs.Split(","c)
|
||||||
Dim ArrayEstatusIEs() = EstatusIEs.Split(","c)
|
Dim ArrayEstatusIEs As String() = EstatusIEs.Split(","c)
|
||||||
Dim ArrayFechasMovto() = FechaMovto.Split(","c)
|
Dim ArrayFechasMovto As String() = FechaMovto.Split(","c)
|
||||||
Dim ArrayCorreos() = Correos.Split("|"c)
|
Dim ArrayCorreos As String() = Correos.Split("|"c)
|
||||||
|
|
||||||
Dim ArregloHilos As New Generic.List(Of System.Threading.Thread)
|
Dim ArregloHilos As New Generic.List(Of System.Threading.Thread)
|
||||||
Dim ArregloParametros As New Generic.List(Of List(Of String))
|
Dim ArregloParametros As New Generic.List(Of List(Of String))
|
||||||
|
|
||||||
For index = 0 To ArrayCveIEs.Length - 1
|
For index As Integer = 0 To ArrayCveIEs.Length - 1
|
||||||
If ObjIE.UpdatePagoElectronicoCarga(ArrayCveIEs(index).ToEntero, ArrayEstatusIEs(index).ToEntero) Then
|
If ObjIE.UpdatePagoElectronicoCarga(ArrayCveIEs(index).ToEntero, ArrayEstatusIEs(index).ToEntero) Then
|
||||||
|
|
||||||
'Cuando salio exitoso actualizamos el IE
|
'Cuando salio exitoso actualizamos el IE
|
||||||
@@ -1613,11 +1611,6 @@ Partial Class Bancos_PagoElectronico
|
|||||||
EnviarCorreoNotificacion(CveIENotificar, NotificarA, "", UsuarioActual, False)
|
EnviarCorreoNotificacion(CveIENotificar, NotificarA, "", UsuarioActual, False)
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Respuesta.Append("<br/><br/>NOTA: El archivo se analizo correctamente y se efectuaron todos los cambios en el sistema.")
|
Respuesta.Append("<br/><br/>NOTA: El archivo se analizo correctamente y se efectuaron todos los cambios en el sistema.")
|
||||||
Alert(Respuesta.ToString, TipoMensaje.MsgInformacion)
|
Alert(Respuesta.ToString, TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
@@ -1679,12 +1672,12 @@ Partial Class Bancos_PagoElectronico
|
|||||||
DtTemp = DTFyE
|
DtTemp = DTFyE
|
||||||
|
|
||||||
''VALIDA CUENTAS DEPOSITOS
|
''VALIDA CUENTAS DEPOSITOS
|
||||||
Dim ErrorCuenta = False
|
Dim ErrorCuenta As Boolean = False
|
||||||
Dim FyEError As StringBuilder = New StringBuilder
|
Dim FyEError As StringBuilder = New StringBuilder
|
||||||
FyEError.AppendFormat("<table width='600px'><thead><tr><td width='300px'>Personal</td><td width='150px'>Cuenta</td><td width='150px'>Error</td></tr></thead><tbody>")
|
FyEError.AppendFormat("<table width='600px'><thead><tr><td width='300px'>Personal</td><td width='150px'>Cuenta</td><td width='150px'>Error</td></tr></thead><tbody>")
|
||||||
|
|
||||||
Dim TotalDetalles As Integer = 0
|
Dim TotalDetalles As Integer = 0
|
||||||
Dim EsBancomer = False
|
Dim EsBancomer As Boolean = False
|
||||||
For Each gvr As DataRow In DtTemp.Rows
|
For Each gvr As DataRow In DtTemp.Rows
|
||||||
If gvr("CvePersonal").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then
|
If gvr("CvePersonal").ToString <> "" AndAlso gvr("EstatusPagoElectronico").ToString <> "True" AndAlso gvr("AltaCuenta").ToString = "1" Then
|
||||||
DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString))
|
DTPendienteActual = DtTemp.FiltraParametros(String.Format("CveCuentaDeposito = {0}", gvr("CveCuentaDeposito").ToString))
|
||||||
@@ -1758,7 +1751,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Descargas.AppendFormat("<li><a href=""#"" class=""Texto"" onclick=""fncg();"">Descargar Reporte</a></li>", NombreArchivo)
|
Descargas.AppendFormat("<li><a href=""#"" class=""Texto"" onclick=""fncg();"">Descargar Reporte</a></li>", NombreArchivo)
|
||||||
|
|
||||||
|
|
||||||
Dim TextoErrorProveedores = ""
|
Dim TextoErrorProveedores As String = ""
|
||||||
If FyEError.Length > 160 Then TextoErrorProveedores = String.Format("<br /><br /><br />Proveedores con Error: <br/><br/>------------------------------------------------------------------<br/>{0}<br /><br />", FyEError.ToString)
|
If FyEError.Length > 160 Then TextoErrorProveedores = String.Format("<br /><br /><br />Proveedores con Error: <br/><br/>------------------------------------------------------------------<br/>{0}<br /><br />", FyEError.ToString)
|
||||||
|
|
||||||
Alert(String.Format("<br />El Layout fue creado satisfactoriamente.{1}<br />Descargas:<ul>{0}</ul>", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion)
|
Alert(String.Format("<br />El Layout fue creado satisfactoriamente.{1}<br />Descargas:<ul>{0}</ul>", Descargas, TextoErrorProveedores), TipoMensaje.MsgInformacion)
|
||||||
@@ -1772,7 +1765,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GeneraAltaDetalleFyE()
|
Private Sub GeneraAltaDetalleFyE()
|
||||||
Dim Resultado = True
|
Dim Resultado As Boolean = True
|
||||||
Dim CuentaDeposito As String = ""
|
Dim CuentaDeposito As String = ""
|
||||||
Dim TipoCuentaDeposito As String = ""
|
Dim TipoCuentaDeposito As String = ""
|
||||||
Dim TipoCuenta As String = ""
|
Dim TipoCuenta As String = ""
|
||||||
@@ -1845,9 +1838,8 @@ Partial Class Bancos_PagoElectronico
|
|||||||
'Campos 37-39 -- FILLER
|
'Campos 37-39 -- FILLER
|
||||||
DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38))
|
DetalleTexto &= String.Format("00{0}", Vacio.PadRight(38))
|
||||||
|
|
||||||
|
|
||||||
''LLENA DT PARA REPORTE
|
''LLENA DT PARA REPORTE
|
||||||
Dim Row = DtAlta.NewRow()
|
Dim Row As DataRow = DtAlta.NewRow()
|
||||||
Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
Row("Proveedor") = DTPendienteActual(0)("RazonSocial").ToString
|
||||||
Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
|
Row("Banco") = DTPendienteActual(0)("BancoNombre").ToString
|
||||||
Row("TipoCuenta") = TipoCuentaDeposito
|
Row("TipoCuenta") = TipoCuentaDeposito
|
||||||
@@ -1863,7 +1855,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
HeaderTexto &= String.Format("{0}{1}", UsuarioActual.CveUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
|
HeaderTexto &= String.Format("{0}{1}", UsuarioActual.CveUsuario, DateTime.Now().ToString("yyyyMMdd")).PadRight(20)
|
||||||
'Campos #6-8 del Header
|
'Campos #6-8 del Header
|
||||||
HeaderTexto &= String.Format("00").PadRight(586)
|
HeaderTexto &= String.Format("00").PadRight(586)
|
||||||
Dim HeaderLength = HeaderTexto.Length
|
Dim HeaderLength As Integer = HeaderTexto.Length
|
||||||
|
|
||||||
''''' LLENADO DE TRAILER
|
''''' LLENADO DE TRAILER
|
||||||
TrailerTexto = String.Format("T{0}{1}{2}", Registros.ToString.PadLeft(10, PadCeros), Vacio.PadRight(50, PadCeros), Vacio.PadRight(575))
|
TrailerTexto = String.Format("T{0}{1}{2}", Registros.ToString.PadLeft(10, PadCeros), Vacio.PadRight(50, PadCeros), Vacio.PadRight(575))
|
||||||
@@ -1883,8 +1875,8 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
Private Sub CargaReporte()
|
Private Sub CargaReporte()
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
Dim FechaI As String = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||||
Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
Dim FechaF As String = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||||
|
|
||||||
If ObjBancos.GetLayoutPagosEnviados(DdlCuentaReportes.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, DdlTipoReportes.SelectedValue, FechaI, DateAdd(DateInterval.Day, 1, FechaF.ToDate).ToShortDateString) Then
|
If ObjBancos.GetLayoutPagosEnviados(DdlCuentaReportes.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, DdlTipoReportes.SelectedValue, FechaI, DateAdd(DateInterval.Day, 1, FechaF.ToDate).ToShortDateString) Then
|
||||||
DTReportes = ObjBancos.DtResultados
|
DTReportes = ObjBancos.DtResultados
|
||||||
|
|||||||
@@ -461,8 +461,8 @@
|
|||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<HeaderTemplate>% Desc.</HeaderTemplate>
|
<HeaderTemplate>% Desc.</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtDescuento" Width="40px" runat="server" Style="text-align: right;" MaxLength="5"></asp:TextBox>
|
<asp:TextBox ID="TxtDescuento" Width="40px" runat="server" Style="text-align: right;" MaxLength="6"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuento" ValidChars="1234567890+" FilterType="Custom" />
|
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuento" ValidChars="1234567890+." FilterType="Custom" />
|
||||||
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -607,7 +607,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||||
If dtc IsNot Nothing Then
|
If dtc IsNot Nothing Then
|
||||||
Dim Row = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
Dim Row As DataRow = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
||||||
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
|
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
|
||||||
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -804,9 +804,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
|
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
|
||||||
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL
|
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal * TxtTC.Text.ToDecimal).RoundSQL
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTCDolaresDolares.Text.ToDecimal
|
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
||||||
|
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTCDolares.Text.ToDecimal)
|
||||||
End If
|
End If
|
||||||
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTC.Text.ToDecimal
|
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTC.Text.ToDecimal
|
||||||
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTCDolares.Text.ToDecimal
|
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTCDolares.Text.ToDecimal
|
||||||
@@ -819,6 +820,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'DESPROGRAMA LO PROGRAMADO DESPUES DE HACERLE UN PAGO
|
'DESPROGRAMA LO PROGRAMADO DESPUES DE HACERLE UN PAGO
|
||||||
@@ -875,16 +877,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
MsgError = "No se pudo simplificar los movimientos"
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||||
|
|
||||||
'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
|
'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
|
||||||
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then
|
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then
|
||||||
IDPoliza = ObjMov.ContaIdPoliza
|
IDPoliza = ObjMov.ContaIdPoliza
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<%-- <li>
|
||||||
<asp:LinkButton ID="LnkAcarreo" runat="server" Text="Verificar Acarreos" Visible="False"></asp:LinkButton>
|
<asp:LinkButton ID="LnkAcarreo" runat="server" Text="Verificar Acarreos" Visible="False"></asp:LinkButton>
|
||||||
</li>
|
</li>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
|
||||||
@@ -62,9 +62,9 @@
|
|||||||
<asp:PostBackTrigger ControlID="BtnDescontabilizar" />
|
<asp:PostBackTrigger ControlID="BtnDescontabilizar" />
|
||||||
</Triggers>
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<li>
|
<%--<li>
|
||||||
<asp:LinkButton ID="LBContabilizarAC" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea contabilizar la compra?" data-btn-ok-label="si" Text="Contabilizar" runat="server" OnClick="LBContabilizarAC_Click" Visible="false"> <i class="fa fa-check"></i> Contabilizar</asp:LinkButton>
|
<asp:LinkButton ID="LBContabilizarAC" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea contabilizar la compra?" data-btn-ok-label="si" Text="Contabilizar" runat="server" OnClick="LBContabilizarAC_Click" Visible="false"> <i class="fa fa-check"></i> Contabilizar</asp:LinkButton>
|
||||||
</li>
|
</li>--%>
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink ID="HLPagar" CssClass="thickbox" Visible="false" runat="server"><i class='fa fa-money'></i> Pagar</asp:HyperLink>
|
<asp:HyperLink ID="HLPagar" CssClass="thickbox" Visible="false" runat="server"><i class='fa fa-money'></i> Pagar</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
@@ -2516,13 +2516,13 @@
|
|||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:UpdatePanel ID="UPObservaciones" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPObservaciones" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<table border="0" width="250px">
|
<table border="0" width="100%">
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td><b>Observaciones Generales:</b> </td>
|
<td><b>Observaciones Generales:</b> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="250px"></asp:TextBox></td>
|
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="100%"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
@@ -3434,56 +3434,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div id="divAddAcarreo" class="modal ADS fade" role="dialog">
|
|
||||||
<div class="modal-dialog">
|
|
||||||
<asp:UpdatePanel ID="UpAddAcarreo" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="modal-title" id="myModalLabel" runat="server">Asociación de Acarreos</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<asp:UpdatePanel ID="UpBodyAcarreo" UpdateMode="Conditional" runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:GridView ID="GvAcarreo" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Acarreos con los filtros especificados"
|
|
||||||
DataKeyNames="CvePreEstimacion,Importe,CveUnidadMedida,UnidadMedida,CveSubProyectoOrigen,SubProyectoOrigen,CveSubProyectoDestino,SubProyectoDestino" ToolTip="Listado de Acarreos"
|
|
||||||
CssClass="table table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="NumContrato" HeaderText="Contrato" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="Transportista" HeaderText="Transportista" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="NumPreEstimacion" HeaderText="Número de Pre-Estimación" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
<asp:TemplateField HeaderText="Importe" ItemStyle-HorizontalAlign="Right">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlImporte" runat="server" Text='<%# Eval("Importe") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:BoundField DataField="FechaPreEstimacion" HeaderText="Fecha Pre-Estimación" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:CheckBox ID="ChkRow" runat="server" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:LinkButton ID="BtnAgregarAcarreo" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Aceptar</asp:LinkButton>
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="ModalPesos" class="modal ADS fade" role="dialog">
|
<div id="ModalPesos" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|
||||||
@@ -5295,6 +5245,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright" id="DivPedimento" runat="server">
|
<div class="form-group form-md-line-input input-iconright" id="DivPedimento" runat="server">
|
||||||
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server"></asp:TextBox>
|
||||||
|
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
|
||||||
|
ClearMaskOnLostFocus="false"
|
||||||
|
TargetControlID="TxtPedimento"
|
||||||
|
Mask="99--99--9999--9999999"
|
||||||
|
MaskType="Number"
|
||||||
|
InputDirection="LeftToRight"
|
||||||
|
AcceptNegative="None"
|
||||||
|
ErrorTooltipEnabled="True" />
|
||||||
|
|
||||||
|
<asp:RegularExpressionValidator ID="regexTxtPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ValidationGroup="VGMCrearFleteImportacion" ErrorMessage="Formato no valido, el formato correcto es 99--99--9999--9999999" ForeColor="Red"
|
||||||
|
ValidationExpression="^[0-9 ]{2}--[0-9 ]{2}--[0-9 ]{4}--[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
||||||
|
|
||||||
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender11" runat="server" HighlightCssClass="vco" TargetControlID="regexTxtPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|
||||||
<asp:RequiredFieldValidator ID="RFVPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pedimento''</b> es necesario, por favor ingréselo." ValidationGroup="VGMCrearFleteImportacion"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pedimento''</b> es necesario, por favor ingréselo." ValidationGroup="VGMCrearFleteImportacion"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEPedimento" runat="server" HighlightCssClass="vco" TargetControlID="RFVPedimento"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPedimento" runat="server" HighlightCssClass="vco" TargetControlID="RFVPedimento"></ajax:ValidatorCalloutExtender>
|
||||||
<label for="<%= TxtPedimento.ClientID.ToString()%>">Pedimento:</label>
|
<label for="<%= TxtPedimento.ClientID.ToString()%>">Pedimento:</label>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -42,20 +42,20 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-2">Pedimento:</div>
|
<div class="col-md-2">Pedimento:</div>
|
||||||
<div class="col-md-10">
|
<div class="col-md-10">
|
||||||
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server" MaxLength="18" Width="300px" ClientIDMode="Static" ></asp:TextBox>
|
<asp:TextBox ID="TxtPedimento" CssClass="form-control" runat="server" MaxLength="21" Width="300px" ClientIDMode="Static" ></asp:TextBox>
|
||||||
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
|
<ajaxToolkit:MaskedEditExtender ID="meeTxtPedimento" runat="server"
|
||||||
ClearMaskOnLostFocus="false"
|
ClearMaskOnLostFocus="false"
|
||||||
TargetControlID="TxtPedimento"
|
TargetControlID="TxtPedimento"
|
||||||
Mask="99-99-9999-9999999"
|
Mask="99--99--9999--9999999"
|
||||||
MaskType="Number"
|
MaskType="Number"
|
||||||
InputDirection="LeftToRight"
|
InputDirection="LeftToRight"
|
||||||
AcceptNegative="None"
|
AcceptNegative="None"
|
||||||
ErrorTooltipEnabled="True" />
|
ErrorTooltipEnabled="True" />
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Pedimento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:RegularExpressionValidator ID="regexTxtPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ValidationGroup="GrpGuardar" ErrorMessage="Formato no valido, el formato correcto es 99-99-9999-9999999" ForeColor="Red"
|
<asp:RegularExpressionValidator ID="regexTxtPedimento" runat="server" ControlToValidate="TxtPedimento" Display="None" ValidationGroup="GrpGuardar" ErrorMessage="Formato no valido, el formato correcto es 99--99--9999--9999999" ForeColor="Red"
|
||||||
ValidationExpression="^[0-9 ]{2}-[0-9 ]{2}-[0-9 ]{4}-[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
ValidationExpression="^[0-9 ]{2}--[0-9 ]{2}--[0-9 ]{4}--[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="regexTxtPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="regexTxtPedimento" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
|
|||||||
@@ -95,17 +95,10 @@ Partial Class Compras_Importaciones
|
|||||||
DdlProveedores.txtValue.Value = ObjImportaciones.DtResultados.Rows(0)("CveAduanal").ToString
|
DdlProveedores.txtValue.Value = ObjImportaciones.DtResultados.Rows(0)("CveAduanal").ToString
|
||||||
DdlProveedores.txtText.Value = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
DdlProveedores.txtText.Value = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
||||||
|
|
||||||
'HdnCveCompra.Value = ObjImportaciones.DtResultados.Rows(0)("CveCompra").ToString
|
|
||||||
'LbCompraProveedor.Text = ObjImportaciones.DtResultados.Rows(0)("RazonSocial").ToString
|
|
||||||
'HLCompraSerieFolio.Text = ObjImportaciones.DtResultados.Rows(0)("SerieFolio").ToString
|
|
||||||
'HLCompraSerieFolio.NavigateUrl = $"/Compras/Compras.aspx?CveCompra={HdnCveCompra.Value}"
|
|
||||||
'LbCompraImporte.Text = ObjImportaciones.DtResultados.Rows(0)("Total").ToString
|
|
||||||
|
|
||||||
If ObjImportaciones.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
|
If ObjImportaciones.DtResultados.Rows(0)("CveEstatus").ToString.ToEntero = 0 Then
|
||||||
LnkCerrarImportacion.Visible = True
|
LnkCerrarImportacion.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString
|
HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||||
VincularAF()
|
VincularAF()
|
||||||
|
|
||||||
@@ -149,7 +142,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
Dim ObjImp As New ClsCompras
|
Dim ObjImp As New ClsCompras
|
||||||
ObjImp.IniciaTransacSQL()
|
ObjImp.IniciaTransacSQL()
|
||||||
Dim ErrorImportacion = False
|
Dim ErrorImportacion As Boolean = False
|
||||||
|
|
||||||
If CveImportacion < 0 Then
|
If CveImportacion < 0 Then
|
||||||
CveImportacion = ObjImp.AddImportacion(Pedimento, TxtDescripcion.Text.Trim, DdlProveedores.SelectedValue.ToEntero, HdnCveAF.Value.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveImportacion = ObjImp.AddImportacion(Pedimento, TxtDescripcion.Text.Trim, DdlProveedores.SelectedValue.ToEntero, HdnCveAF.Value.ToEntero, TxtFecha.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
@@ -197,7 +190,7 @@ Partial Class Compras_Importaciones
|
|||||||
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnEliminar_Click(sender As Object, e As EventArgs)
|
||||||
Dim ObjImp As New ClsCompras
|
Dim ObjImp As New ClsCompras
|
||||||
ObjImp.IniciaTransacSQL()
|
ObjImp.IniciaTransacSQL()
|
||||||
Dim ErrorEliminar = False
|
Dim ErrorEliminar As Boolean = False
|
||||||
|
|
||||||
For Each dr As DataRow In DtCompras.Rows
|
For Each dr As DataRow In DtCompras.Rows
|
||||||
If Not ObjImp.RemoveImportacionDetalle(dr("CveImportacionDetalle").ToString.ToEntero) Then
|
If Not ObjImp.RemoveImportacionDetalle(dr("CveImportacionDetalle").ToString.ToEntero) Then
|
||||||
@@ -265,7 +258,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
Protected Sub LnkEliminaCompraVinculada_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkEliminaCompraVinculada_Click(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)
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
If CveImportacion > 0 AndAlso GvComprasVinculadas.Rows(gvRow.RowIndex).DataKey("CveImportacionCompra").ToEntero > 0 Then
|
If CveImportacion > 0 AndAlso GvComprasVinculadas.Rows(gvRow.RowIndex).DataKey("CveImportacionCompra").ToEntero > 0 Then
|
||||||
Dim ObjImportaciones As New ClsCompras
|
Dim ObjImportaciones As New ClsCompras
|
||||||
|
|
||||||
@@ -295,7 +288,7 @@ Partial Class Compras_Importaciones
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ErrorAgregar = False
|
Dim ErrorAgregar As Boolean = False
|
||||||
Dim RowCompra As DataRow = Nothing
|
Dim RowCompra As DataRow = Nothing
|
||||||
|
|
||||||
If ObjCompras.GetCompras(HdnCveCompra.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjCompras.GetCompras(HdnCveCompra.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -414,7 +407,7 @@ Partial Class Compras_Importaciones
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ErrorAgregar = False
|
Dim ErrorAgregar As Boolean = False
|
||||||
Dim RowCompra As DataRow = Nothing
|
Dim RowCompra As DataRow = Nothing
|
||||||
|
|
||||||
If ObjCompras.GetCompras(HdnCveCompraGasto.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
If ObjCompras.GetCompras(HdnCveCompraGasto.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -471,7 +464,7 @@ Partial Class Compras_Importaciones
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
If CveImportacion > 0 AndAlso GvDatos.Rows(e.RowIndex).DataKey("CveImportacionDetalle").ToEntero > 0 Then
|
If CveImportacion > 0 AndAlso GvDatos.Rows(e.RowIndex).DataKey("CveImportacionDetalle").ToEntero > 0 Then
|
||||||
Dim ObjImportaciones As New ClsCompras
|
Dim ObjImportaciones As New ClsCompras
|
||||||
|
|
||||||
@@ -501,18 +494,12 @@ Partial Class Compras_Importaciones
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
Dim ObjInv As New ClsInventarios
|
Dim ObjInv As New ClsInventarios
|
||||||
|
|
||||||
If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ")
|
Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ Partial Class PopUpVerFactura
|
|||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim rutardlc As String = "Formatos\RepAgroInventarioDiario.rdlc"
|
Dim rutardlc As String = "Formatos\RepAgroInventarioDiario.rdlc"
|
||||||
If EnviarCorrreo Then
|
If EnviarCorrreo Then
|
||||||
Dim para As String = "caudillo.90d@gmail.com"
|
Dim para As String = ""
|
||||||
Dim dtCorreos As DataTable = New DataTable()
|
Dim dtCorreos As DataTable = New DataTable()
|
||||||
|
|
||||||
Using objnom As New ClsCGame
|
Using objnom As New ClsCGame
|
||||||
@@ -394,8 +394,10 @@ Partial Class PopUpVerFactura
|
|||||||
dtCorreos = objnom.DtResultados
|
dtCorreos = objnom.DtResultados
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
Dim coma As String = ""
|
||||||
For Each row As DataRow In dtCorreos.Rows
|
For Each row As DataRow In dtCorreos.Rows
|
||||||
para = String.Format("{0},{1}", para, row("Correo"))
|
para = String.Format("{0}{2}{1}", para, row("Correo"), coma)
|
||||||
|
coma = ","
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim archivoBinario As Byte() = StreamPDF(rutardlc, lrds, params, "Inventario", formato)
|
Dim archivoBinario As Byte() = StreamPDF(rutardlc, lrds, params, "Inventario", formato)
|
||||||
@@ -1336,9 +1338,9 @@ Partial Class PopUpVerFactura
|
|||||||
Dim AplicaPagare As String = If(UrlParametros("PAG") IsNot Nothing AndAlso UrlParametros("PAG").ToString <> "", UrlParametros("PAG").ToString, "0")
|
Dim AplicaPagare As String = If(UrlParametros("PAG") IsNot Nothing AndAlso UrlParametros("PAG").ToString <> "", UrlParametros("PAG").ToString, "0")
|
||||||
Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1"
|
Dim Guardar As Boolean = UrlParametros("GUARDAR") IsNot Nothing AndAlso UrlParametros("GUARDAR").ToString() = "1"
|
||||||
Dim RegenerarPDF As Boolean = UrlParametros("REGENERAR") IsNot Nothing AndAlso UrlParametros("REGENERAR").ToString() = "1"
|
Dim RegenerarPDF As Boolean = UrlParametros("REGENERAR") IsNot Nothing AndAlso UrlParametros("REGENERAR").ToString() = "1"
|
||||||
Dim STIMULSOFT As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1"
|
Dim STIMUL As Boolean = UrlParametros("STIMULSOFT") IsNot Nothing AndAlso UrlParametros("STIMULSOFT").ToString() = "1"
|
||||||
|
|
||||||
imprimirFacturaVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimulsoft:=STIMULSOFT)
|
imprimirFacturaVenta(UrlParametros("CVEVENTA").ToString.ToEntero, AplicaPagare, GuardarPDF:=Guardar, RegenerarPDF:=RegenerarPDF, UsarStimul:=STIMUL)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2921,7 +2923,7 @@ Partial Class PopUpVerFactura
|
|||||||
Archivo = Nothing
|
Archivo = Nothing
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub imprimirFacturaVenta(CveVenta As Integer, AplicaPagare As String, Optional GuardarPDF As Boolean = False, Optional RegenerarPDF As Boolean = False, Optional UsarStimulsoft As Boolean = False)
|
Public Sub imprimirFacturaVenta(CveVenta As Integer, AplicaPagare As String, Optional GuardarPDF As Boolean = False, Optional RegenerarPDF As Boolean = False, Optional UsarStimul As Boolean = False)
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
Dim Vta As Modelos.Factura = Nothing
|
Dim Vta As Modelos.Factura = Nothing
|
||||||
|
|
||||||
@@ -2950,7 +2952,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Archivo As New System.IO.FileInfo(PathArchivo)
|
Dim Archivo As New System.IO.FileInfo(PathArchivo)
|
||||||
|
|
||||||
'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS
|
'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS
|
||||||
If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimulsoft Then
|
If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimul Then
|
||||||
Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
|
||||||
'se rellena la sucursal
|
'se rellena la sucursal
|
||||||
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
||||||
@@ -3259,7 +3261,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim CveTimbreCartaPorteVenta As Integer = -1
|
Dim CveTimbreCartaPorteVenta As Integer = -1
|
||||||
Dim CartaPorte As Modelos.MSubReportData = Nothing
|
Dim CartaPorte As Modelos.MSubReportData = Nothing
|
||||||
'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS
|
'SI EL ARCHIVO NO EXISTE O SE VA REGENERA EL PDF, SE DEBEN LLENAR LOS DATOS
|
||||||
If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimulsoft Then
|
If Not Archivo.Exists OrElse RegenerarPDF OrElse UsarStimul Then
|
||||||
If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto = "Ing" Then
|
If UsuarioActual.CveEmpresa = 13 AndAlso Vta.TipoDocto = "Ing" Then
|
||||||
Using ObjGral As New ClsGenerales
|
Using ObjGral As New ClsGenerales
|
||||||
If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
If ObjGral.GetGralTimbre(-1, "Ing", MinFecha, MaxFecha, 0, UsuarioActual.CveEmpresa, -1, CveVenta:=CveVenta) AndAlso ObjGral.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -3287,8 +3289,8 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsarStimulsoft Then
|
If UsarStimul Then
|
||||||
ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, UsarStimulsoft:=UsarStimulsoft), Vta.SerieFolio, "PDF")
|
ImprimirbytesPDF(PdfFactura(Vta, AplicaPagare:=AplicaPagare, Guardar:=True, SubReportData:=CartaPorte, UsarStimul:=UsarStimul), Vta.SerieFolio, "PDF")
|
||||||
Else
|
Else
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
If RegenerarPDF Then
|
If RegenerarPDF Then
|
||||||
@@ -3779,7 +3781,7 @@ Partial Class PopUpVerFactura
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
||||||
ImprimirPDFStimulsoft("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString))
|
ImprimirPDFStimul("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString))
|
||||||
Else
|
Else
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||||
End If
|
End If
|
||||||
@@ -4039,7 +4041,7 @@ Partial Class PopUpVerFactura
|
|||||||
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||||
Else
|
Else
|
||||||
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
||||||
ImprimirPDFStimulsoft("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString))
|
ImprimirPDFStimul("Empresas/Grales/Formatos/EntradaSalida.mrt", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString))
|
||||||
Else
|
Else
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
ImprimirPDF("Empresas/Grales/Formatos/EntradaSalida.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios")
|
||||||
End If
|
End If
|
||||||
@@ -4406,7 +4408,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
If UsuarioActual.CveEmpresa.Contiene(172, 173) Then
|
||||||
ImprimirPDFStimulsoft(String.Format("Empresas/Grales/Formatos/Traslado.mrt", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
|
ImprimirPDFStimul(String.Format("Empresas/Grales/Formatos/Traslado.mrt", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
|
||||||
Else
|
Else
|
||||||
ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
|
ImprimirPDF(String.Format("Empresas/Grales/Formatos/Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios")
|
||||||
End If
|
End If
|
||||||
@@ -5954,9 +5956,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
DtAcuse.Rows.Add(RowCFDI)
|
DtAcuse.Rows.Add(RowCFDI)
|
||||||
End If
|
End If
|
||||||
|
ImprimirPDFStimul(DirectorioArchivo, DtAcuse, params, "AcuseCancelacion" & CveVenta)
|
||||||
|
|
||||||
ImprimirPDFStimulsoft(DirectorioArchivo, DtAcuse, params, "AcuseCancelacion" & CveVenta)
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -787,16 +787,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If MsgError = "" And UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePolizaPago, UsuarioActual.CveEmpresa) Then
|
|
||||||
MsgError = "No se pudo simplificar los movimientos"
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
If MsgError = "" AndAlso CvePrePolizaExcedente > 0 AndAlso Not ObjMov.PrePolizaSimplificacion(CvePrePolizaExcedente, UsuarioActual.CveEmpresa) Then
|
|
||||||
MsgError = "No se pudo simplificar los movimientos"
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||||
|
|
||||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then
|
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then
|
||||||
@@ -888,14 +878,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjMov.PrePolizaSimplificacion(CvePrePolizaNueva, UsuarioActual.CveEmpresa) Then
|
|
||||||
Retorno = "No se pudo simplificar los movimientos"
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -170,7 +170,7 @@
|
|||||||
<table width="100%" cellpadding="0" cellspacing="0">
|
<table width="100%" cellpadding="0" cellspacing="0">
|
||||||
<tr class="SubTotales">
|
<tr class="SubTotales">
|
||||||
<td style="width: 25px;">
|
<td style="width: 25px;">
|
||||||
<asp:CheckBox ID="Chk" runat="server" />
|
<asp:CheckBox ID="Chk" runat="server" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
|
|||||||
@@ -144,6 +144,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
|||||||
if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
|
if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
|
||||||
{
|
{
|
||||||
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
e.Row.FCHyperLink("HLPoliza").Visible = TienePermisoVerPoliza & e.Row.DBCampo("FolioPoliza").ToEntero() > 0;
|
||||||
|
e.Row.FCCheckBox("Chk").Visible = (e.Row.DBCampo("FolioPoliza") == "");
|
||||||
e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}";
|
e.Row.FCHyperLink("HLPoliza").Text = $"Póliza: {e.Row.DBCampo("FolioPoliza")}";
|
||||||
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
e.Row.FCHyperLink("HLPoliza").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public partial class Contabilidad_RepIVA : ClsPaginas
|
|||||||
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
|
LblMsgAcreditable.Text = "La información presenta importes en negativo, estos no se incluirán en el archivo generado para DIOT";
|
||||||
}
|
}
|
||||||
|
|
||||||
GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta
|
//GvA.Columns[11].Visible = DtIVAAcreditable.SUM("valorActosImp1516") > 0; // sino tiene valor la columna de importación de oculta
|
||||||
|
|
||||||
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 3, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -188,8 +188,8 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
''Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||||
Dim FechaF = FechaI.ToDate.LastDayOfMonth.ToShortDateString
|
Dim FechaF As String = FechaI.ToDate.LastDayOfMonth.ToShortDateString
|
||||||
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||||
|
|
||||||
GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
GvActivo.Columns(1).HeaderText = DdlEjercicio.SelectedValue
|
||||||
@@ -223,9 +223,9 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
DtDatos = DtDatos.FiltraParametros("Level < 3")
|
DtDatos = DtDatos.FiltraParametros("Level < 3")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=1")
|
Dim DtActivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=1")
|
||||||
Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=2 ")
|
Dim DtActivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND TipoCuenta=2 ")
|
||||||
Dim DtActivoDiferido = DtDatos.FiltraParametros(" TipoCuenta=9 ")
|
Dim DtActivoDiferido As DataTable = DtDatos.FiltraParametros(" TipoCuenta=9 ")
|
||||||
|
|
||||||
' Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00011%' ")
|
' Dim DtActivoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00011%' ")
|
||||||
' Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00012%' ")
|
' Dim DtActivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('A','B','C') AND Orden LIKE '%/00012%' ")
|
||||||
@@ -287,8 +287,8 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
|
|
||||||
|
|
||||||
'PASIVO
|
'PASIVO
|
||||||
Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=3")
|
Dim DtPasivoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=3")
|
||||||
Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=4")
|
Dim DtPasivoNoCirculante As DataTable = DtDatos.FiltraParametros("Tipo in ('D') AND TipoCuenta=4")
|
||||||
|
|
||||||
'Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00021%' ")
|
'Dim DtPasivoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00021%' ")
|
||||||
'Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00022%' ")
|
'Dim DtPasivoNoCirculante = DtDatos.FiltraParametros("Tipo in ('D') AND Orden LIKE '%/00022%' ")
|
||||||
@@ -332,7 +332,7 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
|
|
||||||
|
|
||||||
'PATRIMONIO
|
'PATRIMONIO
|
||||||
Dim DtPatrimonioContribuido = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)")
|
Dim DtPatrimonioContribuido As DataTable = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (5,6,8,7)")
|
||||||
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)")
|
'Dim DtPatrimonioGenerado = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta in (6,8)")
|
||||||
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7")
|
'Dim DtPatrimonioActualizacion = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=7")
|
||||||
'Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5")
|
'Dim DtUtilidad = DtDatos.FiltraParametros("Tipo in ('F') AND TipoCuenta=5")
|
||||||
@@ -418,7 +418,7 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero
|
LbTotalPasivoPatrimonioAnterior.Text = TotalPasivoPatrimonioAnterior.ToString.FormatoNumero
|
||||||
|
|
||||||
|
|
||||||
Dim Descuadre = False
|
Dim Descuadre As Boolean = False
|
||||||
'COLOREA ROJO SI NO CUADRAN TOTALES
|
'COLOREA ROJO SI NO CUADRAN TOTALES
|
||||||
If Math.Round(TotalActivoActual, 2) <> Math.Round(TotalPasivoPatrimonioActual, 2) Then
|
If Math.Round(TotalActivoActual, 2) <> Math.Round(TotalPasivoPatrimonioActual, 2) Then
|
||||||
LbTotalActivoActual.ForeColor = Drawing.Color.Red
|
LbTotalActivoActual.ForeColor = Drawing.Color.Red
|
||||||
@@ -591,8 +591,8 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
|
|
||||||
|
|
||||||
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
Private Sub ImprimirReporte(Optional Formato As String = "PDF")
|
||||||
Dim FechaI = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
Dim FechaI As String = String.Format("01/{0}/{1}", DdlPeriodo.SelectedValue.PadLeft(2, CChar("0")), DdlEjercicio.SelectedValue)
|
||||||
Dim FechaF = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
Dim FechaF As String = DateAdd(DateInterval.Day, -1, DateAdd(DateInterval.Month, 1, CDate(FechaI))).ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
Dim fileName As String = "EdoSituacionFinanciera"
|
Dim fileName As String = "EdoSituacionFinanciera"
|
||||||
Dim reportpath As String = "Contabilidad2/Reportes/RepSituacionFinanciera.rdlc"
|
Dim reportpath As String = "Contabilidad2/Reportes/RepSituacionFinanciera.rdlc"
|
||||||
|
|||||||
@@ -156,6 +156,10 @@
|
|||||||
<DataField>CodigoObjetoImpuesto</DataField>
|
<DataField>CodigoObjetoImpuesto</DataField>
|
||||||
<rd:TypeName>System.String</rd:TypeName>
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
</Field>
|
</Field>
|
||||||
|
<Field Name="NumeroPedimento">
|
||||||
|
<DataField>NumeroPedimento</DataField>
|
||||||
|
<rd:TypeName>System.String</rd:TypeName>
|
||||||
|
</Field>
|
||||||
</Fields>
|
</Fields>
|
||||||
<rd:DataSetInfo>
|
<rd:DataSetInfo>
|
||||||
<rd:DataSetName>DsOC</rd:DataSetName>
|
<rd:DataSetName>DsOC</rd:DataSetName>
|
||||||
@@ -2399,7 +2403,7 @@
|
|||||||
<Paragraph>
|
<Paragraph>
|
||||||
<TextRuns>
|
<TextRuns>
|
||||||
<TextRun>
|
<TextRun>
|
||||||
<Value>=Fields!PS.Value & " " & Fields!Obs.Value</Value>
|
<Value>=Fields!PS.Value & " " & Fields!Obs.Value & IIF(Fields!NumeroPedimento.Value<>"",System.Environment.NewLine &System.Environment.NewLine & "Número Pedimento: "&Fields!NumeroPedimento.Value,"")</Value>
|
||||||
<Style>
|
<Style>
|
||||||
<FontSize>7.5pt</FontSize>
|
<FontSize>7.5pt</FontSize>
|
||||||
<FontWeight>Normal</FontWeight>
|
<FontWeight>Normal</FontWeight>
|
||||||
|
|||||||
@@ -508,13 +508,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
e.Row.FCLinkButton("BtnSurtir").CommandArgument = If(e.Row.DBCampo("TipoEntrega") = "1", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveTraspasoSolicitud"))
|
e.Row.FCLinkButton("BtnSurtir").CommandArgument = If(e.Row.DBCampo("TipoEntrega") = "1", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("CveTraspasoSolicitud"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Select Case e.Row.DBCampo("TipoEntrega").ToString().ToEntero()
|
Select Case e.Row.DBCampo("TipoEntrega").ToString().ToEntero()
|
||||||
Case 1
|
Case 1
|
||||||
If UsuarioActual.TienePermisoProceso(201) Then
|
If UsuarioActual.TienePermisoProceso(201) Then
|
||||||
Dim Css = "Texto"
|
Dim Css As String = "Texto"
|
||||||
Dim Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DBCampo("CveVenta")}"
|
Dim Liga As String = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DBCampo("CveVenta")}"
|
||||||
e.Row.FCLabel("LblFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblFolio").Text + "</a>"
|
e.Row.FCLabel("LblFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblFolio").Text + "</a>"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -532,8 +530,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCLinkButton("BtnSurtir").Text = "<i class='fa fa-arrow-left' > Recibir</i>"
|
e.Row.FCLinkButton("BtnSurtir").Text = "<i class='fa fa-arrow-left' > Recibir</i>"
|
||||||
End If
|
End If
|
||||||
Case 2
|
Case 2
|
||||||
Dim Css = "Texto"
|
Dim Css As String = "Texto"
|
||||||
Dim Liga = $"/Inventarios/TrasladoSolicitud.aspx?&CveTraspasoSolicitud={e.Row.DBCampo("CveTraspasoSolicitud")}"
|
Dim Liga As String = $"/Inventarios/TrasladoSolicitud.aspx?&CveTraspasoSolicitud={e.Row.DBCampo("CveTraspasoSolicitud")}"
|
||||||
e.Row.FCLabel("LblFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblFolio").Text + "</a>"
|
e.Row.FCLabel("LblFolio").Text = "<a class=" + "" + Css + "" + " href=" + "" + Liga + "" + ">" + e.Row.FCLabel("LblFolio").Text + "</a>"
|
||||||
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary btn-sm"
|
e.Row.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary btn-sm"
|
||||||
e.Row.FCLinkButton("BtnSurtir").Text = " Traspasar <i class='fa fa-arrow-right' ></i>"
|
e.Row.FCLinkButton("BtnSurtir").Text = " Traspasar <i class='fa fa-arrow-right' ></i>"
|
||||||
@@ -548,7 +546,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
#Region " CARGA VENTA POR SURTIR "
|
#Region " CARGA VENTA POR SURTIR "
|
||||||
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim Boton = CType(sender, LinkButton)
|
Dim Boton As LinkButton = CType(sender, LinkButton)
|
||||||
CveVentaAD = -1
|
CveVentaAD = -1
|
||||||
|
|
||||||
If Boton.CommandArgument.ToEntero() > 0 Then
|
If Boton.CommandArgument.ToEntero() > 0 Then
|
||||||
@@ -598,7 +596,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
ArchivoBitacora = String.Format("{0}Temp\EntregaDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||||
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||||
If ArchivoBitacora <> "" Then
|
If ArchivoBitacora <> "" Then
|
||||||
Dim Archivo = New System.IO.FileInfo(ArchivoBitacora)
|
Dim Archivo As New System.IO.FileInfo(ArchivoBitacora)
|
||||||
If Archivo.Exists() Then
|
If Archivo.Exists() Then
|
||||||
HplCargaBitacora.Visible = True
|
HplCargaBitacora.Visible = True
|
||||||
uppCargaBitacora.Update()
|
uppCargaBitacora.Update()
|
||||||
@@ -609,7 +607,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer))
|
If Not DtDatos.Columns.Contains("Consec") Then DtDatos.Columns.Add("Consec", GetType(Integer))
|
||||||
If Not DtDatos.Columns.Contains("CantidadGV") Then DtDatos.Columns.Add("CantidadGV", GetType(Double))
|
If Not DtDatos.Columns.Contains("CantidadGV") Then DtDatos.Columns.Add("CantidadGV", GetType(Double))
|
||||||
If Not DtDatos.Columns.Contains("CantidadTraspaso") Then DtDatos.Columns.Add("CantidadTraspaso", GetType(Double))
|
If Not DtDatos.Columns.Contains("CantidadTraspaso") Then DtDatos.Columns.Add("CantidadTraspaso", GetType(Double))
|
||||||
Dim Index = 1
|
Dim Index As Integer = 1
|
||||||
For Each Dr As DataRow In DtDatos.Rows
|
For Each Dr As DataRow In DtDatos.Rows
|
||||||
Dr("Consec") = Index
|
Dr("Consec") = Index
|
||||||
Index += 1
|
Index += 1
|
||||||
@@ -695,7 +693,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
DdlAlmacen.Items.Insert(0, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoOrigen}"), CveAlmacenTraspasoOrigen.ToString()))
|
DdlAlmacen.Items.Insert(0, New ListItem(GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoOrigen}"), CveAlmacenTraspasoOrigen.ToString()))
|
||||||
Else
|
Else
|
||||||
'[IPP] PARCHE - Debe hacerse permiso proceso - 17Enero2018
|
'[IPP] PARCHE - Debe hacerse permiso proceso - 17Enero2018
|
||||||
Dim RestriccionAlmacenSubProyecto = If(UsuarioActual.CveEmpresa.Contiene(72, 80), $" AND CveSubProyecto = {CveSubProyecto}", "")
|
Dim RestriccionAlmacenSubProyecto As String = If(UsuarioActual.CveEmpresa.Contiene(72, 80), $" AND CveSubProyecto = {CveSubProyecto}", "")
|
||||||
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"{StrAlmacenes} {RestriccionAlmacenSubProyecto}")
|
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"{StrAlmacenes} {RestriccionAlmacenSubProyecto}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -841,7 +839,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
LbObservaciones.Text = DtDatos.Rows(0)("Observaciones").ToString()
|
LbObservaciones.Text = DtDatos.Rows(0)("Observaciones").ToString()
|
||||||
|
|
||||||
Dim Index = 1
|
Dim Index As Integer = 1
|
||||||
For Each Dr As DataRow In DtDatos.Rows
|
For Each Dr As DataRow In DtDatos.Rows
|
||||||
Dr("Consec") = Index
|
Dr("Consec") = Index
|
||||||
Index += 1
|
Index += 1
|
||||||
@@ -962,7 +960,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
UpVenta.Update()
|
UpVenta.Update()
|
||||||
|
|
||||||
'CARGA LO PRECARGADO CON SERIE
|
'CARGA LO PRECARGADO CON SERIE
|
||||||
Dim Contador = 0
|
Dim Contador As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("CvePS").ToEntero() = CvePSSerie AndAlso DtDatosDetalle IsNot Nothing Then
|
If Gvr.DataKey("CvePS").ToEntero() = CvePSSerie AndAlso DtDatosDetalle IsNot Nothing Then
|
||||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||||
@@ -987,7 +985,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then
|
If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then
|
||||||
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count
|
Dim Contador As Integer = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString()
|
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString()
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
||||||
@@ -1004,7 +1002,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoDocto = "Ing" AndAlso e.Row.DBCampo("ObservacionesDetalle").Length > 8 AndAlso DdlAlmacen.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then
|
If TipoDocto = "Ing" AndAlso e.Row.DBCampo("ObservacionesDetalle").Length > 8 AndAlso DdlAlmacen.SelectedValue.ToEntero > 0 AndAlso UsuarioActual.CveRol = 1 Then
|
||||||
Dim Str = e.Row.DBCampo("ObservacionesDetalle").Replace(",", " ").Replace(".", " ").Replace(vbTab, " ").Replace(vbLf, " ").Split(" "c)
|
Dim Str As Array = e.Row.DBCampo("ObservacionesDetalle").Replace(",", " ").Replace(".", " ").Replace(vbTab, " ").Replace(vbLf, " ").Split(" "c)
|
||||||
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
|
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
|
||||||
PSSerie = e.Row.DBCampo("PS").ToString()
|
PSSerie = e.Row.DBCampo("PS").ToString()
|
||||||
CvePSSerie = e.Row.DBCampo("CvePS").ToEntero()
|
CvePSSerie = e.Row.DBCampo("CvePS").ToEntero()
|
||||||
@@ -1042,7 +1040,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||||
|
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
|
If (e.Row.FCTextBox("TxtCaducidad").Text = "" OrElse e.Row.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha) OrElse UsuarioActual.TienePermisoProceso(364) Then
|
||||||
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
e.Row.FCTextBox("TxtCaducidad").ReadOnly = False
|
||||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||||
@@ -1056,13 +1054,12 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||||
e.Row.FCTextBox("TxtLote").Visible = True
|
e.Row.FCTextBox("TxtLote").Visible = True
|
||||||
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
'si aplica caducidad y viene vacía (posible por venta anterior), que se active su registro
|
||||||
If e.Row.FCTextBox("TxtLote").Text = "" Then
|
If e.Row.FCTextBox("TxtLote").Text = "" OrElse UsuarioActual.TienePermisoProceso(364) Then
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
e.Row.FCTextBox("TxtLote").ReadOnly = False
|
||||||
e.Row.FCTextBox("TxtLote").Enabled = True
|
e.Row.FCTextBox("TxtLote").Enabled = True
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtLote").Visible = False
|
e.Row.FCTextBox("TxtLote").Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -1126,7 +1123,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
Dim Argumentos As String() = CType(sender, Button).CommandArgument.Split("°"c)
|
||||||
|
|
||||||
LbProducto.Text = Argumentos(2)
|
LbProducto.Text = Argumentos(2)
|
||||||
LbCantidad.Text = Argumentos(3)
|
LbCantidad.Text = Argumentos(3)
|
||||||
@@ -1140,7 +1137,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
CveConsecSerie = Argumentos(4).ToEntero()
|
CveConsecSerie = Argumentos(4).ToEntero()
|
||||||
CveMetodoInventario = Argumentos(5).ToEntero()
|
CveMetodoInventario = Argumentos(5).ToEntero()
|
||||||
|
|
||||||
|
|
||||||
If CveMetodoInventario = 6 Then
|
If CveMetodoInventario = 6 Then
|
||||||
RegistraScript("$('#DivLote').modal({backdrop: 'static', keyboard: false});")
|
RegistraScript("$('#DivLote').modal({backdrop: 'static', keyboard: false});")
|
||||||
CargaLote()
|
CargaLote()
|
||||||
@@ -1151,7 +1147,6 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
UpSerie.Update()
|
UpSerie.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " AGREGA POR SERIE/LOTE "
|
#Region " AGREGA POR SERIE/LOTE "
|
||||||
@@ -1175,7 +1170,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal({backdrop: 'static', keyboard: false})", "show")
|
If Not CargaMasivo Then RegistraScript("$('#DivSerie').modal({backdrop: 'static', keyboard: false})", "show")
|
||||||
|
|
||||||
Dim AplicaCaducidad = False
|
Dim AplicaCaducidad As Boolean = False
|
||||||
Dim dttt As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie)
|
Dim dttt As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie)
|
||||||
If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then
|
If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then
|
||||||
AplicaCaducidad = If(dttt.FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
AplicaCaducidad = If(dttt.FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
||||||
@@ -1238,7 +1233,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE SALIDA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
'SI TIENE SALIDA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
||||||
Dim Contador = 0
|
Dim Contador As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("AplicaSerie") = "True" Then
|
If Gvr.DataKey("AplicaSerie") = "True" Then
|
||||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||||
@@ -1309,7 +1304,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
'Valida Existencia
|
'Valida Existencia
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie, CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error2")
|
||||||
@@ -1319,7 +1314,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
Else
|
Else
|
||||||
If DtExistencias IsNot Nothing Then
|
If DtExistencias IsNot Nothing Then
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
Dim Existencia As Decimal = DtExistencias.SUMD("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Serie = '{Serie}'")
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con la Serie definida <b>""{Serie}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia, If(Tipo = 2, "window.setTimeout(Focus,200);", ""))
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')", "Error3")
|
||||||
@@ -1328,8 +1323,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim Row As DataRow = DtDatosDetalle.NewRow
|
||||||
Dim Row = DtDatosDetalle.NewRow
|
|
||||||
|
|
||||||
Row("ConsecId") = CveConsecSerie
|
Row("ConsecId") = CveConsecSerie
|
||||||
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
||||||
@@ -1539,15 +1533,15 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Row = DtDatosDetalleLote.NewRow
|
Dim Row As DataRow = DtDatosDetalleLote.NewRow
|
||||||
Dim CantidadLote = TxtCantidadLote.Text.ToDecimal
|
Dim CantidadLote As Decimal = TxtCantidadLote.Text.ToDecimal
|
||||||
|
|
||||||
Dim MensajeSinExistencias As New StringBuilder
|
Dim MensajeSinExistencias As New StringBuilder
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Lote:=Lote, ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), Lote:=Lote, ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
If Existencia < CantidadLote Then
|
If Existencia < CantidadLote Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con el lote definido <b>""{Lote}""</b> y el batch <b>""{Batch}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con el lote definido <b>""{Lote}""</b> y el batch <b>""{Batch}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -1556,7 +1550,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If DtExistencias IsNot Nothing Then
|
If DtExistencias IsNot Nothing Then
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Lote = '{Lote}' AND Batch = '{Batch}'")
|
Dim Existencia As Decimal = DtExistencias.SUMD("Cantidad", $"CvePS = {CvePSSerie} AND CveUM = {CveUMSerie} AND Lote = '{Lote}' AND Batch = '{Batch}'")
|
||||||
If Existencia < CantidadLote Then
|
If Existencia < CantidadLote Then
|
||||||
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con el lote definido <b>""{Lote}""</b> y el batch <b>""{Batch}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia suficiente del producto <b>""{PSSerie}""</b> con el lote definido <b>""{Lote}""</b> y el batch <b>""{Batch}""</b>. Por favor rectifique y vuelva a intentar", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -1566,7 +1560,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim FechaCaducidad = ""
|
Dim FechaCaducidad As String = ""
|
||||||
If ObjInventarios.LoteRecomendadoGet(CvePSSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero()) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
If ObjInventarios.LoteRecomendadoGet(CvePSSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero()) AndAlso ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||||
FechaCaducidad = ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString
|
FechaCaducidad = ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString
|
||||||
End If
|
End If
|
||||||
@@ -1619,19 +1613,19 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
TdSeriePS.Visible = False
|
TdSeriePS.Visible = False
|
||||||
Dim Existe = False
|
Dim Existe As Boolean = False
|
||||||
Dim PSTemp = ""
|
Dim PSTemp As String = ""
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
||||||
Dim TxtCantidad = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
Dim TxtCantidad As TextBox = GvDatos.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
''VALIDA EXISTENCIA
|
''VALIDA EXISTENCIA
|
||||||
If Not TipoDocto.Contiene("Dev") Then
|
If Not TipoDocto.Contiene("Dev") Then
|
||||||
If TipoMovimiento = 1 Then
|
If TipoMovimiento = 1 Then
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim Existencia = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString().ToEntero(), Gvr.DataKey("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
Dim Existencia As Decimal = ObjInventario.GetExistenciasPS(Gvr.DataKey("CvePS").ToString().ToEntero(), Gvr.DataKey("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveVendedor:=CveVendedor, CveSubProyecto:=CveSubProyecto, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), ExcluyeApartados:=If(TipoEntrega = 2, 1, -1))
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
@@ -1641,7 +1635,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If DtExistencias IsNot Nothing Then
|
If DtExistencias IsNot Nothing Then
|
||||||
Dim Existencia = DtExistencias.SUM("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString().ToEntero()}")
|
Dim Existencia As Decimal = DtExistencias.SUMD("Cantidad", $"CvePS = {Gvr.DataKey("CvePS")} AND CveUM = {Gvr.DataKey("CveUM").ToString().ToEntero()}")
|
||||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"No hay existencias suficientes del producto: <br/><b>""{Gvr.DataKey("Codigo")}-{Gvr.DataKey("PS")}""</b>. <br/>Solo hay disponibles <b>{Existencia.FormatoNumero}</b> en Almacen. Por favor Verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
@@ -1663,7 +1657,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CantidadEspecial = Gvr.DataKey("CveClasificacion").ToString().ToEntero().Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString().ToEntero().Contiene(343032, 343033)
|
Dim CantidadEspecial As Boolean = Gvr.DataKey("CveClasificacion").ToString().ToEntero().Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString().ToEntero().Contiene(343032, 343033)
|
||||||
|
|
||||||
If CantidadEspecial Then
|
If CantidadEspecial Then
|
||||||
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
||||||
@@ -1702,7 +1696,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub VerificaVentaSurtida()
|
Private Sub VerificaVentaSurtida()
|
||||||
Dim Surtida = True
|
Dim Surtida As Boolean = True
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal <> Gvr.FCTextBox("TbCantidadF").Text.ToDecimal Then
|
If Gvr.DataKey("CantidadF").ToDecimal <> Gvr.FCTextBox("TbCantidadF").Text.ToDecimal Then
|
||||||
@@ -1729,7 +1723,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
AgregaCantidadEspecial()
|
AgregaCantidadEspecial()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub AgregaCantidadEspecial()
|
Private Sub AgregaCantidadEspecial()
|
||||||
Dim TxtCantidad = GvDatos.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF")
|
Dim TxtCantidad As TextBox = GvDatos.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF")
|
||||||
If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then
|
If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then
|
||||||
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString().FormatoNumero
|
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString().FormatoNumero
|
||||||
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
||||||
@@ -1872,7 +1866,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim FolioVirtual As Integer = -1
|
Dim FolioVirtual As Integer = -1
|
||||||
|
|
||||||
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
||||||
Dim Index = 0
|
Dim Index As Integer = 0
|
||||||
For Each gvr As GridViewRow In GvDatos.Rows
|
For Each gvr As GridViewRow In GvDatos.Rows
|
||||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
@@ -1921,8 +1915,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
DtTraspasos.Columns.Add("CveTipoAlmacen", GetType(Integer))
|
DtTraspasos.Columns.Add("CveTipoAlmacen", GetType(Integer))
|
||||||
DtTraspasos.Columns.Add("CveConceptoMovimientoSalida", GetType(Integer))
|
DtTraspasos.Columns.Add("CveConceptoMovimientoSalida", GetType(Integer))
|
||||||
|
|
||||||
Dim CveMovimientoSalida = -1, FolioSalida = -1, CveMovimientoEntrada = -1, CveMovimientoEntradaApartado = -1, FolioEntrada = -1, CveMovimientoSalidaDevRem = -1, FolioMovimientoSalidaDevRem = -1, CveMovimientoEntradaDevRem = -1, FolioMovimientoEntradaDevRem = -1
|
Dim CveMovimientoSalida As Integer = -1, FolioSalida As Integer = -1, CveMovimientoEntrada As Integer = -1, CveMovimientoEntradaApartado As Integer = -1, FolioEntrada As Integer = -1, CveMovimientoSalidaDevRem As Integer = -1, FolioMovimientoSalidaDevRem As Integer = -1, CveMovimientoEntradaDevRem As Integer = -1, FolioMovimientoEntradaDevRem As Integer = -1
|
||||||
|
|
||||||
|
|
||||||
Dim DtDevSinCosto As New DataTable
|
Dim DtDevSinCosto As New DataTable
|
||||||
DtDevSinCosto.Columns.Add("CveAlmacen", GetType(Integer))
|
DtDevSinCosto.Columns.Add("CveAlmacen", GetType(Integer))
|
||||||
@@ -1957,7 +1950,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Next
|
Next
|
||||||
StrXML.Append("</conceptos>")
|
StrXML.Append("</conceptos>")
|
||||||
|
|
||||||
Dim TieneErrorExistencia = False
|
Dim TieneErrorExistencia As Boolean = False
|
||||||
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
TieneErrorExistencia = True
|
TieneErrorExistencia = True
|
||||||
@@ -2019,7 +2012,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2069,7 +2062,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2212,7 +2205,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2266,7 +2259,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2319,7 +2312,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||||
@@ -2414,7 +2407,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
FolioGarantia = ObjInventario.Folio
|
FolioGarantia = ObjInventario.Folio
|
||||||
|
|
||||||
For Each RowGarantia As DataRow In DtGarantias.Rows
|
For Each RowGarantia As DataRow In DtGarantias.Rows
|
||||||
Dim CvePS = RowGarantia("CvePS").ToString().ToEntero()
|
Dim CvePS As Integer = RowGarantia("CvePS").ToString().ToEntero()
|
||||||
Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
|
Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
|
||||||
Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
|
Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
|
||||||
Dim PU As Decimal = 0 'valor cero, por tema contable 'RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
|
Dim PU As Decimal = 0 'valor cero, por tema contable 'RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
|
||||||
@@ -2456,16 +2449,16 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If Not ErrorMovInv AndAlso TipoMovimiento = 2 AndAlso UsuarioActual.Empresa.Funcionalidad(587) = "1" Then
|
If Not ErrorMovInv AndAlso TipoMovimiento = 2 AndAlso UsuarioActual.Empresa.Funcionalidad(587) = "1" Then
|
||||||
For Each Dr1 As DataRow In DtExistencias.FiltraParametros("CveTipoAlmacenDevolucion = 26").Rows
|
For Each Dr1 As DataRow In DtExistencias.FiltraParametros("CveTipoAlmacenDevolucion = 26").Rows
|
||||||
Dim CveMovimientoSalidaSinCosto = Dr1("CveMovimiento").ToString().ToEntero()
|
Dim CveMovimientoSalidaSinCosto As Integer = Dr1("CveMovimiento").ToString().ToEntero()
|
||||||
|
|
||||||
'Dim CveAlmacenSinCosto As Integer = Dr1("CveAlmacenDevolucion").ToString().ToEntero()
|
'Dim CveAlmacenSinCosto As Integer = Dr1("CveAlmacenDevolucion").ToString().ToEntero()
|
||||||
|
|
||||||
'Dim AlmacenSinCosto As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=26).FiltroPrimeroValor("Almacen", $"CveAlmacen={CveAlmacenSinCosto}").ToString()
|
'Dim AlmacenSinCosto As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=26).FiltroPrimeroValor("Almacen", $"CveAlmacen={CveAlmacenSinCosto}").ToString()
|
||||||
|
|
||||||
Dim CveMovimientoDevolucionSinCosto = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
Dim CveMovimientoDevolucionSinCosto As Integer = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||||
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
|
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
|
||||||
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
|
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
|
||||||
Dim FolioDevSinCosto = ObjInventario.Folio
|
Dim FolioDevSinCosto As Integer = ObjInventario.Folio
|
||||||
|
|
||||||
If Not CveMovimientoDevolucionSinCosto > 0 Then
|
If Not CveMovimientoDevolucionSinCosto > 0 Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
@@ -2488,7 +2481,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
If ErrorMovInv Then Exit For
|
If ErrorMovInv Then Exit For
|
||||||
|
|
||||||
Dim DrMovto = DtDevSinCosto.NewRow
|
Dim DrMovto As DataRow = DtDevSinCosto.NewRow
|
||||||
DrMovto("Almacen") = DdlAlmacen.SelectedItem.Text
|
DrMovto("Almacen") = DdlAlmacen.SelectedItem.Text
|
||||||
DrMovto("CveAlmacen") = DdlAlmacen.SelectedValue.ToEntero()
|
DrMovto("CveAlmacen") = DdlAlmacen.SelectedValue.ToEntero()
|
||||||
DrMovto("CveMovimientoEntrada") = CveMovimientoDevolucionSinCosto
|
DrMovto("CveMovimientoEntrada") = CveMovimientoDevolucionSinCosto
|
||||||
@@ -2515,7 +2508,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero() And TipoDocto <> "Rem" Then CveAlmacenTraspasoDestino = 0
|
If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero() And TipoDocto <> "Rem" Then CveAlmacenTraspasoDestino = 0
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then
|
If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then
|
||||||
Dim ConceptoMovimiento = 3
|
Dim ConceptoMovimiento As Integer = 3
|
||||||
ConceptoMovimiento = If(TipoMovimiento = 1, ConceptoMovimiento, 18)
|
ConceptoMovimiento = If(TipoMovimiento = 1, ConceptoMovimiento, 18)
|
||||||
ConceptoMovimiento = If(CveAlmacenTraspasoDestino > 0, 8, ConceptoMovimiento)
|
ConceptoMovimiento = If(CveAlmacenTraspasoDestino > 0, 8, ConceptoMovimiento)
|
||||||
|
|
||||||
@@ -2692,10 +2685,10 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If TipoMovimiento = 2 Then
|
If TipoMovimiento = 2 Then
|
||||||
If ObjInventario.VentasAlmacenApartadosGet(CveVentaSurtir) Then
|
If ObjInventario.VentasAlmacenApartadosGet(CveVentaSurtir) Then
|
||||||
|
|
||||||
Dim DtTempApartados = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen")
|
Dim DtTempApartados As DataTable = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen")
|
||||||
Dim CveMovimientoSalidaApartado = -1
|
Dim CveMovimientoSalidaApartado As Integer = -1
|
||||||
Dim CveAlmacenApartado = -1
|
Dim CveAlmacenApartado As Integer = -1
|
||||||
Dim CveAlmacenOrigen = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero())
|
Dim CveAlmacenOrigen As Integer = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero())
|
||||||
Dim CveSeccionAlmacen As Integer = 0
|
Dim CveSeccionAlmacen As Integer = 0
|
||||||
Dim ValorTraspaso As Decimal = 0
|
Dim ValorTraspaso As Decimal = 0
|
||||||
If DtTempApartados IsNot Nothing AndAlso DtTempApartados.Rows.Count > 0 Then
|
If DtTempApartados IsNot Nothing AndAlso DtTempApartados.Rows.Count > 0 Then
|
||||||
@@ -2708,7 +2701,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
FolioSalida = ObjInventario.Folio
|
FolioSalida = ObjInventario.Folio
|
||||||
CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero()
|
CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero()
|
||||||
|
|
||||||
Dim DrMovto = DtTraspasos.NewRow
|
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||||
DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero()
|
DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero()
|
||||||
DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero()
|
DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero()
|
||||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado
|
DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado
|
||||||
@@ -2898,7 +2891,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
Dim CvePS As Integer = RowUsado("CvePS").ToString().ToEntero()
|
||||||
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||||
@@ -2947,7 +2940,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
'AGREGA BITACORA A VENTA
|
'AGREGA BITACORA A VENTA
|
||||||
If Not ErrorMovInv Then
|
If Not ErrorMovInv Then
|
||||||
Dim MensajeBitacora = If(TipoMovimiento = 1, "Surtida", "Devuelta")
|
Dim MensajeBitacora As String = If(TipoMovimiento = 1, "Surtida", "Devuelta")
|
||||||
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then
|
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
End If
|
End If
|
||||||
@@ -3103,7 +3096,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ValorMultiplicador = -1
|
ValorMultiplicador = -1
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/EntregaAlmacen", 1, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/EntregaAlmacen", 4, TotalCosto, TotalCosto, 1, Fecha, ClienteNombre, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
'Se agrega movimiento separado por la cuenta de ventas (ER)
|
||||||
|
|
||||||
If CvePrePoliza > 0 Then
|
If CvePrePoliza > 0 Then
|
||||||
@@ -3222,16 +3215,16 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL())
|
Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL())
|
||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
Dim CveMovimientoSalida As Integer
|
Dim CveMovimientoSalida As Integer
|
||||||
Dim ConceptoMovimiento = 0
|
Dim ConceptoMovimiento As Integer = 0
|
||||||
Dim FolioSalida As Integer
|
Dim FolioSalida As Integer
|
||||||
Dim CveMovimientoEntrada As Integer
|
Dim CveMovimientoEntrada As Integer
|
||||||
Dim FolioEntrada As Integer
|
Dim FolioEntrada As Integer
|
||||||
Dim ErrorMovInv As Boolean
|
Dim ErrorMovInv As Boolean
|
||||||
Dim DtDetalle As New DataTable
|
Dim DtDetalle As New DataTable
|
||||||
Dim TextoError = ""
|
Dim TextoError As String = ""
|
||||||
|
|
||||||
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
||||||
Dim Index = 0
|
Dim Index As Integer = 0
|
||||||
For Each gvr As GridViewRow In GvDatos.Rows
|
For Each gvr As GridViewRow In GvDatos.Rows
|
||||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
@@ -3247,7 +3240,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
If ObjInventario.EntregaAlmacenTraspasosGet(CveTraspasoSurtir) Then
|
If ObjInventario.EntregaAlmacenTraspasosGet(CveTraspasoSurtir) Then
|
||||||
DtDatosTraspaso = ObjInventario.DtResultados
|
DtDatosTraspaso = ObjInventario.DtResultados
|
||||||
End If
|
End If
|
||||||
Dim CantidadGV = GvDatos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("CantidadF").ToDecimal)
|
Dim CantidadGV As Decimal = GvDatos.Rows.Cast(Of GridViewRow)().Sum(Function(gvr) gvr.DataKey("CantidadF").ToDecimal)
|
||||||
If DtDatos.SUM("CantidadF") <> DtDatosTraspaso.SUM("CantidadF") Then
|
If DtDatos.SUM("CantidadF") <> DtDatosTraspaso.SUM("CantidadF") Then
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
ObjInventario.Dispose()
|
ObjInventario.Dispose()
|
||||||
@@ -3268,8 +3261,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'VALIDA ALMACENES
|
'VALIDA ALMACENES
|
||||||
Dim Almacen1 = DdlAlmacen.SelectedValue.ToEntero()
|
Dim Almacen1 As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||||
Dim Almacen2 = CveAlmacenTraspasoDestino
|
Dim Almacen2 As Integer = CveAlmacenTraspasoDestino
|
||||||
If Almacen1 <= 0 Or Almacen2 <= 0 Then
|
If Almacen1 <= 0 Or Almacen2 <= 0 Then
|
||||||
Alert("Ocurrió un error al obtener los almacenes del movimiento. Por favor recargue y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Ocurrió un error al obtener los almacenes del movimiento. Por favor recargue y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
@@ -3299,7 +3292,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Next
|
Next
|
||||||
StrXML.Append("</conceptos>")
|
StrXML.Append("</conceptos>")
|
||||||
|
|
||||||
Dim TieneErrorExistencia = False
|
Dim TieneErrorExistencia As Boolean = False
|
||||||
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetExistenciasPSXML(StrXML.ToString(), DdlAlmacen.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSubProyecto, CveVendedor, If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), If(TipoEntrega = 2, 1, -1), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
TieneErrorExistencia = True
|
TieneErrorExistencia = True
|
||||||
@@ -3502,7 +3495,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim Asunto As String = String.Format("{0} Envio de pedido: {1}", UsuarioActual.Empresa.NombreCorto, SerieFolio)
|
Dim Asunto As String = String.Format("{0} Envio de pedido: {1}", UsuarioActual.Empresa.NombreCorto, SerieFolio)
|
||||||
Dim Cuerpo As New StringBuilder()
|
Dim Cuerpo As New StringBuilder()
|
||||||
Dim Destinatario As String = ""
|
Dim Destinatario As String = ""
|
||||||
Dim MensajeEnviado = False
|
Dim MensajeEnviado As Boolean = False
|
||||||
Dim tCvecliente As Integer
|
Dim tCvecliente As Integer
|
||||||
Dim tCveVendedor As Integer
|
Dim tCveVendedor As Integer
|
||||||
Dim bytes() As Byte = Nothing
|
Dim bytes() As Byte = Nothing
|
||||||
@@ -3951,7 +3944,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
DtDatosSugerencias.Columns.Add("CantidadSeleccionada", GetType(Double))
|
DtDatosSugerencias.Columns.Add("CantidadSeleccionada", GetType(Double))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Index = 1
|
Dim Index As Integer = 1
|
||||||
For Each Dr As DataRow In DtDatosSugerencias.Rows
|
For Each Dr As DataRow In DtDatosSugerencias.Rows
|
||||||
Dr("Consec") = Index
|
Dr("Consec") = Index
|
||||||
|
|
||||||
@@ -4005,7 +3998,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
Protected Sub BtnImprimirSugerencias_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnImprimirSugerencias_Click(sender As Object, e As EventArgs)
|
||||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ Partial Class Inventarios_Default
|
|||||||
GV.DataSource = ObjInventarios.DtResultados
|
GV.DataSource = ObjInventarios.DtResultados
|
||||||
Else
|
Else
|
||||||
GV.DataSource = Nothing
|
GV.DataSource = Nothing
|
||||||
Dim Js = If(Tipo = 1, "", "window.setTimeout(Focus,200);")
|
Dim Js As String = If(Tipo = 1, "", "window.setTimeout(Focus,200);")
|
||||||
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -237,7 +237,7 @@ Partial Class Inventarios_Default
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'")
|
Dim DrPS As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'")
|
||||||
If DrPS Is Nothing Then
|
If DrPS Is Nothing Then
|
||||||
Alert($"No se ha encontrado un producto del Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"No se ha encontrado un producto del Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
|
|||||||
@@ -1040,7 +1040,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ArchivoBitacora = String.Format("{0}Temp\RecepcionDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, pCveCompra)
|
ArchivoBitacora = String.Format("{0}Temp\RecepcionDT_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, pCveCompra)
|
||||||
ArchivoBitacoraDetalle = String.Format("{0}Temp\RecepcionDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, pCveCompra)
|
ArchivoBitacoraDetalle = String.Format("{0}Temp\RecepcionDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, pCveCompra)
|
||||||
If ArchivoBitacora <> "" Then
|
If ArchivoBitacora <> "" Then
|
||||||
Dim Archivo = New System.IO.FileInfo(ArchivoBitacora)
|
Dim Archivo As New System.IO.FileInfo(ArchivoBitacora)
|
||||||
If Archivo.Exists() Then
|
If Archivo.Exists() Then
|
||||||
HplCargaBitacora.Visible = True
|
HplCargaBitacora.Visible = True
|
||||||
uppCargaBitacora.Update()
|
uppCargaBitacora.Update()
|
||||||
@@ -1467,7 +1467,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count
|
Dim Contador As Integer = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DataKey("Consec"))).Rows.Count
|
||||||
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
|
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
|
||||||
|
|
||||||
'' Empresa Acumuladores
|
'' Empresa Acumuladores
|
||||||
@@ -1612,7 +1612,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
If Gvr.DataKey("CodigoBarras") = TxtCodigoPS.Text.Trim Then
|
||||||
Dim TxtCantidad = GvInv.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
Dim TxtCantidad As TextBox = GvInv.Rows(Gvr.RowIndex).FCTextBox("TbCantidadF")
|
||||||
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
If Gvr.DataKey("CantidadF").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
|
||||||
|
|
||||||
If Gvr.DataKey("AplicaSerie") = "True" Then
|
If Gvr.DataKey("AplicaSerie") = "True" Then
|
||||||
@@ -1625,7 +1625,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CantidadEspecial = Gvr.DataKey("CveClasificacion").ToString.ToEntero.Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString.ToEntero.Contiene(343032, 343033)
|
Dim CantidadEspecial As Boolean = Gvr.DataKey("CveClasificacion").ToString.ToEntero.Contiene(17601, 17881) OrElse Gvr.DataKey("CvePS").ToString.ToEntero.Contiene(343032, 343033)
|
||||||
|
|
||||||
If CantidadEspecial Then
|
If CantidadEspecial Then
|
||||||
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
||||||
@@ -1639,9 +1639,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
Dim MensajeSinExistencias As New StringBuilder
|
Dim MensajeSinExistencias As New StringBuilder
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim ExistenciaActual = DtInv.SUM("CantidadSurtidaPantalla", $"CvePS = {Gvr.DataKey("CvePS").ToEntero} AND CveUM = {Gvr.DataKey("CveUM").ToEntero} ") + 1
|
Dim ExistenciaActual As Decimal = DtInv.SUMD("CantidadSurtidaPantalla", $"CvePS = {Gvr.DataKey("CvePS").ToEntero} AND CveUM = {Gvr.DataKey("CveUM").ToEntero} ") + 1
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(Gvr.DataKey("CvePS").ToEntero, Gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(Gvr.DataKey("CvePS").ToEntero, Gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"))
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
If Existencia < ExistenciaActual Then
|
If Existencia < ExistenciaActual Then
|
||||||
@@ -1662,20 +1662,16 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
RegistraScript("playsonidito('beep-07.wav')")
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
UPInv.Update()
|
UPInv.Update()
|
||||||
Dim Dr = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
Dim Dr As DataRow = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
||||||
Dr("CantidadSurtidaPantalla") = TxtCantidad.Text.ToDecimal
|
Dr("CantidadSurtidaPantalla") = TxtCantidad.Text.ToDecimal
|
||||||
DtInv.AcceptChanges()
|
DtInv.AcceptChanges()
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Codigo ""<b>{TxtCodigoPS.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Codigo ""<b>{TxtCodigoPS.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
@@ -1695,7 +1691,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
AgregaCantidadEspecial()
|
AgregaCantidadEspecial()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub AgregaCantidadEspecial()
|
Private Sub AgregaCantidadEspecial()
|
||||||
Dim TxtCantidad = GvInv.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF")
|
Dim TxtCantidad As TextBox = GvInv.Rows(RowIndexCantidadEspecial).FCTextBox("TbCantidadF")
|
||||||
If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then
|
If CantidadEspecialTemp - TxtCantidadEspecialDiv.Text.ToDecimal - TxtCantidad.Text.ToDecimal >= 0 Then
|
||||||
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString.FormatoNumero
|
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString.FormatoNumero
|
||||||
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
||||||
@@ -1715,7 +1711,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
#Region " AGREGA POR SERIE/LOTE "
|
#Region " AGREGA POR SERIE/LOTE "
|
||||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
Dim Argumentos As String() = CType(sender, Button).CommandArgument.Split("°"c)
|
||||||
|
|
||||||
LbProducto.Text = Argumentos(3)
|
LbProducto.Text = Argumentos(3)
|
||||||
LbCantidad.Text = Argumentos(4).FormatoNumero
|
LbCantidad.Text = Argumentos(4).FormatoNumero
|
||||||
@@ -1767,7 +1763,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE ENTRADA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
'SI TIENE ENTRADA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
||||||
Dim Contador = 0
|
Dim Contador As Integer = 0
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||||
@@ -1782,7 +1778,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Dr = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
Dim Dr As DataRow = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
||||||
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
DtInv.AcceptChanges()
|
DtInv.AcceptChanges()
|
||||||
Next
|
Next
|
||||||
@@ -1806,7 +1802,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim SeriesArreglo = Serie.Trim.Split(";"c)
|
Dim SeriesArreglo As Array = Serie.Trim.Split(";"c)
|
||||||
|
|
||||||
'VALIDACION DE SERIES DUPLICADAS
|
'VALIDACION DE SERIES DUPLICADAS
|
||||||
Dim MensajeAlert As New StringBuilder
|
Dim MensajeAlert As New StringBuilder
|
||||||
@@ -1839,7 +1835,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
Dim MensajeSinExistencias As New StringBuilder
|
Dim MensajeSinExistencias As New StringBuilder
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim Index = 0
|
Dim Index As Integer = 0
|
||||||
Dim Cantidad As Integer = LbCantidad.Text.ToEntero
|
Dim Cantidad As Integer = LbCantidad.Text.ToEntero
|
||||||
|
|
||||||
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
|
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
|
||||||
@@ -1848,7 +1844,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
For Each Serie In SeriesArreglo
|
For Each Serie In SeriesArreglo
|
||||||
If Serie <> "" Then
|
If Serie <> "" Then
|
||||||
|
|
||||||
Dim Row = DtDatosDetalle.NewRow
|
Dim Row As DataRow = DtDatosDetalle.NewRow
|
||||||
Index = Index + 1
|
Index = Index + 1
|
||||||
If Index > Cantidad Then Exit For
|
If Index > Cantidad Then Exit For
|
||||||
|
|
||||||
@@ -1859,7 +1855,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
|
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
|
||||||
Continue For
|
Continue For
|
||||||
@@ -1973,7 +1969,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnLote_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnLote_Click(sender As Object, e As EventArgs)
|
||||||
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
Dim Argumentos As String() = CType(sender, Button).CommandArgument.Split("°"c)
|
||||||
|
|
||||||
LbLoteProducto2.Text = Argumentos(3)
|
LbLoteProducto2.Text = Argumentos(3)
|
||||||
LbLoteCantidad2.Text = Argumentos(4).FormatoNumero
|
LbLoteCantidad2.Text = Argumentos(4).FormatoNumero
|
||||||
@@ -2002,10 +1998,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE ENTRADA POR LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
'SI TIENE ENTRADA POR LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
||||||
Dim Contador = 0.0
|
Dim Contador As Decimal = 0
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||||
Contador = DtDatosLoteDetalle.SUM("Cantidad", String.Format("ConsecId = {0}", Gvr.DataKey("Consec")))
|
Contador = DtDatosLoteDetalle.SUMD("Cantidad", String.Format("ConsecId = {0}", Gvr.DataKey("Consec")))
|
||||||
Gvr.FCCheckBox("cbInv").Enabled = False
|
Gvr.FCCheckBox("cbInv").Enabled = False
|
||||||
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
||||||
If DtDatosLoteDetalle IsNot Nothing AndAlso Contador > 0 Then
|
If DtDatosLoteDetalle IsNot Nothing AndAlso Contador > 0 Then
|
||||||
@@ -2017,7 +2013,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Dr = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
Dim Dr As DataRow = DtInv.Select($"Consec = {Gvr.DataKey("Consec")}")(0)
|
||||||
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
Dr("CantidadSurtidaPantalla") = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
DtInv.AcceptChanges()
|
DtInv.AcceptChanges()
|
||||||
Next
|
Next
|
||||||
@@ -2070,7 +2066,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Lote)
|
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Lote)
|
||||||
If Existencia < CantidadLote Then
|
If Existencia < CantidadLote Then
|
||||||
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -2405,11 +2401,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'CONTABILIZAR - SIMPLIFICAR
|
'CONTABILIZAR - SIMPLIFICAR
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Retorno = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
@@ -2476,11 +2467,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'CONTABILIZAR - SIMPLIFICAR
|
'CONTABILIZAR - SIMPLIFICAR
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Retorno = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
@@ -3471,13 +3457,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
MensajeError = "Error al simplificar los conceptos contables"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
MensajeContabilidad = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
MensajeContabilidad = $"<br>Movimiento contabilizado en el folio: <b><a class='Texto' href = '/Contabilidad/RegPoliza.aspx?IdPoliza={ObjConta.ContaIdPoliza}'>{ObjConta.ContaFolio}</a></b><br>"
|
||||||
@@ -3578,14 +3557,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
MensajeError = "Error al simplificar los conceptos contables"
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
||||||
|
|
||||||
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
@@ -4824,7 +4795,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||||
|
|
||||||
Dim dt As DataTable = Nothing
|
Dim dt As DataTable = Nothing
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
|
|
||||||
Try
|
Try
|
||||||
dt = ReadExcelFile(Ruta + FileName, True)
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
@@ -4871,7 +4842,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
For Each RowExcel As DataRow In dt.Rows
|
For Each RowExcel As DataRow In dt.Rows
|
||||||
If RowExcel("Código").ToString() <> "" Then
|
If RowExcel("Código").ToString() <> "" Then
|
||||||
|
|
||||||
Dim RowPS = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString()))
|
Dim RowPS As DataRow = DtInv.FiltroPrimero(String.Format("Codigo='{0}'", RowExcel("Código").ToString()))
|
||||||
|
|
||||||
If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then
|
If RowPS IsNot Nothing AndAlso RowPS("CvePS").ToString().ToEntero() > 0 Then
|
||||||
|
|
||||||
|
|||||||
@@ -1455,8 +1455,8 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
|
|
||||||
If tmpCostos.Rows.Count > 0 Then
|
If tmpCostos.Rows.Count > 0 Then
|
||||||
Dim Concepto As String = ConceptoPoliza
|
Dim Concepto As String = ConceptoPoliza
|
||||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados2", 74, DtCostos.SUMD("Total"), DtCostos.SUMD("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv_EntradaSalidaUsados2", 74, DtCostos.SUMD("Total"), DtCostos.SUMD("Total"), 1, TxtFecha.Text.ToDate, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Dim tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
Dim tCveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||||
Dim tCveConcepto As Integer = 278
|
Dim tCveConcepto As Integer = 278
|
||||||
|
|
||||||
For Each RowInv As DataRow In tmpCostos.Rows
|
For Each RowInv As DataRow In tmpCostos.Rows
|
||||||
@@ -1471,7 +1471,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Correcto = False
|
Correcto = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Inventarios/RecepcionAlmacen-PPCompOC | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
@@ -1479,26 +1478,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CONTABILIZAR - SIMPLIFICAR
|
|
||||||
If Correcto Then
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
If Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Correcto = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
|
|
||||||
' If ObjContaContPAQ Is Nothing Then
|
|
||||||
' ObjContaContPAQ = New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
' ObjContaContPAQ.IniciaTransacSQL()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjContaContPAQ) Then
|
|
||||||
' Retorno = False
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Correcto = False
|
Correcto = False
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Partial Class Inventarios_RepVentasXSurtir
|
|||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
|
|
||||||
If ObjInventarios.GetPendietePorSurtirVenta(DdlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlTipo.SelectedValue.ToEntero) Then
|
If ObjInventarios.GetPendientePorSurtirVenta(DdlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, DdlTipo.SelectedValue.ToEntero) Then
|
||||||
GvDatos.DataSource = ObjInventarios.DtResultados
|
GvDatos.DataSource = ObjInventarios.DtResultados
|
||||||
Else
|
Else
|
||||||
GvDatos.DataSource = Nothing
|
GvDatos.DataSource = Nothing
|
||||||
|
|||||||
@@ -2377,6 +2377,10 @@ Partial Class OC_OC
|
|||||||
Private Function ValidaGuardar() As Boolean
|
Private Function ValidaGuardar() As Boolean
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||||
|
ChkCotizacion.Checked = False
|
||||||
|
End If
|
||||||
|
|
||||||
If CboE.SelectedValue.ToEntero = 0 AndAlso TipoOC = "OC" Then
|
If CboE.SelectedValue.ToEntero = 0 AndAlso TipoOC = "OC" Then
|
||||||
Alert("Las ordenes de compra no puede tener el estatus 'Pre Solicitud'. Debe ser una requisición", TipoMensaje.MsgAdvertencia)
|
Alert("Las ordenes de compra no puede tener el estatus 'Pre Solicitud'. Debe ser una requisición", TipoMensaje.MsgAdvertencia)
|
||||||
Return True
|
Return True
|
||||||
@@ -2608,10 +2612,6 @@ Partial Class OC_OC
|
|||||||
'VALIDACIONES PARA GUARDAR
|
'VALIDACIONES PARA GUARDAR
|
||||||
If ValidaGuardar() Then Exit Sub
|
If ValidaGuardar() Then Exit Sub
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
|
||||||
ChkCotizacion.Checked = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim MsgError As String = "Hubo un error al registrar"
|
Dim MsgError As String = "Hubo un error al registrar"
|
||||||
'VARIABLES
|
'VARIABLES
|
||||||
Dim CveProveedorSucursal As Integer = -1
|
Dim CveProveedorSucursal As Integer = -1
|
||||||
@@ -5686,7 +5686,7 @@ Partial Class OC_OC
|
|||||||
Else
|
Else
|
||||||
DivIVAFacturar.Visible = True
|
DivIVAFacturar.Visible = True
|
||||||
End If
|
End If
|
||||||
CveMonedaPreferente = dtt.FiltroPrimeroValor("CveConfianzaProveedor").ToEntero()
|
CveMonedaPreferente = dtt.FiltroPrimeroValor("CveMonedaPreferente").ToEntero()
|
||||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
||||||
Me.CveConfianzaProveedor = dtt.FiltroPrimeroValor("CveConfianzaProveedor").ToEntero()
|
Me.CveConfianzaProveedor = dtt.FiltroPrimeroValor("CveConfianzaProveedor").ToEntero()
|
||||||
'SI NO TIENE ASIGNADO UN NIVEL DE CONFIANZA SE ASIGNARA EL VALOR DE 'PROVEEDOR NO DEDICADO'
|
'SI NO TIENE ASIGNADO UN NIVEL DE CONFIANZA SE ASIGNARA EL VALOR DE 'PROVEEDOR NO DEDICADO'
|
||||||
@@ -5698,7 +5698,7 @@ Partial Class OC_OC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'MUESTRA IVA PROVEEDOR EXTRANJERO
|
'MUESTRA IVA PROVEEDOR EXTRANJERO
|
||||||
If UsuarioActual.CveEmpresa <> 119 AndAlso GlobalDTCompProveedores(CveEmpresaActual).FiltraParametros($"CveProveedor = {DdlProveedores.SelectedValue} AND RFC = 'XEXX010101000'").Rows.Count = 1 Then
|
If UsuarioActual.CveEmpresa <> 119 AndAlso dtt.FiltraParametros("RFC = 'XEXX010101000'").Rows.Count = 1 Then
|
||||||
'Alert("Proveedor extranjero")
|
'Alert("Proveedor extranjero")
|
||||||
LblLeyendaProveedorIVA.Text = "IVA 0%"
|
LblLeyendaProveedorIVA.Text = "IVA 0%"
|
||||||
'Si es proveedor extranjero selecciona iva al 0%
|
'Si es proveedor extranjero selecciona iva al 0%
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click 'esta funcion es la que agrega un nuevo motivo de baja se activa con el boton "Agregar" de la ventana modal"
|
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles BtnAgregarTiposDModal.Click 'esta funcion es la que agrega un nuevo motivo de baja se activa con el boton "Agregar" de la ventana modal"
|
||||||
Dim ObjAsistenciasInasistencias As New ClsRH
|
Dim ObjAsistenciasInasistencias As New ClsRH
|
||||||
Dim chkAplicaFalta As Boolean = AplicaFalta.Checked
|
Dim chkAplicaFalta As Boolean = AplicaFalta.Checked
|
||||||
Dim chkAplicaNoAplica As Boolean = Not AplicaNoAplica.Checked
|
Dim chkAplicaNoAplica As Boolean = AplicaNoAplica.Checked
|
||||||
Dim chkAplicaVacacion As Boolean = AplicaVacacion.Checked
|
Dim chkAplicaVacacion As Boolean = AplicaVacacion.Checked
|
||||||
Dim chkAplicaIncapacidad As Boolean = AplicaIncapacidad.Checked
|
Dim chkAplicaIncapacidad As Boolean = AplicaIncapacidad.Checked
|
||||||
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
|
Dim chkAplicaRetardo As Boolean = AplicaRetardo.Checked
|
||||||
@@ -154,7 +154,7 @@ Partial Class RH_CatAsistenciasInasistencias
|
|||||||
Dim Tipo As String = TipoTxt.Text.Trim
|
Dim Tipo As String = TipoTxt.Text.Trim
|
||||||
Dim TipoCorto As String = TxtTipoCorto.Text.Trim
|
Dim TipoCorto As String = TxtTipoCorto.Text.Trim
|
||||||
Dim Estatus As Boolean = ChkEstatus.Checked
|
Dim Estatus As Boolean = ChkEstatus.Checked
|
||||||
Dim ckAplicaFalta As Boolean = Not AplicaFalta.Checked
|
Dim ckAplicaFalta As Boolean = AplicaFalta.Checked
|
||||||
Dim AplicaAsistencia As Boolean = AplicaNoAplica.Checked
|
Dim AplicaAsistencia As Boolean = AplicaNoAplica.Checked
|
||||||
Dim CveAsistenciasInasistencias As Integer = CveTipoAsisAEditar 'aquí obtenemos el valor de la propiedad que utilizamos en el metodo "GvDatos_RowEditing"
|
Dim CveAsistenciasInasistencias As Integer = CveTipoAsisAEditar 'aquí obtenemos el valor de la propiedad que utilizamos en el metodo "GvDatos_RowEditing"
|
||||||
|
|
||||||
|
|||||||
@@ -885,12 +885,12 @@ Partial Class RH_Personal
|
|||||||
'Configuración
|
'Configuración
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
Dim dt = GlobalDTSubProyectosUsuariosB(1360, -1, 172, -1, -1)
|
Dim dt As DataTable = GlobalDTSubProyectosUsuariosB(1360, -1, 172, -1, -1)
|
||||||
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
If UsuarioActual.CveEmpresa = 72 OrElse UsuarioActual.CveEmpresa = 80 Then
|
||||||
pnlSalarioIMSS.Visible = False
|
pnlSalarioIMSS.Visible = False
|
||||||
End If
|
End If
|
||||||
LnkContratoAgropecuaria.Visible = (UsuarioActual.CveEmpresa.Contiene(1, 158))
|
LnkContratoAgropecuaria.Visible = (UsuarioActual.CveEmpresa.Contiene(1, 158))
|
||||||
Using objno = New ClsNominas
|
Using objno As New ClsNominas
|
||||||
objno.GetConceptos()
|
objno.GetConceptos()
|
||||||
dtNomConceptos = objno.DtResultados
|
dtNomConceptos = objno.DtResultados
|
||||||
End Using
|
End Using
|
||||||
@@ -1729,24 +1729,24 @@ Partial Class RH_Personal
|
|||||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
|
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
|
||||||
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.jpg", UsuarioActual.CveEmpresa, CvePersonal)
|
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.jpg", UsuarioActual.CveEmpresa, CvePersonal)
|
||||||
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
|
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png") Then
|
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".png") Then
|
||||||
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
|
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
|
||||||
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.png", UsuarioActual.Empresa.Ruta, CvePersonal)
|
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.png", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
|
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp") Then
|
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".bmp") Then
|
||||||
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.bmp", UsuarioActual.CveEmpresa, CvePersonal)
|
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.bmp", UsuarioActual.CveEmpresa, CvePersonal)
|
||||||
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal)
|
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.bmp", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg") Then
|
ElseIf File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpeg") Then
|
||||||
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
|
'Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.png", UsuarioActual.CveEmpresa, CvePersonal)
|
||||||
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpeg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
Dim LogoRutaFisica As String = String.Format("{0}RH\Personal\{1}.jpeg", UsuarioActual.Empresa.Ruta, CvePersonal)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?Ru={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
|
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
End If
|
End If
|
||||||
@@ -1973,13 +1973,12 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Dim Extension As String = Path.GetExtension(UsuarioActual.Empresa.Ruta & "Temp\RH\" & ViewState("Archivo").ToString())
|
Dim Extension As String = Path.GetExtension(UsuarioActual.Empresa.Ruta & "Temp\RH\" & ViewState("Archivo").ToString())
|
||||||
Dim URL As String = If(Extension.Trim().Length > 0, CvePersonal & Extension, "")
|
Dim URL As String = If(Extension.Trim().Length > 0, CvePersonal & Extension, "")
|
||||||
Dim Ruta = String.Format("{0}Temp\RH\{1}", UsuarioActual.Empresa.Ruta, ViewState("Archivo").ToString())
|
Dim Ruta As String = String.Format("{0}Temp\RH\{1}", UsuarioActual.Empresa.Ruta, ViewState("Archivo").ToString())
|
||||||
Dim Archivo As New System.IO.FileInfo(Ruta)
|
Dim Archivo As New System.IO.FileInfo(Ruta)
|
||||||
|
|
||||||
|
Dim TieneError As Boolean = False
|
||||||
Dim TieneError = False
|
Dim Mensaje As String = ""
|
||||||
Dim Mensaje = ""
|
Dim Accion As String = ""
|
||||||
Dim Accion = ""
|
|
||||||
|
|
||||||
'Dim FechaBaja As Date = MinFecha
|
'Dim FechaBaja As Date = MinFecha
|
||||||
'Dim FechaActivo As Date = MinFecha
|
'Dim FechaActivo As Date = MinFecha
|
||||||
@@ -3320,7 +3319,7 @@ Partial Class RH_Personal
|
|||||||
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
|
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
||||||
Dim EsBancomer = False
|
Dim EsBancomer As Boolean = False
|
||||||
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
|
Dim nombrebanco As String = DdlBancoSat.SelectedItem.Text
|
||||||
If nombrebanco.ToUpper.Contains("BBVA") Or nombrebanco.ToUpper.Contains("BANCOMER") Or (TxtCLABECB.Text.Length = 18 AndAlso TxtCLABECB.Text.Substring(0, 3) = "012") Then
|
If nombrebanco.ToUpper.Contains("BBVA") Or nombrebanco.ToUpper.Contains("BANCOMER") Or (TxtCLABECB.Text.Length = 18 AndAlso TxtCLABECB.Text.Substring(0, 3) = "012") Then
|
||||||
EsBancomer = True
|
EsBancomer = True
|
||||||
@@ -3478,7 +3477,7 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CvePersonal < 0 Then
|
If CvePersonal < 0 Then
|
||||||
For index = 1 To TempDTCuentasBancos.Rows.Count
|
For index As Integer = 1 To TempDTCuentasBancos.Rows.Count
|
||||||
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
|
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
|
||||||
Next
|
Next
|
||||||
TempDTCuentasBancos.AcceptChanges()
|
TempDTCuentasBancos.AcceptChanges()
|
||||||
@@ -3514,25 +3513,22 @@ Partial Class RH_Personal
|
|||||||
CargaGridCuentasBancos("")
|
CargaGridCuentasBancos("")
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
|
Protected Sub GvBancosCuentas_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvBancosCuentas.RowUpdating
|
||||||
Dim NombreBanco = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
|
Dim NombreBanco As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
|
||||||
Dim NumeroSucursal = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
|
Dim NumeroSucursal As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
|
||||||
Dim CLABE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
|
Dim CLABE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
|
||||||
Dim SWIFT = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
|
Dim SWIFT As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
|
||||||
Dim Plaza = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
|
Dim Plaza As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
|
||||||
Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
Dim NumeroCuenta As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
||||||
Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
Dim ConvenioCIE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
||||||
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
Dim Referencia As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
||||||
Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero()
|
Dim CveMoneda As Integer = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero()
|
||||||
Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
Dim Estatus As Boolean = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||||
Dim EstatusPagoElectronico = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
|
Dim EstatusPagoElectronico As Boolean = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
|
||||||
|
|
||||||
Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
|
|
||||||
|
|
||||||
|
Dim Moneda As String = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
|
||||||
Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text
|
Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text
|
||||||
|
Dim RefCrediProveedor As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
|
||||||
Dim RefCrediProveedor = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
|
Dim EsBancomer As Boolean = False
|
||||||
|
|
||||||
Dim EsBancomer = False
|
|
||||||
|
|
||||||
If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then
|
If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then
|
||||||
EsBancomer = True
|
EsBancomer = True
|
||||||
@@ -3587,7 +3583,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
Dim index As Integer = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
||||||
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
||||||
Row("BancoNombre") = NombreBanco
|
Row("BancoNombre") = NombreBanco
|
||||||
Row("Sucursal") = NumeroSucursal
|
Row("Sucursal") = NumeroSucursal
|
||||||
@@ -3618,7 +3614,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim index = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
Dim index As Integer = GvBancosCuentas.Rows(e.RowIndex).DataKey("CveCuentaDeposito").ToString().ToEntero() - 1
|
||||||
TempDTCuentasBancos.Rows.RemoveAt(index)
|
TempDTCuentasBancos.Rows.RemoveAt(index)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3681,7 +3677,7 @@ Partial Class RH_Personal
|
|||||||
End Function
|
End Function
|
||||||
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
Protected Sub LbPDF_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim LB = CType(sender, LinkButton)
|
Dim LB As LinkButton = CType(sender, LinkButton)
|
||||||
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
||||||
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
ImprimirbytesPDF(GeneraPDFNomina(CvePersonal, LB.CommandArgument.ToEntero(), UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta), "recibo")
|
||||||
|
|
||||||
@@ -3794,7 +3790,7 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||||
|
|
||||||
@@ -3892,7 +3888,7 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||||
|
|
||||||
@@ -4320,7 +4316,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim scripMascara = " $('#" & TxtFechaVigencia.ClientID & "').mask('00/00/0000');"
|
Dim scripMascara As String = " $('#" & TxtFechaVigencia.ClientID & "').mask('00/00/0000');"
|
||||||
RegistraScript(scripMascara)
|
RegistraScript(scripMascara)
|
||||||
If array.Length > 0 Then
|
If array.Length > 0 Then
|
||||||
extencion = array(array.Length - 1)
|
extencion = array(array.Length - 1)
|
||||||
@@ -4335,7 +4331,7 @@ Partial Class RH_Personal
|
|||||||
If documentacionFormato = "" Then
|
If documentacionFormato = "" Then
|
||||||
ImgDownLoadFormato.Visible = False
|
ImgDownLoadFormato.Visible = False
|
||||||
Else
|
Else
|
||||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
||||||
ImgDownLoadFormato.Visible = True
|
ImgDownLoadFormato.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -4343,8 +4339,8 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
If Adjunto.Trim.Length > 0 Then
|
If Adjunto.Trim.Length > 0 Then
|
||||||
|
|
||||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Personal/" & CvePersonal & "/" & Adjunto
|
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Personal/" & CvePersonal & "/" & Adjunto
|
||||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
|
Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
|
||||||
|
|
||||||
If File.Exists(linkDescargaArchivo) Then
|
If File.Exists(linkDescargaArchivo) Then
|
||||||
|
|
||||||
@@ -4434,11 +4430,7 @@ Partial Class RH_Personal
|
|||||||
If pathDesti.ToUpper.Contains("GAFETTE") Or pathDesti.ToUpper.Contains("GAFETE") Then
|
If pathDesti.ToUpper.Contains("GAFETTE") Or pathDesti.ToUpper.Contains("GAFETE") Then
|
||||||
|
|
||||||
GemBox.Document.ComponentInfo.SetLicense(SerialGemBoxDocument)
|
GemBox.Document.ComponentInfo.SetLicense(SerialGemBoxDocument)
|
||||||
|
Dim document As GemBox.Document.DocumentModel = GemBox.Document.DocumentModel.Load(pathDesti)
|
||||||
Dim document = GemBox.Document.DocumentModel.Load(pathDesti)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim imgPersonalURL As String = ""
|
Dim imgPersonalURL As String = ""
|
||||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
|
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & ".jpg") Then
|
||||||
@@ -4529,7 +4521,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
|
|
||||||
Private Function GetDatosTagsDocumentos() As List(Of TagsDocumentos)
|
Private Function GetDatosTagsDocumentos() As List(Of TagsDocumentos)
|
||||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
|
||||||
|
|
||||||
If CvePersonal <> -1 Then
|
If CvePersonal <> -1 Then
|
||||||
Dim objRH As New ClsRH
|
Dim objRH As New ClsRH
|
||||||
@@ -4537,183 +4529,56 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
|
|
||||||
If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
|
If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{APaterno}", objRH.DtResultados(0)("APaterno").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{AMaterno}", objRH.DtResultados(0)("AMaterno").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{RFC}", objRH.DtResultados(0)("RFC").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{RFC}", objRH.DtResultados(0)("RFC").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", NombreCompleto))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", NombreCompleto))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Peso}", objRH.DtResultados(0)("Peso").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{LugarNacimiento}", objRH.DtResultados(0)("LugarNacimiento").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Edad}", objRH.DtResultados(0)("Edad").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreTelEmergencia}", objRH.DtResultados(0)("NombreTelEmergencia").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{TipoSangre}", objRH.DtResultados(0)("TipoSangre").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Vivienda}", objRH.DtResultados(0)("Vivienda").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{ViviendaDueno}", objRH.DtResultados(0)("ViviendaDueno").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CreditoInfonavit}", objRH.DtResultados(0)("CreditoInfonavit").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal.ToString("###,###,###.00")))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal.ToString("###,###,###.00")))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormente}", objRH.DtResultados(0)("TrabajadoAnteriormente").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{TrabajadoAnteriormenteObservaciones}", objRH.DtResultados(0)("TrabajadoAnteriormenteObservaciones").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelito}", objRH.DtResultados(0)("AcusadoDelito").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{AcusadoDelitoObservaciones}", objRH.DtResultados(0)("AcusadoDelitoObservaciones").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Calle}", objRH.DtResultados(0)("Calle").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Colonia}", objRH.DtResultados(0)("Colonia").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CP}", objRH.DtResultados(0)("CP").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Telefono}", objRH.DtResultados(0)("Telefono").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Celular}", objRH.DtResultados(0)("Celular").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Correo}", objRH.DtResultados(0)("Correo").ToString()))
|
||||||
|
|
||||||
|
|
||||||
'If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then
|
'If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then
|
||||||
|
|
||||||
' ListaTagsDocumentost.Add(New TagsDocumentos("{CveSucursal}", DDLSucursal4.Text))
|
' ListaTagsDocumentost.Add(New TagsDocumentos("{CveSucursal}", DDLSucursal4.Text))
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Licencia}", objRH.DtResultados(0)("Licencia").ToString()))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CartillaMilitar}", objRH.DtResultados(0)("CartillaMilitar").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CURP}", objRH.DtResultados(0)("CURP").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{AutorizaAntidoping}", objRH.DtResultados(0)("AutorizaAntidoping").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Observaciones}", objRH.DtResultados(0)("Observaciones").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaIngreso}", objRH.DtResultados(0)("FechaIngreso").ToString().ToDate.ToShortDateString))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaIngreso}", objRH.DtResultados(0)("FechaIngreso").ToString().ToDate.ToShortDateString))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString().ToDate.ToShortDateString))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Direccion}", objRH.DtResultados(0)("Direccion").ToString().ToDate.ToShortDateString))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString()))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Puesto}", objRH.DtResultados(0)("Puesto").ToString()))
|
||||||
|
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CUIP}", ""))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{CUIP}", ""))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Denominacion}", ""))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{Denominacion}", ""))
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy")))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaNacimiento}", objRH.DtResultados(0)("FechaNacimiento").ToString().ToDate.ToString("dd/MM/yyyy")))
|
||||||
|
|
||||||
|
|
||||||
Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year
|
Dim fechaActual As String = " " & Now.Day & " del mes " & Now.Month & " del año " & Now.Year
|
||||||
|
|
||||||
Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy")
|
Dim FechaActualDF As String = Now.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
||||||
End If
|
End If
|
||||||
@@ -5585,17 +5450,15 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Private Function GetDatosTagsVacaciones(_VacFolio As Integer) As List(Of TagsDocumentos)
|
Private Function GetDatosTagsVacaciones(_VacFolio As Integer) As List(Of TagsDocumentos)
|
||||||
|
|
||||||
Dim ListaTags = New List(Of TagsDocumentos)
|
Dim ListaTags As New List(Of TagsDocumentos)
|
||||||
Dim objRH As New ClsRH
|
Dim objRH As New ClsRH
|
||||||
|
|
||||||
If objRH.VacacionesFolioGet(CvePersonal, _VacFolio) Then
|
If objRH.VacacionesFolioGet(CvePersonal, _VacFolio) Then
|
||||||
|
|
||||||
If objRH.DtResultados.Rows.Count > 0 Then
|
If objRH.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
ListaTags.Add(New TagsDocumentos("{Anios}", VacAnios.ToString()))
|
ListaTags.Add(New TagsDocumentos("{Anios}", VacAnios.ToString()))
|
||||||
ListaTags.Add(New TagsDocumentos("{DiasUsados}", VacDiasUsados.ToString()))
|
ListaTags.Add(New TagsDocumentos("{DiasUsados}", VacDiasUsados.ToString()))
|
||||||
ListaTags.Add(New TagsDocumentos("{DiasDisponibles}", VacDiasDisponibles.ToString()))
|
ListaTags.Add(New TagsDocumentos("{DiasDisponibles}", VacDiasDisponibles.ToString()))
|
||||||
|
|
||||||
If Not IsDBNull(objRH.DtResultados(0)("InicioVac")) Then
|
If Not IsDBNull(objRH.DtResultados(0)("InicioVac")) Then
|
||||||
ListaTags.Add(New TagsDocumentos("{InicioVac}", objRH.DtResultados(0)("InicioVac").ToString().ToDate.ToString("dd/MM/yyyy")))
|
ListaTags.Add(New TagsDocumentos("{InicioVac}", objRH.DtResultados(0)("InicioVac").ToString().ToDate.ToString("dd/MM/yyyy")))
|
||||||
End If
|
End If
|
||||||
@@ -5982,7 +5845,7 @@ Partial Class RH_Personal
|
|||||||
Next
|
Next
|
||||||
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
|
If File.Exists(UsuarioActual.Empresa.Ruta & "RH\Personal\" & CvePersonal & "." & FileExtension) Then
|
||||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\RH\Personal\{1}.{2}", UsuarioActual.CveEmpresa, CvePersonal, FileExtension)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}&version={4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica), Now)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}&version={4}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica), Now)
|
||||||
ImgPersonal.ImageUrl = logouri
|
ImgPersonal.ImageUrl = logouri
|
||||||
End If
|
End If
|
||||||
UpImage.Update()
|
UpImage.Update()
|
||||||
@@ -6253,22 +6116,19 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
If gvr.DataKey("SeTimbro") = "True" Then
|
If gvr.DataKey("SeTimbro") = "True" Then
|
||||||
|
|
||||||
Dim NombreComercial = UsuarioActual.Empresa.Empresa
|
Dim NombreComercial As String = UsuarioActual.Empresa.Empresa
|
||||||
Dim SerieFolio = gvr.DataKey("SerieFolio").ToString()
|
Dim SerieFolio As String = gvr.DataKey("SerieFolio").ToString()
|
||||||
Dim Destinatario = gvr.DataKey("Correo").ToString()
|
Dim Destinatario As String = gvr.DataKey("Correo").ToString()
|
||||||
Dim Personal = gvr.DataKey("Nombre").ToString()
|
Dim Personal As String = gvr.DataKey("Nombre").ToString()
|
||||||
Dim fechai = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString
|
Dim fechai As String = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString
|
||||||
Dim fechaf = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString
|
Dim fechaf As String = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString
|
||||||
Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString().ToEntero()
|
Dim cvePeriodo As Integer = gvr.DataKey("CvePeriodo").ToString().ToEntero()
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 Then
|
If UsuarioActual.CveRol = 1 Then
|
||||||
Alert("Parametros:" + NombreComercial + " " + SerieFolio + " " + Destinatario + " " + Personal + " " + fechai + " " + fechaf)
|
Alert("Parametros:" + NombreComercial + " " + SerieFolio + " " + Destinatario + " " + Personal + " " + fechai + " " + fechaf)
|
||||||
End If
|
End If
|
||||||
MandaCorreo(NombreComercial, SerieFolio, Destinatario, Personal, fechai, fechaf, cvePeriodo)
|
MandaCorreo(NombreComercial, SerieFolio, Destinatario, Personal, fechai, fechaf, cvePeriodo)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MandaCorreo(NombreComercial As String, SerieFolio As String, Destinatario As String, Optional Personal As String = "", Optional FechaI As String = "", Optional FechaF As String = "", Optional CvePeriodo As Integer = -1)
|
Private Sub MandaCorreo(NombreComercial As String, SerieFolio As String, Destinatario As String, Optional Personal As String = "", Optional FechaI As String = "", Optional FechaF As String = "", Optional CvePeriodo As Integer = -1)
|
||||||
@@ -6484,7 +6344,7 @@ Partial Class RH_Personal
|
|||||||
ObjAF.Dispose()
|
ObjAF.Dispose()
|
||||||
Else
|
Else
|
||||||
If DTLicencias IsNot Nothing Then
|
If DTLicencias IsNot Nothing Then
|
||||||
Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
Dim Row As DataRow = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
||||||
DTLicencias.Rows.Remove(Row)
|
DTLicencias.Rows.Remove(Row)
|
||||||
GvLicencias.DataSource = DTLicencias
|
GvLicencias.DataSource = DTLicencias
|
||||||
GvLicencias.DataBind()
|
GvLicencias.DataBind()
|
||||||
@@ -6529,7 +6389,7 @@ Partial Class RH_Personal
|
|||||||
Else
|
Else
|
||||||
If DTLicencias IsNot Nothing Then
|
If DTLicencias IsNot Nothing Then
|
||||||
If HdnModalidadLicencia.Value = "A" Then
|
If HdnModalidadLicencia.Value = "A" Then
|
||||||
Dim Row = DTLicencias.NewRow()
|
Dim Row As DataRow = DTLicencias.NewRow()
|
||||||
|
|
||||||
Row("Licencia") = TxtLicencia.Text.Trim()
|
Row("Licencia") = TxtLicencia.Text.Trim()
|
||||||
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
||||||
@@ -6546,7 +6406,7 @@ Partial Class RH_Personal
|
|||||||
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
ElseIf HdnModalidadLicencia.Value = "U" Then
|
ElseIf HdnModalidadLicencia.Value = "U" Then
|
||||||
Try
|
Try
|
||||||
Dim Row = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
Dim Row As DataRow = DTLicencias.Select($"CveLicencia = {HdnIDLicencia.Value.ToEntero()}")(0)
|
||||||
|
|
||||||
Row("Licencia") = TxtLicencia.Text.Trim()
|
Row("Licencia") = TxtLicencia.Text.Trim()
|
||||||
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
||||||
@@ -6582,7 +6442,7 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\RepResguardosAF.rdlc", UsuarioActual.Empresa.Ruta))
|
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\RepResguardosAF.rdlc", UsuarioActual.Empresa.Ruta))
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim dtVC As DataTable = Nothing
|
Dim dtVC As DataTable = Nothing
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
@@ -6601,7 +6461,7 @@ Partial Class RH_Personal
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Dim SBDomicilioSucursal As New StringBuilder()
|
Dim SBDomicilioSucursal As New StringBuilder()
|
||||||
Dim DRSucursal = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero(), Estatus:=1).FiltroPrimero("")
|
Dim DRSucursal As DataRow = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa, CveSubProyecto:=dr("CveSubProyecto").ToString().ToEntero(), Estatus:=1).FiltroPrimero("")
|
||||||
|
|
||||||
If DRSucursal IsNot Nothing Then
|
If DRSucursal IsNot Nothing Then
|
||||||
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
||||||
@@ -7146,12 +7006,7 @@ Partial Class RH_Personal
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub LnkDescargaFormatoParametros_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkDescargaFormatoParametros_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
|
||||||
|
|
||||||
|
|
||||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
|
||||||
|
|
||||||
|
|
||||||
Dim ObjRH As New ClsRH
|
Dim ObjRH As New ClsRH
|
||||||
ListaTagsDocumentost = ObjRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)
|
ListaTagsDocumentost = ObjRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)
|
||||||
ObjRH.Dispose()
|
ObjRH.Dispose()
|
||||||
@@ -7161,10 +7016,7 @@ Partial Class RH_Personal
|
|||||||
If GvRow.FCTextBox("TxtParametro").Text.Trim.Length > 0 Then
|
If GvRow.FCTextBox("TxtParametro").Text.Trim.Length > 0 Then
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos(GvRow.DataKey("Parametro"), GvRow.FCTextBox("TxtParametro").Text))
|
ListaTagsDocumentost.Add(New TagsDocumentos(GvRow.DataKey("Parametro"), GvRow.FCTextBox("TxtParametro").Text))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
|
Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
|
||||||
Dim PathSource As String
|
Dim PathSource As String
|
||||||
Dim pathDesti As String
|
Dim pathDesti As String
|
||||||
@@ -7276,10 +7128,6 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub DdlSubProyectoAsignado_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
Protected Sub DdlSubProyectoAsignado_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Using objrh As New ClsRH()
|
Using objrh As New ClsRH()
|
||||||
@@ -7671,8 +7519,8 @@ Partial Class RH_Personal
|
|||||||
ffin = gvrow.DataKey("FechaFin").ToDateTime()
|
ffin = gvrow.DataKey("FechaFin").ToDateTime()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Dim estatus = -1
|
Dim estatus As Integer = -1
|
||||||
Dim continuar = False
|
Dim continuar As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
If (LnkActivar.Visible) Then
|
If (LnkActivar.Visible) Then
|
||||||
@@ -7826,17 +7674,11 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
ObjRH.Dispose()
|
ObjRH.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim objGemBoxDocument As New clsGemBoxDocument(RutaArchivo)
|
Dim objGemBoxDocument As New clsGemBoxDocument(RutaArchivo)
|
||||||
objGemBoxDocument.SustituirTags(Tags)
|
objGemBoxDocument.SustituirTags(Tags)
|
||||||
objGemBoxDocument.GuardarStreamPDF()
|
objGemBoxDocument.GuardarStreamPDF()
|
||||||
|
|
||||||
|
Dim objbyte As Byte() = objGemBoxDocument.GetBytesDocumento
|
||||||
Dim objbyte = objGemBoxDocument.GetBytesDocumento
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -7859,9 +7701,6 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -7993,11 +7832,7 @@ Partial Class RH_Personal
|
|||||||
SBDatosBancarios.Append(If(GvRow.FCLabel("LtMoneda").Text.Trim.Length > 0, $"Moneda: {GvRow.FCLabel("LtMoneda").Text}, ", ""))
|
SBDatosBancarios.Append(If(GvRow.FCLabel("LtMoneda").Text.Trim.Length > 0, $"Moneda: {GvRow.FCLabel("LtMoneda").Text}, ", ""))
|
||||||
SBDatosBancarios.Append(If(GvRow.FCLabel("LlbEstatusTexto").Text.Trim.Length > 0, $"Estatus: {GvRow.FCLabel("LlbEstatusTexto").Text} ", ""))
|
SBDatosBancarios.Append(If(GvRow.FCLabel("LlbEstatusTexto").Text.Trim.Length > 0, $"Estatus: {GvRow.FCLabel("LlbEstatusTexto").Text} ", ""))
|
||||||
SBDatosBancarios.AppendLine($"<br>")
|
SBDatosBancarios.AppendLine($"<br>")
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
If SBDatosBancarios.ToString.Trim.Length > 0 Then
|
If SBDatosBancarios.ToString.Trim.Length > 0 Then
|
||||||
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Datos Bancarios:</td><td style=' text-align: left; font-weight:bold;'>{ SBDatosBancarios.ToString }</td></tr>")
|
Cuerpo.AppendLine($"<tr><td style='text-align: right;'>Datos Bancarios:</td><td style=' text-align: left; font-weight:bold;'>{ SBDatosBancarios.ToString }</td></tr>")
|
||||||
End If
|
End If
|
||||||
@@ -8010,9 +7845,6 @@ Partial Class RH_Personal
|
|||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Protected Sub LnkSolicitarVacaciones_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkSolicitarVacaciones_Click(sender As Object, e As EventArgs)
|
||||||
DdlVacPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
DdlVacPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
||||||
|
|
||||||
@@ -8048,16 +7880,14 @@ Partial Class RH_Personal
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If fechaFinParametro <> Nothing Then
|
If fechaFinParametro <> Nothing Then
|
||||||
|
|
||||||
Dim DiferenciaEntreFechas As Integer = (fechaFinParametro - fechaInicioParametro).Days + 1
|
Dim DiferenciaEntreFechas As Integer = (fechaFinParametro - fechaInicioParametro).Days + 1
|
||||||
Dim DiasNolavorales As Integer = 0
|
Dim DiasNolavorales As Integer = 0
|
||||||
Dim FechaTemp As Date = fechaInicioParametro
|
Dim FechaTemp As Date = fechaInicioParametro
|
||||||
|
|
||||||
For x = 1 To DiferenciaEntreFechas
|
For x As Integer = 1 To DiferenciaEntreFechas
|
||||||
Dim day_of_week = CType(FechaTemp.DayOfWeek, Integer) + 1
|
Dim day_of_week As Integer = CType(FechaTemp.DayOfWeek, Integer) + 1
|
||||||
|
|
||||||
If day_of_week = diaDescanso Then
|
If day_of_week = diaDescanso Then
|
||||||
DiasNolavorales = DiasNolavorales + 1
|
DiasNolavorales = DiasNolavorales + 1
|
||||||
@@ -8092,8 +7922,8 @@ Partial Class RH_Personal
|
|||||||
Dim DiasAgregados As Integer = 0
|
Dim DiasAgregados As Integer = 0
|
||||||
Dim FechaFin As Date = fechaInicioParametro
|
Dim FechaFin As Date = fechaInicioParametro
|
||||||
Dim Contador As Integer = 0
|
Dim Contador As Integer = 0
|
||||||
For x = 2 To diasVacaciones
|
For x As Integer = 2 To diasVacaciones
|
||||||
Dim day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1
|
Dim day_of_week As Integer = CType(FechaFin.DayOfWeek, Integer) + 1
|
||||||
If day_of_week = diaDescanso Then
|
If day_of_week = diaDescanso Then
|
||||||
FechaFin = FechaFin.AddDays(2)
|
FechaFin = FechaFin.AddDays(2)
|
||||||
DiasAgregados = DiasAgregados + 1
|
DiasAgregados = DiasAgregados + 1
|
||||||
@@ -8136,7 +7966,6 @@ Partial Class RH_Personal
|
|||||||
If Not validaFechasVaciones() Then
|
If Not validaFechasVaciones() Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero, TxtFechaFinVac.Text.ToDate)
|
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero, TxtFechaFinVac.Text.ToDate)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -3748,7 +3748,7 @@ Partial Class Clientes
|
|||||||
'Private Function AgregarCuentaContable(btn As Button, ddl As DropDownList, ByRef CodigoCuentaAltaCompaq As String, ByRef NombreCuentaCuentaAltaCompaq As String, ByRef IdCuentaAltaCompaq As Integer) As Boolean
|
'Private Function AgregarCuentaContable(btn As Button, ddl As DropDownList, ByRef CodigoCuentaAltaCompaq As String, ByRef NombreCuentaCuentaAltaCompaq As String, ByRef IdCuentaAltaCompaq As Integer) As Boolean
|
||||||
' Dim IdCuentaContable As Integer = -1
|
' Dim IdCuentaContable As Integer = -1
|
||||||
' Dim CtaCodigo As String = ""
|
' Dim CtaCodigo As String = ""
|
||||||
' Dim TieneError = False
|
' Dim TieneError as boolean= False
|
||||||
' Dim ProcesoCorrecto As Boolean
|
' Dim ProcesoCorrecto As Boolean
|
||||||
|
|
||||||
' Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
|
' Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
@@ -3888,7 +3888,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Private Sub GenerarRepCrystal(Formato As String)
|
Private Sub GenerarRepCrystal(Formato As String)
|
||||||
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
Dim logouri As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
@@ -4051,7 +4051,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If DtCxCFact2 IsNot Nothing AndAlso DtCxCFact2.Rows.Count > 0 Then
|
If DtCxCFact2 IsNot Nothing AndAlso DtCxCFact2.Rows.Count > 0 Then
|
||||||
Dim dr As DataRow = DtCxCFact2.Rows(0)
|
Dim dr As DataRow = DtCxCFact2.Rows(0)
|
||||||
Dim lista = New List(Of CrystalParametro)
|
Dim lista As New List(Of CrystalParametro)
|
||||||
Dim SaldoDisponible As String = "0.00"
|
Dim SaldoDisponible As String = "0.00"
|
||||||
If TxtLimiteCredito.Text.ToDouble > 0 Then
|
If TxtLimiteCredito.Text.ToDouble > 0 Then
|
||||||
SaldoDisponible = (TxtLimiteCredito.Text.ToDouble - DtCxCFact2.SUM("Saldo", "Tipo = 'Act'").ToString().ToDouble).FormatoNumero()
|
SaldoDisponible = (TxtLimiteCredito.Text.ToDouble - DtCxCFact2.SUM("Saldo", "Tipo = 'Act'").ToString().ToDouble).FormatoNumero()
|
||||||
@@ -4098,7 +4098,7 @@ Partial Class Clientes
|
|||||||
rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha")
|
rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha")
|
||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
|
|
||||||
File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato)
|
File = StreamBytesStimul("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato)
|
||||||
Else
|
Else
|
||||||
File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato)
|
File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato)
|
||||||
End If
|
End If
|
||||||
@@ -4147,7 +4147,7 @@ Partial Class Clientes
|
|||||||
For Each item As CrystalParametro In lista
|
For Each item As CrystalParametro In lista
|
||||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||||
Next
|
Next
|
||||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||||
Else
|
Else
|
||||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||||
End If
|
End If
|
||||||
@@ -4158,7 +4158,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim lista = New List(Of CrystalParametro)
|
Dim lista As New List(Of CrystalParametro)
|
||||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxC.SelectedItem.Text))
|
lista.Add(New CrystalParametro("TipoCuentas", DdlTipoCuentasCxC.SelectedItem.Text))
|
||||||
lista.Add(New CrystalParametro("NombreCliente", LtlCliente.Text))
|
lista.Add(New CrystalParametro("NombreCliente", LtlCliente.Text))
|
||||||
@@ -4200,7 +4200,7 @@ Partial Class Clientes
|
|||||||
For Each item As CrystalParametro In lista
|
For Each item As CrystalParametro In lista
|
||||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||||
Next
|
Next
|
||||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
ImprimirPDFStimul($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||||
Else
|
Else
|
||||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||||
End If
|
End If
|
||||||
@@ -4526,23 +4526,20 @@ Partial Class Clientes
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnAgregarDireccion_Click(sender As Object, e As EventArgs) Handles BtnAgregarDireccion.Click
|
Private Sub BtnAgregarDireccion_Click(sender As Object, e As EventArgs) Handles BtnAgregarDireccion.Click
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
Dim Estatus = If(ChkEstatus.Checked, 1, 0)
|
Dim Estatus As Integer = If(ChkEstatus.Checked, 1, 0)
|
||||||
|
|
||||||
If CveDireccionEnvio < 0 Then
|
If CveDireccionEnvio < 0 Then
|
||||||
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.Trim(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.Trim(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||||
CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim())
|
CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim())
|
||||||
|
|
||||||
If CveDireccionEnvio < 0 Then
|
If CveDireccionEnvio < 0 Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If Not ObjClientes.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.Trim(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveDireccionEnvio, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
If Not ObjClientes.DireccionEnvioUpdate(CveCliente, TxtEnvioDireccion.Text.Trim, TxtEnvioNoExt.Text.Trim, TxtEnvioNoInt.Text.Trim, TxtEnvioColonia.Text.Trim, TxtEnvioCiudad.Text.Trim, TxtEnvioEstado.Text.Trim, TxtEnvioCP.Text.Trim(), TxtEnvioContacto.Text.Trim, UsuarioActual.CveUsuario, Estatus, CveDireccionEnvio, CveClienteSucursal:=DdlClienteSucursalEnvio.SelectedValue.ToEntero(), EnvioTel:=TxtEnvioTel.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""),
|
||||||
CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim()) Then
|
CvePais:=DdlDirClientePais.SelectedValue.ToEntero, CveEstado:=DdlDirClienteEstado.SelectedValue.ToEntero, CveMunicipio:=DdlDirClienteMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlDirClienteLocalidad.SelectedValue.ToEntero, CveColonia:=DdlDirClienteColonia.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectoClienteSucursal.SelectedValue.ToEntero, COM_NumRegIdTrib:=TxtCom_NumRegIdTrib.Text.Trim()) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TieneError Then
|
If TieneError Then
|
||||||
@@ -4581,7 +4578,7 @@ Partial Class Clientes
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDireccionesEnvio.RowDeleting
|
Private Sub GvDireccionesEnvio_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvDireccionesEnvio.RowDeleting
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim CveDireccionEnvio As Integer = GvDireccionesEnvio.Rows(e.RowIndex).DataKey("CveDireccionEnvio").ToEntero()
|
Dim CveDireccionEnvio As Integer = GvDireccionesEnvio.Rows(e.RowIndex).DataKey("CveDireccionEnvio").ToEntero()
|
||||||
|
|
||||||
@@ -4633,7 +4630,7 @@ Partial Class Clientes
|
|||||||
UpImportarSaldos.Update()
|
UpImportarSaldos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnGuardarTransferencias_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardarTransferencias_Click(sender As Object, e As EventArgs)
|
||||||
Dim EsValida = False
|
Dim EsValida As Boolean = False
|
||||||
|
|
||||||
For Each Gvr As GridViewRow In GvImportarSaldos.Rows
|
For Each Gvr As GridViewRow In GvImportarSaldos.Rows
|
||||||
If Gvr.FCCheckBox("Chk").Checked AndAlso Gvr.FCTextBox("TxtImporte").Text.ToDouble > 0 Then
|
If Gvr.FCCheckBox("Chk").Checked AndAlso Gvr.FCTextBox("TxtImporte").Text.ToDouble > 0 Then
|
||||||
@@ -4648,7 +4645,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
ObjConta.IniciaTransacSQL()
|
ObjConta.IniciaTransacSQL()
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Clientes/ImportarSaldos", 53, TxtCantidad.Text.Trim.ToDouble, TxtCantidad.Text.Trim.ToDouble, 1, TxtFechaImportarSaldos.Text.ToDate(), "Traspaso de saldos de anticipos", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Clientes/ImportarSaldos", 53, TxtCantidad.Text.Trim.ToDouble, TxtCantidad.Text.Trim.ToDouble, 1, TxtFechaImportarSaldos.Text.ToDate(), "Traspaso de saldos de anticipos", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
@@ -4726,7 +4723,7 @@ Partial Class Clientes
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnGuardarCuenta_Click(sender As Object, e As EventArgs) Handles BtnGuardarCuenta.Click
|
Private Sub BtnGuardarCuenta_Click(sender As Object, e As EventArgs) Handles BtnGuardarCuenta.Click
|
||||||
Dim objCuentasEquipos As New ClsGenerales()
|
Dim objCuentasEquipos As New ClsGenerales()
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
objCuentasEquipos.IniciaTransacSQL()
|
objCuentasEquipos.IniciaTransacSQL()
|
||||||
|
|
||||||
If HdnModalidad.Value = "I" Then
|
If HdnModalidad.Value = "I" Then
|
||||||
@@ -4844,7 +4841,7 @@ Partial Class Clientes
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvCuentasEquipos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvCuentasEquipos.RowDeleting
|
Protected Sub GvCuentasEquipos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvCuentasEquipos.RowDeleting
|
||||||
Dim Objeto As New ClsGenerales
|
Dim Objeto As New ClsGenerales
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
If Objeto.RemoveCuentaEquipo(GvCuentasEquipos.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
|
If Objeto.RemoveCuentaEquipo(GvCuentasEquipos.DataKeys(e.RowIndex).Value.ToString().ToEntero()) Then
|
||||||
Alert("La cuenta Equipo se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La cuenta Equipo se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
@@ -4922,7 +4919,7 @@ Partial Class Clientes
|
|||||||
rfvDdlCarcateristicaOpcion1.Enabled = False
|
rfvDdlCarcateristicaOpcion1.Enabled = False
|
||||||
|
|
||||||
RdlCarcateristicaOpcion.Visible = False
|
RdlCarcateristicaOpcion.Visible = False
|
||||||
Dim rfvRdlCarcateristicaOpcion = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion")
|
Dim rfvRdlCarcateristicaOpcion As RequiredFieldValidator = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion")
|
||||||
rfvRdlCarcateristicaOpcion.Enabled = False
|
rfvRdlCarcateristicaOpcion.Enabled = False
|
||||||
|
|
||||||
Dim CalendarioCaractersiticas As AjaxControlToolkit.CalendarExtender = e.Row.FCCalendarExtender("CalendarioCaractersiticas")
|
Dim CalendarioCaractersiticas As AjaxControlToolkit.CalendarExtender = e.Row.FCCalendarExtender("CalendarioCaractersiticas")
|
||||||
@@ -5056,7 +5053,7 @@ Partial Class Clientes
|
|||||||
rfvDdlCarcateristicaOpcion2.Enabled = False
|
rfvDdlCarcateristicaOpcion2.Enabled = False
|
||||||
|
|
||||||
RdlCarcateristicaOpcion2.Visible = False
|
RdlCarcateristicaOpcion2.Visible = False
|
||||||
Dim rfvRdlCarcateristicaOpcion = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion2")
|
Dim rfvRdlCarcateristicaOpcion As RequiredFieldValidator = e.Row.FCRequiredFieldValidator("rfvRdlCarcateristicaOpcion2")
|
||||||
rfvRdlCarcateristicaOpcion.Enabled = False
|
rfvRdlCarcateristicaOpcion.Enabled = False
|
||||||
|
|
||||||
Dim cvFechaF As CompareValidator = e.Row.FCCompareValidator("cvFechaF2")
|
Dim cvFechaF As CompareValidator = e.Row.FCCompareValidator("cvFechaF2")
|
||||||
@@ -5132,7 +5129,7 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Function GuardaCaracteristicas(Modalidad As String, CveCuentaEquipo As Integer, ByRef ObjCarac As ClsGenerales) As Boolean
|
Private Function GuardaCaracteristicas(Modalidad As String, CveCuentaEquipo As Integer, ByRef ObjCarac As ClsGenerales) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
If Modalidad.ToString() = "I" Then
|
If Modalidad.ToString() = "I" Then
|
||||||
For Each gvr As GridViewRow In GvAddCuentaCaracteristica.Rows
|
For Each gvr As GridViewRow In GvAddCuentaCaracteristica.Rows
|
||||||
@@ -5525,7 +5522,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Dim Cuerpo As String = TxtBody2.Text
|
Dim Cuerpo As String = TxtBody2.Text
|
||||||
Dim Asunto As String = ""
|
Dim Asunto As String = ""
|
||||||
Dim TipoComprobante = ""
|
Dim TipoComprobante As String = ""
|
||||||
|
|
||||||
If HdnTipoDocto2.Value.ToString() = "Ing" Then TipoComprobante = "Factura"
|
If HdnTipoDocto2.Value.ToString() = "Ing" Then TipoComprobante = "Factura"
|
||||||
If HdnTipoDocto2.Value.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito"
|
If HdnTipoDocto2.Value.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||||
@@ -5745,8 +5742,8 @@ Partial Class Clientes
|
|||||||
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
|
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Dim Para = TxtEmail.Text.Trim
|
Dim Para As String = TxtEmail.Text.Trim
|
||||||
Dim Asunto = "ACTIVACIÓN DEL PORTAL GPS"
|
Dim Asunto As String = "ACTIVACIÓN DEL PORTAL GPS"
|
||||||
Dim SBBody As New StringBuilder
|
Dim SBBody As New StringBuilder
|
||||||
'Linia de estilos
|
'Linia de estilos
|
||||||
SBBody.Append("<style> .mailbody{ background-color:#EEF1F5; padding:15px; font-family :'Open Sans', sans-serif; } .mailcontent{ background-color:#fff; font-size: 14px; color: #333; padding:0px 15px ; } .mailtitle{padding:8px;color:#32C5D2; font-size: 18px;font-weight: 700!important;border-bottom:2px solid #EEF1F5;text-transform: uppercase;}.marco{border: 1px solid #869ab3;border-top: 0;background-color: #67809F; margin: 10px 15px 25px 15px;color: #fff;}.marco-title{padding: 10px 10px;text-transform: uppercase;font-weight: 700!important;}.marco-body{color:#333;background-color:#fff;}.nota{background: #E5E5E5;padding:15px;color:#333;} .logo { font-size:12px; font-style:italic; text-align:right; } .col1{width:180px;font-weight: 700!important;display:inline-block;} .col2{min-width:260px;display:inline-block;} </style>")
|
SBBody.Append("<style> .mailbody{ background-color:#EEF1F5; padding:15px; font-family :'Open Sans', sans-serif; } .mailcontent{ background-color:#fff; font-size: 14px; color: #333; padding:0px 15px ; } .mailtitle{padding:8px;color:#32C5D2; font-size: 18px;font-weight: 700!important;border-bottom:2px solid #EEF1F5;text-transform: uppercase;}.marco{border: 1px solid #869ab3;border-top: 0;background-color: #67809F; margin: 10px 15px 25px 15px;color: #fff;}.marco-title{padding: 10px 10px;text-transform: uppercase;font-weight: 700!important;}.marco-body{color:#333;background-color:#fff;}.nota{background: #E5E5E5;padding:15px;color:#333;} .logo { font-size:12px; font-style:italic; text-align:right; } .col1{width:180px;font-weight: 700!important;display:inline-block;} .col2{min-width:260px;display:inline-block;} </style>")
|
||||||
@@ -6253,7 +6250,7 @@ Partial Class Clientes
|
|||||||
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
||||||
Dim retorno As Byte() = Nothing
|
Dim retorno As Byte() = Nothing
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
'OBTENEMOS LOS DATOS
|
'OBTENEMOS LOS DATOS
|
||||||
@@ -6294,7 +6291,7 @@ Partial Class Clientes
|
|||||||
Protected Function ImprimirReporteHistorial() As Byte()
|
Protected Function ImprimirReporteHistorial() As Byte()
|
||||||
Dim retorno As Byte() = Nothing
|
Dim retorno As Byte() = Nothing
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
Dim ObjClientes As New ClsClientes()
|
Dim ObjClientes As New ClsClientes()
|
||||||
|
|
||||||
'OBTENEMOS LOS DATOS
|
'OBTENEMOS LOS DATOS
|
||||||
@@ -6403,7 +6400,7 @@ Partial Class Clientes
|
|||||||
CargaMonedas()
|
CargaMonedas()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
Protected Sub LbAgregarCuentaBanco_Click(sender As Object, e As EventArgs)
|
||||||
Dim EsBancomer = False
|
Dim EsBancomer As Boolean = False
|
||||||
|
|
||||||
If TxtNombreBanco.Text.ToUpper.Contains("BBVA") Or TxtNombreBanco.Text.ToUpper.Contains("BANCOMER") Or (TxtCLABE.Text.Length = 18 AndAlso TxtCLABE.Text.Substring(0, 3) = "012") Then
|
If TxtNombreBanco.Text.ToUpper.Contains("BBVA") Or TxtNombreBanco.Text.ToUpper.Contains("BANCOMER") Or (TxtCLABE.Text.Length = 18 AndAlso TxtCLABE.Text.Substring(0, 3) = "012") Then
|
||||||
EsBancomer = True
|
EsBancomer = True
|
||||||
@@ -6515,7 +6512,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim index = CveCuentaBancaria
|
Dim index As Integer = CveCuentaBancaria
|
||||||
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
Dim Row As DataRow = TempDTCuentasBancos.Rows(index)
|
||||||
Row("BancoNombre") = NombreBanco
|
Row("BancoNombre") = NombreBanco
|
||||||
Row("Sucursal") = NumeroSucursal
|
Row("Sucursal") = NumeroSucursal
|
||||||
@@ -6555,7 +6552,7 @@ Partial Class Clientes
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If CveCliente < 0 Then
|
If CveCliente < 0 Then
|
||||||
For index = 1 To TempDTCuentasBancos.Rows.Count
|
For index As Integer = 1 To TempDTCuentasBancos.Rows.Count
|
||||||
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
|
TempDTCuentasBancos.Rows(index - 1)("CveCuentaDeposito") = index
|
||||||
Next
|
Next
|
||||||
TempDTCuentasBancos.AcceptChanges()
|
TempDTCuentasBancos.AcceptChanges()
|
||||||
@@ -6585,7 +6582,7 @@ Partial Class Clientes
|
|||||||
Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim index = GvRow.RowIndex
|
Dim index As Integer = GvRow.RowIndex
|
||||||
TempDTCuentasBancos.Rows.RemoveAt(index)
|
TempDTCuentasBancos.Rows.RemoveAt(index)
|
||||||
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
|
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
@@ -6615,16 +6612,12 @@ Partial Class Clientes
|
|||||||
UpCuentasBancos.Update()
|
UpCuentasBancos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Private Sub CargaMonedas()
|
Private Sub CargaMonedas()
|
||||||
DdlMoneda.DataSource = GlobalDTMonedas
|
DdlMoneda.DataSource = GlobalDTMonedas
|
||||||
DdlMoneda.DataBind()
|
DdlMoneda.DataBind()
|
||||||
DdlMoneda.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlMoneda.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub LnkCuentasBancarias_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancarias.Click
|
Private Sub LnkCuentasBancarias_Click(sender As Object, e As EventArgs) Handles LnkCuentasBancarias.Click
|
||||||
Modalidad = "A"
|
Modalidad = "A"
|
||||||
TxtNombreBanco.Text = ""
|
TxtNombreBanco.Text = ""
|
||||||
@@ -6694,12 +6687,12 @@ Partial Class Clientes
|
|||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
Dim Vta As Modelos.Factura = Nothing
|
Dim Vta As Modelos.Factura = Nothing
|
||||||
|
|
||||||
Dim TmpDTImpuestos = New DataTable
|
Dim TmpDTImpuestos As New DataTable
|
||||||
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||||
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||||
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
||||||
|
|
||||||
Dim TmpDTImpuestosIVAIEPS = New DataTable
|
Dim TmpDTImpuestosIVAIEPS As New DataTable
|
||||||
TmpDTImpuestosIVAIEPS.Columns.Add("Impuesto", GetType(String))
|
TmpDTImpuestosIVAIEPS.Columns.Add("Impuesto", GetType(String))
|
||||||
TmpDTImpuestosIVAIEPS.Columns.Add("tasa", GetType(String))
|
TmpDTImpuestosIVAIEPS.Columns.Add("tasa", GetType(String))
|
||||||
TmpDTImpuestosIVAIEPS.Columns.Add("Importe", GetType(Double))
|
TmpDTImpuestosIVAIEPS.Columns.Add("Importe", GetType(Double))
|
||||||
@@ -6814,7 +6807,7 @@ Partial Class Clientes
|
|||||||
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
||||||
If dtImpuesto.Rows.Count > 0 Then
|
If dtImpuesto.Rows.Count > 0 Then
|
||||||
For Each Row As DataRow In dtImpuesto.Rows
|
For Each Row As DataRow In dtImpuesto.Rows
|
||||||
Dim Orden = 80
|
Dim Orden As Integer = 80
|
||||||
If Row("Importe").ToString().ToDouble <> 0 Then
|
If Row("Importe").ToString().ToDouble <> 0 Then
|
||||||
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString()
|
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString()
|
||||||
DR("Importe") = Row("Importe").ToString().ToDouble
|
DR("Importe") = Row("Importe").ToString().ToDouble
|
||||||
@@ -7317,24 +7310,21 @@ Partial Class Clientes
|
|||||||
'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList)
|
'Dim DDLEstatus As DropDownList = DirectCast(GvRow.FindControl("DDLEstatus"), DropDownList)
|
||||||
Dim chkCompleto As CheckBox = DirectCast(GvRow.FindControl("chkEstatus"), CheckBox)
|
Dim chkCompleto As CheckBox = DirectCast(GvRow.FindControl("chkEstatus"), CheckBox)
|
||||||
|
|
||||||
Dim UrlArchivo = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & _Adjunto
|
Dim UrlArchivo As String = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & _Adjunto
|
||||||
|
|
||||||
If File.Exists(UrlArchivo) Then
|
If File.Exists(UrlArchivo) Then
|
||||||
Try
|
Try
|
||||||
File.Delete(UrlArchivo)
|
File.Delete(UrlArchivo)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjEdoc As New ClsEdocumentacion
|
Dim ObjEdoc As New ClsEdocumentacion
|
||||||
|
|
||||||
If Not _CveDocumentacionElectronica = -1 Then
|
If Not _CveDocumentacionElectronica = -1 Then
|
||||||
|
|
||||||
If ObjEdoc.DocumentacionElectronicaUpdate(_CveDocumentacionElectronica, _CveDocumentacion, -1, CveCliente, -1, 0, "", "", UsuarioActual.CveUsuario, _fechaLimite) Then
|
If ObjEdoc.DocumentacionElectronicaUpdate(_CveDocumentacionElectronica, _CveDocumentacion, -1, CveCliente, -1, 0, "", "", UsuarioActual.CveUsuario, _fechaLimite) Then
|
||||||
Alert("Documento Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Documento Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CargaDocumentacionCliente()
|
CargaDocumentacionCliente()
|
||||||
@@ -7349,7 +7339,6 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If GvRow.DataKey("Documentacion") = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140 Then
|
If GvRow.DataKey("Documentacion") = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
|
||||||
|
|
||||||
stringDescargaDocumento = UsuarioActual.Empresa.Ruta & "Formatos\Pagaré.docx"
|
stringDescargaDocumento = UsuarioActual.Empresa.Ruta & "Formatos\Pagaré.docx"
|
||||||
linkDescargaPagare = stringDescargaDocumento
|
linkDescargaPagare = stringDescargaDocumento
|
||||||
TxtDireccionAval.Text = ""
|
TxtDireccionAval.Text = ""
|
||||||
@@ -7364,10 +7353,9 @@ Partial Class Clientes
|
|||||||
|
|
||||||
linkDescargaPagare = stringDescargaDocumento
|
linkDescargaPagare = stringDescargaDocumento
|
||||||
|
|
||||||
Dim File = New FileInfo(linkDescargaPagare)
|
Dim File As New FileInfo(linkDescargaPagare)
|
||||||
|
|
||||||
If File.Exists Then
|
If File.Exists Then
|
||||||
|
|
||||||
Response.Clear()
|
Response.Clear()
|
||||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name)
|
Response.AddHeader("Content-Disposition", "attachment; filename=" + File.Name)
|
||||||
Response.AddHeader("Content-Length", File.Length.ToString())
|
Response.AddHeader("Content-Length", File.Length.ToString())
|
||||||
@@ -7375,13 +7363,8 @@ Partial Class Clientes
|
|||||||
Response.Flush()
|
Response.Flush()
|
||||||
Response.TransmitFile(File.FullName)
|
Response.TransmitFile(File.FullName)
|
||||||
Response.End()
|
Response.End()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub ImprimirPagare(sender As Object, e As EventArgs) Handles BtnAgregarPagare.Click
|
Protected Sub ImprimirPagare(sender As Object, e As EventArgs) Handles BtnAgregarPagare.Click
|
||||||
@@ -7509,11 +7492,6 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Dim imgCalendario As LinkButton = e.Row.FCLinkButton("imgCalendario")
|
Dim imgCalendario As LinkButton = e.Row.FCLinkButton("imgCalendario")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' FechaVigencia
|
' FechaVigencia
|
||||||
|
|
||||||
Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero()
|
Dim DiasLimite As Integer = e.Row.DataKey("DiasLimite").ToString().ToEntero()
|
||||||
@@ -7556,8 +7534,8 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If Adjunto.Trim.Length > 0 Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then
|
If Adjunto.Trim.Length > 0 Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then
|
||||||
|
|
||||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
|
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
|
||||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
|
Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "\DocElectronica\Clientes\" & CveCliente & "/" & Adjunto
|
||||||
If File.Exists(linkDescargaArchivo) Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then
|
If File.Exists(linkDescargaArchivo) Or (Documentacion = "Pagaré" AndAlso UsuarioActual.CveEmpresa = 140) Then
|
||||||
|
|
||||||
LnkDownLoadDoc.Visible = True
|
LnkDownLoadDoc.Visible = True
|
||||||
@@ -7594,10 +7572,6 @@ Partial Class Clientes
|
|||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
Dim Adjunto As String = GvRow.DataKey("Adjunto")
|
||||||
|
|
||||||
Dim stringDescargaDocumento As String = ""
|
|
||||||
|
|
||||||
Dim asdasd = GvRow.DataKey("Documentacion")
|
|
||||||
|
|
||||||
If GvRow.DataKey("Documentacion").ToUpper = "Pagaré".ToUpper AndAlso UsuarioActual.CveEmpresa = 140 Then
|
If GvRow.DataKey("Documentacion").ToUpper = "Pagaré".ToUpper AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||||
|
|
||||||
|
|
||||||
@@ -7612,18 +7586,12 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Else
|
Else
|
||||||
|
|
||||||
|
|
||||||
Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
Dim CveDocumentacion As Integer = GvRow.DataKey("CveDocumentacion").ToString().ToEntero()
|
||||||
Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato")
|
Dim DocumentacionFormato As String = CveDocumentacion & "_" & GvRow.DataKey("DocumentacionFormato")
|
||||||
|
|
||||||
DescarFormato(DocumentacionFormato)
|
DescarFormato(DocumentacionFormato)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Public Sub DescarFormato(documento As String)
|
Public Sub DescarFormato(documento As String)
|
||||||
|
|
||||||
@@ -7631,9 +7599,6 @@ Partial Class Clientes
|
|||||||
Dim PathSource As String
|
Dim PathSource As String
|
||||||
Dim pathDesti As String
|
Dim pathDesti As String
|
||||||
Dim fname As String = ""
|
Dim fname As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & documento
|
PathSource = UsuarioActual.Empresa.Ruta & "Formatos\" & documento
|
||||||
pathDesti = PathRoot & "Temp\" & CveCliente & documento
|
pathDesti = PathRoot & "Temp\" & CveCliente & documento
|
||||||
|
|
||||||
@@ -7662,14 +7627,10 @@ Partial Class Clientes
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim FileD = New FileInfo(pathDesti)
|
Dim FileD As New FileInfo(pathDesti)
|
||||||
|
|
||||||
If FileD.Exists Then
|
If FileD.Exists Then
|
||||||
|
|
||||||
Response.Clear()
|
Response.Clear()
|
||||||
@@ -7828,9 +7789,6 @@ Partial Class Clientes
|
|||||||
Else
|
Else
|
||||||
Respuesta = True
|
Respuesta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UpModalCXCClienteDocumento.Update()
|
UpModalCXCClienteDocumento.Update()
|
||||||
Return Respuesta
|
Return Respuesta
|
||||||
|
|
||||||
@@ -8397,7 +8355,7 @@ Partial Class Clientes
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
Dim ObjGPS = New ClsGPS()
|
Dim ObjGPS As New ClsGPS()
|
||||||
Dim ObjEventos As New ClsOIEventos(ObjGPS.IniciaTransacSQL())
|
Dim ObjEventos As New ClsOIEventos(ObjGPS.IniciaTransacSQL())
|
||||||
|
|
||||||
If ObjGPS.UpdateClienteDispositivo(CveDispositivo, CveCliente) Then
|
If ObjGPS.UpdateClienteDispositivo(CveDispositivo, CveCliente) Then
|
||||||
@@ -8427,7 +8385,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
#Region "CRM"
|
#Region "CRM"
|
||||||
Protected Sub CargaDatosCRM()
|
Protected Sub CargaDatosCRM()
|
||||||
Dim ObjCRM = New ClsCRM()
|
Dim ObjCRM As New ClsCRM()
|
||||||
|
|
||||||
If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, CveEmpresaCRM) And ObjCRM.DtResultados.Rows.Count > 0 Then
|
If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, CveEmpresaCRM) And ObjCRM.DtResultados.Rows.Count > 0 Then
|
||||||
TxtNombre.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Empresa").ToString()
|
TxtNombre.Text = ObjCRM.DtResultados.FiltroPrimeroValor("Empresa").ToString()
|
||||||
@@ -8447,7 +8405,7 @@ Partial Class Clientes
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub VerificaVinculacion()
|
Protected Sub VerificaVinculacion()
|
||||||
Dim ObjCRM = New ClsCRM()
|
Dim ObjCRM As New ClsCRM()
|
||||||
|
|
||||||
If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, -1) And ObjCRM.DtResultados.Rows.Count > 0 Then
|
If ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa, -1) And ObjCRM.DtResultados.Rows.Count > 0 Then
|
||||||
If ObjCRM.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)).Rows.Count > 0 Then
|
If ObjCRM.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)).Rows.Count > 0 Then
|
||||||
@@ -8461,8 +8419,8 @@ Partial Class Clientes
|
|||||||
|
|
||||||
Protected Function VincularEmpresaCRM() As Boolean
|
Protected Function VincularEmpresaCRM() As Boolean
|
||||||
Dim Ok As Boolean = False
|
Dim Ok As Boolean = False
|
||||||
Dim ObjCRM = New ClsCRM()
|
Dim ObjCRM As New ClsCRM()
|
||||||
Dim ObjBitacora = New ClsOIEventos(ObjCRM.IniciaTransacSQL())
|
Dim ObjBitacora As New ClsOIEventos(ObjCRM.IniciaTransacSQL())
|
||||||
If (CveCliente > 0) Then
|
If (CveCliente > 0) Then
|
||||||
|
|
||||||
Dim CveEmpresaCRMVincular As Integer = If(CveEmpresaCRM > 0, CveEmpresaCRM, If(CveEmpresaCRMUnificar > 0, CveEmpresaCRMUnificar, -1))
|
Dim CveEmpresaCRMVincular As Integer = If(CveEmpresaCRM > 0, CveEmpresaCRM, If(CveEmpresaCRMUnificar > 0, CveEmpresaCRMUnificar, -1))
|
||||||
@@ -8490,7 +8448,7 @@ Partial Class Clientes
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Protected Sub CargaModalEmpresasCRM()
|
Protected Sub CargaModalEmpresasCRM()
|
||||||
Dim ObjCRM = New ClsCRM()
|
Dim ObjCRM As New ClsCRM()
|
||||||
|
|
||||||
If (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa) And ObjCRM.DtResultados.Rows.Count > 0) Then
|
If (ObjCRM.GetEmpresasCRM(UsuarioActual.CveEmpresa) And ObjCRM.DtResultados.Rows.Count > 0) Then
|
||||||
DtEmpresasCRM = ObjCRM.DtResultados.FiltraParametros(String.Format("CveCliente IS NULL"))
|
DtEmpresasCRM = ObjCRM.DtResultados.FiltraParametros(String.Format("CveCliente IS NULL"))
|
||||||
@@ -9084,8 +9042,8 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If ObjFactura.CveCliente > 0 Then
|
If ObjFactura.CveCliente > 0 Then
|
||||||
If TmpDT.Rows.Count > 0 Then
|
If TmpDT.Rows.Count > 0 Then
|
||||||
Dim Retorno = ObjFactura.EmitirFactura(False)
|
Dim Retorno As Modelos.Factura.MMensajeFactura = ObjFactura.EmitirFactura(False)
|
||||||
For Each Mensaje In Retorno.Mensajes
|
For Each Mensaje As String In Retorno.Mensajes
|
||||||
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -9870,7 +9828,7 @@ Partial Class Clientes
|
|||||||
New JProperty("TipoDocto", "-1")
|
New JProperty("TipoDocto", "-1")
|
||||||
)
|
)
|
||||||
|
|
||||||
Dim Url = New Uri(String.Format("{0}api/cliente/GetHistorialVentas?CveCliente={1}&SelectTop={2}&CveClienteSucursal={3}&TipoDocto={4}", "https://localhost:5001/", CveCliente, SelectTop, CveClienteSucursal, "-1"))
|
Dim Url As New Uri(String.Format("{0}api/cliente/GetHistorialVentas?CveCliente={1}&SelectTop={2}&CveClienteSucursal={3}&TipoDocto={4}", "https://localhost:5001/", CveCliente, SelectTop, CveClienteSucursal, "-1"))
|
||||||
|
|
||||||
Dim response = cliente.GetAsync(Url).Result
|
Dim response = cliente.GetAsync(Url).Result
|
||||||
|
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
'SI ES EMPRESA DE ACUMULADORES DEBE OBLIGAR A SUBIR UN ARCHIVO
|
'SI ES EMPRESA DE ACUMULADORES DEBE OBLIGAR A SUBIR UN ARCHIVO
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
Dim files = Anexo.getfiles()
|
Dim files As Extensiones.Files = Anexo.getfiles()
|
||||||
If files IsNot Nothing Then
|
If files IsNot Nothing Then
|
||||||
If files.Archivos IsNot Nothing Then
|
If files.Archivos IsNot Nothing Then
|
||||||
If files.Archivos.Count = 0 Then
|
If files.Archivos.Count = 0 Then
|
||||||
@@ -1141,39 +1141,15 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(220) <> "" Then
|
|
||||||
' If Not ObjMov.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
' MsgError = "No se pudo simplificar los movimientos"
|
|
||||||
' Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
If MsgError = "" AndAlso Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then
|
If MsgError = "" AndAlso Not ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=3) Then
|
||||||
MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
||||||
'If ObjMov.ValorPolizaDescuadre > 0 Then
|
'If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||||
' MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
' MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
||||||
'End If
|
'End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
''Conta ContPAQ
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
|
||||||
' If idCuentaContabilizacion > 0 Then
|
|
||||||
' If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
|
||||||
' IDPoliza = ObjMov.ContaIdPoliza
|
|
||||||
' FolioPoliza = ObjMov.ContaFolio
|
|
||||||
' Else
|
|
||||||
' Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico")
|
|
||||||
' MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' Alert(String.Format("No se puede contabilizar la Prepoliza debido a que las siguientes cuentas son invalidas: {0}", CuentasContablesInvalidas))
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
Else
|
Else
|
||||||
MsgError = "No se pudo insertar la póliza"
|
MsgError = "No se pudo insertar la póliza"
|
||||||
End If
|
End If
|
||||||
@@ -2708,8 +2684,8 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||||
|
|
||||||
Dim DTExcel As New DataTable
|
Dim DTExcel As New DataTable
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo As Boolean = False
|
||||||
Dim ErrorExcel = False
|
Dim ErrorExcel As Boolean = False
|
||||||
|
|
||||||
DTExcel = ReadExcelFile(Directorio + file.filename, True)
|
DTExcel = ReadExcelFile(Directorio + file.filename, True)
|
||||||
|
|
||||||
|
|||||||
@@ -530,6 +530,41 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" id="DiveCommerce" runat="server" visible="false">
|
||||||
|
<div class="portlet xspadding light bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-briefcase font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Ecommerce</span>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body form">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtNombreComercial" CssClass="form-control input-sm" runat="server" >
|
||||||
|
</asp:TextBox>
|
||||||
|
<label for="<%= TxtNombreComercial.ClientID.ToString()%>">Nombre Comercial:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtEcommerceNota" CssClass="form-control input-sm" runat="server" >
|
||||||
|
</asp:TextBox>
|
||||||
|
<label for="<%= TxtEcommerceNota.ClientID.ToString()%>">Notas Adicionales:</label>
|
||||||
|
<i></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -287,8 +287,6 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
||||||
TxtPS.CssClass = "form-control Mayuscula"
|
TxtPS.CssClass = "form-control Mayuscula"
|
||||||
End If
|
End If
|
||||||
@@ -430,6 +428,9 @@ Partial Class ProductosyServicios
|
|||||||
DivCitricos.Visible = True
|
DivCitricos.Visible = True
|
||||||
CargaPanelCitricos()
|
CargaPanelCitricos()
|
||||||
End If
|
End If
|
||||||
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
DiveCommerce.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -968,26 +969,19 @@ Partial Class ProductosyServicios
|
|||||||
DdlRin.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveRinTamaño").ToString)
|
DdlRin.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveRinTamaño").ToString)
|
||||||
|
|
||||||
DdlObjetoImpuesto.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveObjetoImpuesto").ToString)
|
DdlObjetoImpuesto.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveObjetoImpuesto").ToString)
|
||||||
'If ObjProductosServicios.CvePSAdicional > 0 Then
|
|
||||||
' DdlPSAdicional.SelectedValue = ObjProductosServicios.CvePSAdicional.ToString
|
|
||||||
' DdlPSAdicional.SelectedText = ObjProductosServicios.PSCodigoAdicional
|
|
||||||
'Else
|
|
||||||
' DdlPSAdicional.SelectedValue = "-1"
|
|
||||||
' DdlPSAdicional.SelectedText = "Seleccione"
|
|
||||||
'End If
|
|
||||||
|
|
||||||
DdlEmpacado.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoEmpacado").ToString)
|
DdlEmpacado.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoEmpacado").ToString)
|
||||||
DdlTipoOrganico.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoOrganico").ToString)
|
DdlTipoOrganico.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoOrganico").ToString)
|
||||||
|
TxtNombreComercial.Text = ObjProductosServicios.DtResultados.Rows(0)("NombreComercial").ToString
|
||||||
|
TxtEcommerceNota.Text = ObjProductosServicios.DtResultados.Rows(0)("NotasAdicionales").ToString
|
||||||
|
|
||||||
Try
|
Try
|
||||||
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, Nothing)
|
DdlClasificacion_SelectedIndexChanged(DdlClasificacion, Nothing)
|
||||||
|
|
||||||
DdlTamanio.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTamaño").ToString)
|
DdlTamanio.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTamaño").ToString)
|
||||||
If DdlTamanio.SelectedValue.ToEntero() > 0 Then
|
If DdlTamanio.SelectedValue.ToEntero() > 0 Then
|
||||||
Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
||||||
|
|
||||||
Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString)
|
Dim DebeTenerTamanio As Boolean = Boolean.Parse(Dr("EsAcumulador").ToString)
|
||||||
|
|
||||||
'SI ES MOTOBATERIA
|
'SI ES MOTOBATERIA
|
||||||
If DdlClasificacion.SelectedValue = "20517" Then
|
If DdlClasificacion.SelectedValue = "20517" Then
|
||||||
DebeTenerTamanio = True
|
DebeTenerTamanio = True
|
||||||
@@ -1004,15 +998,11 @@ Partial Class ProductosyServicios
|
|||||||
If DebeTenerTamanio AndAlso DdlTamanio.SelectedValue.ToEntero() <= 0 Then
|
If DebeTenerTamanio AndAlso DdlTamanio.SelectedValue.ToEntero() <= 0 Then
|
||||||
Alert($"Un producto/servicio con la clasificación '{Dr("Clasificacion")}' debe tener especificado un tamaño.", TipoMensaje.MsgAdvertencia)
|
Alert($"Un producto/servicio con la clasificación '{Dr("Clasificacion")}' debe tener especificado un tamaño.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DvTamanio.Visible = True
|
DvTamanio.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
ChkAplicaIeps.Checked = ObjProductosServicios.AplicaIEPS
|
ChkAplicaIeps.Checked = ObjProductosServicios.AplicaIEPS
|
||||||
If ObjProductosServicios.AplicaIEPS = True Then
|
If ObjProductosServicios.AplicaIEPS = True Then
|
||||||
DdlIEPSPorcentaje.Enabled = True
|
DdlIEPSPorcentaje.Enabled = True
|
||||||
@@ -1469,7 +1459,8 @@ Partial Class ProductosyServicios
|
|||||||
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad,
|
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad,
|
||||||
CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
|
CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
|
||||||
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
||||||
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) > 0 Then
|
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal, RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
|
||||||
|
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim) > 0 Then
|
||||||
ViewState("CvePS") = ObjProductosServicios.CvePS
|
ViewState("CvePS") = ObjProductosServicios.CvePS
|
||||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||||
@@ -1540,7 +1531,8 @@ Partial Class ProductosyServicios
|
|||||||
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
|
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
|
||||||
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
||||||
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal,
|
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal,
|
||||||
RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked) Then
|
RegistroRSCO:=TxtRegistroRSCO.Text, FechaVigenciaRSCO:=TxtFechaVigenciaRSCO.Text.ToDate, VigenciaIndeterminadaRSCO:=ChkFechaIndeterminadaRSCO.Checked,
|
||||||
|
NombreComercial:=TxtNombreComercial.Text.Trim, NotasAdicionales:=TxtEcommerceNota.Text.Trim) Then
|
||||||
|
|
||||||
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
|
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -1704,7 +1696,7 @@ Partial Class ProductosyServicios
|
|||||||
#Region "GV ALIAS"
|
#Region "GV ALIAS"
|
||||||
Protected Sub GVAlias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlias.RowDeleting
|
Protected Sub GVAlias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GVAlias.RowDeleting
|
||||||
Dim ObjAliasDelete As New ClsProductosServicios
|
Dim ObjAliasDelete As New ClsProductosServicios
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, UsuarioActual.CveUsuario) Then
|
If ObjAliasDelete.RemovePSAlias(GVAlias.Rows(e.RowIndex).DataKey("CvePS").ToString.ToEntero, GVAlias.Rows(e.RowIndex).DataKey("PSAlias").ToString, UsuarioActual.CveUsuario) Then
|
||||||
GVAlias.EditIndex = -1
|
GVAlias.EditIndex = -1
|
||||||
@@ -1783,11 +1775,11 @@ Partial Class ProductosyServicios
|
|||||||
CargaGvEquivalencias()
|
CargaGvEquivalencias()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GvEquivalencia_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvEquivalencia.RowUpdating
|
Private Sub GvEquivalencia_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvEquivalencia.RowUpdating
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim CveUM = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
|
Dim CveUM As Integer = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
|
||||||
Dim UnidadBase = GvEquivalencia.Rows(e.RowIndex).DataKey("UnidadBase").ToString = "True"
|
Dim UnidadBase As Boolean = GvEquivalencia.Rows(e.RowIndex).DataKey("UnidadBase").ToString = "True"
|
||||||
Dim Cantidad = DirectCast(GvEquivalencia.Rows(e.RowIndex).FindControl("TxtCantidadEquivalencia"), TextBox).Text.Trim.ToDecimal
|
Dim Cantidad As Decimal = DirectCast(GvEquivalencia.Rows(e.RowIndex).FindControl("TxtCantidadEquivalencia"), TextBox).Text.Trim.ToDecimal
|
||||||
|
|
||||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||||
If Not ObjProductosServicios.UpdatePSEquivalencias(CvePS, CveUM, Cantidad, UnidadBase, 0, UsuarioActual.CveUsuario) Then
|
If Not ObjProductosServicios.UpdatePSEquivalencias(CvePS, CveUM, Cantidad, UnidadBase, 0, UsuarioActual.CveUsuario) Then
|
||||||
@@ -1807,9 +1799,9 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub GvEquivalencia_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvEquivalencia.RowDeleting
|
Private Sub GvEquivalencia_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvEquivalencia.RowDeleting
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
Dim CveUM = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
|
Dim CveUM As Integer = GvEquivalencia.Rows(e.RowIndex).DataKey("CveUM").ToEntero
|
||||||
|
|
||||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||||
If Not ObjProductosServicios.RemovePSEquivalencias(CvePS, CveUM) Then
|
If Not ObjProductosServicios.RemovePSEquivalencias(CvePS, CveUM) Then
|
||||||
@@ -2349,7 +2341,7 @@ Partial Class ProductosyServicios
|
|||||||
Public Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
Public Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||||
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
|
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
|
||||||
If Me.CvePS <= 0 AndAlso (Not CveSATPS > 0 Or CveSATPS = 46920) Then
|
If Me.CvePS <= 0 AndAlso (Not CveSATPS > 0 Or CveSATPS = 46920) Then
|
||||||
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
||||||
|
|
||||||
If Dr IsNot Nothing Then
|
If Dr IsNot Nothing Then
|
||||||
DdlSATPS.SelectedValue = Dr("CveSATPS").ToString
|
DdlSATPS.SelectedValue = Dr("CveSATPS").ToString
|
||||||
@@ -2367,7 +2359,7 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
|
If DdlClasificacion.SelectedValue.ToEntero > 0 Then
|
||||||
Try
|
Try
|
||||||
Dim Dr = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
Dim Dr As DataRow = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue.ToEntero()))(0)
|
||||||
If Boolean.Parse(Dr("EsAcumulador").ToString) Then
|
If Boolean.Parse(Dr("EsAcumulador").ToString) Then
|
||||||
MostarOcultarDivTamanio(True)
|
MostarOcultarDivTamanio(True)
|
||||||
Else
|
Else
|
||||||
@@ -2381,10 +2373,6 @@ Partial Class ProductosyServicios
|
|||||||
OnError("Ocurrió un error al mostrar los tamaños", ex)
|
OnError("Ocurrió un error al mostrar los tamaños", ex)
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MostarOcultarDivTamanio(Mostrar As Boolean)
|
Private Sub MostarOcultarDivTamanio(Mostrar As Boolean)
|
||||||
@@ -2479,7 +2467,7 @@ Partial Class ProductosyServicios
|
|||||||
UpEcommercePSRelacionados.Update()
|
UpEcommercePSRelacionados.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function GuardaEcommerce() As Boolean
|
Private Function GuardaEcommerce() As Boolean
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then
|
||||||
|
|
||||||
@@ -2494,10 +2482,10 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Descripcion = TxtEcommerceDescripcion.Text.Trim
|
Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
||||||
Dim PrecioBase = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
||||||
Dim PrecioPromocion = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
||||||
Dim Disponible = ChkEcommerceDisponible.Checked
|
Dim Disponible As Boolean = ChkEcommerceDisponible.Checked
|
||||||
|
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
Dim ObjEcommerce As New ClsECommerce
|
||||||
If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -2510,11 +2498,11 @@ Partial Class ProductosyServicios
|
|||||||
Return TieneError
|
Return TieneError
|
||||||
End Function
|
End Function
|
||||||
Private Function ValidaGuardarEcommerce() As Boolean
|
Private Function ValidaGuardarEcommerce() As Boolean
|
||||||
Dim Retorno = True
|
Dim Retorno As Boolean = True
|
||||||
Dim Mensaje As New StringBuilder
|
Dim Mensaje As New StringBuilder
|
||||||
|
|
||||||
'DESCRIPCION
|
'DESCRIPCION
|
||||||
Dim Descripcion = TxtEcommerceDescripcion.Text.Trim
|
Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
||||||
If Descripcion.Length = 0 Then
|
If Descripcion.Length = 0 Then
|
||||||
Mensaje.Append("- El campo <b>Descripción</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
Mensaje.Append("- El campo <b>Descripción</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||||
End If
|
End If
|
||||||
@@ -2523,7 +2511,7 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'PRECIO BASE
|
'PRECIO BASE
|
||||||
Dim PrecioBase = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
||||||
If PrecioBase = 0 Then
|
If PrecioBase = 0 Then
|
||||||
Mensaje.Append("- El campo <b>Precio</b> es obligatorio. Por favor verifique y vuelva a intentar. <br>")
|
Mensaje.Append("- El campo <b>Precio</b> es obligatorio. Por favor verifique y vuelva a intentar. <br>")
|
||||||
End If
|
End If
|
||||||
@@ -2532,7 +2520,7 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'PRECIO FINAL
|
'PRECIO FINAL
|
||||||
Dim PrecioPromocion = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
||||||
If PrecioPromocion < 0 Then
|
If PrecioPromocion < 0 Then
|
||||||
Mensaje.Append("- El campo <b>Precio Final</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
Mensaje.Append("- El campo <b>Precio Final</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
||||||
End If
|
End If
|
||||||
@@ -2567,8 +2555,8 @@ Partial Class ProductosyServicios
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
Dim CveInsignia = DdlEcommerceInsignia.SelectedValue.ToEntero
|
Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
||||||
|
|
||||||
'AGREGAR
|
'AGREGAR
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
Dim ObjEcommerce As New ClsECommerce
|
||||||
@@ -2585,11 +2573,11 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean
|
Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean
|
||||||
Dim Retorno = True
|
Dim Retorno As Boolean = True
|
||||||
Dim Mensaje As New StringBuilder
|
Dim Mensaje As New StringBuilder
|
||||||
|
|
||||||
'INSIGNIA
|
'INSIGNIA
|
||||||
Dim CveInsignia = DdlEcommerceInsignia.SelectedValue.ToEntero
|
Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
||||||
If CveInsignia = 0 Then
|
If CveInsignia = 0 Then
|
||||||
Mensaje.Append("- El campo <b>Insignia</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
Mensaje.Append("- El campo <b>Insignia</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||||
End If
|
End If
|
||||||
@@ -2609,8 +2597,8 @@ Partial Class ProductosyServicios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting
|
Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
Dim GvRow = GvEcommercePSInsignias.Rows(e.RowIndex)
|
Dim GvRow As GridViewRow = GvEcommercePSInsignias.Rows(e.RowIndex)
|
||||||
|
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -2645,11 +2633,11 @@ Partial Class ProductosyServicios
|
|||||||
Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos
|
Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos
|
||||||
Dim FileMove = ""
|
Dim FileMove As String = ""
|
||||||
Dim Archivo = ""
|
Dim Archivo As String = ""
|
||||||
Dim DirectorioTemporal = ""
|
Dim DirectorioTemporal As String = ""
|
||||||
|
|
||||||
Dim DirectorioDestino = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
|
Dim DirectorioDestino As String = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
|
||||||
If Not Directory.Exists(DirectorioDestino) Then
|
If Not Directory.Exists(DirectorioDestino) Then
|
||||||
Directory.CreateDirectory(DirectorioDestino)
|
Directory.CreateDirectory(DirectorioDestino)
|
||||||
End If
|
End If
|
||||||
@@ -2712,8 +2700,8 @@ Partial Class ProductosyServicios
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
Dim CvePS = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
||||||
|
|
||||||
'AGREGAR
|
'AGREGAR
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
Dim ObjEcommerce As New ClsECommerce
|
||||||
@@ -2731,11 +2719,11 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean
|
Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean
|
||||||
Dim Retorno = True
|
Dim Retorno As Boolean = True
|
||||||
Dim Mensaje As New StringBuilder
|
Dim Mensaje As New StringBuilder
|
||||||
|
|
||||||
'PS
|
'PS
|
||||||
Dim CvePS = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
||||||
If CvePS = 0 Then
|
If CvePS = 0 Then
|
||||||
Mensaje.Append("- El campo <b>Producto</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
Mensaje.Append("- El campo <b>Producto</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||||
End If
|
End If
|
||||||
@@ -2755,8 +2743,8 @@ Partial Class ProductosyServicios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting
|
Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting
|
||||||
Dim TieneError = False
|
Dim TieneError As Boolean = False
|
||||||
Dim GvRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
|
Dim GvRow As GridViewRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
|
||||||
|
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
|||||||
@@ -128,11 +128,6 @@
|
|||||||
<asp:LinkButton ID="LnkCancelar" Visible="false" runat="server" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'> </i>" ToolTip="Esta seguro que desea cancelar la factura pendiente?" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
<asp:LinkButton ID="LnkCancelar" Visible="false" runat="server" OnClick="BtnCancelarDocumento_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'> </i>" ToolTip="Esta seguro que desea cancelar la factura pendiente?" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:LinkButton ID="LnkCancelarFolioSustitucion" Visible="false" runat="server" OnClick="LnkCancelarFolioSustitucion_Click" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-ban'> 02</i>" ToolTip="Cancelar refacturación con método 02" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar el documento?" data-btn-ok-label="si"></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="40px" HeaderText="Refact">
|
<asp:TemplateField ItemStyle-Width="40px" HeaderText="Refact">
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
using Extensiones;
|
using Extensiones;
|
||||||
|
using StackExchange.Redis;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Activities.Expressions;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using static Extensiones.ModExtensiones;
|
using static Extensiones.ModExtensiones;
|
||||||
|
using static Stimulsoft.Report.Export.DeflaterHuffman;
|
||||||
|
|
||||||
public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||||
{
|
{
|
||||||
@@ -184,27 +187,30 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
string TipoDocto = GvRow.DataKey("TipoDocto");
|
string TipoDocto = GvRow.DataKey("TipoDocto");
|
||||||
string Nombre = GvRow.DataKey("Nombre");
|
string Nombre = GvRow.DataKey("Nombre");
|
||||||
string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
||||||
|
int CveVentaSustitucion = GvRow.DataKey("CveVentaSustitucion").ToEntero();
|
||||||
|
string RFCReceptorSustitucion = GvRow.DataKey("RFCReceptorSustitucion");
|
||||||
|
|
||||||
int CveMotivoCancelacion = -1;
|
int CveMotivoCancelacion = -1;
|
||||||
int CveEstatusRefacturacion = GvRow.DataKey("CveEstatusRefacturacion").ToEntero();
|
int CveEstatusRefacturacion = GvRow.DataKey("CveEstatusRefacturacion").ToEntero();
|
||||||
int CveEstatusFacturaSustitucion = GvRow.DataKey("CveEstatusFacturaSustitucion").ToEntero();
|
int CveEstatusFacturaSustitucion = GvRow.DataKey("CveEstatusFacturaSustitucion").ToEntero();
|
||||||
|
|
||||||
//SI NO SE PUDO CANCELAR O LA FACTURA NUEVA FUE CANCELADA, CANCELAR CON EL 02
|
if (CveEstatusRefacturacion > 0)
|
||||||
if (CveEstatusRefacturacion == 4 || CveEstatusFacturaSustitucion == 5)
|
|
||||||
{
|
{
|
||||||
//CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02
|
CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 1).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||||
FolioSustitucion = "";
|
|
||||||
CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
|
||||||
}
|
}
|
||||||
else
|
//CveEstatusRefacturacion = 2;
|
||||||
{
|
|
||||||
CveEstatusRefacturacion = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (CveVenta > 0)
|
if (CveVenta > 0)
|
||||||
{
|
{
|
||||||
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion);
|
//VERIFICA EL ESTATUS DE LA FACTURA NUEVA, SI ESTA ESTÁ CANCELADA, SE MANDA UNA CANCELACIÓN SIN FOLIO DE SUSTITUCIÓN Y CON EL CÓDIGO 02
|
||||||
|
Timbrado.AcuseCancelacionSAT VigenciaExtra = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptorSustitucion, Total.ToString(), true);
|
||||||
|
if (VigenciaExtra.Estado.ToUpper() == "CANCELADO")
|
||||||
|
{
|
||||||
|
FolioSustitucion = "";
|
||||||
|
CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||||
|
}
|
||||||
|
|
||||||
|
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion, CveMotivoCancelacion: CveMotivoCancelacion);
|
||||||
|
|
||||||
if (!respCancelacion.HuboError)
|
if (!respCancelacion.HuboError)
|
||||||
{
|
{
|
||||||
@@ -811,127 +817,127 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void LnkCancelarFolioSustitucion_Click(object sender, EventArgs e)
|
//protected void LnkCancelarFolioSustitucion_Click(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
//this.HdnLigaRefacturar.Value = "";
|
// //this.HdnLigaRefacturar.Value = "";
|
||||||
this.CveVenta = -1;
|
// this.CveVenta = -1;
|
||||||
|
|
||||||
GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
// GridViewRow GvRow = (GridViewRow)(((LinkButton)sender).NamingContainer);
|
||||||
this.CveVenta = GvRow.DataKey("CveVentaSustitucion").ToEntero();
|
// this.CveVenta = GvRow.DataKey("CveVentaSustitucion").ToEntero();
|
||||||
|
|
||||||
int CveCliente = GvRow.DataKey("CveClienteSustitucion").ToEntero();
|
// int CveCliente = GvRow.DataKey("CveClienteSustitucion").ToEntero();
|
||||||
string Total = GvRow.DataKey("TotalSustitucion");
|
// string Total = GvRow.DataKey("TotalSustitucion");
|
||||||
string RFCReceptor = GvRow.DataKey("RFCReceptorSustitucion");
|
// string RFCReceptor = GvRow.DataKey("RFCReceptorSustitucion");
|
||||||
string TipoDocto = GvRow.DataKey("TipoDocto");
|
// string TipoDocto = GvRow.DataKey("TipoDocto");
|
||||||
string Nombre = GvRow.DataKey("Nombre");
|
// string Nombre = GvRow.DataKey("Nombre");
|
||||||
string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
// string FolioSustitucion = GvRow.DataKey("FolioFiscalSustitucion");
|
||||||
string SerieFolioSustitucion = GvRow.DataKey("SerieFolioSustitucion");
|
// string SerieFolioSustitucion = GvRow.DataKey("SerieFolioSustitucion");
|
||||||
|
|
||||||
int CveVentaOriginal = GvRow.DataKey("CveVenta").ToEntero();
|
// int CveVentaOriginal = GvRow.DataKey("CveVenta").ToEntero();
|
||||||
string SerieFolioOriginal = GvRow.DataKey("SerieFolio");
|
// string SerieFolioOriginal = GvRow.DataKey("SerieFolio");
|
||||||
|
|
||||||
//CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02
|
// //CUANDO LAS REFACTURACIONES NO SE PUEDEN CANCELAR, DEBE SER CANCELADO CON EL MOTIVO 02
|
||||||
int CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
// int CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||||
|
|
||||||
if (CveVenta > 0 && FolioSustitucion != "")
|
// if (CveVenta > 0 && FolioSustitucion != "")
|
||||||
{
|
// {
|
||||||
var respCancelacion = CancelarDocumento(CveVenta, -2, CveCliente, "", FolioSustitucion, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: "", CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion);
|
// var respCancelacion = CancelarDocumento(CveVenta, -2, CveCliente, "", FolioSustitucion, "", DateTime.Now, TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: "", CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion);
|
||||||
|
|
||||||
if (!respCancelacion.HuboError)
|
// if (!respCancelacion.HuboError)
|
||||||
{
|
// {
|
||||||
var sb = new StringBuilder();
|
// var sb = new StringBuilder();
|
||||||
var EnviarAcuse = false;
|
// var EnviarAcuse = false;
|
||||||
if (respCancelacion.CveEstatus > 0)
|
// if (respCancelacion.CveEstatus > 0)
|
||||||
{
|
// {
|
||||||
if (respCancelacion.CveEstatus.Contiene(5, 20))
|
// if (respCancelacion.CveEstatus.Contiene(5, 20))
|
||||||
{
|
// {
|
||||||
EnviarAcuse = true;
|
// EnviarAcuse = true;
|
||||||
}
|
// }
|
||||||
|
|
||||||
var CveEstatus = respCancelacion.CveEstatus;
|
// var CveEstatus = respCancelacion.CveEstatus;
|
||||||
var ObjVentas = new ClsVentas();
|
// var ObjVentas = new ClsVentas();
|
||||||
if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa))
|
// if (ObjVentas.UpdateEstatusVenta(CveVenta, CveEstatus, UsuarioActual.CveEmpresa))
|
||||||
{
|
// {
|
||||||
if (respCancelacion.CveEstatus == 20)
|
// if (respCancelacion.CveEstatus == 20)
|
||||||
{
|
// {
|
||||||
sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a <b>'Cancelación en proceso'</b>.");
|
// sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a <b>'Cancelación en proceso'</b>.");
|
||||||
|
|
||||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
// sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||||
}
|
// }
|
||||||
else if (respCancelacion.CveEstatus == 23)
|
// else if (respCancelacion.CveEstatus == 23)
|
||||||
{
|
// {
|
||||||
sb.Append("La solicitud de cancelación no la aplicó el SAT, intente cancelar de nuevo.");
|
// sb.Append("La solicitud de cancelación no la aplicó el SAT, intente cancelar de nuevo.");
|
||||||
}
|
// }
|
||||||
else if (respCancelacion.CveEstatus == 5)
|
// else if (respCancelacion.CveEstatus == 5)
|
||||||
{
|
// {
|
||||||
sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a <b>'Cancelada'</b>.");
|
// sb.Append($"El estatus de la factura <b>{SerieFolioSustitucion}</b> fue cambiado a <b>'Cancelada'</b>.");
|
||||||
sb.Append("El documento se canceló correctamente.");
|
// sb.Append("El documento se canceló correctamente.");
|
||||||
sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
// sb.Append($"</br> <a href='/Compras/PopUpVerFactura.aspx?P={Encripta($"OP=CAN&CVEVTA={CveVenta}")}' class='Texto' target='_blank'>Imprimir Acuse</a>");
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (respCancelacion.CveEstatus.Contiene(5, 20))
|
// if (respCancelacion.CveEstatus.Contiene(5, 20))
|
||||||
{
|
// {
|
||||||
if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion))
|
// if (ObjVentas.UpdateEstatusVenta(CveVentaOriginal, 23, UsuarioActual.CveEmpresa, CveEstatusRefacturacion: 4, CveMotivoCancelacion: CveMotivoCancelacion))
|
||||||
{
|
// {
|
||||||
sb.Append($"</br>La Factura <b>{SerieFolioOriginal}</b> fue desligada.");
|
// sb.Append($"</br>La Factura <b>{SerieFolioOriginal}</b> fue desligada.");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
sb.Append("Ocurrió un error al cambiar el estatus de la factura.");
|
// sb.Append("Ocurrió un error al cambiar el estatus de la factura.");
|
||||||
}
|
// }
|
||||||
ObjVentas.Dispose();
|
// ObjVentas.Dispose();
|
||||||
|
|
||||||
if (respCancelacion.CveEstatus == 23)
|
// if (respCancelacion.CveEstatus == 23)
|
||||||
{
|
// {
|
||||||
var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true);
|
// var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true);
|
||||||
if (resp != null)
|
// if (resp != null)
|
||||||
{
|
// {
|
||||||
sb.AppendFormat("<br/> Folio Fiscal: {0} <br/>", FolioSustitucion);
|
// sb.AppendFormat("<br/> Folio Fiscal: {0} <br/>", FolioSustitucion);
|
||||||
sb.AppendFormat("Código Estado: {0} <br/>", resp.CodigoEstatus);
|
// sb.AppendFormat("Código Estado: {0} <br/>", resp.CodigoEstatus);
|
||||||
sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
// sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
||||||
sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
// sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
||||||
sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
// sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true);
|
// var resp = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptor, Total, true);
|
||||||
if (resp != null)
|
// if (resp != null)
|
||||||
{
|
// {
|
||||||
sb.AppendFormat("Folio Fiscal: {0} <br/>", FolioSustitucion);
|
// sb.AppendFormat("Folio Fiscal: {0} <br/>", FolioSustitucion);
|
||||||
sb.AppendFormat("Código Estado: {0} <br/>", resp.CodigoEstatus);
|
// sb.AppendFormat("Código Estado: {0} <br/>", resp.CodigoEstatus);
|
||||||
sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
// sb.AppendFormat("Estado: {0} <br/>", resp.Estado);
|
||||||
sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
// sb.AppendFormat("Es Cancelable: {0} <br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EsCancelable);
|
||||||
sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
// sb.AppendFormat("Estatus de Cancelación: {0} <br/><br/>", string.IsNullOrEmpty(resp.EsCancelable) ? "Desconocido" : resp.EstatusCancelacion);
|
||||||
}
|
// }
|
||||||
|
|
||||||
sb.Append(respCancelacion.Mensaje);
|
// sb.Append(respCancelacion.Mensaje);
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (EnviarAcuse)
|
// if (EnviarAcuse)
|
||||||
{
|
// {
|
||||||
sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
|
// sb.Append("</br></br> ¿Desea enviar el Acuse de Cancelación al Cliente?");
|
||||||
Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
|
// Alert(sb.ToString(), TipoMensaje.MsgConfirmacion, "BtnEnviarMailCancelacion();", TextoConfirmacion: "Enviar", TextoSegundoBoton: "Cancelar");
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Alert(sb.ToString());
|
// Alert(sb.ToString());
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
Alert(respCancelacion.Mensaje, TipoMensaje.MsgError);
|
// Alert(respCancelacion.Mensaje, TipoMensaje.MsgError);
|
||||||
}
|
// }
|
||||||
|
|
||||||
CargaDatos();
|
// CargaDatos();
|
||||||
}
|
// }
|
||||||
UPDatos.Update();
|
// UPDatos.Update();
|
||||||
|
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
public class MRespuestaSAT
|
public class MRespuestaSAT
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ Imports System.Data
|
|||||||
Imports System.Drawing
|
Imports System.Drawing
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
'Imports CrystalDecisions.CrystalReports.Engine
|
|
||||||
'Imports CrystalDecisions.Shared
|
|
||||||
|
|
||||||
Partial Class Ventas_RepVentasUtilidad
|
Partial Class Ventas_RepVentasUtilidad
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -90,16 +88,17 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
DdlMarcas.DataBind()
|
DdlMarcas.DataBind()
|
||||||
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
|
|
||||||
Dim CveSubProyecto = If(Request("CveSubProyecto") IsNot Nothing, Request("CveSubProyecto").ToString, "-1").ToString
|
Dim CveSubProyecto As String = If(Request("CveSubProyecto") IsNot Nothing, Request("CveSubProyecto").ToString, "-1").ToString
|
||||||
Dim CveVendedor = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor") <> "", Request("CveVendedor"), "-1").ToString
|
Dim CveVendedor As String = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor") <> "", Request("CveVendedor"), "-1").ToString
|
||||||
Dim CveCliente = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente") <> "", Request("CveCliente"), "-1").ToString
|
Dim CveCliente As String = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente") <> "", Request("CveCliente"), "-1").ToString
|
||||||
Dim CveGpo = If(Request("CveGpo") IsNot Nothing AndAlso Request("CveGpo") <> "", Request("CveGpo"), "-1").ToString
|
Dim CveGpo As String = If(Request("CveGpo") IsNot Nothing AndAlso Request("CveGpo") <> "", Request("CveGpo"), "-1").ToString
|
||||||
Dim Gpo = If(Request("Gpo") IsNot Nothing AndAlso Request("Gpo") <> "", Request("Gpo"), "-1").ToString
|
Dim Gpo As String = If(Request("Gpo") IsNot Nothing AndAlso Request("Gpo") <> "", Request("Gpo"), "-1").ToString
|
||||||
Dim FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
Dim FechaI As String = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
||||||
Dim FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
Dim FechaF As String = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
||||||
Dim CveClasificacion = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion") <> "", Request("CveClasificacion"), "-1").ToString
|
Dim CveClasificacion As String = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion") <> "", Request("CveClasificacion"), "-1").ToString
|
||||||
Dim CvePS = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS") <> "", Request("CvePS"), "-1").ToString
|
Dim CveCategoria As String = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria") <> "", Request("CveCategoria"), "-1").ToString
|
||||||
Dim CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca") <> "", Request("CveMarca"), "-1").ToString
|
Dim CvePS As String = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS") <> "", Request("CvePS"), "-1").ToString
|
||||||
|
Dim CveMarca As String = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca") <> "", Request("CveMarca"), "-1").ToString
|
||||||
|
|
||||||
DdlSubProyecto.SelectedValuesIfExistM(CveSubProyecto)
|
DdlSubProyecto.SelectedValuesIfExistM(CveSubProyecto)
|
||||||
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
||||||
@@ -107,6 +106,7 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
DdlClientes.SelectedValue = CveCliente
|
DdlClientes.SelectedValue = CveCliente
|
||||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}").FiltroPrimeroValor("Nombre")
|
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}").FiltroPrimeroValor("Nombre")
|
||||||
End If
|
End If
|
||||||
|
DdlCategoria.SelectedValueExist(CveCategoria)
|
||||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||||
DdlPS.SelectedValue = CvePS
|
DdlPS.SelectedValue = CvePS
|
||||||
If CvePS.ToEntero > 0 AndAlso GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then
|
If CvePS.ToEntero > 0 AndAlso GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then
|
||||||
@@ -125,8 +125,8 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
Case 1
|
Case 1
|
||||||
txtFechaF.Text = $"31/12/{CveGpo}"
|
txtFechaF.Text = $"31/12/{CveGpo}"
|
||||||
Case 2
|
Case 2
|
||||||
Dim Mes = CveGpo.Substring(5, 2)
|
Dim Mes As String = CveGpo.Substring(5, 2)
|
||||||
Dim DiaFinal = ""
|
Dim DiaFinal As String = ""
|
||||||
If Mes = "02" Then DiaFinal = "28" Else If Mes.Contiene("01", "03", "05", "07", "08", "10", "12") Then DiaFinal = "31" Else DiaFinal = "30"
|
If Mes = "02" Then DiaFinal = "28" Else If Mes.Contiene("01", "03", "05", "07", "08", "10", "12") Then DiaFinal = "31" Else DiaFinal = "30"
|
||||||
txtFechaI.Text = $"01/{CveGpo.Substring(5, 2)}/{CveGpo.Substring(0, 4)}"
|
txtFechaI.Text = $"01/{CveGpo.Substring(5, 2)}/{CveGpo.Substring(0, 4)}"
|
||||||
If txtFechaI.Text.ToDate.FirstDayOfMonth = FechaI.ToDate.FirstDayOfMonth Then
|
If txtFechaI.Text.ToDate.FirstDayOfMonth = FechaI.ToDate.FirstDayOfMonth Then
|
||||||
@@ -297,12 +297,13 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
If txtFechaI.Text = "" Then FechaI = MinFecha
|
If txtFechaI.Text = "" Then FechaI = MinFecha
|
||||||
If txtFechaF.Text = "" Then FechaF = MaxFecha
|
If txtFechaF.Text = "" Then FechaF = MaxFecha
|
||||||
|
|
||||||
Dim Cliente = If(DdlClientes.SelectedValue = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
Dim Cliente As String = If(DdlClientes.SelectedValue = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||||
Dim Sucursal = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
Dim Sucursal As String = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
||||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
Dim Vendedor As String = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
Dim Clasificacion As String = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||||
Dim Marca = If(DdlMarcas.SelectedValue = "-1", "", $" <b>Marcas:</b> {DdlMarcas.SelectedItem.Text}")
|
Dim Marca As String = If(DdlMarcas.SelectedValue = "-1", "", $" <b>Marcas:</b> {DdlMarcas.SelectedItem.Text}")
|
||||||
|
Dim Categoria As String = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text}")
|
||||||
' Dim Grupo = DdlGrupo.SelectedItem.Text
|
' Dim Grupo = DdlGrupo.SelectedItem.Text
|
||||||
|
|
||||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||||
@@ -323,7 +324,7 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
If txtFechaF.Text = "" Then FechaFin = "-1"
|
If txtFechaF.Text = "" Then FechaFin = "-1"
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
Dim dt As DataTable = ObjVentas.DtResultados
|
Dim dt As DataTable = ObjVentas.DtResultados
|
||||||
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))
|
||||||
@@ -345,17 +346,17 @@ Partial Class Ventas_RepVentasUtilidad
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim Sucursal = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
Dim Sucursal As String = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
||||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
Dim FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
||||||
Dim Cliente = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
Dim Cliente As String = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
Dim Vendedor As String = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
Dim Clasificacion As String = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||||
|
|
||||||
Dim lista = New List(Of CrystalParametro)
|
Dim lista As New List(Of CrystalParametro)
|
||||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||||
lista.Add(New CrystalParametro("AgrupadoPor", $"{Sucursal}{FechaIn}{FechaFn}{Cliente}{Vendedor}{PS}{Clasificacion}"))
|
lista.Add(New CrystalParametro("AgrupadoPor", $"{Sucursal}{FechaIn}{FechaFn}{Cliente}{Vendedor}{PS}{Clasificacion}"))
|
||||||
lista.Add(New CrystalParametro("UtilidadPerdida", LblNombreNeto.Text))
|
lista.Add(New CrystalParametro("UtilidadPerdida", LblNombreNeto.Text))
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpDetalles" runat="server" UpdateMode="Conditional" class="col-md-4">
|
<asp:UpdatePanel ID="UpDetalles" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet smmallpadding light bordered" id="DivVentaDetalle" runat="server">
|
<div class="portlet xspadding light bordered" id="DivVentaDetalle" runat="server">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
@@ -268,13 +268,13 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td><b>Dias Emision:</b> </td>
|
<td><b>Dias Emisión:</b> </td>
|
||||||
<td>
|
<td>
|
||||||
<asp:Label ID="LblDiasEmision" runat="server" Text="Dias Emision"></asp:Label>
|
<asp:Label ID="LblDiasEmision" runat="server" Text="Dias Emisión"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
<td><b>Dias Vencimiento:</b> </td>
|
<td><b>Dias Vencimiento:</b> </td>
|
||||||
<td>
|
<td>
|
||||||
<asp:Label ID="LblDiasVencimiento" runat="server" Text="Dias Vencimiento"></asp:Label>
|
<asp:Label ID="LblDiasVencimiento" runat="server" Text="Días Vencimiento"></asp:Label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpBonificacion" runat="server" UpdateMode="Conditional" class="col-md-4">
|
<asp:UpdatePanel ID="UpBonificacion" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet smmallpadding light bordered" id="Div2" runat="server">
|
<div class="portlet xspadding light bordered" id="Div2" runat="server">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
@@ -330,7 +330,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpDetallesCosto" runat="server" UpdateMode="Conditional" class="col-md-4">
|
<asp:UpdatePanel ID="UpDetallesCosto" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="portlet smmallpadding light bordered" id="Div1" runat="server">
|
<div class="portlet xspadding light bordered" id="Div1" runat="server">
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="icon-pin font-green"></i>
|
<i class="icon-pin font-green"></i>
|
||||||
|
|||||||
@@ -131,6 +131,7 @@
|
|||||||
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
||||||
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
||||||
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Categoría" Value="10"></asp:ListItem>
|
||||||
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
@@ -230,7 +231,7 @@
|
|||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas"
|
||||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}" />
|
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca,CveCategoria" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}" />
|
||||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
||||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
||||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" />
|
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Bonificación" DataField="Bonificacion" DataFormatString="{0:N2}" />
|
||||||
|
|||||||
@@ -247,9 +247,9 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
|||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
e.Row.Cells(0).Text = "Total"
|
e.Row.Cells(0).Text = "Total"
|
||||||
Dim Css As String = "Texto"
|
Dim Css As String = "Texto"
|
||||||
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}",
|
Dim Liga As String = String.Format("/Ventas/RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}",
|
||||||
e.Row.DBCampo("FechaI"), e.Row.DBCampo("FechaF"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"),
|
e.Row.DBCampo("FechaI"), e.Row.DBCampo("FechaF"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"),
|
||||||
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"))
|
e.Row.DBCampo("Grupo"), e.Row.DBCampo("GPO"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("CveCategoria"))
|
||||||
e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text)
|
e.Row.Cells(0).Text = String.Format("<a class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.Cells(0).Text)
|
||||||
Else
|
Else
|
||||||
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
||||||
|
|||||||
@@ -936,8 +936,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
<div class="divtab">
|
<div class="divtab">
|
||||||
<asp:UpdatePanel ID="UpPS" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpPS" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -5335,7 +5333,7 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="Chk" runat="server" Enabled='<%#If(Eval("Habilitado").ToString <> "", CBool(Eval("Habilitado").ToString), False)%>' Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
<asp:CheckBox ID="Chk" runat="server" Enabled='<%#If(Eval("Habilitado").ToString <> "", CBool(Eval("Habilitado").ToString), False)%>' ToolTip='<%#If(Eval("Habilitado").ToString <> "", "Debe de surtirla para facturarla.", "")%>' Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
||||||
<ControlStyle Width="8px" />
|
<ControlStyle Width="8px" />
|
||||||
@@ -5355,7 +5353,7 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="Chk" runat="server" Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
<asp:CheckBox ID="Chk" runat="server" Enabled='<%#If(Eval("Habilitado").ToString <> "", CBool(Eval("Habilitado").ToString), False)%>' ToolTip='<%#If(Eval("Habilitado").ToString <> "", "Debe de surtirla para facturarla.", "")%>' Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
||||||
<ControlStyle Width="8px" />
|
<ControlStyle Width="8px" />
|
||||||
@@ -5368,8 +5366,8 @@
|
|||||||
Cantidad
|
Cantidad
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtCantidadRem" runat="server" Text='<%#Eval("Cantidad", "{0:#,###.#####}").ToString%>' MaxLength="12" Width="46px" Height="24px"></asp:TextBox>
|
<asp:TextBox ID="TxtCantidadRem" runat="server" style="text-align:right;" Text='<%#Eval("Cantidad", "{0:#,###.#####}").ToString%>' MaxLength="12" Width="46px" Height="24px"></asp:TextBox>
|
||||||
<asp:RangeValidator ID="RVCantRem" runat="server" Type="Double" MinimumValue="0" MaximumValue='<%#Eval("Cantidad").ToString%>' ErrorMessage="Cantidad Excedida" ControlToValidate="TxtCantidadRem" Display="None" ValidationGroup="GprGvRemPS"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVCantRem" runat="server" Type="Double" MinimumValue="0" MaximumValue='<%#Eval("Cantidad", "{0:####.#####}").ToString%>' ErrorMessage="Cantidad Excedida" ControlToValidate="TxtCantidadRem" ValidationGroup="GprGvRemPS" Display="Dynamic" SetFocusOnError="True"></asp:RangeValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECantidad3" runat="server" HighlightCssClass="vco" TargetControlID="RVCantRem" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCECantidad3" runat="server" HighlightCssClass="vco" TargetControlID="RVCantRem" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -2519,21 +2519,12 @@ Partial Class Ventas
|
|||||||
TrObsAlmacen.Visible = False
|
TrObsAlmacen.Visible = False
|
||||||
TrTxtObsAlmacen.Visible = False
|
TrTxtObsAlmacen.Visible = False
|
||||||
TrPedido.Visible = False
|
TrPedido.Visible = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TrOC.Visible = False
|
TrOC.Visible = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DdlTipoComprobante.SelectedValue = "Op"
|
DdlTipoComprobante.SelectedValue = "Op"
|
||||||
Else
|
Else
|
||||||
Opcion = "Ing"
|
Opcion = "Ing"
|
||||||
DdlTipoComprobante.SelectedValue = "Ing"
|
DdlTipoComprobante.SelectedValue = "Ing"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'DdlTipoComprobante.Attributes.Add("onChange", "ActivaReferencia(this)")
|
'DdlTipoComprobante.Attributes.Add("onChange", "ActivaReferencia(this)")
|
||||||
TxtFecha.Text = Now.ToShortDateString()
|
TxtFecha.Text = Now.ToShortDateString()
|
||||||
TxtFechaEjecucion.Text = Now.ToShortDateString
|
TxtFechaEjecucion.Text = Now.ToShortDateString
|
||||||
@@ -3804,13 +3795,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 13 Then
|
If UsuarioActual.CveEmpresa = 13 Then
|
||||||
DivEstimaciones.Visible = True
|
DivEstimaciones.Visible = True
|
||||||
GvEst.Visible = False
|
GvEst.Visible = False
|
||||||
ContratoDetalles.Visible = False
|
ContratoDetalles.Visible = False
|
||||||
GvContratoDetalles.Visible = True
|
GvContratoDetalles.Visible = True
|
||||||
|
|
||||||
BtnEstimacion.Visible = False
|
BtnEstimacion.Visible = False
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -3829,7 +3818,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaContratos()
|
Private Sub CargaContratos()
|
||||||
|
|
||||||
Dim DrContrato = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}")
|
Dim DrContrato As DataRow = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}")
|
||||||
If DrContrato Is Nothing Then
|
If DrContrato Is Nothing Then
|
||||||
Alert("Ocurrió un error al cargar la configuración del contrato. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al cargar la configuración del contrato. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -3843,11 +3832,6 @@ Partial Class Ventas
|
|||||||
EscontratoObra = False
|
EscontratoObra = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LbContratoImporteTotal.Text = DrContrato("ImporteTotal").ToString().FormatoNumero
|
LbContratoImporteTotal.Text = DrContrato("ImporteTotal").ToString().FormatoNumero
|
||||||
LbContratoImporteMinimo.Text = DrContrato("ImporteMin").ToString().FormatoNumero
|
LbContratoImporteMinimo.Text = DrContrato("ImporteMin").ToString().FormatoNumero
|
||||||
LbContratoImporteMaximo.Text = DrContrato("ImporteMax").ToString().FormatoNumero
|
LbContratoImporteMaximo.Text = DrContrato("ImporteMax").ToString().FormatoNumero
|
||||||
@@ -3947,14 +3931,14 @@ Partial Class Ventas
|
|||||||
For Each gvr As GridViewRow In GvContratoDetalles.Rows
|
For Each gvr As GridViewRow In GvContratoDetalles.Rows
|
||||||
gvr.FCTextBox("TxtCant").Enabled = False
|
gvr.FCTextBox("TxtCant").Enabled = False
|
||||||
Next
|
Next
|
||||||
Dim EsValido = True
|
Dim EsValido As Boolean = True
|
||||||
For Each Dr As DataRow In TmpDT.Rows
|
For Each Dr As DataRow In TmpDT.Rows
|
||||||
Dim CantidadActual = Dr("Cantidad").ToString().ToDouble
|
Dim CantidadActual As Decimal = Dr("Cantidad").ToString().ToDecimal
|
||||||
Dim CantidadDispo = 0.0
|
Dim CantidadDispo As Decimal = 0
|
||||||
Dim CantidadAsignada = 0.0
|
Dim CantidadAsignada As Decimal = 0
|
||||||
For Each gvr As GridViewRow In GvContratoDetalles.Rows
|
For Each gvr As GridViewRow In GvContratoDetalles.Rows
|
||||||
If gvr.DataKey("CvePS").ToEntero() = Dr("CvePS").ToString().ToEntero() Then
|
If gvr.DataKey("CvePS").ToEntero() = Dr("CvePS").ToString().ToEntero() Then
|
||||||
CantidadDispo = gvr.DataKey("Cantidad").ToString().ToDouble - gvr.FCTextBox("TxtCant").Text.ToDouble
|
CantidadDispo = gvr.DataKey("Cantidad").ToString().ToDecimal - gvr.FCTextBox("TxtCant").Text.ToDecimal
|
||||||
If CantidadDispo = 0 Then Continue For
|
If CantidadDispo = 0 Then Continue For
|
||||||
CantidadAsignada = If(CantidadDispo > CantidadActual, CantidadActual, CantidadDispo)
|
CantidadAsignada = If(CantidadDispo > CantidadActual, CantidadActual, CantidadDispo)
|
||||||
gvr.FCTextBox("TxtCant").Text = (gvr.FCTextBox("TxtCant").Text.ToDouble + CantidadAsignada).ToString()
|
gvr.FCTextBox("TxtCant").Text = (gvr.FCTextBox("TxtCant").Text.ToDouble + CantidadAsignada).ToString()
|
||||||
@@ -4075,7 +4059,7 @@ Partial Class Ventas
|
|||||||
AplicaGastoContrato = If(DrContrato("CveContratoTipo").ToString().Contiene("9", "10", "13"), True, False) 'Arrendamiento, Servicios De Impresion, Financiamiento
|
AplicaGastoContrato = If(DrContrato("CveContratoTipo").ToString().Contiene("9", "10", "13"), True, False) 'Arrendamiento, Servicios De Impresion, Financiamiento
|
||||||
|
|
||||||
'VALIDA IMPORTE DEL CONTRATO
|
'VALIDA IMPORTE DEL CONTRATO
|
||||||
Dim SeleccionadoContrato = 0.0 '(From row As GridViewRow In GvContratoDetalles.Rows.Cast(Of GridViewRow)() Select row.FCLabel("LtlTotal").Text.ToDecimal).Sum
|
Dim SeleccionadoContrato As Decimal = 0 '(From row As GridViewRow In GvContratoDetalles.Rows.Cast(Of GridViewRow)() Select row.FCLabel("LtlTotal").Text.ToDecimal).Sum
|
||||||
|
|
||||||
TmpDT.Clear()
|
TmpDT.Clear()
|
||||||
TxtSubTotal.Text = "0"
|
TxtSubTotal.Text = "0"
|
||||||
@@ -4089,7 +4073,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'VALIDA EXISTENCIAS DE ALMACÉN
|
'VALIDA EXISTENCIAS DE ALMACÉN
|
||||||
'Dim DrPS = GlobalDTProductosServicios(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("")
|
'Dim DrPS = GlobalDTProductosServicios(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("")
|
||||||
Dim DrPS = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("")
|
Dim DrPS As DataRow = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=Row.DataKey("CvePS").ToEntero()).FiltroPrimero("")
|
||||||
|
|
||||||
If DrPS IsNot Nothing Then
|
If DrPS IsNot Nothing Then
|
||||||
Dim CveTipoPS As Integer = DrPS("CveTipoPS").ToString().ToEntero()
|
Dim CveTipoPS As Integer = DrPS("CveTipoPS").ToString().ToEntero()
|
||||||
@@ -4106,7 +4090,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim ObsPlantilla As String = PlantillaContrato(Row.DataKey("Observaciones"))
|
Dim ObsPlantilla As String = PlantillaContrato(Row.DataKey("Observaciones"))
|
||||||
|
|
||||||
SeleccionadoContrato += Row.FCTextBox("TxtCant").Text.ToEntero() * Row.FCLiteral("LtlPU").Text.ToDouble
|
SeleccionadoContrato += Row.FCTextBox("TxtCant").Text.ToEntero() * Row.FCLiteral("LtlPU").Text.ToDecimal
|
||||||
AgregarProductoServicio(Row.FCTextBox("TxtCant").Text.ToEntero(), Row.DataKey("CveUM").ToEntero(), Row.FCLiteral("LtlUM").Text, Row.DataKey("CveClasificacion").ToEntero(),
|
AgregarProductoServicio(Row.FCTextBox("TxtCant").Text.ToEntero(), Row.DataKey("CveUM").ToEntero(), Row.FCLiteral("LtlUM").Text, Row.DataKey("CveClasificacion").ToEntero(),
|
||||||
Row.DataKey("Clasificacion"), Row.DataKey("CvePS").ToEntero(), Row.FCLiteral("LtlPS").Text, If(CveCicloComercial > 0, ObsPlantilla, $"/ {Row.FCLiteral("LtCveInterna").Text}"), Row.FCLiteral("LtlPU").Text.ToDecimal, 0,
|
Row.DataKey("Clasificacion"), Row.DataKey("CvePS").ToEntero(), Row.FCLiteral("LtlPS").Text, If(CveCicloComercial > 0, ObsPlantilla, $"/ {Row.FCLiteral("LtCveInterna").Text}"), Row.FCLiteral("LtlPU").Text.ToDecimal, 0,
|
||||||
DrContrato("CveProyecto").ToString().ToEntero(), DrContrato("ProyectoContrato").ToString(), DrContrato("CveSubProyecto").ToString().ToEntero(), DrContrato("SubProyectoContrato").ToString(), CveContratoDetalle:=Row.DataKey("CveContratoDetalle").ToEntero())
|
DrContrato("CveProyecto").ToString().ToEntero(), DrContrato("ProyectoContrato").ToString(), DrContrato("CveSubProyecto").ToString().ToEntero(), DrContrato("SubProyectoContrato").ToString(), CveContratoDetalle:=Row.DataKey("CveContratoDetalle").ToEntero())
|
||||||
@@ -4211,7 +4195,7 @@ Partial Class Ventas
|
|||||||
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa, -1, -1, 1) Then
|
If ObjContratos.GetContratos(CveContrato, UsuarioActual.CveEmpresa, -1, -1, 1) Then
|
||||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
Dim CveContratoTipo = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
Dim CveContratoTipo As Integer = ObjContratos.DtResultados.Rows(0)("CveContratoTipo").ToString.ToEntero
|
||||||
|
|
||||||
'Cargamos los datos del Cliente
|
'Cargamos los datos del Cliente
|
||||||
DtContratos = ObjContratos.DtResultados
|
DtContratos = ObjContratos.DtResultados
|
||||||
@@ -4276,7 +4260,7 @@ Partial Class Ventas
|
|||||||
RequiereAlmacenOrigen = True
|
RequiereAlmacenOrigen = True
|
||||||
|
|
||||||
If CveContratoTipo.Contiene(7, 9, 13, 21, 27) Then
|
If CveContratoTipo.Contiene(7, 9, 13, 21, 27) Then
|
||||||
Dim CveTipoAlmacenOrigen = "12,15"
|
Dim CveTipoAlmacenOrigen As String = "12,15"
|
||||||
If CveContratoTipo.Contiene(27) Then
|
If CveContratoTipo.Contiene(27) Then
|
||||||
CveTipoAlmacenOrigen = "1"
|
CveTipoAlmacenOrigen = "1"
|
||||||
End If
|
End If
|
||||||
@@ -4350,7 +4334,7 @@ Partial Class Ventas
|
|||||||
Private Sub GvContratoDetalles_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratoDetalles.RowDataBound
|
Private Sub GvContratoDetalles_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvContratoDetalles.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
Dim CantidadDisponible = If(e.Row.DBCampo("Cantidad").ToDouble < 0, "0", e.Row.DBCampo("Cantidad"))
|
Dim CantidadDisponible As String = If(e.Row.DBCampo("Cantidad").ToDouble < 0, "0", e.Row.DBCampo("Cantidad"))
|
||||||
e.Row.FCLiteral("LtlCantDisp").Text = CantidadDisponible
|
e.Row.FCLiteral("LtlCantDisp").Text = CantidadDisponible
|
||||||
|
|
||||||
If CveCicloComercial > 0 Then 'Si es un Ciclo Comercial quitamos el límite de CantidadDisponible
|
If CveCicloComercial > 0 Then 'Si es un Ciclo Comercial quitamos el límite de CantidadDisponible
|
||||||
@@ -4403,7 +4387,7 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DrContrato = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}")
|
Dim DrContrato As DataRow = DtContratos.FiltroPrimero($"CveContrato = {DdlContratosModal.SelectedValue}")
|
||||||
If DrContrato Is Nothing Then
|
If DrContrato Is Nothing Then
|
||||||
Alert("Ocurrió un error al cargar la configuración del contrato. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al cargar la configuración del contrato. Por favor vuelva a intentar", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -5040,7 +5024,7 @@ Partial Class Ventas
|
|||||||
If Not HplSaldoAuxiliar.Text.ToDouble > 0 Then
|
If Not HplSaldoAuxiliar.Text.ToDouble > 0 Then
|
||||||
HplSaldoAuxiliar.Visible = False
|
HplSaldoAuxiliar.Visible = False
|
||||||
HplPagado.Visible = True
|
HplPagado.Visible = True
|
||||||
Dim EsCancelado = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {CveEstatus}").ToEntero() = 5
|
Dim EsCancelado As Boolean = GlobalDTEstatusFactura().FiltroPrimeroValor("TipoEstatus", $"CveEstatusFactura = {CveEstatus}").ToEntero() = 5
|
||||||
If EsCancelado Then
|
If EsCancelado Then
|
||||||
HplPagado.Text = "<b>CANCELADO<b>"
|
HplPagado.Text = "<b>CANCELADO<b>"
|
||||||
End If
|
End If
|
||||||
@@ -5193,7 +5177,7 @@ Partial Class Ventas
|
|||||||
DdlTipoRetencion.Visible = True
|
DdlTipoRetencion.Visible = True
|
||||||
End If
|
End If
|
||||||
If TmpDT IsNot Nothing Then
|
If TmpDT IsNot Nothing Then
|
||||||
Dim PorcentajeRetIVA = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
Dim PorcentajeRetIVA As Decimal = (TmpDT.MAX("PorcentajeRetIVA").ToDecimal() * 100)
|
||||||
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
LblRetIVA.Text = PorcentajeRetIVA.FormatoNumero(2)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -5583,6 +5567,12 @@ Partial Class Ventas
|
|||||||
If TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
If TmpDT.SUM("CantidadFacturadaRem") < TmpDT.SUM("Cantidad") Then
|
||||||
BtnsFacturar.Visible = True
|
BtnsFacturar.Visible = True
|
||||||
|
|
||||||
|
'E119, bloquear la facturación de remisiones que no estén surtidas
|
||||||
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
If TmpDT.SUM("Cantidad") <> TmpDT.SUM("CantidadInventario") Then 'que ya esté surtida totalmente
|
||||||
|
BtnsFacturar.Visible = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
LBFacturarAnticipo.Visible = UsuarioActual.TienePermisoProceso(274)
|
||||||
|
|
||||||
'ACTIVA CONVERSION DE MONEDA
|
'ACTIVA CONVERSION DE MONEDA
|
||||||
@@ -6063,7 +6053,7 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.CveRol = 1 AndAlso CveMetodoPago = 1 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso TbDescuentosAdicionales.Visible Then
|
If UsuarioActual.CveRol = 1 AndAlso CveMetodoPago = 1 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso TbDescuentosAdicionales.Visible Then
|
||||||
If TmpDT.SUMD("Descuento") > 0 Then
|
If TmpDT.SUMD("Descuento") > 0 Then
|
||||||
Dim TotalDescuento As Decimal = TmpDT.SUMD("Total", "Descuento > 0") * 0.05D
|
Dim TotalDescuento As Decimal = TmpDT.SUMD("Total", "Descuento > 0") * 0.05D
|
||||||
Dim RowDescuentos = TmpDT.Select("Descuento > 0")
|
Dim RowDescuentos As DataRow() = TmpDT.Select("Descuento > 0")
|
||||||
|
|
||||||
If RowDescuentos IsNot Nothing Then
|
If RowDescuentos IsNot Nothing Then
|
||||||
LblDescuentoAdicional.Text = TotalDescuento.FormatoNumero(2)
|
LblDescuentoAdicional.Text = TotalDescuento.FormatoNumero(2)
|
||||||
@@ -6782,7 +6772,7 @@ Partial Class Ventas
|
|||||||
If RequiereOC Then
|
If RequiereOC Then
|
||||||
Dim Documentacion As String = ""
|
Dim Documentacion As String = ""
|
||||||
'RegistraScript("$('#DivDocsCliente').modal({ backdrop: 'static', keyboard: false });", "ModalArchivos")
|
'RegistraScript("$('#DivDocsCliente').modal({ backdrop: 'static', keyboard: false });", "ModalArchivos")
|
||||||
Dim Count = 0
|
Dim Count As Integer = 0
|
||||||
For Each GvRow As GridViewRow In GvDocumentosCliente.Rows
|
For Each GvRow As GridViewRow In GvDocumentosCliente.Rows
|
||||||
If GvRow.DataKey("Orden").ToEntero() = 1 Then
|
If GvRow.DataKey("Orden").ToEntero() = 1 Then
|
||||||
IndexDocumentoCliente = Count
|
IndexDocumentoCliente = Count
|
||||||
@@ -8361,7 +8351,7 @@ Partial Class Ventas
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing AndAlso ObjDescuento IsNot Nothing Then
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing AndAlso ObjDescuento IsNot Nothing Then
|
||||||
Dim ConsecEliminar As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
Dim ConsecEliminar As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
||||||
If ConsecEliminar > 0 Then
|
If ConsecEliminar > 0 Then
|
||||||
Dim descEliminar = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar)
|
Dim descEliminar As Modelos.VentaDescuentos = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar)
|
||||||
If descEliminar IsNot Nothing Then
|
If descEliminar IsNot Nothing Then
|
||||||
ListaDescuentos.Remove(descEliminar)
|
ListaDescuentos.Remove(descEliminar)
|
||||||
End If
|
End If
|
||||||
@@ -8519,9 +8509,9 @@ Partial Class Ventas
|
|||||||
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting
|
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing Then
|
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso ListaDescuentos IsNot Nothing Then
|
||||||
Dim ConsecEliminar = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
Dim ConsecEliminar As Integer = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
||||||
If ConsecEliminar > 0 Then
|
If ConsecEliminar > 0 Then
|
||||||
Dim descEliminar = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar)
|
Dim descEliminar As Modelos.VentaDescuentos = ListaDescuentos.FirstOrDefault(Function(x) x.Consec = ConsecEliminar)
|
||||||
If descEliminar IsNot Nothing Then
|
If descEliminar IsNot Nothing Then
|
||||||
ListaDescuentos.Remove(descEliminar)
|
ListaDescuentos.Remove(descEliminar)
|
||||||
End If
|
End If
|
||||||
@@ -8825,13 +8815,12 @@ Partial Class Ventas
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Dim EsPersonaMoral As Boolean = Me.TipoPersona
|
Dim EsPersonaMoral As Boolean = Me.TipoPersona
|
||||||
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}")
|
Dim DtUsosCFDI As DataTable = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {DdlUsoCFDI.SelectedValue}")
|
||||||
|
|
||||||
If DtUsosCFDI.Rows.Count = 0 Then
|
If DtUsosCFDI.Rows.Count = 0 Then
|
||||||
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
Alert("El Uso CFDI no corresponde con el tipo de persona (fisca, moral) y el régimen fiscal.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ValidaImportePublicoGeneral() Then
|
If Not ValidaImportePublicoGeneral() Then
|
||||||
@@ -9482,7 +9471,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
CreaObjetosVenta(TipoDoctoViejo:=TipoDoctoViejo)
|
CreaObjetosVenta(TipoDoctoViejo:=TipoDoctoViejo)
|
||||||
|
|
||||||
If ObjFactura Is Nothing Or (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then
|
If ObjFactura Is Nothing OrElse (ObjFactura.Cliente Is Nothing And Not CveEmpresaCRM > 0) Then
|
||||||
Alert("Ocurrió un error al procesar los datos de la Venta.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al procesar los datos de la Venta.", TipoMensaje.MsgError)
|
||||||
ObjFactura = Nothing
|
ObjFactura = Nothing
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -9565,22 +9554,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'VERIFICA QUE LA MONEDA DE LA LINEA ADICIONAL SEA LA MISMA QUE LA VENTA
|
|
||||||
'If Me.CveMonedaLineaAdicional <> ObjFactura.CveMoneda Then
|
|
||||||
' TmpDT = TmpDTError.Copy()
|
|
||||||
' CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
|
||||||
' Alert("La moneda de la linea adicional de crédito debe ser la misma que la factura.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
'Else
|
|
||||||
' If ObjFactura.TipoDocto = "Ing" AndAlso Me.SaldoIngresosLineaAdicional < ObjFactura.Total Then
|
|
||||||
' TmpDT = TmpDTError.Copy()
|
|
||||||
' CalculaTotalesVenta(RecalcularTotalOriginal:=False)
|
|
||||||
' Alert("El saldo de la linea adicional debe ser mayor o igual al de la factura", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
'VERIFICA QUE EL SALDO DISPONIBLE SEA MENOR AL IMPORTE
|
||||||
'If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional < ObjFactura.Total Then
|
'If ObjFactura.TipoDocto = "Rem" AndAlso Me.SaldoLineaAdicional < ObjFactura.Total Then
|
||||||
' TmpDT = TmpDTError.Copy()
|
' TmpDT = TmpDTError.Copy()
|
||||||
@@ -9598,16 +9571,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If Not CveEmpresaCRM > 0 Then
|
|
||||||
' If ObjFactura.Cliente.AplicaComercioExterior Then
|
|
||||||
' If Not ValidaComercioExterior() Then
|
|
||||||
' ObjFactura = Nothing
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
'VALIDA TOTAL DE LA NOTA DE CREDITO Y LA FACTURA VINCULADA *** ESTABA TRONANDO EN COMPU 11/01/17 ***
|
'VALIDA TOTAL DE LA NOTA DE CREDITO Y LA FACTURA VINCULADA *** ESTABA TRONANDO EN COMPU 11/01/17 ***
|
||||||
'If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
'If ObjFactura.TipoDocto.Contiene("Egs", "Dev") Then
|
||||||
' If SubTotalFacturaVinNC() > 0 Then 'pendiente
|
' If SubTotalFacturaVinNC() > 0 Then 'pendiente
|
||||||
@@ -9660,24 +9623,6 @@ Partial Class Ventas
|
|||||||
ErrorList = New List(Of String)
|
ErrorList = New List(Of String)
|
||||||
MensajeAlert = New StringBuilder
|
MensajeAlert = New StringBuilder
|
||||||
|
|
||||||
'VERIFICA QUE EL FOLIO NO SEA IGUAL AL DE LA FACTURA ANTERIOR
|
|
||||||
'If ObjFactura.Folio = TxtFolio.Text.ToEntero() Then
|
|
||||||
' If ObjFolios.GetFolios(ObjFactura.TipoDocto, UsuarioActual.CveEmpresa) Then
|
|
||||||
' Dim DtFolios As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSucursal = {0} And Estado = 'Activo'", ObjFactura.CveSucursal))
|
|
||||||
' If DtFolios.Rows.Count > 0 Then
|
|
||||||
' 'ViewState("CveFolio") = DtFolios.Rows(0)("CveFolio").ToString().ToEntero()
|
|
||||||
' 'ViewState("NumAprobacion") = CLng(DtFolios.Rows(0)("Aprobacion").ToString())
|
|
||||||
' 'ViewState("FechaAprobacion") = DtFolios.Rows(0)("FechaAprobacion").ToString().ToDate
|
|
||||||
' 'ViewState("FolioActual") = DtFolios.Rows(0)("FActual").ToString()
|
|
||||||
' 'LblSerie.Text = DtFolios.Rows(0)("Serie").ToString()
|
|
||||||
|
|
||||||
' If UsuarioActual.CveEmpresa <> 72 Then
|
|
||||||
' ObjFactura.Folio = DtFolios.Rows(0)("FActual").ToString().ToEntero()
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'GUARDA VENTA
|
'GUARDA VENTA
|
||||||
|
|
||||||
Dim TieneAnticipo As Boolean = False
|
Dim TieneAnticipo As Boolean = False
|
||||||
@@ -10058,6 +10003,9 @@ Partial Class Ventas
|
|||||||
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then
|
If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then
|
||||||
ObjVentas.Commit()
|
ObjVentas.Commit()
|
||||||
|
|
||||||
|
ObjFactura.DtDetalle = TmpDT 'actualiza por cambios de pedimentos.
|
||||||
|
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||||
|
|
||||||
'ENVIAR POLIZA VIRTUAL
|
'ENVIAR POLIZA VIRTUAL
|
||||||
If ErrorList.Count = 0 Then
|
If ErrorList.Count = 0 Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(576) = "1" AndAlso EsProduccion Then
|
If UsuarioActual.Empresa.Funcionalidad(576) = "1" AndAlso EsProduccion Then
|
||||||
@@ -10071,11 +10019,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Dim Titulo As String = "Solicitud de autorización" 'usuarios de crédito y cobranza
|
Dim Titulo As String = "Solicitud de autorización" 'usuarios de crédito y cobranza
|
||||||
Dim Msg As String = String.Format("{0} - Folio {1} ", DdlSubProyectoDatos.SelectedItem.Text, TxtFolio.Text)
|
Dim Msg As String = String.Format("{0} - Folio {1} ", DdlSubProyectoDatos.SelectedItem.Text, TxtFolio.Text)
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
'If UsuarioActual.CveEmpresa = 119 Then
|
||||||
ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1)
|
' ClsSisNotificaciones.SendNotificacionERP(1715, Titulo, Msg, 1)
|
||||||
ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1)
|
' ClsSisNotificaciones.SendNotificacionERP(1815, Titulo, Msg, 1)
|
||||||
ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1)
|
' ClsSisNotificaciones.SendNotificacionERP(1830, Titulo, Msg, 1)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -10187,7 +10135,7 @@ Partial Class Ventas
|
|||||||
NCGenerada.Timbre.CFDIRelacionados.UUID.Add(FolioFiscalFactura)
|
NCGenerada.Timbre.CFDIRelacionados.UUID.Add(FolioFiscalFactura)
|
||||||
|
|
||||||
Dim ObjTimbradoNC As New Timbrado
|
Dim ObjTimbradoNC As New Timbrado
|
||||||
Dim TimbroNC = ObjTimbradoNC.TimbrarFactura(UsuarioActual, NCGenerada)
|
Dim TimbroNC As Boolean = ObjTimbradoNC.TimbrarFactura(UsuarioActual, NCGenerada)
|
||||||
|
|
||||||
If Not TimbroNC Then
|
If Not TimbroNC Then
|
||||||
Alert(ObjTimbradoNC.MensajeErrorCFDI, TipoMensaje.MsgError)
|
Alert(ObjTimbradoNC.MensajeErrorCFDI, TipoMensaje.MsgError)
|
||||||
@@ -11315,9 +11263,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjFactura.Version = "4.0"
|
ObjFactura.Version = "4.0"
|
||||||
If ObjFactura.Cliente Is Nothing Then
|
If ObjFactura.Cliente Is Nothing Then ObjFactura.Cliente = New Modelos.ClienteModel
|
||||||
ObjFactura.Cliente = New Modelos.ClienteModel
|
|
||||||
End If
|
|
||||||
|
|
||||||
ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||||
ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||||
@@ -11334,7 +11280,6 @@ Partial Class Ventas
|
|||||||
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
|
ObjFactura.TipoDocto = If(IfNull(ViewState("CveRemision"), 0).ToString().ToEntero() > 0, "Ing", DdlTipoComprobante.SelectedValue)
|
||||||
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
|
ObjFactura.FacturarSucursal = (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso Not String.IsNullOrEmpty(Me.ClienteSucursal.RFC)))
|
||||||
ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS
|
ObjFactura.VentaDesglosaIEPS = Me.VentaDesglosaIEPS
|
||||||
'ObjFactura.RefDocto = TxtDocto.Text.Trim
|
|
||||||
|
|
||||||
If EsCreaApartirDe Then
|
If EsCreaApartirDe Then
|
||||||
ViewState("EstablecioFolio") = False
|
ViewState("EstablecioFolio") = False
|
||||||
@@ -11392,19 +11337,9 @@ Partial Class Ventas
|
|||||||
ObjFactura.UsuarioCreo = LblUsuario.Text.Trim
|
ObjFactura.UsuarioCreo = LblUsuario.Text.Trim
|
||||||
ObjFactura.CveCondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedValue.ToEntero(), -1)
|
ObjFactura.CveCondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedValue.ToEntero(), -1)
|
||||||
ObjFactura.CondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedItem.Text, "")
|
ObjFactura.CondicionEntrega = If(DdlFormaEntrega.SelectedItem IsNot Nothing, DdlFormaEntrega.SelectedItem.Text, "")
|
||||||
'ObjFactura.NumeroCuenta = TxtNumCtaPago.Text.Trim
|
|
||||||
'ObjFactura.Cliente.NumCtaPago = TxtNumCtaPago.Text.Trim
|
|
||||||
ObjFactura.CondicionesPago = If(RBLPago.SelectedValue = "2", 0, If(RBLPago.SelectedValue = "1", 1, 2)) ' 0 - Contado, 1 - Credito, 2 - termianl
|
ObjFactura.CondicionesPago = If(RBLPago.SelectedValue = "2", 0, If(RBLPago.SelectedValue = "1", 1, 2)) ' 0 - Contado, 1 - Credito, 2 - termianl
|
||||||
ObjFactura.FormaPago = 0 'DdlFormaPago.SelectedValue.ToEntero()
|
ObjFactura.FormaPago = 0 'DdlFormaPago.SelectedValue.ToEntero()
|
||||||
|
|
||||||
|
|
||||||
'ObjFactura.AnticipoPosicion = DdlAmortizacionConceptos.SelectedValue.ToEntero()
|
|
||||||
'ObjFactura.AnticipoEnSubTotal = If(ChkAnticipoEnSubTotal.Checked, True, False)
|
|
||||||
'ObjFactura.CveTipoRelacion = DdlTipoRelacion.SelectedValue.ToEntero()
|
|
||||||
|
|
||||||
|
|
||||||
'ObjFactura.SerieFolio = String.Format("{0}-{1}", LblSerie.Text, TxtFolio.Text)
|
|
||||||
'ObjFactura.PedidoContrato = TxtPedidoContrato.Text.Trim
|
|
||||||
ObjFactura.AtencionA = TxtAtencionA.Text
|
ObjFactura.AtencionA = TxtAtencionA.Text
|
||||||
ObjFactura.FordGSDB = ""
|
ObjFactura.FordGSDB = ""
|
||||||
|
|
||||||
@@ -11936,7 +11871,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCliente > 0 Then ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
' If CveCliente > 0 Then ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||||
|
|
||||||
'SI SE ESTA EDITANDO ACTUALIZA LOS IMPORTES DEL DT
|
'SI SE ESTA EDITANDO ACTUALIZA LOS IMPORTES DEL DT
|
||||||
If GvImpuestosLocales2.Visible AndAlso GvImpuestosLocales2.Enabled Then
|
If GvImpuestosLocales2.Visible AndAlso GvImpuestosLocales2.Enabled Then
|
||||||
@@ -12344,10 +12279,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||||
Dim Timbre As New CFDITimbre
|
Dim Timbre As New CFDITimbre
|
||||||
|
|
||||||
|
|
||||||
Timbre.Comprobante.Version = "4.0"
|
Timbre.Comprobante.Version = "4.0"
|
||||||
|
|
||||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
Timbre.Comprobante.Folio = Obj.Folio.ToString()
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
@@ -12389,25 +12321,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
|
Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
|
||||||
|
|
||||||
'If Timbre.Comprobante.TipoComprobante = "E" Then
|
|
||||||
' If Obj.TipoDocumento.Contiene("Nota de Crédito") Then
|
|
||||||
' Timbre.CFDIRelacionados.TipoRelacion = "01"
|
|
||||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "Nota de Crédito aplicada a Ingreso"
|
|
||||||
' End If
|
|
||||||
' If Obj.TipoDocumento.Contiene("Nota de Devolución") Then
|
|
||||||
' Timbre.CFDIRelacionados.TipoRelacion = "03"
|
|
||||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "Devolución aplicada a Ingreso"
|
|
||||||
' End If
|
|
||||||
' Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value)
|
|
||||||
'End If
|
|
||||||
'' cuando es refacturacoin es cfdirelacionado, con relacion 04
|
|
||||||
'If Timbre.Comprobante.TipoComprobante = "I" AndAlso NuevaFactura = 1 Then
|
|
||||||
' Timbre.CFDIRelacionados.TipoRelacion = "04"
|
|
||||||
' Timbre.CFDIRelacionados.TipoRelacionTexto = "Refacturación de Ingreso"
|
|
||||||
' Timbre.CFDIRelacionados.UUID.Add(HdnFolioFiscalNC.Value)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
'SI LA FACTURA VIENE DE SER CANCELADA SISTEMA CUANDO SE REFACTURO NO HAY QUE RELACIONAR
|
'SI LA FACTURA VIENE DE SER CANCELADA SISTEMA CUANDO SE REFACTURO NO HAY QUE RELACIONAR
|
||||||
If (CveEstatusFacturaPadre > 0 AndAlso CveEstatusFacturaPadre <> 4) OrElse (DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0) OrElse HdnFolioFiscalNC.Value.ToString() <> "" Then
|
If (CveEstatusFacturaPadre > 0 AndAlso CveEstatusFacturaPadre <> 4) OrElse (DtVentasNC IsNot Nothing AndAlso DtVentasNC.Rows.Count > 0) OrElse HdnFolioFiscalNC.Value.ToString() <> "" Then
|
||||||
@@ -12452,10 +12365,8 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI LAS FACTURAS SE RELACIONARAN MANUALMENTE SE AGREGAN
|
'SI LAS FACTURAS SE RELACIONARAN MANUALMENTE SE AGREGAN
|
||||||
@@ -12475,19 +12386,15 @@ Partial Class Ventas
|
|||||||
Timbre.CFDIRelacionados.UUID.Add(GvRow.DataKey("FolioFiscal").Replace("test", ""))
|
Timbre.CFDIRelacionados.UUID.Add(GvRow.DataKey("FolioFiscal").Replace("test", ""))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||||
Dim totIVA As Decimal = Obj.IVA
|
Dim totIVA As Decimal = Obj.IVA
|
||||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||||
Dim totRetISR As Decimal = Obj.RetISR
|
Dim totRetISR As Decimal = Obj.RetISR
|
||||||
|
|
||||||
Dim i As Integer = 1
|
Dim i As Integer = 1
|
||||||
|
Dim tPS As String
|
||||||
'detalles
|
'detalles
|
||||||
Dim tPS As String = ""
|
|
||||||
|
|
||||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||||
If drr("PS").ToString().Length = 1 Then
|
If drr("PS").ToString().Length = 1 Then
|
||||||
tPS = drr("Obs").ToString()
|
tPS = drr("Obs").ToString()
|
||||||
@@ -12520,7 +12427,8 @@ Partial Class Ventas
|
|||||||
.Noidentificacion = drr("Noidentificacion").ToString(),
|
.Noidentificacion = drr("Noidentificacion").ToString(),
|
||||||
.CuentaPredial = drr("CuentaPredial").ToString(),
|
.CuentaPredial = drr("CuentaPredial").ToString(),
|
||||||
.ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal,
|
.ImporteGravaIVAAdicional = drr("ImporteIEPS").ToString().ToDecimal,
|
||||||
.ObjetoImpuesto = drr("CodigoObjetoImpuesto").ToString()}
|
.ObjetoImpuesto = drr("CodigoObjetoImpuesto").ToString(),
|
||||||
|
.NumeroPedimento = drr("NumeroPedimento").ToString}
|
||||||
'verifica suma subtotales
|
'verifica suma subtotales
|
||||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales
|
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales
|
||||||
concepto.Importe = totSubTotal
|
concepto.Importe = totSubTotal
|
||||||
@@ -13768,8 +13676,6 @@ Partial Class Ventas
|
|||||||
Dim CveSubProyectoContabilizar As Integer
|
Dim CveSubProyectoContabilizar As Integer
|
||||||
Dim SeContabiliza As Boolean = True
|
Dim SeContabiliza As Boolean = True
|
||||||
|
|
||||||
Dim SimplificarPrePoliza As Boolean = False
|
|
||||||
|
|
||||||
If (UsuarioActual.Empresa.Funcionalidad(343) = "1" AndAlso ObjFactura.TipoDocto = "Ant") Or (ChkAntEspecial.Checked AndAlso ObjFactura.TipoDocto = "Ant") Then
|
If (UsuarioActual.Empresa.Funcionalidad(343) = "1" AndAlso ObjFactura.TipoDocto = "Ant") Or (ChkAntEspecial.Checked AndAlso ObjFactura.TipoDocto = "Ant") Then
|
||||||
SeContabiliza = False
|
SeContabiliza = False
|
||||||
End If
|
End If
|
||||||
@@ -14696,8 +14602,6 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SimplificarPrePoliza = True
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
'BANCOS
|
'BANCOS
|
||||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||||
@@ -14864,11 +14768,11 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Simplificacion de PrePolizas
|
'Simplificacion de PrePolizas
|
||||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") OrElse SimplificarPrePoliza Then
|
'If ObjFactura.TipoDocto.Contiene("Egs", "Dev") OrElse SimplificarPrePoliza Then
|
||||||
If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
' If Not ObjConta.PrePolizaSimplificacion(ObjFactura.CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
' Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
Dim ModalidadRefacturacion As Integer = UsuarioActual.Empresa.Funcionalidad(586).ToEntero()
|
||||||
|
|
||||||
@@ -15090,8 +14994,19 @@ Partial Class Ventas
|
|||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
ErrorList.Add("Ocurrió un error al guardar movimiento de almacen.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al guardar movimiento de almacen.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
End If
|
End If
|
||||||
'End If
|
|
||||||
|
|
||||||
|
'E119, verifica si la salida está con ps de importación para que se guarde el pedimento
|
||||||
|
If UsuarioActual.CveEmpresa = 119 AndAlso factura.TipoDocto.Contiene("Ing") Then
|
||||||
|
|
||||||
|
'If ObjInventario.GetVentasPedimento(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
|
' Dim dttped As DataTable = ObjInventario.DtResultados
|
||||||
|
|
||||||
|
' For Each drt As DataRow In dttped.FiltraParametros("NumeroPedimento <> ''").Rows
|
||||||
|
|
||||||
|
' ObjVentas.UpdateVentasDetalleNumeroPedimento(factura.CveVenta, drt("CveVentaDetalle").ToString.ToEntero, drt("NumeroPedimento").ToString)
|
||||||
|
' Next
|
||||||
|
'End If
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
ErrorList.Add("Ocurrió un error al consultar los movimientos de almacen.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
ErrorList.Add("Ocurrió un error al consultar los movimientos de almacen.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||||
@@ -15102,7 +15017,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'DEBE GENERAR MOVIMIENTO SI SE FACTURAON PRODUCTOS, O NO SE REALIZA UNA REFACTURACION
|
'DEBE GENERAR MOVIMIENTO SI SE FACTURARON PRODUCTOS, O NO SE REALIZA UNA REFACTURACION
|
||||||
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0 AndAlso (NuevaFactura <> 1)
|
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0 AndAlso (NuevaFactura <> 1)
|
||||||
'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN
|
'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN
|
||||||
If Not OcurrioError AndAlso DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
If Not OcurrioError AndAlso DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||||
@@ -15300,195 +15215,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Return ErrorPrepoliza
|
Return ErrorPrepoliza
|
||||||
End Function
|
End Function
|
||||||
'Private Function generaNC(ByRef ObjVentas As ClsVentas, ByRef ObjConta As ClsContabilidad, ByRef ObjInventario As ClsInventarios, ByRef ObjContr As ClsContratos, ByRef ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ByRef ObjBancos As ClsBancos, ByRef ObjEventos As ClsOIEventos) As List(Of Object)
|
|
||||||
' Dim Obj As New List(Of Object)
|
|
||||||
' Dim CveVentaNueva As Integer = ObjVentas.CveVenta
|
|
||||||
' Dim BanderaGeneraNC As Boolean = True
|
|
||||||
' 'If UsuarioActual.CveEmpresa.Contiene(1, 119) Then BanderaGeneraNC = True
|
|
||||||
|
|
||||||
' If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
|
||||||
' If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
|
||||||
' Dim drv As DataRow = ObjVentas.DtResultados.Rows(0)
|
|
||||||
' Dim TmpDTconceptos As DataTable = Nothing
|
|
||||||
' Dim CveNCaVincular As Integer = DdlNCFactura.SelectedValue.ToEntero()
|
|
||||||
' 'CargaCliente
|
|
||||||
' Dim CveCliente As Integer = drv("CveCliente").ToString().ToEntero()
|
|
||||||
' If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 AndAlso Not CveCliente.Contiene(10450, 10460, 10458) Then
|
|
||||||
' Return Nothing
|
|
||||||
' ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 AndAlso Not CveCliente.Contiene(27448) Then
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
' factura.TipoDocto = drv("TipoDocto").ToString()
|
|
||||||
' factura.Serie = drv("Serie").ToString()
|
|
||||||
' factura.FechaEjecucion = drv("FechaEjecucion").ToString().ToDateTime
|
|
||||||
' factura.Fecha = drv("Fecha").ToString().ToDateTime
|
|
||||||
' factura.CveSubProyectoEjecucion = drv("CveSubProyectoEjecucion").ToString().ToEntero()
|
|
||||||
' factura.CveSubProyectoCobranza = drv("CveSubProyectoCobranza").ToString().ToEntero()
|
|
||||||
' factura.CveClienteSucursal = drv("CveClienteSucursal").ToString().ToEntero()
|
|
||||||
' factura.CveSubProyecto = drv("CveSubProyecto").ToString().ToEntero()
|
|
||||||
|
|
||||||
' 'Carga Detalle Sucursal
|
|
||||||
' CargaClienteSucursal(drv("CveClienteSucursal").ToString().ToEntero(), ObjVentas)
|
|
||||||
|
|
||||||
' 'CargaDetalle
|
|
||||||
' If ObjVentas.GetVentaDetalle(CveVenta) Then
|
|
||||||
' TmpDTconceptos = ObjVentas.DtResultados
|
|
||||||
' TmpDTconceptos.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
|
||||||
' GvPS.DataSource = TmpDTconceptos
|
|
||||||
' GvPS.DataBind()
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'Carga Totales
|
|
||||||
' factura.SubTotal = drv("SubTotal").ToString().ToDecimal
|
|
||||||
' factura.Descuento = drv("Descuento").ToString().ToDecimal
|
|
||||||
' factura.Amortizacion = drv("Amortizacion").ToString().ToDecimal
|
|
||||||
' factura.IVA = drv("IVA").ToString().ToDecimal
|
|
||||||
' factura.RetIVA = drv("RetIVA").ToString().ToDecimal
|
|
||||||
' factura.RetISR = drv("RetISR").ToString().ToDecimal
|
|
||||||
' factura.Total = drv("Total").ToString().ToDecimal
|
|
||||||
' factura.MotivoDescuento = drv("MotivoDescuento").ToString()
|
|
||||||
' factura.Observaciones = drv("Observaciones").ToString()
|
|
||||||
' factura.CveMoneda = drv("CveMoneda").ToString().ToEntero()
|
|
||||||
' factura.TipoCambio = drv("TipoCambio").ToString().ToDecimal
|
|
||||||
' factura.CveVendedor = drv("CveVendedor").ToString().ToEntero()
|
|
||||||
' factura.RefDocto = drv("Ref").ToString()
|
|
||||||
' 'factura.SerieFolioPadre = drv("SerieFolio").ToString()
|
|
||||||
' HdnFolioFiscalNC.Value = drv("FolioFiscal").ToString()
|
|
||||||
|
|
||||||
' ViewState("FolioFiscal") = drv("FolioFiscal").ToString()
|
|
||||||
|
|
||||||
' 'JJMQ 20160506: Se agrego para la validacion de pago de contado.
|
|
||||||
' 'CVImporteContado.ValueToCompare = TxtTotal.Text.Replace(",", "")
|
|
||||||
|
|
||||||
' UpContado.Update()
|
|
||||||
' If factura.CveCliente > 0 Then
|
|
||||||
' If Not IsNothing(TmpDTconceptos) AndAlso TmpDTconceptos.Rows.Count > 0 Then
|
|
||||||
|
|
||||||
' If Not drv("Total").ToString().ToDecimal = factura.Total Then
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If FolioFiscal = "" Then
|
|
||||||
' CveEstatus = 4
|
|
||||||
' Else
|
|
||||||
' CveEstatus = 5
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' '[IPP] - CANCELA INVENTARIO DE VENTA NUEVA Y NO TRASPASA MOVTOS DE ALMACEN
|
|
||||||
' 'If UsuarioActual.CveEmpresa.Contiene(1) Then
|
|
||||||
' 'QUEMA DOCUMENTO NUEVO
|
|
||||||
' If Not ObjInventario.ActualizarEsDevolucionVenta(CveVentaNueva, 2) Then
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
' 'Else
|
|
||||||
' ' 'TRASPASA ALMACEN A DOCUMENTO NUEVO
|
|
||||||
' ' If Not CancelarMovimientoInventario(ObjInventario, ObjConta, CveVentaNueva, CveDevolucion) Then
|
|
||||||
' ' Return Nothing
|
|
||||||
' ' End If
|
|
||||||
' 'End If
|
|
||||||
|
|
||||||
' 'CANCELA PAGOS
|
|
||||||
' If ObjFacturaDevolucion.TipoDocto.Contiene("Ing", "Ant") Then
|
|
||||||
' If Not ObjConta.PrePolizasCancelarPagos(CveDevolucion, ObjFactura.CvePrePoliza) Then
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'CANCELA FACTURA
|
|
||||||
|
|
||||||
' BanderaGeneraNC = True
|
|
||||||
' '2019.05.10- RMF. se activa la bandera a true, para que siempre se cancele, y no genere la NC
|
|
||||||
|
|
||||||
' If Month(factura.Fecha) = Month(Now) OrElse BanderaGeneraNC = True Then
|
|
||||||
' If CancelarFactura(ObjVentas, ObjConta, ObjContPaq, ObjBancos) Then
|
|
||||||
' Obj.Add(factura)
|
|
||||||
' Else
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' ObjFacturaDevolucion.TipoDocto = "Egs"
|
|
||||||
' ObjFacturaDevolucion.Fecha = Now
|
|
||||||
' If RegistrarNC(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjContPaq, ObjFacturaDevolucion, ObjBancos, TmpDTconceptos, ObjEventos) Then
|
|
||||||
' Obj.Add(ObjFacturaDevolucion)
|
|
||||||
' Else
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' 'TRASPASA PAGADO
|
|
||||||
' If Not ObjConta.TraspasarSaldosPrePolizas(CveDevolucion, ObjFactura.CveVenta, ObjFactura.CvePrePoliza) Then
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not ObjInventario.TraspasaEntregaDirectaOCInv(ObjFactura.CveVenta, UsuarioActual.CveEmpresa) Then
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Obj.Count > 0 Then
|
|
||||||
' Return Obj
|
|
||||||
' Else
|
|
||||||
' Return Nothing
|
|
||||||
' End If
|
|
||||||
|
|
||||||
'End Function
|
|
||||||
'Private Function RegistrarNC(ObjVentas As ClsVentas, ObjConta As ClsContabilidad, ObjInventario As ClsInventarios, ObjContr As ClsContratos, ObjContPaq As ClsContPAQi, ByVal factura As Modelos.Factura, ObjBancos As ClsBancos, TmpDTconceptos As DataTable, ByRef ObjEventos As ClsOIEventos) As Boolean
|
|
||||||
' Dim ProcesoCorrecto As Boolean = True
|
|
||||||
' RefacturacionGeneroNC = True
|
|
||||||
|
|
||||||
' ''Generamos el nuevo folio
|
|
||||||
' 'Dim ObjFolios As New ClsGralFolios(ObjVentas.IniciaTransacSQL())
|
|
||||||
' 'If ObjFolios.GetFolios(factura.TipoDocto, UsuarioActual.CveEmpresa) Then
|
|
||||||
' ' Dim DT As DataTable = ObjFolios.DtResultados.FiltraParametros(String.Format(" CveSubProyecto = {0} And Estado = 'Activo'", DdlSubProyectoDatos.SelectedValue))
|
|
||||||
' ' If DT.Rows.Count > 0 Then
|
|
||||||
' ' factura.Folio = DT.Rows(0)("FActual").ToString().ToEntero()
|
|
||||||
' ' Else
|
|
||||||
' ' ProcesoCorrecto = False
|
|
||||||
' ' End If
|
|
||||||
' ' DT.Dispose()
|
|
||||||
' 'End If
|
|
||||||
' factura.Folio = -1
|
|
||||||
|
|
||||||
' 'Registramos la venta
|
|
||||||
' GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, factura, TmpDTconceptos, -1, ObjContPaq, ObjBancos)
|
|
||||||
' 'CargaNCDT(factura.CveVentaPadre, factura.Total)
|
|
||||||
|
|
||||||
' 'ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion)
|
|
||||||
' ''Timbramos
|
|
||||||
' 'If factura.TipoDocto.Contiene("Ing", "Egs", "Ant") AndAlso FolioFiscal <> "" Then
|
|
||||||
' ' If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
|
|
||||||
|
|
||||||
' ' Dim sw As New Diagnostics.Stopwatch
|
|
||||||
' ' sw.Start()
|
|
||||||
|
|
||||||
' ' 'FACTURA INGRESO/EGRESO
|
|
||||||
' ' Dim ObjTimbrado As New Modelos.Timbrado
|
|
||||||
' ' Dim FM As New Modelos.FemsaFactura
|
|
||||||
' ' Dim TmpDT7Eleven As New DataTable
|
|
||||||
' ' Dim TmpDTComplementosTimbrado As New DataTable
|
|
||||||
|
|
||||||
' ' PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
|
||||||
|
|
||||||
' ' ObjTimbrado.TimbrarFactura(UsuarioActual, factura, FM, TmpDT, TmpDTImpuestos, TmpDT7Eleven, TmpDTComplementosTimbrado, Ruta, LstFordASN, TxtFordGSDB.Text, ObjVentas)
|
|
||||||
|
|
||||||
' ' sw.Stop()
|
|
||||||
' ' GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString(), UsuarioActual.Empresa.CvePAC)
|
|
||||||
|
|
||||||
' ' ElseIf UsuarioActual.Empresa.TipoFacturacion = "CBB" Then
|
|
||||||
' ' GeneraPDFCBB(ObjFactura.Fecha, Nothing, ObjFactura.SerieFolio, False)
|
|
||||||
' ' End If
|
|
||||||
' 'End If
|
|
||||||
|
|
||||||
' If ErrorList.Count > 0 Then
|
|
||||||
' ProcesoCorrecto = False
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Return ProcesoCorrecto
|
|
||||||
'End Function
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " VISTA PREVIA NEW "
|
#Region " VISTA PREVIA NEW "
|
||||||
@@ -15921,7 +15648,6 @@ Partial Class Ventas
|
|||||||
Dim ContaIdPoliza As Integer = 0
|
Dim ContaIdPoliza As Integer = 0
|
||||||
'Dim ConceptoAmortizacion As Integer = 0
|
'Dim ConceptoAmortizacion As Integer = 0
|
||||||
'Dim UsaComplementariaClientes As Boolean = True
|
'Dim UsaComplementariaClientes As Boolean = True
|
||||||
Dim SimplificaPrePoliza As Boolean = True
|
|
||||||
|
|
||||||
''[IPP] PARCHE TEMPORAL PARA ANTICIPOS DE JAM
|
''[IPP] PARCHE TEMPORAL PARA ANTICIPOS DE JAM
|
||||||
'If FechaMaxima < "01/01/2018".ToDate And UsuarioActual.CveEmpresa = 119 Then
|
'If FechaMaxima < "01/01/2018".ToDate And UsuarioActual.CveEmpresa = 119 Then
|
||||||
@@ -16050,7 +15776,6 @@ Partial Class Ventas
|
|||||||
'Pago.CveConceptoPago = 251
|
'Pago.CveConceptoPago = 251
|
||||||
|
|
||||||
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||||
SimplificaPrePoliza = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case "66"
|
Case "66"
|
||||||
@@ -16084,12 +15809,9 @@ Partial Class Ventas
|
|||||||
'Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
'Pago.CveVentaAmortizacion = gvr.DataKey("CveVenta").ToEntero()
|
||||||
'Pago.Referencia = gvr.DataKey("Folio")
|
'Pago.Referencia = gvr.DataKey("Folio")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'importeMovimiento = ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / TxtTotal.Text.ToDecimal) * TxtIVA.Text.ToDecimal)
|
'importeMovimiento = ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / TxtTotal.Text.ToDecimal) * TxtIVA.Text.ToDecimal)
|
||||||
'importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
|
'importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
|
||||||
|
|
||||||
|
|
||||||
''Agregamos el 92
|
''Agregamos el 92
|
||||||
'importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal 'gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo" & gvr.RowIndex).ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
'importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal 'gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo" & gvr.RowIndex).ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
||||||
'importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
|
'importeMN = Math.Round(importeMovimiento * tipoCambioPago, 2, MidpointRounding.AwayFromZero)
|
||||||
@@ -16104,10 +15826,6 @@ Partial Class Ventas
|
|||||||
ErrorConta = True
|
ErrorConta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorConta AndAlso SimplificaPrePoliza AndAlso Not ObjConta.PrePolizaSimplificacion(CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
Alert("No se pudo simplificar los movimientos", TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
|
|
||||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
|
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 3) Then
|
||||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||||
GuardaLogAD($"Ventas/Ventas-Anticipos | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
GuardaLogAD($"Ventas/Ventas-Anticipos | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||||
@@ -16403,6 +16121,7 @@ Partial Class Ventas
|
|||||||
CreaObjetosVenta()
|
CreaObjetosVenta()
|
||||||
|
|
||||||
'PARA CUANDO YA ESTA GUARDADA LA VENTA
|
'PARA CUANDO YA ESTA GUARDADA LA VENTA
|
||||||
|
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||||
ObjFactura.CveVenta = CveVenta
|
ObjFactura.CveVenta = CveVenta
|
||||||
ObjFactura.Serie = Serie
|
ObjFactura.Serie = Serie
|
||||||
ObjFactura.Folio = Folio
|
ObjFactura.Folio = Folio
|
||||||
@@ -18851,6 +18570,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
|
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
|
||||||
TmpDT.Columns("NumTurnos").DefaultValue = 0
|
TmpDT.Columns("NumTurnos").DefaultValue = 0
|
||||||
|
TmpDT.Columns.Add("NumeroPedimento", GetType(String))
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CreaDTmpC()
|
Private Sub CreaDTmpC()
|
||||||
@@ -20164,15 +19884,6 @@ Partial Class Ventas
|
|||||||
Optional CveAlmacenDestino As Integer = -1) As Integer
|
Optional CveAlmacenDestino As Integer = -1) As Integer
|
||||||
Dim OcurrioError As Boolean = False
|
Dim OcurrioError As Boolean = False
|
||||||
Dim ContadorMovtosDetalles As Integer = 0
|
Dim ContadorMovtosDetalles As Integer = 0
|
||||||
|
|
||||||
'If Not AplicaMovimientoDetalleEntrada Then
|
|
||||||
' Dim rowa As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveAlmacen={0}", CveAlmacen))
|
|
||||||
' If Not IsNothing(rowa) AndAlso rowa("CveTipoAlmacen").ToString() = "10" Then
|
|
||||||
' AplicaMovimientoDetalleEntrada = True
|
|
||||||
' End If
|
|
||||||
'End If
|
|
||||||
'Creamos el movimiento
|
|
||||||
|
|
||||||
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
Dim CveMovimientoInventario As Integer = ObjInventario.AddMovimiento(CveAlmacen, ConceptoEntrada, CveMoneda, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVenta, -1, -1,
|
||||||
CveMovimientoRelacionado:=CveMovimientoRelacionado, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Vta/E4")
|
CveMovimientoRelacionado:=CveMovimientoRelacionado, CveAlmacenDestino:=CveAlmacenDestino, Modulo:="Vta/E4")
|
||||||
|
|
||||||
@@ -20208,21 +19919,6 @@ Partial Class Ventas
|
|||||||
CveVentaDetalleRemision = MovDet("CveVentaDetalle").ToString().ToEntero()
|
CveVentaDetalleRemision = MovDet("CveVentaDetalle").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If ConceptoEntrada = 3 Then
|
|
||||||
' CveVentaDetalle = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero()
|
|
||||||
'ElseIf ConceptoEntrada = 40 Then
|
|
||||||
' CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero()
|
|
||||||
' CveVentaDetallePadre = TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero()
|
|
||||||
' 'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
|
|
||||||
' If CveVentaDetallePadre < 0 Then
|
|
||||||
' Alert("no se encontro la venta detalle nueva. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
|
|
||||||
' OcurrioError = True
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
'Else
|
|
||||||
' CveVentaDetalle = MovDet("CveVentaDetalle").ToString().ToEntero()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
|
'CUANDO LA VENTADETALLE NO TENGA VALOR DEBE MARCAR ERROR, NUEVA RESTRICCION DE ALMACEN
|
||||||
If CveVentaDetalle < 0 Then
|
If CveVentaDetalle < 0 Then
|
||||||
Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
|
Alert("no se encontro la venta detalle. Por favor comuniquese con atención SIG.", TipoMensaje.ToastError)
|
||||||
@@ -20311,10 +20007,23 @@ Partial Class Ventas
|
|||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not OcurrioError AndAlso UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
If ObjInventario.GetVentasPedimento(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim dttped As DataTable = ObjInventario.DtResultados
|
||||||
|
|
||||||
|
For Each drt As DataRow In dttped.FiltraParametros("Pedimento <> ''").Rows
|
||||||
|
ObjInventario.UpdateVentasDetalleNumeroPedimento(CveVenta, drt("CveVentaDetalle").ToString.ToEntero, drt("Pedimento").ToString)
|
||||||
|
Dim dtr As DataRow() = TmpDT.Select($"CveVentaDetalle ={drt("CveVentaDetalle")}")
|
||||||
|
If dtr IsNot Nothing Then 'actualizamos los datos temporales para timbrar
|
||||||
|
dtr(0)("NumeroPedimento") = drt("Pedimento").ToString
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -27327,7 +27036,6 @@ Partial Class Ventas
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'VERIFICA SI TIENE BONIFICACIONES PARA AGREGARLAS
|
'VERIFICA SI TIENE BONIFICACIONES PARA AGREGARLAS
|
||||||
@@ -27499,7 +27207,7 @@ Partial Class Ventas
|
|||||||
If AplicarRNC Then
|
If AplicarRNC Then
|
||||||
TmpDTRNCBonificacionesSeleccionadas.Rows.Add(RowBonificacion.ItemArray)
|
TmpDTRNCBonificacionesSeleccionadas.Rows.Add(RowBonificacion.ItemArray)
|
||||||
Else
|
Else
|
||||||
For Each RowEliminar In Me.TmpDTRNCBonificacionesSeleccionadas.Select(SbFiltro.ToString())
|
For Each RowEliminar As DataRow In Me.TmpDTRNCBonificacionesSeleccionadas.Select(SbFiltro.ToString())
|
||||||
RowEliminar.Delete()
|
RowEliminar.Delete()
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -27825,13 +27533,13 @@ Partial Class Ventas
|
|||||||
If Not AplicaNuevoDocumento Then
|
If Not AplicaNuevoDocumento Then
|
||||||
If AplicaNCMasiva Then
|
If AplicaNCMasiva Then
|
||||||
If NCDescuento Then
|
If NCDescuento Then
|
||||||
For Each RNC In ListaNCDesc
|
For Each RNC As Modelos.Factura In ListaNCDesc
|
||||||
DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
'SI HAY RNC DE BONIFICACION SE AGREGAN
|
'SI HAY RNC DE BONIFICACION SE AGREGAN
|
||||||
If ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0 Then
|
If ListaNCBonificacion IsNot Nothing AndAlso ListaNCBonificacion.Count > 0 Then
|
||||||
For Each RNC In ListaNCBonificacion
|
For Each RNC As Modelos.Factura In ListaNCBonificacion
|
||||||
DtImpuestosBonificacion.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
DtImpuestosBonificacion.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero()), True, MissingSchemaAction.Ignore)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -27874,13 +27582,13 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If ListaRemisionesNC IsNot Nothing Then
|
If ListaRemisionesNC IsNot Nothing Then
|
||||||
For Each RNC In ListaRemisionesNC
|
For Each RNC As Modelos.Factura In ListaRemisionesNC
|
||||||
DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero(), AplicaNCUsado:=(UsuarioActual.CveEmpresa = 140)), True, MissingSchemaAction.Ignore)
|
DtImpuestos.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero(), AplicaNCUsado:=(UsuarioActual.CveEmpresa = 140)), True, MissingSchemaAction.Ignore)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ListaNCBonificacion IsNot Nothing Then
|
If ListaNCBonificacion IsNot Nothing Then
|
||||||
For Each RNC In ListaNCBonificacion
|
For Each RNC As Modelos.Factura In ListaNCBonificacion
|
||||||
DtImpuestosBonificacion.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero(), AplicaNCUsado:=(UsuarioActual.CveEmpresa = 140)), True, MissingSchemaAction.Ignore)
|
DtImpuestosBonificacion.Merge(CargaDtImpuestosNC(RNC.CveVenta, RNC.TotalRemNCAplicado, NCDescuento:=True, AplicaImpuestosLocales:=AplicaImpuestosLocales, NivelTotal:=DdlNCNivelImporte.SelectedValue.ToEntero(), AplicaNCUsado:=(UsuarioActual.CveEmpresa = 140)), True, MissingSchemaAction.Ignore)
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -29168,7 +28876,7 @@ Partial Class Ventas
|
|||||||
Dim PU As Decimal = If(AplicaPUEditado, Gv.FCTextBox("TxtPrecioEditado").Text.ToDecimal, Gv.DataKey("PU").ToDecimal)
|
Dim PU As Decimal = If(AplicaPUEditado, Gv.FCTextBox("TxtPrecioEditado").Text.ToDecimal, Gv.DataKey("PU").ToDecimal)
|
||||||
Dim Total As Decimal = (Cantidad * PU)
|
Dim Total As Decimal = (Cantidad * PU)
|
||||||
Dim TotalImpuestos As Decimal = (Cantidad * PU) - Descuento
|
Dim TotalImpuestos As Decimal = (Cantidad * PU) - Descuento
|
||||||
Dim TotalCalculableImpuestosIVA = TotalImpuestos * (1 + Gv.DataKey("PorcentajeIEPS").ToString().ToDecimal)
|
Dim TotalCalculableImpuestosIVA As Decimal = TotalImpuestos * (1 + Gv.DataKey("PorcentajeIEPS").ToString().ToDecimal)
|
||||||
Dim ImporteIVA As Decimal = TotalCalculableImpuestosIVA * Gv.DataKey("PorcentajeIVA").ToString().ToDecimal
|
Dim ImporteIVA As Decimal = TotalCalculableImpuestosIVA * Gv.DataKey("PorcentajeIVA").ToString().ToDecimal
|
||||||
Dim ImporteRetIVA As Decimal = TotalImpuestos * Gv.DataKey("PorcentajeRetIVA").ToString().ToDecimal
|
Dim ImporteRetIVA As Decimal = TotalImpuestos * Gv.DataKey("PorcentajeRetIVA").ToString().ToDecimal
|
||||||
Dim ImporteRetISR As Decimal = TotalImpuestos * Gv.DataKey("PorcentajeRetISR").ToString().ToDecimal
|
Dim ImporteRetISR As Decimal = TotalImpuestos * Gv.DataKey("PorcentajeRetISR").ToString().ToDecimal
|
||||||
@@ -32385,7 +32093,7 @@ Partial Class Ventas
|
|||||||
If GvRow.FCCheckBox("ChkAplicar").Checked AndAlso GvRow.DataKey("CveVenta").ToEntero() = Dr("CveVenta").ToString().ToEntero() Then
|
If GvRow.FCCheckBox("ChkAplicar").Checked AndAlso GvRow.DataKey("CveVenta").ToEntero() = Dr("CveVenta").ToString().ToEntero() Then
|
||||||
|
|
||||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidadRNC").Text.ToDecimal()
|
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidadRNC").Text.ToDecimal()
|
||||||
Dim PU = GvRow.DataKey("PU").ToDecimal()
|
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal()
|
||||||
Dim PorcentajeIVA As Decimal = GvRow.DataKey("PorcentajeIVA").ToDecimal()
|
Dim PorcentajeIVA As Decimal = GvRow.DataKey("PorcentajeIVA").ToDecimal()
|
||||||
|
|
||||||
Dim TotalCalculableImpuestos As Decimal = (Cantidad * PU)
|
Dim TotalCalculableImpuestos As Decimal = (Cantidad * PU)
|
||||||
@@ -32451,7 +32159,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'SI TIENE ALGUN AJUSTE O GARANTIA
|
'SI TIENE ALGUN AJUSTE O GARANTIA
|
||||||
If ListaRemisionesNC.Any(Function(RNC) RNC.Num2 = 1) Then
|
If ListaRemisionesNC.Any(Function(RNC) RNC.Num2 = 1) Then
|
||||||
For Each RNC In ListaRemisionesNC.Where(Function(x) x.Num2 = 1)
|
For Each RNC As Modelos.Factura In ListaRemisionesNC.Where(Function(x) x.Num2 = 1)
|
||||||
Dim Salir As Boolean = False
|
Dim Salir As Boolean = False
|
||||||
|
|
||||||
Using ObjAcum As New ClsAcumuladores
|
Using ObjAcum As New ClsAcumuladores
|
||||||
@@ -32514,8 +32222,6 @@ Partial Class Ventas
|
|||||||
Dim TotalRNCDetalle As Decimal = (TotalCalculableImpuestos + ImporteIVA)
|
Dim TotalRNCDetalle As Decimal = (TotalCalculableImpuestos + ImporteIVA)
|
||||||
|
|
||||||
TotalRNC += TotalRNCDetalle
|
TotalRNC += TotalRNCDetalle
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -32660,7 +32366,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
TmpDTRNCDetalleSelecciondas.Rows.Add(row.ItemArray)
|
TmpDTRNCDetalleSelecciondas.Rows.Add(row.ItemArray)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -33250,11 +32955,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
GvPS.DataSource = TmpDT
|
GvPS.DataSource = TmpDT
|
||||||
GvPS.DataBind()
|
GvPS.DataBind()
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
|
|
||||||
@@ -33719,16 +33420,9 @@ Partial Class Ventas
|
|||||||
ObjFacturaProntoPago.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}")
|
ObjFacturaProntoPago.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", $"CveMoneda = {CveMoneda}")
|
||||||
ObjFacturaProntoPago.Serie = Serie
|
ObjFacturaProntoPago.Serie = Serie
|
||||||
ObjFacturaProntoPago.Folio = Folio
|
ObjFacturaProntoPago.Folio = Folio
|
||||||
ObjFacturaProntoPago.Fecha = Now
|
|
||||||
ObjFacturaProntoPago.CvePrePoliza = -1
|
|
||||||
ObjFacturaProntoPago.CveMetodoPago = 0
|
|
||||||
ObjFacturaProntoPago.CondicionesPago = 0 ' 0 - Contado, 1 - Credito (CHECAR)
|
|
||||||
ObjFacturaProntoPago.FormaPago = 0
|
|
||||||
|
|
||||||
ObjFacturaProntoPago.TipoDocto = "Egs"
|
ObjFacturaProntoPago.TipoDocto = "Egs"
|
||||||
ObjFacturaProntoPago.Fecha = Now
|
ObjFacturaProntoPago.Fecha = Now
|
||||||
|
|
||||||
|
|
||||||
ObjFacturaProntoPago.Version = "4.0"
|
ObjFacturaProntoPago.Version = "4.0"
|
||||||
|
|
||||||
If ObjFacturaProntoPago.Cliente Is Nothing Then
|
If ObjFacturaProntoPago.Cliente Is Nothing Then
|
||||||
@@ -33751,8 +33445,6 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ObjFacturaProntoPago.CveCliente = CveCliente
|
ObjFacturaProntoPago.CveCliente = CveCliente
|
||||||
ObjFacturaProntoPago.SetCliente()
|
ObjFacturaProntoPago.SetCliente()
|
||||||
|
|
||||||
|
|
||||||
If ObjCliente.GetClientes(ObjFacturaProntoPago.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
If ObjCliente.GetClientes(ObjFacturaProntoPago.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
||||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
@@ -33796,16 +33488,6 @@ Partial Class Ventas
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
ObjFacturaProntoPago.FechaPago = Now
|
ObjFacturaProntoPago.FechaPago = Now
|
||||||
|
|
||||||
ObjFacturaProntoPago.CveCorte = -1
|
|
||||||
'ObjFacturaProntoPago.CveMesa = -1
|
|
||||||
ObjFacturaProntoPago.NumeroPersonas = 0
|
|
||||||
ObjFacturaProntoPago.CveContrato = -1
|
|
||||||
ObjFacturaProntoPago.DescripcionContrato = ""
|
|
||||||
ObjFacturaProntoPago.CveClienteSucursal = -1
|
|
||||||
ObjFacturaProntoPago.Entrega = ""
|
|
||||||
ObjFacturaProntoPago.CveAlmacen = -1
|
|
||||||
|
|
||||||
Dim DtVentasNC As DataTable = InicializaDTVentasNCProntoPago()
|
Dim DtVentasNC As DataTable = InicializaDTVentasNCProntoPago()
|
||||||
|
|
||||||
Dim TotalImporte As Decimal = ObjFacturaProntoPago.DtDetalle.SUMD("TotalImporte")
|
Dim TotalImporte As Decimal = ObjFacturaProntoPago.DtDetalle.SUMD("TotalImporte")
|
||||||
@@ -34150,6 +33832,7 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
|
||||||
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
|
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
|
||||||
TmpDT.Columns("NumTurnos").DefaultValue = 0D
|
TmpDT.Columns("NumTurnos").DefaultValue = 0D
|
||||||
|
TmpDT.Columns.Add("NumeroPedimento", GetType(String))
|
||||||
|
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
@@ -35072,7 +34755,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
Dim CveSubProyecto As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||||
Dim CveProyecto = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProyecto", "").ToEntero()
|
Dim CveProyecto As Integer = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProyecto", "").ToEntero()
|
||||||
|
|
||||||
Dim Proyecto As String = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, CveProyecto, UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("Proyecto", "").ToString()
|
Dim Proyecto As String = GlobalDTProyectosUsuarios(UsuarioActual.CveUsuario, CveProyecto, UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("Proyecto", "").ToString()
|
||||||
|
|
||||||
@@ -35114,7 +34797,7 @@ Partial Class Ventas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs)
|
||||||
CreaObjetosVenta()
|
'CreaObjetosVenta()
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user