Merge branch 'master' of http://oirigoyen@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -945,7 +945,7 @@ Public Class ClsBancos
|
||||
|
||||
Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
|
||||
|
||||
If FechaTimbrado = MinFecha Then FechaTimbrado = DateTime.Now
|
||||
|
||||
Dim Serie As String = "Pag"
|
||||
Dim Folio As Integer = -1
|
||||
Dim Retorno As Boolean = False
|
||||
@@ -961,6 +961,33 @@ Public Class ClsBancos
|
||||
'If EsCancelacion Then Estatus = 2
|
||||
If EsRegeneracion Then Estatus = 3
|
||||
|
||||
If FechaTimbrado = MinFecha Then
|
||||
Dim RowFiltro As DataRow = Nothing
|
||||
|
||||
RowFiltro = dttpagos.FiltroPrimero("")
|
||||
|
||||
If RowFiltro IsNot Nothing Then
|
||||
If Now.EsHorarioVerano Then
|
||||
Dim UTCOffsetVerano As Integer = RowFiltro("UTCOffsetVerano").ToString().ToEntero()
|
||||
If UTCOffsetVerano <> 0 Then
|
||||
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetVerano)
|
||||
Else
|
||||
FechaTimbrado = DateTime.Now
|
||||
End If
|
||||
Else
|
||||
Dim UTCOffsetInvierno As Integer = RowFiltro("UTCOffsetInvierno").ToString().ToEntero()
|
||||
If UTCOffsetInvierno <> 0 Then
|
||||
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetInvierno)
|
||||
Else
|
||||
FechaTimbrado = DateTime.Now
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
FechaTimbrado = DateTime.Now
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim tCveComplementoPago As Integer = AddComplementoPago(If(CvePrePoliza > 0, CveIE, dr("CveIE").ToString.ToEntero), -1, Serie, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza, Estatus:=Estatus)
|
||||
If tCveComplementoPago > 0 Then
|
||||
@@ -4089,12 +4116,13 @@ Public Class ClsBancos
|
||||
|
||||
#Region "CONCILIACIÓN BANCARIA"
|
||||
|
||||
Public Function UpdateConciliacionBancaria(CveIE As Integer, FechaAplicado As Date) As Boolean
|
||||
Public Function UpdateConciliacionBancaria(CveIE As Integer, FechaAplicado As Date, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_ConciliacionBancariaUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@FechaAplicado", SqlDbType.Date).Value = FechaAplicado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -4188,12 +4216,13 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DesconciliarIE(CveIE As Integer, FechaDesconciliado As Date) As Boolean
|
||||
Public Function DesconciliarIE(CveIE As Integer, FechaDesconciliado As Date, CveUsuario As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_IEDesconciliar")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@FechaDesconciliado", SqlDbType.Date).Value = FechaDesconciliado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -1758,12 +1758,12 @@ Public Class ClsPaginas
|
||||
End Property
|
||||
Property GlobalDTContratosTipos(CveEmpresa As Integer) As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = String.Format("GlobalDTContratosTipos-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = "GlobalDTContratosTipos"
|
||||
|
||||
'sino existe, recarga los datos
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Dim ObjContratos As New ClsContratos
|
||||
If ObjContratos.GetContratosTipos(CveEmpresa) Then Application(AppNombre) = ObjContratos.DtResultados
|
||||
If ObjContratos.GetContratosTipos(-1) Then Application(AppNombre) = ObjContratos.DtResultados
|
||||
ObjContratos.Dispose()
|
||||
End If
|
||||
|
||||
@@ -1771,7 +1771,7 @@ Public Class ClsPaginas
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTContratosTipos-{0}", CveEmpresa)
|
||||
Dim AppNombre As String = "GlobalDTContratosTipos"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -494,7 +494,7 @@ Public Class ClsProductosServicios
|
||||
If Ex1.Message.Contains("Número: 2627;") Then
|
||||
Alert("El Nuevo Producto o Servicio no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia)
|
||||
ElseIf Ex1.Message.Contains("Número: 2601;") Then
|
||||
Alert("El Nuevo Producto o Servicio tiene Codigo duplicado.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("El Nuevo Producto o Servicio tiene Codigo duplicado:" & Codigo, TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Me.OnError("Ocurrió un error al guardar el nuevo Producto o Servicio.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End If
|
||||
|
||||
@@ -1346,7 +1346,7 @@ Public Class ClsVentas
|
||||
Public Function GetRepVentas(FechaI As Date, FechaF As Date, FechaIEjec As Date, FechaFEjec As Date, CveCliente As Integer, CveSubProyectoEjecucion As Integer,
|
||||
CveVendedor As String, CveUsuario As Integer, CveEstatus As String, IVA As String, CveEmpresa As Integer, Gpo As Integer, Optional TipoDocto As String = "-1",
|
||||
Optional CveProyecto As Integer = -1, Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasGetRep")
|
||||
|
||||
@@ -1373,6 +1373,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1477,7 +1478,7 @@ Public Class ClsVentas
|
||||
Vendedor As String, CveUsuario As Integer, CveEstatus As String, FechaI As Date, FechaF As Date, CveCorte As Integer, TipoDocto As String,
|
||||
CveSubProyectoEjecucion As Integer, CveEmpresa As Integer, FechaIEjec As Date, FechaFEjec As Date, Optional CveProyecto As Integer = -1,
|
||||
Optional CveSubProyecto As String = "-1", Optional TipoCambio As Integer = 1, Optional TCEspecifico As Decimal = -1, Optional CveMoneda As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1) As Boolean
|
||||
Optional CveClienteClasificacion As Integer = -1, Optional CveCondicionesPago As Integer = -1, Optional TipoCliente As Integer = -1, Optional ModalidadContable As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasGetRepDetalle")
|
||||
|
||||
@@ -1509,6 +1510,7 @@ Public Class ClsVentas
|
||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||
.Add("@TipoCliente", SqlDbType.Int).Value = TipoCliente
|
||||
.Add("@ModalidadContable", SqlDbType.Bit).Value = ModalidadContable
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -4707,7 +4707,7 @@ Namespace Modelos
|
||||
|
||||
If CveMovimientoDevolucion > 0 Then
|
||||
For Each Dr As DataRow In DtExistencias.FiltraParametros($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}").Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar."
|
||||
Exit For
|
||||
@@ -4810,7 +4810,7 @@ Namespace Modelos
|
||||
|
||||
|
||||
'REALIZA LA DEVOLUCION AL ALMACEN VIRTUAL
|
||||
If Not GeneraMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowMovimiento("CveMovimiento").ToString().ToEntero(), ObjInventario) Then
|
||||
If Not ErrorCancelar AndAlso Not GeneraMovimientosVirtuales(CveVenta, CveMovimientoDevolucion, RowMovimiento("CveMovimiento").ToString().ToEntero(), ObjInventario) Then
|
||||
ErrorCancelar = True
|
||||
MensajeError = "Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar."
|
||||
End If
|
||||
@@ -4824,6 +4824,10 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
If ErrorCancelar Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'SI EXISTEN HAY EXISTENCIA EN (ENTREGA POR ADELANTADO) SE TIENE QUE REGRESAR AL ALMACEN ORGINAL (GENERAL,SIN COSTO)
|
||||
@@ -4857,6 +4861,10 @@ Namespace Modelos
|
||||
End If
|
||||
Next
|
||||
|
||||
If ErrorCancelar Then
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
@@ -5297,7 +5305,7 @@ Namespace Modelos
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, CveAF:=DrRem("CveActivoFijo").ToString.ToEntero, Serie:=DrRem("Serie").ToString, Lote:=DrRem("Lote").ToString, CveVentaDetalle:=CveVentaDetalleRem, CveMovimientoDetalleEntrada:=DrRem("CveMovimientoDetalle").ToString().ToEntero()) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, CveAF:=DrRem("CveActivoFijo").ToString.ToEntero, Serie:=DrRem("Serie").ToString, Lote:=DrRem("Lote").ToString, CveVentaDetalle:=CveVentaDetalleRem, CveMovimientoDetalleEntrada:=DrRem("CveMovimientoDetalle").ToString().ToEntero(), CveSeccionAlmacen:=-3) Then
|
||||
ErrorCancelar = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -5320,7 +5328,7 @@ Namespace Modelos
|
||||
If Not ErrorCancelar Then
|
||||
If DtEntradaDetalle IsNot Nothing Then
|
||||
For Each Dr As DataRow In DtEntradaDetalle.Rows
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, Serie:=Dr("Serie").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, CveSeccionAlmacen:=-3) Then
|
||||
ErrorCancelar = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -6097,6 +6105,28 @@ Namespace Modelos
|
||||
Public Sub SetCliente()
|
||||
If CveCliente > 0 Then
|
||||
Cliente = New Modelos.ClienteModel(CveCliente, CveEmpresa)
|
||||
If Me.CveClienteSucursal > 0 Then
|
||||
Dim ObjCliente As New ClsClientes()
|
||||
If ObjCliente.GetSucursales(CveCliente, Me.CveClienteSucursal) AndAlso ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
Me.ClienteSucursal = New Modelos.SucursalModel(ObjCliente.DtResultados.Rows(0))
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
Else
|
||||
Me.ClienteSucursal = New Modelos.SucursalModel()
|
||||
Me.ClienteSucursal.NoExt = Cliente.NoExt
|
||||
Me.ClienteSucursal.NoInt = Cliente.NoInt
|
||||
Me.ClienteSucursal.Localidad = Cliente.Localidad
|
||||
Me.ClienteSucursal.Direccion = Cliente.Direccion
|
||||
Me.ClienteSucursal.Colonia = Cliente.Colonia
|
||||
Me.ClienteSucursal.Municipio = Cliente.Localidad
|
||||
Me.ClienteSucursal.Estado = Cliente.Estado
|
||||
Me.ClienteSucursal.CP = Cliente.CP
|
||||
Me.ClienteSucursal.Pais = Cliente.Pais
|
||||
Me.ClienteSucursal.CorreoSucursal = Cliente.CorreoCotizacion
|
||||
Me.ClienteSucursal.TelefonoSucursal = Cliente.Telefono
|
||||
Me.ClienteSucursal.Sucursal = Cliente.Sucursal
|
||||
Me.ClienteSucursal.ImprimeNombreSucursal = Cliente.ImprimeNombreSucursal.ToString()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Public Sub SetMoneda()
|
||||
@@ -9435,7 +9465,8 @@ Namespace Modelos
|
||||
Public Property ClaveSATColonia As String
|
||||
Public Property ClaveSATCP As String
|
||||
Public Property EsDistribuidor As Boolean
|
||||
|
||||
Public Property CorreoCotizacion As String
|
||||
Public Property ImprimeNombreSucursal As Integer
|
||||
End Class
|
||||
|
||||
<Serializable>
|
||||
|
||||
@@ -178,7 +178,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
If Not CBool(Dr("FueConciliado").ToString) And Dr("CveIE").ToString.ToEntero > 0 Then
|
||||
For Each DrE As DataRow In DtDatosEdoCuenta.Rows
|
||||
If ((Dr("FechaDocumento").ToString.ToDate = DrE("FechaDocumento").ToString.ToDate And Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 1) Or (Dr("Importe").ToString.ToDouble = DrE("Importe").ToString.ToDouble And Dr("Tipo").ToString = DrE("Tipo").ToString And DdlCriterio.SelectedValue.ToEntero = 2)) And Not CBool(DrE("Seleccionado").ToString) And Not CBool(DrE("FueConciliado").ToString) And Not CBool(Dr("Seleccionado").ToString) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate)) Or Not ObjBancos.UpdateIEEstadoCuenta(DrE("CveIEEstadoCuenta").ToString.ToEntero, DrE("Importe").ToString.ToDouble, True, Dr("CveIE").ToString.ToEntero,
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Dr("CveIE").ToString.ToEntero, If(Dr("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Dr("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Or Not ObjBancos.UpdateIEEstadoCuenta(DrE("CveIEEstadoCuenta").ToString.ToEntero, DrE("Importe").ToString.ToDouble, True, Dr("CveIE").ToString.ToEntero,
|
||||
DrE("Referencia").ToString, DrE("Tipo").ToString, DrE("FechaDocumento").ToString.ToDate, DrE("CveCuenta").ToString.ToEntero) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
@@ -283,7 +283,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim CveIE As Integer = 0
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
@@ -350,7 +350,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
Selecciono = True
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate)) Then
|
||||
If Not ObjBancos.UpdateConciliacionBancaria(Gvr.DataKey("CveIE").ToEntero, If(Gvr.DataKey("FechaDocumento").ToString.ToDate < txtFechaI.Text.ToDate, TxtFechaAplicado.Text.ToDate, Gvr.DataKey("FechaDocumento").ToString.ToDate), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido conciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
@@ -402,7 +402,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
Dim ErrorTrans As Boolean = False
|
||||
|
||||
If ModalidadDesconciliar = "D" Then
|
||||
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate()) Then
|
||||
If ObjBancos.DesconciliarIE(CveIEDesconciliar, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=CveIEDesconciliar) Then
|
||||
ErrorTrans = True
|
||||
End If
|
||||
@@ -412,7 +412,7 @@ Partial Class Bancos_ConciliacionesBancariasaspx
|
||||
ElseIf ModalidadDesconciliar = "DT" Then
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If Gvr.FCCheckBox("ChkConciliado").Checked And Not Gvr.FCCheckBox("ChkConciliado").Enabled Then
|
||||
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate()) Then
|
||||
If Not ObjBancos.DesconciliarIE(Gvr.DataKey("CveIE").ToEntero, TxtFechaDesconciliado.Text.ToDate(), UsuarioActual.CveUsuario) Then
|
||||
ErrorTrans = True
|
||||
Else
|
||||
If Not ObjOI.AddEventoBitacora("El pago ha sido desconciliado", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveIE:=Gvr.DataKey("CveIE").ToEntero) Then
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvD" runat="server" GridLines="None"
|
||||
DataKeyNames="CobranzaCorreo,CveIE,CveVenta,CveEmpresa,FechaDocumento, PagoAbreviaturaSAT,Folio, ClaveFormaPagoSAT, NumCuenta,Importe, FolioFiscal,VentaSerie,VentaFolio,VentaAbreviaturaSAT, VentaImportePagado,MetodoPago,TipoCambio,NumParcialidad,ImpSaldoInsoluto,ImpSaldoAnterior,RFC,NombreCliente,PorcentajeIVA,PorcentajeIEPS,CuentaBeneficiario,SerieFolioPago,FolioFiscalComplemento,CveComplementoPago"
|
||||
DataKeyNames="CobranzaCorreo,CveIE,CveVenta,CveEmpresa,FechaDocumento, PagoAbreviaturaSAT,Folio, ClaveFormaPagoSAT, NumCuenta,Importe, FolioFiscal,VentaSerie,VentaFolio,VentaAbreviaturaSAT, VentaImportePagado,MetodoPago,TipoCambio,NumParcialidad,ImpSaldoInsoluto,ImpSaldoAnterior,RFC,NombreCliente,PorcentajeIVA,PorcentajeIEPS,CuentaBeneficiario,SerieFolioPago,FolioFiscalComplemento,CveComplementoPago,UTCOffsetVerano,UTCOffsetInvierno"
|
||||
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
|
||||
|
||||
@@ -51,28 +51,44 @@ Partial Class Bancos_RepComplementoPago
|
||||
|
||||
|
||||
For Each gvr As GridViewRow In GvD.Rows
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Dim Banco As New ClsBancos
|
||||
Banco.IniciaTransacSQL()
|
||||
|
||||
|
||||
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual) Then
|
||||
If Banco.Mensaje = "" Then
|
||||
Banco.Commit()
|
||||
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
||||
Str.AppendFormat("Folio: <b>{0}</b> ", Banco.ComplementoSerieFolio)
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML <i class=""fa fa-file""></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF <i class=""fa fa-ad-pdf""></i></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> {2}<br>", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente"))
|
||||
MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo"))
|
||||
End If
|
||||
|
||||
Else
|
||||
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje)
|
||||
Banco.RollBack()
|
||||
If gvr.FCCheckBox("Chk").Checked Then
|
||||
Dim FechaTimbrado As DateTime = DateTime.Now
|
||||
|
||||
Dim UTCOffset As Integer = 0
|
||||
|
||||
If Now.EsHorarioVerano Then
|
||||
If gvr.DataKey("UTCOffsetVerano").ToEntero() <> 0 Then
|
||||
UTCOffset = gvr.DataKey("UTCOffsetVerano").ToEntero()
|
||||
End If
|
||||
Else
|
||||
If gvr.DataKey("UTCOffsetInvierno").ToEntero() <> 0 Then
|
||||
UTCOffset = gvr.DataKey("UTCOffsetInvierno").ToEntero()
|
||||
End If
|
||||
End If
|
||||
|
||||
If UTCOffset <> 0 Then
|
||||
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffset)
|
||||
End If
|
||||
|
||||
Dim Banco As New ClsBancos
|
||||
Banco.IniciaTransacSQL()
|
||||
|
||||
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then
|
||||
If Banco.Mensaje = "" Then
|
||||
Banco.Commit()
|
||||
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
||||
Str.AppendFormat("Folio: <b>{0}</b> ", Banco.ComplementoSerieFolio)
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">XML <i class=""fa fa-file""></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=xml&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a class=""texto"" style='color:#337ab7' href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank"">PDF <i class=""fa fa-ad-pdf""></i></i></i></a> ", Encripta(String.Format("OP=CompP&EXT=pdf&SerieFolio={0}&CveComplementoPago={1}", Banco.ComplementoSerieFolio, Banco.CveComplementoPago)))
|
||||
Str.AppendFormat("<a style='color:#337ab7' target='_blank' href='./IE.aspx?CveIE={0}'>{1}</a> {2}<br>", gvr.DataKey("CveIE"), gvr.DataKey("Folio"), gvr.DataKey("NombreCliente"))
|
||||
MandaCorreo(Banco.ComplementoSerieFolio, gvr.DataKey("CobranzaCorreo"))
|
||||
End If
|
||||
|
||||
Else
|
||||
Str.AppendFormat("No se genero complemento del Folio {0} por el siguiente motivo: {1}", gvr.DataKey("Folio"), Banco.Mensaje)
|
||||
Banco.RollBack()
|
||||
End If
|
||||
|
||||
Banco.Dispose()
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -6,6 +6,8 @@ Imports System.Data
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Xml
|
||||
Imports System.IO
|
||||
Imports iTextSharp.text
|
||||
Imports iTextSharp.text.pdf
|
||||
|
||||
Imports Stimulsoft.Report
|
||||
Imports Stimulsoft.Report.Components
|
||||
@@ -283,6 +285,12 @@ Partial Class PopUpVerFactura
|
||||
End If
|
||||
End If
|
||||
|
||||
If UrlParametros("OP").ToString = "Etiqueta" Then
|
||||
If UrlParametros("CVEMOVIMIENTO") IsNot Nothing AndAlso UrlParametros("CVEMOVIMIENTO").ToString.ToEntero > 0 Then
|
||||
ImprimirEtiqueta(UrlParametros("CVEMOVIMIENTO").ToString.ToEntero, UrlParametros("MODALIDAD").ToString)
|
||||
End If
|
||||
End If
|
||||
|
||||
'IMPRIME OC
|
||||
If UrlParametros("OP").ToString = "OC" Then
|
||||
If UrlParametros("CVEOC") IsNot Nothing AndAlso UrlParametros("CVEOC").ToString.ToEntero > 0 Then
|
||||
@@ -4320,7 +4328,82 @@ Partial Class PopUpVerFactura
|
||||
ImprimirPDF($"Empresas/{UsuarioActual.CveEmpresa}/Formatos/EntregasPorRealizar.rdlc", DtPaqueteriasGuias, RepParams, "Entregas por realizar", "PDF", RDSName:="DsInventarios")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "OP = Etiqueta - Etiquetas de recepcion"
|
||||
Private Sub ImprimirEtiqueta(CveMovimiento As Integer, Modalidad As String)
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
|
||||
Dim All As Byte()
|
||||
Using ms As New MemoryStream
|
||||
Using d As New Document
|
||||
Using Copy As New PdfCopy(d, ms)
|
||||
d.Open()
|
||||
If ObjInventarios.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInventarios.DtResultados IsNot Nothing Then
|
||||
For Each DetalleRow As DataRow In ObjInventarios.DtResultados.Rows
|
||||
Dim CvePS As Integer = DetalleRow.Item("CvePS").ToString.ToEntero
|
||||
Dim Lote As String = DetalleRow.Item("Lote").ToString
|
||||
Dim FechaCaducidad As Date = DetalleRow.Item("FechaCaducidad").ToString.ToDate
|
||||
Dim PS As String = String.Format("{0} - {1}", DetalleRow.Item("Codigo").ToString, DetalleRow.Item("PS").ToString)
|
||||
If Modalidad = "Individual" Then
|
||||
Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
|
||||
|
||||
Dim reader As New PdfReader(reporteByte)
|
||||
Dim Paginas As Integer = reader.NumberOfPages
|
||||
Dim Contador As Integer = 0
|
||||
While Contador < Paginas
|
||||
Contador += 1
|
||||
Copy.AddPage(Copy.GetImportedPage(reader, Contador))
|
||||
End While
|
||||
Else
|
||||
Dim Cant As Integer = DetalleRow.Item("Cantidad").ToString.ToEntero - 1
|
||||
|
||||
For contador As Integer = 0 To Cant
|
||||
Dim reporteByte As Byte() = GenerarEtiqueta(CvePS, Lote, FechaCaducidad, PS)
|
||||
|
||||
Dim reader As New PdfReader(reporteByte)
|
||||
Dim Paginas As Integer = reader.NumberOfPages
|
||||
Dim Cont As Integer = 0
|
||||
While Cont < Paginas
|
||||
Cont += 1
|
||||
Copy.AddPage(Copy.GetImportedPage(reader, Cont))
|
||||
End While
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
d.Close()
|
||||
|
||||
End Using
|
||||
End Using
|
||||
All = ms.ToArray()
|
||||
End Using
|
||||
ImprimirbytesPDF(All, "Etiquetas")
|
||||
|
||||
|
||||
If Modalidad = "Individual" Then
|
||||
Else
|
||||
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
End Sub
|
||||
|
||||
Private Function GenerarEtiqueta(CvePS As Integer, Lote As String, FechaCaducidad As Date, PS As String) As Byte()
|
||||
Dim QrDescarga As String = ""
|
||||
Dim Cfdi As New RVCFDI33.GeneraCFDI()
|
||||
Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString()))
|
||||
QrDescarga = Convert.ToBase64String(b)
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("QR", QrDescarga))
|
||||
params.Add(New ReportParameter("PS", PS))
|
||||
params.Add(New ReportParameter("Lote", Lote))
|
||||
params.Add(New ReportParameter("FechaCad", FechaCaducidad.ToString()))
|
||||
Return StreamPDF("Empresas/Grales/Formatos/EtiquetaDeRecepcion.rdlc", New DataTable, params)
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -34,13 +34,16 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="conditional">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="BtnTerminarTrayeto" OnClick="BtnTerminarTrayeto_Click"><i class="fa fa-map-marker"></i>Terminar Trayecto</asp:LinkButton>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</li>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAgregar" OnClick="LnkAgregar_Click" runat="server"><i class="fa fa-plus"></i>Agregar Gasto</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -488,6 +491,62 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
<div id="DModal" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="ltlMotititulo" Text="Modelo" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFCCantidad" runat="server" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFCCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtCantidad.ClientID.ToString()%>">Cantidad:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrecio" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDescripcion" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVModelo" runat="server" ControlToValidate="TxtDescripcion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripción''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOModelo" runat="server" HighlightCssClass="vco" TargetControlID="RFVModelo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= TxtDescripcion.ClientID.ToString()%>">Descripción:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtObs" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<label for="<%= TxtObs.ClientID.ToString()%>">Observaciones:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row v-center">
|
||||
<label class="col-md-12" style="color: gray">Fecha:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="input-group input-sm date date-picker " data-date-format="dd/mm/yyyy hh:mm">
|
||||
<asp:TextBox ID="TxtFecha" runat="server" CssClass="form-control input-sm ADDateTimePicker" CausesValidation="true" MaxLength="18" Width="132px "></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVFecha" runat="server" ControlToValidate="TxtFecha" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor seleccione uno." ValidationGroup="VgmGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEI" runat="server" HighlightCssClass="vco" TargetControlID="RFVFecha" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardar" OnClick="BtnGuardar_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="VgmGuardar" />
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -226,4 +226,34 @@ Partial Class GPS_TrayectoDetalle
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub LimpiaModal()
|
||||
TxtCantidad.Text = ""
|
||||
TxtPrecio.Text = ""
|
||||
TxtDescripcion.Text = ""
|
||||
TxtObs.Text = ""
|
||||
TxtFecha.Text = ""
|
||||
End Sub
|
||||
Protected Sub LnkAgregar_Click(sender As Object, e As EventArgs)
|
||||
LimpiaModal()
|
||||
'Modalidad = "A"
|
||||
BtnGuardar.Text = "Agregar"
|
||||
ltlMotititulo.Text = "Agregar Gasto"
|
||||
|
||||
UpModal.Update()
|
||||
RegistraScript("$('#DModal').modal()")
|
||||
End Sub
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjPS As New ClsGPS
|
||||
'If Modalidad = "A" Then
|
||||
|
||||
'ElseIf Modalidad = "U" Then
|
||||
' If ObjPS.UpdateGasto(CveGPSGasto, TxtCantidad.Text.ToDecimal(), TxtPrecio.Text.Trim().ToDecimal(), TxtDescripcion.Text.Trim(), TxtObs.Text.Trim(), TxtFecha.Text.ToDateTime(), UsuarioActual.CveUsuario) Then
|
||||
' RegistraScript("$('#DModal').modal('hide')")
|
||||
' Alert("El Gasto se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
' End If
|
||||
'End If
|
||||
If ObjPS.AddGasto(TxtCantidad.Text.ToDecimal(), TxtPrecio.Text.Trim().ToDecimal(), TxtDescripcion.Text.Trim(), TxtObs.Text.Trim(), TxtFecha.Text.ToDateTime(),
|
||||
2, UsuarioActual.CveUsuario, UsuarioActual.CveCliente, CveTrayecto:=Me.CveTrayecto) Then
|
||||
RegistraScript("$('#DModal').modal('hide')")
|
||||
Alert("El Gasto se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
@@ -58,7 +58,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row" style="margin-left: 0px;">
|
||||
<div class="row" >
|
||||
<label class="col-sm-1 truncate" style="text-align: right">Mostrar Lote:</label>
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkMostrarLote" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" runat="server" Text=" " OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
|
||||
</div>
|
||||
<label class="col-sm-1" style="text-align: right">Mostrar Fecha:</label>
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright" >
|
||||
<asp:CheckBox ID="ChkMostrarFecha" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" runat="server" Text=" " OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
|
||||
</div>
|
||||
<label class="col-sm-1" style="text-align: right">Mostrar Sección:</label>
|
||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
||||
<asp:CheckBox ID="ChkMostrarSeccion" Checked="true" CssClass="chksino" Style="margin-top: -2px; background-color: #fff; line-height: 15px" data-size="small" Text=" " runat="server" OnCheckedChanged="ChkMostrarColumnas" AutoPostBack="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,26 +96,26 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkLote" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Nuevo Lote" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox runat="server" ID="TxtLote" Text='<%# Eval("Lote").ToString()%>' CssClass="form-control input-sm" ClientIDMode="Static" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkEditCaducidad" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField HeaderText="Nueva Fecha Cad." ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 113px !important; padding: 0px; margin-bottom: -10px;">
|
||||
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad", "{0:d}").ToString()%>' CssClass="form-control input-sm" ClientIDMode="Static" />
|
||||
<asp:TextBox runat="server" ID="TxtFechaCadNueva" Text='<%# Eval("FechaCaducidad", "{0:d}").ToString()%>' CssClass="form-control input-sm" ClientIDMode="AutoID" />
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="ImgFecha" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
@@ -114,7 +126,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center">
|
||||
<asp:TemplateField ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center" >
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" Checked="false" runat="server" OnCheckedChanged="Chk_Click" AutoPostBack="true"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -533,4 +533,21 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
' row.FCTextBox("TxtCantidad").Text = ExistenciaBackup
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkMostrarColumnas(sender As Object, e As EventArgs)
|
||||
'Mostrar Lote
|
||||
GvD.Columns(7).Visible = ChkMostrarLote.Checked
|
||||
GvD.Columns(8).Visible = ChkMostrarLote.Checked
|
||||
|
||||
'Mostrar Caducidad
|
||||
GvD.Columns(9).Visible = ChkMostrarFecha.Checked
|
||||
GvD.Columns(10).Visible = ChkMostrarFecha.Checked
|
||||
|
||||
'Mostrar Sección
|
||||
GvD.Columns(11).Visible = ChkMostrarSeccion.Checked
|
||||
GvD.Columns(12).Visible = ChkMostrarSeccion.Checked
|
||||
|
||||
UppD.Update()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -2439,7 +2439,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
PU = DtExistencias.FiltroPrimeroValor("PU", $"CvePS = {Dr("CvePS")} AND CveUM = {Dr("CveUM").ToString().ToEntero()}").ToString().ToDecimal
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadPendiente, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), PU, CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=-3) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar.")
|
||||
Exit For
|
||||
|
||||
@@ -978,8 +978,17 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||
End If
|
||||
Else
|
||||
SumarImporteUsados = False
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
|
||||
'VERIFICA LOS QUE TENGAN LAS CLASIFICACION DE USADOS
|
||||
If ObjCompras.GetCompraDetalle(pCveCompra) Then
|
||||
If ObjCompras.DtResultados.COUNT("Cantidad", "CveClasificacion=20519") > 0 Then
|
||||
SumarImporteUsados = True
|
||||
Else
|
||||
SumarImporteUsados = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
CveAlmacenDevolucionProveedor = DtRecepcion.Rows(0)("CveAlmacenDevolucionProveedor").ToString.ToEntero
|
||||
@@ -2886,7 +2895,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim dtt As DataTable = ObjInventario.DtResultados
|
||||
Dim tTotalInsertado As Decimal = dtt.SUMD("TotalOriginal") + ImporteIngresoAdicional
|
||||
If CveTipoCompra = 8 Then 'entrada almacen con costo indirecto cargado en la misma compra
|
||||
tTotalInsertado = dtt.SUMD("Total") ' está incluido el costo indirecto en la factura
|
||||
tTotalInsertado = dtt.SUMD("Total") + ImporteIngresoAdicional ' está incluido el costo indirecto en la factura
|
||||
End If
|
||||
If Math.Round(TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1), 2) <> Math.Round(tTotalInsertado, 2) Then
|
||||
ErrorMovInv = True
|
||||
@@ -3353,6 +3362,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If CveMovimiento > 0 AndAlso CveMovimientoSalidaTraspaso <= 0 Then
|
||||
Msg.AppendFormat("Movimiento Registrado: Folio: <b>{0}</b>", link)
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Movimiento</a> ", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimiento)))
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Etiqueta Individual</a> ", Encripta(String.Format("OP=Etiqueta&CveMovimiento={0}&Modalidad={1}", CveMovimiento, "Individual")))
|
||||
Msg.AppendFormat("<br/><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir Etiqueta Por Caja</a> ", Encripta(String.Format("OP=Etiqueta&CveMovimiento={0}&Modalidad={1}", CveMovimiento, "Caja")))
|
||||
'SI GENERO UN TRASPASO AL ALMACEN DE DEVOLUCION
|
||||
ElseIf CveMovimiento > 0 AndAlso CveMovimientoSalidaTraspaso > 0 Then
|
||||
Msg.AppendFormat("Movimiento de Salida: Folio: <b>{0}</b>", String.Format("<a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimientoSalidaTraspaso, FolioSalidaTraspaso))
|
||||
|
||||
@@ -2866,44 +2866,37 @@ Partial Class ProductosyServicios
|
||||
End Function
|
||||
|
||||
Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, Agregar As Boolean) As Boolean
|
||||
Dim EmpresasFranquicia = ObtenerFranquiciasInt()
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
|
||||
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.SelectedItem.Text)).ToEntero
|
||||
If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
|
||||
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563)
|
||||
Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
|
||||
For Each Franquicia As Integer In EmpresasFranquicia
|
||||
Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", TxtCodigo.Text.Trim)).ToEntero
|
||||
Dim CvePSAdicional As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", DdlPSAdicional.SelectedItem.Text)).ToEntero
|
||||
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
If Agregar Then
|
||||
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
|
||||
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
|
||||
|
||||
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
If CvePSPagina <= 0 Then
|
||||
Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Agregar Then
|
||||
If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
End If
|
||||
Else
|
||||
Dim PSAnterior As String = GlobalDTPS(Franquicia).FiltroPrimeroValor("PS", String.Format("CvePS = '{0}'", CvePSAdicional))
|
||||
Dim CvePSAnterio As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("PS = '{0}'", PSAnterior)).ToEntero
|
||||
|
||||
If Not ObjPS.UpdatePSAdicionales(CvePSPagina, CvePSAdicional, CvePSAnterio, If(TxtCantidadPSAdicional.Visible, TxtCantidadPSAdicional.Text.ToDecimal, 0)) Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function ObtenerFranquiciasInt() As Integer()
|
||||
Dim FranquiciasStr As String = UsuarioActual.Empresa.Funcionalidad(137)
|
||||
Dim Franquicias = FranquiciasStr.Split(","c)
|
||||
Dim ReturnFranquicias(Franquicias.Length) As Integer
|
||||
Dim Contador As Integer = 0
|
||||
For Each Franquicia In Franquicias
|
||||
ReturnFranquicias(Contador) = Franquicia.ToEntero
|
||||
Contador += 1
|
||||
Next
|
||||
Return ReturnFranquicias
|
||||
End Function
|
||||
End Class
|
||||
|
||||
@@ -303,6 +303,12 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Modalidad Contable:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkModalidadContable" runat="server" Checked="false" CssClass="input-sm" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -450,8 +450,8 @@ Partial Class RepVentaDetalle
|
||||
ConfiguraEmpresa()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
|
||||
Dim Fecha = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString
|
||||
Dim IVA = If(Request("IVA") IsNot Nothing, Request("IVA").ToString, "-1").ToString
|
||||
@@ -478,12 +478,15 @@ Partial Class RepVentaDetalle
|
||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha)
|
||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
|
||||
|
||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
||||
Dim ModalidadContable As Boolean = CBool(If(Request("ModalidadContable") IsNot Nothing, Request("ModalidadContable").ToEntero(), 0))
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
||||
If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente,
|
||||
IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF,
|
||||
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
|
||||
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
|
||||
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable) Then
|
||||
DtVentas = AddRows(ObjVentas.DtResultados)
|
||||
ImgImprimir.Enabled = True
|
||||
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
||||
@@ -491,9 +494,11 @@ Partial Class RepVentaDetalle
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
GvVsh.DataSource = Nothing
|
||||
End If
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
|
||||
GvDatos.DataBind()
|
||||
GvVsh.DataBind()
|
||||
End Sub
|
||||
|
||||
@@ -293,8 +293,12 @@
|
||||
<asp:ListItem Text="Venta Mostrador" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Modalidad Contable:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox ID="ChkModalidadContable" runat="server" Checked="false" CssClass="input-sm" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,8 @@ Imports System.IO
|
||||
Imports System.Xml
|
||||
|
||||
Partial Class Ventas_RepVentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "Propiedades"
|
||||
Private Property Opcion As String
|
||||
Get
|
||||
@@ -74,12 +74,12 @@ Partial Class Ventas_RepVentas
|
||||
Set(value As DataTable)
|
||||
ViewState("DtColor") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
TipoCambio = 1
|
||||
@@ -117,11 +117,11 @@ Partial Class Ventas_RepVentas
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region " CARGA COMBOS "
|
||||
|
||||
|
||||
Private Sub CargaGrupo()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Año", "1"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("Mes", "2"))
|
||||
@@ -284,10 +284,10 @@ Partial Class Ventas_RepVentas
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
@@ -321,7 +321,7 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
If ObjVentas.GetRepVentas(FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlSubProyectoEjecucion.SelectedValue.ToEntero, Vendedores,
|
||||
DdlUsuario.SelectedValue.ToEntero, Estatus, "-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, TipoComprobante, DdlProyecto.SelectedValue.ToEntero, Sucursales, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, CveUsuarioConsulta:=UsuarioActual.CveUsuario,
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=ChkModalidadContable.Checked) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
Else
|
||||
@@ -332,12 +332,12 @@ Partial Class Ventas_RepVentas
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||
ObjVentas.Dispose()
|
||||
GvDatos.DataBind()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
|
||||
|
||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaClientes()
|
||||
End Sub
|
||||
@@ -380,10 +380,10 @@ Partial Class Ventas_RepVentas
|
||||
CargaDatos()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " GV DATOS - ROW DATABOUND "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -417,11 +417,60 @@ Partial Class Ventas_RepVentas
|
||||
Else
|
||||
CveSubProyecto = e.Row.DBCampo("CveSubProyecto")
|
||||
CveProyecto = e.Row.DBCampo("CveProyecto")
|
||||
End If
|
||||
|
||||
|
||||
'LIGA A DETALLE
|
||||
Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaI}&FechaF={FechaF}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}"
|
||||
End If
|
||||
|
||||
Dim FechaInicial As String = FechaI
|
||||
Dim FechaFinal As String = FechaF
|
||||
|
||||
If Not e.Row.DBCampo("GPO").Contains("Total") Then
|
||||
Select Case DdlGrupo.SelectedValue.ToEntero()
|
||||
Case 2 ' MES
|
||||
Dim FechaIRef As DateTime = FechaI.ToDateTime()
|
||||
Dim FechaFRef As DateTime = FechaF.ToDateTime()
|
||||
|
||||
Dim Anio As Integer = FechaFRef.Year
|
||||
Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero()
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
|
||||
|
||||
Dim Dia As Integer = FechaFRef.Day
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then
|
||||
Dia = lastDayOfMonth
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then
|
||||
FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy")
|
||||
Case 3 ' AÑO/MES
|
||||
Dim FechaIRef As DateTime = FechaI.ToDateTime()
|
||||
Dim FechaFRef As DateTime = FechaF.ToDateTime()
|
||||
|
||||
Dim Anio As Integer = e.Row.DBCampo("Anio").ToEntero()
|
||||
Dim Mes As Integer = e.Row.DBCampo("Mes").ToEntero()
|
||||
Dim lastDayOfMonth = DateTime.DaysInMonth(Anio, Mes)
|
||||
|
||||
Dim Dia As Integer = FechaFRef.Day
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaFRef.Month Then
|
||||
Dia = lastDayOfMonth
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Mes").ToEntero() <> FechaIRef.Month Then
|
||||
FechaInicial = New DateTime(Anio, Mes, 1).ToString("dd/MM/yyyy")
|
||||
End If
|
||||
|
||||
FechaFinal = New DateTime(Anio, Mes, Dia).ToString("dd/MM/yyyy")
|
||||
Case 4 ' FECHA
|
||||
FechaInicial = e.Row.DBCampo("Fecha").ToDateTime().ToString("dd/MM/yyyy")
|
||||
FechaFinal = e.Row.DBCampo("Fecha").ToDateTime().ToString("dd/MM/yyyy")
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
'LIGA A DETALLE
|
||||
Dim Liga As String = $"/Ventas/RepVentaDetalle.aspx?GPO={DdlGrupo.SelectedValue}&Anio={e.Row.DBCampo("Anio")}&Mes={e.Row.DBCampo("Mes")}&AnioMes={e.Row.DBCampo("AnioMes")}&Fecha={e.Row.DBCampo("Fecha")}&AnioEjec={e.Row.DBCampo("AnioEjec")}&MesEjec={e.Row.DBCampo("MesEjec")}&AnioMesEjec={e.Row.DBCampo("AnioMesEjec")}&FechaEjec={e.Row.DBCampo("FechaEjec")}&CveCliente={e.Row.DBCampo("CveCliente")}&CveVendedor={ e.Row.DBCampo("CveVendedor")}&CveUsuario={e.Row.DBCampo("CveUsuario")}&CveEstatusFactura={e.Row.DBCampo("CveEstatusFactura")}&FechaI={FechaInicial}&FechaF={FechaFinal}&FechaIEjec={FechaIEjec}&FechaFEjec={FechaFEjec}&IVA={e.Row.DBCampo("GPO_IVA")}&CveCorte={ e.Row.DBCampo("CveCorte")}&TipoDocto={ DdlTipoComprobante.GetSelectedValuesM}&CveSubProyectoEjecucion={e.Row.DBCampo("CveSubProyectoEjecucion")}&CveSubProyecto={CveSubProyecto}&CveProyecto={CveProyecto}&TipoCambio={TipoCambio}&TCEspecifico={TCEspecifico}&CveMoneda={CveMoneda}&CveClienteClasificacion={e.Row.DBCampo("CveClienteClasificacion")}&CveCondicionesPago={DdlCondicionesPago.SelectedValue}&TipoCliente={ If(DdlGrupo.SelectedValue.ToEntero = 20, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue)}&ModalidadContable={If(ChkModalidadContable.Checked, 1, 0)}"
|
||||
|
||||
|
||||
e.Row.FCLiteral("LtlGrupo").Text = "<a class=""" & Css & """ href=""" & Liga & """>" & e.Row.FCLiteral("LtlGrupo").Text & "</a>"
|
||||
@@ -434,9 +483,9 @@ Partial Class Ventas_RepVentas
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " PERSONALIZAR "
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs)
|
||||
Personaliza()
|
||||
@@ -519,18 +568,18 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " EXCEL "
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||
'GvDatos.ExportToExcel("ReporteVentas" & Now.ToShortDateString)
|
||||
GenerarPDF("Excel")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PDF"
|
||||
|
||||
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If DtVentas IsNot Nothing Then
|
||||
Dim StrFiltro As New StringBuilder
|
||||
@@ -602,10 +651,10 @@ Partial Class Ventas_RepVentas
|
||||
Response.AppendHeader("Content-Disposition", "attachment; filename=ReporteHP.csv")
|
||||
Response.Write(Str.ToString)
|
||||
Context.Response.End()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "XML-CONFIGURACIÓN"
|
||||
Private Sub XmlConf(CveUsuario As Integer, CveModulo As Integer, Values As String(,))
|
||||
Dim settings As New XmlWriterSettings()
|
||||
@@ -644,11 +693,11 @@ Partial Class Ventas_RepVentas
|
||||
{"SucursalEjecuccion", DdlSubProyectoEjecucion.Text.ToString()},
|
||||
{"Proyecto", DdlProyecto.Text.ToString()}
|
||||
}
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GRAFICA"
|
||||
|
||||
|
||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||
If Not DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
|
||||
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
|
||||
@@ -778,9 +827,9 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CambioGrafica()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -4177,6 +4177,11 @@ Partial Class Ventas
|
||||
DdlTipoAmortizacionAnticipo.SelectedValueExist(DbRowVenta("CveTipoAmortizacionAnticipo"))
|
||||
DdlTiposRelacion.SelectedValueExist(DbRowVenta("CveTipoRelacion"))
|
||||
|
||||
'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar
|
||||
If DbRowVenta("CveTipoAmortizacionAnticipo").ToString().ToEntero() = 3 Then
|
||||
BtnEmitir.Visible = False
|
||||
End If
|
||||
|
||||
'HdnAmortizacion.Value = LblAmort.Text.ToDouble.ToString()
|
||||
'HdnSubTotalDescuestos.Value = (TxtSubTotal.Text.Replace(",", "").ToDouble - LblDescuentos.Text.Replace(",", "").ToDouble - LblAmortizacion.Text.Trim.Replace(",", "").ToDouble - TxtRetISR.Text.Replace(",", "").ToDouble).FormatoNumero(2)
|
||||
'DdlAmortizacionConceptos.SelectedValue = DbRowVenta("AnticipoPosicion").ToString()
|
||||
@@ -5723,6 +5728,15 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Puede hacer pedido
|
||||
If Me.CveVenta <= 0 Then
|
||||
If Not UsuarioActual.TienePermisoProceso(177) Then
|
||||
If DdlTipoComprobante.Items.FindByValue("Pd2") IsNot Nothing Then
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'CUANDO SEA COTIZACION Y SEA COMPUPROVEEDORES (EMPRESA 72) NO DEBE ENVIAR CORREO AL CLIENTE
|
||||
If UsuarioActual.CveEmpresa = 72 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
ChkEnviarFactura.Checked = False
|
||||
@@ -7660,6 +7674,11 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'Si es AMORTIZACIÓN ANTICIPO SOBRE FACTURA EN CERO no debe timbrar
|
||||
If DdlTipoAmortizacionAnticipo.SelectedValue = "3" Then
|
||||
DebeTimbrar = False
|
||||
End If
|
||||
|
||||
If ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso UsuarioActual.Empresa.FacturaProduccion Then
|
||||
|
||||
@@ -11906,8 +11925,6 @@ Partial Class Ventas
|
||||
IdCtaContable = 0
|
||||
CveCuenta = 0
|
||||
CveSubProyectoContabilizar = CveSubProyectoVenta
|
||||
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIVA").ToDecimal
|
||||
|
||||
|
||||
If GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows.Count = 1 Then
|
||||
IdCtaContable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, DrPago("CveCuenta").ToString().ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("IdCtaContable").ToString().ToEntero()
|
||||
@@ -11938,36 +11955,47 @@ Partial Class Ventas
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IVA X TRASLADAR
|
||||
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||
CveCuentaIVAxTrasladar = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVAxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
|
||||
If ObjFactura.IVA <> 0 Then
|
||||
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIVA").ToDecimal
|
||||
|
||||
'IVA X TRASLADAR
|
||||
IdCtaIVAXTrasladar = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar)
|
||||
CveCuentaIVAxTrasladar = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar)
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 13, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 13, Concepto, Fecha, IdCtaIVAXTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVAxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IVA PAGADO
|
||||
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
||||
CveCuentaIVATrasladado = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVATrasladado, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
'IVA PAGADO
|
||||
IdCtaIVATrasladado = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado)
|
||||
CveCuentaIVATrasladado = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado)
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 61, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IVA) / ObjFactura.Total, Referencia, 61, Concepto, Fecha, IdCtaIVATrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IVA) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuentaIVATrasladado, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IEPS X TRASLADAR
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IEPS PAGADO
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSTrasladado, CveSubProyecto:=CveSubProyectoContabilizar) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
If ObjFactura.IEPS <> 0 Then
|
||||
Dim PorcentajeImpuestoPago As Decimal = TmpDT.MAX("PorcentajeIEPS").ToDecimal
|
||||
|
||||
'IEPS X TRASLADAR
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 38, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 38, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSxTrasladar, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSxTrasladar, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
'IEPS PAGADO
|
||||
Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 39, NombreCliente, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString())
|
||||
If ObjFactura.IEPS > 0 AndAlso Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, (importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total, Referencia, 39, Concepto, Fecha, UsuarioActual.Empresa.IdCuentaIEPSTrasladado, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=((importeMovimiento * ObjFactura.IEPS) / ObjFactura.Total) * tipoCambio * Multiplicador, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=UsuarioActual.Empresa.CveCuentaIEPSTrasladado, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuestoPago) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -12125,7 +12153,7 @@ Partial Class Ventas
|
||||
|
||||
If UsuarioActual.Empresa.UsaInventarios AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem", "Dev") Then
|
||||
|
||||
If RemisionesLista.Count > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Egs", "Rem") Then
|
||||
If RemisionesLista.Count > 0 AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
For Each CveRemision As Integer In RemisionesLista
|
||||
'El almacen general es el Primer Almacen de Material en la Sucursal
|
||||
If Not TraspasoAlmacen(ObjInventario, CveRemision, ObjConta, True, 9) Then
|
||||
@@ -12816,7 +12844,7 @@ Partial Class Ventas
|
||||
|
||||
pdf = PdfFactura(ObjFactura)
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
|
||||
OnError("Ocurrió un error al generar el PDF", ex)
|
||||
End Try
|
||||
|
||||
LocalSerieFolio = ObjFactura.SerieFolio
|
||||
@@ -16660,6 +16688,16 @@ Partial Class Ventas
|
||||
LnkRemisiones.Visible = False
|
||||
End If
|
||||
|
||||
'Puede hacer pedido
|
||||
If Me.CveVenta <= 0 Then
|
||||
If Not UsuarioActual.TienePermisoProceso(177) Then
|
||||
If DdlTipoComprobante.Items.FindByValue("Pd2") IsNot Nothing Then
|
||||
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Pd2"))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'[IPP]: FALTA CONFIGURAR Y DAR PERMISO A TODOS LOS QUE TENGAN ACCESO A VENTAS
|
||||
''Puede remisionar
|
||||
'If Not UsuarioActual.TienePermisoProceso(199) Then
|
||||
|
||||
Reference in New Issue
Block a user