From d0c2f697ff824fca53978e03b3736a646f494ebc Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 7 Jan 2020 12:22:59 -0700 Subject: [PATCH] tres columnas opcionales para opcion de factura cliente --- General/SaldosIniciales.aspx.vb | 35 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/General/SaldosIniciales.aspx.vb b/General/SaldosIniciales.aspx.vb index 930cd697c..c16ccc7be 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) + Dim Amortizacion As Double = If(dt.Columns.Contains("Amort.Ant"), Row("Amort.Ant").ToString.ToDouble, 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 @@ -1430,6 +1431,14 @@ Partial Class General_SaldosIniciales ErrorVentas = True Exit For End If + + If FolioFiscal IsNot "" Then + If Not ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", FechaVencimiento, CveVenta, CvePAC:=1) Then + ErrorVentas = True + Exit For + End If + End If + Dim ConceptoContable As Integer = 1 Dim ConceptoContablePago As Integer = 2 If TipoDocto = "Egs" Then