- mejora
This commit is contained in:
@@ -1802,19 +1802,28 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero()
|
||||
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
|
||||
|
||||
|
||||
|
||||
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorVentas = True
|
||||
' If Not CveSucursal > 0 Then Alert("No se encontró la sucursal.", TipoMensaje.MsgError) : ErrorVentas = True
|
||||
If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorVentas = True
|
||||
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
|
||||
|
||||
'For Each drt As DataRow In dt.FiltraParametros("RFC <> ''", DistinctColumns:={"RFC"}).Rows
|
||||
' Dim RFC As String = drt("RFC").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
' Dim CveCliente As Integer = DtClientes.FiltroPrimeroValor("CveCliente", $"RFC = '{RFC}'").ToString().ToEntero()
|
||||
' If CveCliente <= 0 Then
|
||||
' Dim OBJ As New ClsClientes
|
||||
' OBJ.AgregarClienteNoFrecuente(RFC, RFC, "", "", "", "", "", 26, RFC, "", "", "", -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "", -1, -1)
|
||||
' OBJ.Dispose()
|
||||
' End If
|
||||
'Next
|
||||
'GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
|
||||
'DtClientes = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1)
|
||||
Dim CountRow As Integer = 1
|
||||
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
|
||||
Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'")
|
||||
Dim TipoDocto As String = Row("Tipo Documento").ToString().Trim
|
||||
Dim RFC As String = Row("RFC").ToString().Trim
|
||||
Dim Serie As String = Row("Serie").ToString()
|
||||
Dim RFC As String = Row("RFC").ToString().Trim.Replace("-", "").Replace(" ", "")
|
||||
Dim Serie As String = Row("Serie").ToString().Trim
|
||||
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
|
||||
@@ -1839,14 +1848,11 @@ Partial Class General_SaldosIniciales
|
||||
IEPS = Row("IEPS").ToString().ToDecimal
|
||||
End If
|
||||
|
||||
|
||||
|
||||
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)
|
||||
Dim PorcentajeRetIVA As Decimal = If(dt.Columns.Contains("PorcentajeRetIVA"), Round(Row("PorcentajeRetIVA").ToString().ToDecimal, 4), 0)
|
||||
Dim PorcentajeRetISR As Decimal = If(dt.Columns.Contains("PorcentajeRetISR"), Round(Row("PorcentajeRetISR").ToString().ToDecimal, 4), 0)
|
||||
|
||||
Dim PedidoContrato As String = If(dt.Columns.Contains("Pedido"), Row("Pedido").ToString(), "")
|
||||
|
||||
GuardaLog(Sucursal + "-" + Row("Folio").ToString())
|
||||
@@ -1855,7 +1861,6 @@ 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
|
||||
@@ -1880,13 +1885,11 @@ Partial Class General_SaldosIniciales
|
||||
Alert($"El código del producto no se encontro, error en registro {CountRow}")
|
||||
ErrorVentas = True
|
||||
End If
|
||||
|
||||
Else
|
||||
Alert($"El código es requerido, error en registro {CountRow}")
|
||||
ErrorVentas = True
|
||||
End If
|
||||
|
||||
|
||||
IEPSDetalle = Row("IEPS").ToString.ToDecimal
|
||||
CantidadDetalle = Row("Cantidad").ToString.ToDecimal
|
||||
PUDetalle = Row("PU").ToString.ToDecimal
|
||||
@@ -1913,7 +1916,7 @@ Partial Class General_SaldosIniciales
|
||||
|
||||
|
||||
'If Not CveCliente > 0 Then Alert(String.Format("No se encontró el cliente con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorVentas = True : RFC.GuardaLog : Exit For
|
||||
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString()
|
||||
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESO", "INGRESOS", "ING", "FACTURA", "FACTURAS"), "Ing", IIf(TipoDocto.ToUpper.Contiene("EGRESO", "EGRESOS", "EGS"), "Egs", "Rem")).ToString()
|
||||
'PrePóliza
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Venta/SaldoInicial", 1, Total, Total, 1, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user