diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 930cd697c..004b752d8 100644 --- a/General/SaldosIniciales.aspx.vb +++ b/General/SaldosIniciales.aspx.vb @@ -296,17 +296,17 @@ Partial Class General_SaldosIniciales 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) - 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) + ' Exit Sub + ' End If - If Not dt.Columns(16).ColumnName = "Amort.Ant" Then - Alert("El nombre de la diescisieteava columna debe ser 'Amort.Ant'. Favor de corregirlo", TipoMensaje.MsgError) - Exit Sub - End If - End If + ' If Not dt.Columns(16).ColumnName = "Amort.Ant" Then + ' Alert("El nombre de la diescisieteava columna debe ser 'Amort.Ant'. Favor de corregirlo", TipoMensaje.MsgError) + ' Exit Sub + ' End If + 'End If ElseIf RblFormato.SelectedValue = "5" Then @@ -1356,8 +1356,8 @@ Partial Class General_SaldosIniciales Dim Folio As Integer = Row("Folio").ToString.ToEntero Dim Fecha As Date = Row("Fecha").ToString.ToDate Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString.ToDate - Dim ImpuestoLocal As Double = Row("ImpuestoLocal").ToString.ToDouble - Dim Amortizacion As Double = Row("Amort.Ant").ToString.ToDouble + Dim ImpuestoLocal As Double = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDouble, 0.0) + Dim Amortizacion As Double = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString.ToDouble, 0.0) Dim SubTotal As Decimal = Row("SubTotal").ToString.ToDecimal Dim IVA As Decimal = Row("IVA").ToString.ToDecimal Dim Total As Decimal = Row("Total").ToString.ToDecimal @@ -1372,7 +1372,8 @@ Partial Class General_SaldosIniciales Dim CveVendedor As Integer = 0 Dim IEPS As Decimal = 0 'Row("IEPS").ToString.ToDecimal Dim CveClienteSucursal As Integer = 0 'Row("CveClienteSucursal").ToString.ToEntero - Dim ImpuestosLocales As Decimal = Row("ImpuestoLocal").ToString.ToDecimal + Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestoLocal"), Row("ImpuestoLocal").ToString.ToDecimal, 0) + Dim FolioFiscal As String = If(dt.Columns.Contains("Folio Fiscal"), Row("Folio Fiscal").ToString, "") GuardaLog(Sucursal + "-" + Row("Folio").ToString) 'Temporalmente SE BORRARA @@ -1437,6 +1438,12 @@ Partial Class General_SaldosIniciales ConceptoContablePago = 91 End If + If FolioFiscal <> "" Then + If Not ObjVentas.UpdateVentaFolioFiscal(FolioFiscal, CveVenta, UsuarioActual.CveEmpresa) Then + ErrorVentas = True + Exit For + End If + End If 'PrePólizaDetalle If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, SubTotal, Folio.ToString, 4, String.Format("{0}-{1}", Serie, Folio), Fecha, -1, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, ImporteMX:=SubTotal, CveSubProyecto:=Sucursal.ToEntero) Then ErrorVentas = True : Exit For diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 2034619c5..5f8a4181e 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -2442,13 +2442,17 @@ Partial Class Inventarios_RecepcionUsados Public Sub OnRblUsadosAjuste_Change(sender As Object, e As EventArgs) DdlAlmacen.Items.Clear() If RblUsadosAjuste.SelectedValue = "1" Then - CargaAjuste() - DivAjuste.Visible = True - 'Llenar el dropdownlist de almacén - DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6) - LnkAgregarUsado.Visible = False - UppAcciones.Update() - + If DdlClientes.SelectedValue <> "-1" Then + CargaAjuste() + DivAjuste.Visible = True + 'Llenar el dropdownlist de almacén + DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 6) + LnkAgregarUsado.Visible = False + UppAcciones.Update() + Else + Alert("hace falta seleccionar un cliente") + RblUsadosAjuste.SelectedValue = "0" + End If Else DivAjuste.Visible = False 'Llenar el dropdownlist de almacén diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index f2660bbdf..656670d36 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -616,8 +616,7 @@ IEPS - Total <%--;--%> - Comandos + Total <%--;--%>Comandos