From ea7df27b86a1efc52ee7cc6c6a9606c72f7d0e12 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 19 Feb 2024 16:27:07 -0700 Subject: [PATCH] =?UTF-8?q?Compras=20Correcci=C3=B3n=20global=20DT=20Tipos?= =?UTF-8?q?=20Activos=20Fijos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Compras/Compras.aspx.vb | 2 +- General/SaldosIniciales.aspx | 2 + General/SaldosIniciales.aspx.vb | 74 ++++++++++++++++++++++++++++++--- OS/Asignaciones.aspx.vb | 6 +-- 4 files changed, 75 insertions(+), 9 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index e92869286..19d886019 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -3398,7 +3398,7 @@ Partial Class Compras_Compras End Sub Private Sub CargaTiposAF() - ViewState("TmpDTTiposAF") = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) + ViewState("TmpDTTiposAF") = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa).Copy() Dim Row As DataRow = DirectCast(ViewState("TmpDTTiposAF"), DataTable).NewRow() Row("CveTipoActivoFijo") = -1 : Row("TipoActivoFijo") = "Seleccione" DirectCast(ViewState("TmpDTTiposAF"), DataTable).Rows.InsertAt(Row, 0) diff --git a/General/SaldosIniciales.aspx b/General/SaldosIniciales.aspx index 55ac5080c..abcd818cb 100644 --- a/General/SaldosIniciales.aspx +++ b/General/SaldosIniciales.aspx @@ -42,6 +42,8 @@ + + diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 25aa7506c..2b9d23ec8 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -225,7 +225,7 @@ Partial Class General_SaldosIniciales - ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Then + ElseIf RblFormato.SelectedValue = "3" Or RblFormato.SelectedValue = "4" Or RblFormato.SelectedValue = "17" Then If Not dt.Columns(0).ColumnName = "Sucursal" Then Alert("El nombre de la primera columna debe ser 'Sucursal'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub @@ -293,6 +293,16 @@ Partial Class General_SaldosIniciales Exit Sub End If + If Not dt.Columns(15).ColumnName = "Folio Fiscal" Then + Alert("El nombre de la decimosexta columna debe ser 'Folio Fiscalo'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + + If Not dt.Columns(16).ColumnName = "PorcentajeIVA" Then + Alert("El nombre de la decimoséptima columna debe ser 'PorcentajeIVA'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + 'If RblFormato.SelectedValue = "4" Then ' If Not dt.Columns(15).ColumnName = "ImpuestoLocal" Then ' Alert("El nombre de la diesciseisava columna debe ser 'ImpuestoLocal'. Favor de corregirlo", TipoMensaje.MsgError) @@ -305,6 +315,31 @@ Partial Class General_SaldosIniciales ' End If 'End If + If RblFormato.SelectedValue = "17" Then + + + If Not dt.Columns(17).ColumnName = "Cantidad" Then + Alert("El nombre de la Decimoctava columna debe ser 'Cantidad'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + + If Not dt.Columns(18).ColumnName = "PU" Then + Alert("El nombre de la Decimonovena columna debe ser 'PU'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + + If Not dt.Columns(19).ColumnName = "IVA" Then + Alert("El nombre de la Vigésima columna debe ser 'IVA'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + + + If Not dt.Columns(20).ColumnName = "IEPS" Then + Alert("El nombre de la Vigésimo primera columna debe ser 'IEPS'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + + End If ElseIf RblFormato.SelectedValue = "5" Then @@ -1571,7 +1606,7 @@ Partial Class General_SaldosIniciales #End Region 'C L I E N T E S - F A C T U R A S - ElseIf RblFormato.SelectedValue = "4" Then + ElseIf RblFormato.SelectedValue = "4" Or RblFormato.SelectedValue = "17" Then #Region "C L I E N T E S - F A C T U R A S" @@ -1626,7 +1661,9 @@ Partial Class General_SaldosIniciales Dim CveMoneda As Integer = 1 Dim Vendedor As String = If(dt.Columns.Contains("Vendedor"), Row("Vendedor").ToString(), "") Dim CveVendedor As Integer = 0 + Dim IEPS As Decimal = 0 'Row("IEPS").ToString().ToDecimal + Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString().ToEntero() Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString(), "") Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Round(Row("PorcentajeIVA").ToString().ToDecimal, 4), 0) @@ -1640,6 +1677,16 @@ Partial Class General_SaldosIniciales Dim Folio2 As String = "" ' Row("Folio2").ToString() Dim CodCliente As String = "" 'Row("CodCliente2").ToString() + + Dim IEPSDetalle As Decimal = 0 + Dim CantidadDetalle As Decimal = 0 + Dim PUDetalle As Decimal = 0 + Dim IVADetalle As Decimal = 0 + + If RblFormato.SelectedValue = "17" Then + IEPSDetalle = Row("IEPS").ToString.ToDecimal + End If + If dt.Columns.Contains("Cliente Sucursal") AndAlso Row("Cliente Sucursal").ToString() <> "" Then Dim ObjCliente As New ClsClientes @@ -1710,10 +1757,25 @@ 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, IEPS:=0) Then - ErrorVentas = True - Exit For + + If RblFormato.SelectedValue = "17" Then + If Not ObjVentas.AddVentaDetalle(CveVenta, CvePS, CantidadDetalle, CveUnidadMedida, PUDetalle * CantidadDetalle, IVADetalle, (PUDetalle * CantidadDetalle) + IVADetalle - IEPSDetalle, "Saldo Inicial", 0, 0, Sucursal.ToEntero(), 0, + PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, ImporteRetIVA:=RetIVA, IEPS:=IEPSDetalle) Then + ErrorVentas = True + Exit For + End If + Else + 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 End If + + + + + + Dim ConceptoContable As Integer = 1 Dim ConceptoContablePago As Integer = 2 If TipoDocto = "Egs" Then @@ -2980,6 +3042,8 @@ Partial Class General_SaldosIniciales Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoBancos.xlsx" ElseIf RblFormato.SelectedValue = "16" Then Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClasificaciones.xlsx" + ElseIf RblFormato.SelectedValue = "17" Then + Directorio = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\SaldosIniciales\FormatoClientes-Facturas-Detalles.xlsx" End If If Not (Directorio = "") Then diff --git a/OS/Asignaciones.aspx.vb b/OS/Asignaciones.aspx.vb index 19d9044ad..606b38ad7 100644 --- a/OS/Asignaciones.aspx.vb +++ b/OS/Asignaciones.aspx.vb @@ -79,7 +79,7 @@ Partial Class OS_Asignaciones RegistraScript(" $('#GvNA tr').each(function() { - $(this).find('td:eq(8) input').each(function() { + $(this).find('td:eq(6) input').each(function() { if($(this).val()!=':'){ $(this).attr('style', 'width: 20px;'); }else{ @@ -518,8 +518,8 @@ Partial Class OS_Asignaciones Dim TMSelector = DirectCast(e.Row.FindControl("TimeSelector"), TimeSelector) TMSelector.Date = FechaCita - e.Row.Cells(7).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.Ticks.ToString) - e.Row.Cells(8).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.ToString("HHmm")) + e.Row.Cells(9).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.Ticks.ToString) + e.Row.Cells(10).Attributes.Add("data-order", e.Row.DBCampo("FechaCitaOS").ToDate.ToString("HHmm")) End If