Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1898,7 +1898,7 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function RepNotasSinAlmacen(Opcion As Integer, CveClienteProveedor As Integer, FechaIni As Date, FechaFin As Date, TipoDocumento As String, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_RepNotasSinAlmacen")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -2213,7 +2213,7 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetExistenciasPSXML(XML As String, CveAlmacen As Integer, Fecha As String, CveSubProyecto As Integer, CveVendedor As Integer, CveCliente As Integer, ExcluyeApartados As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno = False
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If Fecha = "-1" Then
|
||||
Fecha = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd"))
|
||||
@@ -3440,7 +3440,7 @@ Public Class ClsInventarios
|
||||
End Function
|
||||
|
||||
Public Function VentaDetallePadreGet(CveVentaDetallePadre As Integer) As Integer
|
||||
Dim Retorno = -1
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Inv_VentaDetallePadreGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVentaDetallePadre", SqlDbType.Int).Value = CveVentaDetallePadre
|
||||
@@ -3455,7 +3455,7 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetPendietePorSurtirVenta(CvePS As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional Tipo As Integer = -1) As Boolean
|
||||
Public Function GetPendientePorSurtirVenta(CvePS As Integer, CveEmpresa As Integer, Optional CveSubProyecto As Integer = -1, Optional CveUsuarioConsulta As Integer = -1, Optional Tipo As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_VentasPendientesPorSurtirGet")
|
||||
@@ -4387,7 +4387,7 @@ Public Class ClsInventarios
|
||||
#Region " INVENTARIOS - SOLICITUD DE TRASPASOS "
|
||||
Public Function AddTrasladoSolicitud(Observaciones As String, CveAlmacenOrigen As Integer, CveAlmacenDestino As Integer, CveTrasladoEstatus As Integer, CveMovimientoAlmacen As Integer, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
|
||||
Optional CveContrato As Integer = -1, Optional Guia As String = "", Optional CvePaqueteria As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional CveOS As Integer = -1, Optional EstatusAlmacen As Integer = -1) As Integer
|
||||
Dim Retorno = -1
|
||||
Dim Retorno As Integer = -1
|
||||
DataAdapter("PA_Inv_TraspasoSolicitudAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -5985,12 +5985,13 @@ Public Class ClsInventarios
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetJAM_APIs(Optional Opcion As Integer = 1) As Boolean
|
||||
Public Function GetJAM_APIs(Optional Opcion As Integer = 1, Optional CveClasificacion As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dataset = New DataSet()
|
||||
DataAdapter("PA_JAM_APIs")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -6063,6 +6064,45 @@ Public Class ClsInventarios
|
||||
Return Retorno
|
||||
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 "
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
@@ -7521,7 +7521,7 @@ Public Class ClsPaginas
|
||||
'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
|
||||
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
|
||||
'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
|
||||
@@ -7533,7 +7533,7 @@ Public Class ClsPaginas
|
||||
'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
|
||||
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
|
||||
'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
|
||||
|
||||
@@ -423,6 +423,7 @@ Public Class ClsSisEmpresas
|
||||
_Empresa.DiasPermitidos = Data.Rows(0)("DiasPermitidos").ToString.ToEntero
|
||||
_Empresa.TipoContabilizacion = Data.Rows(0)("Conta_TipoContabilizacion").ToString.ToEntero
|
||||
_Empresa.TipoContabilidad = Data.Rows(0)("Conta_TipoContabilidad").ToString.ToEntero '0 - Sin Conta, 1- Contabilidad SIG, 2- Contabilidad Contpaq
|
||||
_Empresa.ContaFormatoCuenta = Data.Rows(0)("Conta_FormatoCuenta").ToString
|
||||
_Empresa.DefaultAsistencias = If(Data.Rows(0)("RH_DefaultAsistencias").ToString = "", False, CBool(Data.Rows(0)("RH_DefaultAsistencias").ToString))
|
||||
_Empresa.CIEC = Data.Rows(0)("CIEC").ToString
|
||||
_Empresa.Localidad = Data.Rows(0)("Localidad").ToString
|
||||
|
||||
@@ -1476,11 +1476,14 @@ Public Class ClsVentas
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
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
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "V E N T A - P R E S U P U E S T O"
|
||||
|
||||
@@ -97,6 +97,7 @@ Public Class Empresa
|
||||
Public Property Soporte_Tipo As String
|
||||
Public Property Timbres As Integer
|
||||
Public Property _RutaArchivos As String
|
||||
Public Property ContaFormatoCuenta As String
|
||||
|
||||
Public ReadOnly Property Ruta As String
|
||||
Get
|
||||
|
||||
@@ -495,7 +495,7 @@ Namespace Modelos
|
||||
Timbre = New CFDITimbre
|
||||
End Sub
|
||||
Private Sub SetTotales(dtVentas As DataTable, ObjVentas As ClsVentas)
|
||||
Dim TmpDTImpuestos = New DataTable
|
||||
Dim TmpDTImpuestos As New DataTable
|
||||
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
||||
@@ -530,7 +530,7 @@ Namespace Modelos
|
||||
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
||||
If dtImpuesto.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In dtImpuesto.Rows
|
||||
Dim Orden = 80
|
||||
Dim Orden As Integer = 80
|
||||
If Row("Importe").ToString.ToDouble <> 0 Then
|
||||
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
||||
DR("Importe") = Row("Importe").ToString.ToDouble
|
||||
@@ -819,7 +819,7 @@ Namespace Modelos
|
||||
Dim ObjDocCliente As New ClsEdocumentacion(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjGeneral As New ClsGenerales(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjAcum As New ClsAcumuladores(ObjVentas.IniciaTransacSQL())
|
||||
Dim MensajeAlert = New StringBuilder
|
||||
Dim MensajeAlert As New StringBuilder
|
||||
|
||||
Try
|
||||
|
||||
@@ -1031,7 +1031,7 @@ Namespace Modelos
|
||||
|
||||
Dim SeTimbro As Boolean = False
|
||||
Dim SeTimbroNC As Boolean = False
|
||||
Dim EstatusSMS = 0
|
||||
Dim EstatusSMS As Integer = 0
|
||||
|
||||
'TIMBRADO Y CASO ESPECIAL NOTA DE CREDITO
|
||||
If (TipoDoctoDevolucion = "" OrElse Not TipoDoctoDevolucion.Contiene("Rem", "Cot", "Ped", "DPe", "PA", "Pd2")) Then
|
||||
@@ -1054,7 +1054,7 @@ Namespace Modelos
|
||||
'DOCUMENTO ACTUAL
|
||||
If DebeTimbrar Then
|
||||
If Me.EmitirCartaPorte AndAlso CveTimbreCartaPorte > 0 Then
|
||||
Dim RespCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorte, UsuarioActual)
|
||||
Dim RespCartaPorte As Timbres.MMensajeCartaPorte = Timbres.PreParaCartaPorteFactura(CveTimbreCartaPorte, UsuarioActual)
|
||||
If Not RespCartaPorte.TieneError Then
|
||||
Me.Timbre.Complementos.CartaPorte = RespCartaPorte.CartaPorte
|
||||
Else
|
||||
@@ -1129,7 +1129,7 @@ Namespace Modelos
|
||||
|
||||
' DESCARGA XML - SI SE TIMBRA MANDA CORREO CON FACTURA
|
||||
If SeTimbro Then
|
||||
Dim ArchivoXML = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, Me.TipoDocto, Me.SerieFolio)
|
||||
Dim ArchivoXML As String = String.Format("{0}/XML/{1}/{2}.xml", UsuarioActual.Empresa.Ruta, Me.TipoDocto, Me.SerieFolio)
|
||||
If File.Exists(ArchivoXML) Then
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", CveVenta, "XML", Me.SerieFolio, Me.TipoDocto)))
|
||||
End If
|
||||
@@ -1775,7 +1775,7 @@ Namespace Modelos
|
||||
tPS = tPS.Replace("|", " ")
|
||||
|
||||
If tPS.Length >= 1000 Then
|
||||
Dim tPSRecortado = tPS.Remove(999, tPS.Length - 999)
|
||||
Dim tPSRecortado As String = tPS.Remove(999, tPS.Length - 999)
|
||||
tPS = tPSRecortado
|
||||
End If
|
||||
|
||||
@@ -1840,14 +1840,14 @@ Namespace Modelos
|
||||
End Sub
|
||||
|
||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
||||
Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||
Dim Url As New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||
Dim File As Byte() = Nothing
|
||||
Try
|
||||
Using httpClient = New HttpClient()
|
||||
Using httpClient As New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
Using request As New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||
Dim response = httpClient.SendAsync(request).Result
|
||||
Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result
|
||||
If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then
|
||||
File = response.Content.ReadAsByteArrayAsync().Result
|
||||
End If
|
||||
@@ -2023,10 +2023,10 @@ Namespace Modelos
|
||||
|
||||
End Sub
|
||||
Private Function EnviarSMSTimbrado(ByRef ObjEventos As ClsOIEventos) As Integer
|
||||
Dim Mensaje = UsuarioActual.Empresa.Funcionalidad(152)
|
||||
Dim Mensaje As String = UsuarioActual.Empresa.Funcionalidad(152)
|
||||
If Mensaje = "" Then Return 0
|
||||
|
||||
Dim Celular = Me.Cliente.CobranzaTelefono
|
||||
Dim Celular As String = Me.Cliente.CobranzaTelefono
|
||||
If Celular.Length <> 10 Then Return 3
|
||||
|
||||
'ARMA MENSAJE
|
||||
@@ -2315,7 +2315,7 @@ Namespace Modelos
|
||||
|
||||
'BONIFICACION USADOS
|
||||
If UsadosBonificacion IsNot Nothing AndAlso UsadosBonificacion.Count > 0 AndAlso TipoBonificacion > 0 Then
|
||||
For Each CveMovto In UsadosBonificacion
|
||||
For Each CveMovto As Integer In UsadosBonificacion
|
||||
If Not ObjAcum.DistribuidorActualizarFacturados(CveMovto, UsuarioActual.CveEmpresa, TipoBonificacion, CveVenta) Then
|
||||
ErrorList.Add("Ocurrió un error al actualizar el distribuidor.")
|
||||
End If
|
||||
@@ -2765,7 +2765,7 @@ Namespace Modelos
|
||||
|
||||
End If
|
||||
|
||||
Dim Dr = DtVentasNC.NewRow
|
||||
Dim Dr As DataRow = DtVentasNC.NewRow
|
||||
Dr("CveVenta") = pCveVenta
|
||||
Dr("Importe") = Importe
|
||||
Dr("FolioFiscal") = FolioFiscal
|
||||
@@ -2963,8 +2963,8 @@ Namespace Modelos
|
||||
|
||||
If GenerarPrePoliza AndAlso CveMovimiento > 0 Then
|
||||
Dim Concepto As String = "Cancelación Usado" & factura.SerieFolio
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim tCveSubProyecto = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Mod/CancSalUsados", 74, DtMovimientosEntrada.SUMD("Total"), DtMovimientosEntrada.SUMD("Total"), 1, tFecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim tCveSubProyecto As Integer = ClsPaginas.GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
Dim tCveConcepto As Integer = 278
|
||||
Dim ValorInventario As Decimal = 0
|
||||
Dim MovAlmacen As Boolean = False 'debe quedar como el anterior, pero negativo
|
||||
@@ -3647,7 +3647,7 @@ Namespace Modelos
|
||||
importeMovimiento = 0
|
||||
|
||||
Case 91 'Amortizacion Nota de Credito
|
||||
Dim Contabilizable = If(UsuarioActual.CveEmpresa = 119, False, True)
|
||||
Dim Contabilizable As Boolean = If(UsuarioActual.CveEmpresa = 119, False, True)
|
||||
|
||||
If ValorMultiplicador = -1 Then
|
||||
Dim TipoCambioNC As Decimal = 1
|
||||
@@ -3834,9 +3834,9 @@ Namespace Modelos
|
||||
Else
|
||||
If Not ObjFactura.TipoDocto.Contiene("Rem", "Ant", "Egs", "Dev", "RNC") Then
|
||||
|
||||
Dim ConceptoContableAplicar = 4
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
Dim CveVentaAmortizacionAplicar = -1
|
||||
Dim ConceptoContableAplicar As Integer = 4
|
||||
Dim CveVentaAplicar As Integer = ObjFactura.CveVenta
|
||||
Dim CveVentaAmortizacionAplicar As Integer = -1
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") And ObjFactura.TipoDocto = "Ant" And CveDevolucion > 0 And NuevaFactura = 1 Then
|
||||
ConceptoContableAplicar = 11
|
||||
@@ -3871,9 +3871,9 @@ Namespace Modelos
|
||||
Case 150 'Descuento sobre ventas
|
||||
If ObjFactura.TipoDocto.Contiene("Egs", "Dev") AndAlso Not EsNCAmortizacion Then
|
||||
|
||||
Dim ConceptoContableAplicar = 150
|
||||
Dim CveVentaAplicar = ObjFactura.CveVenta
|
||||
Dim CveVentaAmortizacionAplicar = -1
|
||||
Dim ConceptoContableAplicar As Integer = 150
|
||||
Dim CveVentaAplicar As Integer = ObjFactura.CveVenta
|
||||
Dim CveVentaAmortizacionAplicar As Integer = -1
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Egs") And ObjFactura.CveAnticipo > 0 Then
|
||||
ConceptoContableAplicar = 11
|
||||
@@ -4162,14 +4162,6 @@ Namespace Modelos
|
||||
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
|
||||
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
|
||||
|
||||
@@ -4547,9 +4539,9 @@ Namespace Modelos
|
||||
'Agregamos los detalles
|
||||
For Each MovDet As DataRow In DtMovDetalle.Rows
|
||||
|
||||
Dim Cantidad = 0.0
|
||||
Dim CantidadRemision = DtRemisiones.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString}").ToDouble
|
||||
Dim CantidadInventario = MovDet("Cantidad").ToString.ToDecimal
|
||||
Dim Cantidad As Decimal = 0
|
||||
Dim CantidadRemision As Decimal = DtRemisiones.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString}").ToDecimal
|
||||
Dim CantidadInventario As Decimal = MovDet("Cantidad").ToString.ToDecimal
|
||||
|
||||
If RemisionesLista.Count > 0 AndAlso CantidadInventario >= CantidadRemision Then
|
||||
Cantidad = CantidadRemision
|
||||
@@ -4596,12 +4588,12 @@ Namespace Modelos
|
||||
If Not OcurrioError Then
|
||||
If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dim DtCostos = ObjInventario.DtResultados.Copy
|
||||
Dim DtCostos As DataTable = ObjInventario.DtResultados.Copy
|
||||
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
|
||||
Dim ValorInventario As Decimal
|
||||
|
||||
For Each RowInv As DataRow In DtCostosDistinct.Rows
|
||||
ValorInventario = DtCostos.SUM("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion"))).ToString.ToDecimal
|
||||
ValorInventario = DtCostos.SUMD("Total", String.Format("CveClasificacion = {0}", RowInv("CveClasificacion")))
|
||||
Try
|
||||
If ValorInventario <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, ValorInventario, 69, Me.SerieFolio, Me.SerieFolio, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=Me.CveSubProyecto) Then
|
||||
@@ -5309,7 +5301,7 @@ Namespace Modelos
|
||||
End If
|
||||
|
||||
'CUANDO SE CANCELA, Y TIENE RELACIONADA UNA REMISIÓN, Y ESTA NO SE CANCELARÁ. DEBE DE HACER EN AUTOMÁTICO LOS MOVIMIENTOS AL ALMACEN DE ENTREGA POR ADELANTADO
|
||||
Dim RevivirRemisiones = Not EsRefacturacion AndAlso ((TieneRemisionesRelacionadas AndAlso ListaRemisionesCancelar Is Nothing) OrElse (DtRemisionesRelacionadas.Rows.Count > ListaRemisionesCancelar.Count))
|
||||
Dim RevivirRemisiones As Boolean = Not EsRefacturacion AndAlso ((TieneRemisionesRelacionadas AndAlso ListaRemisionesCancelar Is Nothing) OrElse (DtRemisionesRelacionadas.Rows.Count > ListaRemisionesCancelar.Count))
|
||||
|
||||
'REMISION YA SE DEBE HACER POR EL PROCESO DE DEVOLUCION DE ALMACEN
|
||||
If Not EsRefacturacion AndAlso (ObjFactura.SaldoAlmacen <> 0 AndAlso ObjFactura.EsDevolucionVenta.Contiene(0, 1)) AndAlso Not RealizarDevolucionAlmacen And RevivirRemisiones = False Then
|
||||
@@ -5418,11 +5410,11 @@ Namespace Modelos
|
||||
|
||||
'VERIFICA EN EL SERVICIO SI SE CANCELO
|
||||
Try
|
||||
Dim solicitud = New WSGF.Service1SoapClient()
|
||||
Dim acuse = solicitud.GetAcuse(UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal)
|
||||
Dim solicitud As New WSGF.Service1SoapClient()
|
||||
Dim acuse As WSGF.StructXml = solicitud.GetAcuse(UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx", "rene2018", FolioFiscal)
|
||||
|
||||
If acuse.Estado = 0 Then
|
||||
Dim xmlAcuse = New System.Xml.XmlDocument()
|
||||
Dim xmlAcuse As New System.Xml.XmlDocument()
|
||||
xmlAcuse.LoadXml(DecodeBase64(acuse.CfdiB64))
|
||||
CancelacionAcuse = xmlAcuse.GetElementsByTagName("SignatureValue")(0).InnerText
|
||||
CancelacionFecha = xmlAcuse.SelectSingleNode("Acuse").Attributes("Fecha").Value.ToDate()
|
||||
@@ -5685,7 +5677,7 @@ Namespace Modelos
|
||||
|
||||
'CUANDO SE VAYA A REALIZAR LA DEVOLUCION AQUI DEBE MARCALA PARA NO SOLICITARLA DE NUEVO, SI NO LA SOLICITARA
|
||||
If ObjFactura.EsDevolucionVenta = 0 Then
|
||||
Dim EstatusDevolucion = 1
|
||||
Dim EstatusDevolucion As Integer = 1
|
||||
If Not ObjVentas.UpdateVentasDevolucionAlmacen(EstatusDevolucion, CveVenta) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al solicitar la devolución de almacen."
|
||||
@@ -5907,7 +5899,7 @@ Namespace Modelos
|
||||
|
||||
'AGREGA BITACORA A VENTA
|
||||
If Not ErrorCancelar AndAlso RealizarDevolucionAlmacen AndAlso CveMovimientoDevolucion > 0 Then
|
||||
Dim MensajeBitacora = "Devuelta"
|
||||
Dim MensajeBitacora As String = "Devuelta"
|
||||
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoDevolucion, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta) Then
|
||||
MensajeError = "Ocurrió un error al agregar la bitacora."
|
||||
ErrorCancelar = True
|
||||
@@ -6316,7 +6308,7 @@ Namespace Modelos
|
||||
If SeCancelaRemisionProceso Then
|
||||
|
||||
If Not ErrorCancelar Then
|
||||
For Each CveRemisionCancelar In ListaRemisionesCancelar
|
||||
For Each CveRemisionCancelar As Integer In ListaRemisionesCancelar
|
||||
If Not ObjVentas.AddRemisionesXCancelar(CveVenta, CveRemisionCancelar) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al guardar la remisión x cancelar."
|
||||
@@ -6332,7 +6324,7 @@ Namespace Modelos
|
||||
End If
|
||||
Else
|
||||
If Not ErrorCancelar Then
|
||||
For Each CveRemisionCancelar In ListaRemisionesCancelar
|
||||
For Each CveRemisionCancelar As Integer In ListaRemisionesCancelar
|
||||
If Not ObjVentas.UpdateEstatusFactura(12, "", "", CancelacionFecha, CveRemisionCancelar) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al guardar el estatus de cancelación de la remisión."
|
||||
@@ -7335,7 +7327,7 @@ Namespace Modelos
|
||||
|
||||
Public ReadOnly Property FormaPagoText As String
|
||||
Get
|
||||
Dim retorno = ""
|
||||
Dim retorno As String = ""
|
||||
Select Case FormaPago
|
||||
Case 0
|
||||
retorno = "PAGO EN UNA SOLA EXHIBICIÓN"
|
||||
@@ -7350,7 +7342,7 @@ Namespace Modelos
|
||||
|
||||
Public ReadOnly Property CondicionesPagoText As String
|
||||
Get
|
||||
Dim retorno = ""
|
||||
Dim retorno As String = ""
|
||||
Select Case CondicionesPago
|
||||
Case 0
|
||||
retorno = "contado"
|
||||
@@ -7793,7 +7785,7 @@ Namespace Modelos
|
||||
|
||||
Public ReadOnly Property LugarExp As String
|
||||
Get
|
||||
Dim arr = {Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP}
|
||||
Dim arr As Array = {Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP}
|
||||
Return String.Join(",", arr)
|
||||
End Get
|
||||
End Property
|
||||
@@ -7862,7 +7854,7 @@ Namespace Modelos
|
||||
|
||||
Public ReadOnly Property LugarExp As String
|
||||
Get
|
||||
Dim arr = {Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP, SubProyecto}
|
||||
Dim arr As Array = {Calle, NoExt, NoInt, Colonia, Localidad, Municipio, Estado, Pais, CP, SubProyecto}
|
||||
Return String.Join(",", arr)
|
||||
End Get
|
||||
End Property
|
||||
@@ -8036,7 +8028,7 @@ Namespace Modelos
|
||||
|
||||
Public ReadOnly Property LugarExp As String
|
||||
Get
|
||||
Dim arr = {EnvioDireccion, EnvioColonia, EnvioCiudad, EnvioEstado, EnvioCP, EnvioTel}
|
||||
Dim arr As Array = {EnvioDireccion, EnvioColonia, EnvioCiudad, EnvioEstado, EnvioCP, EnvioTel}
|
||||
Return String.Join(",", arr)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -851,7 +851,7 @@ Public Class Timbrado
|
||||
Private Function EnviarInformacionCancelacionPADESOAP(ByVal url As String, UsuarioServicio As String, PassServicio As String, contrato As String, rfcEmisor As String, rfcReceptor As String,
|
||||
certBase64 As String, keyBase64 As String, keyPass As String, arregloUUID As String, Total As Decimal, TimbraProduccion As Boolean,
|
||||
Optional MotivoCancelacion As String = "", Optional FolioSustitucion As String = "") As String
|
||||
Dim retorno = ""
|
||||
Dim retorno As String = ""
|
||||
Try
|
||||
|
||||
Dim request As HttpWebRequest = CType(WebRequest.Create($"{url}"), HttpWebRequest)
|
||||
@@ -895,7 +895,7 @@ Public Class Timbrado
|
||||
End Using
|
||||
|
||||
If Not String.IsNullOrEmpty(response) Then
|
||||
Dim xmlRetorno = New XmlDocument()
|
||||
Dim xmlRetorno As New XmlDocument()
|
||||
xmlRetorno.LoadXml(response)
|
||||
Dim elemList As XmlNodeList = xmlRetorno.GetElementsByTagName("return")
|
||||
|
||||
@@ -1270,13 +1270,13 @@ Public Class Timbrado
|
||||
Private Function EnviarInformacionPADE(url As String, payload As String, tokenAuth As String) As String
|
||||
Dim Retorno As String = ""
|
||||
Try
|
||||
Using httpClient = New HttpClient()
|
||||
Using httpClient As New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 1, 0)
|
||||
Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url))
|
||||
Using request As New HttpRequestMessage(HttpMethod.Post, New Uri(url))
|
||||
request.Headers.Add("Authorization", $"Basic {tokenAuth}")
|
||||
Using content = New StringContent(payload, Encoding.UTF8, "application/json")
|
||||
Using content As New StringContent(payload, Encoding.UTF8, "application/json")
|
||||
request.Content = content
|
||||
Dim response = httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result
|
||||
Dim response As HttpResponseMessage = httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result
|
||||
|
||||
Retorno = response.Content.ReadAsStringAsync().Result
|
||||
End Using
|
||||
@@ -1569,7 +1569,7 @@ Public Class Timbrado
|
||||
|
||||
Dim w As Integer = 0
|
||||
|
||||
For Each Ret In ObjCFDITimbre.Retenciones
|
||||
For Each Ret As CFDIRetenciones In ObjCFDITimbre.Retenciones
|
||||
comprobante.Impuestos.Retenciones(w) = New Profact.TimbraCFDI40.ComprobanteImpuestosRetencion()
|
||||
comprobante.Impuestos.Retenciones(w).Impuesto = Ret.Impuesto
|
||||
comprobante.Impuestos.Retenciones(w).Importe = Ret.Importe
|
||||
@@ -1624,7 +1624,7 @@ Public Class Timbrado
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior11 IsNot Nothing Then
|
||||
|
||||
'DATOS GENERALES
|
||||
Dim ComExt = New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExterior()
|
||||
Dim ComExt As New Profact.TimbraCFDI33.Complementos.ComercioExterior11.ComercioExterior()
|
||||
ComExt.Version = "1.1"
|
||||
ComExt.MotivoTrasladoSpecified = True
|
||||
ComExt.MotivoTraslado = ObjCFDITimbre.Complementos.ComercioExterior11.MotivoTraslado
|
||||
|
||||
@@ -114,6 +114,18 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
End If
|
||||
|
||||
If Metodo = "ConsultarClasificaciones" Then
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth = ValidarSolicitud(context)
|
||||
|
||||
If Auth.IsSucces Then
|
||||
retorno = ConsultaClasificaciones(context)
|
||||
Else
|
||||
context.Response.StatusCode = Auth.StatusCode
|
||||
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||
End If
|
||||
End If
|
||||
|
||||
context.Response.Write(retorno)
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -226,10 +238,16 @@ Public Class E119 : Implements IHttpHandler
|
||||
Dim RespuestaError As New ResponseMsgError
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim CveClasificacion = If(context.Request("CveClasificacion") = Nothing, "", context.Request("CveClasificacion").ToString())
|
||||
|
||||
If String.IsNullOrEmpty(CveClasificacion) Then
|
||||
CveClasificacion = "-1"
|
||||
End If
|
||||
|
||||
Dim Productos As JArray = Nothing
|
||||
|
||||
Using ObjInventario As New ClsInventarios
|
||||
If ObjInventario.GetJAM_APIs(1) AndAlso ObjInventario.DtResultados IsNot Nothing Then
|
||||
If ObjInventario.GetJAM_APIs(1, CveClasificacion:=CveClasificacion.ToEntero()) AndAlso ObjInventario.DtResultados IsNot Nothing Then
|
||||
Productos = JArray.Parse(ObjInventario.DtResultados.DataTableToJSONIPP())
|
||||
Else
|
||||
RespuestaError.message = "no se pudo obtener los datos"
|
||||
@@ -256,6 +274,39 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function ConsultaClasificaciones(ByVal context As HttpContext) As String
|
||||
Dim Respuesta As New ResponseMsg
|
||||
Dim RespuestaError As New ResponseMsgError
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim Clasificaciones As JArray = Nothing
|
||||
|
||||
Try
|
||||
Clasificaciones = JArray.Parse(ClsPaginas.GlobalDTClasificaciones(CveEmpresa).FiltraParametros("", DistinctColumns:={"CveClasificacion", "Clasificacion"}).DataTableToJSONIPP())
|
||||
Catch ex As Exception
|
||||
RespuestaError.message = "no se pudo obtener los datos"
|
||||
TieneError = True
|
||||
End Try
|
||||
|
||||
Dim Msg As String = "Información día " & Now.ToShortDateString & If(RespuestaError.message <> "", " Error: " & RespuestaError.message, "")
|
||||
Msg.GuardaLogAD("LogE119")
|
||||
|
||||
If TieneError Then
|
||||
context.Response.StatusCode = 200
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
Else
|
||||
context.Response.StatusCode = 200
|
||||
Try
|
||||
Respuesta.data = New JObject(New JProperty("Clasificaciones", Clasificaciones))
|
||||
Respuesta.message = "Los datos se obtuvieron correctamente"
|
||||
Return JsonConvert.SerializeObject(Respuesta)
|
||||
Catch ex As Exception
|
||||
RespuestaError.message = "Ocurrió un error al generar la petición"
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
End Try
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Class ResponseMsg
|
||||
Sub New()
|
||||
status = "success"
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Dim IntermediarioFactura As Boolean = False
|
||||
If UsuarioActual.CveEmpresa = 145 Then IntermediarioFactura = True
|
||||
If ChkIntermediario.Checked Then
|
||||
|
||||
CveSubProyectoIntermediario = DdlSubProyectoIntermediario.SelectedValue.ToEntero
|
||||
@@ -238,8 +239,10 @@ Partial Class Bancos_DepositosCaja
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, ImporteInter, ImporteInter, 51, DdlClasificacionIntermediario.SelectedItem.Text, DdlClasificacionIntermediario.SelectedItem.Text, CveClasificacion:=CveClasificacionIntermediario, CveSubProyecto:=CveSubProyectoIntermediario) Then
|
||||
OcurrioError = True
|
||||
If Not IntermediarioFactura Then ' si factura no se manda al gasto sino se disminuye solo lo depositado
|
||||
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
|
||||
|
||||
If IVA <> 0 Then
|
||||
@@ -306,6 +309,7 @@ Partial Class Bancos_DepositosCaja
|
||||
OcurrioError = True
|
||||
End If
|
||||
If Not OcurrioError Then
|
||||
Dim i As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||
|
||||
If Gvr.FCCheckBox("ChkFactura").Checked Then
|
||||
@@ -315,6 +319,12 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
|
||||
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
|
||||
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
|
||||
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
||||
@@ -328,7 +338,6 @@ Partial Class Bancos_DepositosCaja
|
||||
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)
|
||||
|
||||
|
||||
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
|
||||
Exit For
|
||||
|
||||
@@ -607,7 +607,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||
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
|
||||
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -804,9 +804,10 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Pago.TCPago = 1 ' TxtTC.Text.ToDecimal
|
||||
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
|
||||
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
|
||||
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
||||
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTCDolares.Text.ToDecimal)
|
||||
End If
|
||||
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTC.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
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'DESPROGRAMA LO PROGRAMADO DESPUES DE HACERLE UN PAGO
|
||||
@@ -875,16 +877,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
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
|
||||
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
|
||||
|
||||
'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
|
||||
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then
|
||||
IDPoliza = ObjMov.ContaIdPoliza
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkAcarreo" runat="server" Text="Verificar Acarreos" Visible="False"></asp:LinkButton>
|
||||
</li>
|
||||
</li>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpnTools" runat="server" UpdateMode="Conditional">
|
||||
@@ -62,9 +62,9 @@
|
||||
<asp:PostBackTrigger ControlID="BtnDescontabilizar" />
|
||||
</Triggers>
|
||||
</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>
|
||||
</li>
|
||||
</li>--%>
|
||||
<li>
|
||||
<asp:HyperLink ID="HLPagar" CssClass="thickbox" Visible="false" runat="server"><i class='fa fa-money'></i> Pagar</asp:HyperLink>
|
||||
</li>
|
||||
@@ -2516,13 +2516,13 @@
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UPObservaciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table border="0" width="250px">
|
||||
<table border="0" width="100%">
|
||||
<tr align="left">
|
||||
<td><b>Observaciones Generales:</b> </td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<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>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
@@ -3434,56 +3434,6 @@
|
||||
</ContentTemplate>
|
||||
</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 class="modal-dialog">
|
||||
|
||||
@@ -5295,6 +5245,21 @@
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPedimento" runat="server" HighlightCssClass="vco" TargetControlID="RFVPedimento"></ajax:ValidatorCalloutExtender>
|
||||
<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="col-md-2">Pedimento:</div>
|
||||
<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"
|
||||
ClearMaskOnLostFocus="false"
|
||||
TargetControlID="TxtPedimento"
|
||||
Mask="99-99-9999-9999999"
|
||||
Mask="99--99--9999--9999999"
|
||||
MaskType="Number"
|
||||
InputDirection="LeftToRight"
|
||||
AcceptNegative="None"
|
||||
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>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVDescripcion" 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="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<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"
|
||||
ValidationExpression="^[0-9 ]{2}-[0-9 ]{2}-[0-9 ]{4}-[0-9 ]{7}$" ></asp:RegularExpressionValidator>
|
||||
<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>
|
||||
|
||||
<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.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
|
||||
LnkCerrarImportacion.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
HdnCveAF.Value = ObjImportaciones.DtResultados.Rows(0)("CveActivoFijo").ToString
|
||||
VincularAF()
|
||||
|
||||
@@ -149,7 +142,7 @@ Partial Class Compras_Importaciones
|
||||
|
||||
Dim ObjImp As New ClsCompras
|
||||
ObjImp.IniciaTransacSQL()
|
||||
Dim ErrorImportacion = False
|
||||
Dim ErrorImportacion As Boolean = False
|
||||
|
||||
If CveImportacion < 0 Then
|
||||
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)
|
||||
Dim ObjImp As New ClsCompras
|
||||
ObjImp.IniciaTransacSQL()
|
||||
Dim ErrorEliminar = False
|
||||
Dim ErrorEliminar As Boolean = False
|
||||
|
||||
For Each dr As DataRow In DtCompras.Rows
|
||||
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)
|
||||
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
|
||||
Dim ObjImportaciones As New ClsCompras
|
||||
|
||||
@@ -295,7 +288,7 @@ Partial Class Compras_Importaciones
|
||||
End If
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ErrorAgregar = False
|
||||
Dim ErrorAgregar As Boolean = False
|
||||
Dim RowCompra As DataRow = Nothing
|
||||
|
||||
If ObjCompras.GetCompras(HdnCveCompra.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -414,7 +407,7 @@ Partial Class Compras_Importaciones
|
||||
End If
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ErrorAgregar = False
|
||||
Dim ErrorAgregar As Boolean = False
|
||||
Dim RowCompra As DataRow = Nothing
|
||||
|
||||
If ObjCompras.GetCompras(HdnCveCompraGasto.Value.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
@@ -471,7 +464,7 @@ Partial Class Compras_Importaciones
|
||||
|
||||
End Sub
|
||||
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
|
||||
Dim ObjImportaciones As New ClsCompras
|
||||
|
||||
@@ -501,18 +494,12 @@ Partial Class Compras_Importaciones
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkCerrarImportacion_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.UpdateImportacionCierre(CveImportacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
Alert("Importación cerrada correctamente.", TipoMensaje.MsgInformacion, $" location.href = ""./Importaciones.aspx?CveImportacion={CveImportacion}"" ")
|
||||
End If
|
||||
|
||||
ObjInv.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -96,7 +96,7 @@ Partial Class PopUpVerFactura
|
||||
Dim CveEmpresaToken As Integer = UserParams("CVEEMPRESA").ToString().ToEntero()
|
||||
Dim CveUsuario As Integer = IfNull(UserParams("CVEUSUARIO"), 100, UserParams("CVEUSUARIO").ToString().ToEntero()).ToString().ToEntero()
|
||||
|
||||
Dim UsuarioToken = ValidaUsuarioSistema(CveEmpresaToken, CveUsuario)
|
||||
Dim UsuarioToken As Usuario = ValidaUsuarioSistema(CveEmpresaToken, CveUsuario)
|
||||
|
||||
If UsuarioToken IsNot Nothing AndAlso Context.Session("UsuarioSIG") Is Nothing Then
|
||||
Context.Session("UsuarioSIG") = UsuarioToken
|
||||
@@ -319,7 +319,7 @@ Partial Class PopUpVerFactura
|
||||
cvePersonal = Request("cvePersonal").ToString.ToEntero()
|
||||
End If
|
||||
Dim RFCs As New StringBuilder
|
||||
Dim contador = 0
|
||||
Dim contador As Integer = 0
|
||||
Using objnom As New ClsNominas
|
||||
If objnom.PreNominaTotalSemana(numeroPeriodo, UsuarioActual.CveEmpresa, cveSubProyecto, cveTipoNomina, tipoTrabajador, ejercicio, facturado) Then
|
||||
For Each item As DataRow In objnom.DtResultados.Select("CvePersonal > 0")
|
||||
@@ -384,7 +384,7 @@ Partial Class PopUpVerFactura
|
||||
lrds.Add(rds2)
|
||||
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
Dim rutardlc = "Formatos\RepAgroInventarioDiario.rdlc"
|
||||
Dim rutardlc As String = "Formatos\RepAgroInventarioDiario.rdlc"
|
||||
If EnviarCorrreo Then
|
||||
Dim para As String = ""
|
||||
Dim dtCorreos As DataTable = New DataTable()
|
||||
@@ -539,7 +539,7 @@ Partial Class PopUpVerFactura
|
||||
lrds.Add(rds)
|
||||
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
Dim rutardlc = "Formatos\Agro\EmbarqueManifiesto.rdlc"
|
||||
Dim rutardlc As String = "Formatos\Agro\EmbarqueManifiesto.rdlc"
|
||||
If Not IsNothing(tablaReporte.FiltroPrimero("TipoManifiesto=1")) Then
|
||||
rutardlc = "Formatos\Agro\EmbarqueManifiesto2.rdlc"
|
||||
End If
|
||||
@@ -849,7 +849,7 @@ Partial Class PopUpVerFactura
|
||||
lrds.Add(rds)
|
||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||
Dim pdf = StreamPDF("Formatos\Agro\EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
|
||||
Dim pdf As Byte() = StreamPDF("Formatos\Agro\EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
|
||||
|
||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = pdf, .NombreArchivo = String.Format("{0}.pdf", "DatosCartaPorte")})
|
||||
@@ -915,9 +915,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
|
||||
Dim bcode As New BarcodeLib.Barcode()
|
||||
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
||||
Dim img As Drawing.Image = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
||||
Dim barcodebyte As Byte()
|
||||
Using ms = New MemoryStream()
|
||||
Using ms As New MemoryStream()
|
||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||
barcodebyte = ms.ToArray()
|
||||
End Using
|
||||
@@ -1023,9 +1023,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
|
||||
Dim bcode As New BarcodeLib.Barcode()
|
||||
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTIN), 500, 200)
|
||||
Dim img As Drawing.Image = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTIN), 500, 200)
|
||||
Dim barcodebyte As Byte()
|
||||
Using ms = New MemoryStream()
|
||||
Using ms As New MemoryStream()
|
||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||
barcodebyte = ms.ToArray()
|
||||
End Using
|
||||
@@ -1037,14 +1037,12 @@ Partial Class PopUpVerFactura
|
||||
rds2.Value = dtqr
|
||||
lrds.Add(rds2)
|
||||
'endimg
|
||||
|
||||
|
||||
Dim dtqr2 As DataTable = dtqr.Clone()
|
||||
|
||||
Dim bcode2 As New BarcodeLib.Barcode()
|
||||
Dim img2 = bcode2.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTINAll.Replace("(", "").Replace(")", "")), 900, 100)
|
||||
Dim img2 As Drawing.Image = bcode2.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", GTINAll.Replace("(", "").Replace(")", "")), 900, 100)
|
||||
Dim barcodebyte2 As Byte()
|
||||
Using ms = New MemoryStream()
|
||||
Using ms As New MemoryStream()
|
||||
img2.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||
barcodebyte2 = ms.ToArray()
|
||||
End Using
|
||||
@@ -1054,8 +1052,6 @@ Partial Class PopUpVerFactura
|
||||
Dim rds22 As New ReportDataSource With {.Name = "dsImagenesGTIN", .Value = dtqr2}
|
||||
lrds.Add(rds22)
|
||||
|
||||
|
||||
|
||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||
lrds.Add(rds)
|
||||
|
||||
@@ -1139,9 +1135,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
|
||||
Dim bcode As New BarcodeLib.Barcode()
|
||||
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
||||
Dim img As Drawing.Image = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
||||
Dim barcodebyte As Byte()
|
||||
Using ms = New MemoryStream()
|
||||
Using ms As New MemoryStream()
|
||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||
barcodebyte = ms.ToArray()
|
||||
End Using
|
||||
@@ -1173,8 +1169,8 @@ Partial Class PopUpVerFactura
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
UsuarioToken = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||
UsuarioToken.CveEmpresa = CveEmpresa
|
||||
CreaObjetoEmpresa(UsuarioToken)
|
||||
@@ -1559,10 +1555,9 @@ Partial Class PopUpVerFactura
|
||||
Dim ObjPuntoVenta As New ClsPuntoVenta
|
||||
Dim DtCortesVentasResumen As DataTable = Nothing
|
||||
Dim DtCortesVentas As DataTable = Nothing
|
||||
Dim Fecha = "", Nombre = ""
|
||||
Dim Fecha As String = "", Nombre As String = ""
|
||||
If ObjVenta.GetCortesDetalleVentasResumen(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtCortesVentasResumen = ObjVenta.DtResultados
|
||||
|
||||
End If
|
||||
|
||||
If ObjPuntoVenta.GetCortesDetalleVentas(CveCorte, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
@@ -1969,7 +1964,7 @@ Partial Class PopUpVerFactura
|
||||
XmlDoc.Load(PathXML)
|
||||
|
||||
Dim nodo As XmlNode = XmlDoc.DocumentElement
|
||||
Dim Version = ValorXML(nodo, "version")
|
||||
Dim Version As String = ValorXML(nodo, "version")
|
||||
|
||||
Dim namespaces As New XmlNamespaceManager(XmlDoc.NameTable)
|
||||
Dim Prefijo As String = If(XmlDoc.DocumentElement.Prefix = "", "cfd", XmlDoc.DocumentElement.Prefix)
|
||||
@@ -2124,7 +2119,7 @@ Partial Class PopUpVerFactura
|
||||
End Function
|
||||
|
||||
Private Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer)
|
||||
Dim resp = PreParaImpresionCartaPorte(CveTimbre)
|
||||
Dim resp As Modelos.MSubReportData = PreParaImpresionCartaPorte(CveTimbre)
|
||||
If resp.DataSources.Count > 0 AndAlso resp.Parametros.Count > 0 Then
|
||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", resp.DataSources, resp.Parametros, resp.SerieFolio)
|
||||
End If
|
||||
@@ -2262,7 +2257,7 @@ Partial Class PopUpVerFactura
|
||||
XMLDoc.Load(Path)
|
||||
Catch ex As Exception
|
||||
Try
|
||||
Dim oReader = New StreamReader(Path, Encoding.GetEncoding("ISO-8859-1"))
|
||||
Dim oReader As New StreamReader(Path, Encoding.GetEncoding("ISO-8859-1"))
|
||||
XMLDoc.Load(oReader)
|
||||
oReader.Dispose()
|
||||
Catch ex2 As Exception
|
||||
@@ -2279,7 +2274,7 @@ Partial Class PopUpVerFactura
|
||||
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
||||
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||
Dim Version = ValorXML(XMLDoc.DocumentElement, "version")
|
||||
Dim Version As String = ValorXML(XMLDoc.DocumentElement, "version")
|
||||
If Version = "3.3" Then
|
||||
cfdVer = "http://www.sat.gob.mx/cfd/3"
|
||||
Else ' se considera que es la version 4.0
|
||||
@@ -2306,7 +2301,7 @@ Partial Class PopUpVerFactura
|
||||
If nodeCliente IsNot Nothing Then
|
||||
ClienteRFC = ValorXML(nodeCliente, "RFC")
|
||||
ClienteNombre = ValorXML(nodeCliente, "Nombre")
|
||||
Dim UsoCFDI = ValorXML(nodeCliente, "UsoCFDI")
|
||||
Dim UsoCFDI As String = ValorXML(nodeCliente, "UsoCFDI")
|
||||
ClienteUsoCFDi = String.Format("{0} - {1}", UsoCFDI, GlobalDTSATUsosCFDI().FiltroPrimeroValor("Descripcion", String.Format("UsoCFDI = '{0}'", UsoCFDI)))
|
||||
End If
|
||||
|
||||
@@ -2393,9 +2388,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
Dim nodeMercanciaPadre As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancias", "cartaporte20"), namespaces)
|
||||
If UsuarioActual.CveEmpresa = 13 AndAlso nodeMercanciaPadre IsNot Nothing Then
|
||||
Dim PesoNetoTotal = ValorXML(nodeMercanciaPadre(0), "PesoNetoTotal", "")
|
||||
Dim UnidadPeso = ValorXML(nodeMercanciaPadre(0), "UnidadPeso", "")
|
||||
Dim NumTotalMercancias = ValorXML(nodeMercanciaPadre(0), "NumTotalMercancias", "")
|
||||
Dim PesoNetoTotal As String = ValorXML(nodeMercanciaPadre(0), "PesoNetoTotal", "")
|
||||
Dim UnidadPeso As String = ValorXML(nodeMercanciaPadre(0), "UnidadPeso", "")
|
||||
Dim NumTotalMercancias As String = ValorXML(nodeMercanciaPadre(0), "NumTotalMercancias", "")
|
||||
|
||||
params.Add(New ReportParameter("PesoNetoTotal", PesoNetoTotal))
|
||||
params.Add(New ReportParameter("UnidadPeso", UnidadPeso))
|
||||
@@ -2425,14 +2420,14 @@ Partial Class PopUpVerFactura
|
||||
Row("RFC") = ValorXML(node, "RFCRemitenteDestinatario", "")
|
||||
Row("Nombre") = ValorXML(node, "NombreRemitenteDestinatario", "")
|
||||
|
||||
Dim nodeDomicilio = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte20:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
|
||||
Dim nodeDomicilio As XmlNode = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cartaporte20:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
|
||||
If nodeDomicilio IsNot Nothing Then
|
||||
|
||||
Dim Estado As String = ""
|
||||
Dim Municipio As String = ""
|
||||
Dim Colonia As String = ""
|
||||
Dim calle = ValorXML(nodeDomicilio, "Calle", "")
|
||||
Dim CP = ValorXML(nodeDomicilio, "CodigoPostal", "")
|
||||
Dim calle As String = ValorXML(nodeDomicilio, "Calle", "")
|
||||
Dim CP As String = ValorXML(nodeDomicilio, "CodigoPostal", "")
|
||||
|
||||
Dim dr As DataRow = GlobalDTGralColonias(ValorXML(nodeDomicilio, "Estado", ""), ValorXML(nodeDomicilio, "Municipio", ""), ValorXML(nodeDomicilio, "Colonia", "")).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
@@ -2451,7 +2446,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("DistanciaTotal", DistanciaTotal.ToString()))
|
||||
End If
|
||||
|
||||
Dim nodeRelacion = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||
Dim nodeRelacion As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||
|
||||
If nodeRelacion IsNot Nothing Then
|
||||
Dim RelacionCodigo As String = ValorXML(nodeRelacion, "TipoRelacion")
|
||||
@@ -2476,17 +2471,16 @@ Partial Class PopUpVerFactura
|
||||
Relacion = "08 - Factura generada por pagos en parcialidades"
|
||||
Case "09"
|
||||
Relacion = "09 - Factura generada por pagos diferidos"
|
||||
|
||||
End Select
|
||||
|
||||
Dim nodoDocumentosRealcionados = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||
For Each node As XmlNode In nodoDocumentosRealcionados
|
||||
Dim nodoDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||
For Each node As XmlNode In nodoDocumentosRelacionados
|
||||
|
||||
Dim nRow As DataRow = DTRelacionados.NewRow
|
||||
nRow("Relacion") = Relacion
|
||||
|
||||
Try
|
||||
Dim nodoUUID = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cfdi:CfdiRelacionado")
|
||||
Dim nodoUUID As XmlNode = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cfdi:CfdiRelacionado")
|
||||
nRow("UUID") = ValorXML(nodoUUID, "UUID", "")
|
||||
Catch ex As Exception
|
||||
nRow("UUID") = ""
|
||||
@@ -2726,7 +2720,7 @@ Partial Class PopUpVerFactura
|
||||
End Using
|
||||
|
||||
If Folio > 0 AndAlso DtDetalle IsNot Nothing AndAlso DtDetalle.Rows.Count > 0 Then
|
||||
Dim ObjFactura = New Modelos.Factura
|
||||
Dim ObjFactura As New Modelos.Factura
|
||||
ObjFactura.Version = "3.3"
|
||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||
@@ -2936,12 +2930,12 @@ Partial Class PopUpVerFactura
|
||||
Dim PathArchivo As String = "" 'String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, Vta.TipoDocto, Vta.SerieFolio)
|
||||
|
||||
|
||||
Dim TmpDTImpuestos = New DataTable
|
||||
Dim TmpDTImpuestos As New DataTable
|
||||
TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
|
||||
TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
|
||||
TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
|
||||
|
||||
Dim TmpDTImpuestosIVAIEPS = New DataTable
|
||||
Dim TmpDTImpuestosIVAIEPS As New DataTable
|
||||
TmpDTImpuestosIVAIEPS.Columns.Add("Impuesto", GetType(String))
|
||||
TmpDTImpuestosIVAIEPS.Columns.Add("tasa", GetType(String))
|
||||
TmpDTImpuestosIVAIEPS.Columns.Add("Importe", GetType(Double))
|
||||
@@ -2964,7 +2958,7 @@ Partial Class PopUpVerFactura
|
||||
'Vta.Subproyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SucursalModel)
|
||||
Dim CveSubProyecto As Integer = dtVentas(0)("CveSubProyecto").ToString().ToEntero()
|
||||
|
||||
Dim DtSubProyecto = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=dtVentas(0)("CveEmpresa").ToString().ToEntero())
|
||||
Dim DtSubProyecto As DataTable = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyecto, CveEmpresa:=dtVentas(0)("CveEmpresa").ToString().ToEntero())
|
||||
|
||||
Vta.SubProyecto = DtSubProyecto.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
||||
'Vta.SubProyecto = ObjVentas.DtResultados.Rows(0).DataRowToObject(Of Modelos.SubProyectoModel)
|
||||
@@ -3078,7 +3072,7 @@ Partial Class PopUpVerFactura
|
||||
Dim dtImpuesto As DataTable = ObjVentas.DtResultados
|
||||
If dtImpuesto.Rows.Count > 0 Then
|
||||
For Each Row As DataRow In dtImpuesto.Rows
|
||||
Dim Orden = 80
|
||||
Dim Orden As Integer = 80
|
||||
If Row("Importe").ToString.ToDouble <> 0 Then
|
||||
DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
|
||||
DR("Importe") = Row("Importe").ToString.ToDouble
|
||||
@@ -3342,15 +3336,11 @@ Partial Class PopUpVerFactura
|
||||
Optional EsTransitorio As Boolean = False, Optional CveAlmacenRecepcion As Integer = -1, Optional CveAlmacenTransitorioRecepcion As Integer = -1, Optional FolioBusquedaTrasitorio As Integer = -1)
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ObjInventarios.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim CveConcepto As Integer = ObjInventarios.CveConcepto
|
||||
Dim Folio As String = ObjInventarios.Folio.ToString
|
||||
Dim CveCompra = ObjInventarios.CveCompra
|
||||
Dim CveCompra As Integer = ObjInventarios.CveCompra
|
||||
Dim Fecha As String = ObjInventarios.Fecha.ToShortDateString
|
||||
Dim FechaHora As DateTime = ObjInventarios.FechaHora
|
||||
Dim Almacen As String = ObjInventarios.Almacen
|
||||
@@ -3441,8 +3431,6 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim CantidadProductos As Decimal = 0
|
||||
Dim CantidadUsados As Decimal = 0
|
||||
|
||||
@@ -3533,12 +3521,7 @@ Partial Class PopUpVerFactura
|
||||
keys(0) = DtMovimientos.Columns("No")
|
||||
DtMovimientos.PrimaryKey = keys
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso CveCompra > 0 Then
|
||||
@@ -4284,8 +4267,8 @@ Partial Class PopUpVerFactura
|
||||
Dim SBDireccionD As New StringBuilder()
|
||||
Dim CveCliente As Integer = 0
|
||||
Dim CveDireccionEnvio As Integer = 0
|
||||
Dim ClienteNombre = "", EnvioContacto = "", EnvioDireccion = "", EnvioColonia = "", EnvioCiudad = "", EnvioEstado = "", ClientePais = "", EnvioCP = "", Contrato = "",
|
||||
Paqueteria = "", NumContrato = "", Guia = ""
|
||||
Dim ClienteNombre As String = "", EnvioContacto As String = "", EnvioDireccion As String = "", EnvioColonia As String = "", EnvioCiudad As String = "", EnvioEstado As String = "", ClientePais As String = "", EnvioCP As String = "", Contrato As String = "",
|
||||
Paqueteria As String = "", NumContrato As String = "", Guia As String = ""
|
||||
|
||||
Dim CveContrato As Integer = 0
|
||||
If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then
|
||||
@@ -5451,7 +5434,7 @@ Partial Class PopUpVerFactura
|
||||
Private Sub GenerarPDFOS(CveOS As Integer)
|
||||
Dim ObjOS As New ClsOS()
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim CveFolio = ""
|
||||
Dim CveFolio As String = ""
|
||||
CreaDT()
|
||||
|
||||
Dim FIRutaReporte As New System.IO.FileInfo(String.Format("{0}Formatos/OrdenServicio.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
@@ -5718,7 +5701,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72) Then
|
||||
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
|
||||
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
||||
@@ -5868,21 +5851,21 @@ Partial Class PopUpVerFactura
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If drv IsNot Nothing Then
|
||||
Dim Total = drv("Total").ToString().ToDecimal()
|
||||
Dim CveEstatusFactura = drv("CveEstatusFactura").ToString().ToEntero()
|
||||
Dim FolioFiscal = drv("FolioFiscal").ToString()
|
||||
Dim RFCReceptor = drv("RFCReceptor").ToString()
|
||||
Dim SelloCancelacion = drv("SelloCancelacion").ToString()
|
||||
Dim SelloSolicitudCancelacion = drv("SelloSolicitudCancelacion").ToString()
|
||||
Dim EstadoCancelacion = drv("EstadoCancelacion").ToString()
|
||||
Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime
|
||||
Dim Total As Decimal = drv("Total").ToString().ToDecimal()
|
||||
Dim CveEstatusFactura As Integer = drv("CveEstatusFactura").ToString().ToEntero()
|
||||
Dim FolioFiscal As String = drv("FolioFiscal").ToString()
|
||||
Dim RFCReceptor As String = drv("RFCReceptor").ToString()
|
||||
Dim SelloCancelacion As String = drv("SelloCancelacion").ToString()
|
||||
Dim SelloSolicitudCancelacion As String = drv("SelloSolicitudCancelacion").ToString()
|
||||
Dim EstadoCancelacion As String = drv("EstadoCancelacion").ToString()
|
||||
Dim FechaCancelacion As DateTime = drv("FechaCancelacion").ToString.ToDateTime
|
||||
|
||||
Dim MotivoCancelacion As String = ""
|
||||
Dim FolioSustitucion As String = ""
|
||||
|
||||
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/AcuseCancelacion.mrt"
|
||||
|
||||
Dim RFCEmisor = UsuarioActual.Empresa.RFC
|
||||
Dim RFCEmisor As String = UsuarioActual.Empresa.RFC
|
||||
|
||||
Dim Titulo As String = "Acuse de cancelación de CFDI"
|
||||
Dim EstadoCFDI As String = "Cancelado"
|
||||
@@ -5908,9 +5891,9 @@ Partial Class PopUpVerFactura
|
||||
|
||||
Using ObjV As New ClsVentas
|
||||
If ObjV.GetVentasPendientesCancelacion(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveVenta:=CveVenta) Then
|
||||
Dim RowCancelacion = ObjV.DtResultados.FiltroPrimero("")
|
||||
Dim RowCancelacion As DataRow = ObjV.DtResultados.FiltroPrimero("")
|
||||
If RowCancelacion IsNot Nothing Then
|
||||
Dim CveMotivoCancelacion = RowCancelacion("CveMotivoCancelacion").ToString().ToEntero()
|
||||
Dim CveMotivoCancelacion As Integer = RowCancelacion("CveMotivoCancelacion").ToString().ToEntero()
|
||||
FolioSustitucion = RowCancelacion("FolioFiscalSustitucion").ToString()
|
||||
|
||||
If CveMotivoCancelacion > 0 Then
|
||||
@@ -5956,7 +5939,7 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("MsgError", ""))
|
||||
params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss")))
|
||||
|
||||
Dim DtAcuse = New DataTable("DtAcuse")
|
||||
Dim DtAcuse As New DataTable("DtAcuse")
|
||||
DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String)))
|
||||
DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String)))
|
||||
DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String)))
|
||||
@@ -5964,7 +5947,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
If CveEstatusFactura = 20 Then
|
||||
|
||||
Dim RowCFDI = DtAcuse.NewRow()
|
||||
Dim RowCFDI As DataRow = DtAcuse.NewRow()
|
||||
|
||||
RowCFDI("FolioFiscal") = FolioFiscal
|
||||
RowCFDI("Estatus") = "Solicitud de cancelación recibida"
|
||||
@@ -6020,7 +6003,7 @@ Partial Class PopUpVerFactura
|
||||
#Region "I E C H E Q U E S"
|
||||
|
||||
Private Sub ImprimirIE(CveIE As Integer, CveEmpresa As Integer)
|
||||
Dim CveTipoTransaccion = -1
|
||||
Dim CveTipoTransaccion As Integer = -1
|
||||
Dim ObjIE As New ClsBancos()
|
||||
ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa)
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
@@ -6029,13 +6012,13 @@ Partial Class PopUpVerFactura
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
If CveTipoTransaccion = 1 Then
|
||||
Dim Folio = ObjIE.Folio
|
||||
Dim Importe = ObjIE.Importe
|
||||
Dim Observacion = ObjIE.Observaciones
|
||||
Dim ImporteLetra = String.Format("--- {0} ---", Importe.Texto2Letras(ObjIE.CveMoneda))
|
||||
Dim Beneficiario = ObjIE.PagueseA
|
||||
Dim Fecha = ObjIE.FechaDocumento.ToShortDateString
|
||||
Dim CveCuenta = ObjIE.CveCuenta
|
||||
Dim Folio As String = ObjIE.Folio
|
||||
Dim Importe As Double = ObjIE.Importe
|
||||
Dim Observacion As String = ObjIE.Observaciones
|
||||
Dim ImporteLetra As String = String.Format("--- {0} ---", Importe.Texto2Letras(ObjIE.CveMoneda))
|
||||
Dim Beneficiario As String = ObjIE.PagueseA
|
||||
Dim Fecha As String = ObjIE.FechaDocumento.ToShortDateString
|
||||
Dim CveCuenta As Integer = ObjIE.CveCuenta
|
||||
params.Add(New ReportParameter("Fecha", Fecha))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("Beneficiario", Beneficiario))
|
||||
@@ -6044,11 +6027,8 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("Observaciones", Observacion))
|
||||
params.Add(New ReportParameter("Tipo", If(ObjIE.EsAbonoEnCuenta, "PARA ABONO EN CUENTA DEL BENEFICIARIO", "")))
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(141) Then
|
||||
|
||||
Dim InicialesUsuarioGenero As String = ""
|
||||
|
||||
Try
|
||||
Dim NombreUsuarioRenero As String = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("Nombre", $"CveUsuario ={ObjIE.CveUsuario}")
|
||||
If NombreUsuarioRenero.Trim.Length > 0 Then
|
||||
@@ -6057,7 +6037,6 @@ Partial Class PopUpVerFactura
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
params.Add(New ReportParameter("InicialesUsuarioGenero", InicialesUsuarioGenero))
|
||||
|
||||
End If
|
||||
@@ -6082,7 +6061,7 @@ Partial Class PopUpVerFactura
|
||||
DtMovimientosPoliza.Columns.Add("Cargo", GetType(Double))
|
||||
DtMovimientosPoliza.Columns.Add("Abono", GetType(Double))
|
||||
|
||||
Dim Dr = DtMovimientosPoliza.NewRow
|
||||
Dim Dr As DataRow = DtMovimientosPoliza.NewRow
|
||||
Dr("CODIGO") = ""
|
||||
Dr("Cuenta") = ""
|
||||
Dr("Cargo") = 0
|
||||
@@ -6101,7 +6080,7 @@ Partial Class PopUpVerFactura
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
For Each drt As DataRow In ObjIE.DtResultados.Rows
|
||||
Dim Dr = DtMovimientosPoliza.NewRow
|
||||
Dim Dr As DataRow = DtMovimientosPoliza.NewRow
|
||||
Dr("CODIGO") = drt("CuentaCodigo")
|
||||
Dr("Cuenta") = drt("CuentaNombre")
|
||||
Dr("Cargo") = If(drt("TipoMovto").ToString = "False", drt("ImporteMN"), "0")
|
||||
@@ -6389,7 +6368,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
End If
|
||||
|
||||
Dim rds = New ReportDataSource("DataSet1", dtMovs)
|
||||
Dim rds As New ReportDataSource("DataSet1", dtMovs)
|
||||
reportDataSetsList.Add(rds)
|
||||
|
||||
Dim dtnc As New DataTable
|
||||
@@ -6398,7 +6377,7 @@ Partial Class PopUpVerFactura
|
||||
dtnc = ObjCompra.DtResultados
|
||||
End If
|
||||
ObjCompra.Dispose()
|
||||
Dim rds2 = New ReportDataSource("DataSet2", dtnc)
|
||||
Dim rds2 As New ReportDataSource("DataSet2", dtnc)
|
||||
reportDataSetsList.Add(rds2)
|
||||
dtnc.Dispose()
|
||||
|
||||
@@ -6538,7 +6517,7 @@ Partial Class PopUpVerFactura
|
||||
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
||||
PS = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
|
||||
If Modalidad = "Individual" Then
|
||||
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||
Dim reporteByte As New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||
|
||||
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
||||
@@ -6547,7 +6526,7 @@ Partial Class PopUpVerFactura
|
||||
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
||||
|
||||
For i As Integer = 0 To Cant
|
||||
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||
Dim reporteByte As New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||
|
||||
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
||||
@@ -6586,7 +6565,7 @@ Partial Class PopUpVerFactura
|
||||
Dim Lote As String = DetalleRow.Item("Lote").ToString
|
||||
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
||||
If Modalidad = "Individual" Then
|
||||
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||
Dim reporteByte As New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||
|
||||
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
||||
@@ -6595,7 +6574,7 @@ Partial Class PopUpVerFactura
|
||||
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
||||
|
||||
For i As Integer = 0 To Cant
|
||||
Dim reporteByte = New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||
Dim reporteByte As New MemoryStream(GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS))
|
||||
|
||||
Dim docEtiqueta As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||
docEtiqueta.CopyPagesTo(1, docEtiqueta.GetNumberOfPages(), pdfdoc)
|
||||
@@ -6716,7 +6695,7 @@ Partial Class PopUpVerFactura
|
||||
ObjPS.Dispose()
|
||||
|
||||
|
||||
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 DtDatos As New DataTable
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
@@ -6956,7 +6935,7 @@ Partial Class PopUpVerFactura
|
||||
Dim CveMonedaImp As Integer
|
||||
Dim TipoPolImp As String
|
||||
Dim RutaReporte As String
|
||||
Dim params = New List(Of ReportParameter)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
|
||||
TipoPolImp = If(drp("CveTipoPoliza").ToString.ToEntero = 1, "Ingreso", If(drp("CveTipoPoliza").ToString.ToEntero = 2, "Egreso", "Diario"))
|
||||
CveTipoPolizaImp = drp("CveTipoPoliza").ToString.ToEntero
|
||||
|
||||
@@ -1338,7 +1338,7 @@ Partial Class Compras_Proveedores
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(273) Then
|
||||
If CType(sender, GridView).ID = "GvA" And e.Row.DBCampo("CveCompra").ToEntero > 0 And e.Row.DBCampo("TipoDocto") = "NC" Then
|
||||
Dim Parametros = Encripta($"CveCompra={e.Row.DBCampo("CveCompra").ToEntero}&SerieFolio={e.Row.DBCampo("SerieFolio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveProveedor={CveProveedor}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}&FechaCompra={e.Row.DBCampo("Fecha")}")
|
||||
Dim Parametros As String = Encripta($"CveCompra={e.Row.DBCampo("CveCompra").ToEntero}&SerieFolio={e.Row.DBCampo("SerieFolio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveProveedor={CveProveedor}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}&FechaCompra={e.Row.DBCampo("Fecha")}")
|
||||
e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
||||
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinC&P={Parametros}"
|
||||
End If
|
||||
@@ -1452,8 +1452,8 @@ Partial Class Compras_Proveedores
|
||||
Private Sub CargaCuentasDDL(Ddl As DropDownList, CveFuncionalidad As Integer)
|
||||
|
||||
'CARGA LO YA SELECCIONADO
|
||||
Dim CveSeleccionado = -1
|
||||
Dim Seleccionado = ""
|
||||
Dim CveSeleccionado As Integer = -1
|
||||
Dim Seleccionado As String = ""
|
||||
Seleccionado = Ddl.SelectedItem.Text
|
||||
CveSeleccionado = Ddl.SelectedValue.ToEntero
|
||||
|
||||
@@ -1544,7 +1544,7 @@ Partial Class Compras_Proveedores
|
||||
Dim tIdContaProveedor As Integer
|
||||
Dim CuentaAbono As Integer
|
||||
|
||||
Dim ErrorBancos = False
|
||||
Dim ErrorBancos As Boolean = False
|
||||
Dim ErrorConta As Boolean = False
|
||||
Dim ErrorContactos As Boolean = False
|
||||
Dim ErrorSucursales As Boolean = False
|
||||
@@ -1645,7 +1645,7 @@ Partial Class Compras_Proveedores
|
||||
If IdCuentaContable > 0 Then
|
||||
|
||||
ObjContaAC.GetCuentas(IdCuentaContable, "-1", -1)
|
||||
Dim dt = ObjContaAC.DtResultados
|
||||
Dim dt As DataTable = ObjContaAC.DtResultados
|
||||
Dim CtaCodigo As String
|
||||
|
||||
If dt.Rows.Count = 1 Then
|
||||
@@ -1836,7 +1836,7 @@ Partial Class Compras_Proveedores
|
||||
Dim CreoCuenta As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC Or (UsuarioActual.Empresa.UsaContabilidad And UsuarioActual.Empresa.Funcionalidad(322).ToString.Trim.ToEntero = 0)) Then
|
||||
Dim ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim drCuenta As DataRow = ObjContaAC.DtResultados.FiltroPrimero("")
|
||||
If drCuenta IsNot Nothing Then
|
||||
CuentaAbono = drCuenta("Id").ToString.ToEntero
|
||||
@@ -2962,8 +2962,8 @@ Partial Class Compras_Proveedores
|
||||
|
||||
If Adjunto.Trim.Length > 0 Then
|
||||
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "Edoc/Proveedor/" & CveProveedor & "/" & Adjunto
|
||||
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
ImgDownLoad.Visible = True
|
||||
@@ -3378,7 +3378,7 @@ Partial Class Compras_Proveedores
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If CveProveedor < 0 Then
|
||||
For Index = 1 To TempDTCuentasBancos.Rows.Count
|
||||
For Index As Integer = 1 To TempDTCuentasBancos.Rows.Count
|
||||
TempDTCuentasBancos.Rows(Index - 1)("CveCuentaDeposito") = Index
|
||||
Next
|
||||
TempDTCuentasBancos.AcceptChanges()
|
||||
@@ -3455,7 +3455,7 @@ Partial Class Compras_Proveedores
|
||||
Alert("No se pudo borrar la Cuenta Bancaria. Por favor intente nuevamente.", TipoMensaje.MsgError)
|
||||
End If
|
||||
Else
|
||||
Dim index = GvRow.RowIndex
|
||||
Dim index As Integer = GvRow.RowIndex
|
||||
TempDTCuentasBancos.Rows.RemoveAt(index)
|
||||
Alert("Cuenta Bancaria borrada con éxito.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
@@ -3626,7 +3626,7 @@ Partial Class Compras_Proveedores
|
||||
'Dim DtMonedas As New DataTable
|
||||
'DtMonedas.Columns.Add("CveMoneda", GetType(Integer))
|
||||
'DtMonedas.Columns.Add("Abreviatura", GetType(String))
|
||||
Dim OcupaFiltro = False
|
||||
Dim OcupaFiltro As Boolean = False
|
||||
|
||||
If CType(GVHistorial.DataSource, DataTable) IsNot Nothing AndAlso CType(GVHistorial.DataSource, DataTable).MAX("CveMoneda").ToEntero > 1 Then
|
||||
OcupaFiltro = True
|
||||
@@ -3717,10 +3717,10 @@ Partial Class Compras_Proveedores
|
||||
Dim DTCxPTempral As DataTable = Nothing
|
||||
|
||||
'OBTENEMOS LOS DATOS
|
||||
Dim FI = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||
Dim FF = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||
Dim FVI = If(txtFechaVI.Text = "" Or txtFechaVI.Text = "__/__/____", "-1", txtFechaVI.Text)
|
||||
Dim FVF = If(txtFechaVF.Text = "" Or txtFechaVF.Text = "__/__/____", "-1", txtFechaVF.Text)
|
||||
Dim FI As String = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||
Dim FF As String = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||
Dim FVI As String = If(txtFechaVI.Text = "" Or txtFechaVI.Text = "__/__/____", "-1", txtFechaVI.Text)
|
||||
Dim FVF As String = If(txtFechaVF.Text = "" Or txtFechaVF.Text = "__/__/____", "-1", txtFechaVF.Text)
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetCxPProveedor(CveProveedor, FI, FF, -1, -1, -1, -1, CveMonedaFiltro, -1, RBSucursal.SelectedValue.ToEntero, -1, FVI, FVF) Then
|
||||
@@ -3729,7 +3729,7 @@ Partial Class Compras_Proveedores
|
||||
|
||||
If DTCxPTempral IsNot Nothing AndAlso DTCxPTempral.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = DTCxPTempral.Rows(0)
|
||||
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("TipoCuentas", DdlTipoCuentasCxP.SelectedItem.Text))
|
||||
@@ -4052,10 +4052,10 @@ Partial Class Compras_Proveedores
|
||||
If rblreporte.SelectedValue = "cxp" Then
|
||||
|
||||
'OBTENEMOS LOS DATOS
|
||||
Dim FI = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||
Dim FF = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||
Dim FVI = If(txtFechaVI.Text = "" Or txtFechaVI.Text = "__/__/____", "-1", txtFechaVI.Text)
|
||||
Dim FVF = If(txtFechaVF.Text = "" Or txtFechaVF.Text = "__/__/____", "-1", txtFechaVF.Text)
|
||||
Dim FI As String = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||
Dim FF As String = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||
Dim FVI As String = If(txtFechaVI.Text = "" Or txtFechaVI.Text = "__/__/____", "-1", txtFechaVI.Text)
|
||||
Dim FVF As String = If(txtFechaVF.Text = "" Or txtFechaVF.Text = "__/__/____", "-1", txtFechaVF.Text)
|
||||
|
||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {TxtFechaInicioCXP.Text}"
|
||||
Dim FechaFn As String = $" <b>Fecha Fin:</b> {TxtFechaFinCXP.Text}"
|
||||
@@ -4105,8 +4105,8 @@ Partial Class Compras_Proveedores
|
||||
|
||||
'OBTENEMOS LOS DATOS
|
||||
Dim DtANC As DataTable
|
||||
Dim FI = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||
Dim FF = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||
Dim FI As String = If(TxtFechaInicioCXP.Text = "" Or TxtFechaInicioCXP.Text = "__/__/____", "-1", TxtFechaInicioCXP.Text)
|
||||
Dim FF As String = If(TxtFechaFinCXP.Text = "" Or TxtFechaFinCXP.Text = "__/__/____", "-1", TxtFechaFinCXP.Text)
|
||||
Dim CveProveedorSucursal As Integer = RBSucursal.SelectedValue.ToEntero()
|
||||
If ObjMovtos.GetAnticiposProveedor(CveProveedor, If(CveProveedorSucursal = 0, -1, CveProveedorSucursal), CveMoneda, -1, FI, FF) Then
|
||||
DtANC = If(DdlTipoCuentasCxP.SelectedValue = "-1", ObjMovtos.DtResultados, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, FechaVencimiento"))
|
||||
|
||||
@@ -787,16 +787,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
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"
|
||||
|
||||
If MsgError = "" AndAlso ObjMov.ValidacionPrePolizaCuadre(CvePrePolizaPago, 1, AutoConta:=AutoConta) Then
|
||||
@@ -888,14 +878,6 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
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
|
||||
End Function
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr class="SubTotales">
|
||||
<td style="width: 25px;">
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
<asp:CheckBox ID="Chk" runat="server" />
|
||||
</td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
|
||||
@@ -144,6 +144,7 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas
|
||||
if (UsuarioActual.Empresa.TipoContabilidad == 1) // conta SIG
|
||||
{
|
||||
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").NavigateUrl = $"/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}";
|
||||
}
|
||||
|
||||
@@ -190,7 +190,6 @@
|
||||
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -253,12 +252,10 @@
|
||||
<%--<asp:BoundField HeaderText="IVA ND" DataField="IVANoDeducible" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<%--<asp:BoundField HeaderText="IVA ND <br/>8%" DataField="ValorIvaNoDeducible08" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
<%-- <asp:BoundField HeaderText="IVA ND 16%" DataField="ValorIvaNoDeducible16" DataFormatString="{0:#,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
|
||||
<asp:BoundField HeaderText="IVA <br/>Importación " HtmlEncode="False" DataField="IVAImportacion" Visible="false" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">RetIVA <br/>Hon/Ser.Prof.</asp:Label>
|
||||
<asp:Label ID="LblHRetIVAHon" data-toggle="tooltip" data-placement="top" ToolTip="Ret IVA Honorario/Serv. Prof." runat="server">Ret IVA <br/>Hon/Ser.Prof.</asp:Label>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblRetIVAHon" runat="server" Text='<%# Eval("RetIVAHonorario", "{0:N2}") %>'></asp:Label>
|
||||
@@ -270,12 +267,12 @@
|
||||
<asp:BoundField HeaderText="Ret IVA <br/> Serv." HtmlEncode="False" DataField="RetIVAServicios" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<asp:BoundField HeaderText="Ret ISR <br/> Honorario" HtmlEncode="False" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret ISR <br/> Arrendamiento" HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret ISR <br/> Arrenda." HtmlEncode="False" DataField="RetISRArrend" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret ISR <br/> Resico" HtmlEncode="False" DataField="RetISRResico" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="T.C.P." DataField="TipoCambioPago" DataFormatString="{0:##.####}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total ME." DataField="TotalME" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Fecha Documento" DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Doc." DataField="FechaDocumento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" />
|
||||
|
||||
<%-- <asp:BoundField HeaderText="IEPS 3%" DataField="IEPS3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
@@ -313,6 +310,7 @@
|
||||
<asp:GridView ID="GvIVA2" runat="server" EmptyDataText="" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" Width="400px" GridLines="None" AutoGenerateColumns="false"
|
||||
OnRowDataBound="GvIVA2_RowDataBound" DataKeyNames="PorcentajeIVA" >
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoIVA" />
|
||||
<asp:BoundField HeaderText="Porcentaje" DataField="PorcentajeIVA" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Base" DataField="Base" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -99,9 +99,7 @@
|
||||
<div class="catcuentas left">Cuenta</div>
|
||||
<div class="catcuentas right">
|
||||
<asp:TextBox ID="TxtCuenta" Style="width: 200px" runat="server" MaxLength="30"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender TargetControlID="Tcuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||
<asp:TextBox ID="Tcuenta" Style="width: 100px" runat="server" MaxLength="30" Visible="false"></asp:TextBox>
|
||||
|
||||
<ajax:MaskedEditExtender TargetControlID="TxtCuenta" ID="MEECuenta" runat="server" MaskType="Number" AutoComplete="True" AutoCompleteValue="0" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-line">
|
||||
|
||||
@@ -149,20 +149,18 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Private Sub CargaDatos()
|
||||
'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
|
||||
If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
'para obtener la mascara, tomo el primer dato y reemplazo los numeros por cero
|
||||
Dim Mascara As String = "####-####-###"
|
||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||
Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
||||
End If
|
||||
Dim Mascara As String = UsuarioActual.Empresa.ContaFormatoCuenta.Replace("X", "9") '"###-##-####"
|
||||
'If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||
' Mascara = DtDatos.Rows(0)("Codigo").ToString.Replace("1", "0").Replace("2", "0").Replace("3", "0").Replace("4", "0").Replace("5", "0").Replace("6", "0").Replace("7", "0").Replace("8", "0").Replace("9", "0")
|
||||
'End If
|
||||
|
||||
MEECuenta.Mask = Mascara.Replace("0", "9")
|
||||
MEECuenta.Mask = Mascara '.Replace("0", "9")
|
||||
MEECuenta.AutoComplete = True
|
||||
MEECuenta.AutoCompleteValue = Mascara
|
||||
|
||||
@@ -432,7 +430,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
Dim CuentaEfectivo As Integer = 0
|
||||
'Dim Afectable As Integer = 1 'If(DcuentaMayor.SelectedValue <> 2, 0, 1) ' cuando sea tipo 2, va a ser afectable
|
||||
Tcuenta.Text.Replace("-", "")
|
||||
TxtCuenta.Text.Replace("-", "")
|
||||
Dim idnew As Integer = 0
|
||||
|
||||
Dim CveConceptoContable As Integer = DdlConcepto.SelectedValue.ToEntero()
|
||||
|
||||
@@ -156,6 +156,10 @@
|
||||
<DataField>CodigoObjetoImpuesto</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="NumeroPedimento">
|
||||
<DataField>NumeroPedimento</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DsOC</rd:DataSetName>
|
||||
@@ -2399,7 +2403,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<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>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
<FontWeight>Normal</FontWeight>
|
||||
|
||||
@@ -822,9 +822,6 @@
|
||||
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Serie" Visible="false">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("Serie")%>' Style="text-align: right;"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbSerie" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -832,9 +829,6 @@
|
||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" Visible="false">
|
||||
<EditItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("Lote")%>' Style="text-align: right;"></asp:TextBox>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LbLote" runat="server" Text='<%# Eval("Lote")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -848,11 +842,6 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sección" Visible="false">
|
||||
<EditItemTemplate>
|
||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" CssClass="select2me" runat="server">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LbSeccionAlmacen" runat="server" Text='<%# Eval("SeccionAlmacen")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -1748,9 +1737,9 @@
|
||||
<br />
|
||||
</div>
|
||||
<div runat="server" id="divClasificacionProducto" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="hidden">
|
||||
<%-- <asp:DropDownList ID="DdlClasificacion" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%" Class="hidden">
|
||||
<asp:ListItem Selected="True" Text="Seleccione la Clasificación (Todas)" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</asp:DropDownList>--%>
|
||||
<%--<br />--%>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlProducto2" CssClass="form-control input-sm select2me" CssStyle="width: 50%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<label style="line-height: 0.8" for="<%= DdlProducto2.ClientID.ToString()%>">Producto</label>
|
||||
@@ -1768,13 +1757,13 @@
|
||||
<br />
|
||||
</div>
|
||||
<div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="120px" Visible="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="120px"></asp:TextBox>
|
||||
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
||||
<label for="<%= TxtnSerie.ClientID.ToString()%>">Serie</label>
|
||||
<br />
|
||||
</div>
|
||||
<div runat="server" id="divLote" class="form-group form-md-line-input input-iconright" visible="false">
|
||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px"></asp:TextBox>
|
||||
<label for="<%= TxtnLote.ClientID.ToString()%>">Lote</label>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
@@ -539,10 +539,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function isWhitFamily() As Boolean
|
||||
Return (UsuarioActual.CveEmpresa = 66)
|
||||
End Function
|
||||
|
||||
#Region " VALORES INICIALES "
|
||||
Protected Sub CreaDT()
|
||||
Dim dt As New DataTable
|
||||
@@ -603,16 +599,16 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
'Llenar el dropdownlist de Secciones
|
||||
If UsuarioActual.CveEmpresa = 66 Then
|
||||
DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
Else
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
End If
|
||||
ObjClasificaciones.Dispose()
|
||||
End If
|
||||
DdlClasificacion.DataBind()
|
||||
'If UsuarioActual.CveEmpresa = 66 Then
|
||||
' DdlClasificacion.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
'Else
|
||||
' Dim ObjClasificaciones As New ClsClasificaciones
|
||||
' If ObjClasificaciones.GetClasificacionesExistencias(UsuarioActual.CveEmpresa) Then
|
||||
' DdlClasificacion.DataSource = ObjClasificaciones.DtResultados
|
||||
' End If
|
||||
' ObjClasificaciones.Dispose()
|
||||
'End If
|
||||
'DdlClasificacion.DataBind()
|
||||
|
||||
'DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlSeccionAlmacen.DataBind()
|
||||
@@ -1293,7 +1289,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiarAgregar()
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
'DdlClasificacion.SelectedValue = "-1"
|
||||
txtCantidad.Text = ""
|
||||
TxtnLote.Text = ""
|
||||
TxtObservacionesdetalle.Text = ""
|
||||
@@ -1459,7 +1455,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtnLote.Text = ""
|
||||
LblCodigo.Text = ""
|
||||
TxtnSerie.Text = ""
|
||||
TxtnLote.Text = ""
|
||||
TxtnFechaCaducidad.Text = ""
|
||||
HdnCodigoAF.Value = "-1"
|
||||
HdnCveActivoFijo.Value = "-1"
|
||||
@@ -2540,30 +2535,22 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtFolio.Text = Folio.ToString
|
||||
FolioAsignado = Folio
|
||||
End Sub
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
ChangeDdlProducto()
|
||||
End Sub
|
||||
'Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
' ChangeDdlProducto()
|
||||
'End Sub
|
||||
Private Sub ChangeDdlProducto()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "" Then
|
||||
Dim filtro As String = ""
|
||||
If Not (DdlClasificacion.SelectedValue = "-1") Then
|
||||
|
||||
If isWhitFamily() Then
|
||||
filtro = String.Format("CveSubFamilia={0}", DdlClasificacion.SelectedValue)
|
||||
Else
|
||||
filtro = String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue)
|
||||
End If
|
||||
End If
|
||||
'If Not (DdlClasificacion.SelectedValue = "-1") Then
|
||||
' filtro = String.Format("CveClasificacion={0}", DdlClasificacion.SelectedValue)
|
||||
'End If
|
||||
|
||||
DdlProducto2.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros($"{filtro} AND CveTipoPS = 2", "PSCodigo")
|
||||
DdlProducto2.DataBind()
|
||||
DdlProducto2.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
If isWhitFamily() Then
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-idSubFamilia", DdlClasificacion.SelectedValue)
|
||||
Else
|
||||
DdlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.SelectedValue)
|
||||
End If
|
||||
'DdlProducto2.ddlWS.Attributes.Add("data-idClasificacion", DdlClasificacion.SelectedValue)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -2571,27 +2558,20 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ElProductoChange()
|
||||
End Sub
|
||||
Private Sub ElProductoChange()
|
||||
TxtnSerie.Visible = False
|
||||
divSerie.Visible = False
|
||||
|
||||
TxtnLote.Visible = False
|
||||
divSerie.Visible = False
|
||||
divLote.Visible = False
|
||||
|
||||
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
|
||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
Dim dr As DataRow = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If dr IsNot Nothing Then
|
||||
If CBool(dr("AplicaSerie")) Then
|
||||
|
||||
TxtnSerie.Visible = True
|
||||
divSerie.Visible = True
|
||||
|
||||
End If
|
||||
If CBool(dr("AplicaLote")) Then
|
||||
TxtnLote.Visible = True
|
||||
divLote.Visible = True
|
||||
|
||||
End If
|
||||
If CBool(dr("AplicaSeccion")) Then
|
||||
divSeccionAlmacen.Visible = True
|
||||
@@ -2604,7 +2584,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
If CBool(dr("AplicaCaducidad")) Then
|
||||
divCaducidad.Visible = True
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -2628,7 +2607,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||
'LblSerie.Visible = False
|
||||
TxtnSerie.Visible = False
|
||||
divSerie.Visible = False
|
||||
'TrSerieLote.Visible = False
|
||||
'TrSerieLote2.Visible = False
|
||||
|
||||
@@ -2641,16 +2620,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtnSerie.Visible = True
|
||||
End If
|
||||
|
||||
TxtnLote.Visible = False
|
||||
'divLote.Visible = False
|
||||
'TrLote.Visible = False
|
||||
'TrLote2.Visible = False
|
||||
GvM.Columns(10).Visible = False
|
||||
|
||||
'TxtnBatch.Visible = False
|
||||
'TrBatch.Visible = False
|
||||
'TrBatch2.Visible = False
|
||||
'GvM.Columns(11).Visible = False
|
||||
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
tdPUExtranjero.Visible = False
|
||||
tdPUExtranjero2.Visible = False
|
||||
@@ -2724,12 +2698,11 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If (CveMovimiento > 0) Or (TieneRelacionado > 0 Or CveMovimientoRelacionado > 0) Then 'CveMovimiento > 0 And e.Row.DBCampo("TienePrePoliza").ToEntero > 0
|
||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
||||
e.Row.FCTextBox("LblEditCodigo").Enabled = False
|
||||
e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||
e.Row.FCTextBox("TxtLote").Enabled = False
|
||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
||||
'e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||
'e.Row.FCTextBox("TxtLote").Enabled = False
|
||||
'e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False'
|
||||
End If
|
||||
e.Row.FCTextBox("TxtSerie").Enabled = True
|
||||
'e.Row.FCTextBox("TxtSerie").Enabled = True
|
||||
End If
|
||||
|
||||
If EsNuevoMov Then
|
||||
@@ -2795,7 +2768,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
If CveMovimiento > 0 Then
|
||||
CveMovimientoDetalleEdit = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
txtCantidad.Enabled = False
|
||||
DdlClasificacion.Enabled = False
|
||||
'DdlClasificacion.Enabled = False
|
||||
DdlProducto2.Enabled = False
|
||||
DdlUnidad.Enabled = False
|
||||
|
||||
@@ -2808,7 +2781,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ElProductoChange()
|
||||
DdlUnidad.SelectedValue = GvRow.DataKey("CveUM")
|
||||
CveAFEdit = GvRow.DataKey("CveAF").ToEntero
|
||||
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
|
||||
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.ToString("0.00########")
|
||||
TxtnSerie.Text = GvRow.DataKey("Serie")
|
||||
TxtnLote.Text = GvRow.DataKey("Lote")
|
||||
TxtnFechaCaducidad.Text = GvRow.DataKey("FechaCaducidad").ToDate.ToShortDateString
|
||||
@@ -5313,7 +5286,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Private Sub limpiarModalDetalle()
|
||||
txtCantidad.Enabled = True
|
||||
DdlClasificacion.Enabled = True
|
||||
'DdlClasificacion.Enabled = True
|
||||
DdlProducto2.Enabled = True
|
||||
DdlUnidad.Enabled = True
|
||||
divCantidad.Visible = True
|
||||
|
||||
@@ -508,13 +508,11 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
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"))
|
||||
|
||||
|
||||
|
||||
Select Case e.Row.DBCampo("TipoEntrega").ToString().ToEntero()
|
||||
Case 1
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
Dim Css = "Texto"
|
||||
Dim Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DBCampo("CveVenta")}"
|
||||
Dim Css As String = "Texto"
|
||||
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>"
|
||||
End If
|
||||
|
||||
@@ -532,8 +530,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
e.Row.FCLinkButton("BtnSurtir").Text = "<i class='fa fa-arrow-left' > Recibir</i>"
|
||||
End If
|
||||
Case 2
|
||||
Dim Css = "Texto"
|
||||
Dim Liga = $"/Inventarios/TrasladoSolicitud.aspx?&CveTraspasoSolicitud={e.Row.DBCampo("CveTraspasoSolicitud")}"
|
||||
Dim Css As String = "Texto"
|
||||
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.FCLinkButton("BtnSurtir").CssClass = "btn btn-primary btn-sm"
|
||||
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 "
|
||||
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Boton = CType(sender, LinkButton)
|
||||
Dim Boton As LinkButton = CType(sender, LinkButton)
|
||||
CveVentaAD = -1
|
||||
|
||||
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)
|
||||
ArchivoBitacoraDetalle = String.Format("{0}Temp\EntregaDTD_{1}_{2}.xml", UsuarioActual.Empresa.Ruta, UsuarioActual.CveUsuario, CveVenta)
|
||||
If ArchivoBitacora <> "" Then
|
||||
Dim Archivo = New System.IO.FileInfo(ArchivoBitacora)
|
||||
Dim Archivo As New System.IO.FileInfo(ArchivoBitacora)
|
||||
If Archivo.Exists() Then
|
||||
HplCargaBitacora.Visible = True
|
||||
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("CantidadGV") Then DtDatos.Columns.Add("CantidadGV", 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
|
||||
Dr("Consec") = Index
|
||||
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()))
|
||||
Else
|
||||
'[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}")
|
||||
End If
|
||||
|
||||
@@ -841,7 +839,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
LbObservaciones.Text = DtDatos.Rows(0)("Observaciones").ToString()
|
||||
|
||||
Dim Index = 1
|
||||
Dim Index As Integer = 1
|
||||
For Each Dr As DataRow In DtDatos.Rows
|
||||
Dr("Consec") = Index
|
||||
Index += 1
|
||||
@@ -962,7 +960,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
UpVenta.Update()
|
||||
|
||||
'CARGA LO PRECARGADO CON SERIE
|
||||
Dim Contador = 0
|
||||
Dim Contador As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.DataKey("CvePS").ToEntero() = CvePSSerie AndAlso DtDatosDetalle IsNot Nothing Then
|
||||
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.FCCheckBox("cbInv").Enabled = False
|
||||
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()
|
||||
Else
|
||||
e.Row.FCTextBox("TbCantidadF").Text = "0"
|
||||
@@ -1004,7 +1002,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
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()
|
||||
PSSerie = e.Row.DBCampo("PS").ToString()
|
||||
CvePSSerie = e.Row.DBCampo("CvePS").ToEntero()
|
||||
@@ -1042,7 +1040,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = False
|
||||
|
||||
'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
|
||||
CType(e.Row.FindControl("RFVCaducidad"), RequiredFieldValidator).Enabled = True
|
||||
e.Row.FCTextBox("TxtCaducidad").Enabled = True
|
||||
@@ -1056,13 +1054,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
'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").Enabled = True
|
||||
Else
|
||||
e.Row.FCTextBox("TxtLote").ReadOnly = True
|
||||
End If
|
||||
|
||||
Else
|
||||
e.Row.FCTextBox("TxtLote").Visible = False
|
||||
End If
|
||||
@@ -1126,7 +1123,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
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)
|
||||
LbCantidad.Text = Argumentos(3)
|
||||
@@ -1140,7 +1137,6 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveConsecSerie = Argumentos(4).ToEntero()
|
||||
CveMetodoInventario = Argumentos(5).ToEntero()
|
||||
|
||||
|
||||
If CveMetodoInventario = 6 Then
|
||||
RegistraScript("$('#DivLote').modal({backdrop: 'static', keyboard: false});")
|
||||
CargaLote()
|
||||
@@ -1151,7 +1147,6 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
UpSerie.Update()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#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")
|
||||
|
||||
Dim AplicaCaducidad = False
|
||||
Dim AplicaCaducidad As Boolean = False
|
||||
Dim dttt As DataTable = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie)
|
||||
If dttt IsNot Nothing AndAlso dttt.Rows.Count > 0 Then
|
||||
AplicaCaducidad = If(dttt.FiltraParametros("").Rows(0)("AplicaCaducidad").ToString() = "True", True, False)
|
||||
@@ -1238,7 +1233,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
'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
|
||||
If Gvr.DataKey("AplicaSerie") = "True" Then
|
||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||
@@ -1309,7 +1304,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
'Valida Existencia
|
||||
If TipoMovimiento = 1 Then
|
||||
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
|
||||
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")
|
||||
@@ -1319,7 +1314,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ObjInventarios.Dispose()
|
||||
Else
|
||||
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
|
||||
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")
|
||||
@@ -1328,8 +1323,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Dim Row = DtDatosDetalle.NewRow
|
||||
Dim Row As DataRow = DtDatosDetalle.NewRow
|
||||
|
||||
Row("ConsecId") = CveConsecSerie
|
||||
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
||||
@@ -1539,15 +1533,15 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Row = DtDatosDetalleLote.NewRow
|
||||
Dim CantidadLote = TxtCantidadLote.Text.ToDecimal
|
||||
Dim Row As DataRow = DtDatosDetalleLote.NewRow
|
||||
Dim CantidadLote As Decimal = TxtCantidadLote.Text.ToDecimal
|
||||
|
||||
Dim MensajeSinExistencias As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
'VERIFICA EXISTENCIAS
|
||||
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
|
||||
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')")
|
||||
@@ -1556,7 +1550,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
Else
|
||||
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
|
||||
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')")
|
||||
@@ -1566,7 +1560,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
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
|
||||
FechaCaducidad = ObjInventarios.DtResultados.Rows(0)("FechaCaducidad").ToString().ToDate.ToShortDateString
|
||||
End If
|
||||
@@ -1619,19 +1613,19 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
TdSeriePS.Visible = False
|
||||
Dim Existe = False
|
||||
Dim PSTemp = ""
|
||||
Dim Existe As Boolean = False
|
||||
Dim PSTemp As String = ""
|
||||
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
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
|
||||
|
||||
''VALIDA EXISTENCIA
|
||||
If Not TipoDocto.Contiene("Dev") Then
|
||||
If TipoMovimiento = 1 Then
|
||||
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()
|
||||
If Not Existencia >= TxtCantidad.Text.ToDecimal + 1 Then
|
||||
TxtCodigoPS.Text = ""
|
||||
@@ -1641,7 +1635,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
Else
|
||||
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
|
||||
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);")
|
||||
@@ -1663,7 +1657,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit Sub
|
||||
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
|
||||
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
||||
@@ -1702,7 +1696,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
End Sub
|
||||
Private Sub VerificaVentaSurtida()
|
||||
Dim Surtida = True
|
||||
Dim Surtida As Boolean = True
|
||||
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.DataKey("CantidadF").ToDecimal <> Gvr.FCTextBox("TbCantidadF").Text.ToDecimal Then
|
||||
@@ -1729,7 +1723,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
AgregaCantidadEspecial()
|
||||
End Sub
|
||||
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
|
||||
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString().FormatoNumero
|
||||
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
||||
@@ -1872,7 +1866,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim FolioVirtual As Integer = -1
|
||||
|
||||
'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
|
||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
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("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
|
||||
DtDevSinCosto.Columns.Add("CveAlmacen", GetType(Integer))
|
||||
@@ -1957,7 +1950,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Next
|
||||
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.DtResultados.Rows.Count > 0 Then
|
||||
TieneErrorExistencia = True
|
||||
@@ -2019,7 +2012,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim DrMovto = DtTraspasos.NewRow
|
||||
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||
@@ -2069,7 +2062,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim DrMovto = DtTraspasos.NewRow
|
||||
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
||||
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||
@@ -2212,7 +2205,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim DrMovto = DtTraspasos.NewRow
|
||||
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||
@@ -2266,7 +2259,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim DrMovto = DtTraspasos.NewRow
|
||||
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||
@@ -2319,7 +2312,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim DrMovto = DtTraspasos.NewRow
|
||||
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||
DrMovto("Almacen") = Dr1("Almacen").ToString().ToEntero()
|
||||
DrMovto("CveAlmacen") = Dr1("CveAlmacen").ToString().ToEntero()
|
||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||
@@ -2414,7 +2407,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
FolioGarantia = ObjInventario.Folio
|
||||
|
||||
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 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()
|
||||
@@ -2456,16 +2449,16 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
If Not ErrorMovInv AndAlso TipoMovimiento = 2 AndAlso UsuarioActual.Empresa.Funcionalidad(587) = "1" Then
|
||||
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 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,
|
||||
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
|
||||
ErrorMovInv = True
|
||||
@@ -2488,7 +2481,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
If ErrorMovInv Then Exit For
|
||||
|
||||
Dim DrMovto = DtDevSinCosto.NewRow
|
||||
Dim DrMovto As DataRow = DtDevSinCosto.NewRow
|
||||
DrMovto("Almacen") = DdlAlmacen.SelectedItem.Text
|
||||
DrMovto("CveAlmacen") = DdlAlmacen.SelectedValue.ToEntero()
|
||||
DrMovto("CveMovimientoEntrada") = CveMovimientoDevolucionSinCosto
|
||||
@@ -2515,7 +2508,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero() And TipoDocto <> "Rem" Then CveAlmacenTraspasoDestino = 0
|
||||
|
||||
If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then
|
||||
Dim ConceptoMovimiento = 3
|
||||
Dim ConceptoMovimiento As Integer = 3
|
||||
ConceptoMovimiento = If(TipoMovimiento = 1, ConceptoMovimiento, 18)
|
||||
ConceptoMovimiento = If(CveAlmacenTraspasoDestino > 0, 8, ConceptoMovimiento)
|
||||
|
||||
@@ -2692,10 +2685,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If TipoMovimiento = 2 Then
|
||||
If ObjInventario.VentasAlmacenApartadosGet(CveVentaSurtir) Then
|
||||
|
||||
Dim DtTempApartados = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen")
|
||||
Dim CveMovimientoSalidaApartado = -1
|
||||
Dim CveAlmacenApartado = -1
|
||||
Dim CveAlmacenOrigen = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero())
|
||||
Dim DtTempApartados As DataTable = ObjInventario.DtResultados.FiltraParametros("CveTipoAlmacen = 9", "CveAlmacen")
|
||||
Dim CveMovimientoSalidaApartado As Integer = -1
|
||||
Dim CveAlmacenApartado As Integer = -1
|
||||
Dim CveAlmacenOrigen As Integer = If(CveAlmacenTraspasoDestino > 0, CveAlmacenTraspasoDestino, DdlAlmacen.SelectedValue.ToEntero())
|
||||
Dim CveSeccionAlmacen As Integer = 0
|
||||
Dim ValorTraspaso As Decimal = 0
|
||||
If DtTempApartados IsNot Nothing AndAlso DtTempApartados.Rows.Count > 0 Then
|
||||
@@ -2708,7 +2701,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
FolioSalida = ObjInventario.Folio
|
||||
CveAlmacenApartado = Dr("CveAlmacen").ToString().ToEntero()
|
||||
|
||||
Dim DrMovto = DtTraspasos.NewRow
|
||||
Dim DrMovto As DataRow = DtTraspasos.NewRow
|
||||
DrMovto("Almacen") = Dr("Almacen").ToString().ToEntero()
|
||||
DrMovto("CveAlmacen") = Dr("CveAlmacen").ToString().ToEntero()
|
||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalidaApartado
|
||||
@@ -2898,7 +2891,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
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 PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
@@ -2947,7 +2940,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
'AGREGA BITACORA A VENTA
|
||||
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
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
@@ -3103,7 +3096,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ValorMultiplicador = -1
|
||||
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)
|
||||
|
||||
If CvePrePoliza > 0 Then
|
||||
@@ -3222,16 +3215,16 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Dim ObjGeneral As New ClsGenerales(ObjInventario.IniciaTransacSQL())
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
Dim CveMovimientoSalida As Integer
|
||||
Dim ConceptoMovimiento = 0
|
||||
Dim ConceptoMovimiento As Integer = 0
|
||||
Dim FolioSalida As Integer
|
||||
Dim CveMovimientoEntrada As Integer
|
||||
Dim FolioEntrada As Integer
|
||||
Dim ErrorMovInv As Boolean
|
||||
Dim DtDetalle As New DataTable
|
||||
Dim TextoError = ""
|
||||
Dim TextoError As String = ""
|
||||
|
||||
'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
|
||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||
@@ -3247,7 +3240,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If ObjInventario.EntregaAlmacenTraspasosGet(CveTraspasoSurtir) Then
|
||||
DtDatosTraspaso = ObjInventario.DtResultados
|
||||
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
|
||||
ObjInventario.RollBack()
|
||||
ObjInventario.Dispose()
|
||||
@@ -3268,8 +3261,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
'VALIDA ALMACENES
|
||||
Dim Almacen1 = DdlAlmacen.SelectedValue.ToEntero()
|
||||
Dim Almacen2 = CveAlmacenTraspasoDestino
|
||||
Dim Almacen1 As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||
Dim Almacen2 As Integer = CveAlmacenTraspasoDestino
|
||||
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)
|
||||
ObjInventario.RollBack()
|
||||
@@ -3299,7 +3292,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Next
|
||||
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.DtResultados.Rows.Count > 0 Then
|
||||
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 Cuerpo As New StringBuilder()
|
||||
Dim Destinatario As String = ""
|
||||
Dim MensajeEnviado = False
|
||||
Dim MensajeEnviado As Boolean = False
|
||||
Dim tCvecliente As Integer
|
||||
Dim tCveVendedor As Integer
|
||||
Dim bytes() As Byte = Nothing
|
||||
@@ -3951,7 +3944,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
DtDatosSugerencias.Columns.Add("CantidadSeleccionada", GetType(Double))
|
||||
End If
|
||||
|
||||
Dim Index = 1
|
||||
Dim Index As Integer = 1
|
||||
For Each Dr As DataRow In DtDatosSugerencias.Rows
|
||||
Dr("Consec") = Index
|
||||
|
||||
@@ -4005,7 +3998,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Protected Sub BtnImprimirSugerencias_Click(sender As Object, e As EventArgs)
|
||||
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 params As New List(Of ReportParameter)
|
||||
|
||||
@@ -1040,7 +1040,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
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)
|
||||
If ArchivoBitacora <> "" Then
|
||||
Dim Archivo = New System.IO.FileInfo(ArchivoBitacora)
|
||||
Dim Archivo As New System.IO.FileInfo(ArchivoBitacora)
|
||||
If Archivo.Exists() Then
|
||||
HplCargaBitacora.Visible = True
|
||||
uppCargaBitacora.Update()
|
||||
@@ -1467,7 +1467,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
e.Row.FCTextBox("TbCantidadF").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
|
||||
|
||||
'' Empresa Acumuladores
|
||||
@@ -1612,7 +1612,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
For Each Gvr As GridViewRow In GvInv.Rows
|
||||
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("AplicaSerie") = "True" Then
|
||||
@@ -1625,7 +1625,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Exit Sub
|
||||
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
|
||||
RegistraScript("CantidadEspecial();window.setTimeout(FocusCantidadEspecial,200);")
|
||||
@@ -1639,9 +1639,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
'VERIFICA EXISTENCIAS
|
||||
Dim MensajeSinExistencias As New StringBuilder
|
||||
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 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()
|
||||
|
||||
If Existencia < ExistenciaActual Then
|
||||
@@ -1662,20 +1662,16 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
TxtCodigoPS.Text = ""
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
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
|
||||
DtInv.AcceptChanges()
|
||||
Exit Sub
|
||||
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);")
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
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')")
|
||||
TxtCodigoPS.Text = ""
|
||||
@@ -1695,7 +1691,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
AgregaCantidadEspecial()
|
||||
End Sub
|
||||
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
|
||||
TxtCantidad.Text = (TxtCantidad.Text.ToDecimal + TxtCantidadEspecialDiv.Text.ToDecimal).ToString.FormatoNumero
|
||||
'RegistraScript("$('#ModalCantidad').modal('hide');")
|
||||
@@ -1715,7 +1711,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
#Region " AGREGA POR SERIE/LOTE "
|
||||
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)
|
||||
LbCantidad.Text = Argumentos(4).FormatoNumero
|
||||
@@ -1767,7 +1763,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
'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
|
||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||
@@ -1782,7 +1778,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
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
|
||||
DtInv.AcceptChanges()
|
||||
Next
|
||||
@@ -1806,7 +1802,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim SeriesArreglo = Serie.Trim.Split(";"c)
|
||||
Dim SeriesArreglo As Array = Serie.Trim.Split(";"c)
|
||||
|
||||
'VALIDACION DE SERIES DUPLICADAS
|
||||
Dim MensajeAlert As New StringBuilder
|
||||
@@ -1839,7 +1835,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
Dim MensajeSinExistencias As New StringBuilder
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Index = 0
|
||||
Dim Index As Integer = 0
|
||||
Dim Cantidad As Integer = LbCantidad.Text.ToEntero
|
||||
|
||||
If CargaMasivaSeries Then Cantidad = DtInv.FiltroPrimeroValor("CantidadF", "Consec = " & CveConsecSerie).ToEntero
|
||||
@@ -1848,7 +1844,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
For Each Serie In SeriesArreglo
|
||||
If Serie <> "" Then
|
||||
|
||||
Dim Row = DtDatosDetalle.NewRow
|
||||
Dim Row As DataRow = DtDatosDetalle.NewRow
|
||||
Index = Index + 1
|
||||
If Index > Cantidad Then Exit For
|
||||
|
||||
@@ -1859,7 +1855,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'VERIFICA EXISTENCIAS
|
||||
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
|
||||
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
|
||||
Continue For
|
||||
@@ -1973,7 +1969,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
End Sub
|
||||
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)
|
||||
LbLoteCantidad2.Text = Argumentos(4).FormatoNumero
|
||||
@@ -2002,10 +1998,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End If
|
||||
|
||||
'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
|
||||
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.FCTextBox("TbCantidadF").Enabled = False
|
||||
If DtDatosLoteDetalle IsNot Nothing AndAlso Contador > 0 Then
|
||||
@@ -2017,7 +2013,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
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
|
||||
DtInv.AcceptChanges()
|
||||
Next
|
||||
@@ -2070,7 +2066,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'VERIFICA EXISTENCIAS
|
||||
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
|
||||
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
@@ -2405,11 +2401,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'CONTABILIZAR - SIMPLIFICAR
|
||||
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 Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
@@ -2476,11 +2467,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'CONTABILIZAR - SIMPLIFICAR
|
||||
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 Not ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
@@ -3471,13 +3457,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
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 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>"
|
||||
@@ -3578,14 +3557,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
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 ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||
@@ -4824,7 +4795,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
|
||||
Try
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
@@ -4871,7 +4842,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
For Each RowExcel As DataRow In dt.Rows
|
||||
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
|
||||
|
||||
|
||||
@@ -1455,8 +1455,8 @@ Partial Class Inventarios_RecepcionUsados
|
||||
|
||||
If tmpCostos.Rows.Count > 0 Then
|
||||
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 tCveSubProyecto = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
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 As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen={CveAlmacen}").ToEntero
|
||||
Dim tCveConcepto As Integer = 278
|
||||
|
||||
For Each RowInv As DataRow In tmpCostos.Rows
|
||||
@@ -1471,7 +1471,6 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Correcto = False
|
||||
End If
|
||||
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
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
|
||||
|
||||
'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
|
||||
Correcto = False
|
||||
End If
|
||||
|
||||
@@ -54,7 +54,7 @@ Partial Class Inventarios_RepVentasXSurtir
|
||||
Private Sub CargaDatos()
|
||||
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
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
|
||||
@@ -1270,8 +1270,9 @@
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" Width="70px" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:DropDownList ID="DdlMoneda" runat="server" DataTextField="Moneda" DataValueField="CveMoneda" Width="70px" CssClass="form-control input-sm select2me" ValidationGroup="GrpGuardar" CausesValidation="true"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVMoneda" runat="server" ControlToValidate="DdlMoneda" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Moneda''</b> es necesario, por favor seleccione uno."
|
||||
InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEMoneda" runat="server" HighlightCssClass="vco" TargetControlID="RFVMoneda" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label ID="LblMoneda" runat="server" Text="" Visible="false"></asp:Label>
|
||||
</td>
|
||||
|
||||
@@ -2071,7 +2071,7 @@ Partial Class OC_OC
|
||||
|
||||
Dim Gvr As GridViewRow = CType(CType(sender, DropDownList).BindingContainer, GridViewRow)
|
||||
'Dim filtro As String = ""
|
||||
Dim CveClasificacion = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
||||
Dim CveClasificacion As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
||||
|
||||
' filtro = String.Format("CveClasificacion={0}", CveClasificacion)
|
||||
|
||||
@@ -2085,7 +2085,7 @@ Partial Class OC_OC
|
||||
|
||||
Dim Gvr As GridViewRow = CType(CType(sender, DropDownList).BindingContainer, GridViewRow)
|
||||
Dim filtro As String = ""
|
||||
Dim Cvepsgvd = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
||||
Dim Cvepsgvd As Integer = DirectCast(sender, DropDownList).SelectedValue.ToEntero
|
||||
If Cvepsgvd > 0 Then
|
||||
Dim CboUM As DropDownList = Gvr.FCDropDownList("CboUnidadMedidaEdit")
|
||||
Dim TxtPU As TextBox = Gvr.FCTextBox("TxtImporteEdit")
|
||||
@@ -3591,11 +3591,11 @@ Partial Class OC_OC
|
||||
If CveEstatusFinalError > 0 Then
|
||||
Dim objOrdenCompra As New ClsOC
|
||||
objOrdenCompra.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
'AC
|
||||
Dim ObjAC As ClsContPAQi = Nothing
|
||||
Dim PolizaCancelacion = -1
|
||||
Dim PolizaCancelacion As Integer = -1
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
ObjAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||
ObjAC.IniciaTransacSQL()
|
||||
@@ -3655,8 +3655,8 @@ Partial Class OC_OC
|
||||
' > 0: GENERO POLIZA DE CANCELACION
|
||||
' < 0: ERROR
|
||||
|
||||
Dim ErrorCancelar = False
|
||||
Dim IdPolizaNueva = 0
|
||||
Dim ErrorCancelar As Boolean = False
|
||||
Dim IdPolizaNueva As Integer = 0
|
||||
|
||||
If IDPolizaPresupuestal > 0 Then
|
||||
Dim dt As DataTable
|
||||
@@ -5221,7 +5221,7 @@ Partial Class OC_OC
|
||||
UPEventoBitacora.Update()
|
||||
End Sub
|
||||
Private Function GuardaBitacoraTemporal(ObjEventoBitacora As ClsOIEventos) As Boolean
|
||||
Dim Retorno = False
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Archivo As System.IO.FileInfo = Nothing
|
||||
|
||||
For Each Dr As DataRow In DtBitacora.Rows
|
||||
@@ -5686,7 +5686,7 @@ Partial Class OC_OC
|
||||
Else
|
||||
DivIVAFacturar.Visible = True
|
||||
End If
|
||||
CveMonedaPreferente = dtt.FiltroPrimeroValor("CveConfianzaProveedor").ToEntero()
|
||||
CveMonedaPreferente = dtt.FiltroPrimeroValor("CveMonedaPreferente").ToEntero()
|
||||
If UsuarioActual.Empresa.Funcionalidad(565) = "1" Then
|
||||
Me.CveConfianzaProveedor = dtt.FiltroPrimeroValor("CveConfianzaProveedor").ToEntero()
|
||||
'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
|
||||
|
||||
'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")
|
||||
LblLeyendaProveedorIVA.Text = "IVA 0%"
|
||||
'Si es proveedor extranjero selecciona iva al 0%
|
||||
@@ -5853,7 +5853,7 @@ Partial Class OC_OC
|
||||
|
||||
'CORREO MODIFICADA
|
||||
If EsNuevo = False And DtHistorial IsNot Nothing Then
|
||||
Dim Bitacora = DtHistorial.FiltraParametros("CveConceptoHistorialBitacora <> 1").Rows.Count
|
||||
Dim Bitacora As Integer = DtHistorial.FiltraParametros("CveConceptoHistorialBitacora <> 1").Rows.Count
|
||||
Dim ObjGral As New ClsGenerales
|
||||
If ObjGral.GetHistorialBitacora(-1, CveOrdenCompra, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
DtHistorial = ObjGral.DtResultados.FiltraParametros("CveConceptoHistorialBitacora <> 1")
|
||||
@@ -5867,7 +5867,7 @@ Partial Class OC_OC
|
||||
|
||||
'CORREO PROVEEDOR - SE GENERO OC
|
||||
If CveOCGeneradas.Count > 0 Then
|
||||
For i = 0 To CveOCGeneradas.Count - 1
|
||||
For i As Integer = 0 To CveOCGeneradas.Count - 1
|
||||
EnviarCorreoOrdenCompra(CveOCGeneradas(i))
|
||||
Next
|
||||
|
||||
@@ -6058,7 +6058,7 @@ Partial Class OC_OC
|
||||
Dim OCsGeneradas As New StringBuilder
|
||||
If FolioOCGeneradas.Count > 0 Then
|
||||
OCsGeneradas.Append("Se generaron la(s) siguiente(s) orden(es) de compra: ")
|
||||
For Each FolioOC In FolioOCGeneradas
|
||||
For Each FolioOC As Integer In FolioOCGeneradas
|
||||
OCsGeneradas.Append($" #<b>{FolioOC}</b> ")
|
||||
Next
|
||||
End If
|
||||
@@ -6512,7 +6512,7 @@ Partial Class OC_OC
|
||||
|
||||
Dim dt As New DataTable
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
|
||||
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||
'Try
|
||||
@@ -6645,7 +6645,7 @@ Partial Class OC_OC
|
||||
'Agregar PS
|
||||
If DtDetalle IsNot Nothing Then
|
||||
Dim dr As DataRow = DtDetalle.NewRow
|
||||
Dim DrPS = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||
Dim DrPS As DataRow = GlobalDTPS(CveEmpresaActual, CvePS:=CvePS).FiltroPrimero("")
|
||||
If DrPS Is Nothing Then
|
||||
Alert("Ocurrió un error al cargar la información de los productos del archivo. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||
Continue For
|
||||
@@ -6665,7 +6665,7 @@ Partial Class OC_OC
|
||||
Dim IEPSPSIVA As Decimal = If(DrPS("IEPSGrabaIVA").ToString = "True", DrPS("IEPSPorcentaje").ToString.ToDecimal, 0)
|
||||
Dim CveClasificacion As Integer = DrPS("CveClasificacion").ToString.ToEntero
|
||||
Dim Clasificacion As String = DrPS("Clasificacion").ToString
|
||||
Dim CveActivoFijo = HdnCveActivoFijo.Value.ToEntero
|
||||
Dim CveActivoFijo As Integer = HdnCveActivoFijo.Value.ToEntero
|
||||
Dim IdCuentaPorEjercer As Integer = If(HdnCveCuentaPorEjercer.Value = String.Empty, -1, HdnCveCuentaPorEjercer.Value.ToEntero)
|
||||
Dim IdCuentaComprometido As Integer = If(HdnCveCuentaComprometido.Value = String.Empty, -1, HdnCveCuentaComprometido.Value.ToEntero)
|
||||
Dim CveOrdenCompraDetalle As Integer = DtDetalle.MAX("CveOrdenCompraDetalle").ToEntero + 100
|
||||
@@ -6677,7 +6677,6 @@ Partial Class OC_OC
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
'Cargo el GridView
|
||||
GvD.DataSource = DtDetalle
|
||||
GvD.DataBind()
|
||||
|
||||
@@ -885,12 +885,12 @@ Partial Class RH_Personal
|
||||
'Configuración
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
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
|
||||
pnlSalarioIMSS.Visible = False
|
||||
End If
|
||||
LnkContratoAgropecuaria.Visible = (UsuarioActual.CveEmpresa.Contiene(1, 158))
|
||||
Using objno = New ClsNominas
|
||||
Using objno As New ClsNominas
|
||||
objno.GetConceptos()
|
||||
dtNomConceptos = objno.DtResultados
|
||||
End Using
|
||||
@@ -1729,24 +1729,24 @@ Partial Class RH_Personal
|
||||
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("{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
|
||||
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("{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
|
||||
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("{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
|
||||
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("{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
|
||||
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 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 TieneError = False
|
||||
Dim Mensaje = ""
|
||||
Dim Accion = ""
|
||||
Dim TieneError As Boolean = False
|
||||
Dim Mensaje As String = ""
|
||||
Dim Accion As String = ""
|
||||
|
||||
'Dim FechaBaja As Date = MinFecha
|
||||
'Dim FechaActivo As Date = MinFecha
|
||||
@@ -3320,7 +3319,7 @@ Partial Class RH_Personal
|
||||
RegistraScript("$('#DivCuentasVancarias').modal('hide');")
|
||||
End Sub
|
||||
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
|
||||
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
|
||||
@@ -3478,7 +3477,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
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
|
||||
Next
|
||||
TempDTCuentasBancos.AcceptChanges()
|
||||
@@ -3514,25 +3513,22 @@ Partial Class RH_Personal
|
||||
CargaGridCuentasBancos("")
|
||||
End Sub
|
||||
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 NumeroSucursal = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
|
||||
Dim CLABE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
|
||||
Dim SWIFT = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
|
||||
Dim Plaza = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
|
||||
Dim NumeroCuenta = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
||||
Dim ConvenioCIE = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
||||
Dim Referencia = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
||||
Dim CveMoneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero()
|
||||
Dim Estatus = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim EstatusPagoElectronico = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
|
||||
|
||||
Dim Moneda = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
|
||||
Dim NombreBanco As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNombreBanco").Text.Trim
|
||||
Dim NumeroSucursal As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroSucursal").Text.Trim
|
||||
Dim CLABE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtCLABE").Text.Trim
|
||||
Dim SWIFT As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtSWIFT").Text.Trim
|
||||
Dim Plaza As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtPlaza").Text.Trim
|
||||
Dim NumeroCuenta As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtNumeroCuenta").Text.Trim
|
||||
Dim ConvenioCIE As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtConvenioCIE").Text.Trim
|
||||
Dim Referencia As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtReferencia").Text.Trim
|
||||
Dim CveMoneda As Integer = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedValue.ToString().ToEntero()
|
||||
Dim Estatus As Boolean = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatus").Checked
|
||||
Dim EstatusPagoElectronico As Boolean = GvBancosCuentas.Rows(e.RowIndex).FCCheckBox("ChkEstatusPagoE").Checked
|
||||
|
||||
Dim Moneda As String = GvBancosCuentas.Rows(e.RowIndex).FCDropDownList("DdlMoneda").SelectedItem.Text
|
||||
Dim BBVAAlias As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtBBVAAlias").Text
|
||||
|
||||
Dim RefCrediProveedor = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
|
||||
|
||||
Dim EsBancomer = False
|
||||
Dim RefCrediProveedor As String = GvBancosCuentas.Rows(e.RowIndex).FCTextBox("TxtRefCrediProveedor").Text.Trim
|
||||
Dim EsBancomer As Boolean = False
|
||||
|
||||
If NombreBanco.ToUpper.Contains("BBVA") Or NombreBanco.ToUpper.Contains("BANCOMER") Or (CLABE.Length = 18 AndAlso CLABE.Substring(0, 3) = "012") Then
|
||||
EsBancomer = True
|
||||
@@ -3587,7 +3583,7 @@ Partial Class RH_Personal
|
||||
|
||||
End If
|
||||
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)
|
||||
Row("BancoNombre") = NombreBanco
|
||||
Row("Sucursal") = NumeroSucursal
|
||||
@@ -3618,7 +3614,7 @@ Partial Class RH_Personal
|
||||
|
||||
End If
|
||||
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)
|
||||
End If
|
||||
|
||||
@@ -3681,7 +3677,7 @@ Partial Class RH_Personal
|
||||
End Function
|
||||
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")
|
||||
|
||||
@@ -3794,7 +3790,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
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}", "")))
|
||||
|
||||
@@ -3892,7 +3888,7 @@ Partial Class RH_Personal
|
||||
End If
|
||||
|
||||
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}", "")))
|
||||
|
||||
@@ -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)
|
||||
If array.Length > 0 Then
|
||||
extencion = array(array.Length - 1)
|
||||
@@ -4335,7 +4331,7 @@ Partial Class RH_Personal
|
||||
If documentacionFormato = "" Then
|
||||
ImgDownLoadFormato.Visible = False
|
||||
Else
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
||||
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Formatos/" & CveDocumentacion & "" & documentacionFormato
|
||||
ImgDownLoadFormato.Visible = True
|
||||
End If
|
||||
|
||||
@@ -4343,8 +4339,8 @@ Partial Class RH_Personal
|
||||
|
||||
If Adjunto.Trim.Length > 0 Then
|
||||
|
||||
Dim linkDescarga = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Personal/" & CvePersonal & "/" & Adjunto
|
||||
Dim linkDescargaArchivo = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
|
||||
Dim linkDescarga As String = "/Empresas/" & UsuarioActual.Empresa.CveEmpresa & "/Personal/" & CvePersonal & "/" & Adjunto
|
||||
Dim linkDescargaArchivo As String = UsuarioActual.Empresa.Ruta & "Personal/" & CvePersonal & "/" & Adjunto
|
||||
|
||||
If File.Exists(linkDescargaArchivo) Then
|
||||
|
||||
@@ -4434,11 +4430,7 @@ Partial Class RH_Personal
|
||||
If pathDesti.ToUpper.Contains("GAFETTE") Or pathDesti.ToUpper.Contains("GAFETE") Then
|
||||
|
||||
GemBox.Document.ComponentInfo.SetLicense(SerialGemBoxDocument)
|
||||
|
||||
Dim document = GemBox.Document.DocumentModel.Load(pathDesti)
|
||||
|
||||
|
||||
|
||||
Dim document As GemBox.Document.DocumentModel = GemBox.Document.DocumentModel.Load(pathDesti)
|
||||
|
||||
Dim imgPersonalURL As String = ""
|
||||
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)
|
||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
||||
Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
|
||||
|
||||
If CvePersonal <> -1 Then
|
||||
Dim objRH As New ClsRH
|
||||
@@ -4537,183 +4529,56 @@ Partial Class RH_Personal
|
||||
|
||||
|
||||
If objRH.PersonalReclutamientoGet(CvePersonal, UsuarioActual.Empresa.CveEmpresa) Then
|
||||
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Nombres}", objRH.DtResultados(0)("Nombres").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("{RFC}", objRH.DtResultados(0)("RFC").ToString()))
|
||||
|
||||
|
||||
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NombreCompleto}", NombreCompleto))
|
||||
|
||||
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Estatura}", objRH.DtResultados(0)("Estatura").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("{Edad}", objRH.DtResultados(0)("Edad").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("{Vivienda}", objRH.DtResultados(0)("Vivienda").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("{RentaMensual}", objRH.DtResultados(0)("RentaMensual").ToString().ToDecimal.ToString("###,###,###.00")))
|
||||
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{TransportePublico}", objRH.DtResultados(0)("TransportePublico").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("{ParientesEmpresa}", objRH.DtResultados(0)("ParientesEmpresa").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("{Direccion}", objRH.DtResultados(0)("Direccion").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("{CP}", objRH.DtResultados(0)("CP").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("{Correo}", objRH.DtResultados(0)("Correo").ToString()))
|
||||
|
||||
|
||||
'If Not IsDBNull(objRH.DtResultados(0)("CveSucursal")) Then
|
||||
|
||||
' ListaTagsDocumentost.Add(New TagsDocumentos("{CveSucursal}", DDLSucursal4.Text))
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{NumeroSS}", objRH.DtResultados(0)("NumeroSS").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("{CURP}", objRH.DtResultados(0)("CURP").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("{Direccion}", objRH.DtResultados(0)("Direccion").ToString()))
|
||||
|
||||
|
||||
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("{Puesto}", objRH.DtResultados(0)("Puesto").ToString()))
|
||||
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{CUIP}", ""))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{Denominacion}", ""))
|
||||
|
||||
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 FechaActualDF As String = Now.ToString("dd/MM/yyyy")
|
||||
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual))
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF))
|
||||
End If
|
||||
@@ -5585,17 +5450,15 @@ Partial Class RH_Personal
|
||||
|
||||
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
|
||||
|
||||
If objRH.VacacionesFolioGet(CvePersonal, _VacFolio) Then
|
||||
|
||||
If objRH.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
ListaTags.Add(New TagsDocumentos("{Anios}", VacAnios.ToString()))
|
||||
ListaTags.Add(New TagsDocumentos("{DiasUsados}", VacDiasUsados.ToString()))
|
||||
ListaTags.Add(New TagsDocumentos("{DiasDisponibles}", VacDiasDisponibles.ToString()))
|
||||
|
||||
If Not IsDBNull(objRH.DtResultados(0)("InicioVac")) Then
|
||||
ListaTags.Add(New TagsDocumentos("{InicioVac}", objRH.DtResultados(0)("InicioVac").ToString().ToDate.ToString("dd/MM/yyyy")))
|
||||
End If
|
||||
@@ -5982,7 +5845,7 @@ Partial Class RH_Personal
|
||||
Next
|
||||
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 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
|
||||
End If
|
||||
UpImage.Update()
|
||||
@@ -6253,22 +6116,19 @@ Partial Class RH_Personal
|
||||
|
||||
If gvr.DataKey("SeTimbro") = "True" Then
|
||||
|
||||
Dim NombreComercial = UsuarioActual.Empresa.Empresa
|
||||
Dim SerieFolio = gvr.DataKey("SerieFolio").ToString()
|
||||
Dim Destinatario = gvr.DataKey("Correo").ToString()
|
||||
Dim Personal = gvr.DataKey("Nombre").ToString()
|
||||
Dim fechai = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString
|
||||
Dim fechaf = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString
|
||||
Dim cvePeriodo = gvr.DataKey("CvePeriodo").ToString().ToEntero()
|
||||
Dim NombreComercial As String = UsuarioActual.Empresa.Empresa
|
||||
Dim SerieFolio As String = gvr.DataKey("SerieFolio").ToString()
|
||||
Dim Destinatario As String = gvr.DataKey("Correo").ToString()
|
||||
Dim Personal As String = gvr.DataKey("Nombre").ToString()
|
||||
Dim fechai As String = gvr.DataKey("FechaInicio").ToString().ToDate.ToShortDateString
|
||||
Dim fechaf As String = gvr.DataKey("FechaFin").ToString().ToDate.ToShortDateString
|
||||
Dim cvePeriodo As Integer = gvr.DataKey("CvePeriodo").ToString().ToEntero()
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
Alert("Parametros:" + NombreComercial + " " + SerieFolio + " " + Destinatario + " " + Personal + " " + fechai + " " + fechaf)
|
||||
End If
|
||||
MandaCorreo(NombreComercial, SerieFolio, Destinatario, Personal, fechai, fechaf, cvePeriodo)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
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)
|
||||
@@ -6484,7 +6344,7 @@ Partial Class RH_Personal
|
||||
ObjAF.Dispose()
|
||||
Else
|
||||
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)
|
||||
GvLicencias.DataSource = DTLicencias
|
||||
GvLicencias.DataBind()
|
||||
@@ -6529,7 +6389,7 @@ Partial Class RH_Personal
|
||||
Else
|
||||
If DTLicencias IsNot Nothing Then
|
||||
If HdnModalidadLicencia.Value = "A" Then
|
||||
Dim Row = DTLicencias.NewRow()
|
||||
Dim Row As DataRow = DTLicencias.NewRow()
|
||||
|
||||
Row("Licencia") = TxtLicencia.Text.Trim()
|
||||
Row("FechaExpedicion") = TxtFechaExpLicencia.Text.ToDateTime()
|
||||
@@ -6546,7 +6406,7 @@ Partial Class RH_Personal
|
||||
Alert("La licencia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
ElseIf HdnModalidadLicencia.Value = "U" Then
|
||||
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("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 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 params As New List(Of ReportParameter)
|
||||
@@ -6601,7 +6461,7 @@ Partial Class RH_Personal
|
||||
'End If
|
||||
|
||||
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
|
||||
Dim CiudadSucursal As String = String.Format("{0},{1}", DRSucursal("Municipio"), DRSucursal("Estado"))
|
||||
@@ -7146,12 +7006,7 @@ Partial Class RH_Personal
|
||||
End Sub
|
||||
Protected Sub LnkDescargaFormatoParametros_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ListaTagsDocumentost = New List(Of TagsDocumentos)
|
||||
|
||||
|
||||
Dim ListaTagsDocumentost As New List(Of TagsDocumentos)
|
||||
Dim ObjRH As New ClsRH
|
||||
ListaTagsDocumentost = ObjRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa)
|
||||
ObjRH.Dispose()
|
||||
@@ -7161,10 +7016,7 @@ Partial Class RH_Personal
|
||||
If GvRow.FCTextBox("TxtParametro").Text.Trim.Length > 0 Then
|
||||
ListaTagsDocumentost.Add(New TagsDocumentos(GvRow.DataKey("Parametro"), GvRow.FCTextBox("TxtParametro").Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Dim PathRoot As String = AppDomain.CurrentDomain.BaseDirectory
|
||||
Dim PathSource As String
|
||||
Dim pathDesti As String
|
||||
@@ -7276,10 +7128,6 @@ Partial Class RH_Personal
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub DdlSubProyectoAsignado_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||
|
||||
Using objrh As New ClsRH()
|
||||
@@ -7671,8 +7519,8 @@ Partial Class RH_Personal
|
||||
ffin = gvrow.DataKey("FechaFin").ToDateTime()
|
||||
|
||||
End If
|
||||
Dim estatus = -1
|
||||
Dim continuar = False
|
||||
Dim estatus As Integer = -1
|
||||
Dim continuar As Boolean = False
|
||||
|
||||
|
||||
If (LnkActivar.Visible) Then
|
||||
@@ -7826,17 +7674,11 @@ Partial Class RH_Personal
|
||||
End If
|
||||
ObjRH.Dispose()
|
||||
|
||||
|
||||
|
||||
|
||||
Dim objGemBoxDocument As New clsGemBoxDocument(RutaArchivo)
|
||||
objGemBoxDocument.SustituirTags(Tags)
|
||||
objGemBoxDocument.GuardarStreamPDF()
|
||||
|
||||
|
||||
Dim objbyte = objGemBoxDocument.GetBytesDocumento
|
||||
|
||||
|
||||
Dim objbyte As Byte() = objGemBoxDocument.GetBytesDocumento
|
||||
|
||||
|
||||
Try
|
||||
@@ -7859,9 +7701,6 @@ Partial Class RH_Personal
|
||||
End If
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
|
||||
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("LlbEstatusTexto").Text.Trim.Length > 0, $"Estatus: {GvRow.FCLabel("LlbEstatusTexto").Text} ", ""))
|
||||
SBDatosBancarios.AppendLine($"<br>")
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
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>")
|
||||
End If
|
||||
@@ -8010,9 +7845,6 @@ Partial Class RH_Personal
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkSolicitarVacaciones_Click(sender As Object, e As EventArgs)
|
||||
DdlVacPeriodo_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
@@ -8048,16 +7880,14 @@ Partial Class RH_Personal
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If fechaFinParametro <> Nothing Then
|
||||
|
||||
Dim DiferenciaEntreFechas As Integer = (fechaFinParametro - fechaInicioParametro).Days + 1
|
||||
Dim DiasNolavorales As Integer = 0
|
||||
Dim FechaTemp As Date = fechaInicioParametro
|
||||
|
||||
For x = 1 To DiferenciaEntreFechas
|
||||
Dim day_of_week = CType(FechaTemp.DayOfWeek, Integer) + 1
|
||||
For x As Integer = 1 To DiferenciaEntreFechas
|
||||
Dim day_of_week As Integer = CType(FechaTemp.DayOfWeek, Integer) + 1
|
||||
|
||||
If day_of_week = diaDescanso Then
|
||||
DiasNolavorales = DiasNolavorales + 1
|
||||
@@ -8092,8 +7922,8 @@ Partial Class RH_Personal
|
||||
Dim DiasAgregados As Integer = 0
|
||||
Dim FechaFin As Date = fechaInicioParametro
|
||||
Dim Contador As Integer = 0
|
||||
For x = 2 To diasVacaciones
|
||||
Dim day_of_week = CType(FechaFin.DayOfWeek, Integer) + 1
|
||||
For x As Integer = 2 To diasVacaciones
|
||||
Dim day_of_week As Integer = CType(FechaFin.DayOfWeek, Integer) + 1
|
||||
If day_of_week = diaDescanso Then
|
||||
FechaFin = FechaFin.AddDays(2)
|
||||
DiasAgregados = DiasAgregados + 1
|
||||
@@ -8136,7 +7966,6 @@ Partial Class RH_Personal
|
||||
If Not validaFechasVaciones() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
CalculaDiasVacaciones(TxtFechaInicioVac.Text.ToDate, TxtVacDiasPago.Text.ToEntero, TxtFechaFinVac.Text.ToDate)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -621,7 +621,7 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
'SI ES EMPRESA DE ACUMULADORES DEBE OBLIGAR A SUBIR UN ARCHIVO
|
||||
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.Archivos IsNot Nothing Then
|
||||
If files.Archivos.Count = 0 Then
|
||||
@@ -1141,39 +1141,15 @@ Partial Class Ventas_ClientesAbonar
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
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
|
||||
MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
||||
'If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
' MsgError = ObjMov.MensajePolizaDescuadre & " La diferencia es de: " & ObjMov.ValorDiferencia
|
||||
'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
|
||||
MsgError = "No se pudo insertar la póliza"
|
||||
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 DTExcel As New DataTable
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
Dim ErrorExcel As Boolean = False
|
||||
|
||||
DTExcel = ReadExcelFile(Directorio + file.filename, True)
|
||||
|
||||
|
||||
@@ -100,16 +100,15 @@
|
||||
<asp:CheckBox runat="server" ID="chk" CssClass="ChkAllEvt" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Servicio" DataField="Servicio" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Mercancia" DataField="Mercancia" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Fecha Salida" DataField="FechaSalida" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Fecha Llegada" DataField="FechaLlegada" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" />
|
||||
<asp:BoundField HeaderText="Servicio" DataField="Servicio" />
|
||||
<asp:BoundField HeaderText="Mercancia" DataField="Mercancia" />
|
||||
<asp:BoundField HeaderText="Fecha Salida" DataField="FechaSalida" DataFormatString="{0:dd/MM/yyyy HH:mm}" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Fecha Llegada" DataField="FechaLlegada" DataFormatString="{0:dd/MM/yyyy HH:mm}" ItemStyle-Width="80px" />
|
||||
<asp:BoundField HeaderText="Cant." DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Origen" DataField="DireccionOrigen" ItemStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Destino" DataField="DireccionDestino" ItemStyle-Width="200px" />
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" ItemStyle-Width="100px" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="265px" />
|
||||
<asp:BoundField HeaderText="Origen" DataField="DireccionOrigen" />
|
||||
<asp:BoundField HeaderText="Destino" DataField="DireccionDestino" />
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -4,6 +4,7 @@ Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports ADSTimbrado
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
|
||||
@@ -22,7 +23,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
CveCliente = DdlClientes.SelectedValue.ToEntero()
|
||||
End If
|
||||
Using ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.GetFacturacionAcarreos(-1, CveCliente, -1, DdlEstatus.SelectedValue.ToEntero(), Now, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
End Using
|
||||
@@ -57,7 +58,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
|
||||
Dim FileExcel As New ExcelFile()
|
||||
|
||||
Dim worksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
Dim worksheet As ExcelWorksheet = FileExcel.Worksheets.Add(DtExcel.TableName)
|
||||
worksheet.InsertDataTable(DtExcel, New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
@@ -67,8 +68,8 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
worksheet.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255))
|
||||
worksheet.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255)
|
||||
|
||||
Dim columnCount = worksheet.CalculateMaxUsedColumns()
|
||||
For i = 0 To columnCount
|
||||
Dim columnCount As Integer = worksheet.CalculateMaxUsedColumns()
|
||||
For i As Integer = 0 To columnCount
|
||||
worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
|
||||
Next
|
||||
|
||||
@@ -88,7 +89,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String)
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
|
||||
Try
|
||||
dt = ReadExcelFile(Ruta + FileName, True)
|
||||
@@ -257,7 +258,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
|
||||
Dim CvePSMercancia As Integer = GvRow.DataKey("CvePSRelacionado").ToEntero()
|
||||
|
||||
Dim ObjFactura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda)
|
||||
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, CveCliente, CveMoneda)
|
||||
ObjFactura.EmitirCartaPorte = True
|
||||
ObjFactura.CveFacturacionAcarreo = GvRow.DataKey("CveFacturacionAcarreo").ToEntero()
|
||||
|
||||
@@ -267,7 +268,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
ObjFactura.CalculaTotales()
|
||||
ObjFactura.PreparaTimbre()
|
||||
|
||||
Dim resp = ObjFactura.EmitirFactura(Timbrar:=True, Modulo:="FacturacionAcarreos")
|
||||
Dim resp As Modelos.Factura.MMensajeFactura = ObjFactura.EmitirFactura(Timbrar:=True, Modulo:="FacturacionAcarreos")
|
||||
|
||||
For Each m As String In resp.Mensajes
|
||||
msg.AppendFormat("{0}<br/>", m)
|
||||
@@ -338,7 +339,7 @@ Partial Class Ventas_FacturacionAcarreos
|
||||
End Sub
|
||||
|
||||
Private Function CreaDTMercancias(CvePS As Integer, Cantidad As Decimal) As DataTable
|
||||
Dim DtMercancias = New DataTable()
|
||||
Dim DtMercancias As New DataTable()
|
||||
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
|
||||
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
|
||||
|
||||
@@ -650,14 +650,14 @@ Partial Class PV
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private ReadOnly Property ClasificacionesDescuentos As Dictionary(Of Integer, Decimal)
|
||||
Get
|
||||
Return New Dictionary(Of Integer, Decimal) From {
|
||||
{20516, 0.21D}, 'Descuento para lubricantes LTH
|
||||
{20515, 0.25D} 'Descuento para filtros LTH
|
||||
}
|
||||
End Get
|
||||
End Property
|
||||
'Private ReadOnly Property ClasificacionesDescuentos As Dictionary(Of Integer, Decimal)
|
||||
' Get
|
||||
' Return New Dictionary(Of Integer, Decimal) From {
|
||||
' {20516, 0.21D}, 'Descuento para lubricantes LTH
|
||||
' {20515, 0.25D} 'Descuento para filtros LTH
|
||||
' }
|
||||
' End Get
|
||||
'End Property
|
||||
Private Property CveAutorizacion As Integer
|
||||
Get
|
||||
Return (IfNull(ViewState("CveAutorizacion"), "-1", ViewState("CveAutorizacion"))).ToString().ToEntero()
|
||||
@@ -1484,7 +1484,7 @@ Partial Class PV
|
||||
TrRetIVA.Style.Add("display", "")
|
||||
UsuarioActual.Empresa.MostrarRetIVA = True
|
||||
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)
|
||||
End If
|
||||
|
||||
@@ -1814,11 +1814,11 @@ Partial Class PV
|
||||
ViewState("CveClienteAnterior") = CveCliente
|
||||
|
||||
'SI EL DETALLE NO TIENE MOVIMIENTOS DE INVENTARIO ES VISIBLE
|
||||
Dim CantidadFacturadaRemision = 0.0
|
||||
Dim CantidadFacturadaRemision As Decimal = 0
|
||||
For Each Gvr As GridViewRow In GvPS.Rows
|
||||
Gvr.FCLinkButton("imgE").Visible = Not Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
||||
Gvr.FCLinkButton("imgD").Visible = Not Gvr.DataKey("CantidadInventario").ToString.ToDouble > 0 AndAlso Gvr.DataKey("EsCargo") = "False"
|
||||
CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString.ToDouble
|
||||
CantidadFacturadaRemision += Gvr.DataKey("CantidadFacturadaRem").ToString.ToDecimal
|
||||
Next
|
||||
|
||||
'ACTIVA CAMBIO DE CLIENTE - SI NO TIENE NADA FACTURADO
|
||||
@@ -2156,7 +2156,7 @@ Partial Class PV
|
||||
|
||||
If ObjPVenta.DtResultados.Rows.Count > 0 Then
|
||||
CveCorte = ObjPVenta.CveCorte
|
||||
Dim FechaICorte = ObjPVenta.FechaInicial.Date '.AddDays(-1)
|
||||
Dim FechaICorte As Date = ObjPVenta.FechaInicial.Date '.AddDays(-1)
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso FechaICorte < Now.Date Then
|
||||
DebeCerrarCorte = True
|
||||
LblMotivoBloqueo.Text = $"Existe un corte del día <b>{FechaICorte.ToString("dd/MM/yyyy")}</b>. Favor de cerrarlo para iniciar un nuevo corte."
|
||||
@@ -2223,32 +2223,32 @@ Partial Class PV
|
||||
Dt.Columns.Add("Descripcion", GetType(String))
|
||||
Dt.Columns.Add("Importe", GetType(Decimal))
|
||||
|
||||
Dim Dr1 = Dt.NewRow
|
||||
Dim Dr1 As DataRow = Dt.NewRow
|
||||
Dr1("Descripcion") = "Fondo de Caja"
|
||||
Dr1("Importe") = ObjPVenta.DtResultados(0)("ImporteInicial").ToString.ToDouble
|
||||
Dt.Rows.Add(Dr1)
|
||||
|
||||
Dim Dr2 = Dt.NewRow
|
||||
Dim Dr2 As DataRow = Dt.NewRow
|
||||
Dr2("Descripcion") = "Ventas en Efectivo"
|
||||
Dr2("Importe") = ObjPVenta.DtResultados(0)("VentasEfectivo").ToString.ToDouble
|
||||
Dt.Rows.Add(Dr2)
|
||||
|
||||
Dim Dr3 = Dt.NewRow
|
||||
Dim Dr3 As DataRow = Dt.NewRow
|
||||
Dr3("Descripcion") = "Propinas"
|
||||
Dr3("Importe") = ObjPVenta.DtResultados(0)("Propina").ToString.ToDouble
|
||||
Dt.Rows.Add(Dr3)
|
||||
|
||||
Dim Dr4 = Dt.NewRow
|
||||
Dim Dr4 As DataRow = Dt.NewRow
|
||||
Dr4("Descripcion") = "Entradas"
|
||||
Dr4("Importe") = ObjPVenta.DtResultados(0)("Ingresado").ToString.ToDouble
|
||||
Dt.Rows.Add(Dr4)
|
||||
|
||||
Dim Dr5 = Dt.NewRow
|
||||
Dim Dr5 As DataRow = Dt.NewRow
|
||||
Dr5("Descripcion") = "Salidas"
|
||||
Dr5("Importe") = ObjPVenta.DtResultados(0)("Retirado").ToString.ToDouble
|
||||
Dt.Rows.Add(Dr5)
|
||||
|
||||
Dim Dr6 = Dt.NewRow
|
||||
Dim Dr6 As DataRow = Dt.NewRow
|
||||
Dr6("Descripcion") = "Total"
|
||||
Dr6("Importe") = Total
|
||||
Dt.Rows.Add(Dr6)
|
||||
@@ -2318,7 +2318,7 @@ Partial Class PV
|
||||
If TxtEfectivoEnCaja.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoEnCaja.Text.ToDouble, LblDiferenciaCaja.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga = "document.location.href=""/Ventas/PV.aspx"";"
|
||||
Dim Liga As String = "document.location.href=""/Ventas/PV.aspx"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
End If
|
||||
End If
|
||||
@@ -2329,7 +2329,7 @@ Partial Class PV
|
||||
If TxtEfectivoCajaBloqueo.Text.Trim <> "" Then
|
||||
If ObjPVenta.UpdateFinalizadoVtaCortes(CveCorte, TxtEfectivoCajaBloqueo.Text.ToDouble, LblDiferenciaCajaBloqueo.Text.ToDouble, Now, UsuarioActual.CveEmpresa) Then
|
||||
RegistraScript($"window.location.href = '/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF"))}'", "Imprimir")
|
||||
Dim Liga = "document.location.href=""/Ventas/PV.aspx"";"
|
||||
Dim Liga As String = "document.location.href=""/Ventas/PV.aspx"";"
|
||||
Alert("Se ha cerrado el turno correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
End If
|
||||
Else
|
||||
@@ -2773,7 +2773,7 @@ Partial Class PV
|
||||
UpPS.Update()
|
||||
End Sub
|
||||
Private Sub CargaFormatoSucursal()
|
||||
Dim dr = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", If(DdlSubProyectoDatos.SelectedValue = "", "-1", DdlSubProyectoDatos.SelectedValue)))
|
||||
Dim dr As DataRow = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", If(DdlSubProyectoDatos.SelectedValue = "", "-1", DdlSubProyectoDatos.SelectedValue)))
|
||||
If dr IsNot Nothing Then
|
||||
ViewState("SucCalle") = dr("Calle")
|
||||
ViewState("SucNoExt") = dr("NoExt")
|
||||
@@ -2820,7 +2820,7 @@ Partial Class PV
|
||||
If CveClienteSuc > 0 Then
|
||||
If ObjCliente.GetSucursales(CveCliente, CveClienteSuc) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
Dim Correo = ObjCliente.DtResultados.Rows(0)("Correo").ToString
|
||||
Dim Correo As String = ObjCliente.DtResultados.Rows(0)("Correo").ToString
|
||||
If Correo.Trim.Length > 0 Then
|
||||
ViewState("Mail") = Correo
|
||||
End If
|
||||
@@ -2992,7 +2992,7 @@ Partial Class PV
|
||||
End Sub
|
||||
Private Sub CargaVendedores()
|
||||
|
||||
Dim CveVendedorActual = DdlVendedor.SelectedValue
|
||||
Dim CveVendedorActual As Integer = DdlVendedor.SelectedValue.ToEntero
|
||||
|
||||
DdlVendedor.Items.Clear()
|
||||
|
||||
@@ -3127,10 +3127,11 @@ Partial Class PV
|
||||
TmpDT.Rows(row.RowIndex)("Orden") = row.FCTextBox("TxtOrden").Text.ToEntero
|
||||
Next
|
||||
|
||||
Dim resultados = From OrdenDT In TmpDT
|
||||
Order By OrdenDT("Orden").ToString.ToEntero
|
||||
Select OrdenDT
|
||||
TmpDT = resultados.CopyToDataTable
|
||||
'Dim resultados = From OrdenDT In TmpDT
|
||||
' Order By OrdenDT("Orden").ToString.ToEntero
|
||||
' Select OrdenDT
|
||||
'TmpDT = resultados.CopyToDataTable
|
||||
TmpDT = TmpDT.FiltraParametros("", "Orden")
|
||||
CalculaTotalesVenta()
|
||||
|
||||
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
||||
@@ -3305,11 +3306,11 @@ Partial Class PV
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing") Then
|
||||
Dim MensajeCosto As New StringBuilder
|
||||
Dim CostoMenor = 0.0D
|
||||
Dim CostoMayor = 0.0D
|
||||
Dim Costo = 0.0D
|
||||
Dim EsValido = False 'BANDERA
|
||||
Dim EsValidoMayor = False
|
||||
Dim CostoMenor As Decimal = 0
|
||||
Dim CostoMayor As Decimal = 0
|
||||
Dim Costo As Decimal = 0
|
||||
Dim EsValido As Boolean = False 'BANDERA
|
||||
Dim EsValidoMayor As Boolean = False
|
||||
|
||||
|
||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||
@@ -3321,7 +3322,7 @@ Partial Class PV
|
||||
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim PU = 0.0D
|
||||
Dim PU As Decimal = 0
|
||||
For Each dr As DataRow In TmpDT.Rows
|
||||
'SI ES SERVICIO NO VALIDA
|
||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=dr("CvePS").ToString.ToEntero).FiltroPrimeroValor("CveTipoPS").ToString.ToEntero = 1 Then
|
||||
@@ -3450,7 +3451,7 @@ Partial Class PV
|
||||
|
||||
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
|
||||
Dim urlFactura As String = ""
|
||||
Dim urlAjuste = ""
|
||||
Dim urlAjuste As String = ""
|
||||
Dim SbAlert As New StringBuilder
|
||||
|
||||
Try
|
||||
@@ -3536,7 +3537,7 @@ Partial Class PV
|
||||
Retorno.Mensajes(Retorno.Mensajes.Count - 1) = SbAlert.ToString()
|
||||
End If
|
||||
|
||||
For Each Mensaje In Retorno.Mensajes
|
||||
For Each Mensaje As String In Retorno.Mensajes
|
||||
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion), If(Retorno.TieneError, "", Retorno.LigaPV), ShowCloseButton:=False)
|
||||
Next
|
||||
|
||||
@@ -3553,14 +3554,14 @@ Partial Class PV
|
||||
|
||||
End Sub
|
||||
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte()
|
||||
Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||
Dim Url As New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
|
||||
Dim File As Byte() = Nothing
|
||||
Try
|
||||
Using httpClient = New HttpClient()
|
||||
Using httpClient As New HttpClient()
|
||||
httpClient.Timeout = New TimeSpan(0, 15, 0)
|
||||
Using request = New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
Using request As New HttpRequestMessage(HttpMethod.Get, Url)
|
||||
request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CveUsuario=100", CveEmpresa, DateTime.UtcNow.Ticks)))
|
||||
Dim response = httpClient.SendAsync(request).Result
|
||||
Dim response As HttpResponseMessage = httpClient.SendAsync(request).Result
|
||||
If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then
|
||||
File = response.Content.ReadAsByteArrayAsync().Result
|
||||
End If
|
||||
@@ -3810,12 +3811,12 @@ Partial Class PV
|
||||
ObjFactura.CveAlmacenServicioDomicilio = ddlAlmacen.SelectedValue.ToEntero() 'GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 29 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString.ToEntero
|
||||
|
||||
'PREPARA DT INVENTARIO
|
||||
Dim DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
Dim DtInv As DataTable = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||
For Each GvRow As GridViewRow In GvInv.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
Dim filtro = DtInv.Select(String.Format("CvePS = {0} AND Consec = {1}", GvRow.DataKey("CvePS"), GvRow.DataKey("Consec")))
|
||||
Dim filtro As DataRow() = DtInv.Select(String.Format("CvePS = {0} AND Consec = {1}", GvRow.DataKey("CvePS"), GvRow.DataKey("Consec")))
|
||||
If filtro IsNot Nothing AndAlso filtro.Length > 0 Then
|
||||
Dim Row = filtro(0)
|
||||
Dim Row As DataRow = filtro(0)
|
||||
Row("Serie") = GvRow.FCTextBox("TxtSerie").Text.Trim
|
||||
End If
|
||||
End If
|
||||
@@ -4083,7 +4084,7 @@ Partial Class PV
|
||||
Dim PrecioSugerido As Decimal = 0
|
||||
PrecioSugerido = drPS("Precio").ToString.ToDecimal
|
||||
If UsuarioActual.CveEmpresa.Contiene(80, 119) Then
|
||||
Dim CvePrecioListaPS = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
||||
Dim CvePrecioListaPS As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CvePrecioLista", $"CveCliente = {CveCliente}").ToEntero
|
||||
If CvePrecioListaPS > 0 Then
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
If ObjPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioListaPS, CvePS:=CvePSParametro) Then
|
||||
@@ -4091,9 +4092,9 @@ Partial Class PV
|
||||
PrecioSugerido = ObjPS.DtResultados.FiltroPrimeroValor("PrecioLista").ToDecimal
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero)
|
||||
ObjInventarios.Dispose()
|
||||
Dim PorcentajePrecio = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
Dim PorcentajePrecio As Decimal = ObjPS.DtResultados.FiltroPrimeroValor("Porcentaje").ToDecimal
|
||||
If CostoPS > 0 And PorcentajePrecio > 0 Then
|
||||
PrecioSugerido = ((PorcentajePrecio / 100) + 1) * CostoPS
|
||||
End If
|
||||
@@ -4343,26 +4344,26 @@ Partial Class PV
|
||||
If ValidaCondicionesComerciales AndAlso DtPorcentajeMarcas IsNot Nothing AndAlso DtPorcentajeMarcas.Rows.Count > 0 Then
|
||||
'VERIFICA SI EL PRODUCTO TIENE ESPECIFICADA UNA MARCA
|
||||
If Not String.IsNullOrEmpty(DrPS("CveMarca").ToString()) AndAlso DrPS("CveMarca").ToString().ToEntero() > 0 Then
|
||||
Dim RowPorcentaje = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={DrPS("CveMarca").ToString()}")
|
||||
Dim RowPorcentaje As DataRow = DtPorcentajeMarcas.FiltroPrimero($"CveMarca={DrPS("CveMarca").ToString()}")
|
||||
'REALIZA LOS DESCUENTOS DE ACUERDO AL PORCENTAJE POR MARCA
|
||||
If RowPorcentaje IsNot Nothing Then
|
||||
'(AHORA LOS DESCUENTOS SON ACUMULABLES)
|
||||
'Descuento = 0
|
||||
Dim PorcentajeProducto = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto2 = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto3 = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto As Decimal = RowPorcentaje("PorcentajeProducto").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto2 As Decimal = RowPorcentaje("PorcentajeProducto2").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProducto3 As Decimal = RowPorcentaje("PorcentajeProducto3").ToString().ToDecimal() / 100D
|
||||
|
||||
Dim TotalInicial As Decimal = (Cantidad * (PU)) '- Descuento
|
||||
Dim TotalFinal = TotalInicial
|
||||
Dim TotalFinal As Decimal = TotalInicial
|
||||
'SI APLICA EL PRIMER DESCUENTO
|
||||
If PorcentajeProducto > 0 Then
|
||||
Dim Descuento1 As Decimal = (TotalInicial * PorcentajeProducto).RoundSQL(2)
|
||||
Dim Total2 = (TotalInicial - Descuento1)
|
||||
Dim Total2 As Decimal = (TotalInicial - Descuento1)
|
||||
|
||||
'SI APLICA EL SEGUNDO DESCUENTO
|
||||
If PorcentajeProducto2 > 0 Then
|
||||
Dim Descuento2 As Decimal = (Total2 * PorcentajeProducto2).RoundSQL(2)
|
||||
Dim Total3 = (Total2 - Descuento2)
|
||||
Dim Total3 As Decimal = (Total2 - Descuento2)
|
||||
|
||||
'SI APLICA EL TERCER DESCUENTO
|
||||
If PorcentajeProducto3 > 0 Then
|
||||
@@ -4385,20 +4386,20 @@ Partial Class PV
|
||||
'SI TIENE PRONTO PAGO CALCULA EL IMPORTE
|
||||
If DdlTipoComprobante.SelectedValue = "Ing" AndAlso RowPorcentaje("ProntoPago").ToString().ToDecimal() > 0 Then
|
||||
Dim TotalProntoPago As Decimal = (Cantidad * (PU)) - Descuento
|
||||
Dim PorcentajeProntoPago = RowPorcentaje("ProntoPago").ToString().ToDecimal() / 100D
|
||||
Dim PorcentajeProntoPago As Decimal = RowPorcentaje("ProntoPago").ToString().ToDecimal() / 100D
|
||||
|
||||
ObjDescuento.ImporteProntoPago = (TotalProntoPago * PorcentajeProntoPago).RoundSQL(2)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
'If CveMarcaPS = 1092 Then ' E140 - alcalinas LTH
|
||||
' Descuento = ((Cantidad * PU) * 0.183D).RoundSQL(2)
|
||||
'End If
|
||||
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
Descuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero)).RoundSQL(2)
|
||||
End If
|
||||
'Else
|
||||
' 'If CveMarcaPS = 1092 Then ' E140 - alcalinas LTH
|
||||
' ' Descuento = ((Cantidad * PU) * 0.183D).RoundSQL(2)
|
||||
' 'End If
|
||||
' If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
' Descuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero)).RoundSQL(2)
|
||||
' End If
|
||||
End If
|
||||
|
||||
''condicion final, si es cambio de Vigencia, no aplica descuento
|
||||
@@ -4699,14 +4700,14 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveTipoInv = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
|
||||
Dim CveTipoInv As Integer = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("Inv_CveMetodoInventario").ToEntero
|
||||
|
||||
If Cantidad <> 1 And CveTipoInv = 5 AndAlso UsuarioActual.CveEmpresa <> 72 Then
|
||||
Alert("El producto se tiene que dar salida por serie y producto por producto (Cantidad = 1).", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim AplicaSerie = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("AplicaSerie"))
|
||||
Dim AplicaSerie As Boolean = CBool(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimeroValor("AplicaSerie"))
|
||||
|
||||
If TmpDT.FiltraParametros("AsientoContableVentas <> '" & AsientoContableVentas.ToString & "'").Rows.Count = 0 Then
|
||||
Dim Row As DataRow = Nothing
|
||||
@@ -5211,10 +5212,10 @@ Partial Class PV
|
||||
If Not CveContrato > 0 Then
|
||||
|
||||
'BANDERAS PARA VALIDACIONES
|
||||
Dim EsValido = False
|
||||
Dim EsValidoMayor = False
|
||||
Dim CostoMenor = 0.0D
|
||||
Dim CostoMayor = 0.0D
|
||||
Dim EsValido As Boolean = False
|
||||
Dim EsValidoMayor As Boolean = False
|
||||
Dim CostoMenor As Decimal = 0.0D
|
||||
Dim CostoMayor As Decimal = 0.0D
|
||||
|
||||
'PRECIO MINIMO
|
||||
If UsuarioActual.Empresa.Funcionalidad(129).ToEntero > 0 AndAlso UsuarioActual.CveUsuario <> 1560 Then
|
||||
@@ -5331,7 +5332,7 @@ Partial Class PV
|
||||
GvPSRowIndexEdit = GvRow.RowIndex
|
||||
ConsecutivoVenta = GvRow.DataKey("Consec").ToEntero
|
||||
CveVentaDetalle = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||
Dim EsCargo = CBool(GvRow.DataKey("EsCargo"))
|
||||
Dim EsCargo As Boolean = CBool(GvRow.DataKey("EsCargo"))
|
||||
LnkAgregarPS.Text = "Actualizar"
|
||||
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
|
||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero, DdlPS)
|
||||
@@ -5476,7 +5477,7 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
'SELECCIONA EL PS DEPENDIENDO LA MODALIDAD (CODIGO BARRAS - DDL)
|
||||
Dim CvePS = DdlPS.SelectedValue.ToEntero
|
||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
|
||||
If ValidaAgregarPS(CvePS, DdlUnidadMedida.SelectedValue.ToEntero, TxtPrecio.Text.Trim.ToDouble, HdnTipoPS.Value.ToEntero, TxtCantidad.Text.ToDecimal) Then
|
||||
@@ -5494,9 +5495,9 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
Dim ObjDescuento As New Modelos.VentaDescuentos
|
||||
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
ObjDescuento.ImporteDescuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero))
|
||||
End If
|
||||
'If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
|
||||
' ObjDescuento.ImporteDescuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero))
|
||||
'End If
|
||||
|
||||
ObjDescuento = CalcularDescuentos(CvePS, Cantidad, PU)
|
||||
If ObjDescuento.EsPUModificado Then
|
||||
@@ -5512,7 +5513,7 @@ Partial Class PV
|
||||
Proyecto = RowSP("Proyecto").ToString
|
||||
End If
|
||||
|
||||
Dim Consec = AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||
Dim Consec As Integer = AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero, DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text,
|
||||
CvePS, "", TxtObsPS.Text.Trim, PU, ObjDescuento.ImporteDescuento,
|
||||
CveProyecto, Proyecto, DdlSubProyectoDatos.SelectedValue.ToEntero, DdlSubProyectoDatos.SelectedItem.Text,
|
||||
Serie:="", TiempoEntrega:="", CuentaPredial:="", RegeneraIEPS:=ClienteDesglosaIEPS, CveVentaDetalle:=CveVentaDetalle, EsCargo:=EsCargo)
|
||||
@@ -5548,7 +5549,7 @@ Partial Class PV
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Total = 0.0D
|
||||
Dim Total As Decimal = 0.0D
|
||||
Dim Descuento As Decimal = HdnDescuento.Value.ToDecimal
|
||||
Dim Porcentaje As Decimal = Descuento / TmpDT.SUMD("Total")
|
||||
Dim LastDr As DataRow = Nothing
|
||||
@@ -5661,7 +5662,7 @@ Partial Class PV
|
||||
|
||||
#Region "CALCULA TOTALES"
|
||||
Private Sub CalculaTotalesVenta(Optional RecalculaImpuestosLocales As Boolean = True)
|
||||
Dim TmpDT = Me.TmpDT.FiltraParametros("EliminarDB = False", Orderby:="Consec")
|
||||
Dim TmpDT As DataTable = Me.TmpDT.FiltraParametros("EliminarDB = False", Orderby:="Consec")
|
||||
|
||||
Dim TotalSubTotal As Decimal = TmpDT.SUM("TotalImporte").ToDecimal
|
||||
Dim TotalDescuentos As Decimal = TmpDT.SUM("Descuento").ToDecimal
|
||||
@@ -5744,7 +5745,7 @@ Partial Class PV
|
||||
Dim Cuerpo As String = String.Empty
|
||||
Dim ResultadoMail As Integer = 0
|
||||
|
||||
Dim TipoComprobante = ""
|
||||
Dim TipoComprobante As String = ""
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.ToString = "Ing" Then TipoComprobante = "Factura"
|
||||
If DdlTipoComprobante.SelectedValue.ToString = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||
@@ -6144,8 +6145,8 @@ Partial Class PV
|
||||
DtPagos.Rows.RemoveAt(e.RowIndex)
|
||||
|
||||
'JJMQ 20160506: Validacion para no pagar de mas a peticion de I.P.
|
||||
Dim abonado = DtPagos.SUM("Importe")
|
||||
Dim saldo = TxtTotal.Text.Replace(",", "").ToDouble - abonado
|
||||
Dim abonado As Decimal = DtPagos.SUMD("Importe")
|
||||
Dim saldo As Decimal = TxtTotal.Text.Replace(",", "").ToDecimal - abonado
|
||||
'CVImporteContado.ValueToCompare = (saldo.FormatoNumero(2).ToDouble).ToString
|
||||
|
||||
CargaGridContado()
|
||||
@@ -6173,7 +6174,7 @@ Partial Class PV
|
||||
'Pago en Efectivo
|
||||
If TxtImporteEfectivo.Text.ToDecimal > 0 Then
|
||||
If DdlCuentaEfectivo.Items.Count > 0 Then
|
||||
Dim DrEfectivo = DtPagos.NewRow
|
||||
Dim DrEfectivo As DataRow = DtPagos.NewRow
|
||||
DrEfectivo("CveTipoMovimiento") = 13
|
||||
DrEfectivo("TipoMovimiento") = "Pago en Efectivo"
|
||||
DrEfectivo("CveCuenta") = DdlCuentaEfectivo.SelectedValue
|
||||
@@ -6192,7 +6193,7 @@ Partial Class PV
|
||||
'Pago Tarjeta Credito
|
||||
If TxtImporteCredito.Text.ToDecimal > 0 Then
|
||||
If DdlCuentaTarjetaCredito.Items.Count > 0 Then
|
||||
Dim DrCredito = DtPagos.NewRow
|
||||
Dim DrCredito As DataRow = DtPagos.NewRow
|
||||
DrCredito("CveTipoMovimiento") = 12
|
||||
DrCredito("TipoMovimiento") = "Tarjeta de Crédito"
|
||||
DrCredito("CveCuenta") = DdlCuentaTarjetaCredito.SelectedValue
|
||||
@@ -6211,7 +6212,7 @@ Partial Class PV
|
||||
'Pago Tarjeta Debito
|
||||
If TxtImporteDebito.Text.ToDecimal > 0 Then
|
||||
If DdlCuentaTarjetaDebito.Items.Count > 0 Then
|
||||
Dim DrDebito = DtPagos.NewRow
|
||||
Dim DrDebito As DataRow = DtPagos.NewRow
|
||||
DrDebito("CveTipoMovimiento") = 11
|
||||
DrDebito("TipoMovimiento") = "Tarjeta de Debito"
|
||||
DrDebito("CveCuenta") = DdlCuentaTarjetaDebito.SelectedValue
|
||||
@@ -6231,7 +6232,7 @@ Partial Class PV
|
||||
'Pago Tarjeta Debito
|
||||
If TxtImporteCheque.Text.ToDecimal > 0 Then
|
||||
If DdlCuentaCheque.Items.Count > 0 Then
|
||||
Dim DrCheque = DtPagos.NewRow
|
||||
Dim DrCheque As DataRow = DtPagos.NewRow
|
||||
DrCheque("CveTipoMovimiento") = 3
|
||||
DrCheque("TipoMovimiento") = "Cheque"
|
||||
DrCheque("CveCuenta") = DdlCuentaCheque.SelectedValue
|
||||
@@ -6251,7 +6252,7 @@ Partial Class PV
|
||||
'Pago Transferencia
|
||||
If TxtImporteTransferencia.Text.ToDecimal > 0 Then
|
||||
If DdlCuentaTransferencia.Items.Count > 0 Then
|
||||
Dim DrCheque = DtPagos.NewRow
|
||||
Dim DrCheque As DataRow = DtPagos.NewRow
|
||||
DrCheque("CveTipoMovimiento") = 8
|
||||
DrCheque("TipoMovimiento") = "Transferencia"
|
||||
DrCheque("CveCuenta") = DdlCuentaTransferencia.SelectedValue
|
||||
@@ -6281,7 +6282,7 @@ Partial Class PV
|
||||
LimpiaEscondeContado()
|
||||
End Sub
|
||||
Private Function ValidaPagosContado() As Boolean
|
||||
Dim Retorno = False
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
If DtPagos.SUM("Importe").ToString.ToDecimal > TxtTotal.Text.ToDecimal Then
|
||||
Alert("El importe de los pagos no puede exceder el importe de la factura. Por favor verifique.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -6308,13 +6309,13 @@ Partial Class PV
|
||||
#Region " SERIE ALMACEN "
|
||||
|
||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||
Dim Row = CType(CType(sender, Button).NamingContainer, GridViewRow)
|
||||
Dim Row As GridViewRow = CType(CType(sender, Button).NamingContainer, GridViewRow)
|
||||
|
||||
If Row.FCTextBox("TxtSerie").Text.Trim = "" Then Exit Sub
|
||||
|
||||
Dim Index = Row.RowIndex
|
||||
Dim Index As Integer = Row.RowIndex
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Existencia = ObjInventarios.GetExistenciasPSSerie(Row.FCTextBox("TxtSerie").Text.ToString.Trim, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
Dim Existencia As Decimal = ObjInventarios.GetExistenciasPSSerie(Row.FCTextBox("TxtSerie").Text.ToString.Trim, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
'Valida Existencia
|
||||
@@ -6334,9 +6335,9 @@ Partial Class PV
|
||||
End Sub
|
||||
|
||||
Private Function ValidaSerieINV() As Boolean
|
||||
Dim Retorno = False
|
||||
Dim Existencia = 0.0
|
||||
Dim ExistenciaActual = 0.0
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Existencia As Decimal = 0
|
||||
Dim ExistenciaActual As Decimal = 0
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
For Each Gvr As GridViewRow In GvInv.Rows
|
||||
@@ -6351,7 +6352,7 @@ Partial Class PV
|
||||
If Gvr.FCTextBox("TxtSerie").Visible = True And Gvr.FCTextBox("TxtSerie").Text.Trim <> "" Then
|
||||
|
||||
Existencia = ObjInventarios.GetExistenciasPSSerie(Gvr.FCTextBox("TxtSerie").Text.ToString, ddlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa)
|
||||
ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Gvr.FCTextBox("TxtSerie").Text.Trim))
|
||||
ExistenciaActual = DtInv.SUMD("Cantidad", String.Format("Serie = '{0}'", Gvr.FCTextBox("TxtSerie").Text.Trim))
|
||||
|
||||
'Valida Existencia
|
||||
If Existencia - ExistenciaActual < 0 Or Existencia = 0 Then
|
||||
@@ -6562,7 +6563,7 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
Dim EsPersonaMoral As Boolean = (RdTipoPersona.SelectedValue = "1")
|
||||
Dim DtUsosCFDI = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
||||
Dim DtUsosCFDI As DataTable = GlobalDTSATUsosCFDI(If(Not EsPersonaMoral, 1, 0), RegimenFiscalReceptor:=RegimenFiscalCliente).FiltraParametros($"CveUsoCFDI = {CveUsoCFDI}")
|
||||
|
||||
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)
|
||||
@@ -6582,7 +6583,7 @@ Partial Class PV
|
||||
Dim ObjCliente As New ClsClientes
|
||||
|
||||
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
||||
Dim GeneroCliente = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||
@@ -6980,7 +6981,7 @@ Partial Class PV
|
||||
DdlTipoDefecto.DataSource = GlobalDTAcumTiposDefecto(UsuarioActual.CveEmpresa)
|
||||
DdlTipoDefecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
Dim DtTamanios = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0")
|
||||
Dim DtTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa).FiltraParametros($" CvePSCargo > 0")
|
||||
|
||||
CargaModelos()
|
||||
CargaBCIAjuste()
|
||||
@@ -7018,6 +7019,7 @@ Partial Class PV
|
||||
DtModelosAuto = ObjGral.DtResultados
|
||||
DdlModeloAuto.DataSource = DtModelosAuto
|
||||
End If
|
||||
ObjGral.Dispose()
|
||||
DdlModeloAuto.DataBind()
|
||||
DdlModeloAuto.Items.Insert(0, New ListItem("-", "-1"))
|
||||
End Sub
|
||||
@@ -7266,7 +7268,7 @@ Partial Class PV
|
||||
|
||||
If PrecioSugerido = 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
Dim CostoPS As Decimal = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, DdlSubProyectoDatos.SelectedValue.ToEntero(), CveTipoAlmacen:=1)
|
||||
'si el costo es cero, puede ser que no halla movimientos del producto, en esa sucursal. y se volverá a sacar sin especificar sucursal
|
||||
If CostoPS = 0 Then CostoPS = ObjInventarios.GetCostoPS(CvePSParametro, TxtCantidad.Text.Trim.ToDouble, -1, "-1", TxtFecha.Text.ToDate, -1, CveTipoAlmacen:=1)
|
||||
ObjInventarios.Dispose()
|
||||
@@ -7969,10 +7971,8 @@ Partial Class PV
|
||||
End If
|
||||
|
||||
Dim ListaPScargo As New List(Of Modelos.MConceptoUsado)
|
||||
|
||||
Dim DTTamanios As DataTable = GlobalDTAcumTamaños(UsuarioActual.CveEmpresa)
|
||||
Dim DTCvePSCostos = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||
|
||||
Dim DTCvePSCostos As DataTable = DTTamanios.FiltraParametros("", "", {"CvePSCargo"})
|
||||
|
||||
Dim CveUnidadMedidaPSA As Integer = -1
|
||||
Dim UnidadMedidaPSA As String = "Unidad"
|
||||
@@ -8060,7 +8060,7 @@ Partial Class PV
|
||||
Next
|
||||
ObjProductosServicios.Dispose()
|
||||
|
||||
Dim ModalidadBack = Modalidad
|
||||
Dim ModalidadBack As String = Modalidad
|
||||
'CAMBIA LA MODALIDAD PARA AGREGAR LOS PS CARGO
|
||||
If Modalidad = "U" Then
|
||||
Modalidad = "A"
|
||||
|
||||
@@ -1869,10 +1869,10 @@ Partial Class ProductosyServicios
|
||||
CargaGvPSAdicionales()
|
||||
End Sub
|
||||
Private Sub GvPSAdicionales_RowDeleting(sender As Object, e As GridViewDeleteEventArgs) Handles GvPSAdicionales.RowDeleting
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim CvePSAdicional = GvPSAdicionales.Rows(e.RowIndex).DataKey("CvePSAdicional").ToEntero
|
||||
Dim PSAdicional = GvPSAdicionales.Rows(e.RowIndex).DataKey("PS").ToString
|
||||
Dim CvePSAdicional As Integer = GvPSAdicionales.Rows(e.RowIndex).DataKey("CvePSAdicional").ToEntero
|
||||
Dim PSAdicional As String = GvPSAdicionales.Rows(e.RowIndex).DataKey("PS").ToString
|
||||
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
If Not ObjProductosServicios.RemovePSAdicionales(CvePS, CvePSAdicional) Then
|
||||
@@ -1912,7 +1912,7 @@ Partial Class ProductosyServicios
|
||||
Private Sub BtnAgregarPSAdicional_Click(sender As Object, e As EventArgs) Handles BtnAgregarPSAdicional.Click
|
||||
Dim ObjProductosServicios As New ClsProductosServicios()
|
||||
ObjProductosServicios.IniciaTransacSQL()
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If CvePSAdicional < 0 Then
|
||||
If Not ObjProductosServicios.AddPSAdicionales(CvePS, DdlPSAdicional.SelectedValue.ToEntero, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
|
||||
@@ -5,8 +5,6 @@ Imports System.Data
|
||||
Imports System.Drawing
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
'Imports CrystalDecisions.CrystalReports.Engine
|
||||
'Imports CrystalDecisions.Shared
|
||||
|
||||
Partial Class Ventas_RepVentasUtilidad
|
||||
Inherits ClsPaginas
|
||||
@@ -90,16 +88,17 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
DdlMarcas.DataBind()
|
||||
DdlMarcas.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
Dim CveSubProyecto = 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 CveCliente = 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 Gpo = 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 FechaF = 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 CvePS = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS") <> "", Request("CvePS"), "-1").ToString
|
||||
Dim CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca") <> "", Request("CveMarca"), "-1").ToString
|
||||
Dim CveSubProyecto As String = If(Request("CveSubProyecto") IsNot Nothing, Request("CveSubProyecto").ToString, "-1").ToString
|
||||
Dim CveVendedor As String = If(Request("CveVendedor") IsNot Nothing AndAlso Request("CveVendedor") <> "", Request("CveVendedor"), "-1").ToString
|
||||
Dim CveCliente As String = If(Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente") <> "", Request("CveCliente"), "-1").ToString
|
||||
Dim CveGpo As String = If(Request("CveGpo") IsNot Nothing AndAlso Request("CveGpo") <> "", Request("CveGpo"), "-1").ToString
|
||||
Dim Gpo As String = If(Request("Gpo") IsNot Nothing AndAlso Request("Gpo") <> "", Request("Gpo"), "-1").ToString
|
||||
Dim FechaI As String = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
||||
Dim FechaF As String = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
||||
Dim CveClasificacion As String = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion") <> "", Request("CveClasificacion"), "-1").ToString
|
||||
Dim CveCategoria As String = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria") <> "", Request("CveCategoria"), "-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)
|
||||
DdlVendedor.SelectedValuesIfExistM(CveVendedor)
|
||||
@@ -107,6 +106,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
DdlClientes.SelectedValue = CveCliente
|
||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}").FiltroPrimeroValor("Nombre")
|
||||
End If
|
||||
DdlCategoria.SelectedValueExist(CveCategoria)
|
||||
DdlClasificacion.SelectedValueExist(CveClasificacion)
|
||||
DdlPS.SelectedValue = CvePS
|
||||
If CvePS.ToEntero > 0 AndAlso GlobalDTPS(UsuarioActual.CveEmpresa, CvePS.ToEntero).Rows.Count > 0 Then
|
||||
@@ -125,8 +125,8 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Case 1
|
||||
txtFechaF.Text = $"31/12/{CveGpo}"
|
||||
Case 2
|
||||
Dim Mes = CveGpo.Substring(5, 2)
|
||||
Dim DiaFinal = ""
|
||||
Dim Mes As String = CveGpo.Substring(5, 2)
|
||||
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"
|
||||
txtFechaI.Text = $"01/{CveGpo.Substring(5, 2)}/{CveGpo.Substring(0, 4)}"
|
||||
If txtFechaI.Text.ToDate.FirstDayOfMonth = FechaI.ToDate.FirstDayOfMonth Then
|
||||
@@ -297,12 +297,13 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
If txtFechaI.Text = "" Then FechaI = MinFecha
|
||||
If txtFechaF.Text = "" Then FechaF = MaxFecha
|
||||
|
||||
Dim Cliente = If(DdlClientes.SelectedValue = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Sucursal = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim Marca = If(DdlMarcas.SelectedValue = "-1", "", $" <b>Marcas:</b> {DdlMarcas.SelectedItem.Text}")
|
||||
Dim Cliente As String = If(DdlClientes.SelectedValue = "", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Sucursal As String = If(DdlSubProyecto.GetSelectedText = "", "", $" <b>Sucursal:</b> {DdlSubProyecto.GetSelectedText}")
|
||||
Dim Vendedor As String = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Clasificacion As String = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.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 FechaIn As String = $" <b>Fecha Inicio:</b> {txtFechaI.Text}"
|
||||
@@ -323,7 +324,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
If txtFechaF.Text = "" Then FechaFin = "-1"
|
||||
|
||||
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 params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
@@ -345,17 +346,17 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
End Sub
|
||||
Private Sub GenerarPDFCrystal(Optional Formato As String = "PDF")
|
||||
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 FechaFn As String = $" <b>Fecha Fin:</b> {txtFechaF.Text}"
|
||||
Dim Cliente = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificacion:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim Cliente As String = If(DdlClientes.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientes.SelectedText}")
|
||||
Dim Vendedor As String = If(DdlVendedor.GetSelectedText = "", "", $" <b>Vendedor:</b> {DdlVendedor.GetSelectedText}")
|
||||
Dim PS As String = If(DdlPS.SelectedValue = "-1", "", $" <b>P.S.:</b> {DdlPS.SelectedText}")
|
||||
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("AgrupadoPor", $"{Sucursal}{FechaIn}{FechaFn}{Cliente}{Vendedor}{PS}{Clasificacion}"))
|
||||
lista.Add(New CrystalParametro("UtilidadPerdida", LblNombreNeto.Text))
|
||||
|
||||
@@ -226,7 +226,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpDetalles" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||
<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="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -268,13 +268,13 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td><b>Dias Emision:</b> </td>
|
||||
<td><b>Dias Emisión:</b> </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><b>Dias Vencimiento:</b> </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>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -288,7 +288,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpBonificacion" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||
<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="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
@@ -330,7 +330,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpDetallesCosto" runat="server" UpdateMode="Conditional" class="col-md-4">
|
||||
<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="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
|
||||
@@ -131,6 +131,7 @@
|
||||
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Producto/Servicio" Value="7"></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:DropDownList>
|
||||
</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"
|
||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<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="Descuento" DataField="Descuento" 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.Cells(0).Text = "Total"
|
||||
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("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)
|
||||
Else
|
||||
e.Row.Cells(9).BackColor = Drawing.Color.LightGray
|
||||
|
||||
@@ -936,8 +936,6 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="divtab">
|
||||
<asp:UpdatePanel ID="UpPS" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -5335,7 +5333,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<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>
|
||||
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
||||
<ControlStyle Width="8px" />
|
||||
@@ -5355,7 +5353,7 @@
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<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>
|
||||
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
||||
<ControlStyle Width="8px" />
|
||||
@@ -5368,7 +5366,7 @@
|
||||
Cantidad
|
||||
</HeaderTemplate>
|
||||
<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>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad3" runat="server" HighlightCssClass="vco" TargetControlID="RVCantRem" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ItemTemplate>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user