Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -212,9 +212,11 @@ Partial Class Acarreos_CatChoferes
|
|||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
HdnID.Value = GvRow.DataKey("CveChofer")
|
HdnID.Value = GvRow.DataKey("CveChofer")
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
If ObjAcar.RemoveChofer(HdnID.Value) Then
|
If ObjAcar.RemoveChofer(HdnID.Value, UsuarioActual.CveEmpresa) Then
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("No se puede eliminar el chofer. verifique que no tenga movimientos registrados.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
ObjAcar.Dispose()
|
ObjAcar.Dispose()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
@@ -312,7 +314,7 @@ Partial Class Acarreos_CatChoferes
|
|||||||
If CPTxt > 0 And CveColonia > 0 Then
|
If CPTxt > 0 And CveColonia > 0 Then
|
||||||
Dim CP As Integer = GlobalDTGralColonias("-1", "-1", "-1", CveColonia:=CveColonia).FiltroPrimeroValor("CP", "").ToEntero
|
Dim CP As Integer = GlobalDTGralColonias("-1", "-1", "-1", CveColonia:=CveColonia).FiltroPrimeroValor("CP", "").ToEntero
|
||||||
If CPTxt <> CP Then
|
If CPTxt <> CP Then
|
||||||
Alert("El código postal selecionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia)
|
Alert("El código postal seleccionado es diferente del codigo postal de la Colonia.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -207,16 +207,17 @@ Public Class ClsAcarreos
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function RemoveChofer(CveChofer As Integer) As Boolean
|
Public Function RemoveChofer(CveChofer As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Acar_ChoferesRemove")
|
DataAdapter("PA_Acar_ChoferesRemove")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
.Add("@CveChofer", SqlDbType.Int).Value = CveChofer
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@vRetorno", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = SqlAdapter.SelectCommand.Parameters("@vRetorno").Value.ToString = "1"
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al eliminar el chofer.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al eliminar el chofer.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -3353,8 +3353,8 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AddFluctuacionesBitacora(IdPoliza As Integer, Fecha As Date, TipoFluctuacion As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
Public Function AddFluctuacionesBitacora(IdPoliza As Integer, Fecha As Date, TipoFluctuacion As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Integer
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Integer = 0
|
||||||
|
|
||||||
DataAdapter("PA_Banc_FluctuacionesBitacoraAdd")
|
DataAdapter("PA_Banc_FluctuacionesBitacoraAdd")
|
||||||
|
|
||||||
@@ -3364,11 +3364,13 @@ Public Class ClsBancos
|
|||||||
.Add("@TipoFluctuacion", SqlDbType.SmallInt).Value = TipoFluctuacion
|
.Add("@TipoFluctuacion", SqlDbType.SmallInt).Value = TipoFluctuacion
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@vCveFluctuacionBitacora", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = SqlAdapter.SelectCommand.Parameters("@vCveFluctuacionBitacora").Value.ToString.ToEntero
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al agregar a la bitacora de Fluctuaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al agregar a la bitacora de Fluctuaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
@@ -3395,6 +3397,52 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza As Integer, TipoFluctuacion As Integer, CveFluctuacionBitacora As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = True
|
||||||
|
|
||||||
|
DataAdapter("PA_Banc_FluctuacionesBitacoraPrePolizaUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePrePoliza", SqlDbType.VarChar).Value = CvePrePoliza
|
||||||
|
.Add("@TipoFluctuacion", SqlDbType.SmallInt).Value = TipoFluctuacion
|
||||||
|
.Add("@CveFluctuacionBitacora", SqlDbType.Int).Value = CveFluctuacionBitacora
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al agregar a la bitacora de Fluctuaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Function FluctuacionesBitacoraPrePolizaRemove(CvePrePoliza As Integer, TipoFluctuacion As Integer, CveFluctuacionBitacora As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = True
|
||||||
|
|
||||||
|
DataAdapter("PA_Banc_FluctuacionesBitacoraPrePolizaRemove")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePrePoliza", SqlDbType.VarChar).Value = CvePrePoliza
|
||||||
|
.Add("@TipoFluctuacion", SqlDbType.SmallInt).Value = TipoFluctuacion
|
||||||
|
.Add("@CveFluctuacionBitacora", SqlDbType.Int).Value = CveFluctuacionBitacora
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al eliminar a la bitacora de Fluctuaciones", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "B A N C O S - T A R J E T A S C R E D I T O S"
|
#Region "B A N C O S - T A R J E T A S C R E D I T O S"
|
||||||
|
|||||||
@@ -6576,14 +6576,17 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
#Region "F L U C T U A C I O N - C A M B I A R I A"
|
#Region "F L U C T U A C I O N - C A M B I A R I A"
|
||||||
Public Function UpdateVentaTCValuacion(CveVenta As Integer, TCValuacion As Decimal) As Boolean
|
Public Function UpdateTCValuacion(CveVenta As Integer, CveCompra As Integer, CveIE As Integer, TCValuacion As Decimal, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno = False
|
Dim Retorno = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_VentasTCValuacionUpdate")
|
DataAdapter("PA_Conta_TipoCambioValuacionUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
|
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||||
.Add("@TCValuacion", SqlDbType.Decimal).Value = TCValuacion
|
.Add("@TCValuacion", SqlDbType.Decimal).Value = TCValuacion
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -6615,6 +6618,7 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
|
Imports System
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
@@ -4111,6 +4112,32 @@ Public Class ClsGenerales
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetMediosTransporte(CveOrigen As Integer, Estatus As Boolean, CveEmpresa As Integer, CveTipoNomina As Integer, CveSubProyecto As Integer, Tipo As Integer, GPO As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Agro_OrigenGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveOrigen", SqlDbType.Int).Value = CveOrigen
|
||||||
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@CveTipoNomina", SqlDbType.Int).Value = CveTipoNomina
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||||
|
.Add("@GPO", SqlDbType.Int).Value = GPO
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError($"Ocurrió un error al obtener los medios de transporte.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1505,7 +1505,7 @@ Public Class ClsMovimientos
|
|||||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
|
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
|
||||||
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha,
|
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = MinFecha, Optional FechaAplicadoF As Date = MaxFecha,
|
||||||
Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha,
|
Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha,
|
||||||
Optional CveCondicionesPago As Integer = -1) As Boolean
|
Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_RepRecuperacion")
|
DataAdapter("PA_Vta_RepRecuperacion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -1530,6 +1530,7 @@ Public Class ClsMovimientos
|
|||||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||||
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||||
|
.Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion
|
||||||
|
|
||||||
.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString
|
.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString
|
||||||
.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString
|
.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString
|
||||||
@@ -1590,7 +1591,8 @@ Public Class ClsMovimientos
|
|||||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
|
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
|
||||||
Optional CveMoneda As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional Tipo As Integer = -1,
|
Optional CveMoneda As Integer = -1, Optional CveClienteClasificacion As Integer = -1, Optional Tipo As Integer = -1,
|
||||||
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing,
|
Optional EsDistribuidor As Integer = -1, Optional FechaAplicadoI As Date = Nothing, Optional FechaAplicadoF As Date = Nothing,
|
||||||
Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha) As Boolean
|
Optional FechaRegistroIEI As Date = MinFecha, Optional FechaRegistroIEF As Date = MaxFecha,
|
||||||
|
Optional CveCondicionesPago As Integer = -1, Optional CveTipoTransaccion As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1620,6 +1622,8 @@ Public Class ClsMovimientos
|
|||||||
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
.Add("@CveClienteClasificacion", SqlDbType.Int).Value = CveClienteClasificacion
|
||||||
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
.Add("@Tipo", SqlDbType.Int).Value = Tipo
|
||||||
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
|
||||||
|
.Add("@CveCondicionesPago", SqlDbType.Int).Value = CveCondicionesPago
|
||||||
|
.Add("@CveTipoTransaccion", SqlDbType.Int).Value = CveTipoTransaccion
|
||||||
|
|
||||||
.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString
|
.Add("@FechaAplicadoI", SqlDbType.Date).Value = FechaAplicadoI.ToShortDateString
|
||||||
.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString
|
.Add("@FechaAplicadoF", SqlDbType.Date).Value = FechaAplicadoF.ToShortDateString
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Public Class Timbrado
|
|||||||
Public Property CancelacionState As Integer
|
Public Property CancelacionState As Integer
|
||||||
Public Property CancelacionMensaje As String
|
Public Property CancelacionMensaje As String
|
||||||
Public Property CancelacionFecha As Date
|
Public Property CancelacionFecha As Date
|
||||||
|
Public Const LigaVerificacionSAT = "https://verificacfdi.facturaelectronica.sat.gob.mx/default.aspx"
|
||||||
|
|
||||||
Public Class AcuseCancelacionSAT
|
Public Class AcuseCancelacionSAT
|
||||||
Public Property CodigoEstatus As String
|
Public Property CodigoEstatus As String
|
||||||
@@ -1956,8 +1956,9 @@ Public Class Timbrado
|
|||||||
If Not IO.Directory.Exists($"{UsuarioActual.Empresa.Ruta}CBB\") Then IO.Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}CBB\")
|
If Not IO.Directory.Exists($"{UsuarioActual.Empresa.Ruta}CBB\") Then IO.Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}CBB\")
|
||||||
|
|
||||||
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
||||||
Dim b As Byte() = cfdi.ConvertirQrCode($"?re={UsuarioActual.Empresa.RFC}&rr={ObjCFDITimbre.Receptor.RFC}&tt={String.Format("{0,12:F6}", ObjCFDITimbre.Comprobante.Total).Trim()}&id={FolioFiscal}")
|
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||||
File.WriteAllBytes(RutaCBB, b)
|
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ObjCFDITimbre.Receptor.RFC, ObjCFDITimbre.Comprobante.Total, FolioFiscal, RutaCBB)
|
||||||
|
CBB = Nothing
|
||||||
|
|
||||||
Retorno = ""
|
Retorno = ""
|
||||||
Else
|
Else
|
||||||
@@ -2342,7 +2343,7 @@ Public Class Timbrado
|
|||||||
cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion)
|
cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion)
|
||||||
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
|
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
|
||||||
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
||||||
cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), concep.DescripEmbalaje, concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
||||||
For Each transp In concep.MercanciasCantidadTransporta
|
For Each transp In concep.MercanciasCantidadTransporta
|
||||||
cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
||||||
Next
|
Next
|
||||||
@@ -2665,8 +2666,9 @@ Public Class Timbrado
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
||||||
Dim b As Byte() = cfdi.QrCode($"?re={UsuarioActual.Empresa.RFC}&rr={ObjCFDITimbre.Receptor.RFC}&tt={String.Format("{0,12:F6}", ObjCFDITimbre.Comprobante.Total).Trim()}&id={FolioFiscal}")
|
Dim bCBB As Byte() = cfdi.QrCode($"{LigaVerificacionSAT}?re={UsuarioActual.Empresa.RFC}&rr={ObjCFDITimbre.Receptor.RFC}&tt={String.Format("{0,12:F6}", ObjCFDITimbre.Comprobante.Total).Trim()}&id={FolioFiscal}&fe=ELleDg==")
|
||||||
File.WriteAllBytes(RutaCBB, b)
|
File.WriteAllBytes(RutaCBB, bCBB)
|
||||||
|
bCBB = Nothing
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al generar el QR", ex)
|
OnError("Ocurrió un error al generar el QR", ex)
|
||||||
End Try
|
End Try
|
||||||
@@ -3268,8 +3270,9 @@ Public Class Timbrado
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
||||||
Dim b As Byte() = cfdi.QrCode($"?re={UsuarioActual.Empresa.RFC}&rr={ObjCFDITimbre.Receptor.RFC}&tt={String.Format("{0,12:F6}", ObjCFDITimbre.Comprobante.Total).Trim()}&id={FolioFiscal}")
|
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
|
||||||
File.WriteAllBytes(RutaCBB, b)
|
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, ObjCFDITimbre.Receptor.RFC, ObjCFDITimbre.Comprobante.Total, FolioFiscal, RutaCBB)
|
||||||
|
CBB = Nothing
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al generar el QR", ex)
|
OnError("Ocurrió un error al generar el QR", ex)
|
||||||
End Try
|
End Try
|
||||||
@@ -3684,7 +3687,7 @@ Public Class Timbrado
|
|||||||
cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion)
|
cfdi.CartaPorteMercancias(Carta.Mercancias.PesoBrutoTotal, Carta.Mercancias.UnidadPeso, Carta.Mercancias.PesoNetoTotal, Carta.Mercancias.NumTotalMercancias, Carta.Mercancias.CargoporTasacion)
|
||||||
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
|
If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then
|
||||||
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
For Each concep As CFDICartaPorteMercancia In Carta.Mercancias.Mercancias
|
||||||
cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), concep.DescripEmbalaje, concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
cfdi.CartaPorteMercancia(concep.BienesTransp, concep.ClaveSTCC, concep.Descripción, concep.Cantidad, concep.ClaveUnidad, concep.Unidad, concep.Dimensiones, concep.MaterialPeligroso, concep.ClaveMaterialPeligroso, If(concep.ClaveMaterialPeligroso <> "", concep.Embalaje, ""), If(concep.ClaveMaterialPeligroso <> "", concep.DescripEmbalaje, ""), concep.PesoenKg, concep.ValorMercancia, concep.Moneda, concep.FraccionArrancelaria, concep.UUIDComercioExt)
|
||||||
For Each transp In concep.MercanciasCantidadTransporta
|
For Each transp In concep.MercanciasCantidadTransporta
|
||||||
cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
cfdi.CartaPorteCantidadTransporta(transp.Cantidad, transp.IDOrigen, transp.IDDestino, transp.CvesTransportes)
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -416,13 +416,19 @@
|
|||||||
comisionNegativa = txtcomision * -1;
|
comisionNegativa = txtcomision * -1;
|
||||||
}
|
}
|
||||||
if (comisionNegativa > saldo) {
|
if (comisionNegativa > saldo) {
|
||||||
$('#C_TxtComision').val(0);
|
|
||||||
comision = 0;
|
//var opcion = confirm("El importe especificado es superior a lo seleccionado, está seguro?");
|
||||||
descuento = 0;
|
//if (opcion != true) {
|
||||||
txtcomision = 0;
|
// debugger;
|
||||||
alert("No es posible poner un importe Faltante/Sobrante superior a lo seleccionado");
|
// $('#C_TxtComision').val(0);
|
||||||
saldo = 0;
|
// comision = 0;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
// descuento = 0;
|
||||||
|
// txtcomision = 0;
|
||||||
|
// //alert("No es posible poner un importe Faltante/Sobrante superior a lo seleccionado");
|
||||||
|
// saldo = 0;
|
||||||
|
// $('#C_lblValorTotal').text(FormatoNumero(ValorTotalSeleccionado, 2));
|
||||||
|
//}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//debugger;
|
//debugger;
|
||||||
@@ -509,14 +515,18 @@
|
|||||||
if (comision2 < 0) {
|
if (comision2 < 0) {
|
||||||
comisionNegativa = comision2 * -1;
|
comisionNegativa = comision2 * -1;
|
||||||
}
|
}
|
||||||
if (comisionNegativa > ValorTotalSeleccionado) {
|
//if (comisionNegativa > ValorTotalSeleccionado) {
|
||||||
$('#C_TxtComision').val(0)
|
// var opcion = confirm("El importe especificado es superior a lo seleccionado, está seguro?");
|
||||||
alert("No es posible poner una comision superior a lo seleccionado")
|
// if (opcion != true) {
|
||||||
} else {
|
// debugger;
|
||||||
|
// $('#C_TxtComision').val(0)
|
||||||
|
// // alert("No es posible poner una comision superior a lo seleccionado")
|
||||||
|
// }
|
||||||
|
//} else {
|
||||||
saldo = ValorTotalSeleccionado + comision2 + descuento - IVA - ComisionIntermediario;
|
saldo = ValorTotalSeleccionado + comision2 + descuento - IVA - ComisionIntermediario;
|
||||||
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
$('#C_lblValorTotal').text(FormatoNumero(saldo, 2));
|
||||||
comision = ToDouble($('#C_TxtComision').val())
|
comision = ToDouble($('#C_TxtComision').val())
|
||||||
}
|
//}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -236,17 +236,21 @@ Partial Class Bancos_DepositosCaja
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
Dim CveTransaccionBanco As Integer = 13
|
||||||
|
|
||||||
|
If TotalImporte < 0 Then 'que es una devolución, entonces como es negativo, se cambia el concetpo de bancos, por condición de trigger
|
||||||
|
CveTransaccionBanco = 6
|
||||||
|
End If
|
||||||
|
|
||||||
'Entrada a bancos
|
'Entrada a bancos
|
||||||
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 13)
|
FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco)
|
||||||
If Not FolioIE > 0 Then
|
If Not FolioIE > 0 Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 13, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
|
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorIntermediario:=CveProveedorIntermediario)
|
||||||
|
|
||||||
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a>     <br/> ", CveIEOrigen, FolioIE)
|
documentos += String.Format("<a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>Depósito: {1}</a>     <br/> ", CveIEOrigen, FolioIE)
|
||||||
|
|
||||||
|
|
||||||
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then
|
If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio) Then
|
||||||
|
|
||||||
If ChkFaltante.Checked Then
|
If ChkFaltante.Checked Then
|
||||||
@@ -257,8 +261,6 @@ Partial Class Bancos_DepositosCaja
|
|||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ChkDescuento.Checked Then
|
If ChkDescuento.Checked Then
|
||||||
@@ -270,12 +272,10 @@ Partial Class Bancos_DepositosCaja
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
If Not OcurrioError Then
|
||||||
For Each Gvr As GridViewRow In GvFacturas.Rows
|
For Each Gvr As GridViewRow In GvFacturas.Rows
|
||||||
|
|
||||||
If Gvr.FCCheckBox("ChkFactura").Checked Then
|
If Gvr.FCCheckBox("ChkFactura").Checked Then
|
||||||
@@ -309,27 +309,25 @@ Partial Class Bancos_DepositosCaja
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
|
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
|
||||||
|
|
||||||
|
|
||||||
documentos += String.Format("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, "Depósito Bancario")
|
documentos += String.Format("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, "Depósito Bancario")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If OcurrioError Then
|
If OcurrioError Then
|
||||||
ObjContabilidad.RollBack()
|
ObjContabilidad.RollBack()
|
||||||
Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError)
|
Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError)
|
||||||
Else
|
Else
|
||||||
ObjContabilidad.Commit()
|
ObjContabilidad.Commit()
|
||||||
CargaDatos()
|
|
||||||
|
|
||||||
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/><br/> ", NuevaCvePrePoliza)
|
documentos += String.Format("<a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Prepóliza</a> <br/><br/> ", NuevaCvePrePoliza)
|
||||||
|
|
||||||
Alert(documentos.ToString)
|
Alert(documentos.ToString)
|
||||||
|
CargaDatos()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
TxtComision.Text = ""
|
TxtComision.Text = ""
|
||||||
|
|||||||
@@ -151,6 +151,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="float: right; margin-right: 10px;">
|
<div style="float: right; margin-right: 10px;">
|
||||||
<asp:Label runat="server" ID="LtlUltimaFluctuacion" Font-Italic="True"></asp:Label>
|
<asp:Label runat="server" ID="LtlUltimaFluctuacion" Font-Italic="True"></asp:Label>
|
||||||
|
<asp:HiddenField ID="HdnCveFluctuacionBitacora" runat="server" />
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -159,7 +160,7 @@
|
|||||||
<asp:UpdatePanel ID="UpTabs" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpTabs" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<ajax:TabContainer runat="server" ID="T">
|
<ajax:TabContainer runat="server" ID="T">
|
||||||
<ajax:TabPanel runat="server" ID="TabCompras" HeaderText="Compras">
|
<ajax:TabPanel runat="server" ID="TabCompras" HeaderText="Proveedores">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UpIndicadores" UpdateMode="Conditional" runat="server" Visible="False">
|
<asp:UpdatePanel ID="UpIndicadores" UpdateMode="Conditional" runat="server" Visible="False">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -223,7 +224,6 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
<div class="col-md-5 form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtConceptoCompras" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control marginFixRow" Width="96%"></asp:TextBox>
|
<asp:TextBox ID="TxtConceptoCompras" Style="text-transform: uppercase;" runat="server" MaxLength="100" CssClass="form-control marginFixRow" Width="96%"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtConceptoCompras" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoCompras"
|
<asp:RequiredFieldValidator ID="RFVTxtConceptoCompras" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtConceptoCompras"
|
||||||
@@ -232,7 +232,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubProyectoCompras" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
<asp:DropDownList ID="DdlSubProyectoCompras" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubProyectoCompras.ClientID.ToString()%>">
|
<label for="<%= DdlSubProyectoCompras.ClientID.ToString()%>">
|
||||||
@@ -241,33 +241,32 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-2" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
|
<asp:Button Text="Generar Proveedores" runat="server" ID="BtnGeneraCompras" OnClick="BtnGeneraCompras_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarCompras" />
|
||||||
</div>
|
<asp:HiddenField ID="HdnProveedorCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnProveedoresRemove" runat="server" Text="Eliminar" OnClick="BtnProveedoresRemove_Click" class="btn btn-primary" /></div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GvCompras" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvCompras" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio,FluctuacionTotal,PerdidaGanancia,IdCtaContComplementaria"
|
DataKeyNames="CveCompra,CveProveedor,TipoCambio, Fluctuacion,SerieFolio, CveConceptoContable,FluctuacionTotal,PerdidaGanancia,IdCtaContComplementaria,CveIE"
|
||||||
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="NombreComercial" Target="_blank" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" DataNavigateUrlFields="CveProveedor" />
|
||||||
<asp:BoundField HeaderText="# Facturas" DataField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField HeaderText="# Facturas" DataTextField="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataNavigateUrlFields="CveCompra"/>
|
||||||
|
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Saldo USD" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="FluctuacionTotal" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Fluctuación Pesos" DataField="FluctuacionTotal" DataFormatString="{0:N2}" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Perdida o Ganancia" DataField="PerdidaGanancia" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Perdida o Ganancia" DataField="PerdidaGanancia" ItemStyle-Width="100" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<%--<asp:Label ID="LblTotalCompras" runat="server" Text=""></asp:Label>--%>
|
<%--<asp:Label ID="LblTotalCompras" runat="server" Text=""></asp:Label>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</ajax:TabPanel>
|
</ajax:TabPanel>
|
||||||
<ajax:TabPanel runat="server" ID="TabVentas" HeaderText="Ventas">
|
<ajax:TabPanel runat="server" ID="TabVentas" HeaderText="Clientes">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:UpdatePanel ID="UpIndicadoresVentas" UpdateMode="Conditional" runat="server" Visible="false">
|
<asp:UpdatePanel ID="UpIndicadoresVentas" UpdateMode="Conditional" runat="server" Visible="false">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
@@ -308,6 +307,7 @@
|
|||||||
<div class="widget-thumb text-uppercase bordered">
|
<div class="widget-thumb text-uppercase bordered">
|
||||||
<h4 class="widget-thumb-heading">
|
<h4 class="widget-thumb-heading">
|
||||||
<asp:Label ID="LblVentasPerdidaGanancia" runat="server" Text=""></asp:Label></h4>
|
<asp:Label ID="LblVentasPerdidaGanancia" runat="server" Text=""></asp:Label></h4>
|
||||||
|
|
||||||
<div class="widget-thumb-wrap">
|
<div class="widget-thumb-wrap">
|
||||||
<i id="IImagenFinalVentas" runat="server" class=""></i>
|
<i id="IImagenFinalVentas" runat="server" class=""></i>
|
||||||
<div class="widget-thumb-body">
|
<div class="widget-thumb-body">
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlsubProyectoVentas" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
<asp:DropDownList ID="DdlsubProyectoVentas" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlsubProyectoVentas.ClientID.ToString()%>">
|
<label for="<%= DdlsubProyectoVentas.ClientID.ToString()%>">
|
||||||
@@ -362,12 +362,13 @@
|
|||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvVentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvVentas" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
DataKeyNames="TipoCambio,Fluctuacion,CveVenta,SerieFolio,CveIE,IdCtaContComplementaria,TipoDocto,CveIE" EmptyDataText="No se Encontraron Cuentas Bancarias."
|
||||||
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
ToolTip="Listado de Cuentas Bancarias" CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:HyperLinkField DataTextField="Nombre" HeaderText="Cliente" Target="_blank" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" />
|
<asp:HyperLinkField DataTextField="Nombre" HeaderText="Cliente" Target="_blank" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" />
|
||||||
<asp:BoundField DataField="SerieFolio" HeaderText="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
<asp:HyperLinkField DataTextField="SerieFolio" HeaderText="SerieFolio" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||||
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||||
|
<asp:BoundField DataField="TipoDocto" HeaderText="Tipo" />
|
||||||
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="TipoCambio" HeaderText="TipoCambio" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField DataField="Diferencia" HeaderText="Diferencia TC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N4}" />
|
<asp:BoundField DataField="Diferencia" HeaderText="Diferencia TC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N4}" />
|
||||||
@@ -393,7 +394,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubproyectoBancos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
<asp:DropDownList ID="DdlSubproyectoBancos" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubproyectoBancos.ClientID.ToString()%>">
|
<label for="<%= DdlSubproyectoBancos.ClientID.ToString()%>">
|
||||||
@@ -453,7 +454,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubProyectoDeudores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
<asp:DropDownList ID="DdlSubProyectoDeudores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubProyectoDeudores.ClientID.ToString()%>">
|
<label for="<%= DdlSubProyectoDeudores.ClientID.ToString()%>">
|
||||||
@@ -504,7 +505,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubProyectoAcreedores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
<asp:DropDownList ID="DdlSubProyectoAcreedores" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubProyectoAcreedores.ClientID.ToString()%>">
|
<label for="<%= DdlSubProyectoAcreedores.ClientID.ToString()%>">
|
||||||
@@ -513,9 +514,6 @@
|
|||||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoAcreedores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreedores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlSubProyectoAcreedores" runat="server" CssClass="help-block errorimput" InitialValue="-1" ControlToValidate="DdlSubProyectoAcreedores" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GrpGuardarAcreedores"></asp:RequiredFieldValidator>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
|
<asp:Button Text="Generar Acreedores" runat="server" ID="BtnGeneraAcreedores" OnClick="BtnGeneraAcreedores_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarAcreedores" />
|
||||||
</div>
|
</div>
|
||||||
@@ -524,7 +522,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<asp:GridView ID="GvAcreedores" Width="99%" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvAcreedores" Width="99%" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio"
|
DataKeyNames="CveCompra,CveProveedor,Fluctuacion,SerieFolio,IdCtaContComplementaria,CveIE"
|
||||||
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
EmptyDataText="No se Encontraron compras pendientes de pagar." ToolTip="Listado de Compras"
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
CssClass="table table-hover table-striped ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -553,7 +551,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1 form-group form-md-line-input input-iconright">
|
<div class="col-md-2 form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList ID="DdlSubProyectoFiliales" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
<asp:DropDownList ID="DdlSubProyectoFiliales" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me js-referencia-programmatic marginFixRow" Width="90%">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<label for="<%= DdlSubProyectoFiliales.ClientID.ToString()%>">
|
<label for="<%= DdlSubProyectoFiliales.ClientID.ToString()%>">
|
||||||
|
|||||||
@@ -131,6 +131,10 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion")
|
Dim GanaciaAux As Double = Ganancias.SUM("Fluctuacion")
|
||||||
|
|
||||||
Dim Final As Double = GanaciaAux - PerdidaAux
|
Dim Final As Double = GanaciaAux - PerdidaAux
|
||||||
|
HdnProveedorCvePrePoliza.Value = ObjBancos.DtResultados.MAX("CvePrePoliza").ToString
|
||||||
|
HdnCveFluctuacionBitacora.Value = ObjBancos.DtResultados.MAX("CveFluctuacionBitacora").ToString
|
||||||
|
BtnProveedoresRemove.Visible = HdnProveedorCvePrePoliza.Value.ToEntero > 0
|
||||||
|
BtnGeneraCompras.Visible = Not HdnProveedorCvePrePoliza.Value.ToEntero > 0
|
||||||
|
|
||||||
IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
IImagenResultado.Attributes("class") = If(Final > 0, "widget-thumb-icon bg-green-jungle fa fa-usd", "widget-thumb-icon bg-red fa fa-usd")
|
||||||
|
|
||||||
@@ -281,7 +285,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
Dim Total As Decimal = 0
|
Dim Total As Decimal = 0
|
||||||
Dim Conta As New ClsContabilidad
|
Dim Conta As New ClsContabilidad
|
||||||
Conta.IniciaTransacSQL()
|
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoCompras.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoCompras.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim idCta As Integer = 0
|
Dim idCta As Integer = 0
|
||||||
@@ -318,30 +322,38 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveBitacora <= 0 Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ErrorRegistrar Then
|
||||||
'saco las cuentas de pérdida y ganancia
|
'saco las cuentas de pérdida y ganancia
|
||||||
For Each gvr As GridViewRow In GvCompras.Rows
|
For Each gvr As GridViewRow In GvCompras.Rows
|
||||||
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
'si es pérdida o ganancia
|
'si es pérdida o ganancia
|
||||||
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString.ToEntero()
|
||||||
|
|
||||||
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
|
||||||
'movimiento de complementaria
|
'movimiento de complementaria
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 201, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), gvr.DataKey("CveConceptoContable").ToEntero, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Conta.UpdateCompraTCValuacion(gvr.DataKey("CveCompra").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
If Not Conta.UpdateTCValuacion(-1, gvr.DataKey("CveCompra").ToEntero, gvr.DataKey("CveIE").ToEntero, TCUltimaFluctuacion, UsuarioActual.CveEmpresa) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
End If
|
End If
|
||||||
@@ -393,13 +405,18 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Conta As New ClsContabilidad
|
Dim Conta As New ClsContabilidad
|
||||||
Conta.IniciaTransacSQL()
|
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoVentas.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoVentas.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 3, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveBitacora <= 0 Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
Dim CveConconceptoCliente As Integer = 203
|
Dim CveConconceptoCliente As Integer = 203
|
||||||
|
|
||||||
'saco las cuentas de pérdida y ganancia
|
'saco las cuentas de pérdida y ganancia
|
||||||
@@ -408,24 +425,30 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
||||||
|
|
||||||
If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then
|
If (gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0) OrElse (gvr.DataKey("CveVenta").ToEntero > 0 AndAlso gvr.DataKey("TipoDocto") = "Ant") Then
|
||||||
CveConconceptoCliente = 226
|
CveConconceptoCliente = 226
|
||||||
Else
|
Else
|
||||||
CveConconceptoCliente = 203
|
CveConconceptoCliente = 203
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Conta.UpdateVentaTCValuacion(gvr.DataKey("CveVenta").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
'movimiento de complementaria
|
||||||
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'movimiento de complementaria
|
If Not Conta.UpdateTCValuacion(gvr.DataKey("CveVenta").ToEntero, -1, gvr.DataKey("CveIE").ToEntero, TCUltimaFluctuacion, UsuarioActual.CveEmpresa) Then
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then
|
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
@@ -705,7 +728,7 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
Dim Total As Decimal = 0
|
Dim Total As Decimal = 0
|
||||||
Dim Conta As New ClsContabilidad
|
Dim Conta As New ClsContabilidad
|
||||||
Conta.IniciaTransacSQL()
|
Dim Banco As New ClsBancos(Conta.IniciaTransacSQL())
|
||||||
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, FechaUltimoDiaMes, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
Dim idCta As Integer = 0
|
Dim idCta As Integer = 0
|
||||||
Dim CveCuenta As Integer = 0
|
Dim CveCuenta As Integer = 0
|
||||||
@@ -736,24 +759,40 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
idCta = idCtaPerdida
|
idCta = idCtaPerdida
|
||||||
TipoMovto = False
|
TipoMovto = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim TCUltimaFluctuacion As Decimal = GlobalTipoCambio(FechaUltimoDiaMes).ToDecimal()
|
||||||
|
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Acreedores", CveConceptoContable, "Fluctuación Acreedores", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlSubProyectoAcreedores.SelectedValue.ToEntero) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim CveBitacora As Integer = Banco.AddFluctuacionesBitacora(-1, FechaUltimoDiaMes, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
If CveBitacora <= 0 Then
|
||||||
|
ErrorRegistrar = True
|
||||||
|
End If
|
||||||
|
|
||||||
'saco las cuentas de pérdida y ganancia
|
'saco las cuentas de pérdida y ganancia
|
||||||
For Each gvr As GridViewRow In GvAcreedores.Rows
|
For Each gvr As GridViewRow In GvAcreedores.Rows
|
||||||
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
Total = gvr.DataKey("Fluctuacion").ToDecimal
|
||||||
'si es pérdida o ganancia
|
'si es pérdida o ganancia
|
||||||
|
IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero()
|
||||||
|
|
||||||
'movimiento de complementaria
|
'movimiento de complementaria
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria) Then
|
||||||
ErrorRegistrar = True
|
ErrorRegistrar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'If Not Conta.UpdateCompraTCValuacion(gvr.DataKey("CveCompra").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
||||||
|
' ErrorRegistrar = True
|
||||||
|
' Exit For
|
||||||
|
'End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorRegistrar Then
|
If Not ErrorRegistrar Then
|
||||||
Conta.Commit()
|
Conta.Commit()
|
||||||
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={0}'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
|
||||||
@@ -761,160 +800,11 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Conta.RollBack()
|
Conta.RollBack()
|
||||||
End If
|
End If
|
||||||
Conta.Dispose()
|
Conta.Dispose()
|
||||||
|
Banco.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "FLUCTUACION GENERAL"
|
|
||||||
|
|
||||||
' Protected Sub BtnGenerar_Click(sender As Object, e As EventArgs)
|
|
||||||
' Dim AcumuladoGananciaCompras = 0.0, AcumuladoPerdidaCompras = 0.0, AcumuladoGananciaBancos = 0.0, AcumuladoPerdidaBancos = 0.0
|
|
||||||
' Dim IDPoliza = -1
|
|
||||||
|
|
||||||
' 'Valida datos de Compras
|
|
||||||
' For Each gvr As GridViewRow In GvCompras.Rows
|
|
||||||
' If gvr.DataKey("SinTipoCambio").ToString.ToEntero > 0 AndAlso Not gvr.DataKey("IdCtaAfectable").ToString.ToEntero > 0 Then
|
|
||||||
' Alert("No se puede Generar la Fluctuación ya que faltan datos en Compras")
|
|
||||||
' 'Exit Sub
|
|
||||||
' Else
|
|
||||||
' If gvr.DataKey("IdCtaAfectable").ToString.ToEntero > 0 Then
|
|
||||||
' If gvr.DataKey("Fluctuacion").ToString.ToDouble > 0 Then
|
|
||||||
' AcumuladoGananciaCompras += gvr.DataKey("Fluctuacion").ToString.ToDouble
|
|
||||||
' Else
|
|
||||||
' AcumuladoPerdidaCompras += gvr.DataKey("Fluctuacion").ToString.ToDouble * -1
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' 'Valida datos de Bancos
|
|
||||||
' For Each gvr As GridViewRow In GvCuentas.Rows
|
|
||||||
' If Not gvr.DataKey("TipoCambio").ToString.ToEntero > 0 AndAlso Not gvr.DataKey("IdCtaAfectable").ToString.ToEntero > 0 Then
|
|
||||||
' Alert("No se puede Generar la Fluctuación ya que faltan datos en Cuentas Bancarias")
|
|
||||||
' 'Exit Sub
|
|
||||||
' Else
|
|
||||||
' If gvr.DataKey("IdCtaAfectable").ToString.ToEntero > 0 Then
|
|
||||||
' If gvr.DataKey("Fluctuacion").ToString.ToDouble > 0 Then
|
|
||||||
' AcumuladoGananciaBancos += gvr.DataKey("Fluctuacion").ToString.ToDouble
|
|
||||||
' Else
|
|
||||||
' AcumuladoPerdidaBancos += gvr.DataKey("Fluctuacion").ToString.ToDouble * -1
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
|
|
||||||
' ObjConta.IniciaTransacSQL()
|
|
||||||
' Dim ObjBancos As New ClsBancos
|
|
||||||
' ObjBancos.IniciaTransacSQL()
|
|
||||||
' Dim ErrorGenerar = False
|
|
||||||
' Dim Fecha As Date = TxtFecha.Text.ToDate
|
|
||||||
|
|
||||||
' IDPoliza = ObjConta.AddPoliza(3, "Fluctuación Cambiaria", (AcumuladoGananciaCompras + AcumuladoPerdidaCompras) * 2, (AcumuladoGananciaCompras + AcumuladoPerdidaCompras) * 2, UsuarioActual.CveUsuario, Fecha)
|
|
||||||
|
|
||||||
' If IDPoliza > 0 Then
|
|
||||||
|
|
||||||
' 'COMIENZA: AGREGA CUENTAS BANCARIAS
|
|
||||||
' If AcumuladoGananciaBancos > 0 Or AcumuladoPerdidaBancos > 0 Then
|
|
||||||
' 'Agrega movimientos
|
|
||||||
' Dim Fluc As Double
|
|
||||||
' For Each gvr As GridViewRow In GvCuentas.Rows
|
|
||||||
' Fluc = gvr.DataKey("Fluctuacion").ToString.ToDouble
|
|
||||||
' If Math.Abs(Fluc) > 0 AndAlso gvr.DataKey("IdCtaAfectable").ToString.ToEntero > 0 Then
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, gvr.DataKey("IdCtaAfectable").ToString.ToEntero, Not Fluc > 0, Math.Abs(Fluc), "", String.Format("{0} Cambiaria de Cuentas Bancarias", If(Fluc > 0, "Ganancia", "Perdida")), 0, Fecha, "") Then
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' 'Agrega acumulados
|
|
||||||
' If Not ErrorGenerar AndAlso AcumuladoGananciaBancos > 0 Then
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, 2195, AcumuladoGananciaBancos > 0, AcumuladoGananciaBancos, "", "Acumulado Ganancia Cambiaria de Cuentas Bancarias", 0, Fecha, "") Then
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' If Not ErrorGenerar AndAlso AcumuladoPerdidaBancos > 0 Then
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, 4695, AcumuladoPerdidaBancos > 0, AcumuladoPerdidaBancos, "", "Acumulado Pérdida Cambiaria de Cuentas Bancarias", 0, Fecha, "") Then
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
' 'TERMINA: AGREGA CUENTAS BANCARIAS
|
|
||||||
|
|
||||||
|
|
||||||
' 'COMIENZA: AGREGA COMPRAS
|
|
||||||
' If AcumuladoGananciaCompras > 0 Or AcumuladoPerdidaCompras > 0 Then
|
|
||||||
' 'Agrega movimientos
|
|
||||||
' Dim Fluc As Double
|
|
||||||
' For Each gvr As GridViewRow In GvCompras.Rows
|
|
||||||
' Fluc = gvr.DataKey("Fluctuacion").ToString.ToDouble
|
|
||||||
' If Math.Abs(Fluc) > 0 AndAlso gvr.DataKey("IdCtaAfectable").ToString.ToEntero > 0 Then
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, gvr.DataKey("IdCtaAfectable").ToString.ToEntero, Not Fluc > 0, Math.Abs(Fluc), "", String.Format("{0} Cambiaria de Compras", If(Fluc > 0, "Ganancia", "Pérdida")), 0, Fecha, "") Then
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' Exit For
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Next
|
|
||||||
|
|
||||||
' 'Agrega acumulados
|
|
||||||
' If Not ErrorGenerar AndAlso AcumuladoGananciaCompras > 0 Then
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, UsuarioActual.Empresa.IdCuentaGananciaCambiaria, Not AcumuladoGananciaCompras > 0, AcumuladoGananciaCompras, "", "Acumulado Ganancia Cambiaria de Compras", 0, Fecha, "") Then
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' If Not ErrorGenerar AndAlso AcumuladoPerdidaCompras > 0 Then
|
|
||||||
' If Not ObjConta.AddMovimiento(IDPoliza, UsuarioActual.Empresa.IdCuentaPerdidaCambiaria, Not AcumuladoPerdidaCompras > 0, AcumuladoPerdidaCompras, "", "Acumulado Pérdida Cambiaria de Compras", 0, Fecha, "") Then
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
' 'TERMINA: AGREGA COMPRAS
|
|
||||||
|
|
||||||
|
|
||||||
' Else
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
' 'Agrega en Bitacoras
|
|
||||||
' If Not ErrorGenerar Then
|
|
||||||
' If ObjBancos.AddFluctuacionesBitacora(IDPoliza, Fecha, 1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
|
||||||
' If Not ObjBancos.AddFluctuacionesBitacora(IDPoliza, Fecha, 2, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
' Else
|
|
||||||
' ErrorGenerar = True
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
|
|
||||||
' If Not ErrorGenerar Then
|
|
||||||
|
|
||||||
' ObjConta.AjustaPoliza(IDPoliza)
|
|
||||||
|
|
||||||
' ObjConta.Commit()
|
|
||||||
' ObjBancos.Commit()
|
|
||||||
' Alert(String.Format("Fluctuación realizada con exito.<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IDPoliza))
|
|
||||||
' Else
|
|
||||||
' ObjConta.RollBack()
|
|
||||||
' ObjBancos.RollBack()
|
|
||||||
' Alert("Ocurrio un error al generar la poliza", TipoMensaje.MsgAdvertencia)
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' ObjConta.Dispose()
|
|
||||||
' ObjBancos.Dispose()
|
|
||||||
' End Sub
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region "GRIDVIEWS"
|
#Region "GRIDVIEWS"
|
||||||
|
|
||||||
Protected Sub GvCompras_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCompras.RowDataBound
|
Protected Sub GvCompras_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCompras.RowDataBound
|
||||||
@@ -981,4 +871,17 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnProveedoresRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.FluctuacionesBitacoraPrePolizaRemove(HdnProveedorCvePrePoliza.Value.ToEntero, 1, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
Banco.Commit()
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
Else
|
||||||
|
Banco.RollBack()
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -4606,7 +4606,7 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ErrorCancelarComplemento Then
|
If CveMotivoCancelacion > 0 AndAlso CveSATMotivoCancelacion > 0 Then
|
||||||
|
|
||||||
Dim ObjCancelacion As New Timbrado
|
Dim ObjCancelacion As New Timbrado
|
||||||
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
If EstatusSATCancelado(FolioFiscalCancelar, UsuarioActual.Empresa.RFC, RFCReceptorCancelar) Then
|
||||||
@@ -4621,7 +4621,7 @@ Partial Class Bancos_IE
|
|||||||
Else
|
Else
|
||||||
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
If ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, FolioFiscalCancelar, 0, RFCReceptorCancelar, UsuarioActual.Empresa.RFC, CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||||
|
|
||||||
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then
|
If Banc.UpdateComplementoPago(CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then
|
||||||
CargaComplementosPago()
|
CargaComplementosPago()
|
||||||
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
RegistraScript("$('#ModalCancelarComplemetno').modal('hide');")
|
||||||
ErrorCancelarComplemento = False
|
ErrorCancelarComplemento = False
|
||||||
|
|||||||
Binary file not shown.
@@ -2194,6 +2194,9 @@ Partial Class Compras_Compras
|
|||||||
DdlRetISRConcepto.Items.Clear()
|
DdlRetISRConcepto.Items.Clear()
|
||||||
DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1"))
|
DdlRetISRConcepto.Items.Insert(0, New ListItem("Honorarios", "1"))
|
||||||
DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2"))
|
DdlRetISRConcepto.Items.Insert(1, New ListItem("Arrendamiento", "2"))
|
||||||
|
If UsuarioActual.CveEmpresa = 119 Then
|
||||||
|
DdlRetISRConcepto.Items.Insert(1, New ListItem("Resico", "3"))
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -6315,7 +6318,10 @@ Partial Class Compras_Compras
|
|||||||
funcionalidad = 318
|
funcionalidad = 318
|
||||||
ConceptoContable = 244
|
ConceptoContable = 244
|
||||||
ConceptoContableContra = 243
|
ConceptoContableContra = 243
|
||||||
|
ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then
|
||||||
|
funcionalidad = 348
|
||||||
|
ConceptoContable = 328
|
||||||
|
ConceptoContableContra = 327
|
||||||
End If
|
End If
|
||||||
|
|
||||||
importeMovimiento = importeRetISRAcreditable
|
importeMovimiento = importeRetISRAcreditable
|
||||||
@@ -6352,7 +6358,9 @@ Partial Class Compras_Compras
|
|||||||
ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
|
ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 2 Then
|
||||||
funcionalidad = 317
|
funcionalidad = 317
|
||||||
ConceptoContable = 243
|
ConceptoContable = 243
|
||||||
|
ElseIf DdlRetISRConcepto.SelectedValue.ToEntero = 3 Then
|
||||||
|
funcionalidad = 348
|
||||||
|
ConceptoContable = 327
|
||||||
End If
|
End If
|
||||||
importeMovimiento = importeRetISRxAcreditar
|
importeMovimiento = importeRetISRxAcreditar
|
||||||
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
importeMN = Math.Round(importeMovimiento, 2) * tipoCambioActual * Multiplicador
|
||||||
|
|||||||
@@ -431,7 +431,7 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
Dim bcode As New BarcodeLib.Barcode()
|
Dim bcode As New BarcodeLib.Barcode()
|
||||||
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 50, 10)
|
Dim img = bcode.Encode(BarcodeLib.TYPE.CODE128, String.Format("{0}", noPallet), 500, 100)
|
||||||
Dim barcodebyte As Byte()
|
Dim barcodebyte As Byte()
|
||||||
Using ms = New MemoryStream()
|
Using ms = New MemoryStream()
|
||||||
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
img.Save(ms, System.Drawing.Imaging.ImageFormat.Png)
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -8,23 +8,34 @@
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.AdsCHeader .GvNominas th:nth-child(1),
|
.GvNominas th:nth-child(1),
|
||||||
.AdsCHeader .GvNominas td:nth-child(1) {
|
.GvNominas td:nth-child(1) {
|
||||||
|
width:1px;
|
||||||
|
font-size:0px;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
.ADSContainer .GvNominas th:nth-child(1),
|
||||||
|
.ADSContainer .GvNominas td:nth-child(1) {
|
||||||
|
/* display:none;*/
|
||||||
|
visibility:hidden;
|
||||||
|
}
|
||||||
|
.AdsCHeader .GvNominas th:nth-child(2),
|
||||||
|
.AdsCHeader .GvNominas td:nth-child(2) {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.AdsCHeader .GvNominas th:nth-child(2),
|
.AdsCHeader .GvNominas th:nth-child(3),
|
||||||
.AdsCHeader .GvNominas td:nth-child(2) {
|
.AdsCHeader .GvNominas td:nth-child(3) {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.GvNominas td:nth-child(n+3) {
|
.GvNominas td:nth-child(n+4) {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.GvNominas td:nth-child(n+3) div {
|
.GvNominas td:nth-child(n+4) div {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -138,8 +149,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<asp:GridView ID="GvNominas" runat="server" OnRowDataBound="GvNominas_RowDataBound" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas"
|
<asp:GridView ID="GvNominas" runat="server" OnRowDataBound="GvNominas_RowDataBound" OnRowCreated="GvNominas_RowCreated" CssClass="table table-striped table-advance table-hover mysmallbtn ScrollAD Widthall GvNominas"
|
||||||
Style="text-align: center;" GridLines="None" data-cols="2" data-rows="1" data-heighterror="360" ShowHeaderWhenEmpty="true" ShowHeader="true">
|
Style="text-align: center;" GridLines="None" data-cols="3" data-rows="1" data-heighterror="360" ShowHeaderWhenEmpty="true" ShowHeader="true"
|
||||||
|
DataKeyNames="CvePersonal,CveSubProyecto">
|
||||||
<Columns></Columns>
|
<Columns></Columns>
|
||||||
|
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|||||||
@@ -23,13 +23,18 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
|
||||||
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
|
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros("CveEmpresa = " + UsuarioActual.CveEmpresa);
|
||||||
DdlTurno.DataBind();
|
DdlTurno.DataBind();
|
||||||
|
|
||||||
CargaTiposPeriodo();
|
CargaTiposPeriodo();
|
||||||
TxtRpdFechaInicio.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
|
TxtRpdFechaInicio.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
|
||||||
TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
|
TxtRpdFechaFin.Text = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
|
||||||
|
|
||||||
|
if (UsuarioActual.CveEmpresa == 119)
|
||||||
|
{
|
||||||
|
TxtRpdFechaInicio.Text = string.Format("{1}{0:/MM/yyyy}", DateTime.Now,(DateTime.Now.Day>15?"16":"01"));
|
||||||
|
DdlTipoVista.SelectedValue = "2";
|
||||||
|
}
|
||||||
DdlTipoAsistencias.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa));
|
DdlTipoAsistencias.DataSource = GlobalDTAsistenciasInasistencias.FiltraParametros(string.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa));
|
||||||
DdlTipoAsistencias.DataBind();
|
DdlTipoAsistencias.DataBind();
|
||||||
|
|
||||||
@@ -68,6 +73,9 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
|||||||
DateTime FechaI = TxtRpdFechaInicio.Text.ToDateTime();
|
DateTime FechaI = TxtRpdFechaInicio.Text.ToDateTime();
|
||||||
DateTime FechaF = TxtRpdFechaFin.Text.ToDateTime().AddDays(1);
|
DateTime FechaF = TxtRpdFechaFin.Text.ToDateTime().AddDays(1);
|
||||||
DataTable dtCon = new DataTable();
|
DataTable dtCon = new DataTable();
|
||||||
|
dtCon.Columns.Add(new DataColumn("CvePersonal", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("CveSubProyecto", typeof(int)));
|
||||||
|
dtCon.Columns.Add(new DataColumn("SubProyecto", typeof(string)));
|
||||||
dtCon.Columns.Add(new DataColumn("Codigo", typeof(string)));
|
dtCon.Columns.Add(new DataColumn("Codigo", typeof(string)));
|
||||||
dtCon.Columns.Add(new DataColumn("Empleado", typeof(string)));
|
dtCon.Columns.Add(new DataColumn("Empleado", typeof(string)));
|
||||||
string strasis = "<i class='fa fa-check-square' style=\"color:green;\"></i>";
|
string strasis = "<i class='fa fa-check-square' style=\"color:green;\"></i>";
|
||||||
@@ -94,13 +102,28 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
|||||||
}
|
}
|
||||||
using (ClsNominas objnom = new ClsNominas())
|
using (ClsNominas objnom = new ClsNominas())
|
||||||
{
|
{
|
||||||
|
int CveSubProyecto = -1;
|
||||||
if (objnom.GetchecadorAsistencia(FechaI, FechaF, UsuarioActual.CveEmpresa))
|
if (objnom.GetchecadorAsistencia(FechaI, FechaF, UsuarioActual.CveEmpresa))
|
||||||
{
|
{
|
||||||
DataTable dtASis = objnom.DTSetResultados.Tables[0];
|
DataTable dtASis = objnom.DTSetResultados.Tables[0];
|
||||||
dtper = objnom.DTSetResultados.Tables[1];
|
dtper = objnom.DTSetResultados.Tables[1];
|
||||||
foreach (DataRow item in dtper.Rows)
|
foreach (DataRow item in dtper.Rows)
|
||||||
{
|
{
|
||||||
|
if (CveSubProyecto != item["CveSubProyecto"].ToString().ToEntero())
|
||||||
|
{
|
||||||
|
CveSubProyecto = item["CveSubProyecto"].ToString().ToEntero();
|
||||||
|
|
||||||
|
DataRow drowsub = dtCon.NewRow();
|
||||||
|
drowsub["CveSubProyecto"] = item["CveSubProyecto"];
|
||||||
|
drowsub["SubProyecto"] = item["SubProyecto"];
|
||||||
|
drowsub["Empleado"] = item["SubProyecto"];
|
||||||
|
dtCon.Rows.Add(drowsub);
|
||||||
|
}
|
||||||
|
|
||||||
DataRow drow = dtCon.NewRow();
|
DataRow drow = dtCon.NewRow();
|
||||||
|
drow["CveSubProyecto"] = item["CveSubProyecto"];
|
||||||
|
drow["SubProyecto"] = item["SubProyecto"];
|
||||||
|
drow["CvePersonal"] = item["CvePersonal"];
|
||||||
drow["Codigo"] = item["Codigo"];
|
drow["Codigo"] = item["Codigo"];
|
||||||
drow["Empleado"] = item["NombreCompleto"];
|
drow["Empleado"] = item["NombreCompleto"];
|
||||||
CFecha = FechaI;
|
CFecha = FechaI;
|
||||||
@@ -247,6 +270,12 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
|||||||
DataTable dtCon = generateTable();
|
DataTable dtCon = generateTable();
|
||||||
GvNominas.DataSource = dtCon;
|
GvNominas.DataSource = dtCon;
|
||||||
GvNominas.DataBind();
|
GvNominas.DataBind();
|
||||||
|
if (GvNominas.Columns.Count > 2)
|
||||||
|
{
|
||||||
|
GvNominas.Columns[0].Visible = false;
|
||||||
|
GvNominas.Columns[1].Visible = false;
|
||||||
|
GvNominas.Columns[2].Visible = false;
|
||||||
|
}
|
||||||
DateTime fechai = TxtRpdFechaInicio.Text.ToDateTime();
|
DateTime fechai = TxtRpdFechaInicio.Text.ToDateTime();
|
||||||
DateTime fechaf = TxtRpdFechaFin.Text.ToDateTime().AddDays(1);
|
DateTime fechaf = TxtRpdFechaFin.Text.ToDateTime().AddDays(1);
|
||||||
using (ClsGenerales ObjGral = new ClsGenerales())
|
using (ClsGenerales ObjGral = new ClsGenerales())
|
||||||
@@ -275,11 +304,22 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
|||||||
UpDatos.Update();
|
UpDatos.Update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void GvNominas_RowCreated(object sender, GridViewRowEventArgs e)
|
||||||
|
{
|
||||||
|
e.Row.Cells[0].Visible = false;
|
||||||
|
e.Row.Cells[1].Visible = false;
|
||||||
|
//e.Row.Cells[2].Visible = false;
|
||||||
|
|
||||||
|
}
|
||||||
protected void GvNominas_RowDataBound(object sender, GridViewRowEventArgs e)
|
protected void GvNominas_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||||
{
|
{
|
||||||
|
if (e.Row.DataKey("CvePersonal").ToEntero() <= 0)
|
||||||
|
{
|
||||||
|
e.Row.CssClass = "Totales";
|
||||||
|
}
|
||||||
for (int j = 0; j < e.Row.Cells.Count; j++)
|
for (int j = 0; j < e.Row.Cells.Count; j++)
|
||||||
{
|
{
|
||||||
string encoded = e.Row.Cells[j].Text;
|
string encoded = e.Row.Cells[j].Text;
|
||||||
@@ -537,6 +577,29 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
|||||||
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
|
||||||
var libro = wb.AddWorksheet(dtCon, "Asistencia");
|
var libro = wb.AddWorksheet(dtCon, "Asistencia");
|
||||||
|
|
||||||
|
var myCustomStyle = ClosedXML.Excel.XLWorkbook.DefaultStyle;
|
||||||
|
myCustomStyle.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(155, 187, 89));
|
||||||
|
//155,187,89
|
||||||
|
myCustomStyle.Font.SetBold(true);
|
||||||
|
myCustomStyle.Font.SetFontSize(14);
|
||||||
|
myCustomStyle.Font.FontColor = ClosedXML.Excel.XLColor.White;
|
||||||
|
int cfila = 2;
|
||||||
|
foreach (DataRow drow in dtCon.Rows)
|
||||||
|
{
|
||||||
|
if (drow["CvePersonal"].ToString().ToEntero() > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
libro.Range(cfila,1, cfila, dtCon.Columns.Count).Style = myCustomStyle;
|
||||||
|
}
|
||||||
|
cfila++;
|
||||||
|
}
|
||||||
|
libro.Column(1).Delete();
|
||||||
|
libro.Column(1).Delete();
|
||||||
|
libro.Column(1).Delete();
|
||||||
|
|
||||||
//string strinicio;
|
//string strinicio;
|
||||||
//string strfin;
|
//string strfin;
|
||||||
//ClosedXML.Excel.IXLFontBase fini;
|
//ClosedXML.Excel.IXLFontBase fini;
|
||||||
@@ -604,4 +667,5 @@ public partial class Nomina_ChecadorAsistencia : ClsPaginas
|
|||||||
Response.BinaryWrite(memoryStream.ToArray());
|
Response.BinaryWrite(memoryStream.ToArray());
|
||||||
Response.End();
|
Response.End();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1141,7 +1141,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
<asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true"
|
||||||
|
DataTextField="Nombre" DataValueField="CveOrigen" ValidationGroup="GrpGuardar">
|
||||||
|
</asp:DropDownList>
|
||||||
|
<%-- <asp:DropDownList Width="100%" ID="DdlMedioTransporte" CssClass="form-control input-sm select2me" runat="server" DataTextField="MedioTransporte" DataValueField="CveMedioTransporte" ValidationGroup="GrpGuardar">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Value="1" Text="Hermosillo"></asp:ListItem>
|
<asp:ListItem Value="1" Text="Hermosillo"></asp:ListItem>
|
||||||
<asp:ListItem Value="2" Text="Taxi-1"></asp:ListItem>
|
<asp:ListItem Value="2" Text="Taxi-1"></asp:ListItem>
|
||||||
@@ -1151,7 +1154,7 @@
|
|||||||
<asp:ListItem Value="7" Text="Taxi-5"></asp:ListItem>
|
<asp:ListItem Value="7" Text="Taxi-5"></asp:ListItem>
|
||||||
<asp:ListItem Value="6" Text="Taxi-6"></asp:ListItem>
|
<asp:ListItem Value="6" Text="Taxi-6"></asp:ListItem>
|
||||||
<asp:ListItem Value="8" Text="Costa"></asp:ListItem>
|
<asp:ListItem Value="8" Text="Costa"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>--%>
|
||||||
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
<asp:Label AssociatedControlID="DdlMedioTransporte" runat="server" Text="Medio transporte:"></asp:Label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ Partial Class RH_CatPersonal
|
|||||||
CargaJornada()
|
CargaJornada()
|
||||||
CargaEstados()
|
CargaEstados()
|
||||||
CargaSatRiesgoPuesto()
|
CargaSatRiesgoPuesto()
|
||||||
|
CargaMedioTransporte()
|
||||||
LoadDefaultValues()
|
LoadDefaultValues()
|
||||||
|
|
||||||
|
|
||||||
@@ -288,6 +288,18 @@ Partial Class RH_CatPersonal
|
|||||||
'End If
|
'End If
|
||||||
UpSubProyecto.Update()
|
UpSubProyecto.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub CargaMedioTransporte()
|
||||||
|
Dim objgenerales As New ClsGenerales()
|
||||||
|
objgenerales.GetMediosTransporte(-1, True, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||||
|
DdlMedioTransporte.Items.Clear()
|
||||||
|
DdlMedioTransporte.DataSource = objgenerales.DtResultados
|
||||||
|
DdlMedioTransporte.DataBind()
|
||||||
|
'filtro por usuario subproyecto/sucursal vsh
|
||||||
|
'If UsuarioActual.CveEmpresa = 7 Then
|
||||||
|
' DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1).FiltraParametros($"CveSubProyecto = { UsuarioActual.CveSubProyecto }")
|
||||||
|
'End If
|
||||||
|
'UpSubProyecto.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaTipoCentroCosto()
|
Private Sub CargaTipoCentroCosto()
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron metas registradas" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center; width: 100%" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron metas registradas" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style=" width: 100%" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCMesAño" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesAño" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCMesAño" runat="server" HighlightCssClass="vco" TargetControlID="RFVMesAño" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Meta Cantidad">
|
<asp:TemplateField HeaderText="Meta" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlMetaCantidad" runat="server" Text='<%# Eval("MetaCantidad", "{0}") %>'></asp:Literal>
|
<asp:Literal ID="LtlMetaCantidad" runat="server" Text='<%# Eval("MetaCantidad", "{0}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -132,9 +132,9 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCMetaCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVMetaCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCMetaCantidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVMetaCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Meta Importe">
|
<asp:TemplateField HeaderText="$ Meta" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlMetaImporte" runat="server" Text='<%# Eval("MetaImporte", "{0}") %>'></asp:Literal>
|
<asp:Literal ID="LtlMetaImporte" runat="server" Text='<%# Eval("MetaImporte", "{0:N2}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:TextBox ID="TxtMetaImporte" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("MetaImporte") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
<asp:TextBox ID="TxtMetaImporte" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("MetaImporte") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ Partial Class CatMetasVendedores
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
txtMesAnio.Text = Now.FirstDayOfMonth.ToShortDateString
|
||||||
CargaDatosModal()
|
CargaDatosModal()
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
@@ -87,7 +88,7 @@ Partial Class CatMetasVendedores
|
|||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If BtnAgregarMetaVendedor.Text = "Agregar" Then
|
If BtnAgregarMetaVendedor.Text = "Agregar" Then
|
||||||
If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero,
|
If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero,
|
||||||
TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacionSup.SelectedValue.ToEntero) Then
|
TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacionSup.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("Se agregó la meta al vendedor")
|
Alert("Se agregó la meta al vendedor")
|
||||||
Else
|
Else
|
||||||
Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError)
|
Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError)
|
||||||
@@ -280,18 +281,21 @@ Partial Class CatMetasVendedores
|
|||||||
Dim RowsCargados As Integer = 0
|
Dim RowsCargados As Integer = 0
|
||||||
Dim RowsNoCargados As Integer = 0
|
Dim RowsNoCargados As Integer = 0
|
||||||
Dim ObjMetas As New ClsVentas
|
Dim ObjMetas As New ClsVentas
|
||||||
'ObjPS.IniciaTransacSQL()
|
Dim Correcto As Boolean = True
|
||||||
|
ObjMetas.IniciaTransacSQL()
|
||||||
Try
|
Try
|
||||||
Dim DtVendedores As DataTable = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
Dim DtVendedores As DataTable = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||||
Dim DtClasificaciones As DataTable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
Dim DtClasificaciones As DataTable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
Dim DtClasificaciones2 As DataTable = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa)
|
Dim DtClasificaciones2 As DataTable = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
For Each row As DataRow In dt.Rows
|
For Each row As DataRow In dt.Rows
|
||||||
Dim Correcto As Boolean = False
|
|
||||||
|
If Correcto Then
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
Dim CveVendedor As Integer = DtVendedores.FiltroPrimeroValor("CveVendedor", String.Format("Vendedor LIKE '%{0}%'", row("Vendedor").ToString().TrimStart().TrimEnd())).ToEntero
|
Dim CveVendedor As Integer = DtVendedores.FiltroPrimeroValor("CveVendedor", String.Format("trim(Vendedor) LIKE '%{0}%'", row("Vendedor").ToString().TrimStart().TrimEnd())).ToEntero
|
||||||
Dim CveClasificacion As Integer = DtClasificaciones.FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion='{0}'", row("Clasificación Superior").ToString().TrimStart().TrimEnd())).ToEntero
|
Dim CveClasificacion As Integer = DtClasificaciones.FiltroPrimeroValor("CveClasificacion", String.Format("trim(Clasificacion)='{0}'", row("Clasificación Superior").ToString().TrimStart().TrimEnd())).ToEntero
|
||||||
Dim CveClasificacion2 As Integer = DtClasificaciones2.FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion='{0}'", row("Clasificación").ToString().TrimStart().TrimEnd())).ToEntero
|
Dim CveClasificacion2 As Integer = DtClasificaciones2.FiltroPrimeroValor("CveClasificacion", String.Format("trim(Clasificacion)='{0}'", row("Clasificación").ToString().TrimStart().TrimEnd())).ToEntero
|
||||||
Dim CveMarca As Integer = DtMarcas.FiltroPrimeroValor("CveMarca", String.Format("Marca='{0}'", row("Marca").ToString().TrimStart().TrimEnd())).ToEntero
|
Dim CveMarca As Integer = DtMarcas.FiltroPrimeroValor("CveMarca", String.Format("Marca='{0}'", row("Marca").ToString().TrimStart().TrimEnd())).ToEntero
|
||||||
|
|
||||||
Dim Mes As Decimal = row("Mes").ToString().ToDecimal()
|
Dim Mes As Decimal = row("Mes").ToString().ToDecimal()
|
||||||
@@ -301,7 +305,7 @@ Partial Class CatMetasVendedores
|
|||||||
|
|
||||||
Dim FechaRef As New DateTime(Anio, Mes, 1)
|
Dim FechaRef As New DateTime(Anio, Mes, 1)
|
||||||
If CveVendedor > 0 AndAlso CveVendedor > 0 AndAlso CveClasificacion > 0 AndAlso CveClasificacion2 > 0 AndAlso CveMarca > 0 Then
|
If CveVendedor > 0 AndAlso CveVendedor > 0 AndAlso CveClasificacion > 0 AndAlso CveClasificacion2 > 0 AndAlso CveMarca > 0 Then
|
||||||
Correcto = ObjMetas.AddMetasVendedores(CveVendedor, FechaRef, CveMarca, Cantidad, Importe, CveClasificacion2, CveClasificacion)
|
Correcto = ObjMetas.AddMetasVendedores(CveVendedor, FechaRef, CveMarca, Cantidad, Importe, CveClasificacion2, CveClasificacion, UsuarioActual.CveEmpresa)
|
||||||
If Correcto Then
|
If Correcto Then
|
||||||
RowsCargados += 1
|
RowsCargados += 1
|
||||||
End If
|
End If
|
||||||
@@ -310,13 +314,16 @@ Partial Class CatMetasVendedores
|
|||||||
If Not Correcto Then
|
If Not Correcto Then
|
||||||
RowsNoCargados += 1
|
RowsNoCargados += 1
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al cargar los precios.", ex)
|
OnError("Ocurrió un error al cargar los precios.", ex)
|
||||||
Finally
|
Finally
|
||||||
ObjMarcas.Dispose()
|
|
||||||
|
|
||||||
Dim MensajeFinal As New StringBuilder()
|
Dim MensajeFinal As New StringBuilder()
|
||||||
|
|
||||||
|
If Correcto Then
|
||||||
|
ObjMetas.Commit()
|
||||||
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
|
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
|
||||||
MensajeFinal.Append("Las metas se cargaron correctamente. <br/><br/>")
|
MensajeFinal.Append("Las metas se cargaron correctamente. <br/><br/>")
|
||||||
End If
|
End If
|
||||||
@@ -328,56 +335,20 @@ Partial Class CatMetasVendedores
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Alert(MensajeFinal.ToString())
|
Alert(MensajeFinal.ToString())
|
||||||
|
Else
|
||||||
|
ObjMetas.RollBack()
|
||||||
|
If RowsNoCargados > 0 Then
|
||||||
|
MensajeFinal.Append("No se pudieron actualizar <b>" & RowsNoCargados & "</b> metas. <br/>")
|
||||||
|
End If
|
||||||
|
Alert(MensajeFinal.ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
|
||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
|
||||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
|
||||||
|
|
||||||
Dim unnamed As Integer = 0
|
|
||||||
Dim cols As Integer
|
|
||||||
Dim columns As String()
|
|
||||||
Dim curRow As Integer = 0
|
|
||||||
Dim curCol As Integer = 0
|
|
||||||
Dim dataTable As DataTable = New DataTable()
|
|
||||||
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
|
||||||
|
|
||||||
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
|
||||||
|
|
||||||
If firstRowHasHeaders Then
|
|
||||||
|
|
||||||
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
|
||||||
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString())
|
|
||||||
Else
|
|
||||||
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
|
||||||
End If
|
|
||||||
|
|
||||||
curRow = 1
|
|
||||||
Else
|
|
||||||
dataTable.Columns.Add("Column " & (cols + 1))
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
While curRow < worksheet.Rows.Count
|
|
||||||
columns = New String(cols - 1) {}
|
|
||||||
|
|
||||||
For curCol = 0 To cols - 1
|
|
||||||
|
|
||||||
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then
|
|
||||||
columns(curCol) = ""
|
|
||||||
Else
|
|
||||||
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString()
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
dataTable.Rows.Add(columns)
|
|
||||||
curRow += 1
|
|
||||||
End While
|
|
||||||
|
|
||||||
Return dataTable
|
|
||||||
End Function
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -187,11 +187,18 @@
|
|||||||
<asp:TextBox ID="TxtTotal" runat="server" CssClass="form-control input-sm" Visible="false" MaxLength="12" Width="140px" placeholder="Total" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
<asp:TextBox ID="TxtTotal" runat="server" CssClass="form-control input-sm" Visible="false" MaxLength="12" Width="140px" placeholder="Total" Enabled="false" ClientIDMode="Static" Style="text-align: right;"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row" runat="server" id="rowComisiones">
|
<div class="row">
|
||||||
<label class="col-md-2" runat="server" id="lblpagocomisiones">Otros Ingresos:</label>
|
<div class="col-md-2" runat="server" id="rowComisiones1">Otros Ingresos:</div>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3" runat="server" id="rowComisiones2">
|
||||||
<asp:CheckBox ID="ChkAjusteOI" runat="server" AutoPostBack="true" />
|
<asp:CheckBox ID="ChkAjusteOI" runat="server" AutoPostBack="true" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-2" runat="server" id="DvLiquidacion1" visible="false">Liquidación:</div>
|
||||||
|
<div class="col-md-3" runat="server" id="DvLiquidacion2" visible="false">
|
||||||
|
<asp:CheckBox ID="ChkLiquidacion" OnCheckedChanged="ChkLiquidacion_CheckedChanged" runat="server" AutoPostBack="true" />
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
||||||
@@ -264,6 +271,8 @@
|
|||||||
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion,Descuento,ClaveMetodoPagoSAT"
|
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion,Descuento,ClaveMetodoPagoSAT"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
|
<%--0--%>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
|
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
|
||||||
@@ -272,58 +281,84 @@
|
|||||||
<asp:CheckBox ID="Chk" CssClass="chkgv" runat="server"></asp:CheckBox>
|
<asp:CheckBox ID="Chk" CssClass="chkgv" runat="server"></asp:CheckBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--1--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
<HeaderTemplate>Venta</HeaderTemplate>
|
<HeaderTemplate>Venta</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
|
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Tipo Docto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
<%--2--%>
|
||||||
<%--<asp:HyperLinkField DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" DataTextField="SerieFolio" HeaderText="Factura" ControlStyle-CssClass="Texto" />--%>
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate>Fecha Venta</HeaderTemplate>
|
<HeaderTemplate>Tipo<br> Docto</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTipoDocto" runat="server" Text='<%# Eval("TipoDocto") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--3--%>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>Fecha<br> Venta</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--4--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate>Fecha Vencimiento</HeaderTemplate>
|
<HeaderTemplate>Fecha <br> Vencimiento</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFechaVenci" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
<asp:Literal ID="LtlFechaVenci" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--5--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate>Días Vencidos</HeaderTemplate>
|
<HeaderTemplate>Días<br> Vencidos</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
<asp:Literal ID="LtlDiasVencido" runat="server" Text='<%# Eval("DiasVencidos", "{0}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Método de Pago" DataField="ClaveMetodoPagoSAT" ItemStyle-HorizontalAlign="Left" />
|
<%--6--%>
|
||||||
<asp:BoundField HeaderText="Forma de Pago" DataField="FormaPago" ItemStyle-HorizontalAlign="Left" />
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
|
<HeaderTemplate>Método<br> de Pago</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlMetodoPago" runat="server" Text='<%# Eval("ClaveMetodoPagoSAT", "{0}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--7--%>
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||||
|
<HeaderTemplate>Forma<br> de Pago</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFormaPago" runat="server" Text='<%# Eval("FormaPago", "{0}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--8--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||||
<HeaderTemplate>Monto Compra</HeaderTemplate>
|
<HeaderTemplate>Monto <br> Compra</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--9--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate></HeaderTemplate>
|
<HeaderTemplate></HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>
|
<asp:HyperLink ID="LtlMoneda" runat="server" Text='<%# Eval("TMoneda", "{0}") %>' Style="text-decoration: none" Enabled="false" ForeColor="#333333"></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--10--%>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Abonado</HeaderTemplate>
|
<HeaderTemplate>Abonado</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlAbonado" runat="server" Text='<%# Eval("Abonado", "{0:N2}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--11--%>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--12--%>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate>Abonar</HeaderTemplate>
|
<HeaderTemplate>Abonar</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -331,6 +366,7 @@
|
|||||||
<asp:RangeValidator ID="RVAbonar" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%# Eval("Saldo", "{0:N2}") %>' ErrorMessage="*" ControlToValidate="TxtAbonar" Display="Dynamic"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVAbonar" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue='<%# Eval("Saldo", "{0:N2}") %>' ErrorMessage="*" ControlToValidate="TxtAbonar" Display="Dynamic"></asp:RangeValidator>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--13--%>
|
||||||
<asp:TemplateField Visible="false">
|
<asp:TemplateField Visible="false">
|
||||||
<HeaderTemplate>Ot. Ing.</HeaderTemplate>
|
<HeaderTemplate>Ot. Ing.</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -338,33 +374,96 @@
|
|||||||
<asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator>
|
<asp:RangeValidator ID="RVComision" runat="server" Enabled="false" ErrorMessage="*" ControlToValidate="TxtComision" Display="Dynamic" Type="Double"></asp:RangeValidator>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--14--%>
|
||||||
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField Visible="false" ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate>Descuento Pronto Pago</HeaderTemplate>
|
<HeaderTemplate>Descuento<br>Pronto Pago</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlDescuentoProntoPago" runat="server" Text='<%# Eval("DescuentoProntoPago", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlDescuentoProntoPago" runat="server" Text='<%# Eval("DescuentoProntoPago", "{0:N2}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Generar NC" Visible="false" >
|
<%--15--%>
|
||||||
|
<asp:TemplateField Visible="false" >
|
||||||
|
<HeaderTemplate>Generar<br> NC</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false" Enabled="false"></asp:CheckBox>
|
<asp:CheckBox ID="ChkGenerarNC" CssClass="chkgv" runat="server" Visible="false" Enabled="false"></asp:CheckBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
<%--16--%>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>Col. 1</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLiquidacionCol1" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--17--%>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>Col. 2</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLiquidacionCol2" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--18--%>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>Col. 3</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLiquidacionCol3" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--19--%>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>Col. 4</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLiquidacionCol4" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--20--%>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>Col. 5</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLiquidacionCol5" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--21--%>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>Col. 6</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLiquidacionCol6" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--22--%>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>Col. 7</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLiquidacionCol7" Width="50px" runat="server" Style="text-align: right;" ></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<%--23--%>
|
||||||
|
<asp:TemplateField Visible="false">
|
||||||
|
<HeaderTemplate>Total<br>Liquidación</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:TextBox ID="TxtLiquidacionCol8" Width="50px" runat="server" Style="text-align: right;" onkeypress="return disablekeys();"></asp:TextBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<%--24--%>
|
||||||
<asp:TemplateField ItemStyle-Width="300px">
|
<asp:TemplateField ItemStyle-Width="300px">
|
||||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAux" runat="server"></asp:Literal>
|
<asp:Literal ID="LtlAux" runat="server"></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--25--%>
|
||||||
<asp:TemplateField Visible="False">
|
<asp:TemplateField Visible="False">
|
||||||
<HeaderTemplate>CveVenta</HeaderTemplate>
|
<HeaderTemplate>CveVenta</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:HyperLink ID="HplF2" CssClass="btn-success" Text='<%# Eval("CveVenta")%>' runat="server"></asp:HyperLink>
|
<asp:HyperLink ID="HplF2" CssClass="btn-success" Text='<%# Eval("CveVenta")%>' runat="server"></asp:HyperLink>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<%--26--%>
|
||||||
|
|
||||||
<asp:TemplateField >
|
<asp:TemplateField >
|
||||||
<HeaderTemplate>Complemento Pago</HeaderTemplate>
|
<HeaderTemplate>Complemento<br> Pago</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal>
|
<asp:Literal runat="server" ID="LtlComplemento" Text="<i class='fa fa-check text-success ' aria-hidden='true'></i>" ></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -508,7 +607,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var Ventas = '';
|
var Ventas = '';
|
||||||
|
|
||||||
function FnSuma(t, txt, importe) {
|
function FnSuma(t, txt, importe, CveVenta) {
|
||||||
|
|
||||||
var chkPesosBancos = $get("ChkPagarPesos");
|
var chkPesosBancos = $get("ChkPagarPesos");
|
||||||
var chkDolaresBancos = $get("ChkPagarDolares");
|
var chkDolaresBancos = $get("ChkPagarDolares");
|
||||||
@@ -518,6 +617,14 @@
|
|||||||
txt.value = FormatoNumero(importe, 2);
|
txt.value = FormatoNumero(importe, 2);
|
||||||
} else {
|
} else {
|
||||||
txt.value = "";
|
txt.value = "";
|
||||||
|
|
||||||
|
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
|
||||||
|
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
|
||||||
|
|
||||||
|
$(ClsSelLiquidacionVenta).val('');
|
||||||
|
$(ClsSelLiquidacionVentaTotal).val('');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//if (typeof t2 === "undefined") {
|
//if (typeof t2 === "undefined") {
|
||||||
|
|
||||||
@@ -548,6 +655,8 @@
|
|||||||
var facDolares = false;
|
var facDolares = false;
|
||||||
var div = document.getElementById("DivTC")
|
var div = document.getElementById("DivTC")
|
||||||
|
|
||||||
|
let totalLiquidacion = 0.0;
|
||||||
|
|
||||||
if ($get('TxtTC') != null) {
|
if ($get('TxtTC') != null) {
|
||||||
tc = ToDouble($get('TxtTC').value);
|
tc = ToDouble($get('TxtTC').value);
|
||||||
}
|
}
|
||||||
@@ -602,6 +711,22 @@
|
|||||||
}
|
}
|
||||||
$get('TxtObservaciones').value = $get('HdnObs').value + ' Ventas: ' + Ventas;
|
$get('TxtObservaciones').value = $get('HdnObs').value + ' Ventas: ' + Ventas;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$(".ClsSelLiquidacion").each(function () {
|
||||||
|
|
||||||
|
let valorString = $(this).val();
|
||||||
|
valorString = valorString.replace(/,/g, '');
|
||||||
|
|
||||||
|
if (valorString.trim().length > 0) {
|
||||||
|
totalLiquidacion = totalLiquidacion + parseFloat(valorString);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($get('TxtOtrosImportes') != null) {
|
if ($get('TxtOtrosImportes') != null) {
|
||||||
if (pagoMultiple != 0) {
|
if (pagoMultiple != 0) {
|
||||||
$get('TxtOtrosImportes').value = FormatoNumero(Comision, 2);
|
$get('TxtOtrosImportes').value = FormatoNumero(Comision, 2);
|
||||||
@@ -612,12 +737,12 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return Importe + parseFloat(Comision);
|
return Importe + parseFloat(Comision) - totalLiquidacion;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return Importe
|
return Importe - totalLiquidacion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -790,5 +915,44 @@
|
|||||||
TipoCambioActual = TipoCambioTxt;
|
TipoCambioActual = TipoCambioTxt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function SumaLiquidacion(txt, CveVenta, pagoMultiple, monedaPago) {
|
||||||
|
|
||||||
|
let ClsSelLiquidacionVenta = ".ClsSelLiquidacionVenta" + CveVenta;
|
||||||
|
let ClsSelLiquidacionVentaTotal = ".ClsSelLiquidacionVentaTotal" + CveVenta;
|
||||||
|
let Total = 0.0;
|
||||||
|
|
||||||
|
|
||||||
|
$( ClsSelLiquidacionVenta).each(function () {
|
||||||
|
|
||||||
|
let valorString = $(this).val();
|
||||||
|
valorString = valorString.replace(/,/g, '');
|
||||||
|
|
||||||
|
if (valorString.trim().length > 0) {
|
||||||
|
Total = Total + parseFloat(valorString);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
$(ClsSelLiquidacionVentaTotal).each(function () {
|
||||||
|
$(this).val(Total);
|
||||||
|
FormatoMoneda2($(this));
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
FormatoMoneda(txt);
|
||||||
|
|
||||||
|
var Suma = SumaValores(pagoMultiple, monedaPago);
|
||||||
|
$get('TxtImporte').value = FormatoNumero(Suma, 2);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function disablekeys()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
IdCuentaBancaria = 0
|
IdCuentaBancaria = 0
|
||||||
|
|
||||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1},-1);", "TxtTotal", 0))
|
||||||
|
|
||||||
If CveMoneda > 0 Then LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda"))
|
If CveMoneda > 0 Then LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda"))
|
||||||
|
|
||||||
@@ -292,6 +292,12 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy")
|
RVTxtFechaDocumento.MaximumValue = Now.ToString("dd/MM/yyyy")
|
||||||
|
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(590) = "1" Then
|
||||||
|
DvLiquidacion1.Visible = True
|
||||||
|
DvLiquidacion2.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If (CveMonedaFiltro = 2 And ChkPagarPesos.Checked) Then
|
If (CveMonedaFiltro = 2 And ChkPagarPesos.Checked) Then
|
||||||
@@ -497,6 +503,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
Protected Sub GvCxC_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Dim moneda As Integer = 0
|
Dim moneda As Integer = 0
|
||||||
If e.Row.RowIndex = 0 Then
|
If e.Row.RowIndex = 0 Then
|
||||||
@@ -507,6 +514,19 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
e.Row.Cells(3).Visible = False
|
e.Row.Cells(3).Visible = False
|
||||||
e.Row.Cells(4).Visible = False
|
e.Row.Cells(4).Visible = False
|
||||||
e.Row.BackColor = Drawing.Color.LightGray
|
e.Row.BackColor = Drawing.Color.LightGray
|
||||||
|
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol1").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol2").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol3").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol4").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol5").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol6").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol7").Visible = False
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol8").Visible = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If e.Row.RowIndex = 1 Then
|
If e.Row.RowIndex = 1 Then
|
||||||
e.Row.Cells(0).Width = Unit.Pixel(25)
|
e.Row.Cells(0).Width = Unit.Pixel(25)
|
||||||
@@ -548,9 +568,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End Select
|
End Select
|
||||||
|
|
||||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 Then
|
||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6},{0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnSeleccionaNC({5},{6},{0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.FCCheckBox("Chk").ClientID, e.Row.FCCheckBox("ChkGenerarNC").ClientID, e.Row.DBCampo("CveVenta")))
|
||||||
Else
|
Else
|
||||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda))
|
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4},{5});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo"), e.Row.FCCheckBox("Chk").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta")))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
|
If Not UsuarioActual.Empresa.Funcionalidad(536) = "1" Then
|
||||||
@@ -578,9 +598,32 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 AndAlso e.Row.DBCampo("DiasVencidos").ToEntero() <= 0 Then
|
If e.Row.DBCampo("DescuentoProntoPago").ToDecimal() > 0 AndAlso e.Row.DBCampo("DiasVencidos").ToEntero() <= 0 Then
|
||||||
e.Row.FCCheckBox("ChkGenerarNC").Visible = True
|
e.Row.FCCheckBox("ChkGenerarNC").Visible = True
|
||||||
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda))
|
e.Row.FCCheckBox("ChkGenerarNC").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1},{5}); FnCambia({2},this,{1},0,{3},{4}); FnEditarImporte({2}, {0});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo").ToDecimal - e.Row.DBCampo("DescuentoProntoPago").ToDecimal, e.Row.FCCheckBox("ChkGenerarNC").ClientID, CveMonedaFiltro, moneda, e.Row.DBCampo("CveVenta")))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol1").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol2").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol3").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol4").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol5").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol6").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol7").Attributes.Add("class", $"ClsSelLiquidacion ClsSelLiquidacionVenta{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol8").Attributes.Add("class", $"ClsSelLiquidacionVentaTotal{e.Row.DBCampo("CveVenta").ToEntero}")
|
||||||
|
|
||||||
|
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol1").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol2").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol3").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol4").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol5").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol6").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||||
|
e.Row.FCTextBox("TxtLiquidacionCol7").Attributes.Add("onkeyup", $"SumaLiquidacion(this,{e.Row.DBCampo("CveVenta").ToString},{CveMonedaFiltro},{ moneda})")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCTextBox("TxtAbonar").Visible = False
|
e.Row.FCTextBox("TxtAbonar").Visible = False
|
||||||
e.Row.FCTextBox("TxtComision").Visible = False
|
e.Row.FCTextBox("TxtComision").Visible = False
|
||||||
@@ -823,7 +866,9 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
|
|
||||||
'inserto las ventas que voy a pagar
|
'inserto las ventas que voy a pagar
|
||||||
For Each gvr As GridViewRow In GvCxC.Rows
|
For Each gvr As GridViewRow In GvCxC.Rows
|
||||||
|
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk").Checked Then
|
||||||
|
|
||||||
Dim ObjFactura As Modelos.Factura = Nothing
|
Dim ObjFactura As Modelos.Factura = Nothing
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
@@ -861,6 +906,7 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True
|
If gvr.DataKey("TipoDocto") = "Ant" AndAlso UsuarioActual.CveEmpresa.Contiene(1, 119, 158) Then EsAnticipoEspecial = True
|
||||||
|
|
||||||
If dtConceptos IsNot Nothing Then
|
If dtConceptos IsNot Nothing Then
|
||||||
|
|
||||||
For Each Row As DataRow In dtConceptos.Rows
|
For Each Row As DataRow In dtConceptos.Rows
|
||||||
|
|
||||||
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
Dim ConceptoContable = Row("CveConcepto").ToString.ToEntero
|
||||||
@@ -1487,7 +1533,84 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
Dim ImporteLiquidacion1 As Decimal = gvr.FCTextBox("TxtLiquidacionCol1").Text.ToDecimal
|
||||||
|
Dim ImporteLiquidacion2 As Decimal = gvr.FCTextBox("TxtLiquidacionCol2").Text.ToDecimal
|
||||||
|
Dim ImporteLiquidacion3 As Decimal = gvr.FCTextBox("TxtLiquidacionCol3").Text.ToDecimal
|
||||||
|
Dim ImporteLiquidacion4 As Decimal = gvr.FCTextBox("TxtLiquidacionCol4").Text.ToDecimal
|
||||||
|
Dim ImporteLiquidacion5 As Decimal = gvr.FCTextBox("TxtLiquidacionCol5").Text.ToDecimal
|
||||||
|
Dim ImporteLiquidacion6 As Decimal = gvr.FCTextBox("TxtLiquidacionCol6").Text.ToDecimal
|
||||||
|
Dim ImporteLiquidacion7 As Decimal = gvr.FCTextBox("TxtLiquidacionCol7").Text.ToDecimal
|
||||||
|
|
||||||
|
Dim CveClasificacionCol1 As Integer = 21267
|
||||||
|
Dim CveClasificacionCol2 As Integer = 21229
|
||||||
|
Dim CveClasificacionCol3 As Integer = 21520
|
||||||
|
Dim CveClasificacionCol4 As Integer = 21519
|
||||||
|
Dim CveClasificacionCol5 As Integer = 21547
|
||||||
|
Dim CveClasificacionCol6 As Integer = 21572
|
||||||
|
Dim CveClasificacionCol7 As Integer = 21571
|
||||||
|
|
||||||
|
Dim CveSubProyectoLiquidacion As Integer = gvr.DataKey("CveSubProyecto").ToEntero
|
||||||
|
|
||||||
|
Dim CveConceptoLiquidacion As Integer = 51
|
||||||
|
|
||||||
|
If ImporteLiquidacion1 <> 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion1, "Liquidacion Col 1", CveConceptoLiquidacion, "Liquidacion Col 2", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion1 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol1) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ImporteLiquidacion2 <> 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion2, "Liquidacion Col 2", CveConceptoLiquidacion, "Liquidacion Col 2", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion2 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol2) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ImporteLiquidacion3 <> 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion3, "Liquidacion Col 4", CveConceptoLiquidacion, "Liquidacion Col 3", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion3 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol3) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If ImporteLiquidacion4 <> 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion4, "Liquidacion Col 4", CveConceptoLiquidacion, "Liquidacion Col 4", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion4 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol4) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If ImporteLiquidacion5 <> 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion5, "Liquidacion Col 5", CveConceptoLiquidacion, "Liquidacion Col 5", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion5 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol5) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ImporteLiquidacion6 <> 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion6, "Liquidacion Col 6", CveConceptoLiquidacion, "Liquidacion Col 6", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion6 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol6) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ImporteLiquidacion7 <> 0 Then
|
||||||
|
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, ImporteLiquidacion7, "Liquidacion Col 7", CveConceptoLiquidacion, "Liquidacion Col 7", Now, -1, -1, CveIE, gvr.FCHyperLink("HplF2").Text.ToEntero, -1, CveSubProyectoLiquidacion, ViewState("CveCliente").ToString.ToEntero, ImporteMX:=ImporteLiquidacion7 * tipoCambioPago, TipoCambio:=TipoCambioGeneral, TipoCambioPago:=tipoCambioPago, PorcentajeImpuesto:=0, CveClasificacion:=CveClasificacionCol7) Then
|
||||||
|
MsgError = "No se pudo insertar la póliza"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
|
If gvr.FCCheckBox("ChkGenerarNC").Checked AndAlso ObjFactura IsNot Nothing Then
|
||||||
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
|
ObjFactura.DescuentoProntoPago = gvr.DataKey("DescuentoProntoPago").ToDecimal()
|
||||||
@@ -3136,4 +3259,46 @@ Partial Class Ventas_ClientesAbonar
|
|||||||
Calendario.EndDate = DateTime.Now
|
Calendario.EndDate = DateTime.Now
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#Region "LIQUIDACION"
|
||||||
|
|
||||||
|
Protected Sub ChkLiquidacion_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
If ChkLiquidacion.Checked Then
|
||||||
|
'16-23
|
||||||
|
GvCxC.Columns(16).Visible = True
|
||||||
|
GvCxC.Columns(17).Visible = True
|
||||||
|
GvCxC.Columns(18).Visible = True
|
||||||
|
GvCxC.Columns(19).Visible = True
|
||||||
|
GvCxC.Columns(20).Visible = True
|
||||||
|
GvCxC.Columns(21).Visible = True
|
||||||
|
GvCxC.Columns(22).Visible = True
|
||||||
|
GvCxC.Columns(23).Visible = True
|
||||||
|
|
||||||
|
GvCxC.Columns(26).Visible = False
|
||||||
|
|
||||||
|
Else
|
||||||
|
GvCxC.Columns(16).Visible = False
|
||||||
|
GvCxC.Columns(17).Visible = False
|
||||||
|
GvCxC.Columns(18).Visible = False
|
||||||
|
GvCxC.Columns(19).Visible = False
|
||||||
|
GvCxC.Columns(20).Visible = False
|
||||||
|
GvCxC.Columns(21).Visible = False
|
||||||
|
GvCxC.Columns(22).Visible = False
|
||||||
|
GvCxC.Columns(23).Visible = False
|
||||||
|
|
||||||
|
GvCxC.Columns(26).Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
UPVentas.Update()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||||
Metas de Vendedores
|
Scorecard Ventas
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<li>
|
<li>
|
||||||
@@ -144,59 +144,86 @@
|
|||||||
CssClass="table table-advance Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
CssClass="table table-advance Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Grupo" ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="250px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="HlkGrupo" runat="server" Target="_blank" Text='<%# Eval("Titulo").ToString() %>'> </asp:Label>
|
<asp:Label ID="HlkGrupo" runat="server" Target="_blank" Text='<%# Eval("Titulo").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Real Mes" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Real" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblRealMes" runat="server" Target="_blank" Text='<%# Eval("RealMes").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblRealMes" runat="server" Target="_blank" Text='<%# Eval("RealMes", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Real Mes %" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
%Inte
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblRealMesPorcentaje" runat="server" Target="_blank" Text='<%# Eval("RealMesPorcentaje").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblRealMesPorcentaje" runat="server" Target="_blank" Text='<%# Eval("RealMesPorcentaje").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Venta Mes Año Anterior" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Año<br />Anterior
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblVtaMesAA" runat="server" Target="_blank" Text='<%# Eval("VtaMesAA").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblVtaMesAA" runat="server" Target="_blank" Text='<%# Eval("VtaMesAA", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Obj Mes" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Obj.<br />Mes
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblObjMes" runat="server" Target="_blank" Text='<%# Eval("ObjMes").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblObjMes" runat="server" Target="_blank" Text='<%# Eval("ObjMes", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Var Mes A.A" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Var <br />Mes A.A
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblVarMesAA" runat="server" Target="_blank" Text='<%# Eval("VarMesAA").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblVarMesAA" runat="server" Target="_blank" Text='<%# Eval("VarMesAA", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Var Mes Obj" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Var <br />Obj.
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblVarMesObj" runat="server" Target="_blank" Text='<%# Eval("VarMesObj").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblVarMesObj" runat="server" Target="_blank" Text='<%# Eval("VarMesObj", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Real Acumulado" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Real<br/>Acum.
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblRealAcumulado" runat="server" Target="_blank" Text='<%# Eval("RealAcumulado").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblRealAcumulado" runat="server" Target="_blank" Text='<%# Eval("RealAcumulado", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Real Acumulado %" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
%Inte
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblRealAcumuladoPorcentaje" runat="server" Target="_blank" Text='<%# Eval("RealAcumuladoPorcentaje").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblRealAcumuladoPorcentaje" runat="server" Target="_blank" Text='<%# Eval("RealAcumuladoPorcentaje").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="A. Ant. Acumulado" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Acum<br />Año Ant
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblAAntAcumulado" runat="server" Target="_blank" Text='<%# Eval("AAntAcumulado").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblAAntAcumulado" runat="server" Target="_blank" Text='<%# Eval("AAntAcumulado", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Obj Acumulado" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Obj.<br />Acum
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblObjAcumulado" runat="server" Target="_blank" Text='<%# Eval("ObjAcumulado").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblObjAcumulado" runat="server" Target="_blank" Text='<%# Eval("ObjAcumulado", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<%-- <asp:TemplateField HeaderText="%Var vs AA" ItemStyle-HorizontalAlign="Center">
|
<%-- <asp:TemplateField HeaderText="%Var vs AA" ItemStyle-HorizontalAlign="Center">
|
||||||
@@ -204,14 +231,20 @@
|
|||||||
<asp:Label ID="lblVarVSAAPerc" runat="server" Target="_blank" Text='<%# Eval("VarVSAAPerc").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblVarVSAAPerc" runat="server" Target="_blank" Text='<%# Eval("VarVSAAPerc").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>--%>
|
</asp:TemplateField>--%>
|
||||||
<asp:TemplateField HeaderText="Var vs AA" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Var <br />vs AA
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblVarVSAA" runat="server" Target="_blank" Text='<%# Eval("VarVSAA").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblVarVSAA" runat="server" Target="_blank" Text='<%# Eval("VarVSAA", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Var vs ObjAcum" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<HeaderTemplate>
|
||||||
|
Var<br /> Obj.
|
||||||
|
</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lblVarVSObjAcum" runat="server" Target="_blank" Text='<%# Eval("VarVSObjAcum").ToString() %>'> </asp:Label>
|
<asp:Label ID="lblVarVSObjAcum" runat="server" Target="_blank" Text='<%# Eval("VarVSObjAcum", "{0:#,###}").ToString() %>'> </asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ Partial Class MetasVendedores
|
|||||||
|
|
||||||
Select Case e.Row.DBCampo("TipoFila")
|
Select Case e.Row.DBCampo("TipoFila")
|
||||||
Case "1"
|
Case "1"
|
||||||
e.Row.CssClass = "GrupoSuperior"
|
e.Row.CssClass = "Totales"
|
||||||
' e.Row.FCLabel("lblRealMes").Text = ""
|
' e.Row.FCLabel("lblRealMes").Text = ""
|
||||||
' e.Row.FCLabel("lblVtaMesAA").Text = ""
|
' e.Row.FCLabel("lblVtaMesAA").Text = ""
|
||||||
' e.Row.FCLabel("lblObjMes").Text = ""
|
' e.Row.FCLabel("lblObjMes").Text = ""
|
||||||
@@ -98,11 +98,11 @@ Partial Class MetasVendedores
|
|||||||
' e.Row.FCLabel("lblVarVSAA").Text = ""
|
' e.Row.FCLabel("lblVarVSAA").Text = ""
|
||||||
' e.Row.FCLabel("lblVarVSObjAcum").Text = ""
|
' e.Row.FCLabel("lblVarVSObjAcum").Text = ""
|
||||||
Case "2"
|
Case "2"
|
||||||
e.Row.CssClass = "Totales"
|
|
||||||
Case "3"
|
|
||||||
e.Row.CssClass = "SubTotales2"
|
e.Row.CssClass = "SubTotales2"
|
||||||
Case "4"
|
Case "3"
|
||||||
e.Row.CssClass = "SubTotales"
|
e.Row.CssClass = "SubTotales"
|
||||||
|
Case "4"
|
||||||
|
e.Row.CssClass = "SubTotales3"
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If e.Row.DataKey("Titulo") = "" Then
|
If e.Row.DataKey("Titulo") = "" Then
|
||||||
|
|||||||
@@ -264,7 +264,7 @@
|
|||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divLitraje" visible="false" runat="server">
|
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divLitraje" visible="false" runat="server">
|
||||||
<asp:TextBox ID="TxtLitraje" CssClass="form-control " runat="server" ReadOnly="true"></asp:TextBox>
|
<asp:TextBox ID="TxtLitraje" CssClass="form-control " runat="server" ></asp:TextBox>
|
||||||
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>
|
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>
|
||||||
<label class="truncate" style="padding-left: 16px;" for="<%= TxtLitraje.ClientID.ToString()%>">Litraje:</label>
|
<label class="truncate" style="padding-left: 16px;" for="<%= TxtLitraje.ClientID.ToString()%>">Litraje:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
|
|||||||
@@ -1372,7 +1372,7 @@ Partial Class ProductosyServicios
|
|||||||
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
|
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
|
||||||
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
|
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
|
||||||
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
||||||
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero) > 0 Then
|
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal) > 0 Then
|
||||||
ViewState("CvePS") = ObjProductosServicios.CvePS
|
ViewState("CvePS") = ObjProductosServicios.CvePS
|
||||||
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
For Each GVR As GridViewRow In GvImpuestosLocales.Rows
|
||||||
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
If GVR.FCCheckBox("ChkDeduccion").Checked Then
|
||||||
@@ -1423,7 +1423,7 @@ Partial Class ProductosyServicios
|
|||||||
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
|
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
|
||||||
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
|
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
|
||||||
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
|
||||||
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero) Then
|
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal) Then
|
||||||
|
|
||||||
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
|
If Not ObjProductosServicios.LimpiaImpuestosLocales(CvePS) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ Partial Class Ventas_RepProductosServicios
|
|||||||
DdlSubProyectoEjecucion.DataBind()
|
DdlSubProyectoEjecucion.DataBind()
|
||||||
|
|
||||||
'Vendedor
|
'Vendedor
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,3)") 'vendedores y vendedores de piso
|
||||||
DdlVendedor.DataBind()
|
DdlVendedor.DataBind()
|
||||||
|
|
||||||
'CargaUsuarios
|
'CargaUsuarios
|
||||||
|
|||||||
@@ -451,12 +451,13 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
DdlGrupo.SelectedValueExist(GPO)
|
DdlGrupo.SelectedValueExist(GPO)
|
||||||
RblTipoCambio.SelectedValue = TipoCambio.ToString
|
RblTipoCambio.SelectedValue = TipoCambio.ToString
|
||||||
If TipoCambio > 1 Then CveMoneda = -1
|
If TipoCambio > 1 Then CveMoneda = -1
|
||||||
|
CargarMarcas(CveMarca)
|
||||||
|
|
||||||
CargaProvedores(CveProveedorCompra)
|
CargaProvedores(CveProveedorCompra)
|
||||||
'If CveProveedorCompra.ToEntero > 0 Then DdlProveedor.SelectedValue = CveProveedorCompra
|
'If CveProveedorCompra.ToEntero > 0 Then DdlProveedor.SelectedValue = CveProveedorCompra
|
||||||
DdlTipoPSDes.SelectedValueExist(CveClasificacionDetalle)
|
DdlTipoPSDes.SelectedValueExist(CveClasificacionDetalle)
|
||||||
CargaDatos(CveProyecto, CveSubProyecto, CveCategoria, CveClasificacion, CvePS, Mes, MesEjec, CveCliente, CveSubProyectoEjecucion, CveVendedor, CveUsuario, CveEstatus, GPO.ToEntero, TipoDocto, CveMarca, ModalidadContable)
|
CargaDatos()
|
||||||
CargarMarcas(CveMarca)
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -497,32 +498,6 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
Agrupador = DdlGrupo.SelectedItem.Text
|
Agrupador = DdlGrupo.SelectedItem.Text
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatos(CveProyecto As String, CveSubProyecto As String, CveCategoria As String, CveClasificacion As String, CvePS As String, Mes As String, MesEjec As String, CveCliente As Integer, CveSubProyectoEjecucion As String, CveVendedor As Integer, CveUsuario As String, CveEstatus As String, Gpo As Integer, TipoDocto As String, CveMarca As Integer, ModalidadContable As Boolean)
|
|
||||||
Dim ObjVentas As New ClsVentas()
|
|
||||||
Dim FechaI, FechaF, FechaIEjec, FechaFEjec As Date
|
|
||||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
|
|
||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
|
||||||
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha)
|
|
||||||
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
|
|
||||||
Dim CveProveedorCompra As Integer = If(DdlProveedor.SelectedValue.ToEntero > 0, DdlProveedor.SelectedValue.ToEntero, -1)
|
|
||||||
Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM)
|
|
||||||
|
|
||||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else TCEspecifico = -1
|
|
||||||
|
|
||||||
If ObjVentas.GetRepProductosServiciosDetalle(CveProyecto.ToEntero, CveSubProyecto.ToEntero, CveCategoria.ToEntero, CveClasificacion.ToEntero, CvePS.ToEntero,
|
|
||||||
FechaI, FechaF, Mes.ToEntero, FechaIEjec, FechaFEjec, MesEjec.ToEntero, CveCliente.ToEntero, CveSubProyectoEjecucion.ToEntero,
|
|
||||||
CveVendedor, CveUsuario.ToEntero, CveEstatus.ToEntero, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
|
|
||||||
GPO:=Gpo, CveMoneda:=CveMoneda, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
|
||||||
CveProveedorCompra:=CveProveedorCompra, CveMarca:=CveMarca, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero) Then
|
|
||||||
GvDatos.DataSource = ObjVentas.DtResultados
|
|
||||||
TmpDT = ObjVentas.DtResultados
|
|
||||||
Else
|
|
||||||
GvDatos.DataSource = Nothing
|
|
||||||
End If
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
GvDatos.DataBind()
|
|
||||||
Agrupador = DdlGrupo.SelectedItem.Text
|
|
||||||
End Sub
|
|
||||||
Protected Sub BtnTipoCambio_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnTipoCambio_Click(sender As Object, e As EventArgs)
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||||
@@ -533,14 +508,10 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
DivMarca.Visible = True
|
DivMarca.Visible = True
|
||||||
LblMarca.Visible = True
|
LblMarca.Visible = True
|
||||||
|
|
||||||
Dim ObjMarcas As New ClsProductosServicios
|
DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
|
||||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
|
||||||
ObjMarcas.Dispose()
|
|
||||||
DdlMarcaPSDes.DataBind()
|
DdlMarcaPSDes.DataBind()
|
||||||
End If
|
End If
|
||||||
End If
|
DdlMarcaPSDes.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
DdlMarcaPSDes.Items.Insert(0, New ListItem(" - ", "-1"))
|
|
||||||
DdlMarcaPSDes.Items.FindByValue(CStr(CveMarca)).Selected = True
|
DdlMarcaPSDes.Items.FindByValue(CStr(CveMarca)).Selected = True
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -573,14 +544,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Not e.Row.DBCampo("CveVenta").ToEntero > 0 Then
|
If Not e.Row.DBCampo("CveVenta").ToEntero > 0 Then
|
||||||
'e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
'e.Row.Cells(0).Width = Unit.Pixel(200)
|
|
||||||
'e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
|
|
||||||
'e.Row.Cells(1).Width = Unit.Pixel(60)
|
|
||||||
'e.Row.Cells(2).Width = Unit.Pixel(90)
|
|
||||||
'e.Row.Cells(3).Width = Unit.Pixel(90)
|
|
||||||
'e.Row.Cells(5).Width = Unit.Pixel(80)
|
|
||||||
'e.Row.Cells(8).Width = Unit.Pixel(100)
|
|
||||||
If e.Row.DBCampo("Gpo") = "" Then
|
If e.Row.DBCampo("Gpo") = "" Then
|
||||||
e.Row.Cells(5).Text = e.Row.DBCampo("Moneda").ToString
|
e.Row.Cells(5).Text = e.Row.DBCampo("Moneda").ToString
|
||||||
e.Row.CssClass = "Totales"
|
e.Row.CssClass = "Totales"
|
||||||
@@ -593,9 +557,6 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Dim FechaI, FechaF As String
|
'Dim FechaI, FechaF As String
|
||||||
'FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
'FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||||
'FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
'FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||||
@@ -663,7 +624,6 @@ Partial Class Ventas_RepProductosServiciosDetalle
|
|||||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
|
DdlProveedor.Attributes.Add("data-metodo", "getproveedores")
|
||||||
DdlProveedor.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", String.Format("CveProveedor = {0}", CveProveedor))
|
DdlProveedor.SelectedText = GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltroPrimeroValor("RazonSocial", String.Format("CveProveedor = {0}", CveProveedor))
|
||||||
Else
|
Else
|
||||||
|
|
||||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||||
DdlProveedor.DataBind()
|
DdlProveedor.DataBind()
|
||||||
DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlProveedor.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|||||||
@@ -180,15 +180,15 @@ Partial Class Ventas_RepRecuperacion
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Liga4 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}",
|
Dim Liga4 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}&CveCondicionesPago={24}&CveTipoTransaccion={25}",
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
||||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 2, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF)
|
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 2, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF, e.Row.DBCampo("CveCondicionesPago"), e.Row.DBCampo("CveTipoTransaccion"))
|
||||||
|
|
||||||
e.Row.FCHyperLink("HplPagado").NavigateUrl = Liga4
|
e.Row.FCHyperLink("HplPagado").NavigateUrl = Liga4
|
||||||
|
|
||||||
Dim Liga5 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}",
|
Dim Liga5 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}&CveCondicionesPago={24}&CveTipoTransaccion={25}",
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
||||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF)
|
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF, e.Row.DBCampo("CveCondicionesPago"), e.Row.DBCampo("CveTipoTransaccion"))
|
||||||
|
|
||||||
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
|
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
|
||||||
|
|
||||||
|
|||||||
@@ -179,8 +179,8 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-1 truncate">Fecha Aplicado Inicio: </div>
|
<div class="col-md-1 truncate">Fecha Aplicado I: </div>
|
||||||
<div class="col-md-1" style="padding-left: 0px !important;">
|
<div class="col-md-2" style="padding-left: 0px !important;">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
||||||
<asp:TextBox Width="80px" ID="TxtFechaAplicadoI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
<asp:TextBox Width="80px" ID="TxtFechaAplicadoI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
@@ -194,8 +194,8 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFAplicadoI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaAplicadoI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">Fecha Aplicado Fin: </div>
|
<div class="col-md-1 truncate">Fecha Aplicado F: </div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-2">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important;">
|
||||||
<asp:TextBox Width="80px" ID="TxtFechaAplicadoF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
<asp:TextBox Width="80px" ID="TxtFechaAplicadoF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
@@ -219,8 +219,14 @@
|
|||||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">F. Registro IE inicio:</div>
|
<label id="Label2" class="col-md-1 truncate">Tipo Transacción:</label>
|
||||||
<div class="col-md-1" style="padding-left: 0px !important;">
|
<div class="col-md-2" id="div1" >
|
||||||
|
<asp:DropDownList ID="DdlTipoTransaccion" runat="server" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
|
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">F. Registro IE Inicio:</div>
|
||||||
|
<div class="col-md-2" style="padding-left: 0px !important;">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; ">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; ">
|
||||||
<asp:TextBox Width="80px" ID="TxtFechaRegistroIEI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
<asp:TextBox Width="80px" ID="TxtFechaRegistroIEI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
@@ -235,7 +241,7 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEI" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">F. Registro IE Fin:</div>
|
<div class="col-md-1 truncate">F. Registro IE Fin:</div>
|
||||||
<div class="col-md-1" >
|
<div class="col-md-2">
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding-left: 0px !important;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding-left: 0px !important;">
|
||||||
<asp:TextBox Width="80px" ID="TxtFechaRegistroIEF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
<asp:TextBox Width="80px" ID="TxtFechaRegistroIEF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
@@ -249,6 +255,17 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFRegistroIEF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaRegistroIEF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-1 truncate">Condiciones de Pago</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -133,8 +133,9 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
DdlMoneda.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlMoneda.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
DdlMoneda.DataBind()
|
DdlMoneda.DataBind()
|
||||||
|
|
||||||
'txtFechaI.Text = $"01/{Now.Month}/{Now.Year}"
|
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones().FiltraParametros("Tipo = 'Ing' and Estatus = True ")
|
||||||
'txtFechaF.Text = Now.ToShortDateString
|
DdlTipoTransaccion.DataBind()
|
||||||
|
DdlTipoTransaccion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
'Cargamos las fechas
|
'Cargamos las fechas
|
||||||
FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
||||||
@@ -146,11 +147,11 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
txtFechaI.Text = FechaI
|
txtFechaI.Text = FechaI
|
||||||
End If
|
End If
|
||||||
|
|
||||||
FechaAplicadoI = If(Request("FechaAplicadoI") IsNot Nothing And Request("FechaAplicadoI").ToString <> "01/01/1900", Request("FechaAplicadoI").ToString, "-1").ToString
|
FechaAplicadoI = If(Request("FechaAplicadoI") IsNot Nothing AndAlso Request("FechaAplicadoI").ToString <> "01/01/1900", Request("FechaAplicadoI").ToString, "-1").ToString
|
||||||
FechaAplicadoF = If(Request("FechaAplicadoF") IsNot Nothing And Request("FechaAplicadoF").ToString <> "01/01/9999", Request("FechaAplicadoF").ToString, "-1").ToString
|
FechaAplicadoF = If(Request("FechaAplicadoF") IsNot Nothing AndAlso Request("FechaAplicadoF").ToString <> "01/01/9999", Request("FechaAplicadoF").ToString, "-1").ToString
|
||||||
|
|
||||||
FechaRegistroIEI = If(Request("FechaRegistroIEI") IsNot Nothing And Request("FechaRegistroIEI").ToString <> "01/01/1900", Request("FechaRegistroIEI").ToString, "-1").ToString
|
FechaRegistroIEI = If(Request("FechaRegistroIEI") IsNot Nothing AndAlso Request("FechaRegistroIEI").ToString <> "01/01/1900", Request("FechaRegistroIEI").ToString, "-1").ToString
|
||||||
FechaRegistroIEF = If(Request("FechaRegistroIEF") IsNot Nothing And Request("FechaRegistroIEF").ToString <> "01/01/9999", Request("FechaRegistroIEF").ToString, "-1").ToString
|
FechaRegistroIEF = If(Request("FechaRegistroIEF") IsNot Nothing AndAlso Request("FechaRegistroIEF").ToString <> "01/01/9999", Request("FechaRegistroIEF").ToString, "-1").ToString
|
||||||
|
|
||||||
If FechaAplicadoF <> "-1" Then
|
If FechaAplicadoF <> "-1" Then
|
||||||
TxtFechaAplicadoF.Text = FechaAplicadoF
|
TxtFechaAplicadoF.Text = FechaAplicadoF
|
||||||
@@ -230,6 +231,8 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
DdlClienteClasificacion.SelectedValueExist(CveClienteClasificacion)
|
DdlClienteClasificacion.SelectedValueExist(CveClienteClasificacion)
|
||||||
DdlClienteSucursal.SelectedValueExist(CveClienteSucursal)
|
DdlClienteSucursal.SelectedValueExist(CveClienteSucursal)
|
||||||
DdlDistribuidor.SelectedValueExist(EsDistribuidor)
|
DdlDistribuidor.SelectedValueExist(EsDistribuidor)
|
||||||
|
DdlTipoTransaccion.SelectedValueExist(IfNull(Request("CveTipoTransaccion"), "-1").ToString.ToEntero)
|
||||||
|
DdlCondicionesPago.SelectedValueExist(IfNull(Request("CveCondicionesPago"), "-1").ToString.ToEntero)
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
lblEsDistribuidor.Visible = True
|
lblEsDistribuidor.Visible = True
|
||||||
@@ -256,7 +259,8 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
|
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
|
||||||
DdlTipoDocto.SelectedValue, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, Grupo:=Grupo,
|
DdlTipoDocto.SelectedValue, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, Grupo:=Grupo,
|
||||||
TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, Tipo:=Tipo,
|
TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, Tipo:=Tipo,
|
||||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF) Then
|
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF,
|
||||||
|
CveTipoTransaccion:=DdlTipoTransaccion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero) Then
|
||||||
|
|
||||||
GvDatos.DataSource = ObjMovtos.DtResultados
|
GvDatos.DataSource = ObjMovtos.DtResultados
|
||||||
DtDatos = ObjMovtos.DtResultados
|
DtDatos = ObjMovtos.DtResultados
|
||||||
|
|||||||
@@ -1170,11 +1170,13 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU") %>' Visible="false"></asp:Literal>
|
<asp:Literal ID="LtlPU" runat="server" Text='<%# Eval("PU") %>' Visible="false"></asp:Literal>
|
||||||
<asp:TextBox ID="TxtPrecio" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("PU") %>' ValidationGroup="GprGV" Width="78px" Height="24px"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecio" runat="server" CausesValidation="true" MaxLength="12" Text='<%# Eval("PU", "{0:0.00####}") %>' ValidationGroup="GprGV" Width="78px" Height="24px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="SoloNumeros" runat="server" TargetControlID="TxtPrecio" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
<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 ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
|
<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 ingréselo." ValidationGroup="GprGV"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="RFVPrecio" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
|
||||||
<asp:CustomValidator ID="CVPrecioEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>
|
<asp:CustomValidator ID="CVPrecioEdit" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> no tiene el formato correcto. Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprGV"></asp:CustomValidator>
|
||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEPrecioEdit" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecioEdit" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEPrecioEdit" runat="server" HighlightCssClass="vco" TargetControlID="CVPrecioEdit" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -9011,6 +9011,15 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||||
|
|
||||||
|
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
GVAnticipos.DataBind()
|
GVAnticipos.DataBind()
|
||||||
|
|
||||||
|
|
||||||
@@ -23130,7 +23139,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If ObjVentas.EliminarVenta(CveVenta) Then
|
If ObjVentas.EliminarVenta(CveVenta) Then
|
||||||
ObjVentas.Commit()
|
ObjVentas.Commit()
|
||||||
Alert("La venta ha sido eliminada correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La venta ha sido eliminada correctamente.", TipoMensaje.MsgInformacion, "document.location.href=""/Ventas/Clientes.aspx?CveCliente=" & CveCliente & """;")
|
||||||
Else
|
Else
|
||||||
ObjVentas.RollBack()
|
ObjVentas.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user