Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -111,8 +111,8 @@ Public Class ClsClientes
|
||||
Public Property ExtOtros As String
|
||||
Public Property CveUsoCFDI As Integer
|
||||
Public Property CveRegimenFiscal As Integer
|
||||
Public Property CveFormaPago33 As Integer
|
||||
Public Property CveMetodoPago33 As Integer
|
||||
Public Property CveFormaPago As Integer
|
||||
Public Property CveMetodoPago As Integer
|
||||
Public Property CveClienteCorporativo As String
|
||||
Public Property DesglosaIEPS As Boolean
|
||||
Public Property NoDesglosaIVA As Boolean
|
||||
@@ -332,8 +332,6 @@ Public Class ClsClientes
|
||||
_TipoPago = Data.Rows(0)("TipoPago").ToString
|
||||
_FormaFacturacion = Data(0)("FormaFacturacion").ToString
|
||||
_LimiteCredito = Data(0)("LimiteCredito").ToString.ToDouble
|
||||
'_NumCtaPago = Data(0)("NumCtaPago").ToString
|
||||
'_CveMetodoPago = Data(0)("CveMetodoPago").ToString.ToEntero
|
||||
_AplicaFEMSA = CBool(Data(0)("AplicaFEMSA").ToString)
|
||||
_FEMSA_NumSociedad = Data(0)("FEMSA_NumSociedad").ToString
|
||||
_FEMSA_NumProveedor = Data(0)("FEMSA_NumProveedor").ToString
|
||||
@@ -375,8 +373,8 @@ Public Class ClsClientes
|
||||
|
||||
|
||||
_CveUsoCFDI = Data(0)("CveUsoCFDI").ToString.ToEntero
|
||||
_CveFormaPago33 = Data(0)("CveFormaPago").ToString.ToEntero
|
||||
_CveMetodoPago33 = Data(0)("CveMetodoPago").ToString.ToEntero
|
||||
_CveFormaPago = Data(0)("CveFormaPago").ToString.ToEntero
|
||||
_CveMetodoPago = Data(0)("CveMetodoPago").ToString.ToEntero
|
||||
|
||||
_CveRegimenFiscal = Data(0)("CveRegimenFiscal").ToString.ToEntero
|
||||
|
||||
|
||||
@@ -594,7 +594,7 @@ Public Class ClsMovimientos
|
||||
Public Function GetCxPEmpresa(CveProveedor As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveSubProyecto As Integer, DiasVencidos As Integer, CveUsuarioRegistro As Integer,
|
||||
CveUsuarioProgramo As Integer, CveUsuarioResponsable As Integer, CveClasificacion As Integer, CveMoneda As Integer, CveTipoPagoProgramo As Integer, CveEstatusFactura As Integer,
|
||||
CveAplicaNC As Integer, CveEmpresa As Integer, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveTipoProveedor As Integer = 0,
|
||||
Optional AgrupadoPorSubProyecto As Boolean = False) As Boolean
|
||||
Optional AgrupadoPorSubProyecto As Boolean = False, Optional VerEnPesos As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_Proveedores")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -616,7 +616,8 @@ Public Class ClsMovimientos
|
||||
.Add("@FechaVF", SqlDbType.VarChar).Value = FechaVF
|
||||
.Add("@CodigoProgramacion", SqlDbType.VarChar).Value = CodigoProgramacion
|
||||
.Add("@CveTipoProveedor", SqlDbType.TinyInt).Value = CveTipoProveedor
|
||||
.Add("@AgrupadoPorSubProyecto", SqlDbType.Bit).Value = AgrupadoPorSubProyecto
|
||||
.Add("@AgrupadoPorSubProyecto", SqlDbType.Bit).Value = AgrupadoPorSubProyecto
|
||||
.Add("@VerEnPesos", SqlDbType.Bit).Value = VerEnPesos
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -131,6 +131,8 @@ Public Class ClsOC
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property DiasCreditoOC As Integer = 0
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -695,6 +697,7 @@ Public Class ClsOC
|
||||
CveProveedorContacto = If(Not IsDBNull(dr("CveProveedorContacto")), dr("CveProveedorContacto").ToString.ToEntero, -1)
|
||||
NumRemision = dr("NumRemision").ToString
|
||||
PorcentajeProntoPago = dr("PorcentajeProntoPago").ToString.ToDecimal
|
||||
DiasCreditoOC = dr("DiasCreditoOC").ToString.ToEntero
|
||||
|
||||
Retorno = True
|
||||
ElseIf Data.Rows.Count > 0 Then
|
||||
@@ -715,7 +718,7 @@ Public Class ClsOC
|
||||
Optional PorcentajeIVA As Decimal = 0.16D, Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional FechaExpiracion As Date = Nothing, Optional CveCotizacion As Integer = -1,
|
||||
Optional FolioAdicional As String = "", Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1,
|
||||
Optional CveIEAnticipo As Integer = -1, Optional ImporteAnticipo As Decimal = 0, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1", Optional CveProveedorContacto As Integer = -1, Optional NumRemision As String = "-1",
|
||||
Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1, Optional CveSubProyectoEntrega As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean
|
||||
Optional CveColectiva As Integer = -1, Optional MetodoPago As Integer = -1, Optional CveSubProyectoEntrega As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0, Optional DiasCreditoOC As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraAdd")
|
||||
@@ -763,10 +766,13 @@ Public Class ClsOC
|
||||
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito
|
||||
.Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega ' 0 Contado, 1 Credito
|
||||
.Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago
|
||||
.Add("@DiasCreditoOC", SqlDbType.Int).Value = DiasCreditoOC
|
||||
|
||||
.Add("@vCveOrdenCompra", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vFolio", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
.Add("@vSerieFolio", SqlDbType.VarChar, 25).Direction = ParameterDirection.Output
|
||||
|
||||
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -929,7 +935,7 @@ Public Class ClsOC
|
||||
Optional IVA As Decimal = 0, Optional RetIVA As Decimal = 0, Optional RetISR As Decimal = 0, Optional IDPoliza As Integer = -1, Optional FechaExpiracion As Date = Nothing, Optional FolioAdicional As String = "",
|
||||
Optional EntregaDirecta As Integer = -1, Optional CveDireccionEnvio As Integer = -1, Optional Guia As String = "-1", Optional IEPS As Decimal = -1, Optional UsoCFDI As Integer = -1, Optional Promocion As String = "-1",
|
||||
Optional pCveProveedorSucursal As Integer = -1, Optional CveProveedorContacto As Integer = -1, Optional PorcentajeIVA As Decimal = 0.16D, Optional NumRemision As String = "-1", Optional MetodoPago As Integer = -1,
|
||||
Optional CveSubProyectoEntrega As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean
|
||||
Optional CveSubProyectoEntrega As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0, Optional DiasCreditoOC As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OC_OrdenesCompraUpdate")
|
||||
@@ -967,6 +973,7 @@ Public Class ClsOC
|
||||
.Add("@MetodoPago", SqlDbType.Int).Value = MetodoPago ' 0 Contado, 1 Credito
|
||||
.Add("@CveSubProyectoEntrega", SqlDbType.Int).Value = CveSubProyectoEntrega
|
||||
.Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago
|
||||
.Add("@DiasCreditoOC", SqlDbType.Int).Value = DiasCreditoOC
|
||||
|
||||
|
||||
End With
|
||||
|
||||
@@ -1142,7 +1142,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0, Optional EstadoCancelacion As String = "", Optional CveEstadoCancelacion As Integer = 0) As Boolean
|
||||
Public Function UpdateCancelaVenta(CveVenta As Integer, FechaCancelacion As DateTime, SelloCancelacionSAT As String, CveEmpresa As Integer, Optional CvePAC As Integer = -1, Optional CveEstatusRefacturacion As Integer = 0, Optional EstadoCancelacion As String = "", Optional CveEstadoCancelacion As Integer = 0, Optional CveEstatusFactura As Integer = 5) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Vta_VentasCancelacion")
|
||||
@@ -1156,6 +1156,7 @@ Public Class ClsVentas
|
||||
.Add("@CveEstatusRefacturacion", SqlDbType.TinyInt).Value = CveEstatusRefacturacion
|
||||
.Add("@EstadoCancelacion", SqlDbType.VarChar).Value = EstadoCancelacion
|
||||
.Add("@CveEstadoCancelacion", SqlDbType.TinyInt).Value = CveEstadoCancelacion
|
||||
.Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura
|
||||
.Add("@Cancelada", SqlDbType.SmallInt).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
|
||||
@@ -3574,21 +3574,6 @@ Namespace Modelos
|
||||
End If
|
||||
Next
|
||||
|
||||
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
|
||||
'SIRVE PARA VER LA PREPOLIZA QUE SE VALIDA
|
||||
'If ObjConta.GetPrePolizasDetalle(ObjFactura.CvePrePoliza) Then
|
||||
' Dim DtTest = ObjConta.DtResultados
|
||||
'End If
|
||||
End If
|
||||
|
||||
importeMovimiento = 0
|
||||
importeMX = 0
|
||||
End If
|
||||
|
||||
If ErrorPrepoliza Then
|
||||
Exit For
|
||||
End If
|
||||
@@ -3651,15 +3636,12 @@ Namespace Modelos
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=5) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
ErrorPrepoliza = True
|
||||
GuardaLogAD($"Ventas/Ventas-ProcesoPrePolizas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{ObjFactura.CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
importeMovimiento = 0
|
||||
importeMX = 0
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -5656,7 +5638,7 @@ Namespace Modelos
|
||||
''' <param name="FechaCancelacion"></param>
|
||||
''' <param name="AcuseCancelacion"></param>
|
||||
''' <returns></returns>
|
||||
Public Function EjecutarCancelacionPendiente(CveEstatus As Integer, FechaCancelacion As DateTime, AcuseCancelacion As String, Optional ValidarSAT As Boolean = True, Optional CancelacionPagos As OpcionesCancelacionPagos = OpcionesCancelacionPagos.SinPagos) As MCancelacionVentaMensaje
|
||||
Public Function EjecutarCancelacionPendiente(CveEstatus As Integer, FechaCancelacion As DateTime, AcuseCancelacion As String, Optional ValidarSAT As Boolean = True, Optional CancelacionPagos As OpcionesCancelacionPagos = OpcionesCancelacionPagos.SinPagos, Optional CvePACEspecifico As Integer = -1) As MCancelacionVentaMensaje
|
||||
Dim ListaRemisionesCancelar As New List(Of Integer)
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetRemisionesXCancelar(Me.CveVenta) Then
|
||||
@@ -5666,7 +5648,7 @@ Namespace Modelos
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
Return CancelarVenta(Me, Me.UsuarioActual, RealizarDevolucionAlmacen:=Me.RealizarDevolucionAlmacen, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveEstatusFacturaAsignado:=CveEstatus, FechaCancelacion:=FechaCancelacion.ToString("dd/MM/yyyy hh:mm:ss"), AcuseCancelacion:=AcuseCancelacion, CveMotivoCancelacion:=Me.CveMotivoCancelacion, MotivoCancelacion:=Me.MotivoCancelacion, ValidarSAT:=ValidarSAT, CancelacionPagos:=CancelacionPagos)
|
||||
Return CancelarVenta(Me, Me.UsuarioActual, RealizarDevolucionAlmacen:=Me.RealizarDevolucionAlmacen, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveEstatusFacturaAsignado:=CveEstatus, FechaCancelacion:=FechaCancelacion.ToString("dd/MM/yyyy hh:mm:ss"), AcuseCancelacion:=AcuseCancelacion, CveMotivoCancelacion:=Me.CveMotivoCancelacion, MotivoCancelacion:=Me.MotivoCancelacion, ValidarSAT:=ValidarSAT, CancelacionPagos:=CancelacionPagos, CvePACEspecifico:=CvePACEspecifico)
|
||||
End Function
|
||||
''' <summary>
|
||||
''' Cancela la factura para poder realizar la refacturacion
|
||||
@@ -5681,16 +5663,18 @@ Namespace Modelos
|
||||
''' <param name="RealizarDevolucionAlmacen"></param>
|
||||
''' <param name="ListaRemisionesCancelar"></param>
|
||||
''' <returns></returns>
|
||||
Public Function CancelarFactura(RealizarDevolucionAlmacen As Integer, Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveMotivoCancelacion As Integer = -1, Optional Motivo As String = "", Optional ValidarSAT As Boolean = True, Optional CveEstadoCancelacion As Integer = 0, Optional CancelarBoletos As Boolean = False, Optional ForzarDevolucion As Boolean = False, Optional CancelacionPagos As OpcionesCancelacionPagos = OpcionesCancelacionPagos.SinPagos) As MCancelacionVentaMensaje
|
||||
Public Function CancelarFactura(RealizarDevolucionAlmacen As Integer, Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveMotivoCancelacion As Integer = -1, Optional Motivo As String = "", Optional ValidarSAT As Boolean = True, Optional CveEstadoCancelacion As Integer = 0, Optional CancelarBoletos As Boolean = False, Optional ForzarDevolucion As Boolean = False, Optional CancelacionPagos As OpcionesCancelacionPagos = OpcionesCancelacionPagos.SinPagos, Optional CveEstatusFacturaAsignado As Integer = -1, Optional CvePACEspecifico As Integer = -1) As MCancelacionVentaMensaje
|
||||
'Comprobante emitido con errores sin relación
|
||||
Return CancelarVenta(Me, Me.UsuarioActual, RealizarDevolucionAlmacen:=RealizarDevolucionAlmacen, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo, CveEstadoCancelacion:=CveEstadoCancelacion, CancelarBoletos:=CancelarBoletos, ForzarDevolucion:=ForzarDevolucion, CancelacionPagos:=CancelacionPagos)
|
||||
Return CancelarVenta(Me, Me.UsuarioActual, RealizarDevolucionAlmacen:=RealizarDevolucionAlmacen, ListaRemisionesCancelar:=ListaRemisionesCancelar, CveMotivoCancelacion:=CveMotivoCancelacion, MotivoCancelacion:=Motivo, CveEstadoCancelacion:=CveEstadoCancelacion, CancelarBoletos:=CancelarBoletos, ForzarDevolucion:=ForzarDevolucion, CancelacionPagos:=CancelacionPagos, CveEstatusFacturaAsignado:=CveEstatusFacturaAsignado, ValidarSAT:=ValidarSAT, CvePACEspecifico:=CvePACEspecifico)
|
||||
End Function
|
||||
|
||||
Private Function CancelarVenta(ObjFactura As Modelos.Factura, UsuarioActual As Usuario, Optional EsRefacturacion As Boolean = False, Optional RealizarDevolucionAlmacen As Integer = 0,
|
||||
Optional ListaRemisionesCancelar As List(Of Integer) = Nothing, Optional CveEstatusFacturaAsignado As Integer = -1, Optional FechaCancelacion As String = "-1",
|
||||
Optional AcuseCancelacion As String = "", Optional CveMotivoCancelacion As Integer = -1, Optional MotivoCancelacion As String = "",
|
||||
Optional FolioSustitucion As String = "", Optional ValidarSAT As Boolean = True, Optional CveEstadoCancelacion As Integer = 0,
|
||||
Optional CancelarBoletos As Boolean = False, Optional ForzarDevolucion As Boolean = False, Optional CancelacionPagos As OpcionesCancelacionPagos = OpcionesCancelacionPagos.SinPagos) As MCancelacionVentaMensaje
|
||||
Optional CancelarBoletos As Boolean = False, Optional ForzarDevolucion As Boolean = False, Optional CancelacionPagos As OpcionesCancelacionPagos = OpcionesCancelacionPagos.SinPagos,
|
||||
Optional CvePACEspecifico As Integer = -1) As MCancelacionVentaMensaje
|
||||
|
||||
Dim Retorno As New MCancelacionVentaMensaje()
|
||||
Dim ErrorList As New List(Of String)
|
||||
|
||||
@@ -5887,6 +5871,10 @@ Namespace Modelos
|
||||
CvePACCancelacion = UsuarioActual.Empresa.CvePAC
|
||||
End If
|
||||
|
||||
If CvePACEspecifico > 0 Then
|
||||
CvePACCancelacion = CvePACEspecifico
|
||||
End If
|
||||
|
||||
Dim CveEstatus As Integer = 4
|
||||
Dim IDPoliza As Integer = -1
|
||||
Dim CvePrePoliza As Integer
|
||||
|
||||
@@ -220,9 +220,6 @@ Public Class Timbrado
|
||||
'dim Error
|
||||
If CvePACCancelacion = 3 Then ValidaFactura = False
|
||||
|
||||
'TEMPORAL. PARCHE PARA CANCELAR DOCUMENTOS EMITIDOS CON EL PAC 5
|
||||
If CvePACCancelacion = 5 Then CvePACCancelacion = 4
|
||||
|
||||
If Not (Empresa.Funcionalidad(529) = "1") Then
|
||||
If ValidaFactura Then
|
||||
Dim Vigencia As AcuseCancelacionSAT = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||
@@ -355,7 +352,7 @@ Public Class Timbrado
|
||||
Dim UsuarioServicio As String = If(CvePACCancelacion = 2, Empresa.RFC, "rene.molina@adsistemas.mx")
|
||||
Dim ClaveServicio As String = If(CvePACCancelacion = 2, Empresa.RFC.ToLower, "rene2018")
|
||||
Dim Clave As String = Empresa.ContraseñaKey
|
||||
Dim UrlServicio As String = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL" ' Produccion
|
||||
Dim UrlServicio As String = "https://cfdi.gofac.com.mx/timbrado.asmx" ' Produccion
|
||||
|
||||
If Not Empresa.FacturaProduccion Then
|
||||
ArchivoLLave = $"{Empresa.Ruta}Certificados\CSD01_ZUÑ920208KL4.key"
|
||||
@@ -363,6 +360,7 @@ Public Class Timbrado
|
||||
|
||||
UsuarioServicio = "UserTest"
|
||||
ClaveServicio = "1234567890"
|
||||
UrlServicio = "https://servicios.gofac.com.mx/cancelacion.asmx" ' Produccion
|
||||
End If
|
||||
#Region "Valida"
|
||||
If Not File.Exists(ArchivoCertificado) Then
|
||||
@@ -522,31 +520,33 @@ Public Class Timbrado
|
||||
End Select
|
||||
|
||||
'valida que si se halla cancelado
|
||||
|
||||
If Retorno.Verificado Then
|
||||
Dim VigenciaExtra As AcuseCancelacionSAT = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||
If VigenciaExtra IsNot Nothing Then
|
||||
If VigenciaExtra.Estado.ToUpper = "VIGENTE" AndAlso VigenciaExtra.EstatusCancelacion.ToUpper.Contiene("EN PROCESO") Then
|
||||
Retorno.Estado = "EN PROCESO"
|
||||
Retorno.CveEstatus = 20
|
||||
'CUANDO ESTA EN PROCESO EL ACUSE DEBE SER DE SOLICITUD DE CANCELACION
|
||||
Retorno.SolicitudCancelacionAcuse = Retorno.CancelacionAcuse
|
||||
Retorno.CancelacionAcuse = ""
|
||||
ElseIf VigenciaExtra.Estado.ToUpper = "CANCELADO" Then
|
||||
Retorno.Estado = "CANCELADO"
|
||||
Retorno.CveEstatus = 5
|
||||
Else
|
||||
Retorno.Estado = "VIGENTE"
|
||||
Retorno.CveEstatus = 23
|
||||
'SI HAY UN ACUSE, GUARDARLO COMO ACUSE DE SOLICITUD
|
||||
If Not String.IsNullOrEmpty(Retorno.CancelacionAcuse) Then
|
||||
If Not (Empresa.Funcionalidad(529) = "1") Then
|
||||
If Retorno.Verificado Then
|
||||
Dim VigenciaExtra As AcuseCancelacionSAT = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True)
|
||||
If VigenciaExtra IsNot Nothing Then
|
||||
If VigenciaExtra.Estado.ToUpper = "VIGENTE" AndAlso VigenciaExtra.EstatusCancelacion.ToUpper.Contiene("EN PROCESO") Then
|
||||
Retorno.Estado = "EN PROCESO"
|
||||
Retorno.CveEstatus = 20
|
||||
'CUANDO ESTA EN PROCESO EL ACUSE DEBE SER DE SOLICITUD DE CANCELACION
|
||||
Retorno.SolicitudCancelacionAcuse = Retorno.CancelacionAcuse
|
||||
Retorno.CancelacionAcuse = ""
|
||||
ElseIf VigenciaExtra.Estado.ToUpper = "CANCELADO" Then
|
||||
Retorno.Estado = "CANCELADO"
|
||||
Retorno.CveEstatus = 5
|
||||
Else
|
||||
Retorno.Estado = "VIGENTE"
|
||||
Retorno.CveEstatus = 23
|
||||
'SI HAY UN ACUSE, GUARDARLO COMO ACUSE DE SOLICITUD
|
||||
If Not String.IsNullOrEmpty(Retorno.CancelacionAcuse) Then
|
||||
Retorno.SolicitudCancelacionAcuse = Retorno.CancelacionAcuse
|
||||
Retorno.CancelacionAcuse = ""
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If Not Retorno.Verificado Then
|
||||
GuardaLog($"****** Error al cancelar factura ****** Estatus: {CancelacionState} | Mensaje: {CancelacionMensaje} | Mensaje SAT: {MsgCancelacion.ToString} ")
|
||||
End If
|
||||
@@ -993,7 +993,7 @@ Public Class Timbrado
|
||||
' Retorno = If(Ret = "", True, False)
|
||||
|
||||
Case 3
|
||||
Retorno = TimbrarFacturaProFactV40(UsuarioActual, Ventas)
|
||||
Retorno = TimbrarFacturaProFactv40(UsuarioActual, Ventas)
|
||||
Case 4
|
||||
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
|
||||
If Ret <> "" Then MensajeErrorCFDI = Ret
|
||||
@@ -2572,12 +2572,12 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
||||
If Carta.RegimenAduanero <> "" Then cfdi.CartaPorte31RegimenAduaneroCCP(Carta.RegimenAduanero)
|
||||
'UBICACIONES
|
||||
If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then
|
||||
For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
|
||||
For Each ubica As CFDICartaPorteUbicacion In Carta.Ubicaciones
|
||||
'origen
|
||||
cfdi.CartaPorte31Ubicacion(ubica.TipoUbicacion, ubica.IDUbicacion, ubica.RFCRemitenteDestinatario, ubica.NombreRemitenteDestinatario, ubica.NumRegIdTrib, ubica.ResidenciaFiscal, ubica.NumEstacion, ubica.NombreEstacion, ubica.NavegacionTrafico, ubica.FechaHoraSalidaLlegada, ubica.TipoEstacion, ubica.DistanciaRecorrida)
|
||||
cfdi.CartaPorte31Domicilio(ubica.Domicilio.Calle, ubica.Domicilio.NumeroExterior, ubica.Domicilio.NumeroInterior, ubica.Domicilio.Colonia, ubica.Domicilio.Localidad, ubica.Domicilio.Referencia, ubica.Domicilio.Municipio, ubica.Domicilio.Estado, ubica.Domicilio.Pais, ubica.Domicilio.CP)
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
'MERCANCIAS
|
||||
If Carta.Mercancias IsNot Nothing Then
|
||||
@@ -2898,6 +2898,8 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
||||
UsuarioServicio = "UserTest"
|
||||
ClaveServicio = "1234567890"
|
||||
UsuarioActual.Empresa.CodigoRegimenFiscal = "601"
|
||||
|
||||
UrlServicio = "https://pruebas.gofac.com.mx/timbrado.asmx?WSDL"
|
||||
End If
|
||||
|
||||
#Region "Valida"
|
||||
@@ -2957,7 +2959,7 @@ concep.DescripcionesEspecificas.NumeroSerie)
|
||||
#Region "Timbra"
|
||||
If RespGeneracionXML = "" Then
|
||||
|
||||
cfdi.TimbrarCfdi(UsuarioServicio, ClaveServicio, TimbraProduccion)
|
||||
cfdi.TimbrarCfdi(UsuarioServicio, ClaveServicio, TimbraProduccion, UrlServicio)
|
||||
|
||||
sw.Stop()
|
||||
swTiempo.AppendFormat("Timbrado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||
|
||||
@@ -269,6 +269,7 @@ Partial Class Bancos_DepositosCaja
|
||||
Dim CveSubProyectoIntermediario As Integer
|
||||
Dim CveClasificacionIntermediario As Integer
|
||||
Dim CveProveedorIntermediario As Integer = -1
|
||||
Dim tSubProyectoDeposito As String = ""
|
||||
|
||||
If drOrigen IsNot Nothing Then
|
||||
CveMoneda = drOrigen("CveMoneda").ToString.ToEntero
|
||||
@@ -347,13 +348,13 @@ Partial Class Bancos_DepositosCaja
|
||||
'se saca de la cuenta de la caja chica
|
||||
CveSubProyecto = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCajaChica.SelectedValue.ToEntero, Estatus:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero()
|
||||
End If
|
||||
|
||||
End If
|
||||
tSubProyectoDeposito = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyecto:=CveSubProyecto).FiltroPrimeroValor("SubProyecto")
|
||||
|
||||
If FolioIE <= 0 Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", 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 - {tSubProyectoDeposito}", TotalImporte, CveMoneda, 1, TxtObservaciones.Text, "", 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)
|
||||
|
||||
@@ -363,7 +364,7 @@ Partial Class Bancos_DepositosCaja
|
||||
CveSubProyectoComision = DdlSubProyectoDeposito.SelectedValue.ToEntero
|
||||
CveClasificacionComision = DdlClasificacion.SelectedValue.ToEntero
|
||||
If Comision <> 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, "Depósito Bancario", "Depósito Bancario", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Comision, Comision * TipoCambio, 78, $"Depósito Bancario - {tSubProyectoDeposito}", $"Depósito Bancario - {tSubProyectoDeposito}", CveClasificacion:=CveClasificacionComision, CveSubProyecto:=CveSubProyectoComision) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
@@ -384,9 +385,9 @@ Partial Class Bancos_DepositosCaja
|
||||
If Not OcurrioError AndAlso ChkCuentaRetorno.Checked Then
|
||||
CveTransaccionBanco = 13
|
||||
FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco)
|
||||
Dim CveIEOrigenRetorno As Integer = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, "Retorno Depósito Bancario", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim CveIEOrigenRetorno As Integer = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, CveTransaccionBanco, Fecha, FolioIE.ToString, $"Retorno Depósito Bancario - {tSubProyectoDeposito}", CuentaRetorno, CveMoneda, 1, TxtObservaciones.Text, "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, CuentaRetorno, CuentaRetorno * TipoCambio, 30, "Depósito Bancario", TxtCuentaRetornoObs.Text.Trim, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(NuevaCvePrePoliza, False, CuentaRetorno, CuentaRetorno * TipoCambio, 30, $"Depósito Bancario - {tSubProyectoDeposito}", TxtCuentaRetornoObs.Text.Trim, CveClasificacion:=CveClasificacionDescuento, CveSubProyecto:=CveSubProyecto, CveIE:=CveIEOrigenRetorno) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
End If
|
||||
@@ -531,10 +532,8 @@ Partial Class Bancos_DepositosCaja
|
||||
End If
|
||||
|
||||
If ObjMovtos.GetRemisionesCobranza(UsuarioActual.CveEmpresa, CveSubProyecto, FechaI, FechaF, UsuarioActual.CveUsuario) Then
|
||||
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND (CveUsuarioCobranza IS NULL OR CveUsuarioCobranza = {UsuarioActual.CveUsuario}) AND TipoDocto IN ('Ing','Rem') AND RemisionEspecial = 0")
|
||||
'Dim Dtta As DataTable = dtt.FiltraParametros($"CveUsuarioCobranza = {UsuarioActual.CveUsuario} ")
|
||||
'If Dtta IsNot Nothing AndAlso Dtta.Rows.Count > 0 Then dtt = Dtta
|
||||
|
||||
Dim dtt As DataTable = ObjMovtos.DtResultados.FiltraParametros($"CveVenta > 0 AND TipoDocto IN ('Ing','Rem') AND RemisionEspecial = 0")
|
||||
'deben de estar consideradas las que están en proceso de cobro, por algún otro usuario.
|
||||
If dtt.Rows.Count = 0 Then
|
||||
Respuesta = True
|
||||
Else
|
||||
@@ -543,7 +542,7 @@ Partial Class Bancos_DepositosCaja
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert("Error al consultarcobros pendientes.", TipoMensaje.MsgAdvertencia)
|
||||
Alert("Error al consultar cobros pendientes.", TipoMensaje.MsgAdvertencia)
|
||||
Respuesta = False
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
@@ -951,7 +951,8 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
LblPagarA.Visible = True
|
||||
LblPagarA.Text = ObjIE.PagueseA
|
||||
If CveCliente > 0 Then
|
||||
DdlCliente.SelectedText = ObjIE.PagueseA
|
||||
DdlCliente.SelectedValue = CveCliente.ToString
|
||||
@@ -959,9 +960,6 @@ Partial Class Bancos_IE
|
||||
DdlCliente.Visible = False
|
||||
DdlCliente.Enabled = False
|
||||
|
||||
LblPagarA.Visible = True
|
||||
LblPagarA.Text = ObjIE.PagueseA
|
||||
|
||||
' LnkEmitirComplemento.Visible = True
|
||||
ElseIf CveProveedor > 0 Then
|
||||
DdlProveedores.SelectedText = ObjIE.PagueseA
|
||||
@@ -969,10 +967,6 @@ Partial Class Bancos_IE
|
||||
DdlProveedores.Visible = False
|
||||
DdlProveedores.Enabled = False
|
||||
|
||||
LblPagarA.Visible = True
|
||||
LblPagarA.Text = ObjIE.PagueseA
|
||||
|
||||
|
||||
'Se prepara para la generacion del envio de correo con notificacion de pago
|
||||
LnkEnviarMailPago.Attributes.Add("onclick", "$('#ModalDivMail').modal();")
|
||||
LnkEnviarMailPago.Visible = True
|
||||
@@ -984,10 +978,10 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
'SI TIENE EL DATO DEBE MOSTRALO
|
||||
If UsuarioActual.CveEmpresa = 119 AndAlso LblPagueseA.Text = "Beneficiario" AndAlso Not String.IsNullOrEmpty(ObjIE.PagueseA) Then
|
||||
LblPagarA.Visible = True
|
||||
LblPagarA.Text = ObjIE.PagueseA
|
||||
End If
|
||||
'If UsuarioActual.CveEmpresa = 119 AndAlso LblPagueseA.Text = "Beneficiario" AndAlso Not String.IsNullOrEmpty(ObjIE.PagueseA) Then
|
||||
' LblPagarA.Visible = True
|
||||
' LblPagarA.Text = ObjIE.PagueseA
|
||||
'End If
|
||||
|
||||
IDPoliza = ObjIE.IDPoliza
|
||||
|
||||
|
||||
@@ -341,9 +341,10 @@
|
||||
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
|
||||
<asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
|
||||
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
|
||||
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
|
||||
<asp:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup ="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
|
||||
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
|
||||
<asp:CheckBox Text="Descuento Masivo" ID="chkaplicaDescuentoMasivo" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuentoMasivo_CheckedChanged" AutoPostBack="true" Visible="false" />
|
||||
<asp:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@@ -477,6 +478,15 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 14 --%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Moneda</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
<%-- 15 --%>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Auxiliar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
@@ -601,7 +611,6 @@
|
||||
var Facturas = '';
|
||||
|
||||
function FnSuma(t, txt, importe) {
|
||||
debugger;
|
||||
var chkPesosBancos = $get("ChkPagarPesos");
|
||||
var chkDolaresBancos = $get("ChkPagarDolares");
|
||||
|
||||
@@ -612,9 +621,9 @@
|
||||
}
|
||||
|
||||
if (chkPesosBancos && chkPesosBancos.checked) {
|
||||
CambiaPesosDolares()
|
||||
CambiaPesosDolares();
|
||||
} else if (chkDolaresBancos && chkDolaresBancos.checked) {
|
||||
CambiaDolaresPesos()
|
||||
CambiaDolaresPesos();
|
||||
}
|
||||
else {
|
||||
var Suma = SumaValores();
|
||||
@@ -622,7 +631,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
function SumaValores(aplicaTC) {
|
||||
function SumaValores(aplicaTC, cveMonedaPago = 0) {
|
||||
|
||||
var Importe = 0;
|
||||
var Comision = 0.00;
|
||||
@@ -637,11 +646,43 @@
|
||||
idd = textBoxes[i].id.replace('C_GvCxP_TxtAbonar_', '');
|
||||
Facturas = Facturas + (Importe == 0 ? '' : ', ') + $get("C_GvCxP_HplF_" + idd).innerText;
|
||||
let importeFactura = 0;
|
||||
if (aplicaTC && $get('TxtTC') != null) {
|
||||
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
|
||||
} else {
|
||||
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
|
||||
if (cveMonedaPago == 0) {
|
||||
if (aplicaTC && $get('TxtTC') != null) {
|
||||
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
|
||||
} else {
|
||||
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
} else {
|
||||
let cveMonedaCompra = textBoxes[i].getAttribute("cvemoneda");
|
||||
|
||||
switch (cveMonedaPago) {
|
||||
case 1: //PAGO CON PESOS
|
||||
|
||||
//SI SON DOLARES MULTIPLICAR POR TC
|
||||
if (cveMonedaCompra == '2') {
|
||||
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) * parseFloat($get('TxtTC').value), 2).split(',').join(''));
|
||||
//MISMA MONEDA DEBE SOLO SUMAR
|
||||
} else if (cveMonedaCompra == '1') {
|
||||
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
}
|
||||
|
||||
break;
|
||||
case 2: //PAGO CON DOLARES
|
||||
|
||||
//MISMA MONEDA DEBE SOLO SUMAR
|
||||
if (cveMonedaCompra == '2') {
|
||||
importeFactura = parseFloat(textBoxes[i].value.split(',').join(''));
|
||||
//SI SON PESOS DIVIDIR ENTRE EL TC
|
||||
} else if (cveMonedaCompra == '1') {
|
||||
importeFactura = parseFloat(FormatoNumero(parseFloat(textBoxes[i].value.split(',').join('')) / parseFloat($get('TxtTC').value), 2).split(',').join(''));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Importe = parseFloat(Importe) + importeFactura;
|
||||
}
|
||||
}
|
||||
@@ -699,53 +740,91 @@
|
||||
}
|
||||
|
||||
if (chkPesosBancos && chkPesosBancos.checked) {
|
||||
CambiaPesosDolares()
|
||||
CambiaPesosDolares();
|
||||
} else if (chkDolaresBancos && chkDolaresBancos.checked) {
|
||||
CambiaDolaresPesos()
|
||||
CambiaDolaresPesos();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function CambiaPesosDolares() {
|
||||
let ImporteDolares = SumaValores(true);
|
||||
if ('<%= Me.FiltrarCuentas.ToString() %>' == '1') {
|
||||
let ImporteDolares = SumaValores(true);
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(ImporteDolares, 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(ImporteDolares, 2))
|
||||
$get('TxtImporte').value = FormatoNumero(ImporteDolares, 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(ImporteDolares, 2))
|
||||
|
||||
if ($("#LbImporteME").length) {
|
||||
$get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(false), 2) + ' USD';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble(ImporteDolares), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble(ImporteDolares), 2);
|
||||
if ($("#LbImporteME").length) {
|
||||
$get('LbImporteME').innerHTML = '$ ' + FormatoNumero(SumaValores(false), 2) + ' USD';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble(ImporteDolares), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble(ImporteDolares), 2);
|
||||
}
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(parseFloat($get('TxtImporte').value.replace(',', '')) + parseFloat($get('TxtOtrosImportes').value.replace(',', '') * -1), 2);
|
||||
}
|
||||
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2);
|
||||
if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000);
|
||||
} else {
|
||||
SumaDolaresPesos(1);
|
||||
}
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(parseFloat($get('TxtImporte').value.replace(',', '')) + parseFloat($get('TxtOtrosImportes').value.replace(',', '') * -1), 2);
|
||||
}
|
||||
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2);
|
||||
if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000);
|
||||
}
|
||||
|
||||
function CambiaDolaresPesos() {
|
||||
debugger;
|
||||
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2))
|
||||
if ('<%= Me.FiltrarCuentas.ToString() %>' == '1') {
|
||||
$get('TxtImporte').value = FormatoNumero(SumaValores(), 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(SumaValores(), 2))
|
||||
|
||||
|
||||
if ($("#LbImporteMN").length) {
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) / ToDouble($get('TxtTC').value), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTC').value), 2);
|
||||
}
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) + (ToDouble($get('TxtOtrosImportes').value.replace(',', '') * -1)), 2);
|
||||
}
|
||||
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2);
|
||||
if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000);
|
||||
} else {
|
||||
SumaDolaresPesos(2);
|
||||
}
|
||||
}
|
||||
|
||||
function SumaDolaresPesos(cveMonedaPago) {
|
||||
|
||||
let ImporteSuma = parseFloat(SumaValores(false, cveMonedaPago));
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(ImporteSuma, 2);
|
||||
$('#LtlTotalMXN').text(FormatoNumero(ImporteSuma, 2))
|
||||
|
||||
debugger;
|
||||
if ($("#LbImporteMN").length) {
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(SumaValores(), 2) + ' MXN';
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) / ToDouble($get('TxtTC').value), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value) / ToDouble($get('TxtTC').value), 2);
|
||||
|
||||
$get('TxtImporte').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')), 2);
|
||||
$get('LtlTotalMXN').value = FormatoNumero(ToDouble($get('TxtImporte').value), 2);
|
||||
|
||||
switch (cveMonedaPago) {
|
||||
case 1:
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(ImporteSuma, 2) + ' MXN';
|
||||
break;
|
||||
case 2:
|
||||
$get('LbImporteMN').innerHTML = '$ ' + FormatoNumero(ImporteSuma, 2) + ' USD';
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($get('TxtTotal') != null) {
|
||||
$get('TxtTotal').value = FormatoNumero(ToDouble($get('TxtImporte').value.replace(',', '')) + (ToDouble($get('TxtOtrosImportes').value.replace(',', '') * -1)), 2);
|
||||
}
|
||||
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(SumaValores(), 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(SumaValores() - ((SumaValores() / 1.16)), 2);
|
||||
if ($get('LblImporteTotal')) $get('LblImporteTotal').innerHTML = FormatoNumero(ImporteSuma, 2);
|
||||
if ($get('LblIVA')) $get('LblIVA').innerHTML = FormatoNumero(ImporteSuma - ((ImporteSuma / 1.16)), 2);
|
||||
if ($get('ChkAbonoCuenta')) $get('ChkAbonoCuenta').checked = (parseFloat($get('TxtImporte').value.replace(/,/g, '')) > 2000);
|
||||
|
||||
}
|
||||
@@ -790,7 +869,7 @@
|
||||
}
|
||||
|
||||
|
||||
function DescuenoMasivo(txt) {
|
||||
function DescuenoMasivo(txt) {
|
||||
$(".selDescuento").val(txt.value);
|
||||
$(".selDescuento").trigger("keyup");
|
||||
}
|
||||
|
||||
@@ -99,6 +99,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property FiltrarCuentas As Integer
|
||||
Get
|
||||
Return If(IsNothing(ViewState("FiltrarCuentas")), 1, ViewState("FiltrarCuentas").ToString.ToEntero)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("FiltrarCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveMonedaFiltro As Integer
|
||||
Get
|
||||
Return ViewState("CveMonedaFiltro").ToString.ToEntero
|
||||
@@ -247,6 +255,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CveClasificacionProveedor = IfNull(Request("CveClasificacion"), "-1").ToString.ToEntero
|
||||
CveMoneda = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero
|
||||
CveMonedaFiltro = IfNull(Request("CveMoneda"), "-1").ToString.ToEntero
|
||||
FiltrarCuentas = IfNull(Request("FiltrarCuentas"), "1").ToString.ToEntero
|
||||
CveEstatus = IfNull(Request("CveEstatus"), "-1").ToString.ToEntero
|
||||
Serie = IfNull(Request("Serie"), "").ToString
|
||||
CveAplicaNC = IfNull(Request("CveAplicaNC"), "-1").ToString.ToEntero
|
||||
@@ -254,7 +263,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
CodigoProgramacion = IfNull(Request("CodigoProgramacion"), "-1").ToString
|
||||
CveSubProyectoFiltro = IfNull(Request("CveSubProyecto"), -1).ToString.ToEntero
|
||||
|
||||
|
||||
TxtOtrosImportes.Attributes.Add("onKeyUp", String.Format("FnSuma(this,{0},{1});", "TxtTotal", 0))
|
||||
|
||||
'proceso para que solo pague lo que este programada
|
||||
@@ -300,13 +308,25 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
LbTipoMoneda.Text = String.Format("Pago en {0}", GlobalDTMonedas.FiltraParametros(String.Format("CveMoneda = {0}", CveMoneda)).Rows(0)("Moneda"))
|
||||
End If
|
||||
|
||||
If CveMoneda = 2 Then
|
||||
ChkPagarPesos.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
'SI NO ES GDIAZ, NO PERMITIR LA MEZCLA DE CUENTAS
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) <> "1" AndAlso FiltrarCuentas = 0 Then
|
||||
FiltrarCuentas = 1
|
||||
End If
|
||||
|
||||
If FiltrarCuentas = 0 Then
|
||||
ChkPagarPesos.Visible = False
|
||||
ChkPagarDolares.Visible = False
|
||||
|
||||
CveMonedaFiltro = -1
|
||||
Else
|
||||
ChkPagarDolares.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
If CveMoneda = 2 Then
|
||||
ChkPagarPesos.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
Else
|
||||
ChkPagarDolares.Visible = True
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript($"TipoCambioActual = {GlobalTipoCambio(NowADS()).FormatoNumero(4)}")
|
||||
@@ -324,7 +344,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
If UsuarioActual.TienePermisoProceso(361) Then
|
||||
'GvCxP.Columns(11).Visible = True
|
||||
chkaplicaDescuento.Visible = True
|
||||
'chkaplicaDescuentoMasivo.Visible = True
|
||||
chkaplicaDescuentoMasivo.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -367,23 +387,34 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Private Sub CargaDatos(Optional tCveMoneda As Integer = -1) 'pCveProveedor As Integer, tCveMoneda As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveUsuarioRegistro As Integer, CveUsuarioPrograma As Integer, Serie As String)
|
||||
If tCveMoneda = -1 Then tCveMoneda = CveMoneda
|
||||
|
||||
Dim Mov As New ClsMovimientos
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso FiltrarCuentas = 0 Then
|
||||
tCveMoneda = -1
|
||||
End If
|
||||
|
||||
TxtObservaciones.Text = ""
|
||||
TxtImporte.Text = ""
|
||||
TxtTotal.Text = ""
|
||||
|
||||
If Mov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then
|
||||
DtDatos = Mov.DtResultados.FiltraParametros("Saldo > 0", "Fecha,SerieFolio")
|
||||
Dim ObjMov As New ClsMovimientos
|
||||
If ObjMov.GetCxPProveedor(CveProveedor, FechaI, FechaF, CveUsuarioProgramo, CveUsuarioRegistro, CveUsuarioResponsable, CveClasificacionProveedor, tCveMoneda, CveEstatus, CveProveedorSucursal, CveAplicaNC, "-1", "-1", CodigoProgramacion, CveSubProyecto:=CveSubProyectoFiltro) Then
|
||||
|
||||
If FiltrarCuentas = 1 Then
|
||||
DtDatos = ObjMov.DtResultados.FiltraParametros("Tipo = 'Act' AND Saldo > 0", "Fecha,SerieFolio")
|
||||
Else
|
||||
DtDatos = ObjMov.DtResultados.FiltraParametros("CveCompra > 0 AND Saldo > 0", "Fecha,SerieFolio")
|
||||
End If
|
||||
|
||||
GvCxP.DataSource = DtDatos
|
||||
|
||||
DtDatos.Columns.Add("Movimiento")
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
DVBusqueda.Visible = True
|
||||
DtDatos.Rows(0)("Movimiento") = "FACTURA DE ACREEDOR"
|
||||
End If
|
||||
|
||||
End If
|
||||
ObjMov.Dispose()
|
||||
|
||||
|
||||
Mov.Dispose()
|
||||
GvCxP.DataBind()
|
||||
UPCompras.Update()
|
||||
UpBusqueda.Update()
|
||||
@@ -449,7 +480,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
e.Row.FCCheckBox("Chk").Attributes.Add("onclick", String.Format("FnSuma(this,{0},{1});", e.Row.FCTextBox("TxtAbonar").ClientID, e.Row.DBCampo("Saldo")))
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
If FiltrarCuentas = 1 AndAlso e.Row.RowIndex = 0 Then
|
||||
e.Row.FCHyperLink("HplF").Text = (CType(GvCxP.DataSource, DataTable).Rows.Count - 1).ToString
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
End If
|
||||
@@ -473,6 +504,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
e.Row.FCLiteral("LtlFactura").Text = e.Row.DBCampo("Folio")
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtAbonar").Attributes.Add("CveMoneda", e.Row.DBCampo("CveMoneda"))
|
||||
|
||||
If e.Row.DBCampo("CveCompra").ToEntero > 0 Then
|
||||
|
||||
Dim FiltroInv As String = ""
|
||||
@@ -643,6 +676,10 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Dim ValidaSAT As Boolean = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(529) = "1" OrElse ChkNoValidaSAT.Checked Then ValidaSAT = False
|
||||
|
||||
If Not EsProduccion Then
|
||||
ValidaSAT = False
|
||||
End If
|
||||
|
||||
If ValidaSAT Then
|
||||
Dim Validada As Boolean = False
|
||||
Dim MsgValidadas As New StringBuilder
|
||||
@@ -826,8 +863,19 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Pago.TCPago = TxtTC.Text.ToDecimal
|
||||
Pago.ImportePago = (gvr.FCTextBox("TxtAbonar").Text.ToDecimal / TxtTC.Text.ToDecimal)
|
||||
End If
|
||||
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTC.Text.ToDecimal
|
||||
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTC.Text.ToDecimal
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
If CompraActual.CveMoneda = 1 Then
|
||||
Pago.TCCambioMoneda = 1
|
||||
Else
|
||||
Pago.TCCambioMoneda = 1 / TxtTC.Text.ToDecimal
|
||||
End If
|
||||
End If
|
||||
|
||||
If ChkPagarDolares.Checked Then
|
||||
Pago.TCCambioMoneda = TxtTC.Text.ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
|
||||
Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||
@@ -1117,18 +1165,22 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
DdlCuenta.Items.Clear()
|
||||
Dim dt As DataTable = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
If ChkPagarPesos.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||
RegistraScript("CambiaPesosDolares();")
|
||||
ElseIf ChkPagarDolares.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 2))
|
||||
RegistraScript("CambiaDolaresPesos();")
|
||||
Else
|
||||
If CveMonedaFiltro > 0 Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMonedaFiltro))
|
||||
If FiltrarCuentas = 1 Then
|
||||
If ChkPagarPesos.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1))
|
||||
RegistraScript("CambiaPesosDolares();")
|
||||
ElseIf ChkPagarDolares.Checked Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 2))
|
||||
RegistraScript("CambiaDolaresPesos();")
|
||||
Else
|
||||
If CveMonedaFiltro > 0 Then
|
||||
dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", CveMonedaFiltro))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If TipoPago = 3 Then
|
||||
dt = dt.FiltraParametros("CveTipoCuenta = 7")
|
||||
End If
|
||||
@@ -1148,8 +1200,32 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
|
||||
'recargo la moneda con la que se va a pagar
|
||||
Dim dr As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCuenta = {0}", DdlCuenta.SelectedValue))
|
||||
|
||||
If FiltrarCuentas = 0 Then
|
||||
|
||||
If dr("CveMoneda").ToString() = "2" Then
|
||||
ChkPagarDolares.Visible = True
|
||||
ChkPagarDolares.Checked = True
|
||||
ChkPagarDolares.Enabled = False
|
||||
|
||||
ChkPagarPesos.Visible = False
|
||||
ChkPagarPesos.Checked = False
|
||||
Else
|
||||
ChkPagarPesos.Visible = True
|
||||
ChkPagarPesos.Checked = True
|
||||
ChkPagarPesos.Enabled = False
|
||||
|
||||
ChkPagarDolares.Visible = False
|
||||
ChkPagarDolares.Checked = False
|
||||
End If
|
||||
|
||||
TxtTC.Text = GlobalTipoCambio(NowADS()).FormatoNumero(4)
|
||||
TxtFechaDocumento.Attributes.Add("onchange", "CambiaTC(this);")
|
||||
End If
|
||||
|
||||
'recargo la moneda con la que se va a pagar
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
TxtFechaDocumento.Attributes.Remove("onchange")
|
||||
UpDatos.Update()
|
||||
@@ -1673,11 +1749,17 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Protected Sub chkaplicaDescuento_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
GvCxP.Columns(11).Visible = chkaplicaDescuento.Checked
|
||||
TxtDescuenoMasivo.Visible = chkaplicaDescuento.Checked
|
||||
UPCompras.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub chkaplicaDescuentoMasivo_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
GvCxP.Columns(11).Visible = chkaplicaDescuentoMasivo.Checked
|
||||
TxtDescuenoMasivo.Visible = chkaplicaDescuentoMasivo.Checked
|
||||
UPCompras.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub tmpValida()
|
||||
|
||||
Dim ValidaSAT As Boolean = True
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dashboard-stat2 {
|
||||
padding: 1px 2px 15px 10px;
|
||||
}
|
||||
.dashboard-stat2 {
|
||||
padding: 1px 2px 15px 10px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
@@ -42,7 +42,7 @@
|
||||
<div class="row">
|
||||
<div class="col-md-1">Proveedor:</div>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" ></ADS:Dropdownlost>
|
||||
<ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlProveedores" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 150px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
@@ -194,21 +194,28 @@
|
||||
<asp:ListItem Selected="False" Text="Ambos" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-3" id="DivVerPesos" runat="server" visible="false">
|
||||
<div style="display: flex; align-items: center;">
|
||||
Ver en pesos:
|
||||
<asp:CheckBox ID="ChkVerEnPesos" data-size="small" CssClass="chksino" Style="margin-top: -2px; background-color: #fff;" runat="server" Text=" " AutoPostBack="False" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel UpdateMode="Conditional" ID="UpIndicadores" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row" runat="server" id="dvIndicadores" visible="false">
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style=" border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding-top px;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-red-haze">
|
||||
<span data-counter="counterup" data-value="1349"><asp:Literal runat="server" ID="LtlTotalOriginal"></asp:Literal></span>
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal runat="server" ID="LtlTotalOriginal"></asp:Literal></span>
|
||||
<small class="font-red-haze">$</small>
|
||||
</h3>
|
||||
<small>TOTAL ORIGINAL</small>
|
||||
@@ -218,21 +225,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size:12px">
|
||||
MXN: <asp:Literal Text="text" ID="LtlTotalMXN" runat="server" />
|
||||
<div class="status" style="font-size: 12px">
|
||||
MXN:
|
||||
<asp:Literal Text="text" ID="LtlTotalMXN" runat="server" />
|
||||
</div>
|
||||
<div class="status" style="font-size:12px">
|
||||
Dólares: <asp:Literal Text="text" ID="LtlTotalDolares" runat="server" />
|
||||
<div class="status" style="font-size: 12px">
|
||||
Dólares:
|
||||
<asp:Literal Text="text" ID="LtlTotalDolares" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style=" border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke; padding: 5px 5px 25px 5px;">
|
||||
<div class="display">
|
||||
<div class="number">
|
||||
<h3 class="font-green-sharp" >
|
||||
<span data-counter="counterup" data-value="7800"><asp:Literal runat="server" ID="LtlTotalAbonado"></asp:Literal></span>
|
||||
<h3 class="font-green-sharp">
|
||||
<span data-counter="counterup" data-value="7800">
|
||||
<asp:Literal runat="server" ID="LtlTotalAbonado"></asp:Literal></span>
|
||||
<small class="font-green-sharp">$</small>
|
||||
</h3>
|
||||
<small>ABONADO</small>
|
||||
@@ -258,11 +268,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-4 col-md-4">
|
||||
<div class="dashboard-stat2 " style=" border-style: solid; border-color: whitesmoke;">
|
||||
<div class="dashboard-stat2 " style="border-style: solid; border-color: whitesmoke;">
|
||||
<div class="display" style="margin-bottom: 0px">
|
||||
<div class="number">
|
||||
<h3 class="font-blue-sharp">
|
||||
<span data-counter="counterup" data-value="1349"><asp:Literal ID="TotalPendiente" runat="Server" ></asp:Literal></span>
|
||||
<h3 class="font-blue-sharp">
|
||||
<span data-counter="counterup" data-value="1349">
|
||||
<asp:Literal ID="TotalPendiente" runat="Server"></asp:Literal></span>
|
||||
<small class="font-blue-sharp">$</small>
|
||||
</h3>
|
||||
<small>SALDO PENDIENTE</small>
|
||||
@@ -272,11 +283,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="progress-info">
|
||||
<div class="status" style="font-size:12px">
|
||||
MXN: <asp:Literal Text="text" ID="LtlPendiente" runat="server" />
|
||||
<div class="status" style="font-size: 12px">
|
||||
MXN:
|
||||
<asp:Literal Text="text" ID="LtlPendiente" runat="server" />
|
||||
</div>
|
||||
<div class="status" style="font-size:12px">
|
||||
DÓLARES <asp:Literal Text="text" ID="LtlPendienteDolares" runat="server" />
|
||||
<div class="status" style="font-size: 12px">
|
||||
DÓLARES
|
||||
<asp:Literal Text="text" ID="LtlPendienteDolares" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -303,7 +316,7 @@
|
||||
<asp:HyperLink ID="Hpl" runat="server" NavigateUrl='<%#String.Format("/Compras/Proveedores.aspx?CveProveedor={0}&Opt=3&CveProveedorSucursal={1}&CveMoneda={2}", Eval("CveProveedor"), Eval("CveProveedorSucursal"), Eval("CveMoneda"))%>' Text='<%# Eval("RazonSocial") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ControlStyle CssClass="Texto" />
|
||||
<ItemStyle HorizontalAlign="Left" width="300px"/>
|
||||
<ItemStyle HorizontalAlign="Left" Width="300px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -312,17 +325,17 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitFact" runat="server" Text='<%# Bind("NumFacturas") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Venci.
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate >
|
||||
<asp:Literal ID="LitUltimoVencimiento" runat="server" Text='<%# Bind("UltimoVencimiento")%>'></asp:Literal>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitUltimoVencimiento" runat="server" Text='<%# Bind("UltimoVencimiento")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<ItemStyle Width="70px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Original
|
||||
@@ -330,9 +343,9 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitOriginal" runat="server" Text='<%# Bind("Original", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right"/>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField Datafield="Abreviatura" HeaderText="Moneda" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="40px"/>
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="40px" />
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Abonado
|
||||
@@ -349,7 +362,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitPorPagado" runat="server" Text='<%# Bind("PorPagado", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="40px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="40px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="False">
|
||||
<HeaderTemplate>
|
||||
@@ -358,7 +371,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitImporteProgramo" runat="server" Text='<%# Bind("ImporteProgramo", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="100px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -367,7 +380,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitSaldo" runat="server" Text='<%# Bind("Saldo", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="100px" Font-Bold="True" HorizontalAlign="Right" />
|
||||
<ItemStyle Width="100px" Font-Bold="True" HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
@@ -376,20 +389,19 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitPorXPagar" runat="server" Text='<%# Bind("PorXPagar", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="40px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="40px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="False" ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>Abonar</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<%--<asp:Image ID="ImgAbonar" runat="server" ImageUrl="~/Imagenes/Money_add.png" AlternateText="Registrar Pago/Abono" Style="cursor:pointer;" />--%>
|
||||
<asp:HyperLink ID="ImgAbonar" CssClass="Texto" runat="server" NavigateUrl='<%# Eval("CveProveedor", "/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}") %>' ToolTip="Registrar Pago/Abono"><i class='fa fa-money font-green'></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="ImgAbonar" CssClass="Texto" runat="server" NavigateUrl='<%# Eval("CveProveedor", "/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}") %>' ToolTip="Registrar Pago/Abono"><i class='fa fa-money font-green'></i></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="70px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="70px" HorizontalAlign="Center" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<%--<asp:BoundField Datafield="Moneda" HeaderText="Moneda" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10px"/>--%>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
|
||||
@@ -31,6 +31,11 @@ Partial Class Bancos_RepProveedoresPagos
|
||||
GvCxP.Columns(10).Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
chkexpand.Checked = True
|
||||
DivVerPesos.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -103,7 +108,7 @@ Partial Class Bancos_RepProveedoresPagos
|
||||
GvCxP.Columns(7).Visible = ChkProgramadas.Checked 'AndAlso DdlUsuarioProgramo.SelectedValue.ToEntero > 0
|
||||
|
||||
|
||||
If Mov.GetCxPEmpresa(DdlProveedores.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, -1, DdlUsuarioRegistro.SelectedValue.ToEntero, CveUsuarioProgramo, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, -1, DdlEstatusCompra.SelectedValue.ToEntero, AplicaNC.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaVI, FechaVF, CodigoProgramacion, DdlTipoProveedor.SelectedValue.ToEntero) Then
|
||||
If Mov.GetCxPEmpresa(DdlProveedores.SelectedValue.ToEntero, FechaI, FechaF, DdlSubProyecto.SelectedValue.ToEntero, -1, DdlUsuarioRegistro.SelectedValue.ToEntero, CveUsuarioProgramo, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, -1, DdlEstatusCompra.SelectedValue.ToEntero, AplicaNC.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaVI, FechaVF, CodigoProgramacion, DdlTipoProveedor.SelectedValue.ToEntero, VerEnPesos:=ChkVerEnPesos.Checked) Then
|
||||
|
||||
GvCxP.DataSource = Mov.DtResultados
|
||||
If Mov.DtResultados IsNot Nothing AndAlso Mov.DtResultados.Rows.Count > 0 Then
|
||||
@@ -162,7 +167,13 @@ Partial Class Bancos_RepProveedoresPagos
|
||||
CveUsuarioProgramo = DdlUsuarioProgramo.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue)
|
||||
Dim FiltrarCuentas As Integer = 1
|
||||
|
||||
If ChkVerEnPesos.Checked Then
|
||||
FiltrarCuentas = 0
|
||||
End If
|
||||
|
||||
e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&TipoPago={4}&CveUsuarioRegistro={5}&CveUsuarioResponsable={6}&CveClasificacion={7}&CveMoneda={8}&CveEstatus={9}&CveProveedorSucursal={10}&CveAplicaNC={11}&CodigoProgramacion={12}&CveSubProyecto={13}&FiltrarCuentas={14}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), CveUsuarioProgramo, -1, DdlUsuarioRegistro.SelectedValue, DdlUsuarioResponsable.SelectedValue, DdlProveedoresClasificaciones.SelectedValue, e.Row.DBCampo("CveMoneda"), DdlEstatusCompra.SelectedValue, e.Row.DBCampo("CveProveedorSucursal"), AplicaNC.SelectedValue, DdlCodigoProgramacion.SelectedValue, DdlSubProyecto.SelectedValue, FiltrarCuentas)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -128,6 +128,20 @@
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel ID="UpAccionesProrrateoGasolina" runat="server" UpdateMode="Conditional">
|
||||
|
||||
<ContentTemplate>
|
||||
<li style="text-align: left!important" >
|
||||
<asp:LinkButton runat="server" ID="LnkProrrateoGasolina" CssClass="" data-toggle="tooltip" data-placement="left" title="Prorrateo" OnClick="LnkProrrateoGasolina_Click" Visible="false" >
|
||||
<i class="fa fa-list" aria-hidden="true"></i> Prorrateo
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
@@ -4576,7 +4590,6 @@
|
||||
<label runat="server" id="LblSubProyectoEx" for="<%= DdlSubProyecto.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" id="LblSubProyecto"></asp:Label>:
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
@@ -5703,6 +5716,130 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="DVModalProrrateoGasolina" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:UpdatePanel runat="server" ID="UpProrratearTitulo" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Label runat="server" id="LblRiruloProrrareo">Prorratear</asp:Label>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpModalProrrateoGasolina" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPSProrrateoGasolina" CssStyle="width:100%" CssClass="form-control input-sm DdlPS" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<label for="<%= DdlPSProrrateoGasolina.ClientID.ToString()%>">
|
||||
Productos / Servicio:
|
||||
<label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top:10px">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubProyectoProrrateoGasolina" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlSubProyectoProrrateoGasolina" runat="server" ControlToValidate="DdlSubProyectoProrrateoGasolina" CssClass="help-block errorimput" InitialValue="-1"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo." ValidationGroup="GprAgregaPSProrateo">
|
||||
</asp:RequiredFieldValidator>--%>
|
||||
<label runat="server" id="Label10" for="<%= DdlSubProyectoProrrateoGasolina.ClientID.ToString()%>">
|
||||
<asp:Label runat="server" id="LblSubProyectoProrrateoGasolina"></asp:Label>:
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtPrecioProrrateoGasolina" ClientIDMode="Static" runat="server" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtPrecioProrrateoGasolina" runat="server" TargetControlID="TxtPrecioProrrateoGasolina" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<asp:RequiredFieldValidator ID="RfvTxtPrecioProrrateoGasolina" runat="server" ControlToValidate="TxtPrecioProrrateoGasolina" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPSProrateo">
|
||||
</asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPrecioProrrateoGasolina.ClientID.ToString()%>">Importe:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4" style="margin-top:10px;text-align:right">
|
||||
<asp:LinkButton ID="LnkAgregarProrrateoGasolina" OnClick="LnkAgregarProrrateoGasolina_Click" runat="server" Text="Agregar" CssClass="btn btn-primary" ValidationGroup="GprAgregaPSProrateo" > </asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-top:10px">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" ID="LblTotalProrrateoGasolina" CssClass="form-control" ></asp:Label>
|
||||
<label for="<%= LblTotalProrrateoGasolina.ClientID.ToString()%>">Total:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" ID="LblRestoProrrateoGasolina" CssClass="form-control"></asp:Label>
|
||||
<label for="<%= LblRestoProrrateoGasolina.ClientID.ToString()%>">Restante:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvProrrateoGasolina" runat="server" AutoGenerateColumns="false" GridLines="none" BorderWidth="0" Width="100%"
|
||||
DataKeyNames=""
|
||||
CssClass="table table-striped table-hover table-advance ScrollAD mysmallbtn">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
|
||||
<asp:BoundField DataField="Subtotal" HeaderText="Subtotal" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
|
||||
<asp:BoundField DataField="IVA" HeaderText="IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.######}" Visible="false" />
|
||||
<asp:BoundField DataField="RetIVA" HeaderText="Ret. IVA" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
|
||||
<asp:BoundField DataField="RetISR" HeaderText="RetISR" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.####}" Visible="false" />
|
||||
<asp:BoundField DataField="Total" DataFormatString="{0:#,##0.00##}" HeaderText="Total" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Porcentaje" DataFormatString="{0:#,##0.00##}" HeaderText="%" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEliminarProrrateoGasolina" runat="server" Width="22px"
|
||||
CssClass="btn btn-circle btn-xs red" OnClick="LnkEliminarProrrateoGasolina_Click"
|
||||
data-toggle="confirmation"
|
||||
data-popout="true" data-original-title="¿Seguro que desea eliminar el prorrateo?" data-btn-ok-label="si">
|
||||
<i style="margin-left:-2px!important" class='icon-trash'></i>
|
||||
</asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Button ID="BtnGuardarProrrateoGasolina" OnClick="BtnGuardarProrrateoGasolina_Click" runat="server" Text="Guardar" CssClass="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div style="display:none">
|
||||
<asp:UpdatePanel runat="server">
|
||||
|
||||
@@ -1662,9 +1662,12 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 AndAlso DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
|
||||
ConfiguraseleccionRemisionNotaCredito()
|
||||
End If
|
||||
|
||||
If Not CveCompra > 0 Then
|
||||
LnkProrrateoGasolina.Visible = True
|
||||
InicializaDTProrrateoGasolina()
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -14914,6 +14917,7 @@ Partial Class Compras_Compras
|
||||
|
||||
Private Sub VinculaOC()
|
||||
CveIEAnticipo = -1
|
||||
Dim DiasCredito As Integer = 0
|
||||
If TxtOC.Text <> "" Then
|
||||
|
||||
'VARIABLES
|
||||
@@ -14935,6 +14939,8 @@ Partial Class Compras_Compras
|
||||
Dim FoliosOCAnticipo As String = "", FoliosOCAnticipoIE As String = ""
|
||||
Dim StrPromos As New StringBuilder
|
||||
|
||||
|
||||
|
||||
For Each CveOCItem As String In ArrayCveOC.Distinct
|
||||
If ObjOC.GetOrdenesDetalle(CveOCItem.ToEntero, UsuarioActual.CveEmpresa) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
|
||||
If IsNothing(DTOCTemp) Then
|
||||
@@ -14943,6 +14949,14 @@ Partial Class Compras_Compras
|
||||
DTOCTemp.Merge(ObjOC.DtResultados)
|
||||
End If
|
||||
|
||||
|
||||
Dim DiasCreditoOCActual As Integer = DTOCTemp.FiltroPrimeroValor("DiasCreditoOC").ToEntero
|
||||
|
||||
If DiasCreditoOCActual > DiasCredito Then
|
||||
DiasCredito = DiasCreditoOCActual
|
||||
End If
|
||||
|
||||
|
||||
IvaAcumulado += ObjOC.DtResultados.Rows(0)("IVA").ToString.ToDouble
|
||||
TextoObservaciones += ObjOC.DtResultados.Rows(0)("Descripcion").ToString
|
||||
|
||||
@@ -15063,9 +15077,16 @@ Partial Class Compras_Compras
|
||||
DivOCPromocion.Visible = True
|
||||
End If
|
||||
|
||||
If DiasCredito > 0 Then
|
||||
TxtFechaPago.Text = Now.AddDays(DiasCredito).ToString("dd/MM/yyyy")
|
||||
UPCondicionesPago.Update()
|
||||
End If
|
||||
|
||||
'CARGA DATOS DE OC
|
||||
CargaVinculacionOC(True)
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlOCVinculaInv_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -15136,6 +15157,10 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
Private Sub CargaGvsOC()
|
||||
|
||||
If Not TmpDT.Columns.Contains("NoIdentificacion") Then
|
||||
TmpDT.Columns.Add("NoIdentificacion")
|
||||
End If
|
||||
|
||||
'SI ES MAS DE UNA OC ORDENA POR PRODUCTO
|
||||
Dim ArrayCveOC As String() = HdnVCveOC.Value.Split(New Char() {","c})
|
||||
'DTOCGV = If(ArrayCveOC.Length > 1, DTOCGV.FiltraParametros("", "Producto"), DTOCGV)
|
||||
@@ -22304,6 +22329,278 @@ Partial Class Compras_Compras
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "PRORRATEO GASOLINA"
|
||||
Property DTProrrateoGasolina As DataTable
|
||||
Get
|
||||
If ViewState("DTProrrateoGasolina") Is Nothing Then
|
||||
ViewState("DTProrrateoGasolina") = New DataTable
|
||||
End If
|
||||
Return DirectCast(ViewState("DTProrrateoGasolina"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DTProrrateoGasolina") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub InicializaDTProrrateoGasolina()
|
||||
Dim TmpDTProrrateoGasolina As New DataTable
|
||||
TmpDTProrrateoGasolina.Columns.Add("CvePS", GetType(Integer))
|
||||
TmpDTProrrateoGasolina.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
TmpDTProrrateoGasolina.Columns.Add("SubProyecto", GetType(String))
|
||||
TmpDTProrrateoGasolina.Columns.Add("SubTotal", GetType(Decimal))
|
||||
TmpDTProrrateoGasolina.Columns.Add("IVA", GetType(Decimal))
|
||||
TmpDTProrrateoGasolina.Columns.Add("RetIVA", GetType(Decimal))
|
||||
TmpDTProrrateoGasolina.Columns.Add("RetISR", GetType(Decimal))
|
||||
TmpDTProrrateoGasolina.Columns.Add("Total", GetType(Decimal))
|
||||
TmpDTProrrateoGasolina.Columns.Add("PorcentajeIVA", GetType(Decimal))
|
||||
|
||||
TmpDTProrrateoGasolina.Columns.Add("CveUM", GetType(Integer))
|
||||
TmpDTProrrateoGasolina.Columns.Add("CveClasificacion", GetType(Integer))
|
||||
TmpDTProrrateoGasolina.Columns.Add("UM", GetType(String))
|
||||
TmpDTProrrateoGasolina.Columns.Add("Clasificacion", GetType(String))
|
||||
TmpDTProrrateoGasolina.Columns.Add("PS", GetType(String))
|
||||
TmpDTProrrateoGasolina.Columns.Add("Porcentaje", GetType(Decimal))
|
||||
|
||||
|
||||
DTProrrateoGasolina = TmpDTProrrateoGasolina
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkProrrateoGasolina_Click(sender As Object, e As EventArgs)
|
||||
|
||||
InicializaDTProrrateoGasolina()
|
||||
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyectoProrrateoGasolina,)
|
||||
GvProrrateoGasolina.Columns(0).HeaderText = LblSubProyectoProrrateoGasolina.Text
|
||||
LblRiruloProrrareo.Text = $"Prorratear por { LblSubProyectoProrrateoGasolina.Text}"
|
||||
|
||||
DdlSubProyectoProrrateoGasolina.Items.Clear()
|
||||
DdlSubProyectoProrrateoGasolina.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveProyecto:=-1))
|
||||
DdlSubProyectoProrrateoGasolina.DataBind()
|
||||
DdlSubProyectoProrrateoGasolina.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
LblTotalProrrateoGasolina.Text = TxtTotal.Text
|
||||
|
||||
CargaProrratePS(-1)
|
||||
|
||||
RegistraScript("$('#DVModalProrrateoGasolina').modal();")
|
||||
UpModalProrrateoGasolina.Update()
|
||||
UpProrratearTitulo.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaProrratePS(CveClasificacion As Integer)
|
||||
|
||||
DdlPSProrrateoGasolina.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPSProrrateoGasolina.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPSProrrateoGasolina.SelectedText = ""
|
||||
DdlPSProrrateoGasolina.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPSProrrateoGasolina.ddl.Items.Clear()
|
||||
|
||||
'DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion)
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(300) Or UsuarioActual.TienePermisoProceso(301) Then
|
||||
|
||||
Dim DTTemp As New DataTable
|
||||
DTTemp.Columns.Add("CvePS", GetType(Integer))
|
||||
DTTemp.Columns.Add("PSCodigo", GetType(String))
|
||||
DTTemp.Columns.Add("CveClasificacion", GetType(Integer))
|
||||
|
||||
For Each dRow As DataRow In GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).Rows
|
||||
For Each drowCla As DataRow In DTClasificacionesComprobaciones.Rows
|
||||
|
||||
If drowCla("CveClasificacion").ToString.ToEntero = dRow("CveClasificacion").ToString.ToEntero Then
|
||||
|
||||
Dim InRow As DataRow = DTTemp.NewRow
|
||||
InRow("CvePS") = dRow("CvePS").ToString.ToEntero
|
||||
InRow("PSCodigo") = dRow("PSCodigo").ToString
|
||||
InRow("CveClasificacion") = dRow("CveClasificacion").ToString.ToEntero
|
||||
DTTemp.Rows.Add(InRow)
|
||||
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
DdlPSProrrateoGasolina.DataSource = If(CveClasificacion > 0, DTTemp.FiltraParametros($"CveClasificacion = {CveClasificacion}"), DTTemp)
|
||||
Else
|
||||
DdlPSProrrateoGasolina.DataSource = If(CveClasificacion > 0, GlobalDTPSSimplificado(UsuarioActual.CveEmpresa).FiltraParametros($"CveClasificacion = {CveClasificacion}"), GlobalDTPSSimplificado(UsuarioActual.CveEmpresa))
|
||||
End If
|
||||
|
||||
DdlPSProrrateoGasolina.ddl.DataBind()
|
||||
DdlPSProrrateoGasolina.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvProrrateoGasolinaBind()
|
||||
GvProrrateoGasolina.DataSource = DTProrrateoGasolina
|
||||
GvProrrateoGasolina.DataBind()
|
||||
UpModalProrrateoGasolina.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkEliminarProrrateoGasolina_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
DTProrrateoGasolina.Rows.RemoveAt(GvRow.RowIndex)
|
||||
DTProrrateoGasolina.AcceptChanges()
|
||||
ProrateoCalculaRestante()
|
||||
GvProrrateoGasolinaBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkAgregarProrrateoGasolina_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim CvePs As Integer = DdlPSProrrateoGasolina.SelectedValue.ToEntero
|
||||
|
||||
If Not CvePs > 0 Then
|
||||
Alert("Debe seleccionar un producto", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim PsRow As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePs).FiltroPrimero("")
|
||||
|
||||
If PsRow Is Nothing Then
|
||||
Alert("No se encontro el producto", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim CveUM As Integer = PsRow("CveUM").ToString.ToEntero
|
||||
Dim UM As String = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $" CveUnidadMedida = {CveUM} ")
|
||||
|
||||
Dim CveClasificacion As Integer = PsRow("CveClasificacion").ToString.ToEntero
|
||||
Dim Clasificacion As String = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $" CveClasificacion = {CveClasificacion} ")
|
||||
|
||||
|
||||
If DdlSubProyectoProrrateoGasolina.SelectedValue.ToEntero > 0 Then
|
||||
AgregarProrrateoGasolina(DdlSubProyectoProrrateoGasolina.SelectedValue.ToEntero, DdlSubProyectoProrrateoGasolina.SelectedItem.Text, CvePs, CveUM, UM, CveClasificacion, Clasificacion)
|
||||
Else
|
||||
DTProrrateoGasolina.Rows.Clear()
|
||||
|
||||
For Each item As ListItem In DdlSubProyectoProrrateoGasolina.Items
|
||||
If item.Value.ToEntero > 0 Then
|
||||
AgregarProrrateoGasolina(item.Value.ToEntero, item.Text, CvePs, CveUM, UM, CveClasificacion, Clasificacion)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
TxtPrecioProrrateoGasolina.Text = ""
|
||||
DdlSubProyectoProrrateoGasolina.SelectedValueExist(-1)
|
||||
UpModalProrrateoGasolina.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub AgregarProrrateoGasolina(CveSubProyecto As Integer, SubProyecto As String, CvePS As Integer, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String)
|
||||
|
||||
Dim SubTotalOriginal As Decimal = TxtSubTotal.Text.ToDecimal
|
||||
Dim IVAOriginal As Decimal = TxtIVA.Text.ToDecimal
|
||||
Dim RetISROriginal As Decimal = TxtRetISR.Text.ToDecimal
|
||||
Dim RetIVAOriginal As Decimal = TxtRetIVA.Text.ToDecimal
|
||||
Dim TotalOriginal As Decimal = TxtTotal.Text.ToDecimal
|
||||
|
||||
Dim totalParcialDeseado As Decimal = TxtPrecioProrrateoGasolina.Text.ToDecimal
|
||||
|
||||
Dim PorcentajeCalculado As Decimal = totalParcialDeseado / TotalOriginal
|
||||
|
||||
Dim subtotalParcial As Decimal = SubTotalOriginal * PorcentajeCalculado
|
||||
Dim ivaParcial As Decimal = IVAOriginal * PorcentajeCalculado
|
||||
Dim retIsrParcial As Decimal = RetISROriginal * PorcentajeCalculado
|
||||
Dim retIvaParcial As Decimal = RetIVAOriginal * PorcentajeCalculado
|
||||
|
||||
Dim nRow As DataRow = DTProrrateoGasolina.NewRow
|
||||
|
||||
nRow("CvePS") = DdlPSProrrateoGasolina.SelectedValue.ToEntero
|
||||
nRow("CveSubProyecto") = CveSubProyecto
|
||||
nRow("SubProyecto") = SubProyecto
|
||||
|
||||
If CveFactura > 0 Then
|
||||
nRow("IVA") = ivaParcial.RoundSQL(4)
|
||||
nRow("RetIVA") = retIvaParcial.RoundSQL(4)
|
||||
nRow("RetISR") = retIsrParcial.RoundSQL(4)
|
||||
Else
|
||||
nRow("IVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
|
||||
nRow("RetIVA") = (retIvaParcial / subtotalParcial).RoundSQL(4)
|
||||
nRow("RetISR") = (retIsrParcial / subtotalParcial).RoundSQL(4)
|
||||
End If
|
||||
|
||||
nRow("SubTotal") = subtotalParcial.RoundSQL(4)
|
||||
|
||||
nRow("Total") = totalParcialDeseado.RoundSQL(4)
|
||||
nRow("PorcentajeIVA") = (ivaParcial / subtotalParcial).RoundSQL(4)
|
||||
nRow("Porcentaje") = ((totalParcialDeseado.RoundSQL(4) * 100) / TotalOriginal).RoundSQL(2)
|
||||
|
||||
|
||||
nRow("CveUM") = CveUM
|
||||
nRow("UM") = UM
|
||||
nRow("CveClasificacion") = CveClasificacion
|
||||
nRow("Clasificacion") = Clasificacion
|
||||
nRow("PS") = DdlPSProrrateoGasolina.txtText.Value
|
||||
|
||||
DTProrrateoGasolina.Rows.Add(nRow)
|
||||
|
||||
ProrateoCalculaRestante()
|
||||
GvProrrateoGasolinaBind()
|
||||
End Sub
|
||||
|
||||
|
||||
Function ProrateoCalculaRestante(Optional MostrarMensaje As Boolean = False) As Boolean
|
||||
|
||||
Dim Acumulado As Decimal = DTProrrateoGasolina.SUM("Total").RoundSQL(2)
|
||||
Dim Total As Decimal = TxtTotal.Text.ToDecimal.RoundSQL(2)
|
||||
Dim Respuesta As Boolean = False
|
||||
|
||||
LblRestoProrrateoGasolina.Text = (Total - Acumulado).ToString("###,###,###.00")
|
||||
|
||||
If Acumulado = Total Then
|
||||
Respuesta = True
|
||||
Else
|
||||
Respuesta = False
|
||||
If MostrarMensaje Then
|
||||
|
||||
If Acumulado <> Total Then
|
||||
Alert($"El importe prorrateado es diferente del total, Diferencia: {(Acumulado - Total).Abs()}, Total:{Total.ToString("###,###,###.00")}, Prorrateado:{Acumulado.ToString("###,###,###.00")}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Protected Sub BtnGuardarProrrateoGasolina_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If Not ProrateoCalculaRestante(True) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If DTProrrateoGasolina.Rows.Count > 0 Then
|
||||
TmpDT.Rows.Clear()
|
||||
For Each dRow As DataRow In DTProrrateoGasolina.Rows
|
||||
AddPS(1, dRow("CveUM").ToString.ToEntero, dRow("UM").ToString, dRow("CveClasificacion").ToString.ToEntero, dRow("Clasificacion").ToString, dRow("CvePS").ToString.ToEntero, dRow("PS").ToString, 1, dRow("CveSubProyecto").ToString, dRow("SubProyecto").ToString, "",
|
||||
"-1", "", dRow("SubTotal").ToString.ToDecimal, dRow("Total").ToString.ToDecimal, dRow("PorcentajeIVA").ToString.ToDecimal, dRow("RetIVA").ToString.ToDecimal, dRow("RetISR").ToString.ToDecimal, 0, 0, 0, PorcentajeIVA:=dRow("PorcentajeIVA").ToString.ToDecimal)
|
||||
Next
|
||||
|
||||
AddPS2()
|
||||
RegistraScript("$('#DVModalProrrateoGasolina').modal('hide');")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -1425,9 +1425,14 @@ Partial Class PopUpVerFactura
|
||||
|
||||
'Imprime Movimiento de IE
|
||||
If UrlParametros("OP").ToString = "ImprimeMov" Then
|
||||
|
||||
Dim ImportePagoTotal As Decimal = If(UrlParametros("IMPORTEPAGOTOTAL") IsNot Nothing AndAlso UrlParametros("IMPORTEPAGOTOTAL").ToString.ToDecimal > 0, UrlParametros("IMPORTEPAGOTOTAL").ToString.ToDecimal, -1)
|
||||
Dim SaldoTotal As Decimal = If(UrlParametros("SALDO") IsNot Nothing AndAlso UrlParametros("SALDO").ToString.ToDecimal > 0, UrlParametros("SALDO").ToString.ToDecimal, -1)
|
||||
|
||||
If UrlParametros("CVEIE") IsNot Nothing AndAlso UrlParametros("CVEIE").ToString.ToEntero > 0 Then
|
||||
ImprimeMov(UrlParametros("CVEIE").ToString.ToEntero)
|
||||
ImprimeMov(UrlParametros("CVEIE").ToString.ToEntero, ImportePagoTotal, SaldoTotal)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'IMPRIME DEPOSITOS CAJA
|
||||
@@ -1575,23 +1580,22 @@ Partial Class PopUpVerFactura
|
||||
|
||||
'Boleto
|
||||
If UrlParametros("OP").ToString = "AMORTIZACIONHIS" Then
|
||||
'CveViajePasajero
|
||||
|
||||
Dim CVEIE As Integer = UrlParametros("CVEIE").ToString.ToEntero
|
||||
Dim CVEVENTAAMORTIZADA As Integer = UrlParametros("CVEVENTAAMORTIZADA").ToString.ToEntero
|
||||
Dim CVEVENTA As Integer = UrlParametros("CVEVENTA").ToString.ToEntero
|
||||
Dim CVECLIENTE As Integer = UrlParametros("CVECLIENTE").ToString.ToEntero
|
||||
Dim MONTO As Decimal = UrlParametros("MONTO").ToString.ToDecimal
|
||||
Dim SALDO As Decimal = UrlParametros("SALDO").ToString.ToDecimal
|
||||
|
||||
If CVECLIENTE > 0 AndAlso (CVEIE > 0 Or CVEVENTA > 0) Then
|
||||
ImprimirSaldosAmortizacion(CVEVENTAAMORTIZADA, CVEIE, CVEVENTA, CVECLIENTE, MONTO, SALDO)
|
||||
ImprimirSaldosAmortizacion(CVEVENTAAMORTIZADA, CVEIE, CVEVENTA, CVECLIENTE, MONTO)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimirSaldosAmortizacion(CveVentaAmortizada As Integer, CveIE As Integer, CveVenta As Integer, CveCliente As Integer, Monto As Decimal, Saldo As Decimal)
|
||||
Private Sub ImprimirSaldosAmortizacion(CveVentaAmortizada As Integer, CveIE As Integer, CveVenta As Integer, CveCliente As Integer, Monto As Decimal)
|
||||
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
@@ -1599,6 +1603,7 @@ Partial Class PopUpVerFactura
|
||||
Dim DatosSaldoAntNCDev As New DataTable
|
||||
Dim TipoDocto As String = ""
|
||||
Dim Folio As String = ""
|
||||
Dim Saldo As Decimal = 0D
|
||||
Dim DTNCVinculadas As New DataTable
|
||||
|
||||
|
||||
@@ -1623,10 +1628,15 @@ Partial Class PopUpVerFactura
|
||||
If CveIE > 0 Then
|
||||
CveVenta = DatosSaldoAntNCDev.FiltroPrimeroValor("CveVenta", $"CveIE={CveIE}").ToEntero
|
||||
Folio = DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveIE={CveIE}")
|
||||
Saldo = DatosSaldoAntNCDev.FiltroPrimeroValor("Saldo", $"CveIE={CveIE}").ToDecimal
|
||||
Else
|
||||
Folio = DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveVenta={CveVenta}")
|
||||
Saldo = DatosSaldoAntNCDev.FiltroPrimeroValor("Saldo", $"CveVenta={CveVenta}").ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If TipoDocto.Contiene("Egs", "Dev", "Ant", "NC") Then
|
||||
@@ -1669,8 +1679,8 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToString))
|
||||
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
|
||||
|
||||
params.Add(New ReportParameter("Monto", Monto.ToString))
|
||||
params.Add(New ReportParameter("Saldo", Saldo.ToString))
|
||||
params.Add(New ReportParameter("Monto", Monto.ToString("###,###,###.00")))
|
||||
params.Add(New ReportParameter("Saldo", Saldo.ToString("###,###,###.00")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
|
||||
Dim NombreArchivo As String = "SaldoAntNCDev.rdlc"
|
||||
@@ -3121,9 +3131,6 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("FechaImpresion", NowADS().ToString("dd/MM/yyyy")))
|
||||
params.Add(New ReportParameter("Folio", Folio))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
'params.Add(New ReportParameter("Descuentos", (dr("Descuentos").ToString.ToDouble).FormatoNumero(2)))
|
||||
'params.Add(New ReportParameter("IVA", dr("IVA").ToString.FormatoNumero(2)))
|
||||
'params.Add(New ReportParameter("Total", dr("Total").ToString.FormatoNumero(2)))
|
||||
params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo)))
|
||||
params.Add(New ReportParameter("NombreRecibio", String.Format("RECIBIÓ{0}{1}", vbCrLf, Recibio)))
|
||||
|
||||
@@ -5883,7 +5890,7 @@ Partial Class PopUpVerFactura
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ImprimeMov(CveIE As Integer)
|
||||
Private Sub ImprimeMov(CveIE As Integer, Optional ImportePagoTotal As Decimal = 0, Optional SaldoTotal As Decimal = 0)
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim DtGvRH As New DataTable
|
||||
Dim DtComprobacion As New DataTable
|
||||
@@ -5967,6 +5974,16 @@ Partial Class PopUpVerFactura
|
||||
params.Add(New ReportParameter("importe", ParamComprobacion.Rows(0)("Importe").ToString))
|
||||
params.Add(New ReportParameter("TotAbono", DtComprobacion.SUM("Abonado").ToString))
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
Dim Aplicado As Decimal = 0
|
||||
Dim ImporteDoc As Decimal = ParamComprobacion.Rows(0)("Importe").ToString.ToDecimal
|
||||
Dim LeyendaSaldo As String = $"Folio #{ParamComprobacion.Rows(0)("Folio").ToString} con importe de ${ImporteDoc.ToString("###,###,###.00")} y saldo antes de la comprobación de ${SaldoTotal.ToString("###,###,###.00")}, Comprobaciones a la fecha {ParamComprobacion.Rows(0)("FechaDocumento").ToString().ToDate().ToString("dd/MM/yyyy")} ${ImportePagoTotal.ToString("###,###,###.00")} saldo después de la comprobación ${(SaldoTotal - ImportePagoTotal).ToString("###,###,###.00")} ."
|
||||
params.Add(New ReportParameter("LeyendaSaldo", LeyendaSaldo))
|
||||
End If
|
||||
|
||||
|
||||
params.Add(New ReportParameter("LogoPath", RutaImagenLogo))
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepRembolsosComprobaciones.rdlc", DtComprobacion, params, String.Format("IE{0}", CveIE), Formato:="PDF")
|
||||
@@ -6039,7 +6056,12 @@ Partial Class PopUpVerFactura
|
||||
Dim rdsPrePoliza As New ReportDataSource("DSPrePoliza", dtPrePoliza)
|
||||
reportDataSetsList.Add(rdsPrePoliza)
|
||||
|
||||
Dim lblSubProyecto As New Label
|
||||
CargarCentrosDeCosto(Nothing, Nothing, Nothing, lblSubProyecto)
|
||||
paramList.Add(New ReportParameter("TipoCentroCosto", lblSubProyecto.Text))
|
||||
|
||||
ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientosPrePoliza.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF")
|
||||
|
||||
Else
|
||||
ImprimirPDF("Empresas\Grales\Formatos\rptChequeMovimientos.rdlc", reportDataSetsList, paramList, ObjIE.Folio, "PDF")
|
||||
End If
|
||||
|
||||
@@ -387,6 +387,8 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Dim FoliosFechasValFechaDocumentoPagoMesSuperior As New StringBuilder
|
||||
Dim FoliosFechasValFechaDocumentoMesInferior As New StringBuilder
|
||||
|
||||
Dim SaldoAntesPago As Decimal = TxtChequeSaldo.Text.ToDecimal
|
||||
|
||||
For Each gvRowVal As GridViewRow In GvCxP.Rows
|
||||
|
||||
If gvRowVal.FCCheckBox("Chk").Checked Then
|
||||
@@ -602,6 +604,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim ImportePagoTotal As Decimal = 0
|
||||
If CveIERegistrado > 0 Or CveIEExcedente > 0 Or ChkReembolsarSinBancos.Checked Then
|
||||
'inserto los movimientos de la conta para abonar al saldo
|
||||
If ((TxtImporte.Text.ToDecimal > 0 Or ChkReembolsarSinBancos.Checked) And CvePrePolizaIERegistrado > 0) Or ((TxtImporteVinculado.Text.ToDecimal > 0 And HdnCheque.Value.ToEntero > 0) Or ChkReembolsarSinBancos.Checked) Then
|
||||
@@ -676,7 +679,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Pago.CveMonedaPago = CveMonedaPago
|
||||
Pago.TCPago = TipoCambioPago
|
||||
Pago.CvePersonal =CvePersonal
|
||||
|
||||
ImportePagoTotal = ImportePagoTotal + ImporteMovto
|
||||
'Otros Ingresos
|
||||
If MsgError = "" AndAlso (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
|
||||
Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||
@@ -819,7 +822,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
Dim Mensaje As New StringBuilder
|
||||
|
||||
If CvePrePolizaExcedente > 0 Then
|
||||
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> Cheque: <a target='_blank' href=/Bancos/IE.aspx?CveIE={0}>{1}</a> <br/><br/> <a target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={2}"">Imprimir</a>", CveIEExcedente, TxtFolio.Text, Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIEExcedente)))
|
||||
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> Cheque: <a target='_blank' href=/Bancos/IE.aspx?CveIE={0}>{1}</a> <br/><br/> <a target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={2}"">Imprimir</a>", CveIEExcedente, TxtFolio.Text, Encripta(String.Format("OP=ImprimeMov&CveIE={0}&CvePrePoliza={1}", CveIEExcedente, CvePrePolizaIERegistrado)))
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
|
||||
Else
|
||||
@@ -827,7 +830,7 @@ Partial Class Compras_ReembolsosComprobaciones
|
||||
End If
|
||||
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a>", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIERegistrado)))
|
||||
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a>", Encripta(String.Format("OP=ImprimeMov&CveIE={0}&ImportePagoTotal={1}&Saldo={2}", CveIERegistrado, ImportePagoTotal, SaldoAntesPago)))
|
||||
If CvePrePolizaIERegistrado > 0 Then
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
|
||||
|
||||
1329
Empresas/189/Formatos/EntradaSalida.rdlc
Normal file
1329
Empresas/189/Formatos/EntradaSalida.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -188,10 +188,10 @@
|
||||
<Width>1.40148cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>10.82525cm</Width>
|
||||
<Width>2.95567cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>3.03882cm</Width>
|
||||
<Width>10.82525cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>1.63389cm</Width>
|
||||
@@ -365,14 +365,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox11">
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Descripción</Value>
|
||||
<Value># Parte</Value>
|
||||
<Style>
|
||||
<FontFamily>MYRIAd Pro</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -385,7 +385,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
@@ -418,14 +418,14 @@
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<Textbox Name="Textbox11">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value># Parte</Value>
|
||||
<Value>Descripción</Value>
|
||||
<Style>
|
||||
<FontFamily>MYRIAd Pro</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -438,7 +438,7 @@
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
@@ -683,6 +683,40 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="NumeroParte">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!NumeroParte.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>MYRIAd Pro</FontFamily>
|
||||
<FontSize>6.5pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>NumeroParte</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#0e2455</Color>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>=IIf(RowNumber(Nothing)=1,"1pt","0pt")</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="PS">
|
||||
@@ -715,38 +749,6 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="NumeroParte">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!NumeroParte.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>MYRIAd Pro</FontFamily>
|
||||
<FontSize>6.5pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>NumeroParte</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>#0e2455</Color>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>=IIf(RowNumber(Nothing)=1,"1pt","0pt")</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="PU">
|
||||
@@ -848,7 +850,7 @@
|
||||
<Top>0.17639cm</Top>
|
||||
<Left>0.09756cm</Left>
|
||||
<Height>0.74125cm</Height>
|
||||
<Width>21.24632cm</Width>
|
||||
<Width>21.16317cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
|
||||
@@ -593,7 +593,7 @@ iigAooooAKKKKAP/2Q==</ImageBytes>
|
||||
<AllowHtmlTags>True</AllowHtmlTags>
|
||||
<Brush>Transparent</Brush>
|
||||
<CanGrow>True</CanGrow>
|
||||
<ClientRectangle>0.12,2.4,9.62,2.28</ClientRectangle>
|
||||
<ClientRectangle>0.12,2.4,9.62,2.48</ClientRectangle>
|
||||
<Conditions isList="true" count="0" />
|
||||
<Expressions isList="true" count="0" />
|
||||
<Font>Myriad Pro,9,Regular,Point,False,0</Font>
|
||||
@@ -601,8 +601,8 @@ iigAooooAKKKKAP/2Q==</ImageBytes>
|
||||
<Name>Textbox20</Name>
|
||||
<Page isRef="7" />
|
||||
<Parent isRef="8" />
|
||||
<Text><div><b>Facturado a:&nbsp;</b></div><div><b>Cliente: </b>{ClienteCodigo} - {ClienteNombre}&nbsp;</div><div><b>RFC:</b> {ClienteRFC}
|
||||
<b>Colonia: </b> {ClienteColonia}&nbsp;</div><div><b>Ciudad: </b>{ClienteCiudad} <b>Estado: </b> {ClienteEstado}</div><div><b>Municipio y/o Delegación: </b>{ClienteMunicipio}&nbsp;</div><div><b>Pais:</b> {ClientePais} <b> CP: </b>{ClienteCP}</div></Text>
|
||||
<Text><div><font size="8"><b>Facturado a:&nbsp;</b></font></div><div><font size="8"><b>Cliente: </b>{ClienteCodigo} - {ClienteNombre}&nbsp;</font></div><div><font size="8"><b>RFC:</b> {ClienteRFC}
|
||||
<b>Colonia: </b> {ClienteColonia}&nbsp;</font></div><div><font size="8"><b>Ciudad: </b>{ClienteCiudad} <b>Estado: </b> {ClienteEstado}</font></div><div><font size="8"><b>Municipio y/o Delegación: </b>{ClienteMunicipio}&nbsp;</font></div><div><font size="8"><b>Pais:</b> {ClientePais} <b> CP: </b>{ClienteCP}</font></div><div><font face="Myriad Pro" style="" size="8"><b>Régimen Fiscal:</b> {ClienteRegimenFiscal}</font></div></Text>
|
||||
<TextBrush>Black</TextBrush>
|
||||
<TextQuality>Wysiwyg</TextQuality>
|
||||
<Type>Expression</Type>
|
||||
@@ -6326,8 +6326,8 @@ FUERO DE MI DOMICILIO. LA CANTIDAD DE $ {Total} SON: {(ImporteLetra)}.</Text>
|
||||
<ReportAlias>Factura</ReportAlias>
|
||||
<ReportChanged>12/30/2024 5:44:19 PM</ReportChanged>
|
||||
<ReportCreated>7/11/2022 2:49:19 PM</ReportCreated>
|
||||
<ReportFile>C:\inetpub\WWWSigGit\Empresas\189\Formatos\Factura.mrt</ReportFile>
|
||||
<ReportGuid>e8b162183e2340d1bbaad55d91fb8962</ReportGuid>
|
||||
<ReportFile>Factura.mrt</ReportFile>
|
||||
<ReportGuid>e849bb4463e44732ae40e92228d31a35</ReportGuid>
|
||||
<ReportName>Factura</ReportName>
|
||||
<ReportUnit>Centimeters</ReportUnit>
|
||||
<ReportVersion>2022.4.5.0</ReportVersion>
|
||||
|
||||
@@ -669,7 +669,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Producto.Value</Value>
|
||||
<Value>=IIF(Fields!Producto.Value=".",Fields!Obs.Value,Fields!Producto.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -727,7 +727,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Obs.Value</Value>
|
||||
<Value>=IIF(Fields!Producto.Value=".", "", Fields!Obs.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
@@ -745,6 +745,7 @@
|
||||
</Border>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -121,6 +121,7 @@
|
||||
<Style>
|
||||
<FontFamily>MYRIAd Pro</FontFamily>
|
||||
<FontSize>7.5pt</FontSize>
|
||||
<Format>dd/MM/yyyy</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
@@ -529,7 +530,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Facura:</Value>
|
||||
<Value>Factura:</Value>
|
||||
<Style>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
@@ -802,9 +803,7 @@
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!FechaImpresion.Value</Value>
|
||||
<Style>
|
||||
<Format>D</Format>
|
||||
</Style>
|
||||
<Style />
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
|
||||
1166
Empresas/189/Formatos/Transferencia.rdlc
Normal file
1166
Empresas/189/Formatos/Transferencia.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -53,6 +53,10 @@
|
||||
<DataField>Almacen</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="NumeroParte">
|
||||
<DataField>NumeroParte</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>DsInventarios</rd:DataSetName>
|
||||
@@ -81,7 +85,10 @@
|
||||
<Width>2.35965cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>13.49625cm</Width>
|
||||
<Width>3.67771cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>9.81854cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
@@ -220,6 +227,50 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox12">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value># Parte</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox12</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<TopBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>None</Style>
|
||||
<Width>1pt</Width>
|
||||
</TopBorder>
|
||||
<BottomBorder>
|
||||
<Color>Black</Color>
|
||||
<Style>None</Style>
|
||||
<Width>1pt</Width>
|
||||
</BottomBorder>
|
||||
<BackgroundColor>#e36c09</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
@@ -380,6 +431,40 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="NumeroParte">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!NumeroParte.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Myriad Pro</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>NumeroParte</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<VerticalAlign>Bottom</VerticalAlign>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="PS">
|
||||
@@ -525,6 +610,39 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox14">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value />
|
||||
<Style>
|
||||
<FontSize>7pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Left</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox14</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<VerticalAlign>Bottom</VerticalAlign>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>=IIf(rownumber(nothing) = 1, "2pt", "0pt")</PaddingTop>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox37">
|
||||
@@ -568,6 +686,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -488,7 +488,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Producto.Value</Value>
|
||||
<Value>=IIF(Fields!Producto.Value=".",Fields!Obs.Value,Fields!Producto.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>8.5pt</FontSize>
|
||||
@@ -521,7 +521,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Obs.Value</Value>
|
||||
<Value>=IIF(Fields!Producto.Value=".", "", Fields!Obs.Value)</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>8.5pt</FontSize>
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -21,6 +21,10 @@
|
||||
<DataField>Folio</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SubProyecto">
|
||||
<DataField>SubProyecto</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Descripcion">
|
||||
<DataField>Descripcion</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
@@ -280,19 +284,22 @@
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>3.28769cm</Width>
|
||||
<Width>2.30174cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>6.38658cm</Width>
|
||||
<Width>2.5cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.30262cm</Width>
|
||||
<Width>5.49301cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.03516cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.35633cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.36223cm</Width>
|
||||
<Width>1.96772cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.20167cm</Width>
|
||||
@@ -342,6 +349,43 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!TipoCentroCosto.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<BackgroundColor>LightGrey</BackgroundColor>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox21">
|
||||
@@ -351,7 +395,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Descripción</Value>
|
||||
<Value>Descripcion</Value>
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -602,6 +646,39 @@
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="SubProyecto1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!SubProyecto.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>SubProyecto1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Color>LightGrey</Color>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Descripcion">
|
||||
@@ -855,12 +932,13 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<ColSpan>4</ColSpan>
|
||||
<ColSpan>5</ColSpan>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell />
|
||||
<TablixCell />
|
||||
<TablixCell />
|
||||
<TablixCell />
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Importe2">
|
||||
@@ -985,6 +1063,7 @@
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
@@ -1014,7 +1093,7 @@
|
||||
<Top>2.18687cm</Top>
|
||||
<Left>0.19063cm</Left>
|
||||
<Height>1.42958cm</Height>
|
||||
<Width>21.11455cm</Width>
|
||||
<Width>21.07307cm</Width>
|
||||
<ZIndex>4</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -1787,7 +1866,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Sub Proyecto</Value>
|
||||
<Value>=Parameters!TipoCentroCosto.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Verdana</FontFamily>
|
||||
<FontSize>8pt</FontSize>
|
||||
@@ -2494,7 +2573,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox10</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>8.07914cm</Left>
|
||||
<Height>0.50299cm</Height>
|
||||
<Width>2.87394cm</Width>
|
||||
@@ -2526,7 +2604,6 @@
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox11</rd:DefaultName>
|
||||
<Top>0cm</Top>
|
||||
<Left>10.95308cm</Left>
|
||||
<Height>0.50299cm</Height>
|
||||
<Width>4.58986cm</Width>
|
||||
@@ -2623,6 +2700,12 @@
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
<ReportParameter Name="TipoCentroCosto">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<Variables>
|
||||
<Variable Name="SumNC">
|
||||
|
||||
@@ -287,24 +287,40 @@ Partial Class Inventarios_Kardex
|
||||
GvM.DataSource = DtTemp
|
||||
GvM.DataBind()
|
||||
UpAcciones.Update()
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa <> 119 Then
|
||||
|
||||
Dim drPs As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "")
|
||||
|
||||
If drPs IsNot Nothing Then
|
||||
Dim NumeroParte As String = drPs("NumeroParte").ToString
|
||||
Dim Codigo As String = drPs("Codigo").ToString
|
||||
Dim PS As String = drPs("PS").ToString
|
||||
|
||||
If CvePS > 0 Then
|
||||
Dim NumeroParte As String = GlobalDTPS(UsuarioActual.CveEmpresa, ddlProducto2.SelectedValue.ToEntero).FiltroPrimeroValor("NumeroParte")
|
||||
If NumeroParte.Trim.Length > 0 Then
|
||||
LblNumeroParte.Text = $" Número de Parte: {NumeroParte}"
|
||||
LblNumeroParte.Visible = True
|
||||
If NumeroParte.Trim.Length > 0 Then
|
||||
If UsuarioActual.TienePermisoPagina(13) Then
|
||||
LblNumeroParte.Text = $" Número de Parte: <a href='../Ventas/ProductosServicios.aspx?CvePS={CvePS}' class='Texto' target='_blank' >{NumeroParte} - {Codigo} - {PS}</a>"
|
||||
Else
|
||||
LblNumeroParte.Text = $" Número de Parte: {NumeroParte}"
|
||||
End If
|
||||
LblNumeroParte.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
UpNumeroParte.Update()
|
||||
|
||||
|
||||
Else
|
||||
Alert("Seleccione un producto.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
UpNumeroParte.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargarOCPendientesCompra()
|
||||
|
||||
10
OC/OC.aspx
10
OC/OC.aspx
@@ -513,7 +513,11 @@
|
||||
<asp:TextBox ID="TxtPorcentajeProntoPago" CssClass="form-control " runat="server" MaxLength="50" Width="80px" Height="28px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPorcentajeProntoPago" ValidChars="1234567890." />
|
||||
</td>
|
||||
<td></td>
|
||||
<td><b>Días Crédito:</b></td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="TxtDiasCreditoOC" MaxLength="50" Width="80px" Height="28px"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDiasCreditoOC" FilterType="Custom" ValidChars="0123456789" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ContentTemplate>
|
||||
@@ -1766,9 +1770,7 @@
|
||||
<asp:RequiredFieldValidator ID="RFVGrid" runat="server" ControlToValidate="TxtGrid" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Cuando menos debe tener un <b>''Producto''</b>" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEGrid" runat="server" HighlightCssClass="vco" TargetControlID="RFVGrid" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:CheckBox runat="server" ID="ChkEsTemporalRegistro" Text="Registrar Temporal" Visible="false" />
|
||||
</asp:UpdatePanel>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
@@ -739,10 +739,18 @@ Partial Class OC_OC
|
||||
TdProyectoSubPrpyectoDdl.Visible = False
|
||||
TdProyectoSubPrpyecto.Visible = False
|
||||
GvD.Columns(4).Visible = False
|
||||
|
||||
chkSubProyectoEntrega.Checked = True
|
||||
DdlSubProyectoEntrega.Visible = chkSubProyectoEntrega.Checked
|
||||
txtLugarEntrega.Visible = Not chkSubProyectoEntrega.Checked
|
||||
UPPEmp.Update()
|
||||
|
||||
UPPDetalle.Update()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'CARGA YA REGISTRADO
|
||||
If Request("OC") IsNot Nothing AndAlso IsNumeric(Request("OC")) AndAlso Request("OC").ToEntero > 0 Then
|
||||
|
||||
@@ -1073,9 +1081,6 @@ Partial Class OC_OC
|
||||
TrDescuentoEscalonado.Visible = True
|
||||
TrDescuentoProntoPago.Visible = True
|
||||
|
||||
If TipoOC = "OC" AndAlso UsuarioActual.TienePermisoProceso(401) AndAlso EsNuevo Then
|
||||
ChkEsTemporalRegistro.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.CveEmpresa = 189 AndAlso CveOrdenCompra <> Nothing AndAlso CveOrdenCompra > 0 Then
|
||||
@@ -1634,6 +1639,7 @@ Partial Class OC_OC
|
||||
TxtLugarEntregaDirecta.Text = objOC.LugarEntrega
|
||||
DdlDireccionEnvio.SelectedValueExist(objOC.CveDireccionEnvio.ToString)
|
||||
DdlUsoCFDI.SelectedValueExist(objOC.CveUsoCFDI.ToString)
|
||||
TxtDiasCreditoOC.Text = objOC.DiasCreditoOC.ToString
|
||||
|
||||
If objOC.CveDireccionEnvio > 0 And DdlDireccionEnvio.SelectedValue.ToEntero <> objOC.CveDireccionEnvio Then
|
||||
Alert("La dirección de envio no se pudo cargar correctamente. Por favor verifique que la dirección de envio aun este vigente.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -2961,7 +2967,7 @@ Partial Class OC_OC
|
||||
RequiereCotizacion:=ChkCotizacion.Checked, CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal,
|
||||
RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim,
|
||||
IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text.Trim(), MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(),
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago, DiasCreditoOC:=TxtDiasCreditoOC.Text.Toentero) Then
|
||||
|
||||
CveOrdenCompraPadre = OC.CveOrdenCompra
|
||||
If CveOrdenCompraPadre > 0 Then
|
||||
@@ -3005,7 +3011,7 @@ Partial Class OC_OC
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1),
|
||||
CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
Promocion:=Promocion, CveProveedorContacto:=CveProveedorContacto, NumRemision:=TxtNumRemision.Text, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero,
|
||||
PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
PorcentajeProntoPago:=PorcentajeProntoPago, DiasCreditoOC:=TxtDiasCreditoOC.Text.Toentero) Then
|
||||
CveOrdenCompra = OC.CveOrdenCompra
|
||||
CveEstatus = CboE.SelectedValue.ToEntero
|
||||
|
||||
@@ -3701,7 +3707,7 @@ Partial Class OC_OC
|
||||
PorcentajeIVA:=PorIVA, IVA:=IVACot, RetIVA:=RetIVA.ToString.ToDecimal, RetISR:=RetISR.ToString.ToDecimal, IDPoliza:=IdPoliza, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal,
|
||||
CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, Promocion:=Promocion, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(),
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago, DiasCreditoOC:=TxtDiasCreditoOC.Text.Toentero) Then
|
||||
|
||||
'CREA POLIZA POR CADA PROVEEDOR
|
||||
|
||||
@@ -3780,7 +3786,7 @@ Partial Class OC_OC
|
||||
CveUsuario, CveEmpresaActual, 0, pCveProveedor:=DdlProveedores.SelectedValue.ToEntero, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveUsuarioAsignado:=DdlUsuariosAsignado.SelectedValue.ToEntero(), CveCliente:=Ddlcliente.txtValue.Value.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PrioridadObservacion:=txtobsprioridad.Text,
|
||||
PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDecimal - 1, 2), IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, IDPoliza:=IDPolizaPresupuestal, CveCotizacion:=CveCotizacion, FolioAdicional:=TxtFolioAdicional.Text,
|
||||
EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), IEPS:=TxtIEPS.Text.ToDecimal, CveIEAnticipo:=CveIEAnticipo, ImporteAnticipo:=ImporteAnticipos, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero,
|
||||
Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||
Promocion:=Promocion, NumRemision:=TxtNumRemision.Text.Trim, MetodoPago:=DdlMetodoPago.SelectedValue.ToEntero(), CveSubProyectoEntrega:=DdlSubProyectoEntrega.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago, DiasCreditoOC:=TxtDiasCreditoOC.Text.Toentero) Then
|
||||
|
||||
'USA AC
|
||||
If UsuarioActual.Empresa.UsaAC AndAlso VerificaPresupuesto Then ' AGREGAR POLIZA
|
||||
|
||||
@@ -131,6 +131,16 @@
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" >
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkConvertirDeudor" OnClick="LnkConvertirDeudor_Click" runat="server" Visible="false">
|
||||
<i class="fa fa-share-square-o" aria-hidden="true"></i> Convertir en Deudor
|
||||
</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
|
||||
@@ -998,6 +998,12 @@ Partial Class RH_Personal
|
||||
CarcaConceptosNomina()
|
||||
CargaFonacot()
|
||||
End If
|
||||
|
||||
|
||||
ValidaDeudorAcreedor()
|
||||
|
||||
|
||||
|
||||
Else
|
||||
cargatipoTrabajador()
|
||||
MostrarOcultarFechasEstatus()
|
||||
@@ -8188,6 +8194,57 @@ Partial Class RH_Personal
|
||||
args.IsValid = retorno
|
||||
End Sub
|
||||
|
||||
Private Sub ValidaDeudorAcreedor()
|
||||
|
||||
Dim RFCval As String = TxtRFC.Text.Trim
|
||||
|
||||
If CvePersonal > 0 AndAlso (RFCval <> "-1" And RFCval <> "") Then
|
||||
Dim CveProveedor As Integer = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, RFC:=TxtRFC.Text).FiltroPrimeroValor("CveProveedor").ToEntero
|
||||
If Not CveProveedor > 0 Then
|
||||
LnkConvertirDeudor.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkConvertirDeudor_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim ProcesoOK = True
|
||||
|
||||
Dim ObjProveedores As New ClsCompProveedores()
|
||||
Dim ObjCuentasDeposito As New ClsGenerales(ObjProveedores.IniciaTransacSQL())
|
||||
Dim NuevoCveProveedor As Integer = -1
|
||||
|
||||
Dim CveProveedorClasificacion As Integer = GlobalDTProveedorClasificacion(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveProveedorClasificacion").ToEntero
|
||||
|
||||
If ObjProveedores.AddProveedor(TxtCodigo.Text.Trim, TxtNombres.Text.Trim, TxtNombres.Text.Trim, TxtNombres.Text.Trim, TxtRFC.Text.Trim, $"{TxtCalle.Text} #{TxtNumExt.Text} {TxtColonia.Text}", TxtTelefono.Text.Trim.Replace("("c, "").Replace(")"c, "").Replace("-"c, "").Replace(" ", ""),
|
||||
TxtNombres.Text.Trim, TxtCorreo.Text.Trim, TxtCelularPersonal.Text.Trim.Replace("("c, "").Replace(")"c, "").Replace("-"c, "").Replace(" ", ""), 0, 0,
|
||||
TxtObservaciones.Text.Trim, 0, 0, 0,
|
||||
CveProveedorClasificacion, -1, TxtCorreo.Text.Trim, TxtCorreo.Text.Trim, False, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
2, 1, DIOTCveTipoTercero:=1, DIOTCveTipoOperacion:=3, CP:=TxtCP.Text.ToEntero, CveRegimenFiscal:=1) Then
|
||||
|
||||
NuevoCveProveedor = ObjProveedores.CveProveedor
|
||||
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
ObjCuentasDeposito.Commit()
|
||||
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
|
||||
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
|
||||
Alert($"Deudor Agregado Correctamente <b><a target='_blank' href='../Compras/Proveedores.aspx?CveProveedor={NuevoCveProveedor}' class='Texto'>{TxtCodigo.Text.Trim}</a></b>")
|
||||
LnkConvertirDeudor.Visible = False
|
||||
Else
|
||||
ObjProveedores.RollBack()
|
||||
End If
|
||||
ObjProveedores.Dispose()
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -123,30 +123,39 @@
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAutorizacion,CveCliente,CveVendedor,Importe,TipoAutorizacion,Saldo,LimiteCredito,DiasVencidos,DiasVencidosAutorizacion"
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAutorizacion,CveCliente,CveVendedor,Importe,TipoAutorizacion,Saldo,LimiteCredito,DiasVencidos,DiasVencidosAutorizacion,TipoDocumento"
|
||||
EmptyDataText="No se encontraron autorizaciones" ToolTip=""
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<%-- 0--%>
|
||||
<asp:TemplateField HeaderText="Tipo " ItemStyle-Width="3%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTipo" Text='<%# Eval("TipoDocumento") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 1--%>
|
||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="3%">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblTipoAuto" Text='<%# Eval("TipoAutorizacionTexto") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 2--%>
|
||||
<asp:HyperLinkField DataTextField="NombreComercial" Target="_blank" HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%" />
|
||||
<%-- 3--%>
|
||||
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" ItemStyle-Width="9%" />
|
||||
<%-- 30--%>
|
||||
<%-- 4--%>
|
||||
<asp:BoundField DataField="Importe" ItemStyle-Width="7%" HeaderText="Importe" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="PorcentajeDescuento" ItemStyle-Width="5%" HeaderText="% Desc" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="LimiteCredito" ItemStyle-Width="7%" HeaderText="L.Créd" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Saldo" ItemStyle-Width="7%" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="FechaIng" ItemStyle-Width="7%" HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
|
||||
<asp:BoundField DataField="DiasVencidos" ItemStyle-Width="3%" HeaderText="D.Ven" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:N0}" />
|
||||
<asp:HyperLinkField DataTextField="FacturaAplicada" ItemStyle-Width="7%" Target="_blank" HeaderText="Factura" DataNavigateUrlFields="CveVentaAplicada" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField ItemStyle-Width="7%">
|
||||
<HeaderTemplate>Folio</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 45--%>
|
||||
<asp:BoundField DataField="Usuario" HeaderText="Solicitó" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Motivo" HeaderText="Motivo" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -169,54 +178,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="portlet light xspadding traspasorow bordered" id="DivAntNCIxC" runat="server" visible="false">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1; color: #ff6000;">Anticipos, notas de crédito e ingresos por comprobar</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
<div class="row" style="margin-left: 0px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusquedaAnt" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnt','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnt','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:GridView ID="GVAnticipos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" GridLines="None" DataKeyNames="CveIE,Folio,Tipo,CveVenta,CveCliente" Style="text-align: center; min-width: 783px; width: 100%;">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="40%" />
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="15%">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFactura" runat="server"></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="Tipo" DataFormatString="{0}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
|
||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblEstatus" Text='<%# Eval("EstatusTexto") %>' runat="server"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Acciones" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkAutorizar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ToolTip="Autorizar Anticipo" runat="server" OnClick="LnkAutorizarAnticipo_Click" />
|
||||
<asp:LinkButton ID="LnkCancelar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'></i>" ToolTip="Bloquear Anticipo" runat="server" OnClick="LnkCancelarAnticipo_Click" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DModal" class="modal ADS fade" role="dialog">
|
||||
|
||||
@@ -37,6 +37,14 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
DdlCliente.setEsWebService(True)
|
||||
DdlClienteFiltro.setEsWebService(True)
|
||||
|
||||
If Request("CveCliente") IsNot Nothing AndAlso Request("CveCliente").ToString().ToEntero() > 0 Then
|
||||
Dim CveCliente As Integer = Request("CveCliente").ToString().ToEntero()
|
||||
Dim Cliente As String = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial")
|
||||
|
||||
DdlClienteFiltro.SelectedValue = CveCliente.ToString()
|
||||
DdlCliente.SelectedText = Cliente
|
||||
End If
|
||||
|
||||
'Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
'If EsWS Then
|
||||
' DdlCliente.setEsWebService(True)
|
||||
@@ -62,8 +70,8 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
|
||||
DdlEstatus.SelectedValue = "0"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
DivAntNCIxC.Visible = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then
|
||||
LnkAgregar.Visible = False
|
||||
End If
|
||||
|
||||
UpModal.Update()
|
||||
@@ -87,10 +95,6 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
ObjGral.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
If DivAntNCIxC.Visible Then
|
||||
CargaAnticipos(CveCliente, FechaI, FechaF)
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
@@ -198,6 +202,12 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
e.Row.FCLabel("LblTipoAuto").CssClass = "badge badge-secondary"
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveIEAplicado").ToString().ToEntero() > 0 Then
|
||||
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" target=""_blank"" href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", e.Row.DBCampo("CveIEAplicado"), e.Row.DBCampo("FolioIEAplicado"))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DBCampo("CveVentaAplicada"), e.Row.DBCampo("FacturaAplicada"))
|
||||
End If
|
||||
|
||||
'If e.Row.DBCampo("Estatus") = "True" Then
|
||||
' e.Row.Cells(1).ForeColor = Drawing.Color.Green
|
||||
' e.Row.Cells(1).Font.Bold = True
|
||||
@@ -225,6 +235,10 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
'cuando es la modalidad 3, es autorización directa sobre la venta ya asociada a la solicitud.
|
||||
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then CveEstatusAutorizacion = 2
|
||||
|
||||
If gvRow.DataKey("TipoDocumento") = "Anticipo" Then
|
||||
CveEstatusAutorizacion = 1
|
||||
End If
|
||||
|
||||
Dim Importe As Decimal = gvRow.DataKey("Importe").ToDecimal().RoundSQL(2)
|
||||
'AUTORIZACION DE IMPORTE,
|
||||
'el cliente limite de 500, y saldo de 501. autorización que puede autorizar no puede ser mayor a 49 ( limite * 1.% - Saldo)
|
||||
@@ -376,130 +390,4 @@ Partial Class Ventas_CatAutorizacionLimites
|
||||
Public Overrides Sub VerifyRenderingInServerForm(control As Control)
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
Private Sub CargaAnticipos(CveCliente As Integer, FechaI As DateTime, FechaF As DateTime)
|
||||
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
If ObjMovtos.GetAnticiposNCIxCAutorizaciones(CveCliente, UsuarioActual.CveEmpresa, FechaI, FechaF) Then
|
||||
GVAnticipos.DataSource = ObjMovtos.DtResultados
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
GVAnticipos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
Dim CveCliente = GvRow.DataKey("CveCliente").ToEntero()
|
||||
|
||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
Dim Actualizo As Boolean = False
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
If Actualizo Then
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1)
|
||||
ObjEventoBitacora.Dispose()
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
Dim CveCliente = GvRow.DataKey("CveCliente").ToEntero()
|
||||
|
||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
Dim Actualizo As Boolean = False
|
||||
Using ObjVentas As New ClsVentas
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
|
||||
If Actualizo Then
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1)
|
||||
ObjEventoBitacora.Dispose()
|
||||
End If
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GVAnticipos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAnticipos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim AnticipoAutorizado = CBool(e.Row.DBCampo("AnticipoAutorizado"))
|
||||
|
||||
If AnticipoAutorizado Then
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-success"
|
||||
Else
|
||||
e.Row.FCLabel("LblEstatus").CssClass = "badge badge-danger"
|
||||
End If
|
||||
|
||||
If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then
|
||||
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio"))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(379) Then
|
||||
If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
|
||||
If Not AnticipoAutorizado Then
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveIE").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("IxC") Then
|
||||
If Not AnticipoAutorizado Then
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -351,10 +351,14 @@
|
||||
<asp:LinkButton ID="LnkAgregarLineaAdicional" data-toggle="tooltip" runat="server" Text="<i class='fa fa-plus'></i> Agregar Linea Adicional" Visible="false" OnClick="LnkAgregarLineaAdicional_Click"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpdatePanel11" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDevolucionMasiva" runat="server" OnClick="LnkDevolucionMasiva_Click"><i class="fa fa-minus"></i>Devolución</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -543,8 +547,6 @@
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="False" id="dvZH">
|
||||
<asp:DropDownList ID="DdlZonaHoraria" DataTextField="DisplayText" DataValueField="CveZonaHoraria" runat="server" CssClass="form-control input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
@@ -566,7 +568,6 @@
|
||||
</div>
|
||||
|
||||
<div class="row" id="divRegimen" runat="server" visible="false">
|
||||
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlRegimenFiscal" DataTextField="CodigoRegimenFiscalTexto" AutoPostBack="true" Width="100%" DataValueField="CveRegimenFiscal" runat="server" CssClass="form-control input-sm select2me">
|
||||
@@ -589,13 +590,7 @@
|
||||
<asp:RequiredFieldValidator ID="RfvDdlGeneroCliente" runat="server" InitialValue="-1" ControlToValidate="DdlGeneroCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Género''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlGeneroCliente.ClientID.ToString()%>">Género:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light xspadding bordered">
|
||||
@@ -2294,8 +2289,6 @@
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnCargaAnticipos" runat="server" ClientIDMode="Static" Text="CargaAnt" Style="display: none;" OnClick="BtnCargaAnticipos_Click" />
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="portlet light xspadding bordered">
|
||||
@@ -2310,6 +2303,9 @@
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAnticipoClientePDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkAnticipoClienteExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 125px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkAnticipoClientePDF" />
|
||||
@@ -2320,8 +2316,110 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div runat="server" id="divDevolverAnticipos" visible="False">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label>Tipo Movimiento:</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlTipoTransaccion" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" ValidationGroup="GrpGuardar" Width="100%" >
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipoTransaccion" runat="server" ControlToValidate="DdlTipoTransaccion" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Movimiento''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTipoTransancion" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipoTransaccion" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="padding-bottom: 5px;">
|
||||
<div class="col-md-4">
|
||||
<label>Cuenta:</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardar" Width="100%" >
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="row" style="padding-bottom: 5px;">
|
||||
<div class="col-md-4">
|
||||
<label>Fecha:</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="imgCalendarioDev" class="btn default" type="button">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" UserDateFormat="DayMonthYear" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="imgCalendarioDev" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<ajax:MaskedEditValidator ID="MEVCalendario" runat="server" ControlExtender="MEEFecha" ControlToValidate="TxtFechaDocumento" Display="None" IsValidEmpty="False" MaximumValueMessage="Fecha Excedida" ErrorMessage="*" InvalidValueMessage="Fecha Invalida" InvalidValueBlurredMessage="b" MinimumValueMessage="Fecha Menor a la permitida" Enabled="False" ValidationGroup="GrpGuardar"></ajax:MaskedEditValidator>
|
||||
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha Documento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha Documento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender8" runat="server" HighlightCssClass="vco" TargetControlID="MEVCalendario" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="padding-bottom: 5px;">
|
||||
<div class="col-md-4">
|
||||
<label>Importe:</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtImporteDev" runat="server" MaxLength="12" CssClass="input-sm" ClientIDMode="Static" Style="text-align: right;" AutoComplete="off" Width="145px"></asp:TextBox>
|
||||
<%--<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="TxtImporteDev" FilterType="Custom, Numbers" ValidChars="+-.," />
|
||||
<asp:RangeValidator ID="RVImporte" runat="server" Enabled="false" Type="Currency" MinimumValue="0" MaximumValue="0" ErrorMessage="Importe Excedido" ControlToValidate="TxtImporteDev" Display="Dynamic" ValidationGroup="GrpGuardar"></asp:RangeValidator>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="padding-bottom: 5px;" id="DivTotal" runat="server" visible="false">
|
||||
<div class="col-md-4">
|
||||
<label></label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
<asp:TextBox ID="TxtTotal" runat="server" MaxLength="12" CssClass="input-sm" ClientIDMode="Static" Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off" Width="145px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom: 10px;">
|
||||
<div class="col-md-2">
|
||||
<label>Observaciones:</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtDevObs" runat="server" MaxLength="500" CssClass="form-control input-sm" Rows="2" TextMode="MultiLine" ClientIDMode="Static" Width="100%"></asp:TextBox>
|
||||
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<label>Redondeo:</label>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<asp:TextBox ID="TxtDevRedondeo" runat="server" MaxLength="12" CssClass="input-sm" ClientIDMode="Static" Style="text-align: right;" onkeyup="FCSumaTotalesNCAnticipos()" AutoComplete="off" Width="125px"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<label>Cta Depósito:</label>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
<asp:DropDownList ID="DdlCuentaDeposito" runat="server" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" CssClass="form-control input-sm select2me" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
|
||||
<asp:LinkButton ID="LnkAplicaDevolucion" CssClass="btn btn-primary" runat="server" OnClick="LnkAplicaDevolucion_Click">Guardar Devolución</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkDevolucionCerrar" CssClass="btn default" runat="server" OnClick="LnkDevolucionCerrar_Click">Cerrar </asp:LinkButton>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-scrollable">
|
||||
<asp:GridView ID="GVAnticipos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente" ToolTip="Listado de Anticipos" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" GridLines="None" DataKeyNames="ISTotal,Saldo,Total,CveIE,Folio,Tipo,CveVenta,CveConceptoContable" Style="text-align: center; min-width: 783px; width: 100%;">
|
||||
<asp:GridView ID="GVAnticipos" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Anticipos del Cliente" CssClass="GVAnticipos table table-striped table-hover Widthall mysmallbtn" GridLines="None" DataKeyNames="ISTotal,Saldo,Total,CveIE,Folio,Tipo,CveVenta,CveConceptoContable,IVA,IEPS,RetIVA,RetISR,PorcentajeIVA" Style="text-align: center; min-width: 783px; width: 100%;">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
@@ -2339,15 +2437,16 @@
|
||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField HeaderText="Devolución" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chkDevolver" runat="server" Visible="false" CssClass="CssSelector" onclick="FCSumaTotalesNCAnticipos()" />
|
||||
<asp:HyperLink ID="HLDevolverDinero" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-usd'></i>" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Autorización" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<%-- <asp:TemplateField HeaderText="Autorización" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkAutorizar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ToolTip="Autorizar Anticipo" runat="server" OnClick="LnkAutorizarAnticipo_Click" />
|
||||
<asp:LinkButton ID="LnkCancelar" Visible="false" NavigateUrl="#" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-ban'></i>" ToolTip="Bloquear Anticipo" runat="server" OnClick="LnkCancelarAnticipo_Click" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
@@ -2355,10 +2454,6 @@
|
||||
</div>
|
||||
|
||||
<br />
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusquedaAnticiposHistorial" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticiposHistorial','{0}')", GVAnticiposHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticiposHistorial','{0}')", GVAnticiposHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<div class="portlet light xspadding bordered">
|
||||
<div class="portlet-title">
|
||||
@@ -2372,6 +2467,8 @@
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="LnkAnticipoHistorialPDF" runat="server" data-toggle="tooltip" Title="PDF"> <i class="fa fa-file-pdf-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkAnticipoHistorialExcel" runat="server" data-toggle="tooltip" Title="Excel"><i class="fa fa-file-excel-o" style="margin-right: 10px; font-size:15px; font-weight:bold; color:dimgray;"></i> </asp:LinkButton>
|
||||
<input type="text" id="TxtBusquedaAnticiposHistorial" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticiposHistorial','{0}')", GVAnticiposHistorial.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 125px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticiposHistorial','{0}')", GVAnticiposHistorial.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkAnticipoHistorialPDF" />
|
||||
@@ -2408,8 +2505,8 @@
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
@@ -3627,14 +3724,14 @@
|
||||
<asp:UpdatePanel ID="UpContratosInactivos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div id="dvCa" style="width: 100%; top: 30px">
|
||||
<table id="dTable" class="table Widthall ">
|
||||
<div id="dvCon" style="width: 100%; top: 30px">
|
||||
<table id="dTablecon" class="table Widthall ">
|
||||
<tr>
|
||||
<td width="40%" id="TH1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="10%" id="TH2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="20%" id="TH3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="20%" id="TH4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<td width="10%" id="TH5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
<td width="40%" id="THcon1" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Clasificación</strong> </td>
|
||||
<td width="10%" id="THcon2" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Contratado</strong> </td>
|
||||
<td width="20%" id="THcon3" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance</strong> </td>
|
||||
<td width="20%" id="THcon4" style="font-size: medium; text-align: center!important; background-color: #dddddd;"><strong>Faltante</strong> </td>
|
||||
<td width="10%" id="THcon5" style="font-size: medium; text-align: center!important; background-color: #b9b9b9;"><strong>Avance Por Facturar</strong> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -5642,14 +5739,14 @@
|
||||
Importe total:
|
||||
<asp:TextBox Text="" ID="TxtSaldoImportar" ClientIDMode="Static" Enabled="false" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right" runat="server" id="DVBusquedaImportarSaldos" visible="false">
|
||||
<input type="text" id="TxtBusquedaImportarSaldos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaImportarSaldos','{0}')", GvImportarSaldos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaImportarSaldos','{0}')", GvImportarSaldos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div style="height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvImportarSaldos" DataKeyNames="CveIE, CveCliente,Total,IVA,Original,PorcentajeIVA,Tipo,CveVenta" AutoGenerateColumns="false" GridLines="None"
|
||||
<asp:GridView ID="GvImportarSaldos" DataKeyNames="CveIE, CveCliente,Total,IVA,Original,PorcentajeIVA,Tipo,CveVenta" AutoGenerateColumns="false" GridLines="None"
|
||||
CssClass="table table-striped table-hover Widthall" runat="server">
|
||||
<Columns>
|
||||
<asp:TemplateField ItemStyle-Width="5%">
|
||||
@@ -7979,7 +8076,30 @@
|
||||
$("#BtnDirClienteValidar").click();
|
||||
|
||||
}
|
||||
function FCSumaTotalesNCAnticipos() {
|
||||
var Total = 0.0;
|
||||
debugger;
|
||||
$(`.CssSelector input[type=checkbox]`).each(function () {
|
||||
if ($(this).is(":checked")) {
|
||||
Total += parseFloat($(this).attr("data-saldo"));
|
||||
}
|
||||
});
|
||||
|
||||
if (Total > 0) {
|
||||
|
||||
if ($(`#TxtDevRedondeo`).val() != '') {
|
||||
Total += parseFloat($(`#TxtDevRedondeo`).val());
|
||||
}
|
||||
|
||||
$(`#TxtImporteDev`).val(Total);
|
||||
|
||||
FormatoMoneda($get("TxtImporteDev"));
|
||||
|
||||
} else {
|
||||
$(`#TxtImporteDev`).val("");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -101,6 +101,19 @@ Partial Class Clientes
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property ModalidadSelecionDevAnticipos As Boolean
|
||||
Get
|
||||
If ViewState("ModalidadSelecionDevAnticipos") Is Nothing Then
|
||||
Return False
|
||||
Else
|
||||
Return CBool(ViewState("ModalidadSelecionDevAnticipos").ToString())
|
||||
End If
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("ModalidadSelecionDevAnticipos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Existe As Boolean
|
||||
Get
|
||||
Return Convert.ToBoolean(ViewState("Existe"))
|
||||
@@ -1618,9 +1631,9 @@ Partial Class Clientes
|
||||
ChkMuestraNombre.Checked = ObjClientes.ImprimeNombreSucursal
|
||||
|
||||
DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString())
|
||||
DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString())
|
||||
DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago.ToString())
|
||||
'DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString())
|
||||
CargaFormaDePago(ObjClientes.CveFormaPago33)
|
||||
CargaFormaDePago(ObjClientes.CveFormaPago)
|
||||
If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal)
|
||||
|
||||
ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS
|
||||
@@ -1946,9 +1959,9 @@ Partial Class Clientes
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
|
||||
GVAnticipos.Columns(7).Visible = True
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) Then
|
||||
' GVAnticipos.Columns(7).Visible = True
|
||||
'End If
|
||||
|
||||
GVAnticipos.DataBind()
|
||||
GVAnticiposHistorial.DataBind()
|
||||
@@ -3007,9 +3020,6 @@ Partial Class Clientes
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
End If
|
||||
|
||||
'If e.Row.DataKey("Saldo").ToDouble < 0 Then e.Row.Cells(2).ForeColor = Drawing.Color.Red
|
||||
'If e.Row.DataKey("Saldo").ToDouble = 0 Then DirectCast(e.Row.FindControl("LtlAnticipos"), Literal).Text = ""
|
||||
|
||||
If e.Row.RowIndex > -1 Then
|
||||
If e.Row.DBCampo("Folio") = "N/D" Then
|
||||
e.Row.FCLiteral("LtlFactura").Text = e.Row.DataKey("Folio")
|
||||
@@ -3023,118 +3033,36 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(247) Then
|
||||
If CType(sender, GridView).ID = "GVAnticipos" And e.Row.DBCampo("CveVenta").ToEntero() > 0 And e.Row.DBCampo("Tipo") = "NC" Then
|
||||
Dim Parametros As String = Encripta($"CveVenta={e.Row.DBCampo("CveVenta").ToEntero()}&SerieFolio={e.Row.DBCampo("Folio")}&CveMoneda={e.Row.DBCampo("CveMoneda")}&CveCliente={CveCliente}&Saldo={e.Row.DBCampo("Saldo")}&Original={e.Row.DBCampo("Original")}&CvePrePoliza={e.Row.DBCampo("CvePrePoliza")}")
|
||||
e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
||||
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}"
|
||||
End If
|
||||
If CType(sender, GridView).ID = "GVAnticipos" Then ' And e.Row.DBCampo("CveVenta").ToEntero() > 0 And e.Row.DBCampo("Tipo") = "NC" Then
|
||||
|
||||
If (e.Row.DBCampo("CveVenta").ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").Contiene("Ant", "NC", "Dev")) OrElse (e.Row.DBCampo("CveIE").ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo") = "IxC") Then
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) AndAlso CType(sender, GridView).ID = "GVAnticipos" Then
|
||||
' If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
|
||||
' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||
' If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||
' e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
' e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||
' Else
|
||||
' e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
' e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
|
||||
e.Row.FCHyperLink("HLDevolverDinero").Visible = True
|
||||
e.Row.FCHyperLink("HLDevolverDinero").NavigateUrl = $"/Bancos/IE.aspx?Opcion=DevDinV&P={Parametros}"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" AndAlso UsuarioActual.TienePermisoProceso(379) AndAlso CType(sender, GridView).ID = "GVAnticipos" Then
|
||||
If e.Row.DBCampo("CveVenta").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("NC", "Ant") Then
|
||||
If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveIE").ToString().ToEntero() > 0 AndAlso e.Row.DBCampo("Tipo").ToString().Contiene("IxC") Then
|
||||
If Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = True
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = False
|
||||
Else
|
||||
e.Row.FCLinkButton("LnkAutorizar").Visible = False
|
||||
e.Row.FCLinkButton("LnkCancelar").Visible = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "R H"
|
||||
|
||||
Private Sub CargaPersonalAsignado()
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
|
||||
GVPersonal.DataSource = ObjPersonal.DtResultados
|
||||
Else
|
||||
GVPersonal.DataSource = Nothing
|
||||
End If
|
||||
ObjPersonal.Dispose()
|
||||
GVPersonal.DataBind()
|
||||
End Sub
|
||||
|
||||
Protected Sub GVPersonal_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVPersonal.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(70)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(300)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(120)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(120)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(60)
|
||||
End If
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
Dim Liga As String = "<a class=""Texto"" href=""/RH/Personal.aspx?CvePersonal=" & e.Row.DBCampo("CvePersonal") & """>"
|
||||
e.Row.FCLiteral("LtlCodigo").Text = Liga & e.Row.FCLiteral("LtlCodigo").Text & "</a>"
|
||||
e.Row.FCLiteral("LtlPersonal").Text = Liga & e.Row.FCLiteral("LtlPersonal").Text & "</a>"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultarAsistencia_Click(sender As Object, e As System.EventArgs) Handles BtnConsultarAsistencia.Click
|
||||
Dim objpersonal As New ClsRH
|
||||
If objpersonal.GetAsistencias(-1, CveCliente, -1, -1, -1, 1, -1, txtFechaI.Text.Trim.ToDate(), txtFechaF.Text.Trim.ToDate(), UsuarioActual.CveEmpresa) Then
|
||||
GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL")
|
||||
Else
|
||||
GVAsistencia.DataSource = Nothing
|
||||
End If
|
||||
objpersonal.Dispose()
|
||||
GVAsistencia.DataBind()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GVAsistencia_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVAsistencia.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(75)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(145)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(70)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(100)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(145)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(220)
|
||||
End If
|
||||
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Left
|
||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Left
|
||||
|
||||
If IsDate(e.Row.DBCampo("Fecha")) Then e.Row.FCLiteral("LtlFecha").Text = e.Row.DBCampo("Fecha").ToDate().ToShortDateString()
|
||||
|
||||
If e.Row.DBCampo("SeModifico") = "0" Then
|
||||
e.Row.BackColor = Drawing.Color.LightBlue
|
||||
ElseIf e.Row.DBCampo("SeModifico") = "1" Then
|
||||
e.Row.ForeColor = Drawing.Color.Red
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "S U C U R S A L E S"
|
||||
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
|
||||
|
||||
@@ -4908,8 +4836,8 @@ Partial Class Clientes
|
||||
|
||||
If Not TieneError Then
|
||||
If IVA > 0 Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -IVA, -IVA, 13, "Traspaso de saldos de anticipos.IVA", "Traspaso de saldos de anticipos.IVA", CveCliente:=Gvr.DataKey("CveCliente").ToEntero(), CveIE:=Gvr.DataKey("CveIE").ToEntero(), PorcentajeImpuesto:=Gvr.DataKey("PorcentajeIVA").ToDecimal, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, IVA, 13, "Traspaso de saldos de anticipos. IVA", "Traspaso de saldos de anticipos.IVA", CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToEntero(), PorcentajeImpuesto:=Gvr.DataKey("PorcentajeIVA").ToDecimal, Contabilizable:=False) Then
|
||||
If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -IVA, -IVA, 13, "Traspaso de saldos de anticipos.IVA", "Traspaso de saldos de anticipos.IVA", CveCliente:=Gvr.DataKey("CveCliente").ToEntero(), CveIE:=Gvr.DataKey("CveIE").ToEntero(), PorcentajeImpuesto:=Gvr.DataKey("PorcentajeIVA").ToDecimal, CveVenta:=CveVenta, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, IVA, IVA, 13, "Traspaso de saldos de anticipos. IVA", "Traspaso de saldos de anticipos.IVA", CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToEntero(), PorcentajeImpuesto:=Gvr.DataKey("PorcentajeIVA").ToDecimal, CveVenta:=CveVenta, Contabilizable:=False) Then
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
@@ -10753,82 +10681,302 @@ Partial Class Clientes
|
||||
|
||||
End Function
|
||||
|
||||
Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
'Protected Sub LnkAutorizarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
' Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
' Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
' Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
|
||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
Dim Actualizo As Boolean = False
|
||||
' If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
' Dim Actualizo As Boolean = False
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
|
||||
Alert("El anticipo se autorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
' Using ObjVentas As New ClsVentas
|
||||
' If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
' If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, True) Then
|
||||
' Alert("El anticipo se autorizó correctamente")
|
||||
' Actualizo = True
|
||||
' End If
|
||||
' ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
' If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, True) Then
|
||||
' Alert("El anticipo se autorizó correctamente")
|
||||
' Actualizo = True
|
||||
' End If
|
||||
' End If
|
||||
' End Using
|
||||
|
||||
If Actualizo Then
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
If ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
End If
|
||||
ObjEventoBitacora.Dispose()
|
||||
GvEB.DataBind()
|
||||
' If Actualizo Then
|
||||
' Dim ObjEventoBitacora As New ClsOIEventos
|
||||
' If ObjEventoBitacora.AddEventoBitacora($"El anticipo se autorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
' GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
' End If
|
||||
' ObjEventoBitacora.Dispose()
|
||||
' GvEB.DataBind()
|
||||
|
||||
UPEventoBitacora.Update()
|
||||
CargaEventoBitacora()
|
||||
End If
|
||||
' UPEventoBitacora.Update()
|
||||
' CargaEventoBitacora()
|
||||
' End If
|
||||
|
||||
End If
|
||||
' End If
|
||||
|
||||
' CargaAnticipos()
|
||||
'End Sub
|
||||
|
||||
'Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
' Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
' Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
' Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
|
||||
' If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
' Dim Actualizo As Boolean = False
|
||||
' Using ObjVentas As New ClsVentas
|
||||
' If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
' If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
' Alert("El anticipo se desautorizó correctamente")
|
||||
' Actualizo = True
|
||||
' End If
|
||||
' ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
' If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||
' Alert("El anticipo se desautorizó correctamente")
|
||||
' Actualizo = True
|
||||
' End If
|
||||
' End If
|
||||
' End Using
|
||||
' CargaAnticipos()
|
||||
|
||||
' If Actualizo Then
|
||||
' Dim ObjEventoBitacora As New ClsOIEventos
|
||||
' If ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
' GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
' End If
|
||||
' ObjEventoBitacora.Dispose()
|
||||
' GvEB.DataBind()
|
||||
|
||||
' UPEventoBitacora.Update()
|
||||
' CargaEventoBitacora()
|
||||
' End If
|
||||
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
#Region "D E V O L U C I O N D E D I N E R O "
|
||||
Protected Sub LnkDevolucionMasiva_Click(sender As Object, e As EventArgs)
|
||||
TxtFechaDocumento.Text = Now.ToShortDateString
|
||||
ModalidadSelecionDevAnticipos = True
|
||||
divDevolverAnticipos.Visible = True
|
||||
DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
DdlCuenta.DataBind()
|
||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs' AND Estatus = 1 ")
|
||||
DdlTipoTransaccion.DataBind()
|
||||
TxtImporteDev.Attributes.Add(“readonly”, “readonly”)
|
||||
TxtImporteDev.Text = ""
|
||||
TxtDevRedondeo.Text = ""
|
||||
DdlCuentaDeposito.DataSource = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
|
||||
DdlCuentaDeposito.DataBind()
|
||||
'Dim Dep As New ClsGenerales
|
||||
'If Dep.GetCuentasDepositos(CveCliente:=CveCliente, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
' DdlCuentaDeposito.DataSource = Dep.DtResultados
|
||||
'End If
|
||||
'Dep.Dispose()
|
||||
|
||||
DdlCuentaDeposito.Items.Insert(Opcion, New ListItem("-", "-1"))
|
||||
CargaAnticipos()
|
||||
End Sub
|
||||
Protected Sub LnkDevolucionCerrar_Click(sender As Object, e As EventArgs)
|
||||
ModalidadSelecionDevAnticipos = False
|
||||
divDevolverAnticipos.Visible = False
|
||||
CargaAnticipos()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCancelarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = GvRow.DataKey("CveIE").ToEntero()
|
||||
|
||||
If CveVenta > 0 OrElse CveIE > 0 Then
|
||||
Dim Actualizo As Boolean = False
|
||||
Using ObjVentas As New ClsVentas
|
||||
If GvRow.DataKey("Tipo").Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf GvRow.DataKey("Tipo").Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
CargaAnticipos()
|
||||
|
||||
If Actualizo Then
|
||||
Dim ObjEventoBitacora As New ClsOIEventos
|
||||
If ObjEventoBitacora.AddEventoBitacora($"El anticipo se desautorizó correctamente. Folio: <b>{GvRow.DataKey("Folio")}</b>", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveCliente, -1, -1, -1, -1, -1) Then
|
||||
GvEB.DataSource = ObjEventoBitacora.DtResultados
|
||||
End If
|
||||
ObjEventoBitacora.Dispose()
|
||||
GvEB.DataBind()
|
||||
|
||||
UPEventoBitacora.Update()
|
||||
CargaEventoBitacora()
|
||||
End If
|
||||
|
||||
Protected Sub LnkAplicaDevolucion_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If TxtImporteDev.Text.ToDecimal <= 0 Then
|
||||
Alert("No se tiene importe a devolver.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim ObjIE As New ClsBancos()
|
||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||
Dim CveIE, CvePrePoliza As Integer
|
||||
Dim tCveMoneda As Integer = 1
|
||||
Dim tTipoCambio As Decimal = 1
|
||||
Dim PagueseA As String = TxtNombre.Text
|
||||
Dim MsgError As String = ""
|
||||
Dim tImporteDev As Decimal = TxtImporteDev.Text.ToDecimal
|
||||
Dim tCveCorte As Integer = -1
|
||||
Dim tFolio As String = "1"
|
||||
Dim tObs As String = TxtDevObs.Text.Trim
|
||||
|
||||
tCveMoneda = GlobalDTBancosCuentasGral(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveMoneda", $"CveCuenta={DdlCuenta.SelectedValue}").ToEntero
|
||||
|
||||
CvePrePoliza = ObjMov.AddPrePolizas("Clientes/IE/DEV ", 1, tImporteDev, tImporteDev, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=2)
|
||||
|
||||
'valida prepoliza
|
||||
If CvePrePoliza > 0 Then
|
||||
tFolio = ObjIE.GetNextFolio(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero).ToString
|
||||
|
||||
CveIE = ObjIE.AddBancos_IE(DdlCuenta.SelectedValue.ToEntero, DdlTipoTransaccion.SelectedValue.ToEntero, TxtFechaDocumento.Text.Trim.ToDate, tFolio, PagueseA, tImporteDev, tCveMoneda,
|
||||
tTipoCambio, tObs, "", False, True, -1, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCorte:=tCveCorte, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero)
|
||||
If CveIE > 0 Then
|
||||
|
||||
Dim ImporteAplicar As Decimal = 0.0D
|
||||
Dim ImporteAplicarMN As Decimal = 0.0D
|
||||
Dim ImporteAplicarME As Decimal = 0.0D
|
||||
Dim ReferenciaAplicar As String = ObjIE.Folio
|
||||
Dim ConceptoAplicar As String = $"Devolución al cliente {PagueseA} {tImporteDev} "
|
||||
|
||||
ImporteAplicar = tImporteDev
|
||||
ImporteAplicarME = ImporteAplicar
|
||||
|
||||
'CONSIDERA COMPLEMENTARIA
|
||||
If tCveMoneda > 1 Then
|
||||
ImporteAplicarMN = ImporteAplicar
|
||||
Else
|
||||
ImporteAplicarMN = (ImporteAplicar * If(tCveMoneda = 1, 1, tTipoCambio)).RoundSQL()
|
||||
End If
|
||||
|
||||
'BANCOS
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, ImporteAplicarMN, 30, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=-1, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de bancos de devolución"
|
||||
|
||||
End If
|
||||
|
||||
'BANCOS COMPLEMENTARIAs
|
||||
If tCveMoneda > 1 Then
|
||||
ImporteAplicarMN = ((ImporteAplicar * If(tCveMoneda = 1, 1, tTipoCambio)) - ImporteAplicar).RoundSQL()
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, ImporteAplicarMN, 204, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=-1, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de bancos complementaria de devolución"
|
||||
End If
|
||||
End If
|
||||
'OTROS INGRESOS/EGRESOS
|
||||
Dim ImpOtros As Decimal = TxtDevRedondeo.Text.ToDecimal
|
||||
If ImpOtros <> 0 Then
|
||||
Dim TipoMovtoIE As Boolean = False
|
||||
Dim CveConcIE As Integer = 78
|
||||
Dim tCveSub As Integer = GlobalDTSubProyectos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
If ImpOtros < 0 Then
|
||||
TipoMovtoIE = True : ImpOtros = Math.Abs(ImpOtros) : CveConcIE = 78
|
||||
Else
|
||||
TipoMovtoIE = False : ImpOtros = Math.Abs(ImpOtros) : CveConcIE = 211
|
||||
End If
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoIE, ImpOtros, ImpOtros, CveConcIE, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveCliente:=CveCliente, ImporteME:=0, CveSubProyecto:=tCveSub) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim tImporte As Decimal = 0
|
||||
Dim tTipoMovto As Boolean = True
|
||||
For Each gvr As GridViewRow In GVAnticipos.Rows
|
||||
If gvr.FCCheckBox("chkDevolver").Checked Then
|
||||
Dim PorcentajePagoDevDin As Decimal = (gvr.DataKey("Saldo").ToDecimal / gvr.DataKey("Total").ToDecimal).RoundSQL(6)
|
||||
Dim tCveConcepto As Integer
|
||||
ImporteAplicar = gvr.DataKey("Saldo").ToDecimal
|
||||
If gvr.DataKey("Tipo") = "IxC" Then
|
||||
tCveConcepto = 92 : tTipoMovto = False
|
||||
ElseIf gvr.DataKey("Tipo").Contiene("Dev", "NC") Then
|
||||
tCveConcepto = 12 : ImporteAplicar = -ImporteAplicar : tTipoMovto = True
|
||||
ElseIf gvr.DataKey("Tipo").Contiene("Ant") Then
|
||||
tCveConcepto = 11 : ImporteAplicar = ImporteAplicar : tTipoMovto = False
|
||||
End If
|
||||
|
||||
ImporteAplicarMN = (ImporteAplicar * If(tCveMoneda = 1, 1, tTipoCambio)).RoundSQL()
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, tTipoMovto, ImporteAplicar, ImporteAplicarMN, tCveConcepto, ReferenciaAplicar, ConceptoAplicar, CveIE:=gvr.DataKey("CveIE").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de pago de devolución"
|
||||
Exit For
|
||||
End If
|
||||
'IMPUESTOS
|
||||
If gvr.DataKey("IVA").ToDecimal > 0 Then
|
||||
tImporte = -(gvr.DataKey("IVA").ToDecimal * PorcentajePagoDevDin).RoundSQL
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, tImporte, tImporte, 13, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME, PorcentajeImpuesto:=gvr.DataKey("PorcentajeIVA").ToDecimal) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||
Exit For
|
||||
End If
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, tImporte, tImporte, 61, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME, PorcentajeImpuesto:=gvr.DataKey("PorcentajeIVA").ToDecimal) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
If gvr.DataKey("IEPS").ToDecimal > 0 Then
|
||||
tImporte = (gvr.DataKey("IEPS").ToDecimal * PorcentajePagoDevDin).RoundSQL
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, tImporte, tImporte, 39, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
If gvr.DataKey("RetIVA").ToDecimal > 0 Then
|
||||
tImporte = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePagoDevDin).RoundSQL
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, tImporte, tImporte, 62, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
If gvr.DataKey("RetISR").ToDecimal > 0 Then
|
||||
tImporte = (gvr.DataKey("RetISR").ToDecimal * PorcentajePagoDevDin).RoundSQL
|
||||
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, tImporte, tImporte, 63, ReferenciaAplicar, ConceptoAplicar, CveIE:=CveIE, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCliente:=CveCliente, ImporteME:=ImporteAplicarME) Then
|
||||
MsgError = "Ocurrió un error al registrar el asiento de impuestos de devolución"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If MsgError = "" Then
|
||||
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||
' MsgError = ObjMov.MensajePolizaDescuadre
|
||||
GuardaLogAD($"Bancos/IE | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
Else
|
||||
MsgError = "No se pudo validar la prepoliza de cuadre."
|
||||
End If
|
||||
End If
|
||||
|
||||
If MsgError = "" Then
|
||||
ObjIE.Commit()
|
||||
Dim Msg As New StringBuilder
|
||||
If Msg.ToString = "" Then
|
||||
Msg.Append("El Documento se guardo correctamente")
|
||||
End If
|
||||
Dim Archivo As System.IO.FileInfo = Nothing
|
||||
'VERIFICA SI EXISTE EL FORMATO
|
||||
If DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(2, 8, 9) Then
|
||||
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/Transferencia.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
ElseIf DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(1) Then
|
||||
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/CHQ-{1}.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero))
|
||||
If Not Archivo.Exists Then
|
||||
Archivo = New System.IO.FileInfo(String.Format("{0}\Empresas\Grales\Formatos\CHQ.rdlc", ModExtensiones.DirectorioBaseEmpresas))
|
||||
End If
|
||||
'ElseIf DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(6) And UsuarioActual.CveEmpresa = 72 Then
|
||||
' Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/ComprobanteEgreso.rdlc", UsuarioActual.Empresa.Ruta, DdlCuenta.SelectedValue.ToEntero))
|
||||
End If
|
||||
|
||||
If Archivo IsNot Nothing AndAlso Archivo.Exists Then
|
||||
Msg.AppendFormat("<br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">{1}</a> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)), String.Format("Imprimir {0}", DdlTipoTransaccion.SelectedItem))
|
||||
End If
|
||||
|
||||
|
||||
ModalidadSelecionDevAnticipos = False
|
||||
divDevolverAnticipos.Visible = False
|
||||
CargaAnticipos()
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||
Msg.AppendFormat("<br/><br/><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}"">Ver Póliza</a>", CvePrePoliza)
|
||||
End If
|
||||
Alert(Msg.ToString)
|
||||
Else
|
||||
ObjIE.RollBack()
|
||||
Alert(MsgError, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -6624,7 +6624,7 @@ Partial Class PV
|
||||
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim,
|
||||
TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, DdlEstadoSAT.SelectedValue.ToEntero,
|
||||
TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1, CvePrecioLista:=CvePrecioLista,
|
||||
DdlSubProyectoDatos.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero(), DdlFormaCliente.SelectedValue.ToEntero(), CvePrecioLista:=CvePrecioLista,
|
||||
RegimenSociedad:=TxtRegimenSociedad.Text, TipoPersona:=TipoPersona, CveRegimenFiscal:=CveRegimenFiscal, CveUsoCFDI:=CveUsoCFDI, Genero:=GeneroCliente) Then
|
||||
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
@@ -4,6 +4,7 @@ Option Strict On
|
||||
Imports System.Data
|
||||
Imports System.IO
|
||||
Imports System.Net.Http
|
||||
Imports CrystalDecisions.CrystalReports.Engine
|
||||
Imports Extensiones
|
||||
Imports Modelos.Factura
|
||||
|
||||
@@ -25,6 +26,18 @@ Partial Class Ventas_PVCobranza
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveVendedor As Integer
|
||||
Get
|
||||
If ViewState("CveVendedor") Is Nothing Then
|
||||
ViewState("CveVendedor") = -1
|
||||
End If
|
||||
Return ViewState("CveVendedor").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveVendedor") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveVentaCancelacion As Integer
|
||||
Get
|
||||
If ViewState("CveVentaCancelacion") Is Nothing Then
|
||||
@@ -457,6 +470,28 @@ Partial Class Ventas_PVCobranza
|
||||
Else
|
||||
e.Row.FCLinkButton("BtnPagar").Visible = False
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> Now.ToShortDateString Then
|
||||
e.Row.FCLinkButton("BtnPagar").Enabled = False
|
||||
e.Row.FCLinkButton("BtnPagar").Text = "Cobrar"
|
||||
'e.Row.FCLinkButton("BtnPagar").CssClass = "btn btn-xs default"
|
||||
e.Row.FCLinkButton("BtnPagar").OnClientClick =
|
||||
"bootbox.dialog({" &
|
||||
"message: 'No se puede realizar un cobro a una remisión de días anteriores.<br/> Favor de cancelar la remisión y generarla con fecha actual. ', " &
|
||||
"className: 'header-yellow', " &
|
||||
"onEscape: function() {}, " &
|
||||
"title: '<i class=""fa fa-warning""></i> Advertencia', " &
|
||||
"buttons: { " &
|
||||
"success: { label: '', className: 'hide', callback: function() {} }, " &
|
||||
"danger: { label: '', className: 'hide', callback: function() {} }, " &
|
||||
"main: { label: 'Aceptar', className: 'yellow', callback: function() {} } " &
|
||||
"} " &
|
||||
"});" &
|
||||
"return false;"
|
||||
|
||||
'e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#3598dc")
|
||||
'e.Row.CssClass = "blue-madison"
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -808,7 +843,7 @@ Partial Class Ventas_PVCobranza
|
||||
End Try
|
||||
|
||||
If MsgError = "" Then
|
||||
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=respFactura.CveVenta) Then
|
||||
If ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5, CveVenta:=CveVenta) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Ventas/Ventas-NCGeneradas | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
@@ -818,96 +853,109 @@ Partial Class Ventas_PVCobranza
|
||||
If MsgError = "" Then
|
||||
ObjVentas2.Commit()
|
||||
Dim msBuild As New StringBuilder()
|
||||
Dim MsgTimbrado As String = ""
|
||||
|
||||
Dim DebeTimbrar As Boolean = True
|
||||
Try
|
||||
|
||||
Dim SeTimbro As Boolean = False
|
||||
Dim SeTimbroNC As Boolean = False
|
||||
Dim MsgTimbrado As String = ""
|
||||
|
||||
Dim DebeTimbrar As Boolean = True
|
||||
|
||||
Dim SeTimbro As Boolean = False
|
||||
Dim SeTimbroNC As Boolean = False
|
||||
|
||||
'SI SE GENERO FACTURA DE INGRESO, TIMBRARLA DESPUES DE REALIZAR EL PAGO
|
||||
If DebeTimbrar AndAlso respFactura IsNot Nothing Then
|
||||
Try
|
||||
'VERIFICA SI SE GENERO NC
|
||||
If respNC IsNot Nothing Then
|
||||
AjustarTimbre(respFactura.Factura, respNC.Factura)
|
||||
MsgTimbrado = TimbrarFactura(respFactura.Factura, respNC.Factura, SeTimbro, SeTimbroNC)
|
||||
Else
|
||||
AjustarTimbre(respFactura.Factura, Nothing)
|
||||
MsgTimbrado = TimbrarFactura(respFactura.Factura, Nothing, SeTimbro, SeTimbroNC)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(MsgTimbrado) Then
|
||||
Dim StrEr As String = $"<br/><div id = 'DivTipoCambioAdvertencia' class='alert alert-danger' style='padding: 5px; margin-bottom: 5px; padding-right: 25px;'><strong style = 'font-size: 20px; margin-right: 25px;' > Comprobante no emitido : </strong><br/> {MsgTimbrado}<br/>Por favor inténtelo de nuevo a través del botón 'Emitir' en ventas.</div>"
|
||||
MsgTimbrado = StrEr
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLogAD(ex.ToString())
|
||||
msBuild.AppendFormat("<br/>{0}<br/>", MsgTimbrado)
|
||||
End Try
|
||||
|
||||
'SI SE GENERO FACTURA DE INGRESO, TIMBRARLA DESPUES DE REALIZAR EL PAGO
|
||||
If DebeTimbrar AndAlso respFactura IsNot Nothing Then
|
||||
'VERIFICA SI SE GENERO NC
|
||||
If respNC IsNot Nothing Then
|
||||
AjustarTimbre(respFactura.Factura, respNC.Factura)
|
||||
MsgTimbrado = TimbrarFactura(respFactura.Factura, respNC.Factura, SeTimbro, SeTimbroNC)
|
||||
Else
|
||||
AjustarTimbre(respFactura.Factura, Nothing)
|
||||
MsgTimbrado = TimbrarFactura(respFactura.Factura, Nothing, SeTimbro, SeTimbroNC)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(MsgTimbrado) Then
|
||||
Dim StrEr As String = $"<br/><div id = 'DivTipoCambioAdvertencia' class='alert alert-danger' style='padding: 5px; margin-bottom: 5px; padding-right: 25px;'><strong style = 'font-size: 20px; margin-right: 25px;' > Comprobante no emitido : </strong><br/> {MsgTimbrado}<br/>Por favor inténtelo de nuevo a través del botón 'Emitir' en ventas.</div>"
|
||||
MsgTimbrado = StrEr
|
||||
End If
|
||||
If respFactura IsNot Nothing Then
|
||||
If RegistrarPago Then
|
||||
msBuild.Append("<span style=""font-size:14px;"">Pago Registrado correctamente. </span> <br/><br/>")
|
||||
End If
|
||||
|
||||
End If
|
||||
msBuild.AppendFormat("<span style=""font-size:14px;""> La factura <a class=""Texto"" target=""_blank"" style=""font-size:18px;font-weight:bold;"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a> se genero correctamente. </span> <br/>", respFactura.CveVenta, respFactura.SerieFolio)
|
||||
|
||||
If respFactura IsNot Nothing Then
|
||||
If RegistrarPago Then
|
||||
msBuild.Append("<span style=""font-size:14px;"">Pago Registrado correctamente. </span> <br/><br/>")
|
||||
End If
|
||||
|
||||
msBuild.AppendFormat("<span style=""font-size:14px;""> La factura <a class=""Texto"" target=""_blank"" style=""font-size:18px;font-weight:bold;"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a> se genero correctamente. </span> <br/>", respFactura.CveVenta, respFactura.SerieFolio)
|
||||
|
||||
If SeTimbro Then
|
||||
Dim xml = String.Format("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respFactura.CveVenta, "XML", respFactura.SerieFolio, respFactura.Factura.TipoDocto)))
|
||||
msBuild.AppendFormat("{0}", xml)
|
||||
End If
|
||||
|
||||
Dim pdf = String.Format("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respFactura.CveVenta)))
|
||||
msBuild.AppendFormat("{0}", pdf)
|
||||
|
||||
If respFactura.Factura.Inv_CveMovimiento > 0 Then
|
||||
msBuild.AppendFormat("<b><a target='_blank' class='Texto' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">Movimiento de Almacén</a></b><br/>", respFactura.Factura.Inv_CveMovimiento)
|
||||
End If
|
||||
|
||||
If respNC IsNot Nothing Then
|
||||
msBuild.AppendFormat("<span style=""font-size:14px;""> La nota de crédito <a class=""Texto"" target=""_blank"" style=""font-size:18px;font-weight:bold;"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a> se genero correctamente.</span> <br/>", respNC.CveVenta, respNC.SerieFolio)
|
||||
If SeTimbroNC Then
|
||||
Dim xml = String.Format("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respNC.CveVenta, "XML", respNC.SerieFolio, respNC.Factura.TipoDocto)))
|
||||
If SeTimbro Then
|
||||
Dim xml = String.Format("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respFactura.CveVenta, "XML", respFactura.SerieFolio, respFactura.Factura.TipoDocto)))
|
||||
msBuild.AppendFormat("{0}", xml)
|
||||
End If
|
||||
|
||||
Dim pdfNC = String.Format("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respNC.CveVenta)))
|
||||
msBuild.AppendFormat("{0}", pdfNC)
|
||||
End If
|
||||
Dim pdf = String.Format("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respFactura.CveVenta)))
|
||||
msBuild.AppendFormat("{0}", pdf)
|
||||
|
||||
If Not String.IsNullOrEmpty(MsgTimbrado) Then
|
||||
msBuild.AppendFormat("<br/>{0}<br/>", MsgTimbrado)
|
||||
End If
|
||||
If respFactura.Factura.Inv_CveMovimiento > 0 Then
|
||||
msBuild.AppendFormat("<b><a target='_blank' class='Texto' href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"">Movimiento de Almacén</a></b><br/>", respFactura.Factura.Inv_CveMovimiento)
|
||||
End If
|
||||
|
||||
If respNC IsNot Nothing Then
|
||||
msBuild.AppendFormat("<span style=""font-size:14px;""> La nota de crédito <a class=""Texto"" target=""_blank"" style=""font-size:18px;font-weight:bold;"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a> se genero correctamente.</span> <br/>", respNC.CveVenta, respNC.SerieFolio)
|
||||
If SeTimbroNC Then
|
||||
Dim xml = String.Format("<ul><li><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", respNC.CveVenta, "XML", respNC.SerieFolio, respNC.Factura.TipoDocto)))
|
||||
msBuild.AppendFormat("{0}", xml)
|
||||
End If
|
||||
|
||||
Dim pdfNC = String.Format("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1", respNC.CveVenta)))
|
||||
msBuild.AppendFormat("{0}", pdfNC)
|
||||
End If
|
||||
|
||||
|
||||
If respNC IsNot Nothing Then
|
||||
If respNC IsNot Nothing AndAlso respNC.Factura IsNot Nothing AndAlso respNC.Factura.DtAnticiposAplicados IsNot Nothing Then
|
||||
For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows
|
||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}",
|
||||
dr("CveIE").ToString,
|
||||
dr("CveVenta").ToString,
|
||||
respNC.Factura.CveCliente,
|
||||
respNC.CveVenta,
|
||||
respNC.Factura.Total))}"">Imprimir Saldo Aplicado {dr("Folio").ToString}</a><br/>")
|
||||
Next
|
||||
End If
|
||||
|
||||
Else
|
||||
If respFactura IsNot Nothing AndAlso respFactura.Factura IsNot Nothing AndAlso respFactura.Factura.DtAnticiposAplicados IsNot Nothing Then
|
||||
For Each dr As DataRow In respFactura.Factura.DtAnticiposAplicados.Rows
|
||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}",
|
||||
dr("CveIE").ToString,
|
||||
dr("CveVenta").ToString,
|
||||
respFactura.Factura.CveCliente,
|
||||
respFactura.CveVenta,
|
||||
respFactura.Factura.Total))}"">Imprimir Saldo Aplicado {dr("Folio").ToString}</a><br/>")
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(MsgTimbrado) Then
|
||||
msBuild.AppendFormat("<br/>{0}<br/>", MsgTimbrado)
|
||||
End If
|
||||
|
||||
If respNC IsNot Nothing Then
|
||||
For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows
|
||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}&SALDO={5}",
|
||||
dr("CveIE").ToString,
|
||||
dr("CveVenta").ToString,
|
||||
respNC.Factura.CveCliente,
|
||||
respNC.CveVenta,
|
||||
respNC.Factura.Total,
|
||||
(respNC.Factura.Total - respNC.Factura.DtAnticiposAplicados.SUM("Importe"))))}"">Imprimir historial {dr("Folio").ToString}</a><br/>")
|
||||
Next
|
||||
Else
|
||||
For Each dr As DataRow In respFactura.Factura.DtAnticiposAplicados.Rows
|
||||
msBuild.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA={1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}&SALDO={5}",
|
||||
dr("CveIE").ToString,
|
||||
dr("CveVenta").ToString,
|
||||
respFactura.Factura.CveCliente,
|
||||
respFactura.CveVenta,
|
||||
respFactura.Factura.Total,
|
||||
(respFactura.Factura.Total - respFactura.Factura.DtAnticiposAplicados.SUM("Importe"))))}"">Imprimir historial {dr("Folio").ToString}</a><br/>")
|
||||
Next
|
||||
msBuild.Append($"Pago Registrado correctamente.<br/><br/> <a href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1&TICKET=1®ENERAR=1", CveVenta))}"" class='Texto'>Imprimir ticket</a>")
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
GuardaLogAD(ex.ToString())
|
||||
msBuild.Append("Ocurrio un error posterior al pago")
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
Else
|
||||
msBuild.Append($"Pago Registrado correctamente.<br/><br/> <a href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1&TICKET=1®ENERAR=1", CveVenta))}"" class='Texto'>Imprimir ticket</a>")
|
||||
End If
|
||||
|
||||
Alert(msBuild.ToString(), TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjVentas2.RollBack()
|
||||
@@ -925,6 +973,18 @@ Partial Class Ventas_PVCobranza
|
||||
ImpresionDirectaPDF(CveVenta)
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
'ENVIO DE CORREO
|
||||
Try
|
||||
If respFactura IsNot Nothing AndAlso respFactura.Factura IsNot Nothing Then
|
||||
Dim EnviarMail As Boolean = respFactura.Factura.Cliente.EnviarFactura = "Si"
|
||||
Dim Hilo As New System.Threading.Thread(Sub() EnviarMailFactura(EnviarMail, respFactura.Factura, UsuarioActual))
|
||||
Hilo.Start()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLogAD(ex.ToString())
|
||||
End Try
|
||||
End If
|
||||
LimpiarDatos()
|
||||
|
||||
CargaDatos()
|
||||
@@ -945,12 +1005,10 @@ Partial Class Ventas_PVCobranza
|
||||
Dim Actualizo As Boolean = False
|
||||
If Tipo.Contiene("NC", "Ant") Then
|
||||
If ObjVentas.UpdateVentaAnticipoAutorizado(CveVenta, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
ElseIf Tipo.Contiene("IxC") Then
|
||||
If ObjVentas.UpdateIxCAnticipoAutorizado(CveIE, False) Then
|
||||
Alert("El anticipo se desautorizó correctamente")
|
||||
Actualizo = True
|
||||
End If
|
||||
End If
|
||||
@@ -978,6 +1036,8 @@ Partial Class Ventas_PVCobranza
|
||||
LtlTipoAnticipo.Text = ""
|
||||
HdnTipoAmortizacion.Value = ""
|
||||
CveCliente = -1
|
||||
CveVendedor = -1
|
||||
|
||||
|
||||
If TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||
TmpDTAnticiposNCIxCCliente.Clear()
|
||||
@@ -1967,17 +2027,16 @@ Partial Class Ventas_PVCobranza
|
||||
DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
||||
End If
|
||||
|
||||
If CveCliente <= 0 Then
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||
End If
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||
CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
If CveCliente > 0 Then
|
||||
@@ -2091,11 +2150,14 @@ Partial Class Ventas_PVCobranza
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkSolicitarActivarAnticipo_Click(sender As Object, e As EventArgs)
|
||||
Dim CveCliente As Integer = -1
|
||||
|
||||
'falta sacar a los usuarios a notificar.
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(sender, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
Dim CveCliente As Integer = gvr.DataKey("CveCliente").ToEntero()
|
||||
Dim Folio As String = gvr.DataKey("Folio")
|
||||
Dim Importe As Decimal = gvr.FCTextBox(String.Format("TxtAnticipo{0}", gvr.RowIndex)).Text.ToDecimal
|
||||
Dim Saldo As Decimal = gvr.DataKey("Saldo").ToDecimal()
|
||||
Dim dtt As DataTable = Nothing
|
||||
|
||||
Dim ObjProceso As New ClsSisProcesos
|
||||
@@ -2117,22 +2179,33 @@ Partial Class Ventas_PVCobranza
|
||||
If EsProduccion Then
|
||||
NumeroTelefono = String.Format("52{0}", dr("Celular").ToString())
|
||||
End If
|
||||
|
||||
Dim Arr As New ArrayList
|
||||
Arr.Add(DdlSucursalCorte.SelectedItem.Text)
|
||||
Arr.Add(NombreCliente)
|
||||
Arr.Add(Folio)
|
||||
Arr.Add($"$ {Importe}")
|
||||
EnvioMsg = EnviarNotificacionWhatsAppPlantilla(NumeroTelefono, "solicitud_autorizacion_anticipo", Arr, $"https://grupodiaz.adssistemas.mx.com/Clientes/Clientes.aspx?CveCliente={CveCliente}")
|
||||
'EnvioMsg = ModExtensiones.EnviarNotificacionWhatsApp2(NumeroTelefono, "", $"Solicitud de activación de anticipo.\\nFolio: {Folio}.\\nCliente: {NombreCliente}.")
|
||||
ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/Clientes.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
|
||||
|
||||
If NumeroTelefono.Length = 12 Then
|
||||
EnvioMsg = EnviarNotificacionWhatsAppPlantilla(NumeroTelefono, "solicitud_autorizacion_anticipo", Arr, $"https://grupodiaz.adssistemas.mx.com/Ventas/CatAutorizacionLimites.aspx?CveCliente={CveCliente}")
|
||||
ClsSisNotificaciones.EnviarAlerta("Solicitud de Anticipo", $"Solicitud de activación de anticipo Folio: {Folio} <br/><a href='/Ventas/CatAutorizacionLimites.aspx?CveCliente={CveCliente}&op=ant'>Ir Activar</a>", dr("CveUsuario").ToString, Tipo:=TipoNotificacion.ToastInformacionB)
|
||||
End If
|
||||
|
||||
Next
|
||||
If EnvioMsg Then
|
||||
Alert("Se envió una solicitud de autorización", TipoMensaje.ToastInformacion)
|
||||
'Else
|
||||
' Alert("No se envió la solicitud de autorización", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
|
||||
|
||||
Dim ObjVta As New ClsVentas
|
||||
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, CveVendedor, Saldo, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
||||
Dim msgAlert = "La autorización se agregó correctamente."
|
||||
If EnvioMsg Then
|
||||
msgAlert = $"{msgAlert} Se envió una notificación de autorización a los usuarios"
|
||||
End If
|
||||
Alert(msgAlert, TipoMensaje.ToastInformacionB)
|
||||
End If
|
||||
ObjVta.Dispose()
|
||||
|
||||
UpAnticipos.Update()
|
||||
End Sub
|
||||
@@ -2299,20 +2372,19 @@ Partial Class Ventas_PVCobranza
|
||||
DivConceptoNC.Visible = False
|
||||
End If
|
||||
|
||||
If CveCliente <= 0 Then
|
||||
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero
|
||||
Dim DbRowVenta As DataRow = Nothing
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If DbRowVenta IsNot Nothing Then
|
||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||
CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
|
||||
If CveCliente > 0 Then
|
||||
CargaAnticipos(CveCliente)
|
||||
@@ -2733,6 +2805,131 @@ Partial Class Ventas_PVCobranza
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub EnviarMailFactura(EnviaCorreo As Boolean, Factura As Modelos.Factura, UsuarioActual As Usuario)
|
||||
'GUARDA PDF
|
||||
Dim LocalSerieFolio As String = Factura.SerieFolio
|
||||
Dim LocalTipoDocto As String = Factura.TipoDocto
|
||||
|
||||
Dim ArchivoPDF As String = String.Format("{0}PDF\{1}\{2}.pdf", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||
|
||||
'TIMBRADO NUEVO
|
||||
Try
|
||||
If Not File.Exists(ArchivoPDF) Then
|
||||
GenerarPDFVenta(Factura.CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
GuardaLogAD(ex.ToString())
|
||||
End Try
|
||||
|
||||
Dim ErrorCorreo As Boolean = False
|
||||
|
||||
If EnviaCorreo Then
|
||||
If Factura IsNot Nothing Then
|
||||
Dim ArchivoXML As String = String.Format("{0}XML\{1}\{2}.xml", UsuarioActual.Empresa.Ruta, LocalTipoDocto, LocalSerieFolio)
|
||||
|
||||
Try
|
||||
Dim FIXML As New FileInfo(ArchivoXML)
|
||||
Dim FIPDF As New FileInfo(ArchivoPDF)
|
||||
If FIXML.Exists AndAlso FIPDF.Exists Then
|
||||
MandaMails(UsuarioActual, Factura, Factura.TipoDocto, LocalSerieFolio, EnviaCorreo, ArchivoXML, ArchivoPDF)
|
||||
Else
|
||||
ErrorCorreo = True
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorCorreo = True
|
||||
End Try
|
||||
Else
|
||||
ErrorCorreo = True
|
||||
End If
|
||||
|
||||
If ErrorCorreo Then
|
||||
Dim ObjVentas As New ClsVentas(UsuarioActual:=UsuarioActual)
|
||||
If EnviaCorreo Then
|
||||
ObjVentas.UpdateVentaMail(3, Factura.CveVenta)
|
||||
Else
|
||||
ObjVentas.UpdateVentaMail(0, Factura.CveVenta)
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub MandaMails(UsuarioActual As Usuario, ObjFactura As Modelos.Factura, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String)
|
||||
|
||||
Dim ObjMail As New ClsSisMail()
|
||||
Dim ResultadoMail As Integer = 0
|
||||
|
||||
Dim CorreoDestino As String = ObjFactura.Cliente.Mail
|
||||
|
||||
Try
|
||||
|
||||
Dim Asunto As String = String.Empty
|
||||
Dim Cuerpo As String = String.Empty
|
||||
|
||||
Dim TipoComprobante As String = ""
|
||||
|
||||
If TipoDocto = "Ing" Then TipoComprobante = "Factura"
|
||||
If TipoDocto = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||
|
||||
If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then
|
||||
Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta
|
||||
Cuerpo = Cuerpo.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
|
||||
Cuerpo = Cuerpo.Replace("{""NombreCliente""}", ObjFactura.Cliente.NombreComercial)
|
||||
Cuerpo = Cuerpo.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||
Cuerpo = Cuerpo.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy"))
|
||||
Cuerpo = Cuerpo.Replace("{""Total""}", ObjFactura.Total.ToString("N2"))
|
||||
Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy"))
|
||||
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", SerieFolio)
|
||||
Asunto = Asunto.Replace("{""AtencionA""}", ObjFactura.AtencionA)
|
||||
Asunto = Asunto.Replace("{""Sucursal""}", ObjFactura.SubProyecto.SubProyecto)
|
||||
Asunto = Asunto.Replace("{""DescripcionVenta""}", ObjFactura.DescripcionVenta)
|
||||
Asunto = Asunto.Replace("{""FolioFactura""}", ObjFactura.SerieFolio)
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then
|
||||
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
|
||||
Asunto = Asunto.Replace("{""NombreEmpresa""}", UsuarioActual.Empresa.Empresa)
|
||||
Asunto = Asunto.Replace("{""NombreCliente""}", ObjFactura.Cliente.NombreComercial)
|
||||
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||
Cuerpo = Cuerpo.Replace("{""Fecha""}", ObjFactura.Fecha.ToString("dd/MM/yyyy"))
|
||||
Cuerpo = Cuerpo.Replace("{""Total""}", ObjFactura.Total.ToString("N2"))
|
||||
Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", ObjFactura.FechaVencimiento.ToString("dd/MM/yyyy"))
|
||||
Asunto = Asunto.Replace("{""SerieFolio""}", SerieFolio)
|
||||
Asunto = Asunto.Replace("{""AtencionA""}", ObjFactura.AtencionA)
|
||||
Asunto = Asunto.Replace("{""Sucursal""}", ObjFactura.SubProyecto.SubProyecto)
|
||||
Asunto = Asunto.Replace("{""DescripcionVenta""}", ObjFactura.DescripcionVenta)
|
||||
Asunto = Asunto.Replace("{""FolioFactura""}", ObjFactura.SerieFolio)
|
||||
End If
|
||||
|
||||
If Not EnviarFactura Then
|
||||
ResultadoMail = 0
|
||||
End If
|
||||
|
||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = XML})
|
||||
|
||||
Dim DisplayName As String = ""
|
||||
|
||||
If ObjMail.SendMail(UsuarioActual.Empresa, CorreoDestino, Asunto, Cuerpo, "", LSRutasMail, Displayname:=DisplayName) Then
|
||||
ResultadoMail = 1
|
||||
Else
|
||||
ResultadoMail = 3
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar el Mail", ex)
|
||||
ResultadoMail = 3
|
||||
Finally
|
||||
Dim ObjVentas As New ClsVentas(UsuarioActual:=UsuarioActual)
|
||||
ObjVentas.UpdateVentaMail(ResultadoMail, ObjFactura.CveVenta)
|
||||
ObjVentas.Dispose()
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MRespuestaSAT
|
||||
|
||||
@@ -425,8 +425,26 @@ Partial Class Ventas_Promociones
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlPS_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPS.selectedindexchange
|
||||
|
||||
DdlTipoPromocion.Items.FindByValue("1").Enabled = True
|
||||
DdlTipoPromocion.Items.FindByValue("3").Enabled = True
|
||||
|
||||
If EmpresaGrupoDiaz Then
|
||||
BtnAgregar.Enabled = False
|
||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero
|
||||
|
||||
Dim TipCveTipoPS As Integer = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimeroValor("CveTipoPS").ToEntero
|
||||
|
||||
If TipCveTipoPS = 1 Then
|
||||
Alert("El producto esta registrado como servicio", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
BtnAgregar.Enabled = True
|
||||
End If
|
||||
|
||||
UpAgregar.Update()
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -1409,6 +1427,8 @@ Partial Class Ventas_Promociones
|
||||
DTPlantilla.Columns.Add("CodigoPS", GetType(String))
|
||||
DTPlantilla.Columns.Add("RinTamaño", GetType(String))
|
||||
|
||||
Dim HayServicios As Boolean = False
|
||||
Dim SBServiciosEnconrtados As New StringBuilder
|
||||
|
||||
Dim DTPS As DataTable = New DataTable
|
||||
Dim DTRines As DataTable = New DataTable
|
||||
@@ -1499,16 +1519,32 @@ Partial Class Ventas_Promociones
|
||||
dRow("CodigoPS") = If(CveClasificacion > 0, "Todos", CodigoPS)
|
||||
End If
|
||||
|
||||
If EmpresaGrupoDiaz AndAlso CvePS > 0 Then
|
||||
Dim CveTipoPS As Integer = DTPS.FiltroPrimeroValor("CveTipoPS", $"Codigo = '{CodigoStr}'").ToString().ToEntero()
|
||||
If CveTipoPS = 1 Then
|
||||
HayServicios = True
|
||||
SBServiciosEnconrtados.AppendLine($"{CodigoStr}<br>")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
RegistroActual = RegistroActual + 1
|
||||
|
||||
Next
|
||||
|
||||
If Errores.ToString.Length = 0 Then
|
||||
If Errores.ToString.Length = 0 AndAlso Not HayServicios Then
|
||||
DTPlantilla.AcceptChanges()
|
||||
Return True
|
||||
Else
|
||||
Alert(Errores.ToString, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
If EmpresaGrupoDiaz AndAlso HayServicios Then
|
||||
Alert($"{Errores.ToString} <br>Se detectaron productos que estan registrados como servicios:<br>{SBServiciosEnconrtados.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
Else
|
||||
Alert(Errores.ToString, TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@
|
||||
<div class="col-md-1 truncate">Condiciones de Pago</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCondicionesPago" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Crédito" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Crédito" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Contado" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
|
||||
|
||||
@@ -107,6 +107,8 @@ Partial Class Ventas_RepRecuperacion
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then DdlCondicionesPago.SelectedValue = "-1"
|
||||
|
||||
'Carga SubProyectos
|
||||
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
'DdlSubProyecto.DataBind()
|
||||
|
||||
@@ -8360,7 +8360,7 @@
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||
<asp:TextBox ID="TxtTelefonoCliente" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVTelefonoCliente" runat="server" ControlToValidate="TxtTelefonoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||
<%--<asp:RequiredFieldValidator ID="RFVTelefonoCliente" runat="server" ControlToValidate="TxtTelefonoCliente" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>--%>
|
||||
<asp:RegularExpressionValidator ID="RevTelefonoCliente" runat="server" CssClass="help-block errorimput" ValidationExpression="\d{10}" ControlToValidate="TxtTelefonoCliente" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Teléfono''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarCliente"></asp:RegularExpressionValidator>
|
||||
<label for="<%= TxtTelefonoCliente.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
|
||||
@@ -3641,7 +3641,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
ImgAntiPend.Visible = UsuarioActual.TienePermisoProceso(406)
|
||||
End If
|
||||
|
||||
InicializaDevolucionAlmacen()
|
||||
@@ -5489,7 +5489,7 @@ Partial Class Ventas
|
||||
End If
|
||||
If ViewState("CveCotizacion") IsNot Nothing AndAlso ViewState("CveCotizacion").ToString().ToEntero() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
ImgAntiPend.Visible = UsuarioActual.TienePermisoProceso(406)
|
||||
Else
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
@@ -5602,7 +5602,7 @@ Partial Class Ventas
|
||||
If DbRowVenta("Saldo").ToString().ToDouble < 0.01 Then
|
||||
If ViewState("CveCotizacion") IsNot Nothing AndAlso ViewState("CveCotizacion").ToString().ToEntero() > 0 AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
ImgAntiPend.Visible = UsuarioActual.TienePermisoProceso(406)
|
||||
Else
|
||||
ImgAntiPend.Visible = True
|
||||
End If
|
||||
@@ -7034,8 +7034,8 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
|
||||
Me.CveMetodoPago33Cliente = ObjCliente.CveMetodoPago33
|
||||
Me.CveFormaPago33Cliente = ObjCliente.CveFormaPago33
|
||||
Me.CveMetodoPago33Cliente = ObjCliente.CveMetodoPago
|
||||
Me.CveFormaPago33Cliente = ObjCliente.CveFormaPago
|
||||
CveUsoCFDICliente = ObjCliente.CveUsoCFDI
|
||||
|
||||
PlazoCobranza = ObjCliente.PlazoCobranza
|
||||
@@ -8433,10 +8433,10 @@ Partial Class Ventas
|
||||
If CveVenta <= 0 AndAlso CveCotizacion <= 0 Then
|
||||
'CveMetodoPagoCliente = ObjCliente.CveMetodoPago
|
||||
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33)
|
||||
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago)
|
||||
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
|
||||
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33)
|
||||
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago)
|
||||
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI)
|
||||
'SI ES RFC GENERICO NO TIENE OBLIGACIONES FISCALES
|
||||
If LblRFC.Text.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
@@ -9020,6 +9020,14 @@ Partial Class Ventas
|
||||
If e.Row.DBCampo("TipoDocto").Contiene("Cot", "Rem") AndAlso (CveVenta > 0 AndAlso Not EsCreaApartirDe) Then
|
||||
e.Row.FCLinkButton("imgClone").Visible = False
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CvePromocionDetalle").ToEntero() > 0 Then
|
||||
If DtPromociones IsNot Nothing Then
|
||||
Dim NombrePromo As String = DtPromociones.FiltroPrimeroValor("NombrePromocion", $"CvePromocionDetalle={e.Row.DBCampo("CvePromocionDetalle")}")
|
||||
e.Row.FCHtmlGenericControl("TagPromocion").Attributes.Add("title", NombrePromo)
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If CveVenta <= 0 Then
|
||||
@@ -12072,6 +12080,10 @@ Partial Class Ventas
|
||||
ObjFacturaBonificacion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||
ObjFacturaBonificacion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||
|
||||
'CLIENTE
|
||||
ObjFacturaBonificacion.CveCliente = CveCliente
|
||||
ObjFacturaBonificacion.SetCliente()
|
||||
|
||||
ObjFacturaBonificacion.CveMetodoPago = 1
|
||||
ObjFacturaBonificacion.MetodoPago = "Pago en una sola exhibición"
|
||||
ObjFacturaBonificacion.ClaveMetodoPagoSAT = "PUE"
|
||||
@@ -12217,10 +12229,6 @@ Partial Class Ventas
|
||||
|
||||
ObjFacturaBonificacion.DtFirmas = DTmpF
|
||||
|
||||
'CLIENTE
|
||||
ObjFacturaBonificacion.CveCliente = CveCliente
|
||||
ObjFacturaBonificacion.SetCliente()
|
||||
|
||||
''SUCURSAL
|
||||
'ObjFacturaBonificacion.CveSucursal = DdlSucursal.SelectedValue.ToEntero()
|
||||
'ObjFacturaBonificacion.SetSucursalMatriz(Me)
|
||||
@@ -12550,6 +12558,15 @@ Partial Class Ventas
|
||||
ObjFactura.CvePrePoliza = -1
|
||||
ObjFactura.FechaVencimiento = TxtFechaPago.Text.ToDate
|
||||
|
||||
'CLIENTE
|
||||
ObjFactura.CveCliente = CveCliente
|
||||
ObjFactura.SetCliente()
|
||||
ObjFactura.CveEmpresaCRM = CveEmpresaCRM
|
||||
If CveCliente = -1 And CveEmpresaCRM > 0 Then
|
||||
ObjFactura.Cliente.Nombre = LblEmpresaCRM.Text
|
||||
ObjFactura.Cliente.RFC = LblRFCCRM.Text
|
||||
End If
|
||||
|
||||
ObjFactura.CveMetodoPago = DdlMetodoPago33.SelectedValue.ToEntero()
|
||||
ObjFactura.MetodoPago = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
|
||||
'ObjFactura.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}")
|
||||
@@ -12996,15 +13013,6 @@ Partial Class Ventas
|
||||
ObjFactura.DtDetalle = TmpDT.Copy
|
||||
ObjFactura.DtFirmas = DTmpF.Copy
|
||||
|
||||
'CLIENTE
|
||||
ObjFactura.CveCliente = CveCliente
|
||||
ObjFactura.SetCliente()
|
||||
ObjFactura.CveEmpresaCRM = CveEmpresaCRM
|
||||
If CveCliente = -1 And CveEmpresaCRM > 0 Then
|
||||
ObjFactura.Cliente.Nombre = LblEmpresaCRM.Text
|
||||
ObjFactura.Cliente.RFC = LblRFCCRM.Text
|
||||
End If
|
||||
|
||||
'SUCURSAL
|
||||
'ObjFactura.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
ObjFactura.SetSubProyectoMatriz(Me)
|
||||
@@ -13289,6 +13297,10 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||
|
||||
'CLIENTE
|
||||
ObjFacturaDevolucion.CveCliente = CveCliente
|
||||
ObjFacturaDevolucion.SetCliente()
|
||||
|
||||
ObjFacturaDevolucion.CveMetodoPago = DdlMetodoPago33.SelectedValue.ToEntero()
|
||||
ObjFacturaDevolucion.MetodoPago = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
|
||||
|
||||
@@ -13479,10 +13491,6 @@ Partial Class Ventas
|
||||
ObjFacturaDevolucion.DtDetalle = TmpDT
|
||||
ObjFacturaDevolucion.DtFirmas = DTmpF
|
||||
|
||||
'CLIENTE
|
||||
ObjFacturaDevolucion.CveCliente = CveCliente
|
||||
ObjFacturaDevolucion.SetCliente()
|
||||
|
||||
'SUCURSAL
|
||||
ObjFacturaDevolucion.CveSubProyecto = DdlSubProyectoDatos.SelectedValue.ToEntero()
|
||||
ObjFacturaDevolucion.SetSubProyectoMatriz(Me)
|
||||
@@ -17219,7 +17227,7 @@ Partial Class Ventas
|
||||
Private Sub CargaAnticipos(CveCliente As Integer)
|
||||
Dim CargaAnticipos As Boolean = True
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
CargaAnticipos = False
|
||||
CargaAnticipos = UsuarioActual.TienePermisoProceso(406)
|
||||
End If
|
||||
HdnTieneAnticipos.Value = "0"
|
||||
If CveCliente > 0 AndAlso CargaAnticipos Then
|
||||
@@ -17287,7 +17295,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
ImgAntiPend.Visible = UsuarioActual.TienePermisoProceso(406)
|
||||
End If
|
||||
Else
|
||||
GVAnticipos.DataSource = Nothing
|
||||
@@ -17463,11 +17471,11 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(185) = "1" Then
|
||||
If e.Row.DBCampo("Tipo").ToString().Contiene("Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False
|
||||
e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado"
|
||||
e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True
|
||||
End If
|
||||
'If e.Row.DBCampo("Tipo").ToString().Contiene("Ant", "IxC") AndAlso Not CBool(e.Row.DBCampo("AnticipoAutorizado")) Then
|
||||
' e.Row.FCCheckBox("Chk" & e.Row.RowIndex).Enabled = False
|
||||
' e.Row.FCCheckBox("Chk" & e.Row.RowIndex).ToolTip = "Anticipo Bloqueado"
|
||||
' e.Row.FCLinkButton("LnkSolicitarActivarAnticipo").Visible = True
|
||||
'End If
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("CveMoneda").ToString().ToEntero() = DdlMoneda.SelectedValue.ToEntero() Then
|
||||
@@ -18570,6 +18578,12 @@ Partial Class Ventas
|
||||
|
||||
If ObjDescuentoGral.CvePromocionDetalle > 0 Then
|
||||
TagPromocion.Visible = True
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If DtPromociones IsNot Nothing Then
|
||||
Dim NombrePromo As String = DtPromociones.FiltroPrimeroValor("NombrePromocion", $"CvePromocionDetalle={ObjDescuentoGral.CvePromocionDetalle}")
|
||||
TagPromocion.Attributes.Add("title", NombrePromo)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Me.ObjDescuentoGral.EsPUModificado Then
|
||||
@@ -18733,7 +18747,22 @@ Partial Class Ventas
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlPSEdit_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
|
||||
Dim ActualizarPrecios As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
ActualizarPrecios = true
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
ActualizarPrecios = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
ActualizarPrecios = True
|
||||
End If
|
||||
|
||||
If ActualizarPrecios Then
|
||||
|
||||
Dim EditarPrecio As Boolean = True
|
||||
If DdlTipoComprobante.SelectedValue = "Ant" AndAlso UsuarioActual.CveEmpresa = 189 Then
|
||||
@@ -18747,25 +18776,40 @@ Partial Class Ventas
|
||||
If (GvRow.RowState = DataControlRowState.Edit OrElse GvRow.RowState = 5) Then
|
||||
Dim CvePSParametro = ddlPSEdit.SelectedValue.ToEntero()
|
||||
|
||||
Dim DdlPrecioListaEdit = GvRow.FCDropDownList("DdlPrecioListaEdit")
|
||||
Dim CveClasificacion As Integer = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimeroValor("CveClasificacion").ToEntero()
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") AndAlso GvRow.FCHtmlGenericControl("DivPrecioLista").Visible Then
|
||||
Using ObjVta As New ClsVentas
|
||||
If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePSParametro, UsuarioActual.CveEmpresa) Then
|
||||
Dim Dt As DataTable = Nothing
|
||||
If UsuarioActual.TienePermisoProceso(384) Then
|
||||
Dt = ObjVta.DtResultados.Copy()
|
||||
Else
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
|
||||
If CveClasificacion > 0 Then
|
||||
Dim DdlCla As DropDownList = GvRow.FCDropDownList("DdlClasificacion")
|
||||
DdlCla.SelectedValueExist(CveClasificacion)
|
||||
End If
|
||||
|
||||
Dim CvePrecioListaSugerido As Integer = -1
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(360) = "1" OrElse UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
Dim DdlPrecioListaEdit = GvRow.FCDropDownList("DdlPrecioListaEdit")
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem", "Cot", "Ped") AndAlso GvRow.FCHtmlGenericControl("DivPrecioLista").Visible Then
|
||||
Using ObjVta As New ClsVentas
|
||||
If ObjVta.GetPreciosListaSPPermitidos(DdlSubProyectoDatos.SelectedValue.ToEntero(), CvePSParametro, UsuarioActual.CveEmpresa) Then
|
||||
Dim Dt As DataTable = Nothing
|
||||
If UsuarioActual.TienePermisoProceso(384) Then
|
||||
Dt = ObjVta.DtResultados.Copy()
|
||||
Else
|
||||
Dt = ObjVta.DtResultados.FiltraParametros("Restringuida = 'False'")
|
||||
End If
|
||||
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").DataSource = Dt
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").DataBind()
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").SelectedValueExist(GvRow.DataKey("CvePrecioLista"))
|
||||
End If
|
||||
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").DataSource = Dt
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").DataBind()
|
||||
GvRow.FCDropDownList("DdlPrecioListaEdit").SelectedValueExist(GvRow.DataKey("CvePrecioLista"))
|
||||
End If
|
||||
End Using
|
||||
End Using
|
||||
End If
|
||||
End If
|
||||
|
||||
CvePrecioListaSugerido = DdlPrecioListaEdit.SelectedValue.ToEntero()
|
||||
Else
|
||||
CvePrecioListaSugerido = GvRow.DataKey("CvePrecioLista").ToEntero()
|
||||
End If
|
||||
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSParametro).FiltroPrimero("")
|
||||
@@ -18774,7 +18818,7 @@ Partial Class Ventas
|
||||
Dim PrecioSugerido As Decimal = 0
|
||||
Dim tPrecioSugerido As Decimal = 0
|
||||
tPrecioSugerido = DrPS("Precio").ToString().ToDecimal
|
||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePSParametro, DrPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=DdlPrecioListaEdit.SelectedValue.ToEntero())
|
||||
Dim ObjPrecioSugerido As Modelos.MPrecioSugerido = CalculaPrecioSugerido(CvePSParametro, DrPS("CveClasificacion").ToString().ToEntero(), CvePrecioListaSugerido:=CvePrecioListaSugerido)
|
||||
|
||||
PrecioSugerido = ObjPrecioSugerido.PrecioSugerido
|
||||
|
||||
@@ -19007,7 +19051,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
ImgAntiPend.Visible = UsuarioActual.TienePermisoProceso(406)
|
||||
End If
|
||||
|
||||
If ImgAntiPend.Visible Then
|
||||
@@ -19055,7 +19099,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
ImgAntiPend.Visible = UsuarioActual.TienePermisoProceso(406)
|
||||
End If
|
||||
|
||||
If ImgAntiPend.Visible Then
|
||||
@@ -26750,96 +26794,104 @@ Partial Class Ventas
|
||||
RFCReceptor = Me.RFCReceptorVenta
|
||||
End If
|
||||
|
||||
Dim SWatch As New Stopwatch
|
||||
SWatch.Start()
|
||||
Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||
Dim SWatch As New Stopwatch
|
||||
SWatch.Start()
|
||||
Dim Vigencia As Timbrado.AcuseCancelacionSAT = Timbrado.VerificarVigenciaSAT(FolioFiscal, UsuarioActual.Empresa.RFC, RFCReceptor, TotalT.ToString(), True)
|
||||
|
||||
SWatch.Stop()
|
||||
SWatch.Stop()
|
||||
|
||||
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
|
||||
SegundosRespuesta = SegundosRespuesta.ToEntero
|
||||
Dim SegundosRespuesta As Double = SWatch.ElapsedMilliseconds / 1000
|
||||
SegundosRespuesta = SegundosRespuesta.ToEntero
|
||||
|
||||
If SegundosRespuesta >= 5 Then
|
||||
Alert($"Los servicios de validacion del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastAdventencia, "")
|
||||
End If
|
||||
If SegundosRespuesta >= 5 Then
|
||||
Alert($"Los servicios de validacion del SAT presentan lentitud en la respuesta [{ SegundosRespuesta } s].", TipoMensaje.ToastAdventencia, "")
|
||||
End If
|
||||
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||
If Vigencia IsNot Nothing Then
|
||||
If Vigencia.EsCancelable.ToUpper() = "NO CANCELABLE" Then
|
||||
|
||||
DivRelacionadasCancelacion.Visible = True
|
||||
BtnCancelarDocumento.Visible = False
|
||||
DivMotivoCancelacion.Visible = False
|
||||
DivMotivoCancelacionTxt.Visible = False
|
||||
DivCanRem.Visible = False
|
||||
DivDevAlm.Visible = False
|
||||
DivRelacionadasCancelacion.Visible = True
|
||||
BtnCancelarDocumento.Visible = False
|
||||
DivMotivoCancelacion.Visible = False
|
||||
DivMotivoCancelacionTxt.Visible = False
|
||||
DivCanRem.Visible = False
|
||||
DivDevAlm.Visible = False
|
||||
|
||||
Dim Relacionados As Timbrado.MRespUUIDRelacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||
If Relacionados IsNot Nothing Then
|
||||
If Relacionados.Codigo = 500 Then
|
||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||
Else
|
||||
sbExtra.Append(Relacionados.Mensaje)
|
||||
Dim SbHijos As New StringBuilder()
|
||||
Dim SbPadres As New StringBuilder()
|
||||
Dim Relacionados As Timbrado.MRespUUIDRelacionados = Timbrado.ConsultarUUIDRelacionados(UsuarioActual.Empresa, FolioFiscal, UsuarioActual.Empresa.FacturaProduccion)
|
||||
If Relacionados IsNot Nothing Then
|
||||
If Relacionados.Codigo = 500 Then
|
||||
sbExtra.Append("El servicio de verificación de documentos relacionados no esta disponible.")
|
||||
Else
|
||||
sbExtra.Append(Relacionados.Mensaje)
|
||||
Dim SbHijos As New StringBuilder()
|
||||
Dim SbPadres As New StringBuilder()
|
||||
|
||||
'If Relacionados.RelacionadosHijo IsNot Nothing Then
|
||||
' For Each hijo In Relacionados.RelacionadosHijo
|
||||
' SbHijos.AppendFormat("{0};", hijo.Uuid)
|
||||
' Next
|
||||
' If SbHijos.Length > 0 Then
|
||||
' SbHijos.Remove(SbHijos.Length - 1, 1)
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
||||
For Each padre As Timbrado.RelacionadosPadre In Relacionados.RelacionadosPadre
|
||||
SbPadres.AppendFormat("{0};", padre.Uuid)
|
||||
Next
|
||||
If SbPadres.Length > 0 Then
|
||||
SbPadres.Remove(SbPadres.Length - 1, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
Using ObjVentas As New ClsVentas
|
||||
'If SbHijos.Length > 0 Then
|
||||
' If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbHijos.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
' GvFacturasHijosCancelar.DataSource = ObjVentas.DtResultados.Copy()
|
||||
'If Relacionados.RelacionadosHijo IsNot Nothing Then
|
||||
' For Each hijo In Relacionados.RelacionadosHijo
|
||||
' SbHijos.AppendFormat("{0};", hijo.Uuid)
|
||||
' Next
|
||||
' If SbHijos.Length > 0 Then
|
||||
' SbHijos.Remove(SbHijos.Length - 1, 1)
|
||||
' End If
|
||||
'End If
|
||||
If SbPadres.Length > 0 Then
|
||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
GvFacturasPadreCancelar.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
||||
|
||||
If Relacionados.RelacionadosPadre IsNot Nothing Then
|
||||
For Each padre As Timbrado.RelacionadosPadre In Relacionados.RelacionadosPadre
|
||||
SbPadres.AppendFormat("{0};", padre.Uuid)
|
||||
Next
|
||||
If SbPadres.Length > 0 Then
|
||||
SbPadres.Remove(SbPadres.Length - 1, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
'GvFacturasHijosCancelar.DataBind()
|
||||
GvFacturasPadreCancelar.DataBind()
|
||||
Using ObjVentas As New ClsVentas
|
||||
'If SbHijos.Length > 0 Then
|
||||
' If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbHijos.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
' GvFacturasHijosCancelar.DataSource = ObjVentas.DtResultados.Copy()
|
||||
' End If
|
||||
'End If
|
||||
If SbPadres.Length > 0 Then
|
||||
If ObjVentas.GetFacturasRelacionadasPorFolioFiscal(SbPadres.ToString(), UsuarioActual.CveEmpresa) Then
|
||||
GvFacturasPadreCancelar.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveVenta <> {CveVenta}")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Using
|
||||
'GvFacturasHijosCancelar.DataBind()
|
||||
GvFacturasPadreCancelar.DataBind()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||
If UsuarioActual.Empresa.FacturaProduccion AndAlso Not String.IsNullOrEmpty(FolioFiscal) Then
|
||||
Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
If String.IsNullOrEmpty(Vigencia.EsCancelable) Then
|
||||
If UsuarioActual.Empresa.FacturaProduccion AndAlso Not String.IsNullOrEmpty(FolioFiscal) Then
|
||||
Alert("No se pudo encontrar el estatus de la factura en el SAT.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
MostrarRemisionesCancelar()
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
Else
|
||||
'GUARDA EL ESTADO DE CANCELACION
|
||||
If Vigencia.EsCancelable.ToUpper() = "CANCELABLE CON ACEPTACIÓN" Then
|
||||
Me.CveEstadoCancelacion = 2
|
||||
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||
Me.CveEstadoCancelacion = 1
|
||||
End If
|
||||
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then
|
||||
MostrarRemisionesCancelar()
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
MostrarRemisionesCancelar()
|
||||
sb.Append("<b>No encontrado</b> <br/>")
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
Else
|
||||
'GUARDA EL ESTADO DE CANCELACION
|
||||
If Vigencia.EsCancelable.ToUpper() = "CANCELABLE CON ACEPTACIÓN" Then
|
||||
Me.CveEstadoCancelacion = 2
|
||||
ElseIf Vigencia.EsCancelable.ToUpper() = "CANCELABLE SIN ACEPTACIÓN" Then
|
||||
Me.CveEstadoCancelacion = 1
|
||||
End If
|
||||
|
||||
sb.AppendFormat("<b>{0}</b> <br/>", Vigencia.EsCancelable)
|
||||
If Vigencia.EsCancelable.ToUpper() <> "NO CANCELABLE" Then
|
||||
MostrarRemisionesCancelar()
|
||||
sb.Append("Está seguro de cancelar el documento?.")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
MostrarRemisionesCancelar()
|
||||
@@ -27073,12 +27125,17 @@ Partial Class Ventas
|
||||
|
||||
If EsRefacturacion Then
|
||||
|
||||
Dim ValidarSAT As Boolean = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||
ValidarSAT = False
|
||||
End If
|
||||
|
||||
'Dim msgBitacora As String = $"Motivo de refacturación: {TxtMotivoRefac.Text}"
|
||||
'Dim ObjE As New ClsOIEventos()
|
||||
'ObjE.AddEventoBitacora(msgBitacora, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVenta)
|
||||
'ObjE.Dispose()
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarPorRefacturacion(DdlMotivoRefacturacion.SelectedValue.ToEntero(), TxtMotivoRefac.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion)
|
||||
resp = ObjFacturaCancelacion.CancelarPorRefacturacion(DdlMotivoRefacturacion.SelectedValue.ToEntero(), TxtMotivoRefac.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion, ValidarSAT:=ValidarSAT)
|
||||
strMensaje.Append(resp.Mensaje)
|
||||
Else
|
||||
Dim ListaRemisionesCancelar As New List(Of Integer)
|
||||
@@ -27135,7 +27192,26 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(If(ChkDevAlm.Checked, 1, 0), ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion, ForzarDevolucion:=GenerarDevolucionAnticipada, CancelacionPagos:=CancelacionPagos)
|
||||
Dim ValidarSAT As Boolean = True
|
||||
Dim CveEstatusFacturaAsignado As Integer = -1
|
||||
If UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||
ValidarSAT = False
|
||||
|
||||
Dim diasTimbrado As Decimal = DateDiff(DateInterval.Day, ObjFacturaCancelacion.FechaCP, ClsPaginas.NowADS())
|
||||
|
||||
'CANCELACION SIN ACEPTACION
|
||||
Me.CveEstadoCancelacion = 2
|
||||
'CANCELACION CON ACEPTACION
|
||||
If ObjFacturaCancelacion.Total < 1000D OrElse diasTimbrado <= 1 OrElse ObjFacturaCancelacion.Cliente.RFC.Contiene("XAXX010101000", "XEXX010101000") Then
|
||||
Me.CveEstadoCancelacion = 1
|
||||
End If
|
||||
|
||||
ObjFacturaCancelacion.CveEstadoCancelacion = Me.CveEstadoCancelacion
|
||||
|
||||
CveEstatusFacturaAsignado = 4
|
||||
End If
|
||||
|
||||
resp = ObjFacturaCancelacion.CancelarFactura(If(ChkDevAlm.Checked, 1, 0), ListaRemisionesCancelar, CveMotivoCancelacion:=DdlMotivoCancelacion.SelectedValue.ToEntero(), Motivo:=TxtMotivoCancelacion.Text.Trim(), CveEstadoCancelacion:=Me.CveEstadoCancelacion, ForzarDevolucion:=GenerarDevolucionAnticipada, CancelacionPagos:=CancelacionPagos, ValidarSAT:=ValidarSAT, CveEstatusFacturaAsignado:=CveEstatusFacturaAsignado)
|
||||
strMensaje.Append(resp.Mensaje)
|
||||
Dim DtBonificaciones As DataTable = Nothing
|
||||
|
||||
@@ -33036,7 +33112,7 @@ Partial Class Ventas
|
||||
If DtMovtos.Rows.Count > 0 Then ImgAntiPend.Visible = True
|
||||
|
||||
If UsuarioActual.CveEmpresa = 189 Then
|
||||
ImgAntiPend.Visible = False
|
||||
ImgAntiPend.Visible = UsuarioActual.TienePermisoProceso(406)
|
||||
End If
|
||||
Else
|
||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 AND SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo = 'Ant' ", "")} {If(DdlTipoComprobante.SelectedValue = "Ant", "AND Tipo = 'NC'", "")}")
|
||||
@@ -39917,9 +39993,19 @@ Partial Class Ventas
|
||||
Dim FolioFiscal As String = RowVenta("FolioFiscal").ToString().Trim()
|
||||
Dim Total As Decimal = RowVenta("Total").ToString().ToDecimal()
|
||||
Dim RFCReceptor As String = RowVenta("RFCReceptor").ToString()
|
||||
Dim CvePACCancelacion As Integer = 5
|
||||
Dim ObjTimbrado As New Timbrado
|
||||
Dim resp = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion:=4, ValidaFactura:=False, CveSATMotivoCancelacion:=2)
|
||||
Dim resp = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC, CvePACCancelacion:=CvePACCancelacion, ValidaFactura:=False, CveSATMotivoCancelacion:=2)
|
||||
If resp IsNot Nothing Then
|
||||
If resp.Verificado Then
|
||||
Dim CancelacionAcuse = resp.CancelacionAcuse
|
||||
Using ObjVentas As New ClsVentas
|
||||
If Not ObjVentas.UpdateCancelaVenta(CveVenta, Now, CancelacionAcuse, UsuarioActual.CveEmpresa, CvePACCancelacion, -1, EstadoCancelacion:="", CveEstadoCancelacion:=-1) Then
|
||||
Alert("Ocurrió un error al guardar el estatus de cancelación")
|
||||
End If
|
||||
End Using
|
||||
|
||||
End If
|
||||
Alert(resp.Estado)
|
||||
End If
|
||||
|
||||
@@ -40395,6 +40481,17 @@ Partial Class Ventas
|
||||
Next
|
||||
End If
|
||||
|
||||
Dim CveVenta As Integer = gvr.DataKey("CveVenta").ToEntero()
|
||||
Dim CveIE As Integer = gvr.DataKey("CveIE").ToEntero()
|
||||
Dim Saldo As Decimal = gvr.DataKey("Saldo").ToDecimal()
|
||||
|
||||
Dim ObjVta As New ClsVentas
|
||||
If ObjVta.AddAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedor.SelectedValue.ToEntero(), Saldo, 0, UsuarioActual.CveUsuario, 1, TipoDocumento:="Ant", DiasVencidos:=1, CveVenta:=CveVenta, CveIE:=CveIE) Then
|
||||
Dim msgAlert = "La autorización se agregó correctamente."
|
||||
Alert(msgAlert, TipoMensaje.ToastInformacionB)
|
||||
End If
|
||||
ObjVta.Dispose()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -40681,14 +40778,9 @@ Partial Class Ventas
|
||||
|
||||
'GvExist.Columns(0).ItemStyle.Width = New Unit(200, UnitType.Pixel)
|
||||
'ORDENA HACIA LA DERECHA LAS CANTIDAD - OJO!! NO SE USO GV.COLUMNS.COUNT PORQUE LAS COLUMNAS GENERADAS EN BEHIND NO LAS RECONOCE
|
||||
For index As Integer = 0 To DtExistencias.Columns.Count - 1
|
||||
For index As Integer = 1 To DtExistencias.Columns.Count - 1
|
||||
For Each gvr As GridViewRow In GvExist.Rows
|
||||
If index = 0 Then
|
||||
gvr.Cells(index).CssClass = "titulops"
|
||||
Else
|
||||
gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right
|
||||
End If
|
||||
|
||||
gvr.Cells(index).HorizontalAlign = HorizontalAlign.Right
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
@@ -40696,5 +40788,12 @@ Partial Class Ventas
|
||||
RegistraScript("$('#DivModalExistenciaTotal').modal('show');")
|
||||
UPExist.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvExist_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvExist.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.Header OrElse e.Row.RowType = DataControlRowType.DataRow Then
|
||||
e.Row.Cells(0).Attributes.Add("colspan", "3")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user