This commit is contained in:
Luis Quijada
2025-05-07 10:18:04 -07:00
28 changed files with 446 additions and 3984 deletions

View File

@@ -468,7 +468,9 @@ Public Class ClsContPAQi
StrSQL.Append(" EjercicioAsignado, PeriodoAsignado, IETUDeducible, IETUModificado,IETUAcreditable, IdConceptoIETU,UUID)")
StrSQL.Append(" VALUES (@IdDevIVA, @RowVersion, @IdPoliza, @IdCuenta, ISNULL ((SELECT MAX (NumDev) FROM DevolucionesIVA WHERE IdPoliza = @IdPoliza), 0) + 1, @IdProveedor, @PorIVA, @SubTotal + @IVA, @SubTotal, @IVA, CASE WHEN @IVA > 0 THEN 1 ELSE 0 END, CASE WHEN @IVA = 0 THEN 1 ELSE 0 END,")
StrSQL.Append(" 0, @Serie, @Folio, @Referencia, 0, 0, @SubTotal + @IVA, @RetIVA, @RetISR, @SubTotal + @IVA - @RetIVA - @RetISR,")
StrSQL.Append(" YEAR(@FechaMov), MONTH(@FechaMov),@SubTotal, 0,0,1,@UUID);")
StrSQL.Append(" YEAR(@FechaMov), MONTH(@FechaMov),@SubTotal, 0,0,1,@UUID); ")
StrSQL.Append(" EXEC PA_UpdateId 'Id_DevolucionIVA'; ")
StrSQL.Append(" END TRY")
@@ -582,7 +584,7 @@ Public Class ClsContPAQi
VALUES (@IdMovDev, @RowVersion, @IdPoliza, ISNULL ((SELECT MAX (NumMovto) FROM MovimientosImpuestos WHERE IdPoliza = @IdPoliza), 0) + 1, @IdPersona, 0,YEAR(@FechaMov), MONTH(@FechaMov), @IdCuenta, 0, 1, 0,
@Serie, @Folio, @Referencia, @UUID, 2, 0, 1, @TipoMovimiento, 1, @Impuesto, 2,'', @TasaOCuota, @SubTotal,
@ImpImpuesto, @ImpImpuesto,0, @IVANoAcred, 0, 0, 0, 0, 0, @GuidMov, @GuidMovPadre, 0,
@ImpImpuesto, (@ImpImpuesto + @SubTotal),0, @IVANoAcred, 0, 0, 0, 0, 0, @GuidMov, @GuidMovPadre, 0,
@ConceptoIVA, @SubconceptoIVA, 0, @ProporcionDIOT, @DeducibleDIOT);
EXEC PA_UpdateId 'Id_MovimientoImpuesto';

View File

@@ -5867,7 +5867,7 @@ Public Class ClsContabilidad
Return Retorno
End Function
Public Function AddCuentasGlobales(CveConceptoContable As Integer, CveCuenta As Integer, TipoGlobal As Integer, CveEmpresa As Integer) As Boolean
Public Function AddCuentasGlobales(CveConceptoContable As Integer, CveCuenta As Integer, TipoGlobal As Integer, CveEmpresa As Integer, PorcentajeImpuesto As Decimal, CveColectiva As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_CuentasGlobalesAdd")
@@ -5877,6 +5877,8 @@ Public Class ClsContabilidad
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
.Add("@TipoGlobal", SqlDbType.Int).Value = TipoGlobal
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
End With
Try

View File

@@ -94,6 +94,8 @@ Public Class ClsInventarios
Public Property CveOrdenCompra As Integer
Public Property CveOrdenCompraLiga As Integer
Public Property FolioOC As String
Public Property DescripcionOC As String
Public Property CvePS As Integer
Public Property CveEntregaForanea As Integer
Public Property CvePaqueteriaGuia As Integer
@@ -852,6 +854,7 @@ Public Class ClsInventarios
CveOrdenCompra = dr("CveOrdenCompra").ToString.ToEntero
CveOrdenCompraLiga = dr("CveOrdenCompraLiga").ToString.ToEntero
FolioOC = dr("FolioOC").ToString
DescripcionOC = dr("DescripcionOC").ToString
FolioInterno = dr("VentaAnticipo").ToString
CveCliente = If(dr("CveCliente").ToString.ToEntero > 0, dr("CveCliente").ToString.ToEntero, -1)
CveClienteSucursal = If(dr("CveClienteSucursal").ToString.ToEntero > 0, dr("CveClienteSucursal").ToString.ToEntero, -1)

View File

@@ -1785,7 +1785,7 @@ Public Class ClsNominas
#End Region
#Region "ClsNominasSaatConceptos"
Public Function GetConceptos() As Boolean
Public Function GetConceptoSAT() As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Nom_Sat_ConceptosGet")
@@ -3468,6 +3468,28 @@ Public Class ClsNominas
End Try
Return retorno
End Function
Public Function GetFonacotSaldos(CveEmpresa As Integer, CvePersonal As Integer, CveFonacot As Integer) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_GetFonacotSaldos", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
.Add("@CveFonacot", SqlDbType.Int).Value = CveFonacot
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch sqEx As SqlException
retorno = False
OnError("Ocurrió un error al obtener los saldos Fonacot.", sqEx, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
Catch ex As Exception
retorno = False
OnError("Ocurrió un error al obtener los saldos Fonacot.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return retorno
End Function
Public Function AddMovtoPermanente(cveConcepto As Int32, cvePersonal As Int32, descripcion As String, tipoDescuento As Int32, valor As Double, vecesAplicar As Int32, montoLimite As Decimal, fechaInicioAplicacion As Date, estatus As Boolean, CveCuenta As Integer, Optional CveIE As Integer = -1, Optional EsAcumulado As Integer = 0) As Integer
Dim retorno As Integer = 0
DataAdapter("PA_AddMovtoPermanente", CommandType.StoredProcedure)

View File

@@ -918,7 +918,7 @@ Public Class ClsPaginas
Dim AppNombre As String = "GlobalDTNomSatConceptos"
If DirectCast(HttpContext.Current.Application(AppNombre), DataTable) Is Nothing Then
Using ObjNom As New ClsNominas()
If ObjNom.GetConceptos() Then Application(AppNombre) = ObjNom.DtResultados
If ObjNom.GetConceptoSAT() Then Application(AppNombre) = ObjNom.DtResultados
End Using
End If
GlobalDTNomSatConceptos = DirectCast(HttpContext.Current.Application(AppNombre), DataTable)
@@ -8326,7 +8326,7 @@ Public Class ClsPaginas
End Function
#End Region
#Region "PDF NOMINA"
Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String, Optional indemnizacion As Boolean = False) As Byte()
Public Function GeneraPDFNomina(CvePersonal As Integer, CvePeriodo As Integer, CveEmpresa As Integer, RutaEmpresa As String) As Byte()
Dim Retorno As Byte() = Nothing
Using ObjNomina As New ClsNominas
Using ObjPersonal As New ClsRH
@@ -8344,7 +8344,7 @@ Public Class ClsPaginas
Dim DTDeducciones As Data.DataTable
Dim DTDeducciones2 As New Data.DataTable
Dim Ruta As String = UsuarioActual.Empresa.Ruta
Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.Serie }{If(indemnizacion, "F", "")}-{ObjNomina.Folio}.xml"
Dim PathXML As String = $"{Ruta}XML\Nomina\{ObjNomina.Serie }-{ObjNomina.Folio}.xml"
Dim FechaEmision, FechaCertificacion As DateTime
Dim FolioFiscal, NoSerieCertificado, NoSerieCertificadoContribuyente, SelloCFDi, SelloSAT As String
FolioFiscal = ""
@@ -8468,12 +8468,12 @@ Public Class ClsPaginas
Dim ajusteindemnizacion As Double = 0
'PERCECIONES - DEDUCCIONES
If ObjNomina.GetNom_NominasDetalles(CveNomina, CvePersonal, CvePeriodo, "-1") Then
Dim filtrop As String = " AND CveSistema NOT IN(10,11,32)"
Dim friltrod As String = " AND CveSistema <>47"
If indemnizacion Then
filtrop = "AND CveSistema IN(10,11,32)"
friltrod = " AND CveSistema =47"
End If
Dim filtrop As String = "" '" AND CveSistema NOT IN(10,11,32)"
Dim friltrod As String = "" '" AND CveSistema <>47"
'If indemnizacion Then
' filtrop = "AND CveSistema IN(10,11,32)"
' friltrod = " AND CveSistema =47"
'End If
DTPercepciones = ObjNomina.DtResultados.FiltraParametros($"((Tipo = 'P' OR (Tipo = 'D' AND Importe <0)) AND ((Importe <>0 AND EsPadre = 1 AND EsFormula =0) OR Imprimir =1)) {filtrop}")
DTDeducciones = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND ((Importe >0 AND EsPadre = 1 AND EsFormula =0) OR Imprimir =1) ) {friltrod}")
DTDeducciones2 = ObjNomina.DtResultados.FiltraParametros($"(Tipo = 'D' AND (( Importe >0 AND EsPadre = 1 AND EsFormula =0) OR Imprimir =1) ){friltrod}")
@@ -8535,7 +8535,7 @@ Public Class ClsPaginas
RptParametro.Add(New ReportParameter("Cantidad", "1"))
RptParametro.Add(New ReportParameter("Unidad", "ACT"))
RptParametro.Add(New ReportParameter("Descripcion", "PAGO DE NÓMINA"))
RptParametro.Add(New ReportParameter("Total", If(indemnizacion, ajusteindemnizacion, ObjNomina.Total - ajusteindemnizacion).ToString()))
RptParametro.Add(New ReportParameter("Total", ObjNomina.Total.ToString()))
RptParametro.Add(New ReportParameter("ImporteLetra", ObjNomina.Total.ToString.ToDecimal.Texto2Letras))
RptParametro.Add(New ReportParameter("Clave", "84111505"))
cQr = GeneraQRSAT(UsuarioActual.Empresa.RFC, ObjPersonal.RFC, ObjNomina.Total.ToString().ToDecimal(), FolioFiscal)

View File

@@ -3924,6 +3924,7 @@ Namespace Modelos
DT = TmpDTDetalle.FiltraParametros($"CvePS <> {ObjFactura.CvePSAmortizacion}", "", {"CveClasificacion", "CveSubProyecto", "PorcentajeIVA"})
If DT.Rows.Count > 0 Then
Dim CondicionesPago As Integer = If(ObjFactura.CondicionesPago = 0, 2, ObjFactura.CondicionesPago)
'Se agrega movimiento separado por la cuenta de ventas (ER)
For Each Row2 As DataRow In DT.Rows
importeMovimiento = ((TmpDTDetalle.SUM("TotalImporte", String.Format("CveClasificacion = {0} AND CveSubProyecto = {1} AND PorcentajeIVA = {2}", Row2("CveClasificacion"), Row2("CveSubProyecto"), Row2("PorcentajeIVA"))).ToString.ToDecimal) * ValorMultiplicador)
@@ -3934,7 +3935,7 @@ Namespace Modelos
If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}"
'Nota cuando es Nota de crédiot, debe de tomar el devoluciones y rebajas
If importeMovimiento <> 0 Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMX, ConceptoContableAplicar, Referencia, Concepto, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMX, ConceptoContableAplicar, Referencia, Concepto, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal, CveColectiva:=CondicionesPago) Then
ErrorPrepoliza = True
Else
ObjFactura.SeGuardoPrePoliza = True
@@ -4334,7 +4335,7 @@ Namespace Modelos
Next
End If
If ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2) Then
If Not ErrorPrepoliza AndAlso ObjConta.ValidacionesPrePoliza(ObjFactura.CvePrePoliza, UsuarioActual, Opcion:=2) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
If ObjConta.ValorPolizaDescuadre = 2 Then
ErrorList.Add(ObjConta.MensajePolizaDescuadre)
@@ -5805,7 +5806,7 @@ Namespace Modelos
End If
'CUANDO SE CANCELA, Y TIENE RELACIONADA UNA REMISIÓN, Y ESTA NO SE CANCELARÁ. DEBE DE HACER EN AUTOMÁTICO LOS MOVIMIENTOS AL ALMACEN DE ENTREGA POR ADELANTADO
Dim RevivirRemisiones As Boolean = Not EsRefacturacion AndAlso ((TieneRemisionesRelacionadas AndAlso ListaRemisionesCancelar Is Nothing) OrElse (DtRemisionesRelacionadas.Rows.Count > ListaRemisionesCancelar.Count))
Dim RevivirRemisiones As Boolean = Not EsRefacturacion AndAlso ((TieneRemisionesRelacionadas AndAlso ListaRemisionesCancelar Is Nothing) OrElse (ListaRemisionesCancelar IsNot Nothing AndAlso DtRemisionesRelacionadas.Rows.Count > ListaRemisionesCancelar.Count))
'REMISION YA SE DEBE HACER POR EL PROCESO DE DEVOLUCION DE ALMACEN
If Not EsRefacturacion AndAlso (ObjFactura.SaldoAlmacen <> 0 AndAlso ObjFactura.EsDevolucionVenta.Contiene(0, 1)) AndAlso Not (RealizarDevolucionAlmacen.Contiene(1, 2)) And RevivirRemisiones = False Then

View File

@@ -1362,6 +1362,8 @@ Partial Class Compras_Compras
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
'ImgBtnBuscarOC.Attributes.Add("data-toggle", "tooltip")
'ImgBtnBuscarOC.Attributes.Add("data-placement", "top")
@@ -17609,10 +17611,15 @@ Partial Class Compras_Compras
If TxtDescuento.Text.ToDouble > 0 Then TrDescuento.Visible = True
If ActualizaTotales And (UsuarioActual.CveEmpresa = 72 Or Not CveCompraFactura > 0) Then
TxtTotal.Text = Total.ToString.FormatoNumero()
If CveCompra > 0 AndAlso CveCompraFactura = 0 Then
If Not (CveFactura > 0 And CveCompra <= 0) Then
TxtTotal.Text = Total.ToString.FormatoNumero()
ElseIf CveCompra > 0 AndAlso CveCompraFactura = 0 Then 'Compra manual que ya estaba registrada
TxtTotal.Text = Total.ToString.FormatoNumero()
TxtIVA.Text = IVA.ToString.FormatoNumero()
End If
End If
Else

View File

@@ -238,7 +238,7 @@ Partial Class PopUpVerFactura
Dim CveEmpresa As Integer = UsuarioActual.CveEmpresa
Dim RutaEmpresa As String = UsuarioActual.Empresa.Ruta
Dim indemnizacion As Boolean = Request("indemnizacion").ToString.ToEntero() = 1
GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa, indemnizacion)
GeneraPDFNomina(Request("CvePersonal").ToString.ToEntero(), Request("CvePeriodo").ToString.ToEntero(), CveEmpresa, RutaEmpresa)
End If
If Request("onlyPrint").ToString() = "Pallet" AndAlso Not IsNothing(Request("CvePallet")) Then
imprimirpallet2(Request("CvePallet").ToString.ToEntero())
@@ -1741,6 +1741,7 @@ Partial Class PopUpVerFactura
If ObjVta.GetVta_Cortes("-1", "-1", -1, CveCorte, UsuarioActual.CveEmpresa, -1) AndAlso ObjVta.DtResultados.Rows.Count > 0 Then
FechaConsulta = ObjVta.DtResultados.FiltroPrimeroValor("FechaInicial").ToString().ToDate().Date
CveSubProyecto = ObjVta.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero()
Nombre = ObjVta.DtResultados.FiltroPrimeroValor("UsuarioNombre").ToString
End If
End Using
End If
@@ -1761,7 +1762,7 @@ Partial Class PopUpVerFactura
If RowInfo IsNot Nothing Then
Fecha = RowInfo("FechaInicial").ToString
Nombre = RowInfo("Nombre").ToString
End If
End If
@@ -2887,6 +2888,7 @@ Partial Class PopUpVerFactura
Dim CvePrePoliza As Integer = ObjInventarios.DtResultados.FiltroPrimeroValor("CvePrePoliza").ToEntero
Dim DireccionCliente As String = ObjInventarios.DtResultados.FiltroPrimeroValor("DireccionCliente")
Dim Ruta As String = ""
Dim Supervisor As String = ""
@@ -2910,6 +2912,8 @@ Partial Class PopUpVerFactura
Dim CveMoneda As Integer = ObjInventarios.CveMoneda
Dim FolioVenta As String = ObjInventarios.FolioVenta
Dim FolioOC As String = ObjInventarios.FolioOC
Dim DescripcionOC As String = ObjInventarios.DescripcionOC
Dim FolioInterno As String = ObjInventarios.FolioInterno
Dim CveCliente As Integer = ObjInventarios.CveCliente
@@ -3090,7 +3094,7 @@ Partial Class PopUpVerFactura
PuestoEnrego, RazonSocial, ResponsableCarga, ResponsableRecibio, NombreCliente,
CantidadProductos:=CantidadProductos, CantidadUsados:=CantidadUsados, CveTipoAlmacen:=CveTipoAlmacen, NombreEntrego:=NombreEntrego,
CveConceptoMovRelacionado:=CveConceptoMovtoRelacionado, FolioRelacionado:=FolioRelacionado, UsuarioRegistro:=UsuarioCapturo,
Ruta:=Ruta, Supervisor:=Supervisor, Guia:=Guia, Consola:=Consola, DireccionCliente:=DireccionCliente)
Ruta:=Ruta, Supervisor:=Supervisor, Guia:=Guia, Consola:=Consola, DireccionCliente:=DireccionCliente, DescripcionOC:=DescripcionOC)
End Sub
Private Sub PUanacExtr(CveMoneda As Integer) 'preciounitario a moneda nacional o extranjera
@@ -3109,7 +3113,8 @@ Partial Class PopUpVerFactura
EstadoDestino As String, PaisDestino As String, CPDestino As String, FechaMovimiento As Date, NombreCapturo As String, PuestoRecibio As String, PuestoEntrego As String,
RazonSocial As String, ResponsableCarga As String, ResponsableRecibio As String, NombreCliente As String, Optional CantidadProductos As Decimal = 0, Optional CantidadUsados As Decimal = 0,
Optional CveTipoAlmacen As Integer = -1, Optional NombreEntrego As String = "", Optional CveConceptoMovRelacionado As Integer = -1, Optional FolioRelacionado As String = "", Optional UsuarioRegistro As String = "",
Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Guia As String = "", Optional Consola As String = "-1", Optional DireccionCliente As String = "")
Optional Ruta As String = Nothing, Optional Supervisor As String = Nothing, Optional Guia As String = "", Optional Consola As String = "-1", Optional DireccionCliente As String = "",
Optional DescripcionOC As String = "")
Select Case CveConcepto
@@ -3158,7 +3163,7 @@ Partial Class PopUpVerFactura
If UsuarioActual.CveEmpresa.Contiene(4, 145) Then
params.Add(New ReportParameter("FacturadoA", If(CveCompra > 0, dr("RazonSocial").ToString, "")))
End If
If UsuarioActual.CveEmpresa.Contiene(119, 199, 201) Then
If UsuarioActual.CveEmpresa.Contiene(119, 199, 201, 13) Then
params.Add(New ReportParameter("LogoPath", RutaImagenLogo))
params.Add(New ReportParameter("RazonSocialOC", RazonSocialOC))
@@ -3171,12 +3176,16 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("NombreProveedor", If(CveCompra > 0, dr("RazonSocial").ToString, "")))
End If
If UsuarioActual.CveEmpresa.Contiene(13) Then
params.Add(New ReportParameter("DescripcionOC", DescripcionOC))
End If
Dim ConceptoFormato As String = "ENTRADA DE ALMACÉN"
If CveConcepto = 32 Then ConceptoFormato = "ENTRADA POR AJUSTE"
If CveConcepto = 33 Then ConceptoFormato = "ENTRADA MANUAL"
'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH
If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145, 146, 186, 193, 189, 199, 201) Then
If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145, 146, 186, 193, 189, 199, 201, 13) Then
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Concepto", ConceptoFormato))
params.Add(New ReportParameter("Almacen", Almacen))

View File

@@ -136,9 +136,9 @@
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
<Columns>
<%--0--%>
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="RazonSocial" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" Target="_blank" ItemStyle-Width="30%" />
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="RazonSocial" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" Target="_blank" />
<%--1--%>
<asp:HyperLinkField HeaderText="SerieFolio" DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" Target="_blank" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField HeaderText="SerieFolio" DataTextField="SerieFolio" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" Target="_blank" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left" />
<%--2--%>
<asp:TemplateField Visible="false" HeaderText="Folio Fiscal">
<ItemTemplate>
@@ -149,7 +149,7 @@
<%--3--%>
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<%--4--%>
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%" />
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" />
<%--5--%>
<asp:HyperLinkField HeaderText="Folio" DataTextField="FolioIE" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" Target="_blank" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<%--6--%>

View File

@@ -105,9 +105,9 @@ Partial Class Compras_RepComplementoPago
GvDatos.Columns(2).Visible = ChkFolioFiscal.Checked
If ChkFolioFiscal.Checked Then
GvDatos.Columns(0).ItemStyle.Width = 15%
'GvDatos.Columns(0).ItemStyle.Width = 15%
Else
GvDatos.Columns(0).ItemStyle.Width = 30%
'GvDatos.Columns(0).ItemStyle.Width = 30%
End If
UpDatos.Update()
@@ -240,7 +240,7 @@ Partial Class Compras_RepComplementoPago
SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto)
GvDatos.ExportToExcelGembox("RepComplementos_" & NowADS().ToShortDateString, UsuarioActual, "Ordenes de Servicio Medicas", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
GvDatos.ExportToExcelGembox("RepComplementos_" & NowADS().ToShortDateString, UsuarioActual, "Reporte de Complementos Pago de Compras", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
End Sub
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)

View File

@@ -103,7 +103,7 @@
</asp:GridView>
<br />
<asp:GridView runat="server" ID="GvGlobal" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover ScrollAD"
DataKeyNames="CveEmpresa,CveCuenta,CveConceptoContable,CveCuentaAsignacion,CveConceptoNomina, CveProveedor,CveClasificacion,CveAlmacen, IdCuenta, PorcentajeIVA, CveBancoCuenta, CveCliente, CvePersonal" AutoGenerateColumns="False"
DataKeyNames="CveCuentaGlobal, CveEmpresa,CveCuenta,CveConceptoContable,CveCuentaAsignacion,CveConceptoNomina, CveProveedor,CveClasificacion,CveAlmacen, IdCuenta, PorcentajeIVA, CveBancoCuenta, CveCliente, CvePersonal" AutoGenerateColumns="False"
Style=" width:100%" GridLines="None" Caption="Globales">
<Columns>
<asp:BoundField DataField="ConceptoContable" ItemStyle-Width="250px" HeaderText="Concepto Contable" />
@@ -111,7 +111,7 @@
<asp:BoundField DataField="CuentaCodigo" ItemStyle-Width="100px" HeaderText="Código Cuenta" />
<asp:BoundField DataField="CuentaNombre" HeaderText="Nombre Cuenta" />
<asp:BoundField DataField="PorcentajeImpuesto" HeaderText="%" />
<asp:BoundField DataField="Colectiva" HeaderText="-" />
<asp:TemplateField ItemStyle-Width="49px">
<ItemTemplate>
<asp:LinkButton ID="ImgEliminar" runat="server" AlternateText="Eliminar" CausesValidation="False" OnClick="EliminarRowGlobal" CommandName="Delete" CssClass="btn btn-circle btn-xs red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
@@ -238,7 +238,7 @@
<div class="col-md-1" style="width:50%;text-align:left">
<div class="form-group form-md-line-input input-iconright">
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:DropDownList ID="DdlConceptoGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo2" ></asp:DropDownList>
<asp:DropDownList ID="DdlConceptoGlobal" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="ConceptoContable" DataValueField="CveConceptoContable" Width="240px" ValidationGroup="GrpModulo2" OnSelectedIndexChanged="DdlConceptoGlobal_SelectedIndexChanged" ></asp:DropDownList>
<label for="<%= DdlConceptoGlobal.ClientID.ToString()%>">Concepto Contable: </label>
</div>
</div>
@@ -261,7 +261,21 @@
<label for="<%= DdlCuentaGlobal.ClientID.ToString()%>">Cuenta Contable: </label>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6" style="width:50%;text-align:left">
<div class="form-group form-md-line-input input-iconright" id="divGlobalColectiva" runat="server" visible="false">
<asp:DropDownList ID="DdlGlobalColectiva" CssClass="form-control input-sm select2me js-cuenta-programmatic select2me" runat="server" DataTextField="Colectiva" DataValueField="CveColectiva" Width="240px" ValidationGroup="GrpModulo" Enabled="false"></asp:DropDownList>
<label for="<%= DdlColectivas.ClientID.ToString()%>">Colectivas: </label>
</div>
</div>
<div class="col-md-6" style="width:50%;text-align:left">
<div class="form-group form-md-line-input input-iconright" id="divGlobalPorcentajeIVA" runat="server" visible="false">
<asp:TextBox ID="TxtGlobalPorcentajeIVA" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true" style="width:100%"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtGlobalPorcentajeIVA" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'¨PorcentajeIVA''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModulo" Enabled="false"></asp:RequiredFieldValidator>
<label for="<%= TxtGlobalPorcentajeIVA.ClientID.ToString()%>">PorcentajeIVA:</label>
</div>
</div>
</div>
<div class="modal-footer">
<asp:LinkButton ID="LBAgregaGlobal" runat="server" class="btn btn-success" Text="Agregar" OnClick="LBAgregaGlobal_Click" ValidationGroup="GrpModulo2" />

View File

@@ -203,7 +203,6 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
RegistraScript("$('#ModalCat').modal();")
End If
End Sub
Private Sub RecargaConcepto(CveConceptoContable As Integer)
@@ -268,10 +267,13 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Dim ObjG As New ClsGenerales
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
DdlColectivas.DataSource = ObjG.DtResultados
DdlGlobalColectiva.DataSource = ObjG.DtResultados
End If
ObjG.Dispose()
DdlColectivas.DataBind()
DdlGlobalColectiva.DataBind()
DdlColectivas.Items.Insert(0, New ListItem("-", "-1"))
DdlGlobalColectiva.Items.Insert(0, New ListItem("-", "-1"))
If OpAgregar Then
DdlColectivas.Enabled = True
@@ -303,8 +305,8 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Protected Sub EliminarRowGlobal(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
Dim ObjConta As New ClsContabilidad
If ObjConta.RemoveCuentasGlobales(GvRow.DataKey("CveConceptoContable").ToEntero, GvRow.DataKey("CveEmpresa").ToEntero) Then
Alert("se elimino correctamente")
If ObjConta.RemoveCuentasGlobales(GvRow.DataKey("CveCuentaGlobal").ToEntero, GvRow.DataKey("CveEmpresa").ToEntero) Then
Alert("Se elimino correctamente")
End If
CargaDatosSistema()
UpDatos.Update()
@@ -401,7 +403,7 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
Dim ErrorString As String = ""
Dim ObjConta As New ClsContabilidad
If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
If Not ObjConta.AddCuentasGlobales(DdlConceptoGlobal.SelectedValue.ToEntero, DdlCuentaGlobal.SelectedValue.ToEntero, DdlTipoGlobal.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, TxtGlobalPorcentajeIVA.Text.ToDecimal, DdlGlobalColectiva.SelectedValue.ToEntero) Then
ErrorString = "Error al agregar"
End If
ObjConta.Dispose()
@@ -432,4 +434,46 @@ Partial Class Contabilidad2_CatCuentasAsignaciones
ObjConta.Dispose()
DdlCuentaGlobal.DataBind()
End Sub
Protected Sub DdlConceptoGlobal_SelectedIndexChanged(sender As Object, e As EventArgs)
RecargaConceptoGlobal(DdlConceptoGlobal.SelectedValue.ToEntero)
End Sub
Private Sub RecargaConceptoGlobal(CveConceptoContable As Integer)
Dim Dr As DataRow = GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimero("")
If Dr IsNot Nothing Then
'divCliente.Visible = Boolean.Parse(Dr("AplicaCliente").ToString)
'divProveedor.Visible = Boolean.Parse(Dr("AplicaProveedor").ToString)
'divPersonal.Visible = Boolean.Parse(Dr("AplicaPersonal").ToString)
divGlobalPorcentajeIVA.Visible = Boolean.Parse(Dr("AplicaImpuesto").ToString)
'divClasificacion.Visible = Boolean.Parse(Dr("AplicaClasificacion").ToString)
'divBancos.Visible = Boolean.Parse(Dr("AplicaBancos").ToString)
'divAlmacen.Visible = Boolean.Parse(Dr("AplicaAlmacen").ToString)
'divSubProyectos.Visible = Boolean.Parse(Dr("AplicaSubProyecto").ToString)
'divActivoFijo.Visible = Boolean.Parse(Dr("AplicaActivoFijo").ToString)
'divCredito.Visible = Boolean.Parse(Dr("AplicaCredito").ToString)
divGlobalColectiva.Visible = Boolean.Parse(Dr("AplicaColectiva").ToString)
If Dr("AplicaColectiva").ToString = "True" Then
Dim dtt As DataTable = Nothing
Dim ObjG As New ClsGenerales
If ObjG.GetColectivas(UsuarioActual.CveEmpresa, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
dtt = ObjG.DtResultados
End If
If ObjG.GetColectivas(0, CveConceptoContable:=DdlCconceptosContables.SelectedValue.ToEntero) Then
dtt.Merge(ObjG.DtResultados)
End If
DdlGlobalColectiva.DataSource = dtt
ObjG.Dispose()
DdlGlobalColectiva.DataBind()
DdlGlobalColectiva.Items.Insert(0, New ListItem("-", "-1"))
DdlGlobalColectiva.Enabled = True
End If
End If
End Sub
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -2139,14 +2139,12 @@ Partial Class Inventarios_EntradasSalidas
Dim CveClasificacion As Integer = -1
Select Case DdlConcepto.SelectedValue.ToEntero
Case 2, 32
EsContabilizable = True
Case 28
CveConceptoContable = 78
EsContabilizable = True
Case 28, 31
Case 31
CveConceptoContable = 290
If DdlConcepto.SelectedValue.ToEntero = 28 Then
''cuando es 28, es otros ingresos.78
CveConceptoContable = 78
End If
EsContabilizable = True
Case 30
CveConceptoContable = 181

View File

@@ -16,7 +16,7 @@ Partial Class Nom_CatSatConceptos
End Sub
Public Sub CargaDatos()
Dim ObjConceptos As New ClsNominas
Dim GetConceptoSAT As New ClsNominas
If ObjConceptos.GetConceptos() Then
ViewState("DTConceptos") = ObjConceptos.DtResultados
GlobalDTNomSatConceptos = ObjConceptos.DtResultados

View File

@@ -265,7 +265,7 @@ public partial class Nomina_CatConcepto : ClsPaginas
{
using (ClsNominas objnom = new ClsNominas())
{
objnom.GetConceptos();
objnom.GetConceptoSAT();
DdlConceptoSAT.DataSource = objnom.DtResultados;
}

View File

@@ -7,7 +7,13 @@
#pnlIncapacidade .form-group.form-md-line-input > .select2-container {
margin-top: 20px;
}
#C_UpModalConceptos > .modal-content{
height: calc(100vh - 50px) !important;
}
#C_UpModalConceptos > .modal-content > .modal-body {
height: calc(100vh - 150px);
overflow-y: auto;
}
.lnkMovotPermanente {
width: 100%;
color: #111;
@@ -444,7 +450,7 @@
<asp:DropDownList ID="DdlRegimenContratacion" runat="server" Style="width: 100% !important;" CssClass="select2me">
<asp:ListItem Text="Asalariados" Value="1"></asp:ListItem>
<asp:ListItem Text="Asimilados" Value="2"></asp:ListItem>
<asp:ListItem Text="Todos" Value="3"></asp:ListItem>
<asp:ListItem Text="Todos" Value="3" Selected="True"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 compoonenlabel" style="line-height: 1; max-width: 85px;">Tipo Trabajador:</label>
@@ -1364,6 +1370,49 @@
<asp:CheckBox ID="ChkFonacot" CssClass="chksino" runat="server" Text=" " />
</div>
</div>
<asp:GridView ID="GVFonacotDetalle" runat="server" GridLines="None" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" BorderWidth="1" BorderColor="#D3D3D3" CellSpacing="0" Width="100%" AutoGenerateColumns="False" data-heighterror="600"
DataKeyNames="CveTipo,Nombre,Concepto,CveFonacot,FechaFin,CvePeriodo,NoPagos,ImportePagos,Pagado,Total,Saldo,Fecha">
<Columns>
<asp:TemplateField HeaderText="Nombre">
<ItemTemplate>
<asp:Label ID="lblnombre" runat="server" Text='<%# Eval("Nombre")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha">
<ItemTemplate>
<asp:Label ID="lblfecha" runat="server" Text='<%# Eval("Fecha")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="No Pagos">
<ItemTemplate>
<asp:Label ID="lblnoPagos" runat="server" Text='<%# Eval("NoPagos")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Importe Pago">
<ItemTemplate>
<asp:Label ID="lblimportePagos" runat="server" Text='<%# Eval("ImportePagos", "{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Pagado">
<ItemTemplate>
<asp:Label ID="lblpagado" runat="server" Text='<%# Eval("Pagado", "{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Total">
<ItemTemplate>
<asp:Label ID="lbltotal" runat="server" Text='<%# Eval("Total", "{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo">
<ItemTemplate>
<asp:Label ID="lblsaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
@@ -5259,7 +5308,7 @@
</div>
</div>
<asp:GridView ID="GvPersonalizarExcel" DataKeyNames="Columna,ColumnaDB,Tipo,TipoDB" runat="server" GridLines="None" Width="100%" CellSpacing="0"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False">
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" data-heighterror="460">
<Columns>
<asp:BoundField DataField="Columna" HeaderText="Columna" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" />
<%--<asp:BoundField DataField="Tipo" HeaderText="Tipo" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" />--%>

View File

@@ -236,6 +236,16 @@ public partial class Nomina_Nomina2 : ClsPaginas
set { ViewState["CveTipoTrabajador"] = value; }
}
protected int posconceptospersonalizar
{
get
{
if (ViewState["posconceptospersonalizar"] == null) { return 0; }
else { return ViewState["posconceptospersonalizar"].ToString().ToEntero(); }
}
set { ViewState["posconceptospersonalizar"] = value; }
}
protected int CvePeriodoSeleccionado
{
@@ -440,6 +450,9 @@ public partial class Nomina_Nomina2 : ClsPaginas
DdlBanco.DataSource = GlobalDTNomSatBancos;
DdlBanco.DataBind();
if(UsuarioActual.CveEmpresa == 119) DdlRegimenContratacion.SelectedValue = "1";
//Permisos
if (UsuarioActual.TienePermisoProceso(82))
{
@@ -4137,6 +4150,12 @@ public partial class Nomina_Nomina2 : ClsPaginas
periodo = 20000101;
LimpiarFonacot();
using (ClsNominas ObjMovt = new ClsNominas())
{
ObjMovt.GetFonacotSaldos(UsuarioActual.CveEmpresa, SRCvePersonal, CveFonacot);
GVFonacotDetalle.DataSource = ObjMovt.DtResultados;
GVFonacotDetalle.DataBind();
}
TxtFonValor.Text = importeFijo.ToString();
TxtFonImporteCredito.Text = importeCredito.ToString();
TxtFonPagosHechos.Text = pagosHechos.ToString();
@@ -4941,12 +4960,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
addcoltopersonalizar("Sueldo diario", "0", "", "");
addcoltopersonalizar("Dias Pen Pago", "0", "", "");
int pos = 4;
foreach (DataRow row in dtConceptos.FiltraParametros("Tipo ='P' AND EsPadre = 1 AND EsFormula =0").Rows)
{
if (!(dtempleados.SUM(string.Format("[V_{0}]", row["CveConcepto"].ToString())) == 0))
{
addcoltopersonalizar(row["Concepto"].ToString(), "1", string.Format("[V_{0}]", row["CveConcepto"].ToString()), row["Codigo"].ToString());
pos = pos + 1;
}
}
@@ -4965,7 +4985,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
//addcoltopersonalizar("Deducciones", "1", "Deducciones", "");
addcoltopersonalizar("Neto a Pagar", "1", "Total", "");
posconceptospersonalizar = pos;
//foreach (DataRow row in dtConceptos.FiltraParametros("Tipo = 'O' AND EsPadre = 1 AND EsFormula =0").Rows)//EsFormula =0
//{
@@ -5007,7 +5027,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
drorden["Tipo"] = "0";
drorden["ColumnaDB"] = DdlMOPXColumna.SelectedItem.Value;
//drorden["TipoDB"] = DdlMOTipo.SelectedItem.Value;
DtNomPersonalizarxls.Rows.Add(drorden);
DtNomPersonalizarxls.Rows.InsertAt(drorden, posconceptospersonalizar);
}
GvPersonalizarExcel.DataSource = DtNomPersonalizarxls;
@@ -5103,7 +5123,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
ClosedXML.Excel.XLColor colororange = ClosedXML.Excel.XLColor.FromArgb(247, 150, 70);
ClosedXML.Excel.XLColor colororangeblue = ClosedXML.Excel.XLColor.FromArgb(79, 129, 189);
ClosedXML.Excel.IXLCell celda;
DataTable dtConceptos = this.dtConceptos.FiltraParametros("(Tipo ='P' AND EsPadre = 1 AND EsFormula =0) OR (Tipo = 'D' AND EsPadre = 1 AND EsFormula =0) OR Tipo = 'O' AND EsPadre = 1 AND EsFormula =0");
DataTable dtConceptos = this.dtConceptos.FiltraParametros("");
DataTable dtFiltrado = dtConceptos.Clone(); // Clonar la estructura del DataTable
foreach (GridViewRow row in GvPersonalizarExcel.Rows)
@@ -5196,7 +5216,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
int finPercepciones = iniciotipe;
column++;
TitleRange(libro, "Incapacidad", filainicio + 2, column, filainicio + 2, column+2, false, false, PercborderColor);
TitleRange(libro, "Incapacidad", filainicio + 2, column, filainicio + 2, column, false, false, PercborderColor);
TitleRange(libro, "Perm. Faltas", filainicio + 3, column, filainicio + 3, column, false, false, PercborderColor);
//column++;
//TitleRange(libro, "Permisos", filainicio + 3, column, filainicio + 3, column, false, false, colororangeblue);
@@ -5353,6 +5373,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
column++;
libro.Cell(Fila, column).Value = "";
try{libro.Cell(Fila, column).Value = erow[string.Format("V_{0}", 6817)];
libro.Cell(Fila, column).Style.NumberFormat.Format = "#,##0.00;-#,##0.00;\"\"";
}
catch (Exception) { }
column++;
libro.Cell(Fila, column).Value = erow["SalarioDiario"];
@@ -9568,14 +9592,14 @@ public partial class Nomina_Nomina2 : ClsPaginas
}
}
pdf = GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta);
if (confiniquito)
{
List<byte[]> pdfs = new List<byte[]>();
pdfs.Add(pdf);
pdfs.Add(GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta, true));
pdf = MergeFiles(pdfs);
//if (confiniquito)
//{
// List<byte[]> pdfs = new List<byte[]>();
// pdfs.Add(pdf);
// pdfs.Add(GeneraPDFNomina(CvePersonal, CvePeriodo, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.Ruta, true));
// pdf = MergeFiles(pdfs);
}
//}
}
else
{

View File

@@ -5133,7 +5133,7 @@
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" id="div3" runat="server">
<asp:CheckBox ID="ChkEstatusPagoE" runat="server" AutoPostBack="true" OnCheckedChanged="ChkPagoElectronico_CheckedChanged"></asp:CheckBox>
<asp:CheckBox ID="ChkEstatusPagoE" runat="server" ></asp:CheckBox>
<label for="<%= ChkEstatusPagoE.ClientID.ToString()%>">Pago Electronico</label>
</div>
</div>

View File

@@ -924,7 +924,7 @@ Partial Class RH_Personal
End If
LnkContratoAgropecuaria.Visible = (UsuarioActual.CveEmpresa.Contiene(1, 158))
Using objno As New ClsNominas
objno.GetConceptos()
objno.GetConceptos(UsuarioActual.CveEmpresa)
dtNomConceptos = objno.DtResultados
objno.GetSubTipoPeriodo(UsuarioActual.CveEmpresa)
dtSubTipoPeriodo = objno.DtResultados
@@ -3447,7 +3447,6 @@ Partial Class RH_Personal
Row("CLABE") = TxtCLABECB.Text.Trim
Row("SWIFT") = TxtSWIFT.Text
Row("Plaza") = TxtPlaza.Text
Row("Cuenta") = TxtNumeroSucursal.Text
Row("CIE") = TxtConvenioCIE.Text
Row("Referencia") = TxtReferenciaC.Text
Row("RefCrediProveedor") = TxtRefCrediProveedor.Text
@@ -8455,13 +8454,13 @@ Partial Class RH_Personal
'End Sub
Protected Sub ChkPagoElectronico_CheckedChanged(sender As Object, e As EventArgs)
'Protected Sub ChkPagoElectronico_CheckedChanged(sender As Object, e As EventArgs)
'If ChkEstatusPagoE.Checked Then
' Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la plataforma", TipoMensaje.MsgAdvertencia)
'End If
' 'If ChkEstatusPagoE.Checked Then
' ' Alert("Se está activando manualmente el pago por Layout BBVA. Recuerde que la alta se realiza directo en la plataforma", TipoMensaje.MsgAdvertencia)
' 'End If
End Sub
'End Sub
End Class

View File

@@ -624,24 +624,24 @@ Partial Class RepContratoDetalle
End If
End If
'If Not ErrorProceso AndAlso Not CveVentaRemision > 0 AndAlso ChkEsPresupuestal.Checked = False Then
' 'CveVentaRemision
' Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{TxtFolio.Text}"
If Not ErrorProceso AndAlso Not CveVentaRemision > 0 AndAlso ChkEsPresupuestal.Checked = False Then
'CveVentaRemision
Dim ObsRemisionPartida As String = $"{DdlTipoAF.SelectedItem.Text}-{ TxtDescripcion.Text}-{TxtFolio.Text}"
' Dim Respuesta As New RespuestaFacturacion()
' Dim CvePS As Integer = 907784
' Respuesta = GeneraRemision(CveContrato, ObsRemisionPartida, TxtImporte.Text.ToDecimal, CvePS, ObjContratos.IniciaTransacSQL, DdlSubProyecto.SelectedValue.ToEntero)
Dim Respuesta As New RespuestaFacturacion()
Dim CvePS As Integer = 907784
Respuesta = GeneraRemision(CveContrato, ObsRemisionPartida, TxtImporte.Text.ToDecimal, CvePS, ObjContratos.IniciaTransacSQL, DdlSubProyecto.SelectedValue.ToEntero)
' If Respuesta.CveVenta > 0 Then
' CveVentaRemision = Respuesta.CveVenta
' SerieFolioRemision = Respuesta.SerieFolio
' ErrorProceso = False
' SeGeneroRemision = True
' Else
' ErrorProceso = True
' Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia)
' End If
'End If
If Respuesta.CveVenta > 0 Then
CveVentaRemision = Respuesta.CveVenta
SerieFolioRemision = Respuesta.SerieFolio
ErrorProceso = False
SeGeneroRemision = True
Else
ErrorProceso = True
Alert("se presento un error al generar la remisión", TipoMensaje.MsgAdvertencia)
End If
End If
If Not ErrorProceso Then
ObjContratos.Commit()

View File

@@ -73,9 +73,9 @@ Partial Class ListadoContratos
Private Sub CargaDatos()
Dim ObjContratos As New ClsContratos
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, MinFecha, MaxFecha, DdlCliente.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, CveSubProyecto:=DdlCentroCostos.SelectedValue.ToEntero, CveTipoAF:=DdlTipoUnidad.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero,
FechaInicioIngreso:=txtFechaI.Text.ToDate, FechaFinIngreso:=txtFechaF.Text.ToDate) Then
GvContratos.DataSource = ObjContratos.DtResultados
If ObjContratos.GetContratosReporte(UsuarioActual.CveEmpresa, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlCliente.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, CveSubProyecto:=DdlCentroCostos.SelectedValue.ToEntero, CveTipoAF:=DdlTipoUnidad.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero) Then
GvContratos.DataSource = ObjContratos.DtResultados.FiltraParametros($"FechaInicial >= '{txtFechaI.Text.ToDate.ToString("yyyy/MM/dd")}'", "FechaInicial")
DtDatos = ObjContratos.DtResultados.Copy
End If
@@ -165,22 +165,17 @@ Partial Class ListadoContratos
Dim tempArray() As String
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
Dim fDestino = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", $"{CveContrato.ToString}.{ FileExtension}")
Try
If File.Exists(fDestino) Then
File.Delete(fDestino)
End If
File.Move(fileItem.FileUrl, fDestino)
If Not File.Exists(fDestino) Then
ErrorProceso = True
End If
If ObjContratos.UpdateContratoArchivo(CveContrato, $"{CveContrato.ToString}.{ FileExtension}", UsuarioActual.CveEmpresa) Then
ErrorProceso = False
End If
Catch ex As Exception
ErrorProceso = True
End Try
@@ -222,7 +217,6 @@ Partial Class ListadoContratos
End If
End If
If Not ErrorProceso Then
ObjContratos.Commit()
@@ -323,7 +317,6 @@ Partial Class ListadoContratos
If Not Directory.Exists(folderContratosPath) Then
Directory.CreateDirectory(folderContratosPath)
End If
If Not Directory.Exists(Path.Combine(folderContratosPath, "Temp")) Then
Directory.CreateDirectory(Path.Combine(folderContratosPath, "Temp"))
End If
@@ -334,26 +327,20 @@ Partial Class ListadoContratos
Session("FileExtension") = FileExtension
Dim tempArray() As String
tempArray = fileItem.filename.ToString().Split("-".ToCharArray())
ViewState("extencion") = FileExtension
ViewState("FUrl") = Path.Combine(UsuarioActual.Empresa.Ruta, "Contratos", "Temp", fileItem.filename)
File.Move(fileItem.FileUrl, ViewState("FUrl").ToString)
LbArchivo.Text = tempArray(1)
Next
UpModal.Update()
RegistraScript("$('#ModalUpload').modal('hide')", "hidemodal1")
End Sub
#End Region
#Region "G E N E R A R E M I S O N"
Private Function GeneraRemision(CveContrato As Integer, ObsPartida As String, Importe As Decimal, CvePS As Integer, ByRef TransaccionSQL As SqlClient.SqlTransaction) As RespuestaFacturacion
Dim Respuesta As New RespuestaFacturacion()
@@ -366,7 +353,6 @@ Partial Class ListadoContratos
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyecto, DdlClientes.SelectedValue.ToEntero, CveMoneda, "Rem")
If ObjFactura IsNot Nothing AndAlso ProcesoOK Then
ObjFactura.CveMoneda = CveMoneda
ObjFactura.CveContrato = CveContrato
ObjFactura.Observaciones = ObsPartida
@@ -433,8 +419,6 @@ Partial Class ListadoContratos
End Sub
End Class
#End Region
Protected Sub LnkAgregarContrato_Click(sender As Object, e As EventArgs)
@@ -442,7 +426,4 @@ Partial Class ListadoContratos
RegistraScript("$('#ModalAgregar').modal({ backdrop: 'static', keyboard: false });")
UpTitulos.Update()
End Sub
End Class

View File

@@ -731,23 +731,23 @@
<ContentTemplate>
<asp:Button runat="server" ID="BtnModal" OnClick="MostrarModal"></asp:Button>
<asp:HiddenField runat="server" ID="HdnCveContrato" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HdnCveVentaRemision" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HdnNumContrato" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidModClienteNombre" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidModCveCliente" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCurrentMonth" ClientIDMode="Static" Value="-1" />
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
<asp:HiddenField runat="server" ID="HidCveTipoAF" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidNumChoferes" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidRemisionSerieFolio" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidRemisionSaldo" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCveAF" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCveAFDes" Value="-1" ClientIDMode="Static" />
<%--<asp:Button runat="server" ID="BtnDdlTipoAF" OnClick="BtnDdlTipoAF_Click" ClientIDMode="Static"></asp:Button>--%>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<asp:HiddenField runat="server" ID="HdnNumContrato" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidModClienteNombre" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidModCveCliente" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCurrentMonth" ClientIDMode="Static" Value="-1" />
<asp:HiddenField runat="server" ID="HidCurrentYear" ClientIDMode="Static" Value="-1" />
<asp:HiddenField runat="server" ID="HidCveTipoAF" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidNumChoferes" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidRemisionSerieFolio" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCveVentaRemision" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidRemisionSaldo" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCveAF" Value="-1" ClientIDMode="Static" />
<asp:HiddenField runat="server" ID="HidCveAFDes" Value="-1" ClientIDMode="Static" />
<div style="display:none!important">
<asp:UpdatePanel runat="server" ID="UPCargaCalendario">
<ContentTemplate>
@@ -1236,11 +1236,7 @@
setTimeout(() => {
// dateAxis.zoomToDates(new Date(anioI, mesI, diaI), new Date(anioF, mesF, diaF));
}, 1500);
}
var PrimeraCargaCalendario = true;
var currentUpdateEvent;
@@ -1257,20 +1253,15 @@
let anio = parseInt($('#<%=HidCurrentYear.ClientID%>').val());
Calendario(mes, anio);
});
}
function selectDate(start, end, allDay) {
}
function updateEvent(event, element, esCalendario = true) {
function updateEvent(event, element, esCalendario = true) {
$('#<%=HdnCveContrato.ClientID%>').val(event.id);
$('#BtnCargaContratoCalendario').click();
$('#BtnCargaContratoCalendario').click();
}
function formatearFechaISO(fechaISO) {

View File

@@ -5,6 +5,7 @@ Imports ADSNetLibrary.SIGAPI.Helpers
Imports Extensiones.ModExtensiones
Imports GemBox.Spreadsheet
Imports Microsoft.Reporting.WebForms
Imports Modelos
Imports Newtonsoft.Json.Linq
Partial Class RepContratosCalendario
@@ -301,19 +302,13 @@ Partial Class RepContratosCalendario
Dim CvePadre As Integer = -1
For Each dRowUnidad As DataRow In DtUnidades.Rows
Dim CveActivoFijo As Integer = dRowUnidad("CveActivoFijo").ToString.ToEntero
Dim CodigoAF As String = dRowUnidad("Codigo").ToString
'Dim unidad As String = $"{dRowUnidad("Codigo").ToString}-{dRowUnidad("Descripcion").tostring}"
Dim SeEncontro As Boolean = False
Dim EsHijo As Boolean = False
For Each Row As DataRow In DtAvance.FiltraParametros("CodigoAF <> '' AND TipoEstatus <> 3").Rows
Dim CveActivoFijoContrato As Integer = Row("CveAF").ToString.ToEntero
'If CveActivoFijo = CveActivoFijoContrato Then
' str.AppendLine(String.Format("{0}", separator))
' SeEncontro = True
@@ -325,9 +320,6 @@ Partial Class RepContratosCalendario
' separator = ","
' encontrados = encontrados + 1
'End If
If CveActivoFijo = CveActivoFijoContrato Then
str.AppendLine(String.Format("{0}", separator))
SeEncontro = True
@@ -343,18 +335,15 @@ Partial Class RepContratosCalendario
separator, Row("CveContrato").ToString, Row("NumeroContrato").ToString().Replace("\\", "\\\\").Replace("""", "\"""), Row("FechaInicial"), Row("FechaFinal"), 0, 100, unidad, duracion, ColorAleatorio(randomNumber), Row("CodigoAF").ToString, Row("CveContrato").ToString)
)
End If
If Not EsHijo Then
CvePadre = Row("CveContrato").ToString.ToEntero
EsHijo = True
End If
separator = ","
encontrados = encontrados + 1
Else
EsHijo = False
End If
Next
If Not SeEncontro Then
@@ -365,18 +354,11 @@ Partial Class RepContratosCalendario
str.AppendLine(String.Format("{{id: {1}, text: ""{2}"", start_date: ""{3}"", end_date: ""{4}"", parent: {5}, progress:{6}, open: true, unidad: ""{7}"",duracion: ""{8}"", color: ""{9}"",codigoaf: ""{10}"", hidden: true}} ",
"", CveActivoFijo, -1, txtFechaF.Text.ToDate.ToString("yyyy/MM/dd HH:mm"), txtFechaF.Text.ToDate.ToString("yyyy/MM/dd HH:mm"), 0, 100, "", "", ColorAleatorio(randomNumber), CodigoAF))
separator = ","
End If
'str.AppendLine(String.Format("}"))
Next
End If
str.AppendLine("];loadGant();")
RegistraScript(str.ToString())
@@ -389,7 +371,6 @@ Partial Class RepContratosCalendario
Private Function ColorAleatorio(randomNumber As Random) As String
Dim listaColores As New List(Of String)
listaColores.Add("#94f35a")
listaColores.Add("#1989a9")
listaColores.Add("#5a3c98")
@@ -436,10 +417,7 @@ Partial Class RepContratosCalendario
listaColores.Add("#058106")
listaColores.Add("#0485f2")
listaColores.Add("#401685")
Dim ranNumber As Integer = randomNumber.Next(0, listaColores.Count - 1)
Return listaColores(ranNumber)
End Function
@@ -591,8 +569,6 @@ Partial Class RepContratosCalendario
DdlTipoAF.SelectedValueExist(DRow("CveTipoAF").ToString)
DdlTipoAF_SelectedIndexChanged(Nothing, Nothing)
If DRow("CveAF").ToString.ToEntero > 0 Then
Dim ExisteItem As Boolean = False
For Each item As ListItem In DdlAF.Items
@@ -607,10 +583,7 @@ Partial Class RepContratosCalendario
DdlAF.Items.Add(New ListItem(TmpItemText, $"{DRow("CveAF").ToString}"))
End If
End If
DdlAF.SelectedValueExist(DRow("CveAF").ToString)
HidCveAF.Value = "-1"
HidCveAFDes.Value = ""
If DRow("CveAF").ToString.ToEntero > 0 Then
@@ -619,10 +592,9 @@ Partial Class RepContratosCalendario
End If
TxtMotivoCambioUnidad.Text = ""
DVMotivoCambioAF.Visible = False
HypRemision.Text = DRow("RemisionSerieFolio").ToString
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={DRow("CveVentaRemision").ToString}"
HdnCveVentaRemision.Value = DRow("CveVentaRemision").ToString
If DRow("RemisionSaldo").ToString.ToDecimal > 0 Then
LblSaldo.Text = $"Saldo {DRow("RemisionSaldo").ToString.ToDecimal.ToString("###,###,###.00")}"
@@ -642,15 +614,8 @@ Partial Class RepContratosCalendario
Else
Alert("Contrato no especificado", TipoMensaje.MsgAdvertencia)
End If
End Sub
Protected Sub UpdateContrato(sender As Object, e As EventArgs)
Dim TieneError As Boolean = False
Dim NumChoferes As Integer = If(chkSegundoChofer.Checked, 2, 1)
@@ -662,6 +627,7 @@ Partial Class RepContratosCalendario
Dim ObjContratos As New ClsContratos
Dim objGenerales As New ClsGenerales(ObjContratos.IniciaTransacSQL())
Dim ObjVentas As New ClsVentas(ObjContratos.IniciaTransacSQL())
Dim DTAgendadados As New DataTable
If ObjContratos.GetContratosValUnidadesAgendadas(DdlAF.SelectedValue.ToEntero, TxtFechaSalida.Text.ToDate, TxtFechaRegreso.Text.ToDate, UsuarioActual.CveEmpresa, CveContrato) Then
@@ -691,8 +657,22 @@ Partial Class RepContratosCalendario
-1, -1, -1, -1, "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False, TxtAnticipo.Text.ToDecimal, TxtPesos.Text.ToDecimal, TxtDolares.Text.ToDecimal, -1, 0, CveContratoTipo:=34,
CveContratosEstatus:=DdlEstatusContrato.SelectedValue.ToEntero, CveChofer:=DdlChofer.SelectedValue.ToEntero, CveChofer2:=DdlChofer2.SelectedValue.ToEntero, CveTipoAF:=DdlTipoAF.SelectedValue.ToEntero,
CveAF:=DdlAF.SelectedValue.ToEntero, CantidadPasajeros:=TxtCantidadPasajeros.Text.ToEntero, Observaciones:=TxtObservaciones.Text.Trim, NumChoferes:=NumChoferes) Then
RegistraScript("$('#ModalActualizar').modal('hide');")
Alert("Actualizado Correctamente.")
'cancelar la venta.
If DdlEstatusContrato.SelectedValue = "52" Then 'cancelación de Fact/Rem
Dim CancelacionPagos = OpcionesCancelacionPagos.ConPagos_GenerarIxC
Dim resp As Modelos.Factura.MCancelacionVentaMensaje = Nothing
Dim ObjFacturaCancelacion As New Modelos.Factura(UsuarioActual, HdnCveVentaRemision.Value.ToEntero, UsuarioActual.CveEmpresa, EsCancelacion:=True, VerificaAlmacen:=True)
If ObjFacturaCancelacion IsNot Nothing AndAlso ObjFacturaCancelacion.CveVenta > 0 Then
resp = ObjFacturaCancelacion.CancelarFactura(0, CancelacionPagos:=CancelacionPagos, ValidarSAT:=False)
If resp.HuboError Then
TieneError = True
Else
RegistraScript("$('#ModalActualizar').modal('hide');")
Alert("Actualizado Correctamente.")
End If
End If
End If
Else
TieneError = True
End If
@@ -702,10 +682,9 @@ Partial Class RepContratosCalendario
Else
ObjContratos.Commit()
End If
ObjContratos.Dispose()
objGenerales.Dispose()
ObjVentas.Dispose()
UpTitulos.Update()
CargaDatos()
InicializaCalendar()
@@ -726,20 +705,17 @@ Partial Class RepContratosCalendario
TxtFechaSalida.Text = Convert.ToDateTime(GvRow.DataKey("FechaInicial")).ToString("dd/MM/yyyy HH:mm:ss")
TxtFechaRegreso.Text = Convert.ToDateTime(GvRow.DataKey("FechaFinal")).ToString("dd/MM/yyyy HH:mm:ss ")
TxtMoneda.Text = GvRow.DataKey("Moneda")
TxtAnticipo.Text = GvRow.DataKey("ImporteMin")
TxtDolares.Text = GvRow.DataKey("Importe")
'Requeridos
DdlChofer.SelectedValueExist(GvRow.DataKey("CveChofer"))
DdlChofer2.SelectedValueExist(GvRow.DataKey("CveChofer2"))
chkSegundoChofer.Checked = If(NumChoferes = 2, True, False)
DdlEstatusContrato.SelectedValueExist(GvRow.DataKey("CveContratosEstatus"))
DdlSubProyectoModal.SelectedValueExist(GvRow.DataKey("CveSubProyecto"))
DdlTipoAF.SelectedValueExist(GvRow.DataKey("CveTipoAF"))
DdlTipoAF_SelectedIndexChanged(Nothing, Nothing)
HdnCveVentaRemision.Value = GvRow.DataKey("CveVentaRemision")
If GvRow.DataKey("CveAF").ToEntero > 0 Then
Dim ExisteItem As Boolean = False
@@ -749,7 +725,6 @@ Partial Class RepContratosCalendario
Exit For
End If
Next
If Not ExisteItem Then
Dim TmpItemText As String = GlobalDTActivoFijos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CodDesc", $" EstadoActivoFijo= 'Activo' AND CveActivoFijo = {GvRow.DataKey("CveAF")}")
DdlAF.Items.Add(New ListItem(TmpItemText, $"{GvRow.DataKey("CveAF")}"))
@@ -757,7 +732,6 @@ Partial Class RepContratosCalendario
End If
DdlAF.SelectedValueExist(GvRow.DataKey("CveAF"))
HidCveAF.Value = "-1"
HidCveAFDes.Value = ""
If GvRow.DataKey("CveAF").ToEntero > 0 Then
@@ -766,17 +740,13 @@ Partial Class RepContratosCalendario
End If
TxtMotivoCambioUnidad.Text = ""
DVMotivoCambioAF.Visible = False
HypRemision.Text = GvRow.DataKey("RemisionSerieFolio")
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={GvRow.DataKey("CveVentaRemision")}"
If GvRow.DataKey("RemisionSaldo").ToDecimal > 0 Then
LblSaldo.Text = $"Saldo {GvRow.DataKey("RemisionSaldo").ToDecimal.ToString("###,###,###.00")}"
Else
LblSaldo.Text = ""
End If
CveContrato = GvRow.DataKey("CveContrato").ToEntero
OcultarMostrarSegundoChofer()
@@ -790,19 +760,17 @@ Partial Class RepContratosCalendario
If HidModClienteNombre.Value = "" Then
HidModClienteNombre.Value = GlobalDTCliente(UsuarioActual.CveEmpresa, -1, HidModCveCliente.Value.ToEntero).FiltroPrimeroValor("NombreComercial")
End If
TxtMotivoCambioUnidad.Text = ""
DVMotivoCambioAF.Visible = False
DdlClientes.SelectedText = HidModClienteNombre.Value
DdlClientes.SelectedValue = HidModCveCliente.Value
DdlClientes.txtText.Value = HidModClienteNombre.Value
DdlClientes.txtValue.Value = HidModCveCliente.Value
chkSegundoChofer.Checked = If(HidNumChoferes.Value.ToEntero = 2, True, False)
OcultarMostrarSegundoChofer()
HypRemision.Text = HidRemisionSerieFolio.Value
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={HidCveVentaRemision.Value}"
HypRemision.NavigateUrl = $"/Ventas/Ventas.aspx?CveVenta={HdnCveVentaRemision.Value}"
If HidRemisionSaldo.Value.ToDecimal > 0 Then
LblSaldo.Text = $"Saldo {HidRemisionSaldo.Value.ToDecimal.ToString("###,###,###.00")}"
Else
@@ -884,11 +852,9 @@ Partial Class RepContratosCalendario
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
Dim SubProyecto As String = DdlSubProyectos.SelectedItem.Text
Dim SbFiltros As New StringBuilder()
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
SbFiltros.AppendFormat("SubProyecto: {0}|", SubProyecto)
GvContratos.ExportToExcelGembox($"Reporte_Contratos_{NowADS.ToString("yyyyMMddHHmmss")}", UsuarioActual, "Reporte Contratos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
End Sub
@@ -960,6 +926,4 @@ Partial Class RepContratosCalendario
CargaCronograma(DdlTipoVistaCalendario.SelectedValue.ToEntero)
End Sub
End Class

View File

@@ -88,8 +88,11 @@ Partial Class Ventas_CatAutorizacionLimites
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim.ToDate, MinFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim.ToDate, MaxFecha)
Dim CveUsuarioConsulta As Integer = UsuarioActual.CveUsuario
If UsuarioActual.Empresa.Funcionalidad(595) = "3" Then CveUsuarioConsulta = -1
Dim ObjGral As New ClsVentas
If ObjGral.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedorFiltro.SelectedValue.ToEntero(), "-1", CveEstatus:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
If ObjGral.GetAutorizacionLimite(UsuarioActual.CveEmpresa, CveCliente, DdlVendedorFiltro.SelectedValue.ToEntero(), "-1", CveEstatus:=DdlEstatus.SelectedValue.ToEntero(), FechaI:=FechaI, FechaF:=FechaF, CveUsuarioConsulta:=CveUsuarioConsulta) Then
GvDatos.DataSource = ObjGral.DtResultados
End If
ObjGral.Dispose()

View File

@@ -815,11 +815,16 @@ Partial Class Ventas_ClientesAbonar
If DtSaldo IsNot Nothing AndAlso DtSaldo.Rows.Count = 1 Then
Dim ImporteRef As Decimal = DtSaldo.SUM("Saldo", $"CveIE={DdlIngreso.SelectedValue.ToEntero()}")
Dim tCveMonedaIE As Integer = DtSaldo.FiltroPrimeroValor("CveMoneda", "").ToEntero
Dim ImporteAbonar As Decimal = 0
Dim TC As Decimal = 1
'comparativo.
For Each gvr As GridViewRow In GvCxC.Rows
If gvr.FCCheckBox("Chk").Checked Then
ImporteAbonar += gvr.FCTextBox("TxtAbonar").Text.ToDecimal()
TC = 1
If tCveMonedaIE = 1 AndAlso gvr.DataKey("CveMoneda") = "2" Then TC = TxtTC.Text.ToDecimal
If tCveMonedaIE = 2 AndAlso gvr.DataKey("CveMoneda") = "1" Then TC = 1D / TxtTC.Text.ToDecimal
ImporteAbonar += (gvr.FCTextBox("TxtAbonar").Text.ToDecimal() * TC).RoundSQL(2)
End If
Next
ImporteAbonar += TxtAnticipo.Text.ToDecimal()
@@ -1067,10 +1072,10 @@ Partial Class Ventas_ClientesAbonar
Pago.FechaDocumentoRelacionado = FechaIngreso
Pago.CveClientePago = CveCliente
End If
'Tipos de cambio
If Pago.CveMonedaPago = 1 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
Pago.TCPago = TxtTC.Text.ToDecimal
Pago.ImportePago = (Pago.ImportePago * Pago.TCPago).RoundSQL
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
Pago.TCPago = If(TxtTCDolaresDolares.Visible, TxtTCDolaresDolares.Text.ToDecimal, TxtTCDolares.Text.ToDecimal)
ElseIf Pago.CveMonedaPago = 2 AndAlso VentaActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES

View File

@@ -16054,6 +16054,7 @@ Partial Class Ventas
Dim ConceptoContableAplicar As Integer = 4
Dim CveVentaAplicar As Integer = ObjFactura.CveVenta
Dim CveVentaAmortizacionAplicar As Integer = -1
Dim CondicionesPago As Integer = RBLPago.SelectedValue.ToEntero
If ObjFactura.TipoDocto.Contiene("Egs") And DdlTipoComprobante.SelectedValue = "Ant" And CveDevolucion > 0 And NuevaFactura = 1 Then
ConceptoContableAplicar = 11
@@ -16102,7 +16103,7 @@ Partial Class Ventas
Next
End If
End If
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMX, ConceptoContableAplicar, Referencia, Concepto, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, importeMX, ConceptoContableAplicar, Referencia, Concepto, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString().ToEntero(), CveSubProyecto:=Row2("CveSubProyecto").ToString().ToEntero(), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal, CveColectiva:=CondicionesPago) Then
ErrorPrepoliza = True
Else
ViewState("SeGuardoPrePoliza") = True

View File

@@ -1397,7 +1397,7 @@ Public Class WS_PuntoVenta
Dim objInventario As New ClsInventarios
Dim Respuesta As New RespuestaWS
If objInventario.GetConceptos() Then
If objInventario.GetConceptoSAT() Then
Respuesta.Datos = objInventario.DtResultados '.FiltraParametros(String.Format("CveVendedor={0}", CveEmpresa))
Respuesta.Datos.TableName = "Inv_Conceptos"
Respuesta.HuboError = False