-clasif, recarga Global
This commit is contained in:
@@ -89,7 +89,6 @@ Partial Class CatClasificaciones
|
||||
|
||||
CargaDdlSATPS()
|
||||
CargaDDLs()
|
||||
CargaGlobal()
|
||||
|
||||
DdlCategoriaFiltro.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoriaFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
@@ -152,20 +151,20 @@ Partial Class CatClasificaciones
|
||||
CargaGrid()
|
||||
End Sub
|
||||
|
||||
Public Sub CargaGlobal()
|
||||
'Public Sub CargaGlobal()
|
||||
|
||||
Dim ObjClasificaciones As New ClsClasificaciones
|
||||
' Dim ObjClasificaciones As New ClsClasificaciones
|
||||
|
||||
If ObjClasificaciones.GetClasificaciones() Then
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
GlobalDTClasificaciones = ObjClasificaciones.DtResultados
|
||||
Else
|
||||
Me.GvDatos.DataSource = Nothing
|
||||
Alert("Ocurrió un error al cargar las clasificaciones. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
' If ObjClasificaciones.GetClasificaciones(UsuarioActual.CveEmpresa) Then
|
||||
' ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros($"(Codigo IS NULL OR Codigo = '') AND CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveCategoria = {DdlCategoriaFiltro.SelectedValue.ToEntero} OR {DdlCategoriaFiltro.SelectedValue.ToEntero} = -1) AND (UsoClasificacion = {DdlTipoClasificacion.SelectedValue.ToEntero} OR {DdlTipoClasificacion.SelectedValue.ToEntero} = -1 ) AND (Estado = {DdlEstatus.SelectedValue.ToEntero} OR {DdlEstatus.SelectedValue.ToEntero} = -1)")
|
||||
' GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
' Else
|
||||
' Me.GvDatos.DataSource = Nothing
|
||||
' Alert("Ocurrió un error al cargar las clasificaciones. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
ObjClasificaciones.Dispose()
|
||||
End Sub
|
||||
' ObjClasificaciones.Dispose()
|
||||
'End Sub
|
||||
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
@@ -212,7 +211,7 @@ Partial Class CatClasificaciones
|
||||
End If
|
||||
End If
|
||||
|
||||
CargaGlobal()
|
||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
ObjClasificaciones.Dispose()
|
||||
CargaDatos()
|
||||
|
||||
@@ -317,6 +316,7 @@ Partial Class CatClasificaciones
|
||||
If ObjClasificaciones.RemoveClasificacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||
GvDatos.EditIndex = -1
|
||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("Ocurrió un error al eliminar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
@@ -324,7 +324,7 @@ Partial Class CatClasificaciones
|
||||
|
||||
ObjClasificaciones.Dispose()
|
||||
CargaGrid()
|
||||
CargaGlobal()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -7798,21 +7798,32 @@ Partial Class Ventas
|
||||
|
||||
'CONVERTIR REMISION - TIPO MONEDA -DOLARES A PESOS REGISTRO DIRECTO SIN VENTA
|
||||
ElseIf (EditoRemision = False AndAlso ObjFactura.CveMoneda = 2 AndAlso ObjFactura.ConvertirPesos = True) Then
|
||||
|
||||
Dim TotalCalculableImpuestos, TotalCalculableImpuestosIVA As Decimal
|
||||
For Each Row As DataRow In TmpDT.Rows
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDouble * ObjFactura.TipoCambio, 6)
|
||||
Row("PU") = Math.Round(Row("PU").ToString.ToDecimal * ObjFactura.TipoCambio, 6)
|
||||
|
||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
|
||||
TotalCalculableImpuestos = (Row("Cantidad").ToString.ToDecimal * Row("PU").ToString.ToDecimal) - Row("Descuento").ToString.ToDecimal
|
||||
TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + Row("PorcentajeIEPS").ToString.ToDecimal)
|
||||
|
||||
|
||||
Row("IVA") = Row("PorcentajeIVA")
|
||||
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales)
|
||||
Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales)
|
||||
|
||||
Row("ImporteIEPS") = Math.Round(Row("PorcentajeIEPS").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales)
|
||||
Row("IEPS") = Row("ImporteIEPS")
|
||||
|
||||
Row("Total") = Math.Round(Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble, NumeroDecimales)
|
||||
Row("TotalImporte") = Math.Round(Row("Cantidad").ToString.ToDouble * Row("PU").ToString.ToDouble, NumeroDecimales)
|
||||
Row("Descuento") = Math.Round(Row("Descuento").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
|
||||
Row("ImporteRetIVA") = Math.Round(Row("ImporteRetIVA").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
|
||||
Row("ImporteRetISR") = Math.Round(Row("ImporteRetISR").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
|
||||
Row("ImporteIVA") = Math.Round(Row("ImporteIVA").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
|
||||
Row("ImporteIEPS") = Math.Round(Row("ImporteIEPS").ToString.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
|
||||
Next
|
||||
|
||||
Dim ImpuestosLocales As Double = 0
|
||||
For Each gvr As GridViewRow In GvImpuestosLocales2.Rows
|
||||
If gvr.RowType = DataControlRowType.DataRow Then
|
||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * ObjFactura.TipoCambio).FormatoNumero
|
||||
gvr.FCTextBox("TxtImpuestoLocalPS").Text = (gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDecimal * ObjFactura.TipoCambio).FormatoNumero
|
||||
ImpuestosLocales += Math.Round(gvr.FCTextBox("TxtImpuestoLocalPS").Text.ToDouble * ObjFactura.TipoCambio, NumeroDecimales)
|
||||
End If
|
||||
Next
|
||||
@@ -23524,12 +23535,15 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
For Each drow As DataRow In TmpDT.Rows
|
||||
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
||||
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
||||
drow("Eliminar") = 1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If DTCvePSCostos IsNot Nothing Then
|
||||
For Each drow2 As DataRow In DTCvePSCostos.Rows
|
||||
If drow("CvePS").ToString.ToEntero = drow2("CvePSCargo").ToString.ToEntero Then
|
||||
drow("Eliminar") = 1
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
Dim TmpDTView As New DataView(TmpDT)
|
||||
|
||||
Reference in New Issue
Block a user