Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1000,6 +1000,12 @@ Public Class ClsContabilidad
|
||||
ElseIf ex1.Message.Contains("UK_Vw_Val_Conta_CuentasResultados_SubProyectos") Then
|
||||
Dim Concepto3 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable))
|
||||
OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
ElseIf ex1.Message.Contains("50025;") Then
|
||||
OnError("La empresa no tiene un formato de cuenta asignado.", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
ElseIf ex1.Message.Contains("50026;") Then
|
||||
OnError("El proveedor ya tiene asignada una cuenta.", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
ElseIf ex1.Message.Contains("50027;") Then
|
||||
OnError("No se pudo asignar la cuenta al proveedor.", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
Else
|
||||
OnError("Ocurrió un error al Guardar", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End If '
|
||||
|
||||
@@ -2534,6 +2534,31 @@ Public Class ClsOC
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateNumeroRemision(CveOrdenCompra As Integer, NumRemision As String, cveEmpresa As Integer) As Boolean
|
||||
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OC_OCNumeroRemisionUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra
|
||||
.Add("@NumRemision", SqlDbType.VarChar).Value = NumRemision
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el número de remisión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#Region " IDisposable Support "
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
@@ -2555,5 +2580,7 @@ Public Class ClsOC
|
||||
Dispose(True)
|
||||
GC.SuppressFinalize(Me)
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
@@ -5535,6 +5535,9 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepComisionesServecDetalle.aspx".ToUpper(), 782)
|
||||
PaginaDict.Add("/Ventas/RepCancelacionesVentas.aspx".ToUpper(), 1325)
|
||||
|
||||
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx".ToUpper(), 1331)
|
||||
PaginaDict.Add("/Ventas/RepLineasAdicionales.aspx?OP=OP".ToUpper(), 1332)
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -5663,8 +5666,6 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Acumuladores/RepPolizasVirtuales.aspx".ToUpper(), 1322)
|
||||
|
||||
|
||||
|
||||
|
||||
'Antes de aquí.
|
||||
Application("GlobalSIGAppPaginas") = PaginaDict
|
||||
|
||||
@@ -9605,7 +9606,7 @@ Public Class ClsPaginas
|
||||
Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
|
||||
If UltimaFluctuacion.FechaFluctuacion <= tFecha Then
|
||||
If UltimaFluctuacion.FechaFluctuacion <= tFecha AndAlso CompraActual.Fecha <= UltimaFluctuacion.FechaFluctuacion Then
|
||||
'FechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion
|
||||
TCValuacion = UltimaFluctuacion.TCFluctuacion
|
||||
End If
|
||||
@@ -9634,8 +9635,10 @@ Public Class ClsPaginas
|
||||
|
||||
End If
|
||||
|
||||
'si tiene iva y su proporcion
|
||||
If Not ErrorMovtos AndAlso CompraActual.IVA <> 0 Then
|
||||
If Pago.AplicaAcreditable Then
|
||||
|
||||
'si tiene iva y su proporcion
|
||||
If Not ErrorMovtos AndAlso CompraActual.IVA <> 0 Then
|
||||
ImporteMovimiento = (PorcentajePago * CompraActual.IVA).RoundSQL
|
||||
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
||||
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
||||
@@ -9701,27 +9704,29 @@ Public Class ClsPaginas
|
||||
|
||||
End If
|
||||
|
||||
'si tiene IEPS y su proporcion
|
||||
If Not ErrorMovtos AndAlso CompraActual.IEPS > 0 Then
|
||||
ImporteMovimiento = (PorcentajePago * CompraActual.IEPS).RoundSQL
|
||||
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
||||
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
||||
'si tiene IEPS y su proporcion
|
||||
If Not ErrorMovtos AndAlso CompraActual.IEPS > 0 Then
|
||||
ImporteMovimiento = (PorcentajePago * CompraActual.IEPS).RoundSQL
|
||||
ImporteMN = (ImporteMovimiento * CompraActual.TC).RoundSQL
|
||||
If CompraActual.CveMoneda > 1 Then ImporteME = ImporteMovimiento
|
||||
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
If ObjConta.GetRetCuenta(26, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
If ObjConta.GetRetCuenta(26, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
|
||||
If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
If ObjConta.GetRetCuenta(25, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContablexAcreditar = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxAcreditar").ToString.ToEntero
|
||||
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 25, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
|
||||
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
|
||||
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 26, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteMovimiento, ImporteMN, 25, CompraActual.SerieFolio, Concepto, Ret.IdCtaContablexAcreditar, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
|
||||
'si tiene funcionalidad para tomar el TC de pago. se recalcula el importe
|
||||
If FuncionalidadFluctuacionImpuestos Then ImporteMN = (ImporteMovimiento * Pago.TCPago).RoundSQL
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteMovimiento, ImporteMN, 26, CompraActual.SerieFolio, Concepto, Ret.IdCtaContableAcreditable, CveCompra:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambio:=CompraActual.TC, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
|
||||
End If
|
||||
|
||||
'si tiene otros gastos/ingresos
|
||||
@@ -9779,6 +9784,7 @@ Public Class ClsPaginas
|
||||
|
||||
|
||||
Public Class CompraPago
|
||||
Public Property TipoPago As String = "B" ' B - Bancos, A - Anticipos, E - ExC, NC - Nota de crédito
|
||||
Public Fecha As Date
|
||||
Public Property CveIE As Integer = -1
|
||||
Public Property CvePersonal As Integer = -1
|
||||
@@ -9789,6 +9795,7 @@ Public Class ClsPaginas
|
||||
Public Property OtroGastoIngreso As Decimal = 0
|
||||
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
||||
Public Property CveCreditoDetalle As Integer = -1
|
||||
Public Property AplicaAcreditable As Boolean = True
|
||||
|
||||
End Class
|
||||
|
||||
@@ -9797,6 +9804,7 @@ Public Class ClsPaginas
|
||||
Public Property CveProveedor As Integer
|
||||
Public Property CveTipoConceptoProveedor As Integer
|
||||
Public Property CveMoneda As Integer
|
||||
Public Property Fecha As Date
|
||||
Public Property SerieFolio As String = ""
|
||||
Public Property ProveedorNombre As String = ""
|
||||
Public Property EsImportacion As Boolean = False
|
||||
@@ -10095,7 +10103,7 @@ Public Class ClsPaginas
|
||||
'concepto pago
|
||||
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||
|
||||
If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then 'A N T I C I P O
|
||||
If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then ' A N T I C I P O
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
@@ -10111,14 +10119,14 @@ Public Class ClsPaginas
|
||||
|
||||
End If
|
||||
|
||||
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
||||
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
If Pago.CveMonedaPago > 1 Then
|
||||
'Agregamos la Extranjera
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 91, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 294, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
|
||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 203, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||
Else
|
||||
'Agregamos Nacional
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, 91, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||
@@ -10127,7 +10135,7 @@ Public Class ClsPaginas
|
||||
|
||||
End If
|
||||
|
||||
If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then 'I N G R E S O S X C O M P R O B A R
|
||||
If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R
|
||||
Dim Ret As New ConceptosRetenciones
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
If ObjConta.GetRetCuenta(66, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then Ret.IdCtaContableAcreditable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSAcreditable").ToString.ToEntero
|
||||
|
||||
@@ -5575,6 +5575,124 @@ Public Class ClsVentas
|
||||
End Function
|
||||
|
||||
|
||||
Public Function GetLineasAdicionales(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, CveMoneda As Integer,
|
||||
FechaI As Date, FechaF As Date, CveEstatus As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_LineasAdicionalesGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error obtener las lineas de adicionales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Function AddLineasAdicionales(LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal,
|
||||
CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveClasificacionPS As Integer, CveEstatus As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_LineasAdicionalesAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
|
||||
.Add("@LineaAdicional", SqlDbType.VarChar).Value = LineaAdicional
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea
|
||||
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveClasificacionPS", SqlDbType.Int).Value = CveClasificacionPS
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error agregar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function UpdateLineasAdicionales(CveLineaAdicional As Integer, LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal,
|
||||
CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveClasificacionPS As Integer, CveEstatus As Integer, CveEmpresa As Integer, Optional Comprobante As String = "-1") As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_LineasAdicionalesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||
.Add("@LineaAdicional", SqlDbType.VarChar).Value = LineaAdicional
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea
|
||||
.Add("@Importe", SqlDbType.Money).Value = Importe
|
||||
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
|
||||
.Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveClasificacionPS", SqlDbType.Int).Value = CveClasificacionPS
|
||||
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Comprobante", SqlDbType.VarChar).Value = Comprobante
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error agregar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
Public Function RemoveLineasAdicionales(CveLineaAdicional As Integer, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_LineasAdicionalesRemove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
|
||||
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error eliminar la linea adicional.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#Region "IDisposable Support"
|
||||
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
<ContentTemplate>
|
||||
<br />
|
||||
<div style="height:450px;overflow-x:scroll">
|
||||
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None">
|
||||
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio,CveCuenta" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
|
||||
@@ -42,8 +42,12 @@ Partial Class Bancos_DepositosCaja
|
||||
DdlCuentaDeposito.DataBind()
|
||||
|
||||
DdlCajaChica.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"})
|
||||
DdlCajaChica.DataBind()
|
||||
|
||||
DdlCajaChica.DataBind()
|
||||
'código temporal, para claudia y toñita
|
||||
If UsuarioActual.CveUsuario.Contiene(1937, 2452) Then
|
||||
DdlCajaChica.Items.Add(New ListItem("Todas", "-1"))
|
||||
End If
|
||||
|
||||
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyectos.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
@@ -102,19 +106,14 @@ Partial Class Bancos_DepositosCaja
|
||||
|
||||
GvFacturas.DataSource = ObjBancos.DtResultados
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
|
||||
lblValorTotal.Text = ObjBancos.DtResultados.SUM("Importe").ToString("###,###,###.00")
|
||||
RegistraScript($" ValorTotalSeleccionado = {ObjBancos.DtResultados.SUM("Importe")};")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjBancos.Dispose()
|
||||
|
||||
|
||||
GvFacturas.DataBind()
|
||||
ChkFaltante.Checked = False
|
||||
ChkDescuento.Checked = False
|
||||
@@ -133,9 +132,6 @@ Partial Class Bancos_DepositosCaja
|
||||
UpParametros.Update()
|
||||
UpComisiones.Update()
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub BtnDepositar_Click(sender As Object, e As EventArgs) Handles BtnDepositar.Click
|
||||
@@ -305,13 +301,14 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
|
||||
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
||||
Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero
|
||||
Dim CveCuentaBancaria As Integer = Gvr.DataKey("CveCuenta").ToEntero
|
||||
|
||||
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
|
||||
FolioIE = ObjBancos.GetNextFolio(CveCuentaBancaria, 2)
|
||||
If Not FolioIE > 0 Then
|
||||
OcurrioError = True
|
||||
Exit For
|
||||
End If
|
||||
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CveIEDestino = ObjBancos.AddBancos_IE(CveCuentaBancaria, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio) Then
|
||||
|
||||
@@ -361,13 +361,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
if (UsaComplementaria)
|
||||
{
|
||||
// BANCOS - COMPLEMENTARIA
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, 0, Ref, 204, Conc, IDCtaContableBancosComplementariaPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, 0, (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), 204, Ref, Conc, IDCtaContableBancosComplementariaPrestamo, CveIEDevolucion: CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos complementaria";
|
||||
}
|
||||
|
||||
// BANCOS
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(),CveConceptoContableBanco, Ref, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos";
|
||||
}
|
||||
@@ -375,7 +375,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
else
|
||||
{
|
||||
// BANCOS
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal() * tipoCambio, CveConceptoContableBanco, Ref, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos";
|
||||
}
|
||||
@@ -385,13 +385,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
if (UsaComplementaria) //(IDCtaContableDeudorCompPrestamo > 0)
|
||||
{
|
||||
// DEUDOR COMPLEMENTARIA
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, 0, Ref, 256, Conc, IDCtaContableDeudorCompPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, 0, (TxtImportePrestamo.Text.ToDecimal() * tipoCambio) - TxtImportePrestamo.Text.ToDecimal(), 256, Ref, Conc, IDCtaContableDeudorCompPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de deudor complementaria";
|
||||
}
|
||||
|
||||
// DEUDOR
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), CveConceptoContablePrestamo, Ref, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de deudor";
|
||||
}
|
||||
@@ -399,7 +399,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
else
|
||||
{
|
||||
// DEUDOR
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal() * tipoCambio, ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal() * tipoCambio, CveConceptoContablePrestamo, Ref, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteME: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de deudor";
|
||||
}
|
||||
@@ -409,13 +409,13 @@ public partial class Bancos_PagoDeudor : ClsPaginas
|
||||
else
|
||||
{
|
||||
// BANCOS
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContableBanco, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, true, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), CveConceptoContableBanco, Ref, Conc, IDCtaContableBancosPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de bancos";
|
||||
}
|
||||
|
||||
// DEUDOR
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), Ref, CveConceptoContablePrestamo, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), ImporteMX: TxtImportePrestamo.Text.ToDecimal(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
if (!ObjMov.AddPrePolizasDetalle(CvePrePoliza, false, TxtImportePrestamo.Text.ToDecimal(), TxtImportePrestamo.Text.ToDecimal(), CveConceptoContablePrestamo, Ref, Conc, IDCtaContableDeudorPrestamo, CveIE, CveProveedor: DdlProveedorPrestamo.SelectedValue.ToEntero(), TipoCambio: tipoCambio, CveSubProyecto: DdlSubProyecto.SelectedValue.ToEntero()))
|
||||
{
|
||||
MsgError = "No se pudo insertar concepto de deudor";
|
||||
}
|
||||
|
||||
@@ -829,6 +829,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CompraActual.CveTipoConceptoProveedor = gvr.DataKey("CveTipoConcepto").ToEntero
|
||||
CompraActual.CveProveedor = gvr.DataKey("CveProveedor").ToEntero
|
||||
CompraActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero
|
||||
CompraActual.Fecha = gvr.DataKey("Fecha").ToDate
|
||||
CompraActual.SerieFolio = gvr.DataKey("SerieFolio").ToString
|
||||
CompraActual.ProveedorNombre = HplProveedor.Text
|
||||
CompraActual.TC = gvr.DataKey("TipoCambioOriginal").ToDecimal
|
||||
|
||||
@@ -4102,7 +4102,7 @@
|
||||
<div class="col-md-12">
|
||||
<asp:UpdatePanel ID="UPDeudores" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" CssClass="ScrollAD" data-heigth="200px" EmptyDataText="No se encontraron moviemientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor"
|
||||
<asp:GridView ID="GvDeudores" runat="server" AutoGenerateColumns="False" CssClass="ScrollAD" data-heigth="200px" EmptyDataText="No se encontraron moviemientos" DataKeyNames="CveIE,Saldo,RazonSocial,Folio,CveProveedor,CveMoneda"
|
||||
ToolTip="Listado de Movimientos" data-height="300" Style="width: 100%; height: 100%; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
@@ -4417,6 +4417,12 @@
|
||||
<asp:DropDownList ID="DdlCultivosCuadro" CssClass=" form-control input-sm select2me" runat="server" DataTextField="TemporadaCuadro" Style="width: 100%; max-width: 600px;"
|
||||
DataValueField="CveCultivoCuadroDetalle" ValidationGroup="GrpDetalleGuardar">
|
||||
</asp:DropDownList>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RfvDdlCultivosCuadro" runat="server" ControlToValidate="DdlCultivosCuadro" CssClass="help-block errorimput" InitialValue="-1"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cultivo''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GprAgregaPS" Visible="false" Display="None">
|
||||
</asp:RequiredFieldValidator>
|
||||
|
||||
<label runat="server" id="Label9" for="<%= DdlCultivosCuadro.ClientID.ToString()%>">Cultivo:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,6 +7,7 @@ Imports System.IO
|
||||
Imports System.Threading.Tasks
|
||||
Imports System.Xml
|
||||
Imports Extensiones
|
||||
Imports Microsoft.ReportingServices.DataProcessing
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Partial Class Compras_Compras
|
||||
@@ -1135,9 +1136,16 @@ Partial Class Compras_Compras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FechaCompraOriginal As Date
|
||||
|
||||
Get
|
||||
Return ViewState("FechaCompraOriginal").ToString.ToDate
|
||||
End Get
|
||||
Set(value As Date)
|
||||
ViewState("FechaCompraOriginal") = value
|
||||
End Set
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
@@ -1775,7 +1783,7 @@ Partial Class Compras_Compras
|
||||
CargaComprobanteXML(XMLDoc)
|
||||
|
||||
If NuevaValidacionXML = 1 Or (Version = "3.3" Or Version = "4.0") Then
|
||||
Dim Xml As New StringBuilder
|
||||
Dim Xml As String
|
||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||
Dim Version = ValorXML(nodo, "version")
|
||||
|
||||
@@ -1803,33 +1811,33 @@ Partial Class Compras_Compras
|
||||
namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal")
|
||||
|
||||
Dim nodeconceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces)
|
||||
Xml = Replace(nodeconceptos.OuterXml, "<cfdi:", "<")
|
||||
Xml = Xml.Replace("</cfdi:", "</")
|
||||
Xml = Xml.Replace("xmlns:cfdi=""http://www.sat.gob.mx/cfd/3""", "")
|
||||
Xml = Xml.Replace("xmlns:cfdi=""http://www.sat.gob.mx/cfd/4""", "")
|
||||
Xml = Xml.Replace(""", "") 'comillas
|
||||
Xml = System.Web.HttpUtility.HtmlDecode(Xml.ToString)
|
||||
Xml = Xml.Replace(Chr(13), "") 'salto de linea
|
||||
Xml = Xml.Replace(Chr(10), "")
|
||||
Xml = Xml.Replace("<br />", "") 'salto de linea html
|
||||
Xml = Xml.Replace("&", "") 'adicional, si hay otros
|
||||
|
||||
Xml.Append(Replace(Replace(Replace(Replace(nodeconceptos.OuterXml, "<cfdi:", "<"), "</cfdi:", "</"), "xmlns:cfdi=""http://www.sat.gob.mx/cfd/3""", ""), "xmlns:cfdi=""http://www.sat.gob.mx/cfd/4""", ""))
|
||||
|
||||
If ObjeFacturas.GetFacturasComparacionXML(Version, Xml.ToString, UsuarioActual.CveEmpresa) Then
|
||||
If ObjeFacturas.GetFacturasComparacionXML(Version, Xml, UsuarioActual.CveEmpresa) Then
|
||||
TmpDT = ObjeFacturas.DtResultados
|
||||
TmpDT.Columns.Add("CveSATPSActualizado")
|
||||
SubTotalConceptos = TmpDT.SUMD("Total").RoundSQL
|
||||
|
||||
'TmpDT.Columns.Add("RetIVAPorcentaje")
|
||||
'TmpDT.Columns.Add("RetISRPorcentaje")
|
||||
'TmpDT.Columns.Add("IEPSPSPorcentaje")
|
||||
'TmpDT.Columns.Add("IEPSPSIVAPorcentaje")
|
||||
SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal
|
||||
AddPS2(False)
|
||||
|
||||
|
||||
'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101
|
||||
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||
For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows
|
||||
|
||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", drr("PS"))
|
||||
|
||||
Next
|
||||
|
||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||
Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -2537,6 +2545,8 @@ Partial Class Compras_Compras
|
||||
TxtFolio.Text = dr("Folio").ToString
|
||||
TxtFolioSecundario.Text = dr("FolioSecundario").ToString
|
||||
TxtFecha.Text = dr("Fecha").ToString.ToDate.ToShortDateString
|
||||
FechaCompraOriginal = dr("Fecha").ToString.ToDate
|
||||
|
||||
TxtDescripcion.Text = dr("Descripcion").ToString
|
||||
CvePrePoliza = dr("CvePrePoliza").ToString.ToEntero
|
||||
EstatusAlmacen = dr("EstatusAlmacen").ToString.ToEntero
|
||||
@@ -4824,6 +4834,7 @@ Partial Class Compras_Compras
|
||||
CompraActual.CveTipoConceptoProveedor = CveTipoConcepto
|
||||
CompraActual.CveProveedor = CveProveedor
|
||||
CompraActual.CveMoneda = DdlMoneda.SelectedValue.ToEntero
|
||||
CompraActual.Fecha = TxtFecha.Text.ToDate
|
||||
CompraActual.SerieFolio = TxtSerie.Text.Trim & "-" & TxtFolio.Text.Trim
|
||||
CompraActual.ProveedorNombre = HplProveedor.Text
|
||||
CompraActual.TC = TipoCambio
|
||||
@@ -5743,7 +5754,6 @@ Partial Class Compras_Compras
|
||||
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
||||
Dim DT As DataTable = Nothing
|
||||
Dim CuentasContablesInvalidas As New StringBuilder
|
||||
Dim CuentasContablesInvalidasSIG As New StringBuilder
|
||||
Dim ConceptoPersonal As String = ""
|
||||
Dim IdCtaIVAXAcreditar As Integer = 0
|
||||
' Dim IdCtaIVAAcreditable As Integer = 0
|
||||
@@ -6131,7 +6141,7 @@ Partial Class Compras_Compras
|
||||
ConceptoContable = 333
|
||||
End If
|
||||
|
||||
importeMovimiento = CompraActual.retiva
|
||||
importeMovimiento = CompraActual.RetIVA
|
||||
importeMN = (importeMovimiento * tipoCambioActual * Multiplicador).RoundSQL
|
||||
If tipoCambioActual > 1 Then Concepto += $" TC{tipoCambioActual} ${importeMovimiento.FormatoNumero(2)}"
|
||||
|
||||
@@ -6935,9 +6945,14 @@ Partial Class Compras_Compras
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE}
|
||||
'Pago.CveMonedaPago = CveMonedaAnticipo 'pdte
|
||||
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
Next
|
||||
|
||||
Else
|
||||
For Each rw As GridViewRow In GvDeudores.Rows
|
||||
If rw.FCCheckBox("Chk").Checked Then
|
||||
@@ -6947,7 +6962,11 @@ Partial Class Compras_Compras
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 254, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
Dim Pago As New CompraPago With {.ImportePago = importeMovimiento, .CveIE = CveIE}
|
||||
'Pago.CveMonedaPago = CveMonedaAnticipo 'pdte
|
||||
AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -7309,35 +7328,35 @@ Partial Class Compras_Compras
|
||||
|
||||
If TxtTotal.Text.ToDouble > 0 AndAlso TieneAnticiposXML = False Then
|
||||
|
||||
Dim Pago As New CompraPago
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.CveIE = Ant.CveIE
|
||||
Pago.TCPago = Ant.TCCompra
|
||||
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
|
||||
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
||||
Dim Pago As New CompraPago
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.CveIE = Ant.CveIE
|
||||
Pago.TCPago = Ant.TCCompra
|
||||
Pago.CveMonedaPago = If(Ant.TCCompra > 1, 2, 1)
|
||||
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
||||
|
||||
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
End If
|
||||
ErrorPrepoliza = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
End If
|
||||
|
||||
'** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA
|
||||
'[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018
|
||||
|
||||
'If Not Ant.TipoMovto.Contiene("NC", "DEV") Then
|
||||
|
||||
' Dim Pago As New CompraPago
|
||||
' Pago.ImportePago = importeMovimiento
|
||||
' Pago.CveIE = Ant.CveIE
|
||||
' Pago.CveMonedaPago = 1
|
||||
|
||||
' ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, ObjConta)
|
||||
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
'** PRUEBA CUANDO SE AMORTIZA NC ANTES DE QUE SE REGISTRE NO DEBE TENER CONCEPTO 19 ** JM 01/06/2017 SE HIZO ESTO PARA LA FACTURA HRFA-8012831 DE VIGILANCIA
|
||||
'[IPP] NC NO DEBE REGISTRAR IMPUESTOS EN AMORTIZACIÓN 27/Agosto/2018
|
||||
|
||||
'If Not Ant.TipoMovto.Contiene("NC", "DEV") Then
|
||||
|
||||
' Dim Pago As New CompraPago
|
||||
' Pago.ImportePago = importeMovimiento
|
||||
' Pago.CveIE = Ant.CveIE
|
||||
' Pago.CveMonedaPago = 1
|
||||
|
||||
' ErrorPrepoliza = AplicaPrePolizaPago(CompraActual, Pago, ObjConta)
|
||||
|
||||
'End If
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(83) Then
|
||||
'Unificacion de PrePolizas
|
||||
If UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
|
||||
@@ -7635,6 +7654,7 @@ Partial Class Compras_Compras
|
||||
Pago.CveMonedaPago = 1
|
||||
Pago.CveCompraAmortizacion = CveCompraNC
|
||||
Pago.CveConceptoPago = CveConceptoPago
|
||||
Pago.AplicaAcreditable = If(Ant.TipoMovto.Contiene("NC", "DEV"), False, True) 'SI ES NC, no se acredita
|
||||
|
||||
ErrorMovtosCxP = AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
@@ -8412,7 +8432,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Dim ImporteAnt As Decimal = gvr.FCTextBox("TxtAnticipo").Text.ToDecimal
|
||||
Dim ImporComisionAnticipo As Decimal = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||
Dim CvemonedaAnticipo As Integer = gvr.DataKey("CveMoneda").ToEntero
|
||||
Dim CveMonedaAnticipo As Integer = gvr.DataKey("CveMoneda").ToEntero
|
||||
Dim TipoCambioAnt As Decimal = gvr.DataKey("TCCompra").ToDecimal
|
||||
|
||||
If ImporComisionAnticipo = 0 Then
|
||||
@@ -8431,7 +8451,7 @@ Partial Class Compras_Compras
|
||||
Dim Pago As New CompraPago
|
||||
Pago.ImportePago = ImporteAnt
|
||||
Pago.CveIE = CveIE
|
||||
Pago.CveMonedaPago = CvemonedaAnticipo
|
||||
Pago.CveMonedaPago = CveMonedaAnticipo
|
||||
Pago.CveCompraAmortizacion = CveCompraNC
|
||||
Pago.CveCreditoDetalle = -1
|
||||
Pago.OtroGastoIngreso = ImporComisionAnticipo
|
||||
@@ -8442,6 +8462,7 @@ Partial Class Compras_Compras
|
||||
CompraActual.CveTipoConceptoProveedor = CveTipoConcepto
|
||||
CompraActual.CveProveedor = CveProveedor
|
||||
CompraActual.CveMoneda = DdlMoneda.SelectedValue.ToEntero
|
||||
CompraActual.Fecha = TxtFecha.Text.ToDate
|
||||
CompraActual.SerieFolio = TxtSerie.Text.Trim & "-" & TxtFolio.Text.Trim
|
||||
CompraActual.ProveedorNombre = HplProveedor.Text
|
||||
CompraActual.TC = TipoCambio
|
||||
@@ -8461,9 +8482,7 @@ Partial Class Compras_Compras
|
||||
CompraActual.EsImportacion = chkImportacion.Checked
|
||||
|
||||
AplicaPrePolizaPagoCompra(CompraActual, pago, CvePrePoliza, ObjConta)
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -8558,8 +8577,20 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub BtnActualizar_Click(sender As Object, e As EventArgs) Handles BtnActualizar.Click
|
||||
|
||||
If CveFactura > 0 Then
|
||||
If Not AjustaCombustibles() Then
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'VALIDA IMPORTES
|
||||
If CveFactura > 0 Then 'SI NO VIENE DE FACTURA/XML NO VALIDA TOTALES
|
||||
|
||||
|
||||
|
||||
|
||||
If Not ValidaTotalesGuardar() Then
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -9306,15 +9337,15 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
'Removemos los conceptos de la prepoliza
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) 'GASTO
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) 'ALMACEN
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) 'AF
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) 'PS YA RECIBIDO
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) 'PS YA RECIBIDO
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 231, CveCompra, 1) 'PS YA RECIBIDO
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 176, CveCompra, 1) 'PS NO RECIBIDO
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) 'PS NO RECIBIDO
|
||||
ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) 'PS NO RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then ErrorPrepoliza = True 'ALMACEN
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then ErrorPrepoliza = True 'AF
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 231, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 176, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO
|
||||
|
||||
'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR
|
||||
Dim ConceptoContabilizacionAlmacen = 0
|
||||
@@ -10583,8 +10614,8 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
|
||||
Protected Sub GVINV_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvInv.RowUpdating
|
||||
Dim Cantidad As Double = DirectCast(GvInv.Rows(e.RowIndex).FindControl("txtECantidad"), TextBox).Text.ToDouble
|
||||
Dim CveUnidadMedida As Integer = DirectCast(GvInv.Rows(e.RowIndex).FindControl("ddlEUnidad"), DropDownList).SelectedValue.ToString.ToEntero
|
||||
Dim Cantidad As Double = GvInv.Rows(e.RowIndex).FCTextBox("txtECantidad").Text.ToDouble
|
||||
Dim CveUnidadMedida As Integer = GvInv.Rows(e.RowIndex).FCDropDownList("ddlEUnidad").SelectedValue.ToString.ToEntero
|
||||
DtInv.Rows.Item(e.RowIndex)("Cantidad") = Cantidad
|
||||
DtInv.Rows.Item(e.RowIndex)("CveUM") = CveUnidadMedida
|
||||
|
||||
@@ -16154,7 +16185,14 @@ Partial Class Compras_Compras
|
||||
RetIVA = TmpDT.SUM("RetIVA")
|
||||
RetISR = TmpDT.SUM("RetISR")
|
||||
IEPSPS = TmpDT.SUM("IEPSPS")
|
||||
IVA = If(TmpDT.SUM("IVA") > 0, SubTotalIVA + SubTotalIEPSIVA, 0)
|
||||
|
||||
If CveCompra > 0 AndAlso CveFactura > 0 Then
|
||||
IVA = TxtIVA.Text.ToDecimal
|
||||
Else
|
||||
IVA = If(TmpDT.SUM("IVA") > 0, SubTotalIVA + SubTotalIEPSIVA, 0)
|
||||
End If
|
||||
|
||||
|
||||
'If CalculaIVA Then IVA = TxtIVA.Text.ToDouble
|
||||
Descuentos = TmpDT.SUM("Descuento")
|
||||
|
||||
@@ -16714,6 +16752,9 @@ Partial Class Compras_Compras
|
||||
DdlPSChange()
|
||||
End Sub
|
||||
Protected Sub DdlSubProyecto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
If Modalidad <> "U" Or Not CveFactura > 0 Then
|
||||
DdlPSChange()
|
||||
End If
|
||||
@@ -16730,6 +16771,13 @@ Partial Class Compras_Compras
|
||||
DdlCultivosCuadro.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.CveEmpresa = 158 AndAlso DdlSubProyecto.SelectedValue.ToEntero > 0 AndAlso DdlSubProyecto.SelectedValue.ToEntero.Contiene(11881, 11882, 11886) Then
|
||||
RfvDdlCultivosCuadro.Visible = True
|
||||
Else
|
||||
RfvDdlCultivosCuadro.Visible = False
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub DdlPSChange()
|
||||
If CveProveedor > 0 Then
|
||||
@@ -19922,39 +19970,74 @@ Partial Class Compras_Compras
|
||||
|
||||
Protected Sub LnkActualziarFechadecompra_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ObjCompra As New ClsCompras
|
||||
Dim ProcesoError As Boolean = True
|
||||
|
||||
If FechaCompraOriginal <> TxtFecha.Text.ToDate Then
|
||||
|
||||
|
||||
Dim ObjCompra As New ClsCompras
|
||||
ObjCompra.IniciaTransacSQL()
|
||||
|
||||
Dim ObjEventos As New ClsOIEventos(ObjCompra.IniciaTransacSQL())
|
||||
|
||||
If ObjEventos.AddEventoBitacora($"Cambio de Fecha de compra de { FechaCompraOriginal.ToString("dd/MM/yyyy")} a {TxtFecha.Text}", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra:=CveCompra) Then
|
||||
ProcesoError = False
|
||||
Else
|
||||
ProcesoError = True
|
||||
End If
|
||||
|
||||
If ProcesoError = False And ObjCompra.UpdateFechaCompra(CveCompra, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
ProcesoError = False
|
||||
Else
|
||||
ProcesoError = True
|
||||
End If
|
||||
|
||||
|
||||
If Not ProcesoError Then
|
||||
ObjCompra.Commit()
|
||||
FechaCompraOriginal = TxtFecha.Text.ToDate
|
||||
Alert("Fecha Actualizada Correctamente.")
|
||||
Else
|
||||
ObjCompra.RollBack()
|
||||
End If
|
||||
|
||||
ObjCompra.Dispose()
|
||||
|
||||
If Not ProcesoError Then
|
||||
CargaEventoBitacora()
|
||||
UPEventoBitacora.Update()
|
||||
End If
|
||||
|
||||
|
||||
If ObjCompra.UpdateFechaCompra(CveCompra, TxtFecha.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Fecha Actualizada Correctamente")
|
||||
End If
|
||||
ObjCompra.Dispose()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function ValidaSeleccionAnticipo() As Boolean
|
||||
|
||||
Dim Respuesta As Boolean
|
||||
Dim Respuesta As Boolean = True
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
If GVAnticipos.Rows.Count > 0 Then
|
||||
'If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||
' If GVAnticipos.Rows.Count > 0 Then
|
||||
|
||||
For Each GVRow As GridViewRow In GVAnticipos.Rows
|
||||
If GVRow.FCCheckBox("Chk").Checked AndAlso GVRow.FCTextBox("TxtAnticipo").Text.ToDecimal > 0 Then
|
||||
Respuesta = True
|
||||
Exit For
|
||||
Else
|
||||
Respuesta = False
|
||||
End If
|
||||
Next
|
||||
' For Each GVRow As GridViewRow In GVAnticipos.Rows
|
||||
' If GVRow.FCCheckBox("Chk").Checked AndAlso GVRow.FCTextBox("TxtAnticipo").Text.ToDecimal > 0 Then
|
||||
' Respuesta = True
|
||||
' Exit For
|
||||
' Else
|
||||
' Respuesta = False
|
||||
' End If
|
||||
' Next
|
||||
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
' Else
|
||||
' Respuesta = True
|
||||
' End If
|
||||
|
||||
Else
|
||||
Respuesta = True
|
||||
End If
|
||||
'Else
|
||||
' Respuesta = True
|
||||
'End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
|
||||
@@ -690,6 +690,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
CompraActual.CveTipoConceptoProveedor = gvr.DataKey("CveTipoConcepto").ToEntero
|
||||
CompraActual.CveProveedor = gvr.DataKey("CveProveedor").ToEntero
|
||||
CompraActual.CveMoneda = gvr.DataKey("CveMoneda").ToEntero
|
||||
CompraActual.Fecha = gvr.DataKey("Fecha").ToDate
|
||||
CompraActual.SerieFolio = gvr.DataKey("SerieFolio").ToString
|
||||
CompraActual.ProveedorNombre = gvr.DataKey("Proveedor")
|
||||
CompraActual.TC = gvr.DataKey("TipoCambio").ToDecimal
|
||||
@@ -736,6 +737,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Pago.CveIE = CveIEPago
|
||||
Pago.CveMonedaPago = CveMonedaPago
|
||||
Pago.TCPago = TipoCambioPago
|
||||
Pago.CvePersonal =CvePersonal
|
||||
|
||||
'Otros Ingresos
|
||||
If MsgError = "" AndAlso (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
|
||||
@@ -808,7 +810,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Pago.ImportePago = ImporteMovto
|
||||
Pago.CveIE = CveIEExcedente
|
||||
Pago.CveMonedaPago = CveMoneda
|
||||
|
||||
Pago.CvePersonal = CvePersonal
|
||||
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, ImporteMovto, Referencia, 30, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCuentaBancaria, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaBancaria) Then
|
||||
MsgError = "no se pudo insertar el detalle de la poliza"
|
||||
|
||||
@@ -143,7 +143,7 @@ Partial Class Compras_RepNotasCredito
|
||||
TCCompra = gr.DataKey("TipoCambio").ToDecimal
|
||||
CveMoneda = gr.DataKey("CveMoneda").ToEntero
|
||||
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, Now, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
CvePrePoliza = ObjConta.AddPrePolizas("Compras/RepNotasCredito", 103, gr.DataKey("Saldo").ToDecimal, gr.DataKey("Saldo").ToDecimal, gr.DataKey("CveMoneda").ToEntero, TxtFechaSaldar.Text.ToDate, "Saldado manual", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
If CveMoneda > 1 Then
|
||||
|
||||
@@ -1660,7 +1660,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
End If
|
||||
|
||||
If AplicaBancos Then
|
||||
If AplicaBancos AndAlso Not AplicaComplementaria Then
|
||||
If DdlModalConceptoTipoTransaccion.SelectedValue.ToEntero <= 0 Then
|
||||
Alert("seleccione las opciones de bancos ")
|
||||
Retorno = False
|
||||
|
||||
@@ -239,6 +239,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright" id="div3" runat="server" >
|
||||
<asp:DropDownList ID="DdlTipoGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" Width="240px" ValidationGroup="GrpModulo2" >
|
||||
<asp:ListItem Text="Mayor" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Desglosado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoGlobal.ClientID.ToString()%>">Tipo Global: </label>
|
||||
</div>
|
||||
|
||||
@@ -205,9 +205,10 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
|
||||
|
||||
If CveConceptoContable = 51 Then
|
||||
divTipoGasto.Visible = True
|
||||
DdlTipoGasto.Items.Clear()
|
||||
DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
|
||||
DdlTipoGasto.DataBind()
|
||||
' DdlActivoFijo.SelectedValueExist(GvRow.DataKey("CveActivoFijo"))
|
||||
DdlTipoGasto.Items.Add(New ListItem("-", "-1"))
|
||||
End If
|
||||
If Dr("CveTipoSaldo").ToString = "1" Then
|
||||
divRegeneraCuenta.Visible = True
|
||||
|
||||
@@ -1050,7 +1050,7 @@ Partial Class Contratos_Default
|
||||
TxtFechaInicial.Text = ObjContratos.FechaInicial.ToShortDateString
|
||||
TxtUbicacion.Text = ObjContratos.Ubicacion
|
||||
TxtResponsable.Text = ObjContratos.Responsable
|
||||
TxtPorAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
|
||||
TxtPorAnticipo.Text = ObjContratos.PorAnticipo.FormatoNumero
|
||||
TxtPorAmortizacionAnticipo.Text = ObjContratos.PorAmortizacionAnticipo.FormatoNumero
|
||||
TxtPorGarantia.Text = ObjContratos.PorGarantia.FormatoNumero
|
||||
'DdlProyecto.SelectedValue = ObjContratos.CveProyecto.ToString
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
BIN
Empresas/Grales/SaldosIniciales/FormatoAF-ActivosFijos.xlsx
Normal file
BIN
Empresas/Grales/SaldosIniciales/FormatoAF-ActivosFijos.xlsx
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Empresas/Grales/SaldosIniciales/FormatoProveedor.xlsx
Normal file
BIN
Empresas/Grales/SaldosIniciales/FormatoProveedor.xlsx
Normal file
Binary file not shown.
@@ -43,7 +43,8 @@
|
||||
<asp:ListItem Value="4" Text="Factura - Cliente"></asp:ListItem>
|
||||
<asp:ListItem Value="5" Text="Productos y Sevicios" ></asp:ListItem>
|
||||
<asp:ListItem Value="6" Text="RH - Personal"></asp:ListItem>
|
||||
<asp:ListItem Value="7" Text="AF - Activos Fijos" Enabled="false"></asp:ListItem>
|
||||
<%--<asp:ListItem Value="7" Text="AF - Activos Fijos" Enabled="false"></asp:ListItem>--%>
|
||||
<asp:ListItem Value="7" Text="AF - Activos Fijos" ></asp:ListItem>
|
||||
<asp:ListItem Value="8" Text="Contabilidad - Cuentas Contables" Enabled="True"></asp:ListItem>
|
||||
<asp:ListItem Value="9" Text="ContaSIG - Cuentas Contables" Enabled="True"></asp:ListItem>
|
||||
<asp:ListItem Value="10" Text="Cont - Saldos Iniciales Cuentas" Enabled="True"></asp:ListItem>
|
||||
@@ -52,13 +53,33 @@
|
||||
</asp:RadioButtonList>
|
||||
<div runat="server" id="divAlmacen">
|
||||
<div class="row">
|
||||
Fecha:<asp:TextBox ID="TxtFecha" runat="server"></asp:TextBox>
|
||||
<div class="col-md-2">
|
||||
Fecha:
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtFecha" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
Concepto:
|
||||
<asp:DropDownList ID="DdlConceptoAlmacen" runat="server">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
Concepto:
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<asp:DropDownList ID="DdlConceptoAlmacen" runat="server" CssClass="select2me">
|
||||
<asp:ListItem Selected="True" Value="1">Carga Inicial</asp:ListItem>
|
||||
<asp:ListItem Value="3">Salida Almacen</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,7 @@ Imports System.Data
|
||||
Imports System.Math
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports log4net.Filter
|
||||
|
||||
Partial Class General_SaldosIniciales
|
||||
Inherits ClsPaginas
|
||||
@@ -150,6 +151,23 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
|
||||
|
||||
If Not dt.Columns(17).ColumnName.ToUpper = "TIPOPROVEEDOR" Then
|
||||
Alert("El nombre de la columna 18 debe ser 'TipoProveedor'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If Not dt.Columns(18).ColumnName.ToUpper = "CUENTACONTABLE" Then
|
||||
Alert("El nombre de la columna 19 debe ser 'CuentaContable'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -506,11 +524,24 @@ Partial Class General_SaldosIniciales
|
||||
dt.TableName = "Datos"
|
||||
Dim NumRows As Integer = dt.Rows.Count
|
||||
|
||||
Dim DTCuentasContables As New DataTable
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||
DTCuentasContables = ObjConta.DtResultados
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorArchivo Then
|
||||
|
||||
'P R O D U C T O S / S E R V I C I O S
|
||||
If RblFormato.SelectedValue = "5" Then
|
||||
|
||||
#Region "P R O D U C T O S / S E R V I C I O S"
|
||||
Dim ObjPS As New ClsProductosServicios
|
||||
Dim ObjGral As New ClsGenerales(ObjPS.IniciaTransacSQL())
|
||||
Dim ObjClas As New ClsClasificaciones(ObjPS.IniciaTransacSQL())
|
||||
@@ -557,11 +588,12 @@ Partial Class General_SaldosIniciales
|
||||
Dim UnidadMedida As String = Row("Unidad Medida").ToString.Trim
|
||||
Dim Clasificacion As String = Row("Clasificacion").ToString.Trim
|
||||
Dim Marca As String = Row("Marca").ToString.Trim
|
||||
'Dim AplicaSerie As String = Row("AplicaSerie").ToString.Trim
|
||||
Dim AplicaSerie As Boolean = If(Row("AplicaSerie").ToString.Trim.ToUpper.Contiene("1", "SI"), True, False)
|
||||
Dim Precio As Double = Row("Precio").ToString.ToDouble
|
||||
Dim IEPS As Decimal = Row("IEPS").ToString.ToDecimal
|
||||
Dim Tamaño As String = Row("Tamaño").ToString.Trim
|
||||
Dim SATClavePS As String = Row("Código SAT").ToString.Trim
|
||||
|
||||
Dim Clasificacion2 As String = If(dt.Columns.Contains("Servicio"), Row("Servicio").ToString.Trim, "")
|
||||
Dim Litraje As Double = If(dt.Columns.Contains("Conversion Unidad"), Row("Conversion Unidad").ToString.ToDouble, 0)
|
||||
Dim RinTamaño As String = If(Row.Table.Columns.Contains("Tamaño de Rin"), Row("Tamaño de Rin").ToString.Trim, "")
|
||||
@@ -569,6 +601,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim SATClaveUnidadMedida As String = If(Row.Table.Columns.Contains("Clave Unidad"), Row("Clave Unidad").ToString.Trim, "")
|
||||
Dim Linea As String = If(Row.Table.Columns.Contains("Linea"), Row("Linea").ToString.Trim, "")
|
||||
Dim Modelo As String = If(Row.Table.Columns.Contains("Modelo"), Row("Modelo").ToString.Trim, "")
|
||||
Dim RetIVA As Decimal = If(Row.Table.Columns.Contains("RetIVA"), Row("RetIVA").ToString.Trim.ToDecimal, 0D)
|
||||
|
||||
Dim CvePS As Integer = DTPS.FiltroPrimeroValor("CvePS", $"Codigo = '{Codigo}'").ToString.ToEntero
|
||||
|
||||
@@ -699,9 +732,9 @@ Partial Class General_SaldosIniciales
|
||||
'If Not CveClasificacion2 > 0 AndAlso Clasificacion2 <> "" Then Alert("No se encontró la Serie: " + Clasificacion2, TipoMensaje.MsgAdvertencia) : ErrorPS = True : Exit For
|
||||
|
||||
If CvePS > 0 Then
|
||||
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
||||
If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, -1, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
||||
CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño) Then
|
||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveTamaño:=CveTamaño, AplicaSerie:=AplicaSerie) Then
|
||||
'If Not ObjPS.UpdatePS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, 0, 1, 1, False, 0, True, True, True, UsuarioActual.CveUsuario, CvePS, -1, -1, CveSATPS,
|
||||
' CveTipoPS:=CveTipoPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) Then
|
||||
ErrorPS = True
|
||||
@@ -715,9 +748,9 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
'If Codigo.Length > 0 Then
|
||||
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||
If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", CodigoBarras, Descripcion, Precio, -1, RetIVA, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||
CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida, CveRinTamaño:=CveRinTamaño,
|
||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle) <= 0 Then
|
||||
CveModelo:=CveModelo, Litraje:=Litraje, IEPSPorcentaje:=IEPS, CveClasificacion2:=CveClasificacion2, CveClasificacionDetalle:=CveClasificacionDetalle, AplicaSerie:=AplicaSerie) <= 0 Then
|
||||
'If ObjPS.AddPS(CveClasificacion, 1, CveUnidadMedida, Codigo, "", "", Descripcion, 0, 0, 0, False, 0, False, True, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1, 1,
|
||||
' CveTipoPS:=CveTipoPS, CveSATPS:=CveSATPS, CveMarca:=CveMarca, CveTamaño:=CveTamaño, CveMedida:=CveMedida) <= 0 Then
|
||||
ErrorPS = True
|
||||
@@ -755,14 +788,67 @@ Partial Class General_SaldosIniciales
|
||||
ObjClas.Dispose()
|
||||
ObjVenta.Dispose()
|
||||
ObjUM.Dispose()
|
||||
#End Region
|
||||
|
||||
|
||||
'P R O V E E D O R E S
|
||||
ElseIf RblFormato.SelectedValue = "1" Then
|
||||
#Region "P R O V E E D O R E S"
|
||||
Dim ObjProv As New ClsCompProveedores
|
||||
Dim ErrorProv As Boolean = False
|
||||
Dim Contador As Integer = 0
|
||||
Dim ExisteProveedor As Boolean = False
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If Not dt.Columns.Contains("CveCuentaContable") Then
|
||||
dt.Columns.Add("CveCuentaContable", GetType(Integer))
|
||||
End If
|
||||
|
||||
|
||||
Dim sbErrores As New StringBuilder
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
|
||||
Dim RazonSocial As String = Row("RazonSocial").ToString
|
||||
Dim CuentaContable As String = Row("CuentaContable").ToString.Trim.Replace("-", "").Replace(" ", "")
|
||||
|
||||
If CuentaContable.Length > 0 Then
|
||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero
|
||||
|
||||
If CveCuentaContable > 0 Then
|
||||
Row("CveCuentaContable") = CveCuentaContable
|
||||
Else
|
||||
sbErrores.AppendLine($"Proveedor {RazonSocial} cuenta {CuentaContable} no encontrada.<br>")
|
||||
ErrorProv = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
Dim RazonSocial As String = Row("RazonSocial").ToString
|
||||
If Not (Row("TipoProveedor").ToString.Trim.ToUpper).Contiene("PROVEEDOR", "ACREEDOR") Then
|
||||
sbErrores.AppendLine($"Proveedor {RazonSocial} TipoProveedor {Row("TipoProveedor")} invalido.<br>")
|
||||
ErrorProv = True
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not ErrorProv Then
|
||||
dt.AcceptChanges()
|
||||
Else
|
||||
Alert($"Errores detectados <br>{sbErrores.ToString()}", TipoMensaje.MsgAdvertencia)
|
||||
ObjProv.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ObjProv.IniciaTransacSQL()
|
||||
For Each Row As DataRow In dt.Rows
|
||||
|
||||
@@ -793,8 +879,16 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString.ToEntero
|
||||
Dim CveProveedor2 As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"RazonSocial = '{RazonSocial}'").ToString.ToEntero
|
||||
|
||||
|
||||
|
||||
Dim CveProveedor3 As Integer = 0
|
||||
|
||||
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString.ToEntero
|
||||
Dim TipoProveedor As Integer = If(Row("TipoProveedor").ToString.ToUpper = "PROVEEDOR", 1, 2)
|
||||
Dim CveConceptoCuentaAsiganaciones As Integer = If(TipoProveedor = 1, 5, 305)
|
||||
|
||||
|
||||
If Codigo.Trim.Length > 0 Then
|
||||
CveProveedor3 = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedor", $"Codigo = '{Codigo}'").ToString.ToEntero
|
||||
End If
|
||||
@@ -822,7 +916,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If Not ObjProv.AddProveedor(Codigo, RazonSocial, RazonSocial, RazonSocial, RFC, Dirrecion, Telefono,
|
||||
"", ContactoMail, CelularContacto, LimiteCredito, PlazoCobranza, "", 0, 0, 0, -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "",
|
||||
-1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, -1, "", "", False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CP:=CodigoPostal) Then
|
||||
-1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, "", -1, -1, "", "", False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CP:=CodigoPostal, CveRegimenFiscal:=0, CveTipoProveedor:=TipoProveedor) Then
|
||||
ErrorProv = True
|
||||
Exit For
|
||||
|
||||
@@ -848,22 +942,24 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveCuentaContable > 0 Then
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjProv.IniciaTransacSQL)
|
||||
|
||||
If Not ObjConta.AddCuentasAsignaciones(CveConceptoCuentaAsiganaciones, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
ObjProv.CveProveedor, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorProv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If Not ErrorProv Then
|
||||
ObjProv.Commit()
|
||||
If ObjProv.GetProveedores(ClsCompProveedores.TipoConsulta.ParaGlobalDT, -1, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, -1) Then Application("GlobalDTCompProveedores") = ObjProv.DtResultados
|
||||
@@ -879,14 +975,57 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
ObjProv.Dispose()
|
||||
|
||||
' C L I E N T E S
|
||||
#End Region ' C L I E N T E S
|
||||
ElseIf RblFormato.SelectedValue = "2" Then
|
||||
|
||||
|
||||
#Region "C L I E N T E S"
|
||||
|
||||
|
||||
Dim ObjClientes As New ClsClientes
|
||||
Dim ErrorClientes As Boolean = False
|
||||
Dim ExisteCliente As Boolean = False
|
||||
Dim Contador As Integer = 0
|
||||
Dim NumRow As Integer = 0
|
||||
|
||||
|
||||
If Not dt.Columns.Contains("CveCuentaContable") Then
|
||||
dt.Columns.Add("CveCuentaContable", GetType(Integer))
|
||||
End If
|
||||
|
||||
|
||||
Dim sbErrores As New StringBuilder
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
|
||||
Dim RazonSocial As String = Row("RazonSocial").ToString
|
||||
Dim CuentaContable As String = Row("CuentaContable").ToString.Trim.Replace("-", "").Replace(" ", "")
|
||||
|
||||
If CuentaContable.Length > 0 Then
|
||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero
|
||||
|
||||
If CveCuentaContable > 0 Then
|
||||
Row("CveCuentaContable") = CveCuentaContable
|
||||
Else
|
||||
sbErrores.AppendLine($"Cliente {RazonSocial} cuenta {CuentaContable} no encontrada.<br>")
|
||||
ErrorClientes = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
If Not ErrorClientes Then
|
||||
dt.AcceptChanges()
|
||||
Else
|
||||
Alert($"Errores detectados <br>{sbErrores.ToString()}", TipoMensaje.MsgAdvertencia)
|
||||
ObjClientes.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
ObjClientes.IniciaTransacSQL()
|
||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||
NumRow = NumRow + 1
|
||||
@@ -925,6 +1064,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim CobranzaContacto As String = If(dt.Columns.Contains("Encargado Pagoa"), Row("Encargado Pago").ToString, "")
|
||||
Dim CobranzaTelefono As String = Row("Celular Contacto").ToString.Replace("-", "").Replace(" ", "").Replace("(", "").Replace(")", "")
|
||||
Dim CveUsoCFDI As Integer = If(Row("UsoCFDI").ToString = "", -1, GlobalDTSATUsosCFDI().FiltroPrimeroValor("CveUsoCFDI", String.Format("UsoCFDI = '{0}'", Row("UsoCFDI").ToString)).ToEntero)
|
||||
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString.ToEntero
|
||||
' CobranzaContacto = Regex.Replace(CobranzaContacto, "[^0-9]", "")
|
||||
|
||||
'Telefono
|
||||
@@ -1035,13 +1175,25 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
If Not ObjClientes.AddCliente(RazonSocial, RazonSocial, Calle, NumExt.ToString, "", Colonia, Poblacion, Poblacion, Estado, Pais, RFC, CodigoPostal, Telefono, Contacto, "", "", "", "", "", -1, False, 0, 0, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", CveVendedor, PlazoCobranza, -1,
|
||||
"-1", "-1", -1, "-1", -1, "0", -1, "0", 0, "", 0, "", 0, "", 0, "", "", Codigo, LimiteCredito, False, "", "", "", False, "", "", "", "", "", False, "", "", "", False, 0, -1, EsDistribuidor:=EsDistribuidor, CveClienteClasificacion:=CveClasificación, CargoUsado:=CargoUsado,
|
||||
BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago33:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado) Then
|
||||
BonificacionUsado:=BonificacionUsado, CobranzaContacto:=CobranzaContacto, CobranzaCorreo:=CobranzaCorreo, DiasEspecifico:=DiasPagoEspecifico, DiasRevision:=DìaVisita, CobranzaTelefono:=CobranzaTelefono, CveFormaPago33:=CveFormaPago33, CveUsoCFDI:=CveUsoCFDI, CveSATEstado:=CveSATEstado, CveAdminTrayecto:=0) Then
|
||||
|
||||
ErrorClientes = True
|
||||
RFC.GuardaLog
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If CveCuentaContable > 0 Then
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjClientes.IniciaTransacSQL)
|
||||
|
||||
If Not ObjConta.AddCuentasAsignaciones(1, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
-1, ObjClientes.CveCliente, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorClientes = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -1065,8 +1217,16 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
'P R O V E E D O R E S - F A C T U R A S
|
||||
ElseIf RblFormato.SelectedValue = "3" Then
|
||||
|
||||
#Region "P R O V E E D O R E S - F A C T U R A S"
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim ErrorCompras As Boolean = False
|
||||
Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
|
||||
@@ -1201,8 +1361,13 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
|
||||
#End Region
|
||||
|
||||
'C L I E N T E S - F A C T U R A S
|
||||
ElseIf RblFormato.SelectedValue = "4" Then
|
||||
|
||||
#Region "C L I E N T E S - F A C T U R A S"
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
|
||||
Dim ObjIE As New ClsBancos(ObjVentas.IniciaTransacSQL())
|
||||
@@ -1389,19 +1554,64 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
' R H - P E R S O N A L
|
||||
ElseIf RblFormato.SelectedValue = "6" Then
|
||||
|
||||
UpPersonal(dt)
|
||||
UpPersonal(dt, DTCuentasContables)
|
||||
|
||||
|
||||
' A F - A C T I V O F I J O
|
||||
ElseIf RblFormato.SelectedValue = "7" Then
|
||||
|
||||
#Region " A F - A C T I V O F I J O"
|
||||
Dim ErrorAF As Boolean = False
|
||||
|
||||
If Not dt.Columns.Contains("CveCuentaContable") Then
|
||||
dt.Columns.Add("CveCuentaContable", GetType(Integer))
|
||||
End If
|
||||
|
||||
|
||||
Dim sbErrores As New StringBuilder
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
|
||||
Dim Codigo As String = Row("Código").ToString
|
||||
Dim Descripcion As String = Row("Descripción").ToString
|
||||
|
||||
Dim CuentaContable As String = Row("CuentaContable").ToString.Trim.Replace("-", "").Replace(" ", "")
|
||||
|
||||
If CuentaContable.Length > 0 Then
|
||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero
|
||||
|
||||
If CveCuentaContable > 0 Then
|
||||
Row("CveCuentaContable") = CveCuentaContable
|
||||
Else
|
||||
sbErrores.AppendLine($"Activo Fijo {Codigo} {Descripcion} cuenta {CuentaContable} no encontrada.<br>")
|
||||
ErrorAF = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
If Not ErrorAF Then
|
||||
dt.AcceptChanges()
|
||||
Else
|
||||
Alert($"Errores detectados <br>{sbErrores.ToString()}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim ObjAF As New ClsAF
|
||||
Try
|
||||
|
||||
ObjAF.IniciaTransacSQL()
|
||||
Dim ErrorAF As Boolean = False
|
||||
|
||||
Dim Contador As Integer = 0
|
||||
Dim NumRow As Integer = 0
|
||||
|
||||
@@ -1410,44 +1620,60 @@ Partial Class General_SaldosIniciales
|
||||
Dim Descripcion As String = Row("Descripción").ToString
|
||||
Dim TipoAF As String = Row("Tipo").ToString
|
||||
Dim SubTipo As String = Row("SubTipo").ToString
|
||||
Dim Valor As String = Row("Valor").ToString
|
||||
Dim FechaAF As String = Row("Fecha").ToString
|
||||
Dim Valor As Decimal = Row("Valor").ToString.ToDecimal
|
||||
Dim FechaAF As Date = Row("Fecha").ToString.ToDate
|
||||
Dim NumeroSerie As String = Row("No. Serie").ToString
|
||||
Dim Año As String = Row("Año").ToString
|
||||
Dim Año As Integer = Row("Año").ToString.ToEntero
|
||||
Dim CuentaContable As String = Row("Cuenta Contable").ToString
|
||||
Dim Estado As String = Row("Estado").ToString
|
||||
Dim Responsable As String = Row("Responsable").ToString
|
||||
Dim Proyecto As String = Row("Proyecto").ToString
|
||||
Dim SubProyecto As String = Row("SubProyecto").ToString
|
||||
Dim Cliente As String = Row("Cliente").ToString
|
||||
Dim Observaciones As String = Row("Observaciones").ToString
|
||||
Dim CtaDepreciacion As String = Row("Cuenta Depreciación").ToString
|
||||
Dim PorcentajeDepreciacion As String = Row("% Depreciación").ToString
|
||||
Dim CtaDepreciacion As Integer = Row("Cuenta Depreciación").ToString.ToEntero
|
||||
Dim PorcentajeDepreciacion As Decimal = Row("% Depreciación").ToString.ToDecimal
|
||||
|
||||
'CLAVES
|
||||
Dim CveAF As Integer = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActivoFijo", $"Código = '{Codigo}'").ToString.ToEntero
|
||||
Dim CveAF As Integer = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveActivoFijo", $"Codigo = '{Codigo}'").ToString.ToEntero
|
||||
Dim CveSubTipoAF As Integer = GlobalDTSubTipoActivoFijo(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubTipoActivoFijo", $"TipoActivoFijo = '{TipoAF}'").ToString.ToEntero
|
||||
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{SubProyecto}'").ToString.ToEntero
|
||||
Dim CveEstadoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoFijo", $"Estado = '{Estado}'").ToString.ToEntero
|
||||
Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString.ToEntero
|
||||
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString.ToEntero
|
||||
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString.ToEntero
|
||||
|
||||
|
||||
'VALIDACIONES
|
||||
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
|
||||
If Not CveSubProyecto > 0 Then Alert($"No se encontró el SubProyecto: {SubProyecto} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
|
||||
If Not CveEstadoFijo > 0 Then Alert($"No se encontró el Estado: {CveEstadoFijo} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
|
||||
If Not CveCliente > 0 Then Alert($"No se encontró el Cliente: {Cliente} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
|
||||
If Not CveEstadoActivoFijo > 0 Then Alert($"No se encontró el Estado: {Estado} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
|
||||
If Not CveCliente > 0 Then CveCliente = -1
|
||||
|
||||
|
||||
'If CveAF > 0 Then
|
||||
' Contador = Contador + 1
|
||||
'Else
|
||||
' If Not ObjAF.AddActivosFijos(Codigo, Descripcion, Valor, FechaAF, CveSubTipoAF, -1, NumeroSerie, Año, CveSubProyecto, CtaDepreciacion, CveEstadoFijo,
|
||||
' CtaDepreciacion, PorcentajeDepreciacion, Observaciones, CveCliente, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
' ErrorAF = True
|
||||
' Exit For
|
||||
' End If
|
||||
'End If
|
||||
If CveAF > 0 Then
|
||||
Contador = Contador + 1
|
||||
Else
|
||||
|
||||
CveAF = ObjAF.AddActivosFijos(Codigo, Descripcion, Valor, FechaAF, CveSubTipoAF, -1, NumeroSerie, Año, CveSubProyecto, CtaDepreciacion, CveEstadoActivoFijo,
|
||||
CtaDepreciacion, PorcentajeDepreciacion, Observaciones, CveCliente, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CveAF > 0 Then
|
||||
If CveCuentaContable > 0 Then
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
|
||||
|
||||
If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorAF = True
|
||||
End If
|
||||
|
||||
End If
|
||||
Else
|
||||
ErrorAF = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
NumRow = NumRow + 1
|
||||
Next
|
||||
@@ -1476,6 +1702,10 @@ Partial Class General_SaldosIniciales
|
||||
Finally
|
||||
ObjAF.Dispose()
|
||||
End Try
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
' C U E N T A S C O N T A B L E S
|
||||
ElseIf RblFormato.SelectedValue = "8" Then
|
||||
@@ -2122,7 +2352,48 @@ Partial Class General_SaldosIniciales
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
Protected Sub UpPersonal(dt As DataTable)
|
||||
Protected Sub UpPersonal(dt As DataTable, DTCuentasContables As DataTable)
|
||||
|
||||
|
||||
Dim ErrorValidacion As Boolean = False
|
||||
|
||||
If Not dt.Columns.Contains("CveCuentaContable") Then
|
||||
dt.Columns.Add("CveCuentaContable", GetType(Integer))
|
||||
End If
|
||||
|
||||
|
||||
Dim sbErrores As New StringBuilder
|
||||
|
||||
For Each Row As DataRow In dt.Rows
|
||||
|
||||
Dim ApellidoPaterno As String = Row("Apellido Paterno").ToString
|
||||
Dim ApellidoMaterno As String = Row("Apellido Materno").ToString
|
||||
Dim Nombre As String = Row("Nombre").ToString
|
||||
|
||||
|
||||
Dim CuentaContable As String = Row("CuentaContable").ToString.Trim.Replace("-", "").Replace(" ", "")
|
||||
|
||||
If CuentaContable.Length > 0 Then
|
||||
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero
|
||||
|
||||
If CveCuentaContable > 0 Then
|
||||
Row("CveCuentaContable") = CveCuentaContable
|
||||
Else
|
||||
sbErrores.AppendLine($"Empleado {Nombre} {ApellidoPaterno} {ApellidoMaterno} cuenta {CuentaContable} no encontrada.<br>")
|
||||
ErrorValidacion = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
|
||||
If Not ErrorValidacion Then
|
||||
dt.AcceptChanges()
|
||||
Else
|
||||
Alert($"Errores detectados <br>{sbErrores.ToString()}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
Dim NumRows As Integer = 0
|
||||
Dim dtregistrospatronales As New DataTable
|
||||
@@ -2190,6 +2461,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim SDI As String = Row("SDI").ToString
|
||||
Dim MetodoPago As String = Row("Metodo Pago").ToString
|
||||
Dim Nominista As String = Row("Nominista").ToString
|
||||
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString.ToEntero
|
||||
|
||||
Dim NombreCompleto As String = $"{Nombre} {ApellidoPaterno} {ApellidoMaterno}"
|
||||
|
||||
@@ -2261,7 +2533,7 @@ Partial Class General_SaldosIniciales
|
||||
CveDepartamento = dTDepartamentos.FiltroPrimeroValor("CveDepartamento", $"CveDepartamento = {CveDepartamento}").ToString.ToEntero
|
||||
Else
|
||||
|
||||
CveDepartamento = DTDepartamentos.FiltroPrimeroValor("CveDepartamento", $"Departamento = '{Departamento}'").ToString.ToEntero
|
||||
CveDepartamento = dTDepartamentos.FiltroPrimeroValor("CveDepartamento", $"Departamento = '{Departamento}'").ToString.ToEntero
|
||||
End If
|
||||
If CveDepartamento <= 0 Then
|
||||
CveDepartamento = -1
|
||||
@@ -2444,8 +2716,24 @@ Partial Class General_SaldosIniciales
|
||||
Exit For
|
||||
End If
|
||||
Else
|
||||
ContadorAgregados = ContadorAgregados + 1
|
||||
ContadorAgregados = ContadorAgregados + 1
|
||||
End If
|
||||
|
||||
|
||||
If CveCuentaContable > 0 Then
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjRH.IniciaTransacSQL)
|
||||
|
||||
If Not ObjConta.AddCuentasAsignaciones(28, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
|
||||
-1, -1, ObjRH.CvePersonal, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=-1,
|
||||
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
|
||||
ErrorRH = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
NumRow = NumRow + 1
|
||||
@@ -2766,6 +3054,7 @@ Partial Class General_SaldosIniciales
|
||||
libro.Cell(crow, ccol).Value = "SDI" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Nominista" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "Registro Patronal" : ccol = ccol + 1
|
||||
libro.Cell(crow, ccol).Value = "CuentaContable" : ccol = ccol + 1
|
||||
|
||||
|
||||
libro.Range(crow, 1, crow, ccol - 1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189))
|
||||
@@ -2848,4 +3137,6 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -357,7 +357,7 @@ Partial Class Inicio
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
If ObjInventarios.RepCompuestosVigencia(-1, -1, MinFecha, Now.AddYears(1), 1, UsuarioActual.CveEmpresa, -1, UsuarioActual.CveUsuario, True) Then
|
||||
If ObjInventarios.RepCompuestosVigencia(-1, -1, MinFecha, Now.AddMonths(1), 1, UsuarioActual.CveEmpresa, -1, UsuarioActual.CveUsuario, True) Then
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
GvModalRSCOPorCaducar.DataSource = ObjInventarios.DtResultados
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCERemisiones" runat="server" HighlightCssClass="vco" TargetControlID="RFVRemisiones" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li runat="server" id="LiAlmacen" visible="false">Almacén:
|
||||
<asp:DropDownList ID="DdlAlmacenFiltro" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="150px"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlAlmacenFiltro" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="form-control input-sm select2me" Width="150px" ></asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -508,8 +508,32 @@
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Sección Alm" ReadOnly="true" DataField="SeccionAlmacen" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Serie" ReadOnly="true" DataField="Serie" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:BoundField HeaderText="Lote" ReadOnly="true" DataField="Lote" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Caducidad" ReadOnly="true" DataField="FechaCaducidad" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center" />
|
||||
|
||||
<asp:TemplateField HeaderText="Lote" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="7.5%" >
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtLote" Width="85px" class="form-control input-sm" Text='<%# Eval("Lote") %>' runat="server" Visible="false"></asp:TextBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" >
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Text='<%# Eval("FechaCaducidad") %>' Style="width: 80px" runat="server" Visible="false"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
<asp:Label ID="LbTotal" runat="server" />
|
||||
|
||||
@@ -72,6 +72,19 @@ Partial Class Inventarios_Consignaciones
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Property ValidaLoteCaducidad As Boolean
|
||||
Get
|
||||
If ViewState("ValidaLoteCaducidad") Is Nothing Then
|
||||
ViewState("ValidaLoteCaducidad") = False
|
||||
End If
|
||||
Return CType(ViewState("ValidaLoteCaducidad"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ValidaLoteCaducidad") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "Inicializa Valores"
|
||||
@@ -364,6 +377,32 @@ Partial Class Inventarios_Consignaciones
|
||||
CargaDatos(DdlRemisiones.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
Private Sub CargaDatos(CveConsignacionTemp As Integer)
|
||||
|
||||
If DdlConcepto.SelectedValue.ToEntero.Contiene(12, 8) Then
|
||||
Dim CveSubProyectoValidaCaducidad As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenFiltro.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
'RMF condición temporal
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyectoValidaCaducidad.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347).Split(","c)) Then
|
||||
ValidaLoteCaducidad = True
|
||||
|
||||
'activa lote
|
||||
ThLote.Visible = True
|
||||
ThCaducidad.Visible = True
|
||||
|
||||
|
||||
Else
|
||||
ValidaLoteCaducidad = False
|
||||
|
||||
'activa lote
|
||||
ThLote.Visible = False
|
||||
ThCaducidad.Visible = False
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
|
||||
If ObjInventario.ConsignacionesDetalle(CveConsignacionTemp, DdlAlmacenFiltro.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||
@@ -538,6 +577,24 @@ Partial Class Inventarios_Consignaciones
|
||||
e.Row.FCTextBox("TxtPU").Attributes.Add("onkeyup", String.Format("RecalculaEdit({0},this,{1});", e.Row.FCTextBox("TxtCantidad").ClientID, e.Row.FCLabel("LbTotal").ClientID))
|
||||
End If
|
||||
|
||||
If (ValidaLoteCaducidad) OrElse (UsuarioActual.CveEmpresa <> 119) Then
|
||||
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = True
|
||||
Else
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = False
|
||||
e.Row.FCLinkButton("LnkCaducidad").Visible = False
|
||||
End If
|
||||
|
||||
If CBool(e.Row.DBCampo("AplicaLote")) Then
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
Else
|
||||
e.Row.FCTextBox("TxtLote").Visible = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -899,8 +956,7 @@ Partial Class Inventarios_Consignaciones
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
ObjInventario.IniciaTransacSQL() 'Inicia la transacción
|
||||
|
||||
Dim CveMovimiento = 0
|
||||
Dim Folio = 0
|
||||
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
Dim TextoError = ""
|
||||
Dim Fecha As Date = TxtFechaDevolucion.Text.ToDate
|
||||
@@ -915,6 +971,10 @@ Partial Class Inventarios_Consignaciones
|
||||
Dim MovtoNew = False
|
||||
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
|
||||
Dim CveMovimiento = 0
|
||||
Dim Folio = 0
|
||||
|
||||
If Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble > 0 Then
|
||||
|
||||
If CveAlmacen = -1 Or CveAlmacen <> Gvr.DataKey("CveAlmacen").ToString.ToEntero Then
|
||||
@@ -940,8 +1000,14 @@ Partial Class Inventarios_Consignaciones
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
|
||||
If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
|
||||
'AGREGAMOS MOVTOS DETALLE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Gvr.DataKey("Lote").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, Gvr.DataKey("Serie").ToString, Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un Error al guardar los movimientos"
|
||||
Exit For
|
||||
@@ -1126,20 +1192,26 @@ Partial Class Inventarios_Consignaciones
|
||||
FolioSalida = ObjInventario.Folio
|
||||
End If
|
||||
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If MovtoNew Then
|
||||
CveMovtosSalida.Add(CveMovimientoSalida)
|
||||
FoliosSalida.Add(FolioSalida)
|
||||
MovtoNew = False
|
||||
End If
|
||||
Else
|
||||
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If MovtoNew Then
|
||||
CveMovtosSalida.Add(CveMovimientoSalida)
|
||||
FoliosSalida.Add(FolioSalida)
|
||||
MovtoNew = False
|
||||
End If
|
||||
Else
|
||||
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
|
||||
If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
|
||||
'AGREGAMOS MOVTOS DETALLE
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", "") Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidadDevolucion").Text.ToString.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, -1, "", Lote, FechaCaducidad:=FechaCaducidad) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un Error al guardar los movimientos detalle de la salida"
|
||||
Exit For
|
||||
@@ -1744,4 +1816,6 @@ Partial Class Inventarios_Consignaciones
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -1720,16 +1720,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Mensaje = "Error al guardar los movimientos"
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
'Else
|
||||
'If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
||||
' For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows
|
||||
' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then
|
||||
' ErrorMovInv = True
|
||||
' Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
'End If
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -1817,8 +1807,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
'[IPP] PARCHE CTA CONTABLE PARA SALIDA DE DEMOSTRACION
|
||||
If DdlConcepto.SelectedValue.ToEntero = 31 Then
|
||||
IdCtaContableOtro = 1319
|
||||
Else ''cuando es 28, es otros ingresos.78
|
||||
CveConceptoContable = 78
|
||||
End If
|
||||
EsContabilizable = False
|
||||
EsContabilizable = True
|
||||
Case 30
|
||||
CveConceptoContable = 181
|
||||
TipoMovtoOtro = False
|
||||
@@ -1836,17 +1828,14 @@ Partial Class Inventarios_EntradasSalidas
|
||||
IdCtaContableOtro = drr("IdCuentaCostos").ToString.ToEntero
|
||||
End If
|
||||
|
||||
|
||||
End Select
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoAlmacen, tValorInventario, TxtObservaciones.Text.Trim, 68, TxtObservaciones.Text.Trim, TxtFecha.Text.ToDate, idCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=tValorInventario, CveClasificacion:=CveClasificacion, Contabilizable:=EsContabilizable) Then
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
'Select Case DdlConcepto.SelectedValue.ToEntero
|
||||
' Case 30
|
||||
|
||||
'Dim Total As Decimal = 0
|
||||
If CveConceptoContable = 181 Then
|
||||
If CveConceptoContable.Contiene(181, 78) Then
|
||||
Dim Dt As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"}).Copy
|
||||
'Dim IdCuentaGasto As Integer = 0
|
||||
For Each Dr As DataRow In Dt.Rows
|
||||
@@ -1856,13 +1845,8 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
'Case Else
|
||||
|
||||
'End Select
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
@@ -1908,12 +1892,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
If drA IsNot Nothing Then CuentaAbonoAlmacen = drA("IdCtaContable").ToString.ToEntero
|
||||
|
||||
''For Each gvr As GridViewRow In GvAC.Rows
|
||||
'For Each Dr As DataRow In DtII.Rows
|
||||
' Importe = Dr("Cantidad").ToString.ToDouble * Dr("PU").ToString.ToDouble ' gvr.FCTextBox("TxtImporte").Text.ToDouble
|
||||
' TotalDetalle += Importe
|
||||
|
||||
|
||||
'saco de que partida se va a descontar y se enviara a gasto
|
||||
' Dim drP As DataRow = DtPresupuestos.FiltroPrimero(String.Format("CveClasificacion = {0}", Dr("CveClasificacion")))
|
||||
' If drP IsNot Nothing Then CuentaCargoCOG = drP("IdCuentaMatriz").ToString.ToEntero
|
||||
@@ -1943,8 +1921,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1957,44 +1933,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Mensaje = "No se pudo insertar la poliza"
|
||||
End If
|
||||
End If
|
||||
'TERMINA: DEVENGAR
|
||||
|
||||
|
||||
''PREPOLIZA - SE CAMBIO DE LUGAR EL USO DE ESTA PARTE
|
||||
'If EsConsumoInterno Then
|
||||
' If Not ErrorAC And Not ErrorMovInv Then
|
||||
' Dim DtCostos As DataTable = Nothing
|
||||
' Dim ValorInventario As Decimal = 0
|
||||
|
||||
' If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
' DtCostos = ObjInventario.DtResultados
|
||||
' Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||
' Dim IdCtaContable As Integer = 0
|
||||
|
||||
' If tmpCostos.Rows.Count > 0 Then
|
||||
' Dim Concepto As String = $"Consumo Interno: {ObjInventario.Folio} - {TxtObservaciones.Text}"
|
||||
' Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv/ConsumoInterno", 53, DtCostos.SUM("Total"), DtCostos.SUM("Total"), 1, TxtFecha.Text.ToDate, $"Consumo Interno: {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
' For Each RowInv As DataRow In tmpCostos.Rows
|
||||
' ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal
|
||||
' IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario, Concepto, 6, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario) Then
|
||||
' ErrorMovInv = True
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
' IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={DdlAlmacen.SelectedValue.ToEntero}").ToEntero
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total"), Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUM("Total")) Then
|
||||
' ErrorMovInv = True
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'End If
|
||||
'TERMINA: DEVENGAR
|
||||
|
||||
Dim RetornoVirtual As MMovimientoVirtual = Nothing
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
|
||||
@@ -2803,11 +2803,20 @@ Partial Class Inventarios_RecepcionUsados
|
||||
PS = Dr("PSCodigo").ToString
|
||||
UnidadMedida = Dr("UnidadMedida").ToString
|
||||
Clasificacion = Dr("Clasificacion").ToString
|
||||
|
||||
End If
|
||||
PorcentajeIVA = 0.16D
|
||||
IVA = SubTotal * PorcentajeIVA
|
||||
Dim Descuento As Decimal = 0
|
||||
|
||||
AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "", PU, 0, -1, "",
|
||||
Dim ImporteCargo As Decimal = GlobalDTAcumTamaños().FiltroPrimeroValor("Cargo", String.Format("CveTamaño = {0} AND CveEmpresa = {1}", CveTamaño, UsuarioActual.CveEmpresa)).ToDecimal()
|
||||
|
||||
'SI ES AJUSTE O GARANTIA SOLO DEBE SUMAR EL IMPORTE DE LA GARANTIA SI NO RECIBIO USADO
|
||||
If RblUsadosAjuste.SelectedValue = "1" AndAlso ImporteCargo <= 0 Then
|
||||
Descuento = (Cantidad * PU).RoundSQL(6)
|
||||
End If
|
||||
|
||||
AddPSRNC(ObjRemisionNC.DtDetalle, Cantidad, CveUnidadMedida, UnidadMedida, CveClasificacion, Clasificacion, CvePS, PS, "", PU, Descuento, -1, "",
|
||||
ObjRemisionNC.CveSubProyecto, ObjRemisionNC.SubProyecto.SubProyecto, PorcentajeIVA:=PorcentajeIVA, CveTamaño:=CveTamaño)
|
||||
Else
|
||||
Alert("No se pudo cargar el producto", TipoMensaje.MsgError)
|
||||
@@ -2863,14 +2872,14 @@ Partial Class Inventarios_RecepcionUsados
|
||||
Dim ImporteRetIVA As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetIVA").ToDecimal()
|
||||
Dim ImporteRetISR As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteRetISR").ToDecimal()
|
||||
Dim ImporteIEPS As Decimal = ObjRemisionNC.DtDetalle.SUM("ImporteIEPS").ToDecimal()
|
||||
Dim Descuento As Decimal = ObjRemisionNC.DtDetalle.SUM("Descuento").ToDecimal()
|
||||
Dim DescuentoTotal As Decimal = ObjRemisionNC.DtDetalle.SUM("Descuento").ToDecimal()
|
||||
Dim Amortizacion As Decimal = 0
|
||||
|
||||
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
|
||||
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + DescuentoTotal + Amortizacion)
|
||||
|
||||
'DETALLES
|
||||
ObjRemisionNC.SubTotal = TotalImporte
|
||||
ObjRemisionNC.Descuento = Descuento
|
||||
ObjRemisionNC.Descuento = DescuentoTotal
|
||||
ObjRemisionNC.Amortizacion = Amortizacion
|
||||
ObjRemisionNC.IVA = ImporteIVA
|
||||
ObjRemisionNC.RetIVA = ImporteRetIVA
|
||||
|
||||
@@ -244,9 +244,9 @@ Partial Class Inventarios_RepAnomalias
|
||||
ImgExcelProdcutosCoinciden.Visible = True
|
||||
LnkDescarExcelGrupos.Visible = False
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvS.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvF.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
'If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then GvC.Columns(8).HeaderText = UsuarioActual.Empresa.Funcionalidad(147)
|
||||
|
||||
GvS.DataSource = dt.FiltraParametros("Diferencia > 0")
|
||||
Dim DtS As DataTable = dt.FiltraParametros("Diferencia > 0")
|
||||
|
||||
@@ -956,8 +956,9 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
If Gvr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
If Gvr.datakey("Lote") <> "" Then Lote = Gvr.datakey("Lote")
|
||||
If Gvr.datakey("FechaCaducidad").todate > MinFecha Then FechaCaducidad = Gvr.datakey("FechaCaducidad").todate
|
||||
If Gvr.FCTextBox("TxtLote").Text.Trim <> "" Then Lote = Gvr.FCTextBox("TxtLote").Text.Trim
|
||||
'If Gvr.datakey("FechaCaducidad").todate > MinFecha Then FechaCaducidad = Gvr.datakey("FechaCaducidad").todate
|
||||
If Gvr.FCTextBox("TxtCaducidad").Text.ToDate > MinFecha Then FechaCaducidad = Gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Gvr.FCTextBox("TxtCantidad").Text.ToDouble, Gvr.DataKey("CveUM").ToString.ToEntero, Gvr.DataKey("CvePS").ToString.ToEntero, Gvr.DataKey("PU").ToString.ToDecimal, -1, CveSeccionAlmacen:=Gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=Gvr.DataKey("Serie").ToString, Lote:=Lote, FechaCaducidad:=FechaCaducidad, Observaciones:=Gvr.DataKey("Observaciones").ToString, CveMovimientoDetalleEntrada:=Gvr.DataKey("CveMovimientoDetalle").toentero) Then
|
||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||
@@ -968,6 +969,8 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DiccionarioLote.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCTextBox("TxtLote").Text)
|
||||
DiccionarioCaducidad.Add(ObjInventario.CveMovimientoDetalle, Gvr.FCTextBox("TxtCaducidad").Text.todate)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
Cont += 1
|
||||
Next
|
||||
|
||||
@@ -593,9 +593,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
'codigo provisional.
|
||||
Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||
|
||||
If DrPS("AplicaCaducidad").ToString = "True" Then
|
||||
If Not ChkSugiereFechaCaducidad.Checked AndAlso (TxtnFechaCaducidad.Text = "" OrElse TxtnLote.Text = "") Then
|
||||
Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia)
|
||||
@@ -790,10 +787,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Private Sub LimpiaAgregar()
|
||||
'DdlClasificacion.SelectedValue = "-1"
|
||||
'DdlClasificacion_SelectedIndexChanged(DdlClasificacion, EventArgs.Empty)
|
||||
txtCantidad.Text = ""
|
||||
txtCantidad.Text = "1"
|
||||
TxtnObservaciones.Text = ""
|
||||
TxtnSerie.Text = ""
|
||||
TxtnSerie.Visible = False
|
||||
'TxtnSerie.Visible = False
|
||||
TxtnLote.Text = ""
|
||||
TxtnFechaCaducidad.Text = ""
|
||||
|
||||
@@ -951,14 +948,33 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
' si tiene serie el producto, debe de
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
Dim ExistenciaSinPendiente As Decimal = ObjInventario.DtResultados.FiltroPrimeroValor("Existencia", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
Dim PendienteporSurtir As Decimal = ObjInventario.DtResultados.FiltroPrimeroValor("PendientePorSurtir", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
|
||||
' si la existencia es negativa y tiene serie ó lote, quiere decir que la consulta es específica, y si hay pendientes por surtir. puede generar negativos
|
||||
' para asegurarnos que lo pendiente por surtir se pueda surtir con otras series, consultamos de nuevo, pero a nivel producto, para checar existencia
|
||||
|
||||
If ExistenciaSinPendiente > 0 AndAlso Existencia < 0 AndAlso PendienteporSurtir > 0 Then
|
||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd 23:59")) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
'si la existencia del producto en general, supera a lo pendiente, entonces la serie si se puede sacar.
|
||||
If Existencia > PendienteporSurtir Then
|
||||
Existencia = ExistenciaSinPendiente
|
||||
Else
|
||||
Existencia = ExistenciaSinPendiente - PendienteporSurtir
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero()
|
||||
|
||||
If Existencia < 0 Then
|
||||
ErrorExistencia = True
|
||||
|
||||
'gvr.FCTextBox("TxtCantidad2").Text = (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero).ToString
|
||||
TextoExistencia.AppendFormat("-<b>#{0}</b> {1} {2} Existencia: <b>{3}</b><br/>", gvr.DataKey("No"), gvr.DataKey("PS"), If(gvr.DataKey("Serie").ToString().Trim().Length > 0, $" Serie: <b>{gvr.DataKey("Serie")}</b>", ""), (Existencia + gvr.FCTextBox("TxtCantidad2").Text.ToEntero))
|
||||
End If
|
||||
Next
|
||||
@@ -1224,8 +1240,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
End If
|
||||
|
||||
' If ObjContaAC IsNot Nothing Then ObjContaAC.Dispose()
|
||||
|
||||
'SI OCURRIO UN ERROR EN LA EXISTENCIA RECARGAMOS EL GRID PARA COLOREAR LOS DETALLES CON ERROR
|
||||
If ErrorExistencia Then
|
||||
CargaGvDatos()
|
||||
@@ -1234,98 +1248,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ObjInventario.Dispose()
|
||||
End Sub
|
||||
|
||||
'Function ConsumoInterno(TipoAlmacenOrigen As Integer, TipoAlmacenDestino As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' Dim ErrorMovInv As Boolean = False
|
||||
' Dim TextoError As String = ""
|
||||
' Dim Fecha As Date = TxtFecha.Text.ToDate
|
||||
|
||||
' Dim ObjInventario As New ClsInventarios
|
||||
' Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||
' Dim CveMovimiento As Integer = 0
|
||||
' Dim TipoMovto = If(TipoAlmacenOrigen = 14, -1, 1)
|
||||
' Dim CveConceptoInventario As Integer = 8
|
||||
|
||||
|
||||
' Dim CveAlmacenCI = If(TipoAlmacenOrigen = 14, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero)
|
||||
' Dim DtCostos As DataTable = Nothing
|
||||
' Dim ValorInventario As Decimal = 0
|
||||
|
||||
' 'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
|
||||
' CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, CveConceptoInventario, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||
' Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""),
|
||||
' GastoIndirecto:=If(ChkTransitorio.Checked And TxtGastoIndirecto.Text.ToDouble > 0, TxtGastoIndirecto.Text, "-1").ToDouble, Modulo:="TA/G4")
|
||||
' Dim FolioMov As Integer = ObjInventario.Folio
|
||||
|
||||
' If CveMovimiento <= 0 Then
|
||||
' TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||
' ErrorMovInv = True
|
||||
' Else
|
||||
|
||||
' For Each Dr As DataRow In DtMovimientos.Rows
|
||||
' If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, 0, Dr("CveAF").ToString.ToEntero, -1, Dr("Serie").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) Then
|
||||
' ErrorMovInv = True
|
||||
' TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' End If
|
||||
|
||||
' If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
' DtCostos = ObjInventario.DtResultados
|
||||
' Dim tmpCostos As DataTable = DtCostos.FiltraParametros("", "", {"CveClasificacion"})
|
||||
' Dim IdCtaContable As Integer = 0
|
||||
' Dim CveCuenta As Integer = 0
|
||||
|
||||
' If tmpCostos.Rows.Count > 0 Then
|
||||
' Dim Concepto As String = $"Consumo Interno: {ObjInventario.Folio} - {TxtObservaciones.Text}"
|
||||
' Dim CvePrePoliza = ObjConta.AddPrePolizas("Inv/ConsumoInterno", 53, DtCostos.SUM("Total") * TipoMovto, DtCostos.SUM("Total") * TipoMovto, 1, TxtFecha.Text.ToDate, $"Consumo Interno: {TxtObservaciones.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
' For Each RowInv As DataRow In tmpCostos.Rows
|
||||
' ValorInventario = DtCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal
|
||||
' IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGasto", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ValorInventario * TipoMovto, Concepto, 181, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=ValorInventario * TipoMovto, CveCuenta:=CveCuenta) Then
|
||||
' ErrorMovInv = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
|
||||
' IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", $"CveAlmacen={CveAlmacenCI}").ToEntero
|
||||
|
||||
' If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DtCostos.SUM("Total").ToDecimal * TipoMovto, Concepto, 68, Concepto, TxtFecha.Text.ToDate, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimiento, ImporteMX:=DtCostos.SUM("Total").ToDecimal * TipoMovto) Then
|
||||
' ErrorMovInv = True
|
||||
' End If
|
||||
|
||||
' End If
|
||||
' End If
|
||||
|
||||
' If Not ErrorMovInv Then
|
||||
|
||||
' ObjInventario.Commit()
|
||||
' Dim Mensaje As StringBuilder = New StringBuilder
|
||||
|
||||
' Mensaje.Append("Se realizó el consumo interno.")
|
||||
|
||||
' Mensaje.AppendFormat("<br/> Folio: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", FolioMov, CveMovimiento)
|
||||
|
||||
' Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
' Mensaje.Clear()
|
||||
|
||||
' LimpiaMovimiento()
|
||||
|
||||
' Else
|
||||
' ObjInventario.RollBack()
|
||||
' Alert(TextoError, TipoMensaje.MsgError)
|
||||
' RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
' Return Retorno
|
||||
|
||||
'End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -1463,42 +1385,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TdFechaCaducidad.Visible = GvDatos.Columns(7).Visible : ThFechaCaducidad.Visible = GvDatos.Columns(7).Visible
|
||||
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
|
||||
''TxtnSerie.Visible = False
|
||||
''ThSerie.Visible = False
|
||||
''TdSerie.Visible = False
|
||||
'GvDatos.Columns(5).Visible = False
|
||||
|
||||
'TxtnLote.Visible = False
|
||||
'ThLote.Visible = False
|
||||
'TdLote.Visible = False
|
||||
'GvDatos.Columns(6).Visible = False
|
||||
|
||||
'TxtnFechaCaducidad.Visible = False
|
||||
'ThFechaCaducidad.Visible = False
|
||||
'TdFechaCaducidad.Visible = False
|
||||
'GvDatos.Columns(7).Visible = False
|
||||
|
||||
|
||||
'If DtTemp.MAX("Serie").ToString <> "" Then
|
||||
' TxtnSerie.Visible = True
|
||||
' ThSerie.Visible = True
|
||||
' TdSerie.Visible = True
|
||||
' GvDatos.Columns(5).Visible = True
|
||||
'End If
|
||||
'If DtTemp.MAX("Lote").ToString <> "" Then
|
||||
' TxtnLote.Visible = True
|
||||
' ThLote.Visible = True
|
||||
' TdLote.Visible = True
|
||||
' GvDatos.Columns(6).Visible = True
|
||||
'End If
|
||||
'If DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha Then
|
||||
' TxtnFechaCaducidad.Visible = True
|
||||
' ThFechaCaducidad.Visible = True
|
||||
' TdFechaCaducidad.Visible = True
|
||||
' GvDatos.Columns(7).Visible = True
|
||||
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
@@ -1514,47 +1400,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
e.Row.FCTextBox("TxtCantidad2").Attributes.Add("onblur", String.Format("ValidaCantidad(this,{0})", e.Row.DBCampo("Cantidad")))
|
||||
End If
|
||||
|
||||
'If If(e.Row.DBCampo("Serie").ToString = "", "-1", e.Row.DBCampo("Serie").ToString) <> "-1" Then
|
||||
' TxtnSerie.Visible = True
|
||||
' ThSerie.Visible = True
|
||||
' TdSerie.Visible = True
|
||||
' GvDatos.Columns(4).Visible = True
|
||||
' e.Row.Cells(4).Text = e.Row.DBCampo("Serie").ToString
|
||||
'Else
|
||||
' e.Row.Cells(4).Text = ""
|
||||
'End If
|
||||
|
||||
'If If(e.Row.DBCampo("Lote").ToString = "", "-1", e.Row.DBCampo("Lote").ToString) <> "-1" Then
|
||||
' TxtnLote.Visible = True
|
||||
' ThLote.Visible = True
|
||||
' TdLote.Visible = True
|
||||
' GvDatos.Columns(5).Visible = True
|
||||
' e.Row.Cells(5).Text = e.Row.DBCampo("Lote").ToString
|
||||
|
||||
' TxtnBatch.Visible = True
|
||||
' ThBatch.Visible = True
|
||||
' TdBatch.Visible = True
|
||||
' GvDatos.Columns(6).Visible = True
|
||||
|
||||
'Else
|
||||
' e.Row.Cells(5).Text = ""
|
||||
' e.Row.Cells(6).Text = ""
|
||||
'End If
|
||||
|
||||
'If e.Row.RowState = DataControlRowState.Edit Then
|
||||
' e.Row.FCDropDownList("DdlUnidad").DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||
' e.Row.FCDropDownList("DdlUnidad").DataBind()
|
||||
' e.Row.FCDropDownList("DdlUnidad").SelectedValue = e.Row.DBCampo("CveUM")
|
||||
|
||||
' e.Row.FCDropDownList("DdlClasificacion").DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
' e.Row.FCDropDownList("DdlClasificacion").DataBind()
|
||||
' e.Row.FCDropDownList("DdlClasificacion").SelectedValue = e.Row.DBCampo("CveClasificacion")
|
||||
|
||||
' e.Row.FCDropDownList("DdlProducto").DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa)
|
||||
' e.Row.FCDropDownList("DdlProducto").DataBind()
|
||||
' e.Row.FCDropDownList("DdlProducto").SelectedValue = e.Row.DBCampo("CvePS")
|
||||
'End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||
@@ -1566,60 +1411,6 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
CargaGvDatos()
|
||||
End Sub
|
||||
|
||||
'Protected Sub GvM_RowEditing(sender As Object, e As GridViewEditEventArgs) Handles GvDatos.RowEditing
|
||||
' GvDatos.EditIndex = e.NewEditIndex
|
||||
|
||||
' CargaGvDatos()
|
||||
'End Sub
|
||||
'Protected Sub GvM_RowUpdating(sender As Object, e As GridViewUpdateEventArgs) Handles GvDatos.RowUpdating
|
||||
' Dim dr = GvDatos.Rows(e.RowIndex)
|
||||
|
||||
' Dim Cantidad = dr.FCTextBox("TxtCantidad").Text.ToDouble
|
||||
' Dim CveUM = dr.FCDropDownList("DdlUnidad").SelectedValue.ToEntero
|
||||
' Dim CveClasificacion = dr.FCDropDownList("DdlClasificacion").SelectedValue.ToEntero
|
||||
' Dim CvePS = dr.FCDropDownList("DdlProducto").SelectedValue.ToEntero
|
||||
' Dim No = dr.DataKey("No").ToEntero
|
||||
' Dim Serie As String = dr.FCTextBox("TxtSerie").Text
|
||||
|
||||
' 'VALIDA EXISTENCIA
|
||||
' Dim Valido = True
|
||||
' Dim Inv As New ClsInventarios
|
||||
' Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, -1, TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), If(Serie = "", "-1", Serie))
|
||||
' Inv.Dispose()
|
||||
|
||||
' If Existencia - txtCantidad.Text.ToDouble < 0 Then
|
||||
' If Existencia <= 0 Then
|
||||
' Alert("No hay existencia del producto", TipoMensaje.MsgError)
|
||||
' Else
|
||||
' Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgError)
|
||||
' End If
|
||||
' Valido = False
|
||||
' End If
|
||||
|
||||
' If Valido Then
|
||||
|
||||
' Dim Drs As DataRow() = DtMovimientos.Select(String.Format("No = {0}", No))
|
||||
' If Drs.Count = 1 Then
|
||||
|
||||
' Drs(0)("Cantidad") = Cantidad
|
||||
' Drs(0)("CveUM") = CveUM
|
||||
' Drs(0)("CveClasificacion") = CveClasificacion
|
||||
' Drs(0)("CvePS") = CvePS
|
||||
' Drs(0)("EstatusExistencia") = "1"
|
||||
' End If
|
||||
|
||||
|
||||
' DtMovimientos.AcceptChanges()
|
||||
' GvDatos.EditIndex = -1
|
||||
' End If
|
||||
' CargaGvDatos()
|
||||
|
||||
'End Sub
|
||||
'Protected Sub GvM_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvDatos.RowCancelingEdit
|
||||
' GvDatos.EditIndex = -1
|
||||
' CargaGvDatos()
|
||||
'End Sub
|
||||
|
||||
Protected Sub ChkSugiereFechaCaducidad_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
TxtnFechaCaducidad.Visible = Not ChkSugiereFechaCaducidad.Checked
|
||||
@@ -2428,6 +2219,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TxtCodigoPSRecepcion.Text = ""
|
||||
TdSeriePSRecepcion.Visible = False
|
||||
TxtSeriePSRecepcion.Text = ""
|
||||
TxtCodigoPSRecepcion.Focus()
|
||||
UpDatosRecepcion.Update()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2019 © AD Sistemas.</asp:Literal>
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2022 © AD Sistemas.</asp:Literal>
|
||||
</div>
|
||||
<%--<div class="col-lg-offset-4 col-md-offset-4 col-sm-offset-3 col-lg-4 col-md-4 col-sm-6 col-xs-12 text-right">
|
||||
<asp:LinkButton ID="linkRegistrar" runat="server" CssClass="restaurar-password" OnClientClick="window.location.href='ActivarUsuario.aspx'">Registrar</asp:LinkButton>
|
||||
|
||||
@@ -335,9 +335,13 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-2" runat="server" id="DvNumRemision1" visible="false"><b>Núm. Remisión</b></div>
|
||||
<div class="col-md-2" runat="server" id="DvNumRemision2" visible="false">
|
||||
<asp:TextBox ID="TxtNumRemision" runat="server" MaxLength="10" Width="100%" onblur="ValidaNumRemision()"></asp:TextBox>
|
||||
<div class="col-md-3" runat="server" id="DvNumRemision2" visible="false">
|
||||
<asp:TextBox ID="TxtNumRemision" runat="server" MaxLength="10" Width="80%" onblur="ValidaNumRemision()"></asp:TextBox>
|
||||
<asp:Button ID="BtnValidaNumRemision" ClientIDMode="Static" OnClick="BtnValidaNumRemision_Click" Style="display: none;" runat="server" />
|
||||
<asp:LinkButton runat="server" Visible="false" ID="LnkActualziarNumRemision" OnClick="LnkActualziarNumRemision_Click"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Actualizar número remisión"
|
||||
data-btn-ok-label="si" Text="<i class='fa fa-check' style='color:green'></i>" CssClass="btn btn-default btn-circle btn-xs"
|
||||
ToolTip="¿Está seguro que desea actualizar el número de remisión?" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -580,6 +580,22 @@ Partial Class OC_OC
|
||||
End Property
|
||||
|
||||
|
||||
Private Property NumeroRemisionOriginal As String
|
||||
Get
|
||||
|
||||
If ViewState("NumeroRemisionOriginal") Is Nothing Then
|
||||
ViewState("NumeroRemisionOriginal") = ""
|
||||
End If
|
||||
|
||||
Return ViewState("NumeroRemisionOriginal").ToString
|
||||
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("NumeroRemisionOriginal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -899,14 +915,19 @@ Partial Class OC_OC
|
||||
|
||||
'NO MOSTRAR LA OPCION DE ENTREGA DIRECTA (ECONOLLANTAS)
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
DivEntregaDirecta.Visible = False
|
||||
ChkEntregaDirecta.Enabled = False
|
||||
ChkEntregaDirecta.Checked = False
|
||||
End If
|
||||
|
||||
DivEntregaDirecta.Visible = False
|
||||
ChkEntregaDirecta.Enabled = False
|
||||
ChkEntregaDirecta.Checked = False
|
||||
End If
|
||||
MostrarUsuarioAsignado()
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
MostrarUsuarioAsignado()
|
||||
|
||||
Me.Form.DefaultButton = ""
|
||||
|
||||
End Sub
|
||||
|
||||
#Region " PERMISOS PAGINA "
|
||||
@@ -1416,6 +1437,7 @@ Partial Class OC_OC
|
||||
TxtFolioAdicional.Text = objOC.FolioAdicional
|
||||
|
||||
TxtNumRemision.Text = objOC.NumRemision
|
||||
NumeroRemisionOriginal = objOC.NumRemision
|
||||
|
||||
If Not IsNothing(objOC.Tipo) Then
|
||||
|
||||
@@ -8745,6 +8767,7 @@ Partial Class OC_OC
|
||||
|
||||
Private Function ValidaNumRemision(NumRemision As String, TipoOC As String, CveProveedor As Integer, Optional OcTransaccion As SqlClient.SqlTransaction = Nothing, Optional CveOrdenCompraValida As Integer = -1) As Boolean
|
||||
Dim NumRemisionValida As Boolean = False
|
||||
LnkActualziarNumRemision.Visible = False
|
||||
|
||||
If NumRemision.Trim.Length > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(590) = "1" AndAlso UsuarioActual.CveRol = 1 Then
|
||||
@@ -8752,7 +8775,7 @@ Partial Class OC_OC
|
||||
Dim ObjOC As New ClsOC(OcTransaccion)
|
||||
If ObjOC.GetVerificaNumRemision(CveProveedor, TipoOC, NumRemision, UsuarioActual.CveEmpresa, CveOrdenCompraValida) Then
|
||||
If ObjOC.DtResultados.Rows.Count > 0 Then
|
||||
Alert($"La remision ya se encuentra asignada a la { If(TipoOC = "OC", "Orden de compra", "Requisición")} <a target='_blank' href='./OC.aspx?OC={ObjOC.DtResultados.Rows(0)("CveOrdenCompra").ToString()}' >{ObjOC.DtResultados.Rows(0)("Folio").ToString() }</a>", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"La remision ya se encuentra asignada a la { If(TipoOC = "OC", "Orden de compra", "Requisición")} <a target='_blank' class='Texto' href='./OC.aspx?OC={ObjOC.DtResultados.Rows(0)("CveOrdenCompra").ToString()}' >{ObjOC.DtResultados.Rows(0)("Folio").ToString() }</a>.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
NumRemisionValida = True
|
||||
End If
|
||||
@@ -8764,6 +8787,17 @@ Partial Class OC_OC
|
||||
NumRemisionValida = True
|
||||
End If
|
||||
|
||||
|
||||
If NumRemisionValida Then
|
||||
|
||||
If CveOrdenCompra > 0 And BtnGuardar.Enabled And BtnGuardar.Visible Then
|
||||
LnkActualziarNumRemision.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
UPPEmp.Update()
|
||||
|
||||
Return NumRemisionValida
|
||||
|
||||
End Function
|
||||
@@ -8774,5 +8808,43 @@ Partial Class OC_OC
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkActualziarNumRemision_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
|
||||
If NumeroRemisionOriginal.Trim = TxtNumRemision.Text.Trim Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ValidaNumRemision(TxtNumRemision.Text.Trim(), TipoOC, DdlProveedores.SelectedValue.ToEntero, Nothing, If(CveOrdenCompra > 0, CveOrdenCompra, -1)) Then
|
||||
|
||||
Dim ObjOC As New ClsOC
|
||||
Dim OCBitacora As New ClsOIEventos(ObjOC.IniciaTransacSQL())
|
||||
Dim ErrorProceso As Boolean = False
|
||||
|
||||
If ObjOC.UpdateNumeroRemision(CveOrdenCompra, TxtNumRemision.Text, UsuarioActual.CveEmpresa) Then
|
||||
If Not OCBitacora.AddEventoBitacora(If(NumeroRemisionOriginal.Trim.Length > 0, $"Se actualilizo número de remisión de { NumeroRemisionOriginal } a {TxtNumRemision.Text.Trim()}", $"Se agrego número de remisión {TxtNumRemision.Text.Trim()}"), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveOC:=CveOrdenCompra) Then
|
||||
ErrorProceso = True
|
||||
End If
|
||||
Else
|
||||
ErrorProceso = True
|
||||
End If
|
||||
|
||||
If Not ErrorProceso Then
|
||||
ObjOC.Commit()
|
||||
CargaEventoBitacora()
|
||||
NumeroRemisionOriginal = TxtNumRemision.Text.Trim
|
||||
Alert("Número de remisión actualizado correctemante.")
|
||||
Else
|
||||
ObjOC.RollBack()
|
||||
End If
|
||||
|
||||
ObjOC.Dispose()
|
||||
|
||||
Else
|
||||
Alert("El número de remisión no es valido.")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -1093,9 +1093,10 @@ function FormatoNumero(Importe, Decimales) {
|
||||
if (isNaN(parseInt(Importe))) return "NaN";
|
||||
Decimales = Decimales || 2; // parametro opcional, toma el valor 2 por default
|
||||
// var tmpNum = Importe;
|
||||
|
||||
|
||||
var tmpNum = parseFloat(Importe).toFixed(Decimales)
|
||||
|
||||
|
||||
//var tmpNum = parseFloat(Importe).toFixed(Decimales) //se comenta por el redondeo de $3037.095
|
||||
var tmpNum = +(Math.round(Importe + "e+" + Decimales) + "e-" + Decimales);
|
||||
tmpNum = Number(tmpNum).toLocaleString('en');
|
||||
|
||||
//tmpNum = tmpNum.toFixed(2).replace(/./g, function (c, i, a) {
|
||||
|
||||
@@ -46,14 +46,14 @@
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
</asp:GridView>
|
||||
|
||||
<asp:GridView ID="GvPortalRastreo" runat="server" DataKeyNames="CveUsuario, CveCliente, Contraseña, Usuario" AutoGenerateColumns="false" ShowHeaderWhenEmpty="false"
|
||||
<asp:GridView ID="GvPortalRastreo" runat="server" DataKeyNames="CveUsuario, CveCliente, Contraseña, Usuario,CveEmpresa" AutoGenerateColumns="false" ShowHeaderWhenEmpty="false" OnRowDataBound="GvPortalRastreo_RowDataBound"
|
||||
Width="100%" ToolTip="Listado de Empresas a las que tiene acceso." CssClass="table table-striped table-advance table-hover GVSearch"
|
||||
Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Portal Rastreo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEmp" runat="server" CssClass="Texto" Text='<%# Eval("Cliente")%>' CommandArgument='<%# Eval("CveCliente") %>' CommandName="Cambia"></asp:LinkButton>
|
||||
<asp:HyperLink ID="HlpPortal" runat="server" CssClass="Texto" Target="_blank" Text='<%# Eval("Cliente")%>' ></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
<HeaderStyle HorizontalAlign="Left" />
|
||||
@@ -113,8 +113,9 @@
|
||||
$('#BtnSeleccionar').click();
|
||||
}
|
||||
|
||||
function Ir2() {
|
||||
gotourl('/PortalGPS/InicioGPS.aspx');
|
||||
function Ir2(url) {
|
||||
//gotourl('/PortalGPS/InicioGPS.aspx');
|
||||
gotourl(url);
|
||||
}
|
||||
|
||||
function Ir3() {
|
||||
|
||||
@@ -93,41 +93,6 @@ Partial Class PopUpSeleccionarEmpresa
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvPortalRastreo_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GvPortalRastreo.RowCommand
|
||||
If e.CommandName = "Cambia" Then
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
If gvr IsNot Nothing Then
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
Dim Usuario As Usuario = Nothing
|
||||
Usuario = ObjUsuario.ValidaUsuarioGPS2(gvr.DataKey("CveCliente"), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"))
|
||||
ObjUsuario.Dispose()
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
Dim ModoSimulacion As Boolean = ADSSession.ADSSessionConfig.sessionUser.ModoSimulacion
|
||||
Usuario.ModoSimulacion = ModoSimulacion
|
||||
ADSSession.ADSSessionConfig.sessionUser = Usuario
|
||||
ADSSession.ADSSessionConfig.sessionDpage = False
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count >= 1 Then
|
||||
If dt.Rows.Count > 1 Then Usuario.MultipleEmpresa = True
|
||||
Usuario.CvePlataforma = 3
|
||||
CreaObjetoEmpresa(Usuario)
|
||||
'si la contraseña es la prederminada, pide la nueva contraseña
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario.ToString), False)
|
||||
RegistraScript("Ir2();")
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvPortalCliente_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GvPortalCliente.RowCommand
|
||||
If e.CommandName = "Cambia" Then
|
||||
@@ -263,4 +228,15 @@ Partial Class PopUpSeleccionarEmpresa
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Protected Sub GvPortalRastreo_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Parametros As String = Encripta($"OPCION=PORTALGPS&CVEEMPRESA={e.Row.DBCampo("CveEmpresa")}&CVECLIENTE={e.Row.DBCampo("CveCliente")}&CVEUSUARIO={UsuarioActual.CveUsuario}&TICKS={Now.Ticks}")
|
||||
|
||||
Dim SitioGPS As String = "https://gps.signalsgps.com/"
|
||||
|
||||
Dim URLGPS As String = $"{SitioGPS}LogIn.aspx?P={Parametros}"
|
||||
|
||||
e.Row.FCHyperLink("HlpPortal").NavigateUrl = URLGPS
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
@@ -308,6 +308,17 @@
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpAcciopnesLineasAdicionales" RenderMode="Inline" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregarLineaAdicional" data-toggle="tooltip" runat="server" Text="<i class='fa fa-plus'></i> Agregar Linea Adicional" Visible="false" OnClick="LnkAgregarLineaAdicional_Click"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtlTitulo" runat="server" Text="Registro de Clientes"></asp:Literal> <asp:Literal ID="LtlCliente" runat="server"></asp:Literal>
|
||||
@@ -4538,6 +4549,67 @@
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabLineasAdicionales" runat="server" HeaderText="Lineas Adicionales" Visible="false">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="row ">
|
||||
<div class=" col-md-12" style="text-align: right!important">
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
|
||||
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveClasificacionPS,FechaIng,CveEstatus,Proveedor"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||
<Columns>
|
||||
|
||||
|
||||
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Proveedor" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TipoLineaSTR" HeaderText="Tipo Linea" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:TemplateField HeaderText="Opciones">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEditarLineaAdicional" runat ="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" OnClick="LnkEditarLineaAdicional_Click" />
|
||||
<asp:LinkButton ID="LnkEliminarLineaAdicional" runat ="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" OnClick="LnkEliminarLineaAdicional_Click" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10%" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
@@ -6624,6 +6696,141 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="DVLineasAdicionales" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpLineaAdicionalmodal" 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="H4" runat="server"><asp:Literal runat="server" ID="LtlLineasAdicionalesTotuloModal"></asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLineaAdicionalModal" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RfvTxtLineaAdicionalModal" runat="server" ControlToValidate="TxtLineaAdicionalModal" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Linea Adicional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtLineaAdicionalModal.ClientID.ToString()%>">
|
||||
<asp:Literal ID="LtlLineaAdicionalModal" runat="server" Text="Linea Adicional:"></asp:Literal>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" style="padding-top:-5px!important">
|
||||
<ADS:Dropdownlost ID="DdlProveedorLineaAdicionalModal" SelectedText="-" IncluyeTodos="false" runat="server" CssStyle="width: 250px; selected2me; margin-top:4px;" Width="250px" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="form-control input-sm DdlPS"></ADS:Dropdownlost>
|
||||
<label for="<%= DdlProveedorLineaAdicionalModal.ClientID.ToString()%>">Proveedor: </label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoLineaAdicionalModal" CssClass="form-control select2me" runat="server" Width="250px">
|
||||
<asp:ListItem Text="Seleccione" Value="-1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Normal" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="PO" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlTipoLinea" InitialValue="-1" runat="server" ControlToValidate="TxtLineaAdicionalModal" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Linea''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlTipoLineaAdicionalModal.ClientID.ToString()%>">Tipo de Linea:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtImporteLineaAdicionalModal" CssClass="form-control " runat="server" MaxLength="20" CausesValidation="true" Width="250px"></asp:TextBox>
|
||||
|
||||
<asp:RequiredFieldValidator ID="RfvTxtImporteLineaAdicionalModal" runat="server" ControlToValidate="TxtImporteLineaAdicionalModal" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtImporteLineaAdicionalModal" ValidChars="1234567890." FilterType="Custom" />
|
||||
<label for="<%= TxtImporteLineaAdicionalModal.ClientID.ToString()%>">Importe: </label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlMonedaLineAdicionalModal" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Width="250px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pesos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dolares" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlMonedaLineAdicionalModal" InitialValue="-1" runat="server" ControlToValidate="DdlMonedaLineAdicionalModal" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlMonedaLineAdicionalModal.ClientID.ToString()%>">Moneda: </label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker">
|
||||
<asp:TextBox ID="TxtFechaVencimientoLineaAdicionalModal" CssClass="form-control" runat="server" ></asp:TextBox>
|
||||
<span class="input-group-btn " style="position: absolute; right: 41px; top: 9px;">
|
||||
<asp:LinkButton ID="LnkTxtFechaVencimientoLineaAdicionalModal" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="METxtFechaVencimientoLineaAdicionalModal" runat="server" TargetControlID="TxtFechaVencimientoLineaAdicionalModal" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CETxtFechaVencimientoLineaAdicionalModal" TargetControlID="TxtFechaVencimientoLineaAdicionalModal" PopupButtonID="LnkTxtFechaVencimientoLineaAdicionalModal" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtFechaVencimientoLineaAdicionalModal" runat="server" ControlToValidate="TxtFechaVencimientoLineaAdicionalModal" Display="None"
|
||||
ErrorMessage="El campo <b>''Fecha Vencimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaVencimientoLineaAdicionalModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtFechaVencimientoLineaAdicionalModal.ClientID.ToString()%>">Fecha Vencimiento: </label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
|
||||
<asp:DropDownList ID="DdlClasificacionLienaAdicionalModal" DataValueField="CveClasificacion" DataTextField="Clasificacion" Width="250px" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAgregarLineaAdicionalModal" runat="server" CssClass="btn btn-success" Text="Guardar" OnClick="LnkAgregarLineaAdicionalModal_Click" ValidationGroup="GrpLineaAdicional" ></asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -501,6 +501,22 @@ Partial Class Clientes
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveLineaAdicional As Integer
|
||||
Get
|
||||
If ViewState("CveLineaAdicional") Is Nothing Then
|
||||
ViewState("CveLineaAdicional") = -1
|
||||
End If
|
||||
|
||||
Return ViewState("CveLineaAdicional").ToString.ToEntero
|
||||
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveLineaAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Documentacion"
|
||||
@@ -917,6 +933,18 @@ Partial Class Clientes
|
||||
LtlTareaNueva.Text = String.Format("<a class=""caption-subject bold font-green"" onclick=""OpenModalNewTareaUserControl(1,-1,{{CveCliente:{0}}});""> <i class=""fa fa-plus""'></i> Tarea</a>", CveCliente)
|
||||
|
||||
MostrarTxtDireccionesClienteEnvio()
|
||||
|
||||
|
||||
If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa.Contiene(119, 1) AndAlso UsuarioActual.CveRol = 1 Then
|
||||
CargaCombosLineasAdicionales()
|
||||
TabLineasAdicionales.Visible = True
|
||||
LnkAgregarLineaAdicional.Visible = True
|
||||
GetLineasAdicionales()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017
|
||||
@@ -926,6 +954,8 @@ Partial Class Clientes
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " PERMISOS PAGINAS "
|
||||
|
||||
Private Sub MostrarTxtDireccionesClienteEnvio()
|
||||
@@ -10308,5 +10338,160 @@ Partial Class Clientes
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub CargaCombosLineasAdicionales()
|
||||
|
||||
If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then
|
||||
DdlProveedorLineaAdicionalModal.setEsWebService(True)
|
||||
DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedorLineaAdicionalModal.SelectedText = "-"
|
||||
DdlProveedorLineaAdicionalModal.SelectedValue = "-1"
|
||||
|
||||
|
||||
|
||||
Else
|
||||
DdlProveedorLineaAdicionalModal.setEsWebService(False)
|
||||
DdlProveedorLineaAdicionalModal.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedorLineaAdicionalModal.ddl.DataBind()
|
||||
DdlProveedorLineaAdicionalModal.ddl.Items.Insert(0, New ListItem("-", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
DdlClasificacionLienaAdicionalModal.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacionLienaAdicionalModal.DataBind()
|
||||
DdlClasificacionLienaAdicionalModal.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GetLineasAdicionales()
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetLineasAdicionales(-1, CveCliente, -1, -1, -1, MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa) Then
|
||||
GvLineasAdicionales.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
GvLineasAdicionales.DataBind()
|
||||
UpLineasAdicionales.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregarLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||
CveLineaAdicional = -1
|
||||
RegistraScript("$('#DVLineasAdicionales').modal('show')")
|
||||
LtlLineasAdicionalesTotuloModal.Text = "Agregar Linea Adicional"
|
||||
AgregarLineaAdicionalLimpiarControles()
|
||||
UpLineaAdicionalmodal.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub AgregarLineaAdicionalLimpiarControles()
|
||||
|
||||
TxtLineaAdicionalModal.Text = ""
|
||||
DdlProveedorLineaAdicionalModal.txtText.Value = ""
|
||||
DdlProveedorLineaAdicionalModal.txtValue.Value = ""
|
||||
DdlTipoLineaAdicionalModal.SelectedValueExist(-1)
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = ""
|
||||
DdlClasificacionLienaAdicionalModal.SelectedValueExist(-1)
|
||||
TxtImporteLineaAdicionalModal.Text = ""
|
||||
DdlMonedaLineAdicionalModal.SelectedValueExist(-1)
|
||||
|
||||
UpLineaAdicionalmodal.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAgregarLineaAdicionalModal_Click(sender As Object, e As EventArgs)
|
||||
Dim ErrorAgregar As Boolean = False
|
||||
|
||||
'If DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero <= 0 Then
|
||||
' Alert("El proveedor es requerido", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
|
||||
If CveLineaAdicional > 0 Then
|
||||
If Not ObjVentas.UpdateLineasAdicionales(CveLineaAdicional, TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
||||
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlClasificacionLienaAdicionalModal.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) Then
|
||||
ErrorAgregar = True
|
||||
Else
|
||||
Alert("Linea Adicional Actualizada Correctamente")
|
||||
End If
|
||||
Else
|
||||
If Not ObjVentas.AddLineasAdicionales(TxtLineaAdicionalModal.Text, CveCliente, DdlProveedorLineaAdicionalModal.SelectedValue.ToEntero, DdlTipoLineaAdicionalModal.SelectedValue.ToEntero, TxtImporteLineaAdicionalModal.Text.ToDecimal,
|
||||
DdlMonedaLineAdicionalModal.SelectedValue.ToEntero, TxtFechaVencimientoLineaAdicionalModal.Text.ToDate, UsuarioActual.CveUsuario, DdlClasificacionLienaAdicionalModal.SelectedValue.ToEntero, 0) Then
|
||||
ErrorAgregar = True
|
||||
Else
|
||||
Alert("Linea Adicional Agregada Correctamente")
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If Not ErrorAgregar Then
|
||||
RegistraScript("$('#DVLineasAdicionales').modal('hide')")
|
||||
GetLineasAdicionales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEditarLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LtlLineasAdicionalesTotuloModal.Text = "Editar Linea Adicional"
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim ErrorEdicion As Boolean = False
|
||||
|
||||
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToEntero
|
||||
|
||||
TxtLineaAdicionalModal.Text = GvRow.DataKey("LineaAdicional")
|
||||
DdlProveedorLineaAdicionalModal.txtText.Value = GvRow.DataKey("Proveedor")
|
||||
DdlProveedorLineaAdicionalModal.txtValue.Value = GvRow.DataKey("CveProveedor")
|
||||
DdlTipoLineaAdicionalModal.SelectedValueExist(GvRow.DataKey("TipoLinea").ToEntero)
|
||||
TxtFechaVencimientoLineaAdicionalModal.Text = GvRow.DataKey("FechaVencimiento").ToDate.ToString("dd/MM/yyyy")
|
||||
DdlClasificacionLienaAdicionalModal.SelectedValueExist(GvRow.DataKey("CveClasificacionPS").ToEntero)
|
||||
TxtImporteLineaAdicionalModal.Text = GvRow.DataKey("Importe").ToDecimal.ToString("###,###,###.00")
|
||||
DdlMonedaLineAdicionalModal.SelectedValueExist(GvRow.DataKey("CveMoneda").ToEntero)
|
||||
|
||||
RegistraScript("$('#DVLineasAdicionales').modal('show')")
|
||||
|
||||
UpLineaAdicionalmodal.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkEliminarLineaAdicional_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
Dim CveLineaAdicionalEliminar = GvRow.DataKey("CveLineaAdicional").ToEntero
|
||||
Dim ErrorEliminacion As Boolean = False
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If Not ObjVentas.RemoveLineasAdicionales(CveLineaAdicionalEliminar, UsuarioActual.CveEmpresa) Then
|
||||
ErrorEliminacion = True
|
||||
Else
|
||||
Alert("Linea Adicional Eliminada Correctamente")
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If Not ErrorEliminacion Then
|
||||
GetLineasAdicionales()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
230
Ventas/RepLineasAdicionales.aspx
Normal file
230
Ventas/RepLineasAdicionales.aspx
Normal file
@@ -0,0 +1,230 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepLineasAdicionales.aspx.cs" Inherits="Ventas_RepLineasAdicionales" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 800px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
<asp:Literal runat="server" ID="LtlEncabezado" Text="Reporte Lineas Adicionales"></asp:Literal>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargaExcel" OnClick="LnkDescargaExcel_Click" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaExcel" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="" id="DivFiltros">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" OnClick="BtnConsultar_Click" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate" runat="server" id="DVProveedor1" visible="false">Proveedor:</div>
|
||||
<div class="col-md-2" runat="server" id="DVProveedor2" visible="false">
|
||||
<ADS:Dropdownlost ID="DdlProveedor" SelectedText="-" runat="server" CssStyle="width: 100%; selected2me; " Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" CssClass="select2me"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" >Cliente:</div>
|
||||
<div class="col-md-2 ">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Fecha Inicio: </div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Fecha Fin: </div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate" >Estatus:</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Width="100%">
|
||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Registrado" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Vinculado" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="row ">
|
||||
<div class=" col-md-12" style="text-align: right!important">
|
||||
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
|
||||
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveClasificacionPS,FechaIng,CveEstatus,Proveedor,Comprobante"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
|
||||
OnRowDataBound="GvLineasAdicionales_RowDataBound"
|
||||
>
|
||||
<Columns>
|
||||
|
||||
|
||||
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="NombreCliente" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Proveedor" HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />
|
||||
|
||||
<asp:TemplateField HeaderText="Opciones" Visible="false" ItemStyle-Width="120px">
|
||||
<ItemTemplate>
|
||||
<div class="row" style="width:118px" >
|
||||
<div class="col-md-4" >
|
||||
<asp:LinkButton ID="LnkCargarComprobante" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload'></i>" OnClick="LnkCargarComprobante_Click" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:LinkButton ID="LnkDescargaComprobante" runat="server" AlternateText="Descarga" CausesValidation="False" CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click" Visible="false" />
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" AlternateText="Eliminar" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado a Enviado?" data-btn-ok-label="si" OnClick="LnkCambiarEstatus_Click" Visible="false" />
|
||||
</div>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="10%" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<%-- MODAL COMPROBANTE --%>
|
||||
<div id="ModalComprobante" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content" style="width: 700px;">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">Agregar Comprbante</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpAddComprobancte" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div>
|
||||
<asp:TextBox ID="Anexo" CssClass="ADSdropzone hidden" data-maxFile="1" Text="" runat="server"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnAddComprobante" runat="server" ClientIDMode="Static" Text="Guardar" CssClass="btn btn-primary" OnClick="BtnAddComprobante_Click" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- FIN MODAL COMPROBANTE --%>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
|
||||
322
Ventas/RepLineasAdicionales.aspx.cs
Normal file
322
Ventas/RepLineasAdicionales.aspx.cs
Normal file
@@ -0,0 +1,322 @@
|
||||
using System;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using ListItem = System.Web.UI.WebControls.ListItem;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using System.Web.UI;
|
||||
|
||||
public partial class Ventas_RepLineasAdicionales : ClsPaginas
|
||||
{
|
||||
#region PROPIEDADES
|
||||
|
||||
private int CveLineaAdicional
|
||||
{
|
||||
get { return (ViewState["CveLineaAdicional"] == null) ? 0 : int.Parse(ViewState["CveLineaAdicional"].ToString()); }
|
||||
set { ViewState["CveLineaAdicional"] =(int) value; }
|
||||
}
|
||||
|
||||
private int TipoLinea
|
||||
{
|
||||
get { return (ViewState["TipoLinea"] == null) ? 1: int.Parse(ViewState["TipoLinea"].ToString()); }
|
||||
set { ViewState["TipoLinea"] = (int)value; }
|
||||
}
|
||||
|
||||
private DataTable DTDatosGvLineasAdicionales
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["DTDatosGvLineasAdicionales"] == null)
|
||||
{
|
||||
ViewState["DTDatosGvLineasAdicionales"] = new DataTable();
|
||||
}
|
||||
return (DataTable)ViewState["DTDatosGvLineasAdicionales"];
|
||||
}
|
||||
set { ViewState["DTDatosGvLineasAdicionales"] = (DataTable)value; }
|
||||
}
|
||||
|
||||
private string Comprobante
|
||||
{
|
||||
get {
|
||||
|
||||
if(ViewState["Comprobante"] == null)
|
||||
{
|
||||
ViewState["Comprobante"] = "";
|
||||
}
|
||||
|
||||
return ViewState["Comprobante"].ToString();
|
||||
}
|
||||
set { ViewState["Comprobante"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
|
||||
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
|
||||
{
|
||||
DVProveedor1.Visible = true;
|
||||
DVProveedor2.Visible = true;
|
||||
GvLineasAdicionales.Columns[8].Visible = true;
|
||||
TipoLinea = 2;
|
||||
LtlEncabezado.Text = "Reporte PO";
|
||||
}
|
||||
|
||||
//Carga Clientes
|
||||
DdlClientes.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
|
||||
DdlClientes.DataBind();
|
||||
|
||||
if(UsuarioActual.Empresa.Funcionalidad(105) == "1") {
|
||||
DdlProveedor.setEsWebService(true);
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores");
|
||||
DdlProveedor.SelectedText = "Todos";
|
||||
DdlProveedor.SelectedValue = "-1";
|
||||
}else {
|
||||
DdlProveedor.setEsWebService(false);
|
||||
DdlProveedor.ddl.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
|
||||
DdlProveedor.ddl.DataBind();
|
||||
DdlProveedor.ddl.Items.Insert(0, new ListItem("-", "-1"));
|
||||
}
|
||||
|
||||
DdlClientes.setEsWebService(true);
|
||||
DdlClientes.Attributes.Add("data-metodo", "getcliente");
|
||||
DdlClientes.SelectedText = "Todos";
|
||||
DdlClientes.SelectedValue = "-1";
|
||||
|
||||
txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString();
|
||||
txtFechaF.Text = DateTime.Now.ToShortDateString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
private void CargaDatos()
|
||||
{
|
||||
DTDatosGvLineasAdicionales = new DataTable();
|
||||
LnkDescargaExcel.Visible = false;
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
|
||||
|
||||
if(objVentas.GetLineasAdicionales(-1,DdlClientes.SelectedValue.ToEntero(),CveProveedor, TipoLinea, -1,txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)){
|
||||
GvLineasAdicionales.DataSource = objVentas.DtResultados;
|
||||
|
||||
if( objVentas.DtResultados.Rows.Count > 0)
|
||||
{
|
||||
DTDatosGvLineasAdicionales = objVentas.DtResultados;
|
||||
LnkDescargaExcel.Visible = true;
|
||||
UpAcciones.Update();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GvLineasAdicionales.DataSource = null;
|
||||
}
|
||||
|
||||
objVentas.Dispose();
|
||||
|
||||
GvLineasAdicionales.DataBind();
|
||||
UpLineasAdicionales.Update();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkCargarComprobante_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow) ((LinkButton) sender).NamingContainer;
|
||||
|
||||
CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||
Comprobante = GvRow.DataKey("Comprobante").ToString();
|
||||
|
||||
RegistraScript("$('#ModalComprobante').modal('show');","");
|
||||
}
|
||||
|
||||
protected void BtnAddComprobante_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool errorCargaComprobante = false;
|
||||
string FileExtension = "-1";
|
||||
List<Archivo> filesgral = Anexo.getfiles().Archivos;
|
||||
string filemove = "";
|
||||
FileInfo fiNuevo;
|
||||
|
||||
DirectoryInfo df = new DirectoryInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\");
|
||||
|
||||
|
||||
//Crea directorio si no existe
|
||||
if (!df.Exists)
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(df.FullName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
errorCargaComprobante = true;
|
||||
}
|
||||
}
|
||||
|
||||
//borrar archivo anterior
|
||||
if((!errorCargaComprobante) && Comprobante.Length > 0)
|
||||
{
|
||||
FileInfo fiAnterior = new FileInfo($@"{df.FullName}{Comprobante}");
|
||||
if (fiAnterior.Exists)
|
||||
{
|
||||
try
|
||||
{
|
||||
File.Delete(fiAnterior.FullName);
|
||||
}
|
||||
catch
|
||||
{
|
||||
errorCargaComprobante = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!errorCargaComprobante){
|
||||
|
||||
string RutaArchivoTemp = "";
|
||||
foreach (Archivo fileItem in filesgral)
|
||||
{
|
||||
FileExtension = System.IO.Path.GetExtension(string.Format(@"{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "");
|
||||
filemove = fileItem.filename;
|
||||
RutaArchivoTemp = $@"{AppDomain.CurrentDomain.BaseDirectory}\Temp\{fileItem.filename}";
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if((!errorCargaComprobante) && RutaArchivoTemp.Length > 0)
|
||||
{
|
||||
fiNuevo = new FileInfo(RutaArchivoTemp);
|
||||
|
||||
if (fiNuevo.Exists)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
if (File.Exists($@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}"))
|
||||
{
|
||||
File.Delete($@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}");
|
||||
}
|
||||
|
||||
File.Move(fiNuevo.FullName, $@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}");
|
||||
errorCargaComprobante = false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
errorCargaComprobante = true;
|
||||
}
|
||||
|
||||
if (!errorCargaComprobante)
|
||||
{
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
if (!objVentas.UpdateLineasAdicionales(CveLineaAdicional, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, -1, UsuarioActual.CveEmpresa, Comprobante: $@"{CveLineaAdicional}{fiNuevo.Extension}"))
|
||||
{
|
||||
errorCargaComprobante = true;
|
||||
}
|
||||
objVentas.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (!errorCargaComprobante)
|
||||
{
|
||||
CargaDatos();
|
||||
Anexo.Text = "[]";
|
||||
RegistraScript("$('#ModalComprobante').modal('hide');", "");
|
||||
Alert("Comprbante actualizado correctamente.");
|
||||
}
|
||||
|
||||
UpAddComprobancte.Update();
|
||||
}
|
||||
|
||||
protected void LnkCambiarEstatus_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
|
||||
bool errorCambioEstatus = false;
|
||||
|
||||
ClsVentas objVentas = new ClsVentas();
|
||||
|
||||
if (!objVentas.UpdateLineasAdicionales(CveLineaAdicionalActualzarEstatus, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, 3, UsuarioActual.CveEmpresa))
|
||||
{
|
||||
errorCambioEstatus = true;
|
||||
}
|
||||
|
||||
if (!errorCambioEstatus)
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
objVentas.Dispose();
|
||||
}
|
||||
|
||||
|
||||
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridView gvTemp = GvLineasAdicionales;
|
||||
gvTemp.Columns[8].Visible = false;
|
||||
gvTemp.ExportToExcelx( TipoLinea == 1 ? "RepLienasAdicionales":"RepPO");
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void GvLineasAdicionales_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if(e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if(e.Row.DataKey("CveEstatus").ToEntero().Contiene(2))
|
||||
{
|
||||
e.Row.FCLinkButton("LnkCambiarEstatus").Visible = true;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("CveEstatus").ToEntero() == 3)
|
||||
{
|
||||
e.Row.FCLinkButton("LnkCargarComprobante").Visible = false;
|
||||
}
|
||||
|
||||
if (e.Row.DataKey("Comprobante").Length > 0)
|
||||
{
|
||||
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("Comprobante")}");
|
||||
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
|
||||
|
||||
if (fi.Exists)
|
||||
{
|
||||
LnkDescargaComprobante.Visible = true;
|
||||
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkDescargaComprobante_Click(object sender, EventArgs e)
|
||||
{
|
||||
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||
string Comprobante = GvRow.DataKey("Comprobante");
|
||||
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{Comprobante}");
|
||||
|
||||
if (fi.Exists)
|
||||
{
|
||||
Response.Clear();
|
||||
Response.AddHeader("Content-Disposition", "attachment; filename=" + fi.Name);
|
||||
Response.AddHeader("Content-Length", fi.Length.ToString());
|
||||
Response.ContentType = "text/octet-stream";
|
||||
Response.Flush();
|
||||
Response.TransmitFile(fi.FullName);
|
||||
@@ -16,22 +16,24 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||
</li>
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class='fa fa-signal' ></i> Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||
</asp:Content>
|
||||
@@ -212,7 +214,7 @@
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" OnSelectedIndexChanged="RblTipoCambio_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de Pago" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
|
||||
@@ -27021,7 +27021,7 @@ Partial Class Ventas
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetRemisionesNCCliente(CveCliente, True, CveMoneda:=-1) Then
|
||||
Me.TmpDTRNCDetalle = ObjMovtos.DtResultados.Copy()
|
||||
Me.TmpDTRNCDetalle = ObjMovtos.DtResultados.FiltraParametros("Total > 0")
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user