This commit is contained in:
rakcsle
2022-04-25 19:25:45 -07:00
52 changed files with 8407 additions and 3333 deletions

View File

@@ -1568,6 +1568,7 @@ Partial Class Bancos_ProveedoresAbonar
End If
If gvr.FCTextBox("TxtComision").Text.ToDecimal < 0 Then
ConceptoContable = 78
TipoMovimiento = True
ImporteMovimiento = ImporteMovimiento * -1
importeMX = importeMX * -1
@@ -1577,8 +1578,8 @@ Partial Class Bancos_ProveedoresAbonar
IdCtaContable = UsuarioActual.Empresa.Funcionalidad(266).ToEntero()
End If
ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero)
importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero)
ImporteMovimiento = ImporteMovimiento.RoundSQL
importeMX = importeMX.RoundSQL
TipoCambioGeneral = TipoCambioPago
End If
@@ -2862,14 +2863,20 @@ Partial Class Bancos_ProveedoresAbonar
End If
Saldo = Saldo - IEPS
End If
' se manda al ot ingresos, los impuestos por acreditar
If MsgError = "" AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, gr.DataKey("SerieFolio").ToString, 78, ConceptoPartida, Now, IdCtaContable:=UsuarioActual.Empresa.IdCuentaOtrosIngresos, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCPago), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
If MsgError = "" Then
Dim tcvecon As Integer = 78
If Saldo < 0 Then
tcvecon = 211
End If
If MsgError = "" AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Saldo, gr.DataKey("SerieFolio").ToString, tcvecon, ConceptoPartida, Now, IdCtaContable:=UsuarioActual.Empresa.IdCuentaOtrosIngresos, CveIE:=-1, IdSegmentoNegocio:=-1, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=If(CveMoneda = 1, Saldo, Saldo * TCPago), TipoCambio:=TCCompra, TipoCambioPago:=TCPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
'fluctuación.
If CveMoneda > 1 Then
Dim ImporteFluctuacion As Decimal = 0
@@ -2879,7 +2886,6 @@ Partial Class Bancos_ProveedoresAbonar
MsgError = "No se pudo obtener el sub proyecto o centro de costo"
End If
If TCCompra > TCPago Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), gr.DataKey("SerieFolio").ToString, 64, ConceptoPartida, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CveCompra:=gr.DataKey("CveCompra").ToEntero, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TCCompra, TipoCambioPago:=TCPago) Then
MsgError = "Ocurrio un error al saldar el movimiento"
@@ -2889,12 +2895,8 @@ Partial Class Bancos_ProveedoresAbonar
MsgError = "Ocurrio un error al saldar el movimiento"
End If
End If
End If
If MsgError = "" AndAlso ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 5) Then
If ObjConta.ValorPolizaDescuadre > 0 Then
MsgError = ObjConta.MensajePolizaDescuadre + " " + ObjConta.ValorDiferencia
@@ -2906,7 +2908,6 @@ Partial Class Bancos_ProveedoresAbonar
If ObjConta.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
Else
'Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"

View File

@@ -63,9 +63,9 @@ Partial Class Bancos_RepCortes
Me.Form.DefaultButton = BtnConsultar.UniqueID
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
End If
End Sub
End Sub
#Region " C A R G A - D A T O S "
Public Sub CargaDatos()
Dim ObjPuntoVenta As New ClsPuntoVenta
@@ -87,22 +87,22 @@ Partial Class Bancos_RepCortes
e.Row.CssClass = "SubTotales2"
End If
End If
End Sub
End Sub
Protected Sub GvP_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvP.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("MetodoPago").ToString = "Total" Then
e.Row.CssClass = "SubTotales"
End If
End If
End Sub
End Sub
Protected Sub GvD_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvD.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveVenta").ToString = "" Then
e.Row.CssClass = "Totales"
End If
If e.Row.DBCampo("ImportePagado").ToDecimal() < 0 Then
e.Row.FCLabel("LblTotal").CssClass = "badge badge-danger"
End If
If e.Row.DBCampo("ImportePagado").ToDecimal() < 0 Then
e.Row.FCLabel("LblTotal").CssClass = "badge badge-danger"
End If
End If
End Sub
@@ -151,11 +151,11 @@ Partial Class Bancos_RepCortes
Nombre = gvr.DataKey("Nombre").ToString
Dim Vent As New ClsPuntoVenta
Dim Vn As New ClsVentas
If Vn.GetCortesDetalleVentasResumen(CveCorte, UsuarioActual.CveEmpresa) Then
If Vn.GetCortesDetalleVentasResumen(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvP.DataSource = Vn.DtResultados
DtCortesVentasResumen = Vn.DtResultados
End If
If Vent.GetCortesDetalleVentas(CveCorte, UsuarioActual.CveEmpresa) Then
If Vent.GetCortesDetalleVentas(CveCorte, DdlSubProyectos.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
GvD.DataSource = Vent.DtResultados
DtCortesVentas = Vent.DtResultados
divDetalle.Visible = True
@@ -163,8 +163,8 @@ Partial Class Bancos_RepCortes
If DtCortesVentasResumen.Rows.Count > 0 Or DtCortesVentas.Rows.Count > 0 Then
HplDownPDF.Visible = True
HplDownEXCEL.Visible = True
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "PDF")))
HplDownEXCEL.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}", CveCorte, "EXCEL")))
HplDownPDF.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}&CVESUBPROYECTO={2}", CveCorte, "PDF", DdlSubProyectos.SelectedValue.ToEntero)))
HplDownEXCEL.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CORT&CVECORTE={0}&FORMATO={1}&CVESUBPROYECTO={2}", CveCorte, "EXCEL", DdlSubProyectos.SelectedValue.ToEntero)))
Else
HplDownPDF.Visible = False
HplDownEXCEL.Visible = False