Merge branch 'master' of http://192.168.10.111:8383/SIG
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,26 +207,27 @@ 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
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Transportistas"
|
#Region "Transportistas"
|
||||||
Public Function AddTransportista(Transportista As String, CveUsuario As Integer, CveEmpresa As Integer, CveProveedor As Integer) As Boolean
|
Public Function AddTransportista(Transportista As String, CveUsuario As Integer, CveEmpresa As Integer, CveProveedor As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -7554,11 +7554,12 @@ Public Class ClsPaginas
|
|||||||
If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
|
If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
|
||||||
If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
|
If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
params.Add(New ReportParameter("Chofer", Dr("Chofer").ToString))
|
|
||||||
params.Add(New ReportParameter("Placa", Dr("Placa").ToString))
|
|
||||||
params.Add(New ReportParameter("EspecifUnidad", Dr("Especificacion").ToString))
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -256,9 +260,7 @@ Partial Class Bancos_DepositosCaja
|
|||||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then
|
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, DdlClasificacion.SelectedItem.Text, 51, DdlClasificacion.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision, ImporteMX:=Comision * TipoCambio) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ChkDescuento.Checked Then
|
If ChkDescuento.Checked Then
|
||||||
@@ -268,68 +270,64 @@ Partial Class Bancos_DepositosCaja
|
|||||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, ImporteMX:=Descuento * TipoCambio, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then
|
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Descuento, DdlClasificacionDescuento.SelectedItem.Text, 51, DdlClasificacionDescuento.SelectedItem.Text & " " & DdlPersonal.SelectedItem.Text, Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyectoDescuento, ImporteMX:=Descuento * TipoCambio, CvePersonal:=DdlPersonal.SelectedValue.ToEntero) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
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
|
||||||
'Datos de las Nuevas PrePolizas
|
'Datos de las Nuevas PrePolizas
|
||||||
'Entrada a Bancos
|
'Entrada a Bancos
|
||||||
|
|
||||||
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
|
Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal
|
||||||
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
|
Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString
|
||||||
|
|
||||||
'Datos de las Prepolizas A Cancelar
|
'Datos de las Prepolizas A Cancelar
|
||||||
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
|
Dim CveIE As Integer = Gvr.DataKey("CveIE").ToEntero
|
||||||
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero
|
||||||
Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero
|
Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero
|
||||||
|
|
||||||
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
|
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2)
|
||||||
If Not FolioIE > 0 Then
|
If Not FolioIE > 0 Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
|
If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, CveVenta:=CveVenta, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Asignamos la cuenta Deposito
|
'Asignamos la cuenta Deposito
|
||||||
If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEOrigen, CveIE) Then
|
If Not OcurrioError AndAlso Not ObjBancos.UpdateBancos_IECuentaDeposito(CveIEOrigen, CveIE) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
End If
|
Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEOrigen}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}")
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
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")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
documentos += String.Format("<br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir {1}</a> <br/><br/> ", StrEncript, "Depósito Bancario")
|
|
||||||
|
|
||||||
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>
|
||||||
@@ -222,8 +223,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<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"
|
||||||
@@ -244,15 +244,14 @@
|
|||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" 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>
|
</div>
|
||||||
|
<div> <asp:HiddenField ID="HdnProveedorCvePrePoliza" runat="server" />
|
||||||
|
<asp:Button ID="BtnProveedoresRemove" runat="server" Text="Eliminar" OnClick="BtnProveedoresRemove_Click" /></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"
|
||||||
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>
|
||||||
@@ -267,7 +266,7 @@
|
|||||||
<%--<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">
|
||||||
@@ -322,7 +322,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
@@ -353,7 +353,7 @@
|
|||||||
|
|
||||||
<div class="col-md-6" style="text-align: right!important">
|
<div class="col-md-6" style="text-align: right!important">
|
||||||
<asp:Button Text="Generar Clientes" runat="server" ID="BtnGeneraVentas" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
|
<asp:Button Text="Generar Clientes" runat="server" ID="BtnGeneraVentas" OnClick="BtnGeneraVentas_Click" Style="margin-left: 30px;" class="btn btn-primary" ValidationGroup="GrpGuardarVentas" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -131,6 +131,8 @@ 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
|
||||||
|
|
||||||
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")
|
||||||
|
|
||||||
@@ -280,8 +282,8 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
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
|
||||||
@@ -316,7 +318,12 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Compras", CveConceptoContable, "Fluctuación Compras", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoCompras.SelectedValue.ToEntero) Then
|
If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Compras", CveConceptoContable, "Fluctuación Compras", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveSubProyecto:=DdlSubProyectoCompras.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
|
||||||
@@ -326,18 +333,20 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
|
|
||||||
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) 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.UpdateCompraTCValuacion(gvr.DataKey("CveCompra").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
||||||
ErrorRegistrar = True
|
' ErrorRegistrar = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, 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 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)
|
||||||
@@ -393,13 +402,17 @@ 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
|
||||||
|
|
||||||
|
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) 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
|
||||||
@@ -414,10 +427,10 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
CveConconceptoCliente = 203
|
CveConconceptoCliente = 203
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not Conta.UpdateVentaTCValuacion(gvr.DataKey("CveVenta").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
'If Not Conta.UpdateVentaTCValuacion(gvr.DataKey("CveVenta").ToEntero, TCValuacion:=TCUltimaFluctuacion) Then
|
||||||
ErrorRegistrar = True
|
' ErrorRegistrar = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'movimiento de complementaria
|
'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, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) 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
|
||||||
@@ -981,4 +994,13 @@ Partial Class Bancos_FluctuacionCambiaria
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnProveedoresRemove_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim Banco As New ClsBancos
|
||||||
|
If Not Banco.FluctuacionesBitacoraPrePolizaRemove(HdnProveedorCvePrePoliza.Value.ToEntero, 1, 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert("Flucturación eliminada.")
|
||||||
|
End If
|
||||||
|
Banco.Dispose()
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -6891,24 +6899,34 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion
|
Dim DiferenciaDevolucion As Decimal = importeMovimiento - TotalRealDevolucion
|
||||||
|
|
||||||
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
|
||||||
|
If TotalRealDevolucion <> 0 Then
|
||||||
|
|
||||||
|
If Math.Abs(DiferenciaDevolucion) > 0 Then
|
||||||
|
|
||||||
|
|
||||||
Dim CveSubProyecto69 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
|
Dim CveSubProyecto69 As Integer = TmpDT.FiltroPrimeroValor("CveSubProyecto", "CveSubProyecto > 0 ").ToEntero
|
||||||
Dim CveClasificacion69 As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
Dim CveClasificacion69 As Integer = TmpDT.FiltroPrimeroValor("CveClasificacion", "CveClasificacion > 0 ").ToEntero
|
||||||
|
|
||||||
|
|
||||||
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacion69}").ToString.ToEntero
|
Dim IdCtaContable69 As Integer = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {CveClasificacion69}").ToString.ToEntero
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaDevolucion, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=DiferenciaDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, DiferenciaDevolucion), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69, CveClasificacion:=CveClasificacion69) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaDevolucion, Referencia, 69, Concepto, FechaMovimiento, IdCtaContable69, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=DiferenciaDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, DiferenciaDevolucion), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza, CveSubProyecto:=CveSubProyecto69, CveClasificacion:=CveClasificacion69) Then
|
||||||
|
ErrorPrepoliza = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||||
|
ErrorPrepoliza = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=importeMovimiento * tipoCambioActual, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TotalRealDevolucion, Referencia, ConceptoContabilizacionNC, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, ImporteMX:=TotalRealDevolucion, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveMovimientoAlmacen:=CveMovimientoDevolucion, Contabilizable:=SeContabiliza) Then
|
|
||||||
ErrorPrepoliza = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1016,7 +1016,7 @@ Partial Class PopUpVerFactura
|
|||||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
Dim ObjInv As New ClsInventarios
|
Dim ObjInv As New ClsInventarios
|
||||||
Dim ObjAcar As New ClsAcarreos
|
|
||||||
Dim SerieFolio As String = ""
|
Dim SerieFolio As String = ""
|
||||||
Dim DomicilioSucursal As String = ""
|
Dim DomicilioSucursal As String = ""
|
||||||
Dim LugarFecha As String = ""
|
Dim LugarFecha As String = ""
|
||||||
@@ -1037,6 +1037,10 @@ Partial Class PopUpVerFactura
|
|||||||
Dim Ciudad As String = ""
|
Dim Ciudad As String = ""
|
||||||
Dim Licencia As String = ""
|
Dim Licencia As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Dim SBDireccionO As New StringBuilder()
|
Dim SBDireccionO As New StringBuilder()
|
||||||
Dim SBDireccionD As New StringBuilder()
|
Dim SBDireccionD As New StringBuilder()
|
||||||
|
|
||||||
@@ -1051,9 +1055,8 @@ Partial Class PopUpVerFactura
|
|||||||
Destino = Dr("AlmacenDestino").ToString
|
Destino = Dr("AlmacenDestino").ToString
|
||||||
Observaciones = Dr("Observaciones").ToString
|
Observaciones = Dr("Observaciones").ToString
|
||||||
CveChofer = Dr("CveChofer").ToString
|
CveChofer = Dr("CveChofer").ToString
|
||||||
If ObjAcar.GetChofer(CveChofer.ToEntero, UsuarioActual.CveEmpresa, -1, -1) Then
|
|
||||||
Chofer = ObjAcar.DtResultados.FiltroPrimeroValor("Chofer")
|
|
||||||
End If
|
|
||||||
Placa = Dr("Traslado_Placa").ToString
|
Placa = Dr("Traslado_Placa").ToString
|
||||||
Recibio = Dr("Recibio").ToString
|
Recibio = Dr("Recibio").ToString
|
||||||
FechaEntrega = Dr("FechaEntrega").ToString
|
FechaEntrega = Dr("FechaEntrega").ToString
|
||||||
@@ -1087,10 +1090,18 @@ Partial Class PopUpVerFactura
|
|||||||
Telefono = Dr("Telefono1").ToString
|
Telefono = Dr("Telefono1").ToString
|
||||||
Ciudad = Dr("Ciudad").ToString
|
Ciudad = Dr("Ciudad").ToString
|
||||||
Licencia = Dr("Licencia").ToString
|
Licencia = Dr("Licencia").ToString
|
||||||
|
|
||||||
|
|
||||||
|
Chofer = Dr("Chofer").ToString
|
||||||
|
Placa = Dr("Placa").ToString
|
||||||
|
EspecifUnidad = Dr("Especificacion").ToString
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
ObjAcar.Dispose()
|
|
||||||
|
|
||||||
Dim Dt As DataTable = Nothing
|
Dim Dt As DataTable = Nothing
|
||||||
If ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -1103,18 +1114,19 @@ Partial Class PopUpVerFactura
|
|||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
|
'params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, ImageToBase64(Drawing.Image.FromFile(Imagen.FullName), Drawing.Imaging.ImageFormat.Png), "")))
|
||||||
|
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName)
|
|
||||||
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
params.Add(New ReportParameter("LogoPath", LogoRuta))
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
@@ -1129,6 +1141,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("Destinatario", ""))
|
params.Add(New ReportParameter("Destinatario", ""))
|
||||||
params.Add(New ReportParameter("Observaciones", Observaciones))
|
params.Add(New ReportParameter("Observaciones", Observaciones))
|
||||||
params.Add(New ReportParameter("Chofer", Chofer))
|
params.Add(New ReportParameter("Chofer", Chofer))
|
||||||
|
params.Add(New ReportParameter("ResponsableRecibio", Chofer))
|
||||||
params.Add(New ReportParameter("Placa", Placa))
|
params.Add(New ReportParameter("Placa", Placa))
|
||||||
params.Add(New ReportParameter("Recibio", Recibio))
|
params.Add(New ReportParameter("Recibio", Recibio))
|
||||||
params.Add(New ReportParameter("FechaEntrega", FechaEntrega.ToDateTime().ToString("dd/MM/yyyy")))
|
params.Add(New ReportParameter("FechaEntrega", FechaEntrega.ToDateTime().ToString("dd/MM/yyyy")))
|
||||||
@@ -1142,6 +1155,7 @@ Partial Class PopUpVerFactura
|
|||||||
params.Add(New ReportParameter("Telefono", Telefono))
|
params.Add(New ReportParameter("Telefono", Telefono))
|
||||||
params.Add(New ReportParameter("Ciudad", Ciudad))
|
params.Add(New ReportParameter("Ciudad", Ciudad))
|
||||||
params.Add(New ReportParameter("Licencia", Licencia))
|
params.Add(New ReportParameter("Licencia", Licencia))
|
||||||
|
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
|
ImprimirPDF("Empresas/Grales/Formatos/CartaPorte.rdlc", Dt, params, String.Format("Carta Porte -{0}", Now.ToDateTime.ToShortDateString))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -19,6 +19,14 @@ Partial Class OC
|
|||||||
ViewState("CveEmpresaActual") = value
|
ViewState("CveEmpresaActual") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Private Property EmpresaActualOC As Empresa
|
||||||
|
Get
|
||||||
|
EmpresaActualOC = If(IsNothing(ViewState("EmpresaActualOC")), Nothing, DirectCast(ViewState("EmpresaActualOC"), Empresa))
|
||||||
|
End Get
|
||||||
|
Set(value As Empresa)
|
||||||
|
ViewState("EmpresaActualOC") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property CveUsuarioAsignado As Integer
|
Private Property CveUsuarioAsignado As Integer
|
||||||
Get
|
Get
|
||||||
Return If(IsNothing(ViewState("CveUsuarioAsignado")), -1, ViewState("CveUsuarioAsignado").ToString.ToEntero)
|
Return If(IsNothing(ViewState("CveUsuarioAsignado")), -1, ViewState("CveUsuarioAsignado").ToString.ToEntero)
|
||||||
@@ -584,6 +592,9 @@ Partial Class OC
|
|||||||
CveProveedorOriginal = -1
|
CveProveedorOriginal = -1
|
||||||
'MODALIDAD MULTIEMPRESA
|
'MODALIDAD MULTIEMPRESA
|
||||||
CveEmpresaActual = UsuarioActual.CveEmpresa
|
CveEmpresaActual = UsuarioActual.CveEmpresa
|
||||||
|
If CveEmpresaActual > 0 Then
|
||||||
|
EmpresaActualOC = UsuarioActual.Empresa
|
||||||
|
End If
|
||||||
CargaEstatusUsuariosClasificaciones()
|
CargaEstatusUsuariosClasificaciones()
|
||||||
|
|
||||||
TxtObsPS.Attributes.Add("maxlength", "750")
|
TxtObsPS.Attributes.Add("maxlength", "750")
|
||||||
@@ -1275,6 +1286,9 @@ Partial Class OC
|
|||||||
|
|
||||||
If objOC.GetOC(pCveOrdenCompra, CveEmpresaActual, CveUsuario:=UsuarioActual.CveUsuario) AndAlso objOC.DtResultados.Rows.Count > 0 Then
|
If objOC.GetOC(pCveOrdenCompra, CveEmpresaActual, CveUsuario:=UsuarioActual.CveUsuario) AndAlso objOC.DtResultados.Rows.Count > 0 Then
|
||||||
CveEmpresaActual = objOC.CveEmpresa
|
CveEmpresaActual = objOC.CveEmpresa
|
||||||
|
If CveEmpresaActual > 0 Then
|
||||||
|
EmpresaActualOC = CreaObjetoEmpresa(CveEmpresaActual)
|
||||||
|
End If
|
||||||
InicializarValores()
|
InicializarValores()
|
||||||
|
|
||||||
ViewState("CveOrdenCompra") = pCveOrdenCompra
|
ViewState("CveOrdenCompra") = pCveOrdenCompra
|
||||||
@@ -4956,6 +4970,27 @@ Partial Class OC
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Function CreaObjetoEmpresa(CveEmpresa As Integer) As Empresa
|
||||||
|
Dim Retorno As Empresa = Nothing
|
||||||
|
|
||||||
|
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||||
|
If ObjEmpresa.GetEmpresas(CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||||
|
If ObjEmpresa.GetEmpresasFuncionalidades(CveEmpresa) Then
|
||||||
|
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||||
|
|
||||||
|
Dim EmpresasFuncionalidades As New HybridDictionary
|
||||||
|
For Each Row As Data.DataRow In dttmp.Rows
|
||||||
|
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||||
|
Next
|
||||||
|
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Retorno = ObjEmpresa.Empresa
|
||||||
|
End If
|
||||||
|
ObjEmpresa.Dispose()
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region " GUARDA DIRECTO "
|
#Region " GUARDA DIRECTO "
|
||||||
Private Sub GuardaBitacora(Optional EsCotizacion As Boolean = False)
|
Private Sub GuardaBitacora(Optional EsCotizacion As Boolean = False)
|
||||||
@@ -4974,7 +5009,12 @@ Partial Class OC
|
|||||||
If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra, Prioridad:=Prioridad) Then
|
If ObjEventoBitacora.AddEventoBitacora(descripcion, String.Format("{0}", FileExtension), UsuarioActual.CveUsuario, CveEmpresaActual, CveOC:=CveOrdenCompra, Prioridad:=Prioridad) Then
|
||||||
|
|
||||||
If Filename <> "" Then
|
If Filename <> "" Then
|
||||||
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", CveEmpresaActual))
|
If EmpresaActualOC IsNot Nothing Then
|
||||||
|
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("{0}\OI", EmpresaActualOC.Ruta), ConcatenarDirectorioBase:=False)
|
||||||
|
Else
|
||||||
|
Filename.FilesMove(String.Format("OI{0}", ObjEventoBitacora.CveEvento.ToString), String.Format("Empresas\{0}\OI", CveEmpresaActual))
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||||
@@ -5061,7 +5101,11 @@ Partial Class OC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Filename <> "" Then
|
If Filename <> "" Then
|
||||||
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, DtDetalle.Rows.Count), String.Format("Empresas\{0}\OI\Temp", CveEmpresaActual))
|
If EmpresaActualOC IsNot Nothing Then
|
||||||
|
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, DtDetalle.Rows.Count), String.Format("{0}OI\Temp", EmpresaActualOC.Ruta), ConcatenarDirectorioBase:=False)
|
||||||
|
Else
|
||||||
|
Filename.FilesMove(String.Format("OI{0}{1}", UsuarioActual.CveUsuario, DtDetalle.Rows.Count), String.Format("Empresas\{0}\OI\Temp", CveEmpresaActual))
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
@@ -279,105 +280,75 @@ Partial Class CatMetasVendedores
|
|||||||
Dim ProductosNoCargados As New StringBuilder()
|
Dim ProductosNoCargados As New StringBuilder()
|
||||||
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
|
|
||||||
Dim Correcto As Boolean = False
|
For Each row As DataRow In dt.Rows
|
||||||
Dim TieneError As Boolean = False
|
|
||||||
Dim CveVendedor As Integer = DtVendedores.FiltroPrimeroValor("CveVendedor", String.Format("Vendedor LIKE '%{0}%'", row("Vendedor").ToString().TrimStart().TrimEnd())).ToEntero
|
If Correcto Then
|
||||||
Dim CveClasificacion As Integer = DtClasificaciones.FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion='{0}'", row("Clasificación Superior").ToString().TrimStart().TrimEnd())).ToEntero
|
Dim TieneError As Boolean = False
|
||||||
Dim CveClasificacion2 As Integer = DtClasificaciones2.FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion='{0}'", row("Clasificación").ToString().TrimStart().TrimEnd())).ToEntero
|
Dim CveVendedor As Integer = DtVendedores.FiltroPrimeroValor("CveVendedor", String.Format("trim(Vendedor) LIKE '%{0}%'", row("Vendedor").ToString().TrimStart().TrimEnd())).ToEntero
|
||||||
Dim CveMarca As Integer = DtMarcas.FiltroPrimeroValor("CveMarca", String.Format("Marca='{0}'", row("Marca").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("trim(Clasificacion)='{0}'", row("Clasificación").ToString().TrimStart().TrimEnd())).ToEntero
|
||||||
Dim Mes As Decimal = row("Mes").ToString().ToDecimal()
|
Dim CveMarca As Integer = DtMarcas.FiltroPrimeroValor("CveMarca", String.Format("Marca='{0}'", row("Marca").ToString().TrimStart().TrimEnd())).ToEntero
|
||||||
Dim Anio As Decimal = row("Año").ToString().ToDecimal()
|
|
||||||
Dim Cantidad As Decimal = row("Cantidad").ToString().ToDecimal()
|
Dim Mes As Decimal = row("Mes").ToString().ToDecimal()
|
||||||
Dim Importe As Decimal = row("Importe").ToString().ToDecimal()
|
Dim Anio As Decimal = row("Año").ToString().ToDecimal()
|
||||||
|
Dim Cantidad As Decimal = row("Cantidad").ToString().ToDecimal()
|
||||||
Dim FechaRef As New DateTime(Anio, Mes, 1)
|
Dim Importe As Decimal = row("Importe").ToString().ToDecimal()
|
||||||
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)
|
Dim FechaRef As New DateTime(Anio, Mes, 1)
|
||||||
If Correcto Then
|
If CveVendedor > 0 AndAlso CveVendedor > 0 AndAlso CveClasificacion > 0 AndAlso CveClasificacion2 > 0 AndAlso CveMarca > 0 Then
|
||||||
RowsCargados += 1
|
Correcto = ObjMetas.AddMetasVendedores(CveVendedor, FechaRef, CveMarca, Cantidad, Importe, CveClasificacion2, CveClasificacion, UsuarioActual.CveEmpresa)
|
||||||
End If
|
If Correcto Then
|
||||||
End If
|
RowsCargados += 1
|
||||||
|
End If
|
||||||
If Not Correcto Then
|
End If
|
||||||
RowsNoCargados += 1
|
|
||||||
End If
|
If Not Correcto Then
|
||||||
|
RowsNoCargados += 1
|
||||||
|
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
|
||||||
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
|
ObjMetas.Commit()
|
||||||
MensajeFinal.Append("Las metas se cargaron correctamente. <br/><br/>")
|
If RowsNoCargados = 0 AndAlso RowsCargados > 0 Then
|
||||||
End If
|
MensajeFinal.Append("Las metas se cargaron correctamente. <br/><br/>")
|
||||||
If RowsCargados > 0 Then
|
End If
|
||||||
MensajeFinal.Append("Se cargaron <b>" & RowsCargados & "</b> metas correctamente.")
|
If RowsCargados > 0 Then
|
||||||
End If
|
MensajeFinal.Append("Se cargaron <b>" & RowsCargados & "</b> metas correctamente.")
|
||||||
If RowsNoCargados > 0 Then
|
End If
|
||||||
MensajeFinal.Append("No se pudieron actualizar <b>" & RowsNoCargados & "</b> metas. <br/>")
|
If RowsNoCargados > 0 Then
|
||||||
End If
|
MensajeFinal.Append("No se pudieron actualizar <b>" & RowsNoCargados & "</b> metas. <br/>")
|
||||||
|
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
|
||||||
|
|||||||
@@ -4434,7 +4434,7 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<asp:GridView ID="GvAcum" Width="100%" runat="server" GridLines="None"
|
<asp:GridView ID="GvAcum" Width="100%" runat="server" GridLines="None"
|
||||||
DataKeyNames="CveMovto, CveCliente,Cantidad,CvePSCargo,CveTamaño,Puntos,ImporteCargo,ImporteBonificacion,Cargo,Bonificacion,ImporteCompra,CveConcepto,CveVenta,Observaciones,CveUsuario,FechaIng,FacturadoCargo,FacturadoBonificacion,CveSubProyecto"
|
DataKeyNames="CveMovto, CveCliente,Cantidad,CvePSCargo,CveTamaño,Puntos,ImporteCargo,ImporteBonificacion,Cargo,Bonificacion,ImporteCompra,CveConcepto,CveVenta,Observaciones,CveUsuario,FechaIng,FacturadoCargo,FacturadoBonificacion,CveSubProyecto,TipoEstatus"
|
||||||
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
|
||||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|||||||
@@ -9420,7 +9420,7 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.DataKey("CveConcepto").ToEntero() = 1 Then
|
If e.Row.DataKey("CveConcepto").ToEntero() = 1 AndAlso e.Row.DataKey("TipoEstatus").ToEntero() <> 5 Then
|
||||||
|
|
||||||
Dim FacturadoCargo As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoCargo"))
|
Dim FacturadoCargo As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoCargo"))
|
||||||
Dim FacturadoBonificacion As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoBonificacion"))
|
Dim FacturadoBonificacion As Boolean = Boolean.Parse(e.Row.DataKey("FacturadoBonificacion"))
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1286,6 +1286,7 @@ Partial Class PV
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(569) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(569) = "1" Then
|
||||||
DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem"))
|
DdlTipoComprobante.Items.Add(New ListItem("Remisión", "Rem"))
|
||||||
DdlTipoComprobante.SelectedValueExist("Rem")
|
DdlTipoComprobante.SelectedValueExist("Rem")
|
||||||
|
DdlTipoComprobante_SelectedIndexChanged(DdlTipoComprobante, EventArgs.Empty)
|
||||||
End If
|
End If
|
||||||
DdlTipoDefecto.Width = New Unit(260%)
|
DdlTipoDefecto.Width = New Unit(260%)
|
||||||
|
|
||||||
@@ -5964,7 +5965,7 @@ Partial Class PV
|
|||||||
Case 1 'CREDITO
|
Case 1 'CREDITO
|
||||||
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
TxtFechaPago.Text = Now.AddDays(PlazoCobranza).ToShortDateString
|
||||||
Case 2 'CONTADO
|
Case 2 'CONTADO
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Rem") Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant") Then
|
||||||
DivContado.Visible = True
|
DivContado.Visible = True
|
||||||
TxtImporteContado.Text = TxtTotal.Text
|
TxtImporteContado.Text = TxtTotal.Text
|
||||||
End If
|
End If
|
||||||
@@ -6165,6 +6166,11 @@ Partial Class PV
|
|||||||
Retorno = True
|
Retorno = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DtPagos IsNot Nothing AndAlso DtPagos.SUM("Importe").ToString.ToDecimal() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Rem" Then
|
||||||
|
Alert("Los pagos no deben ser aplicados a una remisión.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Retorno = True
|
||||||
|
End If
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -7315,12 +7321,10 @@ Partial Class PV
|
|||||||
TxtPrecio.Text = TxtPrecio.Text
|
TxtPrecio.Text = TxtPrecio.Text
|
||||||
TxtObsPS.Text = "Descuento por garantía"
|
TxtObsPS.Text = "Descuento por garantía"
|
||||||
Else
|
Else
|
||||||
'For Each Gvr As GridViewRow In GvRecepcionUsados.Rows
|
If TmpDTAjustes IsNot Nothing Then
|
||||||
' If Gvr.RowType = DataControlRowType.DataRow Then
|
TmpDTAjustes.Clear()
|
||||||
' Gvr.FCTextBox("TxtCantidad").Text = ""
|
End If
|
||||||
' Gvr.FCTextBox("TxtCantidad").Enabled = True
|
TxtObsPS.Text = TxtObsPS.Text.Replace("Descuento por garantía", "")
|
||||||
' End If
|
|
||||||
'Next
|
|
||||||
|
|
||||||
DdlRecepcionUsados.SelectedValueExist("-1")
|
DdlRecepcionUsados.SelectedValueExist("-1")
|
||||||
DdlRecepcionUsados.Enabled = True
|
DdlRecepcionUsados.Enabled = 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
|
||||||
|
|||||||
@@ -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, -1, 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, -1, e.Row.DBCampo("CveTipoTransaccion"))
|
||||||
|
|
||||||
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
|
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
|
||||||
|
|
||||||
|
|||||||
@@ -219,6 +219,12 @@
|
|||||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<label id="Label2" class="col-md-1 truncate">Tipo Transacción:</label>
|
||||||
|
<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-1 truncate">F. Registro IE inicio:</div>
|
||||||
<div class="col-md-1" style="padding-left: 0px !important;">
|
<div class="col-md-1" 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; ">
|
||||||
@@ -249,6 +255,7 @@
|
|||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -133,10 +133,11 @@ 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
|
||||||
FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
||||||
If FechaF <> "-1" Then
|
If FechaF <> "-1" Then
|
||||||
@@ -186,6 +187,7 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
CveClienteClasificacion = IfNull(Request("CveClienteClasificacion"), "-1").ToString.ToEntero
|
CveClienteClasificacion = IfNull(Request("CveClienteClasificacion"), "-1").ToString.ToEntero
|
||||||
Tipo = IfNull(Request("Tipo"), "-1").ToString.ToEntero
|
Tipo = IfNull(Request("Tipo"), "-1").ToString.ToEntero
|
||||||
EsDistribuidor = IfNull(Request("EsDistribuidor"), "-1").ToString.ToEntero
|
EsDistribuidor = IfNull(Request("EsDistribuidor"), "-1").ToString.ToEntero
|
||||||
|
Dim CveTipoTransaccion As Integer = IfNull(Request("CveTipoTransaccion"), "-1").ToString.ToEntero
|
||||||
|
|
||||||
'Carga Clasificacion Cliente'
|
'Carga Clasificacion Cliente'
|
||||||
Dim ObjCliente As New ClsClientes
|
Dim ObjCliente As New ClsClientes
|
||||||
@@ -230,6 +232,7 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
DdlClienteClasificacion.SelectedValueExist(CveClienteClasificacion)
|
DdlClienteClasificacion.SelectedValueExist(CveClienteClasificacion)
|
||||||
DdlClienteSucursal.SelectedValueExist(CveClienteSucursal)
|
DdlClienteSucursal.SelectedValueExist(CveClienteSucursal)
|
||||||
DdlDistribuidor.SelectedValueExist(EsDistribuidor)
|
DdlDistribuidor.SelectedValueExist(EsDistribuidor)
|
||||||
|
DdlTipoTransaccion.SelectedValueExist(CveTipoTransaccion)
|
||||||
|
|
||||||
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) Then
|
||||||
|
|
||||||
GvDatos.DataSource = ObjMovtos.DtResultados
|
GvDatos.DataSource = ObjMovtos.DtResultados
|
||||||
DtDatos = ObjMovtos.DtResultados
|
DtDatos = ObjMovtos.DtResultados
|
||||||
|
|||||||
@@ -6602,6 +6602,30 @@ Partial Class Ventas
|
|||||||
LnkOCs.Visible = False
|
LnkOCs.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
Dim Autorizacion As Integer = 0
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
|
||||||
|
Dim RowAutorizacion As DataRow = Nothing
|
||||||
|
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||||
|
If TieneDiasVencidos Then
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||||
|
Else
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RowAutorizacion IsNot Nothing Then
|
||||||
|
Autorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||||
|
If Autorizacion > 0 Then
|
||||||
|
BtnsFacturar.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -6620,6 +6644,32 @@ Partial Class Ventas
|
|||||||
DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización")
|
DdlTipoComprobante.SelectedValueExistInsert("Cot", "Cotización")
|
||||||
End If
|
End If
|
||||||
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
|
||||||
|
|
||||||
|
If EsCotizacion AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
Dim Autorizacion As Integer = 0
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
|
||||||
|
Dim RowAutorizacion As DataRow = Nothing
|
||||||
|
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||||
|
If TieneDiasVencidos Then
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||||
|
Else
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RowAutorizacion IsNot Nothing Then
|
||||||
|
Autorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||||
|
If Autorizacion > 0 Then
|
||||||
|
BtnsFacturar.Visible = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -6753,10 +6803,39 @@ Partial Class Ventas
|
|||||||
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
Dim Opcion As Integer = Vta.ObtenerClienteLimitesVenta(CveCliente, UsuarioActual.CveEmpresa)
|
||||||
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
Dim OpcionMsg As String = String.Format("El Cliente se encuentra bloqueado por la siguiente razón: <br> <br> {0}", Vta.SerieVenta)
|
||||||
Vta.Dispose()
|
Vta.Dispose()
|
||||||
If Opcion > 0 Then
|
|
||||||
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
BtnsFacturar.Visible = False
|
Dim Autorizacion As Integer = 0
|
||||||
BtnGenerarRemision.Visible = False
|
|
||||||
|
Dim ObjVentas As New ClsVentas
|
||||||
|
If ObjVentas.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero, "Ing", CveEstatus:=1) Then
|
||||||
|
Dim RowAutorizacion As DataRow = Nothing
|
||||||
|
'SI TIENE DIAS VENCIDOS BUSCAR POR TIPO VENCIMIENTO
|
||||||
|
If TieneDiasVencidos Then
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion IN(1,2) AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||||
|
Else
|
||||||
|
RowAutorizacion = ObjVentas.DtResultados.FiltroPrimero($"TipoAutorizacion = 1 AND CveVenta IS NULL AND CveTipoDocumento='Ing'", Orderby:="Importe DESC")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If RowAutorizacion IsNot Nothing Then
|
||||||
|
Autorizacion = RowAutorizacion("CveAutorizacion").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
'SI NO TIENE AUTORIZACION, MANTIENE EL BLOQUEO POR CONDICIONES DE CREDITO
|
||||||
|
If Opcion > 0 AndAlso Autorizacion <= 0 Then
|
||||||
|
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
|
BtnsFacturar.Visible = False
|
||||||
|
BtnGenerarRemision.Visible = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
If Opcion > 0 Then
|
||||||
|
Alert(OpcionMsg, TipoMensaje.MsgAdvertencia)
|
||||||
|
BtnsFacturar.Visible = False
|
||||||
|
BtnGenerarRemision.Visible = False
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user