Compras Local

This commit is contained in:
Oscar Irigoyen
2023-06-02 09:30:00 -07:00
33 changed files with 3310 additions and 2922 deletions

View File

@@ -122,7 +122,7 @@
<asp:GridView ID="GvFolioGarantia" runat="server" AutoGenerateColumns="False"
DataKeyNames="CveFolioGarantia,FolioGarantia,CveEstatus,Estatus,CveUsuario,Usuario,FechaIng,SubProyecto,CveSubProyecto,tipoFolio,Limite,CveMovimiento"
EmptyDataText="No se encontraron registros" ToolTip="Listado de Folios de Garantía"
EmptyDataText="No se encontraron registros"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
data-sort="true"
data-freezerows="1"

View File

@@ -1350,7 +1350,7 @@ Public Class ClsContabilidad
ContaFolio = ObjConta.Folio.ToString
End If
If tIdPoliza > 0 AndAlso GetContabilizacionDiarioDetalle(CvePrePoliza) Then
If tIdPoliza > 0 AndAlso GetContabilizacionDiarioDetalle(CvePrePoliza, Empresa.CveEmpresa) Then
Dim tipoMovimiento As Boolean = False
Dim CveConceptoContable As Integer
Dim SigReferencia As String = ""
@@ -2007,12 +2007,13 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function GetContabilizacionDiarioDetalle(CvePrePoliza As Integer) As Boolean 'Editado por charlie
Public Function GetContabilizacionDiarioDetalle(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean 'Editado por charlie
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_ContabilizacionDiariosDetalleGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
@@ -6375,7 +6376,9 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, Opcion As Integer, ByRef UsuarioActual As Usuario, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, ByRef UsuarioActual As Usuario, Optional Opcion As Integer = 1,
Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True,
Optional ObjConta As ClsContPAQi = Nothing) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta_PrePolizasValidacion")
@@ -6402,10 +6405,13 @@ Public Class ClsContabilidad
If MensajePolizaDescuadre = "" AndAlso AutoConta Then
If UsuarioActual.Empresa.TipoContabilidad = 2 Then ' el tipocontabilidad deberá activarse en el PA
If Not ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
If Not ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
MensajePolizaDescuadre = Mensaje.ToString ' regresa el mensaje de contabilización
Retorno = False
End If
End If
Else
Retorno = False
End If
Catch ex As Exception

View File

@@ -4306,15 +4306,15 @@ Public Class ClsPaginas
End If
Else
LocalStopwatch.Value.Restart()
If EsProduccion Then
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(750)
End If
If Not Page.IsPostBack Then
'If Not CType(Session("UsuarioSIG"), Usuario).SeleccionoEmpresa AndAlso Request.ServerVariables("URL") <> "/Sistemas/PopUpSeleccionarEmpresa.aspx" Then
' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx")
' 'Alert(Request.ServerVariables("URL"))
'End If
''codigo temporal
If EsProduccion Then
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(750)
End If
Dim i As Integer = Obt_ClavePagina(Request.ServerVariables("URL"))
Dim FailURL As String = $"{FormsAuthentication.DefaultUrl}?ADCod={Encripta($"CveModulo={i}")}"
@@ -5618,6 +5618,15 @@ Public Class ClsPaginas
params.Add(New ReportParameter("AplicaPagare", AplicaPagare))
RutaFormato = String.Format("{0}Formatos\{1}.rdlc", UsuarioActual.Empresa.Ruta, NombreArchivo)
RutaFormatoDefault = String.Format("Empresas\Grales\Formatos\{0}.rdlc", NombreArchivo)
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
Dim MostrarImportes As Boolean = False
'SI EL CLIENTE ES PUBLICO GENERAL
If UsuarioActual.Empresa.Funcionalidad(381).Trim() = Vta.CveCliente.ToString() Then
MostrarImportes = True
End If
params.Add(New ReportParameter("MostrarImportes", MostrarImportes.ToString()))
End If
Case "Cot"
NombreArchivo = "Cotizacion"
NombreArchivoDescarga = "Cotización"

View File

@@ -103,8 +103,6 @@ Public Class ClsProductosServicios
Public Property ClaveImpuestoEmpaque As String
Public Property ClaveImpuestoUnidadMedida As String
Public Property ClaveCategoriaToxicidad As String
Public Property EsOutSourcing As Boolean
Public Property PrecioLibre As Boolean
Public ReadOnly Property DtResultados() As DataTable
@@ -314,7 +312,6 @@ Public Class ClsProductosServicios
ClaveImpuestoEmpaque = Data.Rows(0)("ClaveImpuestoEmpaque").ToString
ClaveImpuestoUnidadMedida = Data.Rows(0)("ClaveImpuestoUM").ToString
ClaveCategoriaToxicidad = Data.Rows(0)("ClaveCategoriaToxicidad").ToString
EsOutSourcing = Data.Rows(0)("EsOutSourcing").ToString = "True"
PrecioLibre = Data.Rows(0)("PrecioLibre").ToString = "True"
End If
@@ -410,11 +407,11 @@ Public Class ClsProductosServicios
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, CveUsuario As Integer, CveEmpresa As Integer, CveMetodoInventario As Integer, EsPaquete As Integer,
Optional CveTipoPS As Integer = -1, Optional FuePorXML As Boolean = True, Optional TipoServicio As Integer = -1, Optional CveClasificacion2 As Integer = -1,
Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
Optional CveConceptoContable As Integer = -1, Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
Optional CveCompuesto As Integer = -1, Optional CveSATPS As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1,
Optional CveFraccionArancelaria As Integer = -1, Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1,
Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False,
Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Integer
@@ -492,7 +489,6 @@ Public Class ClsProductosServicios
.Add("@ClaveImpuestoUM", SqlDbType.VarChar).Value = ClaveImpuestoUM
.Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad
.Add("@Litraje", SqlDbType.Float).Value = Litraje
.Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing
.Add("@AplicaSerie", SqlDbType.Bit).Value = AplicaSerie
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote
@@ -569,35 +565,20 @@ Public Class ClsProductosServicios
.Add("@AplicaIEPS", SqlDbType.Bit).Value = PS.AplicaIEPS
.Add("@IEPSGrabaIVA", SqlDbType.Bit).Value = PS.IEPSGrabaIVA
.Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = PS.IEPSPorcentaje
.Add("@CveConceptoContable", SqlDbType.Int).Value = PS.CveConceptoContable
.Add("@CveCompuesto", SqlDbType.Int).Value = PS.CveCompuesto
.Add("@CveSATPS", SqlDbType.Int).Value = PS.CveSATPS
'Nuevo R: 26/09/2017'
.Add("@Inventariable", SqlDbType.Bit).Value = PS.Inventariable
.Add("@CveProveedorCompra", SqlDbType.Int).Value = PS.CveProveedorCompra
.Add("@VentaMinima", SqlDbType.Decimal).Value = PS.VentaMinima
'Nuevo R: 08/11/2017'
.Add("@CveMoneda", SqlDbType.Int).Value = PS.CveMoneda
'Nuevo R: 30/11/2017
.Add("@RetISR", SqlDbType.Float).Value = PS.RetISR
'Nuevo Oscar 29/12/2017
.Add("@PrecioMinimo", SqlDbType.Money).Value = PS.PrecioMinimo
'Nuevo Rigo 12/01/2018
.Add("@CveTipoFactor", SqlDbType.Int).Value = PS.CveTipoFactor
'Nuevo Raul 08/03/2018
.Add("@CveFraccionArancelaria", SqlDbType.Int).Value = PS.CveFraccionArancelaria
'Nuevo Raul 11/09/2018
.Add("@CveClasificacionDetalle", SqlDbType.Int).Value = PS.CveClasificacionDetalle
'Nuevo Oscar 31/10/2018
.Add("@CveTamaño", SqlDbType.Int).Value = PS.CveTamaño
End With
@@ -658,11 +639,11 @@ Public Class ClsProductosServicios
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, Codigo2 As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
Optional CveConceptoContable As Integer = -1, Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
Optional CveCompuesto As Integer = -1, Optional IEPSGrabaIVA As Boolean = False, Optional VentaMinima As Decimal = 0,
Optional CveMoneda As Integer = 1, Optional RetISR As Double = 0, Optional PrecioMinimo As Decimal = Nothing, Optional CveTipoFactor As Integer = 1,
Optional CveFraccionArancelaria As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
Optional CveClasificacionDetalle As Integer = -1, Optional CveTamaño As Integer = -1, Optional CveModelo As Integer = -1, Optional CveMedida As Integer = -1, Optional CveRinTamaño As Integer = -1, Optional ClaveImpuestoEmpaque As String = "", Optional ClaveImpuestoUM As String = "",
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1, Optional EsOutSourcing As Boolean = False,
Optional ClaveCategoriaToxicidad As String = "", Optional ClaveImpuestoTipoProducto As String = "", Optional Litraje As Double = -1,
Optional AplicaSerie As Boolean = False, Optional AplicaLote As Boolean = False, Optional AplicaCaducidad As Boolean = False, Optional AplicaSeccion As Boolean = False, Optional TiempoCaducidad As Integer = -1, Optional CvePSAdicionalVigencia As Integer = -1, Optional PrecioLibre As Boolean = False,
Optional CveMaterialPeligroso As Integer = -1, Optional CveEmbalaje As Integer = -1, Optional PesoKg As Decimal = -1, Optional Dimensiones As String = "", Optional CveObjetoImpuesto As Integer = 0,
Optional RegistroRSCO As String = "-1", Optional FechaVigenciaRSCO As Date = MinFecha, Optional VigenciaIndeterminadaRSCO As Boolean = False, Optional CveTipoEmpacado As Integer = -1, Optional CveTipoOrganico As Integer = -1) As Boolean
@@ -697,7 +678,6 @@ Public Class ClsProductosServicios
.Add("@AplicaIEPS", SqlDbType.Bit).Value = AplicaIEPS
.Add("@IEPSGrabaIVA", SqlDbType.Bit).Value = IEPSGrabaIVA
.Add("@IEPSPorcentaje", SqlDbType.SmallMoney).Value = IEPSPorcentaje
.Add("@CveConceptoContable", SqlDbType.Int).Value = CveConceptoContable
.Add("@CveCompuesto", SqlDbType.Int).Value = CveCompuesto
.Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS
@@ -740,7 +720,6 @@ Public Class ClsProductosServicios
.Add("@ClaveImpuestoUM", SqlDbType.VarChar).Value = ClaveImpuestoUM
.Add("@ClaveCategoriaToxicidad", SqlDbType.VarChar).Value = ClaveCategoriaToxicidad
.Add("@Litraje", SqlDbType.Float).Value = Litraje
.Add("@EsOutSourcing", SqlDbType.Bit).Value = EsOutSourcing
.Add("@AplicaSerie", SqlDbType.Bit).Value = AplicaSerie
.Add("@AplicaLote", SqlDbType.Bit).Value = AplicaLote

View File

@@ -335,7 +335,7 @@ Public Class ClsSubProyectos
Public Function AddCentroCosto(SubProyecto As String, IdSegNeg As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean
Optional Telefono As String = "", Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1, Optional DeshabilitaAutorizacion As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CentroCostoAdd")
@@ -369,7 +369,8 @@ Public Class ClsSubProyectos
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
.Add("@DeshabilitaAutorizacion", SqlDbType.Bit).Value = DeshabilitaAutorizacion
.Add("@CveSubProyecto", SqlDbType.Int).Direction = ParameterDirection.Output
End With
@@ -393,7 +394,7 @@ Public Class ClsSubProyectos
Public Function UpdateCentroCosto(CveSubProyecto As Integer, SubProyecto As String, IdSegNeg As Integer, Estatus As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveProyecto As Integer, Optional Serie As String = "", Optional IVA As Double = 0.0, Optional Calle As String = "", Optional NoExt As String = "",
Optional NoInt As String = "", Optional Colonia As String = "", Optional Localidad As String = "", Optional Municipio As String = "", Optional Estado As String = "", Optional Pais As String = "", Optional CP As String = "", Optional TipoSucursal As Integer = 0, Optional EsSucursal As Integer = 0,
Optional CvePais As Integer = -1, Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CveColonia As Integer = -1, Optional AplicaComercioExterior As Boolean = False, Optional Correo As String = "", Optional CvePrecioLista As Integer = -1,
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1) As Boolean
Optional Telefono As String = "", Optional HorarioVerano As Integer = Nothing, Optional HorarioInvierno As Integer = Nothing, Optional NoVerificaAlmacen As Boolean = False, Optional CodigoSucursal As String = "", Optional CveLocalidad As Integer = -1, Optional DeshabilitaAutorizacion As Boolean = False) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_CentroCostoUpdate")
@@ -432,6 +433,7 @@ Public Class ClsSubProyectos
.Add("@NoVerificaAlmacen", SqlDbType.Bit).Value = NoVerificaAlmacen
.Add("@CodigoSucursal", SqlDbType.VarChar).Value = CodigoSucursal
.Add("@CveLocalidad", SqlDbType.Int).Value = CveLocalidad
.Add("@DeshabilitaAutorizacion", SqlDbType.Bit).Value = DeshabilitaAutorizacion
End With

View File

@@ -2404,7 +2404,7 @@ Namespace Modelos
' Verificar si la fecha es del mes anterior a la fecha actual
Dim esMesAnterior As Boolean = False
If ObjFactura.TipoDocto = "Egs" AndAlso ValorMultiplicador = -1 AndAlso FechaCancelacion > MinFecha AndAlso tipoCambio > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" Then
If ValorMultiplicador = -1 AndAlso FechaCancelacion > MinFecha AndAlso tipoCambio > 1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" Then
' Obtener el mes y año de la fecha actual
Dim mesActual As Integer = FechaCancelacion.Month
Dim añoActual As Integer = FechaCancelacion.Year
@@ -2480,11 +2480,11 @@ Namespace Modelos
Dim TCCliente As Decimal = tipoCambio
Dim TCFluctuacion As Decimal = tipoCambio
'TOMA EL TC DE LA ULTIMA FLUCTUACION
If ValorMultiplicador = -1 AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then
If ValorMultiplicador = -1 AndAlso esMesAnterior AndAlso UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso ObjFactura.CveMoneda = 2 Then
Dim UltimaFluctuacion As ClsPaginas.MTipoCambioFluctuacion = ClsPaginas.GlobalTipoCambioUltimaFluctuacion(Now)
If UsuarioActual.Empresa.Funcionalidad(703) = "1" AndAlso UltimaFluctuacion IsNot Nothing Then
If UltimaFluctuacion.FechaFluctuacion <= Now Then
If UltimaFluctuacion.FechaFluctuacion <= FechaCancelacion Then
TCCliente = UltimaFluctuacion.TCFluctuacion
TCFluctuacion = UltimaFluctuacion.TCFluctuacion
End If

View File

@@ -451,7 +451,13 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa)
If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 1, CveBitacora, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
End If
@@ -529,10 +535,11 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
If Not ErrorRegistrar Then
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, CveBitacora, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 2, CveBitacora, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
End If
@@ -631,7 +638,10 @@ Partial Class Bancos_FluctuacionCambiaria
Next
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
If Not ErrorRegistrar AndAlso Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 3, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
@@ -723,10 +733,12 @@ Partial Class Bancos_FluctuacionCambiaria
ErrorRegistrar = True
Exit For
End If
Next
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 4, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
@@ -809,22 +821,13 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa)
If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 5, CveBitacora, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar Then
If Conta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
If Conta.ValorPolizaDescuadre > 0 Then
ErrorRegistrar = True
GuardaLogAD($"Banc/FluctuaA | Error:{Conta.MensajePolizaDescuadre} Diferencia:{Conta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
End If
Else
Alert("No se pudo validar la prepoliza de cuadre.", TipoMensaje.MsgAdvertencia)
End If
End If
If Not ErrorRegistrar Then
Conta.Commit()
BtnGeneraAcreedores.Visible = False
@@ -896,7 +899,12 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Next
Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa)
If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 6, CveBitacora, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar Then
Conta.Commit()
@@ -981,32 +989,21 @@ Partial Class Bancos_FluctuacionCambiaria
ErrorRegistrar = True
End If
End If
Next
Dim SeContabilizo As Boolean = False
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If AutoConta Then
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
SeContabilizo = True
Else
ErrorRegistrar = True
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
Next
If Not ErrorRegistrar AndAlso Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar Then
If Not Banco.UpdateFluctuacionesBitacoraPrePoliza(CvePrePoliza, 7, HdnCveFluctuacionBitacora.Value.ToEntero, UsuarioActual.CveEmpresa) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar Then
Conta.Commit()
' ObjContPaq.Commit()
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
CargaDatosBancosCuentas()
End If
If Not ErrorRegistrar Then
Conta.Commit()
' ObjContPaq.Commit()
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver PrePóliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
CargaDatosBancosCuentas()
Else
Conta.RollBack()
' ObjContPaq.Dispose()
@@ -1145,27 +1142,17 @@ Partial Class Bancos_FluctuacionCambiaria
End If
Else
'actualizar el TC del IE, al nuevo TC de la fluctuación
Banco.UpdateBancosTipoCambioValuacion(TCCierreFluctuacion, gvr.DataKey("CveIE").ToEntero, UsuarioActual.CveEmpresa)
Banco.UpdateBancosTipoCambioValuacion(TCCierreFluctuacion, gvr.DataKey("CveIE").ToEntero, UsuarioActual.CveEmpresa)
End If
Next
If Not ErrorRegistrar Then
'Inicio auto conta
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If AutoConta Then
If Conta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Else
Alert("Ocurrio un Error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
End If
End If
' If ObjContPaq IsNot Nothing Then ObjContPaq.Commit()
'Fin autoconta
Conta.Commit()
If Not ErrorRegistrar AndAlso Not Conta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
ErrorRegistrar = True
End If
If Not ErrorRegistrar Then
Conta.Commit()
Alert(String.Format("La Fluctuación se ha generado <br/> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto'>Ver Póliza</a>", CvePrePoliza), TipoMensaje.MsgInformacion)
Else
Conta.RollBack()

View File

@@ -1607,7 +1607,7 @@ Partial Class Bancos_PopIECompras
End Select
Dim ObjConta As ClsContPAQi = Nothing
If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then
If MsgError = "" AndAlso ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, Opcion:=5) Then
If ObjMov.ValorPolizaDescuadre > 0 Then
MsgError = ObjMov.MensajePolizaDescuadre
GuardaLogAD($"Bancos/PopIECompras | Error:{ObjMov.MensajePolizaDescuadre} Diferencia:{ObjMov.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")

View File

@@ -348,6 +348,7 @@
</td>
<td style="text-align: left; width: 30%">
<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" />
</td>
</tr>

View File

@@ -264,6 +264,10 @@ Partial Class Bancos_ProveedoresAbonar
ViewState("IdCtaContRetISR") = 0
End If
'temporal
If UsuarioActual.CveUsuario.Contiene(1803, 100) Then
ChkNoValidaSAT.Visible = True
End If
IdCuenta = 0
PermiteModificarImporte = True
@@ -666,7 +670,10 @@ Partial Class Bancos_ProveedoresAbonar
End If
Dim ImporteSeleccionado As Decimal = 0
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
Dim ValidaSAT As Boolean = True
If UsuarioActual.Empresa.Funcionalidad(529) = "1" OrElse ChkNoValidaSAT.Checked Then ValidaSAT = False
If ValidaSAT Then
Dim Validada As Boolean = False
Dim MsgValidadas As New StringBuilder
Dim Valida As New ClsValidaCFDi()
@@ -965,16 +972,14 @@ Partial Class Bancos_ProveedoresAbonar
'Conta ContPAQ
If UsuarioActual.Empresa.Funcionalidad(200) = "1" AndAlso MsgError = "" Then
If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
'If ObjMov.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa, ObjConta:=ObjConta) Then
If ObjMov.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, ObjConta:=ObjConta) Then
IDPoliza = ObjMov.ContaIdPoliza
Else
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
End If
End If
Else
MsgError = "No se pudo insertar la póliza"
End If
@@ -1692,7 +1697,7 @@ Partial Class Bancos_ProveedoresAbonar
Next
If MsgError.Trim.Length = 0 AndAlso CvePrePoliza > 0 Then
If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, 5, UsuarioActual) Then
If MsgError = "" AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 5) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
GuardaLogAD($"Bancos/ProveedoresAbonar | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")

View File

@@ -46,70 +46,57 @@
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="portlet smmallpadding solid grey-cascade portlet-filter" style="" id="PorletFiltros">
<div class="portlet-title portlet-filterT" style="">
<div class="titlefiltros caption ">
<ul class="list-inline text-size-12">
<li>Proveedor:
<asp:DropDownList ID="DdlProveedores" onclick="CargaProveedores();" runat="server" AppendDataBoundItems="true" DataTextField="RazonSocial" DataValueField="CveProveedor" Style="width: 240px !important; height: 30px; display: inline-block;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
<asp:Button ID="BtnCargarProveedores" runat="server" ClientIDMode="Static" Text="CargaProveedores" Style="display: none;" />
</li>
<li style="width: 80px; display: none;">Personal:
</li>
<li style="width: 150px; display: none;">
<asp:DropDownList ID="DdlPersonal" runat="server" AppendDataBoundItems="true" DataTextField="NombreCompleto" DataValueField="CvePersonal" CssClass="select2me" Style="width: 250px !important;">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>&nbsp;F.I.:
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; margin-left: 25px; margin-top: -25px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 90%;"></asp:TextBox>
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" class="expand"></a>
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1 ">Proveedor:</div>
<div class="col-md-3 "><ADS:Dropdownlost ID="DdlProveedores" runat="server" CssStyle="width: 100%;" Width="100%" DataTextField="RazonSocial" DataValueField="CveProveedor"></ADS:Dropdownlost>
</div>
<div class="col-md-1 truncate">
Fecha Inicio:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</li>
<li>&nbsp;&nbsp;&nbsp;F.F.:
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; margin-left: 25px; margin-top: -25px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Style="width: 90%;"></asp:TextBox>
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-1 truncate">
Fecha Fin:
</div>
<div class="col-md-1" style="min-width: 115px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</li>
<li>&nbsp;&nbsp;&nbsp;Con Saldo:
<asp:CheckBox ID="ChkSaldo" runat="server" data-size="small" CssClass="make-switchsd" Checked="True" />
</li>
<li>&nbsp;&nbsp;&nbsp;Movimiento:
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="select2me" AppendDataBoundItems="true" runat="server" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
<div class="tools">
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
<a href="javascript:;" runat="server" id="HExtensorFiltro" class="expand"></a>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
<div id="portletBody" runat="server" class="portlet-body" style="display: none;">
<ul class="list-inline">
@@ -142,7 +129,16 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
<li>&nbsp;&nbsp;&nbsp;Con Saldo:
<asp:CheckBox ID="ChkSaldo" runat="server" data-size="small" CssClass="make-switchsd" Checked="True" />
</li>
<li>&nbsp;Movimiento.:
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="select2me" AppendDataBoundItems="true" runat="server" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</li>
</ul>
</div>
</div>
</ContentTemplate>

View File

@@ -52,9 +52,14 @@ Partial Class Bancos_RepEgresosSinComprobante
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo='Egs'")
DdlTipoTransaccion.DataBind()
DdlUsuarioSolicito.DataSource = GlobalDTUsuarios.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa), "Nombre")
DdlUsuarioSolicito.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("", "Nombre")
DdlUsuarioSolicito.DataBind()
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
DdlProveedores.SelectedText = "Todos"
DdlProveedores.SelectedValue = "-1"
CargaDatos()
End If
@@ -67,7 +72,7 @@ Partial Class Bancos_RepEgresosSinComprobante
If txtFechaI.Text <> "" Then FechaI = txtFechaI.Text Else FechaI = "-1"
If txtFechaF.Text <> "" Then FechaF = txtFechaF.Text Else FechaF = "-1"
If Mov.GetEgresosSinComprobar(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa, DdlTipoTransaccion.SelectedValue.ToEntero, DdlUsuarioSolicito.SelectedValue.ToEntero) Then
If Mov.GetEgresosSinComprobar(FechaI, FechaF, DdlProveedores.SelectedValue.ToEntero, -1, DdlProveedoresClasificaciones.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlUsuarioResponsable.SelectedValue.ToEntero, DdlMoneda.SelectedValue.ToEntero, If(ChkSaldo.Checked, 1, 0), UsuarioActual.CveEmpresa, DdlTipoTransaccion.SelectedValue.ToEntero, DdlUsuarioSolicito.SelectedValue.ToEntero) Then
DtDatos = Mov.DtResultados
CargaGrid("")
CargaGridPersonal("")
@@ -77,18 +82,9 @@ Partial Class Bancos_RepEgresosSinComprobante
Mov.Dispose()
End Sub
Protected Sub BtnCargarProveedores_Click(sender As Object, e As System.EventArgs) Handles BtnCargarProveedores.Click
DdlProveedores.CssClass += " select2me"
DdlProveedores.Items.Clear()
DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedores.DataBind()
DdlProveedores.Items.Insert(0, New ListItem("Todos", "-1"))
DdlProveedores.Attributes.Remove("onclick")
End Sub
End Sub
Protected Sub GvESC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvESC.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -209,8 +205,8 @@ Partial Class Bancos_RepEgresosSinComprobante
For Each gr As GridViewRow In GvESC.Rows
If gr.FCCheckBox("Chk").Checked Then
Dim IdCtaContable As Integer = 0
Dim TipoMovtoOtIngresos As Boolean = True
Dim TipoMovtoConcepto As Boolean = False
Dim TipoMovtoOtIngresos As Boolean = False
Dim TipoMovtoConcepto As Boolean = True
Dim CveConceptoContable As Integer
Select Case gr.DataKey("CveConceptoContable").ToEntero

View File

@@ -1045,7 +1045,7 @@
<asp:Label Text="" ID="LbRetISROriginal" runat="server" />
</td>
<td>
<asp:Label ID="LblRetISR" runat="server" BorderStyle="None" Text="0.00"></asp:Label>%
<asp:Label ID="LblRetISR" runat="server" BorderStyle="None" Text="0.00"></asp:Label>
</td>
<td runat="server" id="TdRetISRConcepto" visible="false">
<asp:DropDownList ID="DdlRetISRConcepto" AppendDataBoundItems="true" CssClass="select2me" Style="width: 100%;" runat="server"></asp:DropDownList>
@@ -4429,7 +4429,7 @@
<div class="row">
<div class="col-md-6" id="divproyecto" runat="server">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" Width="50%" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto">
<asp:DropDownList ID="DdlProyecto" CssClass=" form-control input-sm select2me" runat="server" Width="100%" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Proyecto" DataValueField="CveProyecto">
<%--<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>--%>
</asp:DropDownList>
<%-- <asp:RequiredFieldValidator runat="server" Enabled="true" Display="None" ID="RFVProyecto" ControlToValidate="DdlProyecto" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Proyecto''</b> es necesario, por favor seleccione uno." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
@@ -4439,7 +4439,7 @@
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlSubProyecto" AutoPostBack="true" CssClass=" form-control input-sm select2me" runat="server" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged" Width="50%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:DropDownList ID="DdlSubProyecto" AutoPostBack="true" CssClass=" form-control input-sm select2me" runat="server" OnSelectedIndexChanged="DdlSubProyecto_SelectedIndexChanged" Width="100%" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
<asp:ListItem Selected="true" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
<%--<asp:RequiredFieldValidator runat="server" Enabled="true" Display="None" ID="RFVSubProyecto" ControlToValidate="DdlSubProyecto" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''SubProyecto''</b> es necesario, por favor seleccione uno." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
@@ -4485,15 +4485,7 @@
<label for="<%= TxtDescuentoModal.ClientID.ToString()%>">Descuento:</label>
</div>
</div>
<div class="col-md-4">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtOtrosGastos" ClientIDMode="Static" runat="server" CssClass=" form-control " Text="0" CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTEOtrosGastos" runat="server" TargetControlID="TxtOtrosGastos" FilterType="Custom, Numbers" ValidChars="." />
<label for="<%= TxtOtrosGastos.ClientID.ToString()%>">Gastos:</label>
</div>
</div>
</div>
</div>
<br />
<asp:UpdatePanel ID="UpIVA" runat="server" UpdateMode="Conditional">
@@ -4534,7 +4526,7 @@
<label for="<%= TxtRetISRModal.ClientID.ToString()%>">% RetISR:</label>
</div>
</div>
<div class="col-md-3">
<div class="col-md-3" runat="server" id="divIEPSModal" visible="false">
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtIEPSModal" ClientIDMode="Static" Enabled="false" runat="server" onkeyup="Recalcula();" CssClass=" form-control " CausesValidation="true" MaxLength="12" ValidationGroup="GprAgregaPS"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBEIEPS" runat="server" TargetControlID="TxtIEPSModal" FilterType="Custom, Numbers" ValidChars="." />

View File

@@ -1149,7 +1149,6 @@ Partial Class Compras_Compras
End Set
End Property
Private Property UUIDSList As List(Of String)
Get
If ViewState("UUIDSList") Is Nothing Then
@@ -1163,8 +1162,6 @@ Partial Class Compras_Compras
ViewState("UUIDSList") = value
End Set
End Property
Private Property NumeroReembolsoOriginal As String
Get
If ViewState("NumeroReembolsoOriginal") Is Nothing Then
@@ -1227,6 +1224,9 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Funcionalidad(117) <> "" Then
btnProrateo.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
divIEPSModal.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(303) <> "" Then
btnProrateo2.Visible = True
@@ -1911,16 +1911,6 @@ Partial Class Compras_Compras
TxtSerie.Enabled = False
End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then 'cuando es emp acumuladora
divFolioGarantia.Visible = True
Using objAcum As New ClsAcumuladores
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=2, TipoFolio:="-1", Area:=-1, CveSubProyecto:=-1) Then
DdlFolioGarantia.DataSource = objAcum.DtResultados.FiltraParametros("", "FechaIng DESC")
DdlFolioGarantia.DataBind()
End If
End Using
End If
'PERMISO PARA MODIFICACIÓN DE FECHA AUN CON FACTURA
TxtFecha.Enabled = UsuarioActual.TienePermisoProceso(216)
ImgFecha.Enabled = UsuarioActual.TienePermisoProceso(216)
@@ -2354,7 +2344,7 @@ Partial Class Compras_Compras
If OtrosImpuestos > 0 Or TrasladoIEPS > 0 Then
If UsuarioActual.Empresa.Funcionalidad(713).ToEntero = 1 Then
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
'Si tiene funcionalidad y es Acreedor se muestra modal
If CveTipoProveedor.Contiene(2, 3) Then ' Acreedor
RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
@@ -2426,8 +2416,8 @@ Partial Class Compras_Compras
HdnCompraSaldo.Value = TotalTemp.ToString
CompraSaldo = TotalTemp
LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(3), "")
LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(3), "")
LblRetIVA.Text = If(RetIVATemp > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
LblRetISR.Text = If(RetISRTemp > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
'ASIGNA VALORES ORIGINALES PARA GUARDAR
AsignaValoresOriginales(SubtotalTemp, Subtotal2Temp, IVATemp, RetIVATemp, RetISRTemp, Total)
@@ -2636,8 +2626,8 @@ Partial Class Compras_Compras
LblUsuarioCaptura.Text = dr("Usuario").ToString
LitFechCaptura.Text = dr("FechaIng").ToString.ToDate.ToShortDateString
LitFechCaptura.ToolTip = dr("FechaIng").ToString
LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(3) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
LblRetIVA.Text = If(dr("RetIVA").ToString.ToDecimal > 0, TmpDT.MAX("RetIVAPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetISR.Text = If(dr("RetISR").ToString.ToDecimal > 0, TmpDT.MAX("RetISRPorcentaje").ToDecimal * 100, 0).ToString.FormatoNumero(4) '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
If dr("TipoFactura").ToString <> "CFDi" Then LblTipoFact.Text = dr("TipoFactura").ToString : divTipoFactura.Visible = True
ViewState("CveFactura") = dr("CveFactura").ToString.ToEntero
ViewState("IdPoliza") = dr("IdPoliza").ToString.ToEntero
@@ -4111,7 +4101,6 @@ Partial Class Compras_Compras
Alert("Falta asignar Proyecto a la compra", TipoMensaje.MsgAdvertencia)
End If
If Not ValidaVinculacionNotaFactura() Then
Alert("Se requiere que la nota este aplciada a las facturas", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -4530,6 +4519,13 @@ Partial Class Compras_Compras
UM.Dispose()
PSS.Dispose()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoCompra.SelectedValue = "12" Then 'cuando es garantía, debe de especificar la salida de almacen
If Not GvInv.HeaderRow.FCCheckBox("cbAll").Checked OrElse GvInv.HeaderRow.FCDropDownList("ddlAlmacen").SelectedValue.ToEntero <= 0 Then
Alert("No ha especificado la salida de almacen en la garantía.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
'VALIDA IMPORTES
If Not ValidaTotalesGuardar() Then
Exit Sub
@@ -4551,9 +4547,9 @@ Partial Class Compras_Compras
Exit Sub
End If
If DdlFolioGarantia.Visible AndAlso DdlFolioGarantia.SelectedValue <> "-1" Then
If Not ValidaFolioGarantia() Then Exit Sub
End If
'If DdlFolioGarantia.Visible AndAlso DdlFolioGarantia.SelectedValue <> "-1" Then
' If Not ValidaFolioGarantia() Then Exit Sub
'End If
'------------------TERMINA VALIDACIONES------------------
@@ -5462,10 +5458,12 @@ Partial Class Compras_Compras
Dim ListAlmacenes = (From CveAlmacen In DtInv.AsEnumerable() Where CveAlmacen.Field(Of Integer)("CveAlmacen") > 0 Select CveAlmacen.Field(Of Integer)("CveAlmacen")).Distinct().ToList
Dim indice = 0
Dim ImporteConcepto As Decimal = 0
Dim tCveFolioGarantia As Integer = -1
Dim CveConceptoMovimiento As Integer = 2
'apoyo logistico/garantia
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso DdlTipoCompra.SelectedValue = "12" Then
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") AndAlso DdlTipoCompra.SelectedValue = "12" Then 'garantía
CveConceptoMovimiento = 13
tCveFolioGarantia = DdlFolioGarantia.SelectedValue.ToEntero
End If
If (DdlTipoComprobante.SelectedValue = "Fac" AndAlso CveCompraRefacturacion <= 0) OrElse CveConceptoMovimiento = 13 Then
@@ -5478,7 +5476,7 @@ Partial Class Compras_Compras
Dim fecha As Date = TxtFecha.Text.ToDate
If Not UsuarioActual.Empresa.UsaAC Then fecha = Now
CveMovimientoInventario = ObjInventario.AddMovimiento(tCveAlmacen, CveConceptoMovimiento, 1, fecha, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), Modulo:="Comp/G2")
CveMovimientoInventario = ObjInventario.AddMovimiento(tCveAlmacen, CveConceptoMovimiento, 1, fecha, 0, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompra, -1, -1, -1, TipoCambio:=If(DdlMoneda.SelectedValue.ToEntero = 1, -1, TipoCambioGuardar), CveFolioGarantia:=tCveFolioGarantia, Modulo:="Comp/G2")
If CveMovimientoInventario <= 0 Then
ErrorMovInv = True
@@ -10563,7 +10561,7 @@ Partial Class Compras_Compras
TxtPrecio.Attributes.Add("onKeyUp ", "Recalcula();")
TxtCantidad.Attributes.Add("onKeyUp ", "Recalcula();")
TxtDescuentoModal.Attributes.Add("onKeyUp ", "Recalcula();")
TxtOtrosGastos.Attributes.Add("onKeyUp ", "Recalcula();")
'ImgAmort.Attributes.Add("onclick", "javascript:$('#DivDescP').show(1000); PosicionaObjeto(this.id,'DivDescP');") ' $get('LblTitulo1').style.display = 'none'; $get('LblTituloTipo1').style.display = 'none'; $get('LblTituloTipo2').style.display = ''; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = ''; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = 'none';")
'If um.GetUnidadesMedida() Then
@@ -13500,18 +13498,6 @@ Partial Class Compras_Compras
Dim IdPolizaAnterior = -1
Dim TotalRefact As Decimal = 0
'SI NO TIENE POLIZA NI PAGOS NO HACE NADA
'If ObjCompra.GetCompras(CveCompraRefacturacion, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
' If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count = 1 Then
' Dim drc As DataRow = ObjCompra.DtResultados.Rows(0)
' TotalRefact = drc("Total").ToString.ToDecimal
' If drc("IdPoliza").ToString.ToEntero <= 0 AndAlso drc("Saldo").ToString.ToDecimal = drc("Total").ToString.ToDecimal AndAlso drc("CveMovimiento").ToString.ToEntero <= 0 Then
' Alert("La factura a refacturar no esta contabilizada ni tiene pagos ni movimientos de almacen. No se puede refacturar, debera eliminar la factura anterior y agregar esta factura de forma normal.", TipoMensaje.MsgAdvertencia)
' Return True
' End If
' End If
'End If
'GUARDA ADJUNTOS Y LIGA EN BITACORA (RELACION DE FACTURA NUEVA Y VIEJA)
ErrorBitacora = GuardaRefacturacionBitacora(ObjCompra, ObjEventos)
@@ -16300,8 +16286,8 @@ Partial Class Compras_Compras
UpAnticipos.Update()
End If
LblRetIVA.Text = TmpDT.MAX("RetIVAPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionIVA / SubTotal2), 0) * 100).FormatoNumero(3) + "%"
LblRetISR.Text = TmpDT.MAX("RetISRPorcentaje").ToString '(If(SubTotal2 > 0, (RetencionISR / SubTotal2), 0) * 100).FormatoNumero(3)
LblRetIVA.Text = If(TxtRetIVA.Text.ToDecimal > 0, (TmpDT.MAX("RetIVAPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
LblRetISR.Text = If(TxtRetISR.Text.ToDecimal > 0, (TmpDT.MAX("RetISRPorcentaje").ToDecimal() * 100).FormatoNumero(4), "")
'IMPORTES DE RESTRICCION
TxtDocumentoImporteFE.Text = Total.ToString.FormatoNumero(2)
@@ -16583,7 +16569,6 @@ Partial Class Compras_Compras
TxtRetISRModal.Text = ""
TxtIEPSModal.Text = ""
TxtDescuentoModal.Text = ""
TxtOtrosGastos.Text = ""
DivAddProductoAliasPS.Visible = False
@@ -16656,12 +16641,7 @@ Partial Class Compras_Compras
DdlProyecto.SelectedValueExist("-1")
End If
CargaSubProyecto()
'DdlProyecto.SelectedValueExist(GvRow.DataKey("CveProyecto"))
DdlSubProyecto.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DdlSubProyecto_SelectedIndexChanged(Nothing, Nothing)
@@ -16676,7 +16656,6 @@ Partial Class Compras_Compras
If PS("IVA").ToString.ToEntero() <> -1 Then
' DdlIVA.Enabled = False
Else
'DdlIVA.Enabled = If(CveCompra > 0 Or CveFactura > 0 Or OCVinculada, False, True)
End If
End If
@@ -16703,12 +16682,8 @@ Partial Class Compras_Compras
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
'TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0)
'TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0)
TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6)
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6)
TxtOtrosGastos.Text = GvRow.DataKey("OtrosGastos").FormatoNumero
TxtPrecio.Text = GvRow.DataKey("PU").ToDecimal.ToString("#,##0.00####")
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").ToDecimal.ToString("#,##0.00####")
LblTotalPS.Text = GvRow.DataKey("Total").FormatoNumero
'FUNCIONALIDAD DE SEGUIR AGREGANDO (NO CERRAR MODAL)
@@ -17002,7 +16977,7 @@ Partial Class Compras_Compras
End Select
Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal + TxtOtrosGastos.Text.ToDecimal
Dim Total As Decimal = (TxtCantidad.Text.ToDecimal * TxtPrecio.Text.ToDecimal) - TxtDescuentoModal.Text.ToDecimal
If UsuarioActual.Empresa.Funcionalidad(532) = "1" Then
Dim ObjCon As New ClsContratos
@@ -17129,7 +17104,7 @@ Partial Class Compras_Compras
End If
AddPS(TxtCantidad.Text.Trim.ToDecimal, ddlUM.SelectedValue.ToEntero, ddlUM.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacion.SelectedItem.Text, DdlPS.SelectedValue.ToEntero, DdlPS.SelectedText, HdnTipoPS.Value.ToEntero,
DdlSubProyecto.SelectedValue.ToString, DdlSubProyecto.SelectedItem.Text, DdlProyecto.SelectedItem.Text, DdlProyecto.SelectedValue.ToString, TxtObsPS.Text.Trim, TxtPrecio.Text.Trim.ToDecimal, Total, IVA,
TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=TxtOtrosGastos.Text.ToDecimal, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
TxtRetIVAModal.Text.ToDecimal / 100, TxtRetISRModal.Text.ToDecimal / 100, TxtIEPSModal.Text.ToDecimal / 100, 0, TxtDescuentoModal.Text.ToDecimal, OtrosGastos:=0, CveTipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, TipoGasto:=DdlTipoGasto.SelectedItem.Text,
NoDeducible:=ChkEsNoDeduciblePS.Checked, CveSATPS:=SATClavePS, CveContratoDetalle:=CveContratoDetalle,
CveCultivoCuadroDetalle:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1), TemporadaCuadro:=If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, ""))
@@ -17232,6 +17207,9 @@ Partial Class Compras_Compras
If DrPS IsNot Nothing Then
Row("PSCodigo") = If(PSCodigo = "", DrPS("PSCodigo").ToString, PSCodigo)
Row("CveMetodoInventario") = DrPS("Inv_CveMetodoInventario").ToString.ToEntero
If DdlTipoCompra.SelectedValue = "12" AndAlso DrPS("AplicaSerie").ToString = "True" Then
Row("CveMetodoInventario") = "1"
End If
Else
Row("PSCodigo") = PSCodigo
Row("CveMetodoInventario") = 0
@@ -17278,8 +17256,6 @@ Partial Class Compras_Compras
End Try
Dim DecimalesPermitidos = 6
Row("CveConcepto") = TmpDT.Rows.Count + 1
@@ -17323,8 +17299,6 @@ Partial Class Compras_Compras
Row("IVAPorcentaje") = PorcentajeIVA
End If
Row("RetIVA") = Math.Round(RetIVA, DecimalesPermitidos)
Row("RetIVAPorcentaje") = PorcentajeRetIVA
Row("RetISR") = Math.Round(RetISR, DecimalesPermitidos)
@@ -17441,8 +17415,7 @@ Partial Class Compras_Compras
Dim Cantidad = DrPS("Cantidad").ToString.ToDouble
Dim PU = DrPS("PU").ToString.ToDouble
Dim Descuento = DrPS("Descuento").ToString.ToDouble
Dim OtrosGastos = DrPS("OtrosGastos").ToString.ToDouble
Dim Total = (Cantidad * PU) - Descuento + OtrosGastos
Dim Total = (Cantidad * PU) - Descuento
DrPS("NoDeducible") = ChkEsNoDeduciblePS.Checked
Dim ActualizarIva As Boolean = False
@@ -17450,25 +17423,20 @@ Partial Class Compras_Compras
ActualizarIva = True
End If
If Cantidad <> TxtCantidad.Text.Trim.ToDouble OrElse PU <> TxtPrecio.Text.Trim.ToDouble OrElse Descuento <> TxtDescuentoModal.Text.ToDouble OrElse OtrosGastos <> TxtOtrosGastos.Text.ToDouble Then
If Cantidad <> TxtCantidad.Text.Trim.ToDouble OrElse PU <> TxtPrecio.Text.Trim.ToDouble OrElse Descuento <> TxtDescuentoModal.Text.ToDouble Then
Cantidad = TxtCantidad.Text.Trim.ToDouble
PU = TxtPrecio.Text.Trim.ToDouble
Descuento = TxtDescuentoModal.Text.ToDouble
OtrosGastos = TxtOtrosGastos.Text.ToDouble
Total = (Cantidad * PU) - Descuento + OtrosGastos
Total = (Cantidad * PU) - Descuento
DrPS("Cantidad") = Cantidad
DrPS("PU") = PU
DrPS("Descuento") = Descuento
DrPS("OtrosGastos") = OtrosGastos
DrPS("OtrosGastos") = 0
DrPS("Total") = Total
AplicaCalculaTotales = True
End If
'PS - CLASIFICACION
If DdlPS.SelectedValue.ToEntero > 0 Then
@@ -17547,10 +17515,6 @@ Partial Class Compras_Compras
DrPS("CveCultivoCuadroDetalle") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedValue.ToEntero, -1)
DrPS("TemporadaCuadro") = If(DdlCultivosCuadro.SelectedValue.ToEntero > 0, DdlCultivosCuadro.SelectedItem.Text, "")
'Esta parte es para validar cuando la factura tenga ieps en o se asignara el ieps como una partida ya no se considere
If (CveFactura > 0 Or CveCompra > 0) And TxtIEPS.Text.ToDecimal = 0 Then
DrPS("IEPSPS") = 0
@@ -19517,6 +19481,17 @@ Partial Class Compras_Compras
Protected Sub DdlTipoCompra_SelectedIndexChanged(sender As Object, e As EventArgs)
If DdlTipoCompra.SelectedValue.ToEntero.Contiene(9, 10, 12) Then 'Al seleccionar apoyo logístico se cargan los amancenes de devoculcion proveedor para dar entrada
If DdlTipoCompra.SelectedValue = "12" AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then 'cuando es emp acumuladora
divFolioGarantia.Visible = True
Using objAcum As New ClsAcumuladores
If objAcum.FoliosGarantiaGet(-1, UsuarioActual.Empresa.CveEmpresa, Estatus:=2, TipoFolio:="-1", Area:=-1, CveSubProyecto:=-1) Then
DdlFolioGarantia.DataSource = objAcum.DtResultados.FiltraParametros("", "FechaIng DESC")
DdlFolioGarantia.DataBind()
End If
End Using
End If
'cambia si hay ps con uso de serie
For Each dr As DataRow In TmpDT.Rows
dr("CveMetodoInventario") = 1
@@ -19547,6 +19522,8 @@ Partial Class Compras_Compras
Dim ExistenciasPSGarantia As New Dictionary(Of Integer, Decimal)
Dim PSFaltantes As New Dictionary(Of Integer, Decimal)
Dim DtGarantia As New DataTable
TxtDescripcion.Text = DdlFolioGarantia.SelectedItem.Text
UpParametros.Update()
'Agrupa los CvePS iguales y suma sus cantidades
For Each row In TmpDT.AsEnumerable()
@@ -19564,7 +19541,7 @@ Partial Class Compras_Compras
DtGarantia = ObjAcum.DtResultados
ExistenciasPSGarantia = DtGarantia.AsEnumerable().ToDictionary(Function(row) row.Field(Of Integer)("CvePS"), Function(row) row.Field(Of Decimal)("CantidadDisponible"))
Else
Alert($"Ocurrió un error al obtener la información de la garantía.</br> CveUsuario={UsuarioActual.CveUsuario}</br> CveFolioGarantia={DdlFolioGarantia.SelectedValue}", TipoMensaje.MsgError)
Alert($"Ocurrió un error al obtener la información de la garantía.</br> CveU={UsuarioActual.CveUsuario}</br> CveFG={DdlFolioGarantia.SelectedValue}", TipoMensaje.MsgError)
Return False
End If
End Using
@@ -19587,13 +19564,34 @@ Partial Class Compras_Compras
Select New With {.CvePS = Producto.Key, .NombrePS = row.Field(Of String)("PS"), .CantidadFaltante = Producto.Value}
If PSFaltantes.Count > 0 Then
Dim mensaje As String = "Los siguientes productos no tienen suficientes existencias en la garantía seleccionada:</br></br>"
Dim mensaje As String = "Los siguientes productos no fueron registrados en la garantía seleccionada:</br></br>"
For Each Producto In IEnumPSFaltantes
mensaje += $"Falta: &times;&hairsp;<b>{Producto.CantidadFaltante:0.##}</b>&emsp;{Producto.NombrePS}</br>"
Next
'eliminar los registros
Dim tImporteAjuste As Decimal = 0
Dim PSS = (From c In IEnumPSFaltantes Select c.CvePS).Distinct.ToList
For Each Producto In PSS
Dim drr As DataRow() = TmpDT.Select($"CvePS = {Producto}")
For Each drt As DataRow In drr
If TmpDT.Rows.Count > 1 Then 'valida que exista cuando menos un registro
tImporteAjuste += drt("Total").ToString.ToDecimal
TmpDT.Rows.Remove(drt)
End If
Next
TmpDT.AcceptChanges()
Next
If tImporteAjuste > 0 Then AjustaImporteUltimoConcepto(tImporteAjuste)
GvPS.DataSource = TmpDT
GvPS.DataBind()
CalculaTotales(True)
CargaGvInv()
If MsgExito Then Alert(mensaje, TipoMensaje.MsgAdvertencia) Else Alert(mensaje, TipoMensaje.MsgError)
Else
If MsgExito Then Alert("Todos los productos seleccionados están disponibles en el Folio de Garantía.")
If MsgExito Then Alert("Todos los productos seleccionados están registrados en el Folio de Garantía.")
Return True
End If
Else
@@ -20251,10 +20249,8 @@ Partial Class Compras_Compras
End If
End If
End Sub
Protected Sub BtnFolioGarantiaRestantes_Click(sender As Object, e As EventArgs)
Using ObjAcum As New ClsAcumuladores
@@ -20339,8 +20335,6 @@ Partial Class Compras_Compras
ErrorCompra = True
Exit For
End If
Next
End If
@@ -20351,36 +20345,20 @@ Partial Class Compras_Compras
Dim SBEliminacionCompra As New StringBuilder
SBEliminacionCompra.Append($"Serie-Folio: {TxtSerie.Text}-{TxtFolio.Text}, Proveedor: {HplProveedor.Text}, Descripción: {TxtDescripcion.Text}, SubTotal: {TxtSubTotal2.Text}, ")
If TxtIVA.Text.Trim.ToDecimal > 0 Then
SBEliminacionCompra.Append($"IVA: { TxtIVA.Text},")
End If
If TxtIVA.Text.Trim.ToDecimal > 0 Then SBEliminacionCompra.Append($"IVA: { TxtIVA.Text},")
If TxtRetISR.Text.Trim.ToDecimal > 0 Then SBEliminacionCompra.Append($"Ret. ISR: { TxtRetISR.Text}, ")
If TxtRetISR.Text.Trim.ToDecimal > 0 Then
SBEliminacionCompra.Append($"Ret. ISR: { TxtRetISR.Text}, ")
End If
If TxtRetIVA.Text.Trim.ToDecimal > 0 Then
SBEliminacionCompra.Append($"Ret. IVA: { TxtRetIVA.Text}, ")
End If
If TxtIEPS.Text.Trim.ToDecimal > 0 Then
SBEliminacionCompra.Append($"IEPS: { TxtIEPS.Text}, ")
End If
If TxtRetIVA.Text.Trim.ToDecimal > 0 Then SBEliminacionCompra.Append($"Ret. IVA: { TxtRetIVA.Text}, ")
If TxtIEPS.Text.Trim.ToDecimal > 0 Then SBEliminacionCompra.Append($"IEPS: { TxtIEPS.Text}, ")
SBEliminacionCompra.Append($"Total: {TxtTotal.Text}, ")
SBEliminacionCompra.Append($"Moneda: {DdlMoneda.SelectedItem.Text}, ")
If TxtOC.Text.Trim.Length > 0 Then
SBEliminacionCompra.Append($"OC: {TxtOC.Text }, ")
End If
If TxtOC.Text.Trim.Length > 0 Then SBEliminacionCompra.Append($"OC: {TxtOC.Text }, ")
SBEliminacionCompra.Append($"Fecha {TxtFecha.Text}, ")
SBEliminacionCompra.Append($"Capturó: {LblUsuarioCaptura.Text}, ")
@@ -20394,7 +20372,6 @@ Partial Class Compras_Compras
If Not ObjGral.AddHistorialBitacora(Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, CveCompra, Nothing, "", "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 1,
TxtModalEliminarCompraDescripcion.Text, "Compras", SBEliminacionCompra.ToString) Then
ErrorCompra = True
End If
If Not ErrorCompra Then

View File

@@ -13,7 +13,6 @@ Imports Stimulsoft.Report.Web
Partial Class PopUpVerFactura
Inherits ClsPaginas
Private Shared missing As Object = System.Reflection.Missing.Value
#Region " PROPIEDADES "
Public Property DtMovimientos() As DataTable
@@ -6818,6 +6817,7 @@ Partial Class PopUpVerFactura
Dim DtDetalle As New DataTable
Dim CveTipoPolizaImp As Integer
Dim FolioPoliza As String
Dim Fecha As Date
Dim ConceptoPolizaImp As String
Dim CveMonedaImp As Integer
Dim TipoPolImp As String
@@ -6828,6 +6828,7 @@ Partial Class PopUpVerFactura
CveTipoPolizaImp = drp("CveTipoPoliza").ToString.ToEntero
ConceptoPolizaImp = drp("Concepto").ToString
FolioPoliza = drp("FolioPoliza").ToString
Fecha = drp("Fecha").ToString.ToDate
CveMonedaImp = drp("CveMoneda").ToString.ToEntero
Dim TipoPolizaString As String = If(CveTipoPolizaImp = 1, "I", If(CveTipoPolizaImp = 2, "E", "D")).ToString
@@ -6856,35 +6857,37 @@ Partial Class PopUpVerFactura
ObjConta.Dispose()
Else
RutaReporte = RutaFormatoReporte("Polizas.rdlc")
'If ObjConta.GetPrePolizasImpresion(UsuarioActual.CveEmpresa, Fecha, Fecha, CVePrePoliza:=CvePrePoliza) Then
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow
'DtDetalle = ObjConta.DtResultados
'Dim dr As DataRow
DtDetalle = ObjConta.DtResultados.FiltraParametros("Contabilizable = 1", "Orden")
dr = DtDetalle.Rows(0)
'dr = DtDetalle.Rows(0)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString))
params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString))
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
params.Add(New ReportParameter("TipoPoliza", TipoPolImp))
params.Add(New ReportParameter("Finicio", Fecha.ToShortDateString))
params.Add(New ReportParameter("FFin", Fecha.ToShortDateString))
params.Add(New ReportParameter("Numero", FolioPoliza))
params.Add(New ReportParameter("Moneda", If(CveMonedaImp = 2, "Dolar", "Peso Mexicano")))
params.Add(New ReportParameter("CodigoPostal", ""))
If UsuarioActual.CveEmpresa.Contiene(141) Then
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToString("dd/MM/yyyy hh:mm:ss")))
params.Add(New ReportParameter("Fecha", Fecha.ToString("dd/MM/yyyy hh:mm:ss")))
Else
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
params.Add(New ReportParameter("Fecha", Fecha.ToShortDateString))
End If
If UsuarioActual.CveEmpresa.Contiene(119, 141) Then
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(dr("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
params.Add(New ReportParameter("UsuarioRegistro", GlobalDTUsuarios(drp("CveUsuario").ToString.ToEntero).FiltroPrimeroValor("Nombre")))
End If
If UsuarioActual.CveEmpresa.Contiene(140, 141) Then
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
End If
End If
ObjConta.Dispose()
End If
End If
ImprimirPDF(RutaReporte, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF")
ImprimirPDF(RutaReporte, DtDetalle, params, $"P{TipoPolizaString}{FolioPoliza}", Formato:="PDF")
Else
Alert("El documento solicitado no existe, favor de revisar su búsqueda.", TipoMensaje.MsgAdvertencia)

View File

@@ -29,7 +29,8 @@ Partial Class Contabilidad_CatCuentas
If Not Page.IsPostBack Then
If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then
Server.Transfer("/Contabilidad2/CatCuentas.aspx")
Response.Redirect("/Contabilidad2/CatCuentas.aspx")
Exit Sub
End If
If UsuarioActual.Empresa.UsaContabilidad Then

View File

@@ -107,14 +107,11 @@
<tr>
<td align="left" style="width: 665px;">
<asp:UpdatePanel ID="UpPoliza" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row" runat="server" id="DivDatosPoliza">
<div class="col-md-8" style="margin-top: 20px;">
<div class="col-md-8" style="margin-top: 3px;">
<div class="portlet light bordered xspadding ">
<div class="portlet-title">
<div class="caption font-green">
@@ -127,13 +124,8 @@
</div>
</div>
<div class="portlet-body form">
<div class="row">
<div class="col-md-4">
<div class="form-group form-md-line-input input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control" Width="100px"></asp:TextBox>
@@ -147,9 +139,7 @@
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaPoliza" Width="350px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtFechaDocumento.ClientID.ToString()%>">Fecha:</label>
</div>
</div>
<div class="col-md-4">
@@ -168,16 +158,10 @@
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="LnkFolioManual" CssClass="blue" Visible="false"> <i class="fa fa-pencil" aria-hidden="true"></i></asp:LinkButton>
</span>
<label for="<%= TxtFolio.ClientID.ToString()%>">Folio: </label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
@@ -188,13 +172,10 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-4" style="margin-top: 20px;">
<div class="col-md-4" style="margin-top: 3px;">
<div class="portlet light bordered xspadding">
<div class="portlet-title">
<div class="caption font-green">
@@ -232,17 +213,13 @@
</div>
</div>
</div>
</div>
<div class="row" visible="false" runat="server" id="divContabilizada">
<label class="col-md-1">Contabilizada:</label>
<div class="col-md-2">
<asp:HyperLink ID="HplContabilizada" runat="server" Target="_blank">Si</asp:HyperLink>
</div>
</div>
<div class="row" visible="false" runat="server" id="DivTipoGasto">
<label class="col-md-1">Tipo Gasto:</label>
<div class="col-md-2">
@@ -258,11 +235,8 @@
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<div id="divMovtos" runat="server" visible="false" >
<div id="DivConceptoPrePoliza" >
<div id="DivConceptoPrePoliza" >
<div class="chequesie22">
<div class="row" id="DivAgregarConceptos" runat="server" >
<div class="col-md-12">
@@ -290,7 +264,6 @@
<ADS:Dropdownlost ID="DdlClientes" CssStyle="width: 100%;" CssClassDdl="select2me" runat="server" AppendDataBoundItems="true" DataTextField="NombreComercial" DataValueField="CveCliente" Width="160px" Visible="false" AutoPostBack="true"></ADS:Dropdownlost>
<asp:DropDownList ID="DdlVentas" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Folio" DataValueField="CveVenta" Width="160px" Visible="false"></asp:DropDownList>
<asp:Label ID="LblTC" runat="server" Text="TC" Visible="false"></asp:Label><asp:TextBox ID="TxtTCPreP" CssClass="form-control input-sm select2me" runat="server" Width="50px" Visible="false"></asp:TextBox>
</th>
<th>
<asp:DropDownList ID="DdlCuentaContable" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="160px">
@@ -526,8 +499,9 @@
<asp:TemplateField Visible="false">
<HeaderTemplate>TC</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}-${1}", Eval("TC", "{0:#.####}"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
<asp:Literal ID="LtlTC" runat="server" Text='<%# String.Format("{0}- ${1}", Eval("TC", "{0:#.####}"), Eval("ImporteME", "{0:N2}")) %>'></asp:Literal><br />
</ItemTemplate>
<ItemStyle Width="75px" />
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Cargo</HeaderTemplate>
@@ -555,17 +529,11 @@
<asp:LinkButton ID="LnkEdit" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
<asp:LinkButton ID="LnkEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>"
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
</ItemTemplate>
<ItemStyle Width="120px" />
</asp:TemplateField>
<asp:TemplateField >
<ItemTemplate>
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
</ItemTemplate>
<ItemStyle HorizontalAlign="Right" Width="5px" />
<ItemStyle Width="75px" />
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />

View File

@@ -475,7 +475,7 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaCuentasContables()
End If
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza)
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza, UsuarioActual.CveEmpresa)
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
If dr("Modulo").ToString.Contiene("Banc/FluctuaA", "Banc/FluctuaC", "Banc/FluctuaV", "Banc/FluctuaFilial", "Banc/FluctuaAD") Then
@@ -1181,7 +1181,6 @@ Partial Class ContabilidadC_RegPrePolizaS
Try
Dim Retorno As Boolean = ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario)
If Retorno Then
@@ -1846,8 +1845,6 @@ Partial Class ContabilidadC_RegPrePolizaS
GvPrePoliza.DataBind()
UpPrePoliza.Update()
GvPrePoliza.Visible = True
GvPrePoliza.Columns(11).Visible = True
GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
@@ -2770,7 +2767,7 @@ Partial Class ContabilidadC_RegPrePolizaS
CargaCuentasContables()
End If
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePolizaOrigen)
ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePolizaOrigen, UsuarioActual.CveEmpresa)
DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")

View File

@@ -85,10 +85,14 @@ public partial class Contabilidad_RepIVA : ClsPaginas
{
GvT.DataSource = ObjCont.DtResultados;
DtIVATrasladado = ObjCont.DtResultados;
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
GvIEPSA.DataSource = ObjCont.DtResultados;
DtIEPSA = ObjCont.DtResultados;
if (UsuarioActual.Empresa.Funcionalidad(713) == "1")
{
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 1, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
{
GvIEPSA.DataSource = ObjCont.DtResultados;
DtIEPSA = ObjCont.DtResultados;
}
}
if (ObjCont.GetRepIVAAcumulado(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), Conciliado, 2, DdlCuenta.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))

File diff suppressed because it is too large Load Diff

View File

@@ -1542,7 +1542,7 @@ Partial Class General_SaldosIniciales
End If
'Compra
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero(), SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDouble, FechaVencimiento,
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero(), SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDecimal, FechaVencimiento,
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal, TotalOriginal:=Total) Then
ErrorCompras = True
@@ -1605,6 +1605,15 @@ Partial Class General_SaldosIniciales
#Region "C L I E N T E S - F A C T U R A S"
Dim NoEncontrados As Integer = 0
Dim Encontrados As Integer = 0
Dim StrRFCNoencontrados As New StringBuilder
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("AplicaParaVenta = 1")
If drr Is Nothing Then
Alert("No existen productos para venta. favor de crear uno e intentar de nuevo", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim ObjVentas As New ClsVentas
Dim ObjConta As New ClsContabilidad(ObjVentas.IniciaTransacSQL())
Dim ObjIE As New ClsBancos(ObjVentas.IniciaTransacSQL())
@@ -1614,10 +1623,6 @@ Partial Class General_SaldosIniciales
'Dim ExisteVenta As Boolean = False
'Dim Contador As Integer = 0
DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1)
Dim NoEncontrados As Integer = 0
Dim Encontrados As Integer = 0
Dim StrRFCNoencontrados As New StringBuilder
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("AplicaParaVenta = 1")
Dim CvePS As Integer = drr("CvePS").ToString().ToEntero()
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero()
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
@@ -1712,7 +1717,7 @@ Partial Class General_SaldosIniciales
End If
CveVenta = ObjVentas.CveVenta
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA) Then
If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, 1, CveUnidadMedida, SubTotal, IVA, SubTotal * PorcentajeIVA, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=0) Then
ErrorVentas = True
Exit For
End If

View File

@@ -3128,13 +3128,11 @@ Partial Class Inventarios_EntregaAlmacen
cont += 1
Next
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, Serie, 68, Serie, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=CveSubProyecto, ImporteMX:=ValorMultiplicador * TotalCosto) Then
Dim tCveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto").ToEntero()
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ValorMultiplicador * TotalCosto, Serie, 68, Serie, Fecha, IdCtaContableAlmacen, -1, CveVenta:=CveVentaSurtir, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimiento, CveSubProyecto:=tCveSubProyectoAlmacen, ImporteMX:=ValorMultiplicador * TotalCosto) Then
ErrorMovInv = True
End If
If Not ErrorMovInv AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, -1) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
GuardaLogAD($"Inventario/EntregaAlmacen | Error{ObjConta.MensajePolizaDescuadre} Diferencia{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
@@ -3142,8 +3140,6 @@ Partial Class Inventarios_EntregaAlmacen
End If
End If
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If AutoConta And Not ErrorMovInv Then

View File

@@ -155,13 +155,13 @@
<div class="portlet-body">
<div class="row">
<div class="col-md-5">
<asp:Label runat="server" ID="LblSubProyecto" for="<%= DdlSubProyecto.ClientID.ToString()%>">SubProyecto:</asp:Label>
<asp:Label runat="server" ID="LblSubProyecto" for="<%= DdlSubProyecto.ClientID %>">SubProyecto:</asp:Label>
<asp:DropDownList ID="DdlSubProyecto" AutoPostBack="true" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Width="100%">
</asp:DropDownList>
</div>
<div class="col-md-5">
<label for="<%= DdlAlmacen.ClientID.ToString()%>">Almacen:</label>
<asp:Label runat="server" ID="LblAlmacen" for="<%= DdlAlmacen.ClientID %>">Almacen:</asp:Label>
<asp:DropDownList ID="DdlAlmacen" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Width="100%">
</asp:DropDownList>
</div>

View File

@@ -278,7 +278,10 @@
<asp:HyperLink ID="HypAsistencia" NavigateUrl="/RH/Asistencias.aspx" runat="server"><i class="fa fa-list" aria-hidden="true"></i>Ir a asistencia</asp:HyperLink>
</li>
<li>
<asp:LinkButton ID="LnkFormatoTabular" Visible="false" OnClick="LnkFormatoTabular_Click" CssClass="" runat="server"><i class="fa fa-download"></i> Nómina tabular</asp:LinkButton>
<asp:LinkButton ID="LnkFormatoTabular" Visible="false" OnClick="LnkFormatoTabular_Click" CssClass="" runat="server"><i class="fa fa-file-excel"></i> Nómina tabular</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkFormatoFiscal" Visible="false" OnClick="LnkFormatoFiscal_Click" CssClass="" runat="server"><i class="fa fa-file-excel"></i> Nómina Fiscal</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkSimulador" OnClick="LnkSimulador_Click" runat="server"><i class="fa fa-calculator"></i> Simulador</asp:LinkButton>
@@ -300,6 +303,7 @@
<Triggers>
<asp:PostBackTrigger ControlID="LnkListaRaya" />
<asp:PostBackTrigger ControlID="LnkFormatoTabular" />
<asp:PostBackTrigger ControlID="LnkFormatoFiscal" />
</Triggers>
</asp:UpdatePanel>

View File

@@ -259,7 +259,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
{
if (!IsPostBack)
{
{
enviarCorreoEnTimbrado = (UsuarioActual.CveEmpresa == 141 ? true : true);
LnkCargaNetos.Visible = (UsuarioActual.Empresa.Funcionalidad(267) == "1") || (UsuarioActual.CveRol == 1);
if (UsuarioActual.CveEmpresa == 141) { ddlfiniquito.SelectedValueExist("2"); }
@@ -567,6 +567,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
LnkAsistenciaIncidencias.Visible = true;
LnkFormatoTabular.Visible = true;
LnkFormatoFiscal.Visible = (UsuarioActual.CveEmpresa == 141 || UsuarioActual.CveRol == 1);
HypPDFSTimbrados.Visible = true;
if (objnom.GetNominaEmpleado(FiltCveProyecto, FiltCveSubProyecto, FiltCveTurno, FiltCvePeriodo, CveEmpresa, FiltAgrupador, DdlRegimenContratacion.SelectedValue.ToEntero(), CveTipoTrabajador: CveTipoTrabajador, Neto: ddlfiniquito.SelectedValue.ToEntero()) && objnom.DTSetResultados.Tables.Count > 4)
{
@@ -2837,7 +2838,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
using (ClsRH objpersonal = new ClsRH())
{
if (objpersonal.GetAsistencias(SRCvePersonal, -1, -1, -1, -1, -1,-1, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa))
if (objpersonal.GetAsistencias(SRCvePersonal, -1, -1, -1, -1, -1, -1, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.CveEmpresa))
{ GVAsistencia.DataSource = objpersonal.DtResultados.FiltraParametros("Fecha IS NOT NULL"); }
else
{
@@ -5040,6 +5041,274 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
}
protected void LnkFormatoFiscal_Click(object sender, EventArgs e)
{
DataTable dtnominas = null;
using (ClsNominas onom = new ClsNominas())
{
if (onom.GetNom_Nominas(-1, -1, CvePeriodoSeleccionado, -1, UsuarioActual.CveEmpresa))
{
dtnominas = onom.DtResultados;
}
}
try
{
ClosedXML.Excel.XLWorkbook wb = new ClosedXML.Excel.XLWorkbook();
var libro = wb.AddWorksheet("Nomina");
int column = 1;
int filainicio = 3;
libro.Cell(filainicio + 1, column).Value = " ";
libro.Cell(filainicio + 2, column).Value = "Codigo";
libro.Cell(filainicio + 3, column).Value = " ";
column++;
libro.Cell(filainicio + 1, column).Value = " ";
libro.Cell(filainicio + 2, column).Value = "Empleado";
libro.Cell(filainicio + 3, column).Value = " ";
column++;
libro.Cell(filainicio + 1, column).Value = " ";
libro.Cell(filainicio + 2, column).Value = "Folio Fiscal";
libro.Cell(filainicio + 3, column).Value = " ";
libro.Column(column).Width = 35;
libro.Cell(1, 1).Value = "Empresa";
libro.Range(1, 2, 1, 4).Merge().Value = UsuarioActual.Empresa.Empresa;
libro.Cell(2, 1).Value = "período";
string periodo = DdlPeriodo.SelectedItem.Text;
periodo = periodo.Substring(0, (periodo.Length > 27 ? 27 : periodo.Length));
libro.Range(2, 2, 2, 4).Merge().Value = periodo;
int iniciotipe = column;
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 ").Rows)
{
column++;
libro.Cell(filainicio + 2, column).Value = row["Concepto"].ToString();
libro.Cell(filainicio + 3, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
{
libro.Column(column).Hide();
}
}
column++;
libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Percepciones";
libro.Column(column).Width = 15;
if (iniciotipe < column)
{
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Percepciones";
}
iniciotipe = column;
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 ").Rows)
{
column++;
libro.Cell(filainicio + 2, column).Value = row["Concepto"].ToString();
libro.Cell(filainicio + 3, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
{
libro.Column(column).Hide();
}
}
column++;
libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Deducciones";
libro.Column(column).Width = 15;
if (iniciotipe < column)
{
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Deducciones";
}
column++;
libro.Cell(filainicio + 1, column).Value = " ";
libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Total";
libro.Column(column).Width = 15;
iniciotipe = column;
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' AND EsPadre = 1 ").Rows)
{
column++;
libro.Cell(filainicio + 2, column).Value = row["Concepto"].ToString();
libro.Cell(filainicio + 3, column).Value = row["Codigo"].ToString();
libro.Column(column).Width = 15;
if ((dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
{
libro.Column(column).Hide();
}
}
column++;
libro.Range(filainicio + 2, column, filainicio + 3, column).Merge().Value = "Obligaciones";
libro.Column(column).Width = 15;
if (iniciotipe < column)
{
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Style.Alignment.Horizontal = ClosedXML.Excel.XLAlignmentHorizontalValues.Center;
libro.Range(filainicio + 1, iniciotipe + 1, filainicio + 1, column).Merge().Value = "Obligaciones";
}
//libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
//libro.Row(2).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
//libro.Row(3).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
//libro.Row(1).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199));
//libro.Row(2).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
//libro.Row(3).Cell(1).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
//libro.Row(3).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
int maxnocolumn = column;
int Fila = filainicio + 3;
int cveSupProyecto = -5;
string subproyecto = "";
int oldcveSupProyecto = -5;
bool newsubproyecto = false;
bool newsubproyectoTitulo = false;
DataTable dtsr = dtempleados.FiltraParametros("", "CveSubProyecto");
dtsr.Rows.Add(dtsr.NewRow());
foreach (DataRow erow in dtsr.Rows)
{
Fila++;
newsubproyecto = false; newsubproyectoTitulo = false;
if (cveSupProyecto != erow["CveSubProyecto"].ToString().ToEntero())
{
if (oldcveSupProyecto != -5) { Fila += 2; newsubproyecto = true; }
oldcveSupProyecto = cveSupProyecto;
cveSupProyecto = erow["CveSubProyecto"].ToString().ToEntero();
subproyecto = erow["SubProyecto"].ToString();
if (cveSupProyecto != -5 && oldcveSupProyecto != -5) { Fila++; newsubproyectoTitulo = true; }
}
column = 1;
libro.Cell(Fila, column).Value = string.Format("'{0}", erow["Codigo"]);
column++;
if (newsubproyectoTitulo)
{
libro.Cell(Fila - 1, column).Value = subproyecto;
libro.Range(Fila - 1, 1, Fila - 1, maxnocolumn).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(155, 194, 230));
}
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = "Total";
libro.Range(Fila - 3, 1, Fila - 3, maxnocolumn).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(155, 194, 230));
}
libro.Cell(Fila, column).Value = erow["Nombre"];
column++;
if (dtnominas != null)
{
DataRow drw = dtnominas.FiltroPrimero(string.Format("CvePersonal = {0}", erow["CvePersonal"].ToString().ToEntero()));
if (drw != null)
{
libro.Cell(Fila, column).Value = drw["FolioFiscal"];
}
}
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'P' AND EsPadre = 1 ").Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
}
}
column++;
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166));
libro.Cell(Fila, column).Value = erow["SumaPercepciones"];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaPercepciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
}
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'D' AND EsPadre = 1 ").Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
}
}
column++;
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166));
libro.Cell(Fila, column).Value = erow["SumaDeducciones"];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaDeducciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
}
column++;
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166));
libro.Cell(Fila, column).Value = erow["Total"];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("Total", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
}
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' AND EsPadre = 1 ").Rows)
{
column++;
string Concepto = string.Format("V_{0}", row["CveConcepto"]);
libro.Cell(Fila, column).Value = erow[Concepto];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM(Concepto, string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
}
}
column++;
libro.Cell(Fila, column).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(166, 166, 166));
libro.Cell(Fila, column).Value = erow["SumaObligaciones"];
if (newsubproyecto)
{
libro.Cell(Fila - 3, column).Value = dtempleados.SUM("SumaObligaciones", string.Format("CveSubProyecto ={0} AND CvePersonal > 0 ", oldcveSupProyecto));
}
}
libro.Range(filainicio + 1, 1, filainicio + 4, maxnocolumn).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
libro.Range(filainicio + 1, 1, filainicio + 4, maxnocolumn).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(79, 129, 189));
System.IO.Stream fs = new System.IO.MemoryStream();
wb.SaveAs(fs);
fs.Position = 0;
System.IO.MemoryStream memoryStream = new System.IO.MemoryStream();
using (System.IO.Stream input = fs)
{
input.CopyTo(memoryStream);
}
memoryStream.Position = 0;
Response.Clear();
Response.Buffer = true;
Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
Response.AddHeader("content-disposition", string.Format("attachment;filename={0} {1}.xlsx", "Nomina Fiscal", periodo));
Response.BinaryWrite(memoryStream.ToArray());
Response.End();
}
catch (Exception ex)
{
Alert("Ocurrio un error al generar el Formato de nominas" + ex.ToString());
}
}
protected void LnkConceptoD_Click(object sender, EventArgs e)
{
@@ -6843,7 +7112,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
bool continuar = true;
int chkImporte = 1;
int chkImporteGravado = 1;
int chkImporteGravado = 0;
int chkImporteValor = 1;
string[] getcolumnas = new string[] { "CvePersonal", "Nombre", "CveMetodoPago", "SumaPercepciones", "Total", "SalarioDiario", "SalarioDiarioIMSS", "SalarioDiarioIntegrado", "DiasLaborados", "DiasFaltados", "DiasVacaciones", "DiasIncapacidad" };
@@ -7006,7 +7275,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
RegistraScript("$('#DModalCargaASistenciaMasiva').modal();");
}
@@ -7111,7 +7380,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
using (ClsRH objpersonal = new ClsRH())
{
if (objpersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1,-1, fecha, fecha, UsuarioActual.CveEmpresa))
if (objpersonal.GetAsistencias(CvePersonal, -1, -1, -1, -1, -1, -1, fecha, fecha, UsuarioActual.CveEmpresa))
{
if (objpersonal.DtResultados.Rows.Count > 0)
{

View File

@@ -49,6 +49,7 @@ Partial Class Nomina_ReportePTU
DdlEjercicios.DataBind()
If (DdlEjercicios.Items.Count > 0) Then
DdlEjercicios.SelectedIndex = 0
DdlEjercicios.SelectedValueExist(DateTime.Now.Year.ToString())
DdlEjercicios_SelectedIndexChanged(Nothing, Nothing)
End If
End If
@@ -71,7 +72,7 @@ Partial Class Nomina_ReportePTU
Private Sub CargaPeriodos()
Dim ObjPeriodos As New ClsNominas()
If ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, DdlEjercicios.SelectedValue.ToEntero(), -1, -1) Then
If ObjPeriodos.GetPeriodos(-1, UsuarioActual.CveEmpresa, -1, -1, -1) Then
dtPeriodos = ObjPeriodos.DtResultados.FiltraParametros("Estatus IN (0,1)")
End If
ObjPeriodos.Dispose()

View File

@@ -54,7 +54,7 @@
<div class="col-md-12">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
DataKeyNames="CveSubProyecto,SubProyecto,IdSegNeg,Estatus,Serie,IVA,Calle,NoExt,NoInt,Colonia,Localidad,Municipio,Estado,Pais,CP,CveProyecto,TipoSucursal,EsSucursal,
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal,CveLocalidad"
CvePais,CveEstado,CveMunicipio,CveColonia,AplicaComercioExterior,CvePrecioLista,Correo,Telefono,UTCOffsetVerano,UTCOffsetInvierno,NoVerificaAlmacen,CodigoSucursal,CveLocalidad,DeshabilitaAutorizacion"
EmptyDataText="No se encontraron SubProyectos" ShowHeader="true" CssClass="table table-striped table-advance table-hover ScrollAD mysmallbtn" data-sort="true" GridLines="None">
<Columns>
<asp:BoundField DataField="SubProyecto" HeaderText="Centro de costo" />
@@ -220,6 +220,14 @@
</div>
</div>
</div>
<div class="row" id="DivDeshabilitaAutorizaciones" runat="server" visible="false">
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<asp:CheckBox ID="ChkDeshabilitaAutorizaciones" runat="server" CssClass="form-control" Checked="false" />
<label for="<%= ChkDeshabilitaAutorizaciones.ClientID.ToString()%>">Deshabilita autorizaciones para público general</label>
</div>
</div>
</div>
</ContentTemplate>
</ajax:TabPanel>

View File

@@ -66,6 +66,10 @@ Partial Class CatSubProyectos
DivCodigoSucursal.Visible = True
End If
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
DivDeshabilitaAutorizaciones.Visible = True
End If
CargaProyecto()
CargaSegmentosNegocio()
@@ -314,6 +318,7 @@ Partial Class CatSubProyectos
'AplicaComercio()
ChkNoVerificaAlmacen.Checked = If(GvRow.DataKey("NoVerificaAlmacen").ToString = "True", True, False)
TxtCodigoSucursal.Text = (GvRow.DataKey("CodigoSucursal"))
ChkDeshabilitaAutorizaciones.Checked = CBool(GvRow.DataKey("DeshabilitaAutorizacion"))
BtnGuardar.Text = "Actualizar"
CargaRequired()
@@ -423,7 +428,7 @@ Partial Class CatSubProyectos
If Not ObjSubproyectos.AddCentroCosto(TxtCentroCosto.Text.Trim, IdSeg, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=StrLocalidad, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then
Telefono:=TxtTelefono.Text, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, DeshabilitaAutorizacion:=ChkDeshabilitaAutorizaciones.Checked) Then
TieneError = True
Else
CveSubProyecto = ObjSubproyectos.CveSubProyecto
@@ -433,7 +438,7 @@ Partial Class CatSubProyectos
If Not ObjSubproyectos.UpdateCentroCosto(CveCentroCosto, TxtCentroCosto.Text.Trim, IdSeg, If(ChkEstatus.Checked = True, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero, Serie:=TxtSerie.Text.Trim, IVA:=TxtIVA.Text.ToDecimal, Calle:=TxtCalle.Text.Trim, NoExt:=TxtNoExt.Text.Trim,
NoInt:=TxtNoInt.Text.Trim, Colonia:=StrColonia, Localidad:=TxtLocalidad.Text.Trim, Municipio:=StrMunicipio, Estado:=StrEstado, Pais:=StrPais, CP:=TxtCP.Text.Trim, TipoSucursal:=TipoSucursal, EsSucursal:=EsSucursal,
CvePais:=DdlPais.SelectedValue.ToEntero, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero, AplicaComercioExterior:=ChkAplicaComercioExterior.Checked, Correo:=TxtCorreo.Text, CvePrecioLista:=DdlPrecioLista.SelectedValue.ToEntero,
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero) Then
Telefono:=TxtTelefono.Text, HorarioVerano:=TxtHorarioVerano.Text.ToEntero, HorarioInvierno:=TxtHorarioInvierno.Text.ToEntero, NoVerificaAlmacen:=ChkNoVerificaAlmacen.Checked, CodigoSucursal:=TxtCodigoSucursal.Text.Trim, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, DeshabilitaAutorizacion:=ChkDeshabilitaAutorizaciones.Checked) Then
TieneError = True
End If
Else
@@ -448,9 +453,9 @@ Partial Class CatSubProyectos
If Not TieneError Then
ObjSubproyectos.Commit()
If HdnModalidad.Value = "I" Then
Alert("La nueva Sucursal se guardó correctamente.", TipoMensaje.MsgInformacion)
Alert("La nueva sucursal se guardó correctamente.", TipoMensaje.MsgInformacion)
Else
Alert("La Sucursal se actualizo correctamente.", TipoMensaje.MsgInformacion)
Alert("La sucursal se actualizo correctamente.", TipoMensaje.MsgInformacion)
End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarCentroCosto"))

View File

@@ -164,7 +164,7 @@
<tr>
<td>Régimen:</td>
<td>
<asp:DropDownList ID="DdlRegimen" runat="server" DataValueField="CveRegimenFiscal" DataTextField="RegimenFiscal" CssClass="select2me" Width="350px"></asp:DropDownList>
<asp:DropDownList ID="DdlRegimen" runat="server" DataValueField="CveRegimenFiscal" DataTextField="CodigoRegimenFiscalTexto" CssClass="select2me" Width="350px"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFCDdlRegimen" runat="server" ControlToValidate="DdlRegimen" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Regimen'</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RFCDdlRegimen" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
@@ -309,7 +309,7 @@
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">CDS </span>
<span class="caption-subject bold uppercase">CSD </span>
</div>
<div class="actions">
<div class="btn-group">
@@ -513,7 +513,7 @@
</div>
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel HeaderText="Configuración de MAIL" ID="TabPanel2" runat="server">
<ajax:TabPanel HeaderText="Configuración de Correo" ID="TabPanel2" runat="server">
<ContentTemplate>
<div class="row">
<div class="col-md-6">
@@ -571,7 +571,7 @@
<tr>
<td>SSL:</td>
<td>
<asp:CheckBox ID="ChkSendMailSSL" Text=" " CssClass="make-switchsd" runat="server" /></td>
<asp:CheckBox ID="ChkSendMailSSL" Text=" " CssClass="chksino" runat="server" /></td>
</tr>
</table>
</div>
@@ -618,7 +618,7 @@
<tr>
<td>SSL:</td>
<td>
<asp:CheckBox ID="ChkBuzon_SSL" Text=" " CssClass="make-switchsd" runat="server" MaxLength="50" Width="200px" />
<asp:CheckBox ID="ChkBuzon_SSL" Text=" " CssClass="chksino" runat="server" MaxLength="50" Width="200px" />
</td>
</tr>
<tr>
@@ -700,7 +700,7 @@
<div class="row">
<label class="col-md-3" style="max-width: 120px;">SSL:</label>
<div class="col-md-3">
<asp:CheckBox ID="ChkSSLSoporte" Text=" " CssClass="make-switchsd" runat="server" MaxLength="50" Width="200px" />
<asp:CheckBox ID="ChkSSLSoporte" Text=" " CssClass="chksino" runat="server" MaxLength="50" Width="200px" />
</div>
</div>
</div>
@@ -1424,10 +1424,10 @@
<td>Tipo Centro de Costos:</td>
<td>
<asp:DropDownList ID="DdlTipoCentroDeCostos" CssClass="form-control input-sm select2me" runat="server" Width="200px">
<asp:ListItem Value="1" Text="Sucursal"></asp:ListItem>
<asp:ListItem Value="2" Text="Proyecto"></asp:ListItem>
<asp:ListItem Value="3" Text="Proyecto - SubProyecto"></asp:ListItem>
<asp:ListItem Value="4" Text="Sucursal - Proyecto"></asp:ListItem>
<asp:ListItem Value="1" Text="Centro de costo"></asp:ListItem>
<asp:ListItem Value="2" Text="Sucursal"></asp:ListItem>
<asp:ListItem Value="3" Text="Proyecto"></asp:ListItem>
<asp:ListItem Value="4" Text="Proyecto - Subproyecto"></asp:ListItem>
<asp:ListItem Value="5" Text="Proyecto - Sucursal"></asp:ListItem>
</asp:DropDownList>
</td>
@@ -1579,44 +1579,7 @@
</div>
</div>
<div class="col-md-6">
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-pin font-green"></i>
<span class="caption-subject bold uppercase">Archivos</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
<div class="tools">
<a href="javascript:;" class="collapse"></a>
</div>
</div>
<div class="portlet-body">
<table border="0" width="300px">
<tr>
<td>Banner:</td>
<td>
<asp:TextBox ID="TxtBanner" runat="server" MaxLength="50" Width="195px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVBanner" runat="server" ControlToValidate="TxtBanner" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Banner'</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEBanner" runat="server" HighlightCssClass="vco" TargetControlID="RFVBanner" Width="300px"></ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td colspan="2"><a id="LnkBanner" runat="server" class="Texto" href="javascript:AbrirVentana('/UploadFile.aspx', 350, 110, 'N', 'CargarArchivo');">Cargar Banner</a></td>
</tr>
<tr id="TrDescargaBanner" runat="server" visible="false">
<td colspan="2">
<a id="LinkDescarga" href="/" target="_blank"></a>
<asp:LinkButton ID="LbBannerDescarga" runat="server" CssClass="Texto">Descargar Banner</asp:LinkButton></td>
</tr>
</table>
</div>
</div>
<div class="portlet light smmallpadding bordered">
<div class="portlet-title">
<div class="caption font-green">

View File

@@ -182,9 +182,6 @@ Partial Class Sistemas_Empresa
'Configuración de Modalidad Update
TxtTimbres.Enabled = False
TrDescargaBanner.Visible = True
LnkBanner.InnerText = "Reemplazar Banner"
LbArchivoKeyDescarga.Visible = True
LbArchivoCerDescarga.Visible = True
LbArchivoPfxDescarga.Visible = True
@@ -261,7 +258,6 @@ Partial Class Sistemas_Empresa
TxtArchivoKey.Text = .ArchivoKey
TxtArchivoCer.Text = .ArchivoCer
TxtArchivoPfx.Text = .ArchivoPfx
TxtBanner.Text = .Banner
ChkEstatus.Checked = .Estatus
TxtFecha.Text = .FechaIng.ToString
TxtCveUsuario.Text = .Usuario
@@ -462,16 +458,9 @@ Partial Class Sistemas_Empresa
'CargaFuncionalidad(243, DdlFyESIG)
'CargaFuncionalidad(244, DdlActivoFijoSIG)
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Banners/" & .Banner & "', 500, 500, 'N', 'Banner Empresa');"
Session("FileUpload") = .Banner
Session("FileUpload") = .ArchivoKey
LbBannerDescarga.OnClientClick = "javascript:AbrirVentana('/Cer/" & .ArchivoCer & "', 500, 500, 'N', 'ArchivoCer Empresa');"
Session("FileUpload") = .ArchivoCer
Session("FileUpload") = .ArchivoPfx
End With
InicializaClasificacionIVA(ObjEmpresas)
@@ -530,7 +519,7 @@ Partial Class Sistemas_Empresa
If ObjEmpresas.AddEmpresa(TxtCveEmpresa.Text.Trim.ToEntero, TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim,
TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim.ToEntero, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim,
DdlTipoFacturacion.SelectedValue, TxtBIUsuario.Text.Trim, TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim,
TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, TxtBanner.Text.Trim, UsuarioActual.CveUsuario, ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked,
TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", UsuarioActual.CveUsuario, ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked,
ChkMostrarRetISR.Checked, "-1", ChkEstatusFacturacion.Checked, TxtSendMail.Text.Trim, TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim,
TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked, ChkUsaVentas.Checked, ChkUsaCxC.Checked,
ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim, TxtServerContPAQi.Text.Trim,
@@ -577,7 +566,7 @@ Partial Class Sistemas_Empresa
Else
If ObjEmpresas.UpdateEmpresa(TxtEmpresa.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtCiudad.Text.Trim, TxtEstado.Text.Trim, TxtRFC.Text.Trim,
TxtCP.Text.Trim.ToEntero, TxtTelefono.Text.Trim, TxtContacto.Text.Trim, TxtMail.Text.Trim, DdlTipoFacturacion.SelectedItem.ToString, TxtBIUsuario.Text.Trim,
TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, TxtBanner.Text.Trim, ChkEstatus.Checked,
TxtBIContraseña.Text.Trim, TxtContraseñaKey.Text.Trim, TxtArchivoKey.Text.Trim, TxtArchivoCer.Text.Trim, TxtArchivoPfx.Text.Trim, "", ChkEstatus.Checked,
ChkFacturaProduccion.Checked, ChkMostrarRetIVA.Checked, ChkMostrarRetISR.Checked, "-1", ChkEstatusFacturacion.Checked, TxtSendMail.Text.Trim,
TxtSendMailPassword.Text.Trim, TxtSendMailServer.Text.Trim, TxtSendMailPort.Text.Trim.ToEntero, ChkSendMailSSL.Checked, ChkUsaContabilidad.Checked, ChkUsaBancos.Checked,
ChkUsaVentas.Checked, ChkUsaCxC.Checked, ChkUsaCompras.Checked, ChkUsaInventarios.Checked, ChkUsaRH.Checked, ChkUsaNomina.Checked, ChkUsaOS.Checked, TxtBDContPAQi.Text.Trim,

View File

@@ -242,7 +242,10 @@
<label for="<%= DdlMarca.ClientID.ToString()%>">Marca:</label>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright">
<label>Aplica para Venta:</label>
<asp:CheckBox ID="ChkAplicaParaVenta" CssClass="make-switchsd" data-size="small" runat="server" Checked="True" />
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3">
<asp:TextBox ID="TxtVentaMinima" CssClass="form-control " runat="server"></asp:TextBox>
<%--<ajax:FilteredTextBoxExtender ID="FTBETVentaMinima" TargetControlID="TxtVentaMinima" FilterType="Numbers" runat="server" ValidChars=".," />--%>
@@ -252,7 +255,6 @@
<div class="row">
<div class=" col-md-12">
<div runat="server" id="DivCompuesto" class="form-group form-md-line-input input-iconright" visible="false">
<asp:DropDownList ID="DdlCompuesto" AppendDataBoundItems="true" CssClass="form-control input-sm select2me" runat="server" DataTextField="Compuesto" DataValueField="CveCompuesto" Width="206px" Height="22px">
<asp:ListItem Text="Seleccione" Value="-1"></asp:ListItem>
@@ -262,8 +264,7 @@
</div>
</div>
</div>
<br />
</div>
<div class="row" runat="server" id="divRowRSCO" visible="false" >
<div class=" col-md-6">
@@ -299,22 +300,15 @@
<ajax:ValidatorCalloutExtender ID="CvcTxtFechaVigenciaRSCO" runat="server" HighlightCssClass="vco" TargetControlID="CvTxtFechaVigenciaRSCO" Width="300px"></ajax:ValidatorCalloutExtender>
<label for="<%= TxtFechaVigenciaRSCO.ClientID.ToString() %>" style="margin-top:-6px" >Fecha de Vigencia:</label>
</div>
</div>
</div>
<div class="form-group form-md-line-input input-iconright col-xs-3" id="divLitraje" visible="false" runat="server">
<asp:TextBox ID="TxtLitraje" CssClass="form-control " runat="server" ></asp:TextBox>
<label class="truncate" style="padding-left: 16px;" for="<%= TxtLitraje.ClientID.ToString()%>">Litraje:</label>
<i></i>
</div>
<br />
<div class="form-group">
<label>Aplica para Venta:</label>
<asp:CheckBox ID="ChkAplicaParaVenta" CssClass="make-switchsd" data-size="small" runat="server" Checked="True" />
</div>
</div>
</div>
</div>
</div>
@@ -541,15 +535,15 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel HeaderText="Precio y Utilidad" ID="TabPU" runat="server">
<ajax:TabPanel HeaderText="Impuestos" ID="TabPU" runat="server">
<ContentTemplate>
<div class="row">
<div class="col-md-3">
<div class="col-md-4">
<div class="portlet xspadding light bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-briefcase font-green"></i>
<span class="caption-subject bold uppercase">Costos del Producto</span>
<span class="caption-subject bold uppercase">Impuestos</span>
</div>
<div class="actions">
<div class="btn-group">
@@ -557,7 +551,7 @@
</div>
</div>
<div class="portlet-body form">
<div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright" style="display:none;">
<asp:TextBox ID="TxtPrecio" CssClass="form-control" runat="server" MaxLength="10" Text="0"></asp:TextBox>
<label for="<%= TxtPrecio.ClientID.ToString()%>">Precio:</label><asp:RequiredFieldValidator ID="RFVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="REVPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''Precio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
@@ -566,7 +560,7 @@
<i>$</i>
</div>
<div class="form-group form-md-line-input input-iconright">
<div class="form-group form-md-line-input input-iconright" style="display:none;">
<asp:TextBox ID="TxtPrecioMinimo" CssClass="form-control" runat="server" MaxLength="10" Text="0"></asp:TextBox>
<label for="<%= TxtPrecioMinimo.ClientID.ToString()%>">Precio Minimo:</label><asp:RequiredFieldValidator ID="RFVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Precio Minimo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''Precio''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
@@ -576,10 +570,10 @@
<i>$</i>
</div>
<div class="form-group form-md-line-input input-iconright">
<div class="row" id="DivObjetoImpuesto" runat="server" visible="false">
<div class="row" >
<div class="col-md-12">
<div class="form-group form-md-line-input input-iconright">
<label for="<%= DdlObjetoImpuesto.ClientID.ToString()%>">Obj.Imp:</label>
<label for="<%= DdlObjetoImpuesto.ClientID.ToString()%>">Objeto. Impuesto:</label>
<asp:DropDownList ID="DdlObjetoImpuesto" CssClass="form-control input-sm select2me" Width="100%" runat="server" DataValueField="CveObjetoImpuesto" DataTextField="CodigoObjetoImpuestoTexto" >
</asp:DropDownList>
</div>
@@ -603,51 +597,32 @@
</div>
</div>
</div>
<i></i>
<%--<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlIVA" CssClass="form-control input-sm select2me" runat="server">
<asp:ListItem Selected="True" Text="IVA de la sucursal" Value="-1"></asp:ListItem>
<asp:ListItem Text="Exento de IVA" Value="0"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlIVA.ClientID.ToString()%>">IVA:</label>
<i></i>
</div>--%>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRetIVA" CssClass="form-control" runat="server" MaxLength="7" Text="0"></asp:TextBox>
<label for="<%= TxtRetIVA.ClientID.ToString()%>">Retención de IVA:</label><asp:RequiredFieldValidator ID="RFVRetIVA" runat="server" ControlToValidate="TxtRetIVA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Retención de IVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVRetIVA" runat="server" ControlToValidate="TxtRetIVA" Display="None" ErrorMessage="El campo <b>''Retención de IVA''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCRetIVA1" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetIVA" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCRetIVA2" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetIVA" Width="300px"></ajax:ValidatorCalloutExtender>
<i>%</i>
</div>
<div class="form-group form-md-line-input input-iconright">
<asp:TextBox ID="TxtRetISR" CssClass="form-control" runat="server" MaxLength="7" Text="0"></asp:TextBox>
<label for="<%= TxtRetISR.ClientID.ToString()%>">Retención de ISR:</label><asp:RequiredFieldValidator ID="RFVRetISR" runat="server" ControlToValidate="TxtRetISR" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Retención de ISR''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVRetISR" runat="server" ControlToValidate="TxtRetISR" Display="None" ErrorMessage="El campo <b>''Retención de ISR''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetISR" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetISR" Width="300px"></ajax:ValidatorCalloutExtender>
<i>%</i>
</div>
<%--
<div class="form-group form-md-line-input input-iconright col-xs-3">
<asp:TextBox ID="TxtRetISR" CssClass="form-control" runat="server"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FBETRetISR" TargetControlID="TxtRetISR" FilterType="Numbers" runat="server" />
<label class="truncate" style="padding-left: 16px;" for="<%= TxtRetISR.ClientID.ToString()%>">RetISR:</label>
<i></i>
</div>--%>
<div class="row">
<div class="col-md-6">
<label for="<%= TxtRetIVA.ClientID.ToString()%>">Retención de IVA:</label><asp:RequiredFieldValidator ID="RFVRetIVA" runat="server" ControlToValidate="TxtRetIVA" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Retención de IVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:TextBox ID="TxtRetIVA" CssClass="form-control input-sm" runat="server" Width="75px" MaxLength="7" Text="0"></asp:TextBox>
<asp:CompareValidator ID="CVRetIVA" runat="server" ControlToValidate="TxtRetIVA" Display="None" ErrorMessage="El campo <b>''Retención de IVA''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCRetIVA1" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetIVA" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCRetIVA2" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetIVA" Width="300px"></ajax:ValidatorCalloutExtender>
<i>%</i>
</div>
<div class="col-md-6">
<label for="<%= TxtRetISR.ClientID.ToString()%>">Retención de ISR:</label><asp:RequiredFieldValidator ID="RFVRetISR" runat="server" ControlToValidate="TxtRetISR" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Retención de ISR''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:TextBox ID="TxtRetISR" CssClass="form-control input-sm" Width="75px" runat="server" MaxLength="7" Text="0"></asp:TextBox>
<asp:CompareValidator ID="CVRetISR" runat="server" ControlToValidate="TxtRetISR" Display="None" ErrorMessage="El campo <b>''Retención de ISR''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." Operator="DataTypeCheck" Type="Currency" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetISR" Width="300px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RFVRetISR" Width="300px"></ajax:ValidatorCalloutExtender>
%
</div>
</div>
<div class="row">
<label class="col-md-4">¿Aplica IEPS?</label>
<div class="col-md-1">
<asp:CheckBox ID="ChkAplicaIeps" CssClass="" AutoPostBack="true" data-size="small" runat="server" Text=" " /></td>
<asp:CheckBox ID="ChkAplicaIeps" CssClass="" AutoPostBack="true" data-size="small" runat="server" Text=" " />
</div>
<label class="col-md-4">¿Graba en IVA?</label>
<div class="col-md-1">
<asp:CheckBox ID="ChkIepsIVA" CssClass="" Enabled="false" data-size="small" runat="server" Text=" " /></td>
<asp:CheckBox ID="ChkIepsIVA" CssClass="" Enabled="false" data-size="small" runat="server" Text=" " />
</div>
</div>
<div class="form-group form-md-line-input input-iconright">
@@ -660,12 +635,7 @@
<asp:ListItem Text="9%" Value="0.09"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlIEPSPorcentaje.ClientID.ToString()%>">IEPS Porcentaje:</label>
</div>
<div class="form-group form-md-line-input input-iconright" title="Esta retención tendrá efecto en la facturación siempre y cuando el cliente al cual se facturará tenga activada la opción de Retiene 6% de iva por servicio">
<label>Retiene 6% de IVA por Servicios</label>
<asp:CheckBox ID="ChkEsOutSourcing" CssClass="make-switchsd" data-size="small" runat="server" Checked="False" />
</div>
</div>
<div class="form-group form-md-line-input input-iconright" title="El precio no está determinado por el valor de la lista de precio, este es manual.">
<label>Precio Libre de Lista</label>
<asp:CheckBox ID="ChkPrecioLibre" CssClass="make-switchsd" data-size="small" runat="server" Checked="False" />
@@ -673,7 +643,7 @@
</div>
</div>
</div>
<div class="col-md-3">
<div class="col-md-4">
<div class="portlet xspadding light bordered">
<div class="portlet-title">
<div class="caption font-green">
@@ -719,8 +689,7 @@
</div>
</div>
</div>
<div class="col-md-3">
<div class="col-md-4" runat="server" id="divIEPS" visible="false">
<div class="portlet light smmallpadding traspasorow bordered">
<div class="portlet-title">
<div class="caption font-green">
@@ -882,7 +851,7 @@
</ContentTemplate>
</ajax:TabPanel>
<ajax:TabPanel HeaderText="Contabilidad - Inventarios" ID="TabContabilidad" runat="server">
<ajax:TabPanel HeaderText="Inventarios" ID="TabContabilidad" runat="server">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="UpConta" UpdateMode="Conditional">
<ContentTemplate>
@@ -1031,30 +1000,6 @@
</div>
</div>
<div class="col-md-6">
<div class="portlet xspadding light bordered">
<div class="portlet-title">
<div class="caption font-green">
<i class="icon-briefcase font-green"></i>
<span class="caption-subject bold uppercase">Concepto Relacionado</span>
</div>
<div class="actions">
<div class="btn-group">
</div>
</div>
</div>
<div class="portlet-body">
<div class="row">
<label class="col-md-4 truncate">Concepto:</label>
<div class="col-md-8">
<asp:DropDownList ID="DdlConceptoRelacionado" CssClass="form-control input-sm select2me" Width="50%" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
<br />
<div class="portlet xspadding light bordered">
<div class="portlet-title">
<div class="caption font-green">
@@ -1093,47 +1038,24 @@
</div>
<div class="actions">
<div class="btn-group">
<asp:LinkButton runat="server" ID="LnkCPLimpiarConfiguracion" OnClick="LnkCPLimpiarConfiguracion_Click" CssClass="Texto">Limpiar datos</asp:LinkButton>
</div>
</div>
</div>
<div class="portlet-body">
<div class="row">
<div class="col-md-12">
<table style="width: 100%">
<tr>
<td style="width: 25%"></td>
<td style="width: 25%"></td>
<td style="width: 25%"></td>
<td style="width: 25%; text-align: left!important">
<asp:LinkButton runat="server" ID="LnkCPLimpiarConfiguracion" OnClick="LnkCPLimpiarConfiguracion_Click" CssClass="Texto">Limpiar datos</asp:LinkButton></td>
</tr>
</table>
</div>
</div>
<br />
<div class="portlet-body">
<div class="row">
<label class="col-md-4 truncate">Material Peligroso:</label>
<div class="col-md-8">
<ADS:Dropdownlost ID="DdlMaterialPeligroso" runat="server" CssStyle="width: 100%;" DataTextField="ClaveMaterialPeligroDescripcion" DataValueField="CveMaterialPeligroso"></ADS:Dropdownlost>
</div>
</div>
<div class="row">
<div class="row form-md-line-input">
<label class="col-md-4 truncate">Embalaje:</label>
<div class="col-md-8">
<ADS:Dropdownlost ID="DdlEmbalaje" runat="server" CssStyle="width: 100%;" DataTextField="ClaveEmbalajeDescripcion" DataValueField="CveEmbalaje"></ADS:Dropdownlost>
</div>
</div>
<div class="row">
<div class="row form-md-line-input">
<label class="col-md-4 truncate">Peso en Kg:</label>
<div class="col-md-8">
<asp:TextBox ID="TxtPesoKg" runat="server" Width="60px" Class="form-control input-sm"></asp:TextBox>

View File

@@ -248,7 +248,6 @@ Partial Class ProductosyServicios
'CargaFamilia(ViewState("CveSubFamilia").ToString.ToEntero)
CargaSucursaless()
CargaImpuestosLocales()
CargaConceptoRelacionado()
If UsuarioActual.TienePermisoProceso(122) Then
BtnEliminar.Visible = False
@@ -365,6 +364,10 @@ Partial Class ProductosyServicios
CargaPSAdicionalesVigencias()
End If
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then '' empresa deduce IEPS
divIEPS.Visible = True
End If
If UsuarioActual.CveEmpresa = 13 Then
DivPSAdicionalVigencia.Visible = True
LtlPSAdicionalVigencia.Text = "Producto Relacionado:"
@@ -383,7 +386,6 @@ Partial Class ProductosyServicios
CargaCombosSeccionAlmacen()
DivObjetoImpuesto.Visible = True
DdlObjetoImpuesto.DataSource = GlobalDTSATObjetosImpuestos
DdlObjetoImpuesto.DataBind()
DdlObjetoImpuesto.SelectedValue = "2" 'se sugiere este valor, que sería el más utilizado
@@ -794,10 +796,6 @@ Partial Class ProductosyServicios
End If
End If
End Sub
Private Sub CargaConceptoRelacionado()
DdlConceptoRelacionado.DataSource = GlobalDTContaConceptosContables(-1)
DdlConceptoRelacionado.DataBind()
End Sub
Private Sub CargarMetodosInv()
ddlMetodos.DataSource = If(UsuarioActual.CveEmpresa.Contiene(72, 80), GlobalDTInvMetodosInventario.FiltraParametros("CveMetodoInventario IN (1,5)"), GlobalDTInvMetodosInventario)
ddlMetodos.DataBind()
@@ -948,7 +946,6 @@ Partial Class ProductosyServicios
lbTitulo.Text = $"{lbTitulo.Text}{ObjProductosServicios.PS}"
LtProductoUnificar.Text = ObjProductosServicios.PS
ddlMetodos.SelectedValue = ObjProductosServicios.CveMetodoInventario.ToString
DdlConceptoRelacionado.SelectedValueExist(ObjProductosServicios.CveConceptoContable.ToString)
DdlProveedor.SelectedValue = ObjProductosServicios.CveProveedorCompra.ToString
DdlProveedor.SelectedText = ObjProductosServicios.ProveedorCompra
@@ -1045,21 +1042,16 @@ Partial Class ProductosyServicios
CargaCaracteristicas()
LnkUnificar.Visible = True
ChkEsOutSourcing.Checked = ObjProductosServicios.EsOutSourcing
ChkPrecioLibre.Checked = ObjProductosServicios.PrecioLibre
If UsuarioActual.Empresa.Funcionalidad(143) = "1" Then
TxtRegistroRSCO.Text = ObjProductosServicios.DtResultados.Rows(0)("RegistroRSCO").ToString
ChkFechaIndeterminadaRSCO.Checked = Boolean.Parse(ObjProductosServicios.DtResultados.Rows(0)("VigenciaIndeterminadaRSCO").ToString)
DivRegistroRSCO1.Visible = True
DivRegistroRSCO2.Visible = True
If ChkFechaIndeterminadaRSCO.Checked Then
TxtFechaVigenciaRSCO.Text = "01/01/1900"
Else
@@ -1070,18 +1062,11 @@ Partial Class ProductosyServicios
TxtFechaVigenciaRSCO.Text = ""
End If
End If
Else
TxtRegistroRSCO.Text = ""
TxtFechaVigenciaRSCO.Text = ""
ChkFechaIndeterminadaRSCO.Checked = False
End If
Else
Alert("El Producto o Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
@@ -1467,7 +1452,7 @@ Partial Class ProductosyServicios
TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True,
ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero,
FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim,
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero,
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal,
CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,
CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero,
@@ -1475,7 +1460,7 @@ Partial Class ProductosyServicios
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
CveTipoEmpacado:=DdlEmpacado.SelectedValue.ToEntero(), CveTipoOrganico:=DdlTipoOrganico.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad,
CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
@@ -1538,7 +1523,7 @@ Partial Class ProductosyServicios
TxtPrecio.Text.Trim.ToDouble, DdlIVA.SelectedValue.ToDouble, (TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, CveProveedor, True,
ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv, EsPaquete, DdlSATPS.SelectedValue.ToEntero,
CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarca, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim,
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal, CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero,
AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal,
CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,
CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero,
@@ -1546,7 +1531,7 @@ Partial Class ProductosyServicios
CveModelo:=DdlModelo.SelectedValue.ToEntero(), CveMedida:=DdlMedida.SelectedValue.ToEntero(), CveRinTamaño:=DdlRin.SelectedValue.ToEntero(),
CveTipoEmpacado:=DdlEmpacado.SelectedValue.ToEntero(), CveTipoOrganico:=DdlTipoOrganico.SelectedValue.ToEntero(),
ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString, ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString, EsOutSourcing:=ChkEsOutSourcing.Checked,
ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked, TiempoCaducidad:=TiempoCaducidad, CvePSAdicionalVigencia:=DdlPSAdicionalVigencia.SelectedValue.ToEntero(), PrecioLibre:=ChkPrecioLibre.Checked,
CveMaterialPeligroso:=DdlMaterialPeligroso.SelectedValue.ToEntero, CveEmbalaje:=DdlEmbalaje.SelectedValue.ToEntero, PesoKg:=TxtPesoKg.Text.ToDecimal, Dimensiones:=TxtDimensiones.Text.Trim,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero, Litraje:=TxtLitraje.Text.ToDecimal,
@@ -3136,14 +3121,14 @@ Partial Class ProductosyServicios
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, DdlProveedor.txtValue.Value.ToEntero, True, ChkAplicaParaVenta.Checked, UsuarioActual.CveUsuario,
CveEmpresaFranquicia, CveMetodoInv, EsPaquete, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, FuePorXML:=False, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2,
CveMarca:=CveMarcaFranquicia, AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, CveSATPS:=DdlSATPS.SelectedValue.ToEntero,
IEPSGrabaIVA:=ChkIepsIVA.Checked, VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100),
PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal, CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero,
CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo,
CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero,
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
EsOutSourcing:=ChkEsOutSourcing.Checked, TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) > 0 Then
'Alert(String.Format("Error al agregar el nuevo producto en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")))
Return True
@@ -3156,14 +3141,14 @@ Partial Class ProductosyServicios
(TxtRetIVA.Text.Trim.ToDouble / 100), ChkInventariable.Checked, -1, True, ChkAplicaParaVenta.Checked, ChkEstado.Checked, UsuarioActual.CveUsuario, CvePS, CveMetodoInv,
EsPaquete, DdlSATPS.SelectedValue.ToEntero, CveTipoPS:=DdlTipoPS.SelectedValue.ToEntero, TipoServicio:=-1, CveClasificacion2:=CveClasificacion2, CveMarca:=CveMarcaFranquicia,
AlmacenSeccion:=TxtAlmacenSeccion.Text.Trim, AplicaIEPS:=ChkAplicaIeps.Checked, IEPSPorcentaje:=DdlIEPSPorcentaje.SelectedValue.ToDecimal,
CveConceptoContable:=DdlConceptoRelacionado.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked,
CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero, IEPSGrabaIVA:=ChkIepsIVA.Checked,
VentaMinima:=TxtVentaMinima.Text.ToDecimal, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, RetISR:=(TxtRetISR.Text.Trim.ToDouble / 100), PrecioMinimo:=TxtPrecioMinimo.Text.ToDecimal,
CveTipoFactor:=DdlTipoFactor.SelectedValue.ToEntero, CveFraccionArancelaria:=DdlFraccionArancelaria.SelectedValue.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario,
CveClasificacionDetalle:=CveTipo, CveTamaño:=DdlTamanio.SelectedValue.ToEntero, CveModelo:=CveModelo,
CveMedida:=CveMedida, CveRinTamaño:=CveRin, ClaveImpuestoEmpaque:=DdlImpEmpaque.SelectedValue.ToString,
CveObjetoImpuesto:=DdlObjetoImpuesto.SelectedValue.ToEntero,
ClaveImpuestoUM:=DdlImpUM.SelectedValue.ToString, ClaveCategoriaToxicidad:=DdlCategoriaToxicidad.SelectedValue.ToString, ClaveImpuestoTipoProducto:=DdlImpTipoProducto.SelectedValue.ToString,
EsOutSourcing:=ChkEsOutSourcing.Checked, AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
AplicaSerie:=ChkSerie.Checked, AplicaLote:=ChkLote.Checked, AplicaCaducidad:=ChkCaducidad.Checked, AplicaSeccion:=ChkSeccion.Checked,
TiempoCaducidad:=TxtTiempoCaducidad.Text.ToEntero()) Then
Return True

View File

@@ -2307,6 +2307,15 @@ Partial Class Ventas
ViewState("CveContratoTipo") = value
End Set
End Property
Private Property HabilitaRemisionPublicoGeneral As Integer
Get
Return IfNull(ViewState("HabilitaRemisionPublicoGeneral"), "0", ViewState("HabilitaRemisionPublicoGeneral")).ToString().ToEntero()
End Get
Set(value As Integer)
ViewState("HabilitaRemisionPublicoGeneral") = value
End Set
End Property
#End Region
'#Region "AuxiliarConta"
@@ -6903,6 +6912,8 @@ Partial Class Ventas
If CveVenta <= 0 Then
CalculaLineasAdicionales()
HabilitaRemisionPublicoGeneral = 0
HabilitarRemisionesPublicoGeneral()
End If
@@ -6917,6 +6928,71 @@ Partial Class Ventas
'End If
End Sub
Private Sub HabilitarRemisionesPublicoGeneral()
If UsuarioActual.Empresa.Funcionalidad(381).Trim() <> "" Then
'SI ESTA BLOQUEADO POR AUTORIZACION, HABILITAR LA OPCION DE REMISION PARA PUBLICO EN GENERAL
If UsuarioActual.Empresa.Funcionalidad(381).Trim() = CveCliente.ToString() Then
Dim DeshabilitarAutorizacion As Boolean = CBool(GlobalDTSubProyectos(-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero(), CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("DeshabilitaAutorizacion"))
If DdlTipoComprobante.SelectedValue = "PA" AndAlso DeshabilitarAutorizacion Then
If DdlTipoComprobante.Items.FindByValue("Rem") Is Nothing Then
DdlTipoComprobante.Items.Insert(0, New ListItem("Remisión", "Rem"))
End If
DdlTipoComprobante.SelectedValueExist("Rem")
HabilitaRemisionPublicoGeneral = 1
End If
'SI TIENE LA HABILITACION DE REMISION ACTIVA Y LA SUCURSAL NO LO PERMITE
If Not DeshabilitarAutorizacion AndAlso HabilitaRemisionPublicoGeneral = 1 Then
HabilitaRemisionPublicoGeneral = 0
DdlTipoComprobante.SelectedValueExist("PA")
If DdlTipoComprobante.Items.FindByValue("Rem") IsNot Nothing Then
DdlTipoComprobante.Items.Remove(DdlTipoComprobante.Items.FindByValue("Rem"))
End If
End If
UpParametros.Update()
End If
Else
HabilitaRemisionPublicoGeneral = 0
End If
End Sub
Private Function ValidaImportePublicoGeneral() As Boolean
Dim retorno As Boolean = False
If DdlTipoComprobante.SelectedValue = "Rem" AndAlso HabilitaRemisionPublicoGeneral = 1 Then
Dim Total As Decimal = TxtTotal.Text.ToDecimal()
If DdlMoneda.SelectedValue = "1" Then
If Total <= 5000D Then
retorno = True
Else
Alert("No puede generar una remisión con un valor mayor a 5,000 MXN. Debe cambiar el tipo de documento a 'Autorización'", TipoMensaje.MsgAdvertencia)
End If
End If
If DdlMoneda.SelectedValue = "2" Then
If TxtTipoCambio.Text.ToDecimal() > 0 Then
Dim TotalPesos As Decimal = (Total * TxtTipoCambio.Text.ToDecimal())
If TotalPesos <= 5000D Then
retorno = True
Else
Alert($"No puede generar una remisión con un valor mayor a {(5000 / TxtTipoCambio.Text.ToDecimal()).RoundSQL(2)} USD. Debe cambiar el tipo de documento a 'Autorización'", TipoMensaje.MsgAdvertencia)
End If
Else
Alert("No se ha especificado un tipo de cambio", TipoMensaje.MsgAdvertencia)
End If
End If
Else
retorno = True
End If
Return retorno
End Function
Private Sub CargaRelacionadasPendientes()
If CveVenta > 0 AndAlso UsuarioActual.TienePermisoProceso(321) Then
@@ -8420,13 +8496,7 @@ Partial Class Ventas
Dim ClienteRetIVA = Me.ClienteRetIVA
If ClienteRetIVA <= 0 Then
If TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString() <> "" AndAlso CBool(TmpDT.Rows(e.RowIndex)("EsOutSourcing").ToString()) Then
ClienteRetIVA = 0.06D
DdlTipoRetencion.SelectedValueExist("4")
LblRetIVA.Text = (ClienteRetIVA * 100).FormatoNumero
TrRetIVA.Style.Add("display", "")
DdlTipoRetencion.Visible = True
ElseIf DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
ClienteRetIVA = 0.106667D
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
ClienteRetIVA = 0.04D
@@ -8838,6 +8908,10 @@ Partial Class Ventas
End If
If Not ValidaImportePublicoGeneral() Then
Exit Sub
End If
If (Me.FacturarSucursal AndAlso DdlSucursalCliente.SelectedValue.ToEntero() > 0 AndAlso (Me.ClienteSucursal IsNot Nothing AndAlso String.IsNullOrEmpty(Me.ClienteSucursal.RFC))) Then
Alert("La sucursal no tiene asignada un RFC.", TipoMensaje.MsgAdvertencia)
Exit Sub
@@ -17985,6 +18059,7 @@ Partial Class Ventas
ObjSubProyectos.Dispose()
CargaVendedores()
HabilitarRemisionesPublicoGeneral()
UpDetalle.Update()
UpEmitirTransitorio.Update()
@@ -19119,10 +19194,7 @@ Partial Class Ventas
End If
If ClienteRetIVA <= 0 Then
If CBool(DrPS("EsOutSourcing").ToString()) Then
ClienteRetIVA = 0.06D
DdlTipoRetencion.SelectedValueExist("4")
ElseIf DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
If DdlTipoRetencion.SelectedValue.Contiene("1", "2") Then
ClienteRetIVA = 0.106667D
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
ClienteRetIVA = 0.04D
@@ -19177,7 +19249,6 @@ Partial Class Ventas
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
Row("CuentaPredial") = CuentaPredial
Row("EsOutSourcing") = DrPS("EsOutSourcing")
Row("EsCargo") = EsCargo
If TmpDT.Columns.Contains("CveMarca") Then
@@ -19429,8 +19500,6 @@ Partial Class Ventas
TmpDT.Columns.Add("CveTamaño", GetType(Integer))
TmpDT.Columns.Add("CveConcepto", GetType(Integer))
TmpDT.Columns.Add("EsOutSourcing", GetType(Boolean))
TmpDT.Columns.Add("EsCargo", GetType(Boolean))
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
@@ -19445,14 +19514,11 @@ Partial Class Ventas
TmpDT.Columns.Add("CveActivoFijo", GetType(Integer))
TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal))
TmpDT.Columns.Add("AFValorInicial", GetType(Decimal))
TmpDT.Columns("EsOutSourcing").DefaultValue = False
TmpDT.Columns("EsCargo").DefaultValue = False
TmpDT.Columns("TieneProntoPago").DefaultValue = "No"
TmpDT.Columns("ImporteProntoPago").DefaultValue = 0
End Sub
Private Sub CreaDTmpC()
DTmpC = New DataTable
@@ -20027,6 +20093,8 @@ Partial Class Ventas
End If
ValidaImportePublicoGeneral()
UPObservaciones.Update()
UpContado.Update()
UpPS.Update()
@@ -20857,6 +20925,13 @@ Partial Class Ventas
If Not OcurrioError Then
If MovimientoPrePoliza AndAlso CveMovimientoInventario > 0 Then
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
Dim CveSubProyectoPrePoliza As Integer = ObjFactura.CveSubProyecto
If CveAlmacen > 0 Then
Dim CveSubProyectoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveSubProyecto").ToString().ToEntero()
If CveSubProyectoAlmacen > 0 Then
CveSubProyectoPrePoliza = CveSubProyectoAlmacen
End If
End If
If ObjInventario.GetMovimientosDetalle(CveMovimientoInventario, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
Dim DtCostos = ObjInventario.DtResultados.Copy
@@ -20885,8 +20960,13 @@ Partial Class Ventas
End If
Try
Dim CveSubProyecto69 As Integer = CveSubProyectoPrePoliza
If UsuarioActual.CveEmpresa = 119 Then
CveSubProyecto69 = ObjFactura.CveSubProyecto
End If
'If ValorInventario <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto69, ValorInventario, ValorInventario, 69, ObjFactura.SerieFolio, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovto69, ValorInventario, ValorInventario, 69, ObjFactura.SerieFolio, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString().ToEntero(), CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=CveSubProyecto69) Then
OcurrioError = True
Exit For
End If
@@ -20901,7 +20981,7 @@ Partial Class Ventas
If Not OcurrioError Then
IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero()
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovto69, TotalCosto, TotalCosto, 68, ObjFactura.SerieFolio, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=ObjFactura.CveSubProyecto) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovto69, TotalCosto, TotalCosto, 68, ObjFactura.SerieFolio, ObjFactura.SerieFolio, IdCtaContable, CveVenta:=CveVenta, CveCliente:=ObjFactura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, CveSubProyecto:=CveSubProyectoPrePoliza) Then
OcurrioError = True
End If
End If
@@ -22640,6 +22720,13 @@ Partial Class Ventas
End If
End If
If NuevaFactura = 1 Then
'SI ES REFACTURACION CON PAGOS NO PERMITIR AGREGAR PAGO
If ObjFacturaNC.Pagado > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(586).ToEntero() = 2 Then
BtnAgregarPago.Visible = False
End If
End If
Case 3 ' TERMINAL
DivTerminal.Visible = True
TxtFechaPago.Text = If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza)).ToShortDateString
@@ -22788,6 +22875,14 @@ Partial Class Ventas
UpContado.Update()
End Sub
Private Sub BtnAgregarPago_Click(sender As Object, e As EventArgs) Handles BtnAgregarPago.Click
If NuevaFactura = 1 Then
'SI ES REFACTURACION CON PAGOS NO PERMITIR AGREGAR PAGO
If ObjFacturaNC.Pagado > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(586).ToEntero() = 2 Then
Alert("No se puede agregar un pago a una refacturación con pagos", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Dim abonado, saldo As Double
Dim total As Decimal = TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal
@@ -32244,13 +32339,45 @@ Partial Class Ventas
End If
ObjClientes.Dispose()
Dim CveSubProyectoVenta As Integer = DdlSubProyectoDatos.SelectedValue.ToEntero()
Dim SubProyectoVenta As String = DdlSubProyectoDatos.SelectedItem.Text
Dim CveProyectoVenta As Integer = -1
Dim ProyectoVenta As String = ""
If UsuarioActual.CveEmpresa = 119 AndAlso CveSubProyectoVenta > 0 Then
Dim RowSP = GlobalDTSubProyectos(-1, CveSubProyecto:=CveSubProyectoVenta, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("")
If RowSP IsNot Nothing Then
CveProyectoVenta = RowSP("CveProyecto").ToString().ToEntero()
ProyectoVenta = RowSP("Proyecto").ToString()
End If
End If
If DtRemisionesPS IsNot Nothing Then
Dim tCantidad As Decimal = 0
For Each Dr As DataRow In DtRemisionesPS.Select()
Dim CveProyecto As Integer = -1
Dim Proyecto As String = ""
Dim CveSubProyecto As Integer = -1
Dim SubProyecto As String = ""
If UsuarioActual.CveEmpresa = 119 Then
CveProyecto = CveProyectoVenta
Proyecto = ProyectoVenta
CveSubProyecto = CveSubProyectoVenta
SubProyecto = SubProyectoVenta
Else
CveProyecto = Dr("CveProyecto").ToString().ToEntero()
Proyecto = Dr("Proyecto").ToString()
CveSubProyecto = Dr("CveSubProyecto").ToString().ToEntero()
SubProyecto = Dr("SubProyecto").ToString()
End If
tCantidad = If(ChkRemProductos.Checked, GvRemPS.Rows(IndiceGVDataKey(GvRemPS, "CveVentaDetalle", $"{Dr("CveVentaDetalle")}")).FCTextBox("TxtCantidadRem").Text, Dr("Cantidad")).ToString().ToDecimal
AgregarProductoServicio(tCantidad, Dr("CveUM").ToString().ToEntero(), Dr("UM").ToString(), Dr("CveClasificacion").ToString().ToEntero(), Dr("Clasificacion").ToString(),
Dr("CvePS").ToString().ToEntero(), Dr("PS").ToString(), Dr("Obs").ToString(), Dr("PU").ToString().ToDecimal, Dr("Descuento").ToString().ToDecimal,
Dr("CveProyecto").ToString().ToEntero(), Dr("Proyecto").ToString(), Dr("CveSubProyecto").ToString().ToEntero(), Dr("SubProyecto").ToString(),
CveProyecto, Proyecto, CveSubProyecto, SubProyecto,
CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Dr("CveContratoDetalle").ToString().ToEntero(),
CveVentaDetalleRemision:=Dr("CveVentaDetalle").ToString().ToEntero(), RegeneraIEPS:=True)
Next
@@ -34363,8 +34490,6 @@ Partial Class Ventas
tClienteRetIVA = 0.106667D
ElseIf DdlTipoRetencion.SelectedValue.Contiene("3") Then
tClienteRetIVA = 0.04D
ElseIf DdlTipoRetencion.SelectedValue.Contiene("4") AndAlso CBool(RowServicio("EsOutSourcing").ToString()) Then
tClienteRetIVA = 0.06D
ElseIf DdlTipoRetencion.SelectedValue.Contiene("0") Then
tClienteRetIVA = 0.00D
End If