From 62b4d1dbd573665cede46afd290cdb41f965f87a Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 7 Oct 2020 18:22:36 -0700 Subject: [PATCH 01/11] correcion clientes --- Ventas/Clientes.aspx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index b592f7565..391f5f8cb 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1921,7 +1921,9 @@ - +
+ @@ -1977,6 +1979,8 @@ +
+ @@ -2006,14 +2010,15 @@
-
+
" style="display: inline-block; margin-right: -20px; width: 150px;" /> " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
-
+

+
@@ -2055,6 +2060,7 @@ +
From 7ef202e81842fc4c8cdd5d6af6906f6119f746c1 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 8 Oct 2020 12:33:34 -0700 Subject: [PATCH 02/11] Fuctaciones Cambiarias, se agrega txt Concepto por cada tipo --- Bancos/FluctuacionCambiaria.aspx | 155 +++++++++++++++++++------- Bancos/FluctuacionCambiaria.aspx.vb | 64 +++-------- Inventarios/TrasladoSolicitud.aspx | 50 +++++---- Inventarios/TrasladoSolicitud.aspx.vb | 6 + 4 files changed, 162 insertions(+), 113 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx b/Bancos/FluctuacionCambiaria.aspx index 57b64e754..3ecd068fa 100644 --- a/Bancos/FluctuacionCambiaria.aspx +++ b/Bancos/FluctuacionCambiaria.aspx @@ -225,20 +225,32 @@
+ +
-
- - - - - -
+ +
+ + + + +
+ +
+ + + + + +
+
-
- + + @@ -320,19 +332,31 @@ -
+
-
- - + +
+ + + + +
+ +
+ - - -
+ + + +
+ +
+

@@ -361,17 +385,30 @@
-
- - + + +
+ + + + +
+ +
+ - - -
+ + + +
+ +
+
@@ -407,13 +444,23 @@
-
- - + +
+ + + + +
+ +
+ - - -
+ + + +
+
@@ -445,14 +492,26 @@
-
-
- - - - - -
+
+ +
+ + + + +
+ +
+ + + + + +
+ + +
@@ -481,13 +540,23 @@
-
- - - - - -
+ +
+ + + + +
+ +
+ + + + + +
+
diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index b2b635433..504ba6539 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -20,7 +20,7 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto) + CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos) CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas) CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras) CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales) @@ -232,17 +232,12 @@ Partial Class Bancos_FluctuacionCambiaria #Region "FLUCTUACION COMPRAS" - Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs) - - 'If DdlSubproyecto.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - + Protected Sub BtnGeneraCompras_Click(sender As Object, e As EventArgs) + Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaC", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoCompras.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -306,18 +301,12 @@ Partial Class Bancos_FluctuacionCambiaria #Region "FLUCTUACION VENTAS" - Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs) - - 'If DdlsubProyectoVentas.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - - + Protected Sub BtnGeneraVentas_Click(sender As Object, e As EventArgs) + Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Ventas", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaV", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoVentas.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -345,13 +334,13 @@ Partial Class Bancos_FluctuacionCambiaria CveCuenta = CveCuentaPerdida idCta = idCtaPerdida TipoMovto = False - End If - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - ErrorRegistrar = True - End If + End If - Dim CveConconceptoCliente As Integer = 203 + If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then + ErrorRegistrar = True + End If + + Dim CveConconceptoCliente As Integer = 203 'saco las cuentas de pérdida y ganancia For Each gvr As GridViewRow In GvVentas.Rows @@ -386,18 +375,12 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraBancos_Click(sender As Object, e As EventArgs) - - 'If DdlSubproyectoBancos.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Bancaria", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoBancos.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -485,16 +468,10 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraDedudores_Click(sender As Object, e As EventArgs) - - 'If DdlSubProyectoDeoudores.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaDD", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Deudor", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaDD", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoDeudores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -565,17 +542,12 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraFiliales_Click(sender As Object, e As EventArgs) - 'If DdlSubproyecto.SelectedValue.ToEntero < 0 Then - ' Alert($"Debe de seleccionar un {LblSubProyecto.Text}", TipoMensaje.MsgAdvertencia) - ' Exit Sub - 'End If - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Dim Banco As New ClsBancos(Conta.IniciaTransacSQL()) Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Filiales", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaFilial", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoFiliales.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -665,12 +637,10 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub BtnGeneraAcreedores_Click(sender As Object, e As EventArgs) - - Dim Total As Decimal = 0 Dim Conta As New ClsContabilidad Conta.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaA", 1, 0, 0, 1, TxtFecha.Text.ToDate, TxtConceptoAcreedores.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer diff --git a/Inventarios/TrasladoSolicitud.aspx b/Inventarios/TrasladoSolicitud.aspx index 5e5b351c2..ea4114667 100644 --- a/Inventarios/TrasladoSolicitud.aspx +++ b/Inventarios/TrasladoSolicitud.aspx @@ -234,35 +234,39 @@
- - -
+ + + -
- +
+ +
+
- - - + + + -
Estado :
Usuario :
Fecha :
Estado :
Usuario :
Fecha :
+ +
+
-
- -
- -
- +
-
- -
-
- -
+
+ +
+
+ +
-
+
+ + + + + diff --git a/Inventarios/TrasladoSolicitud.aspx.vb b/Inventarios/TrasladoSolicitud.aspx.vb index 13286849f..baf983a9c 100644 --- a/Inventarios/TrasladoSolicitud.aspx.vb +++ b/Inventarios/TrasladoSolicitud.aspx.vb @@ -285,6 +285,9 @@ Partial Class Inventarios_TrasladoSolicitud Else Alert("Ocurrió un error al obtener los datos del traspaso.", TipoMensaje.MsgError) End If + + UpAutorizaciones.Update() + End If ObjInventarios.Dispose() ObjClientes.Dispose() @@ -1034,6 +1037,9 @@ Partial Class Inventarios_TrasladoSolicitud MandaCorreoRechazo(LbFolio.Text.ToEntero, CveTraspasoSolicitud, CveUsuarioSolicita, TxtMotivoRechazo.Text) CargaDatos() RegistraScript("$('#ModalRechazarTraslado').modal('hide');") + + + End If End Sub From 726b445552d1bc80aeaa1efa5bc5955cd63ebabd Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Thu, 8 Oct 2020 14:29:01 -0700 Subject: [PATCH 03/11] --- RH/Personal.aspx.vb | 17 ++++++++++++----- Ventas/Clientes.aspx.vb | 2 +- vwd.webinfo | 2 ++ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 9f4100846..7e0de0225 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -1089,11 +1089,18 @@ Partial Class RH_Personal End Sub Private Sub CargaSubProyectoAsignado() - DdlSubProyectoAsignado.Items.Clear() - DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero) - DdlSubProyectoAsignado.DataBind() - - DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1")) + If DivProyectosAsignado.Visible Then + + DdlSubProyectoAsignado.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) + DdlSubProyectoAsignado.DataBind() + DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Todos", "-1")) + 'old + 'DdlSubProyectoAsignado.Items.Clear() + 'DdlSubProyectoAsignado.DataSource = GlobalDTSubProyectos(DdlProyectoAsignado.SelectedValue.ToEntero) + 'DdlSubProyectoAsignado.DataBind() + + 'DdlSubProyectoAsignado.Items.Insert(0, New ListItem("Sin SubProyecto asignado", "-1")) + End If End Sub Private Sub CargaSubProyectoAsistenciaC() diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index c2b28c20a..de17079a9 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2731,7 +2731,7 @@ Partial Class Clientes 'HLRemision.HRef = $"/Ventas/Ventas.aspx?CveRemision={e.Row.DBCampo("CveVenta")}" Dim Liga As String = String.Format("< a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">", e.Row.DBCampo("CveVenta")) - HLSendMail.HRef = String.Format("javascript:$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto")) + HLSendMail.HRef = String.Format("javascript:(function mail(){{$get('HdnTipoDocto').value='{0}';$get('HdnCveVenta').value='{1}';$get('HdnFolioVenta').value='{2}';$get('TxtParaMail').value='{3}';$get('HdnSerieFolio').value='{4}';$get('HdnSubProyecto').value='{5}';$('#ModalDivMail').modal();return false;}})();", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveVenta"), e.Row.DBCampo("folio"), e.Row.DBCampo("Correo"), e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("SubProyecto")) e.Row.FCLiteral("LtlFactura").Text = String.Format("{1}", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("Folio")) UpSendMail.Update() diff --git a/vwd.webinfo b/vwd.webinfo index f280abd89..c04cff67c 100644 --- a/vwd.webinfo +++ b/vwd.webinfo @@ -114,6 +114,8 @@ + + From cb7455f17a7828e62f1d6585bcbd057e6142fe6c Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:11:39 -0700 Subject: [PATCH 04/11] --ignorar el ajuste del pu si no tiene movimeitnos de salida --- OC/OC.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 526093576..146939ec4 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -2858,7 +2858,7 @@ Partial Class OC '2018.11.24 se cambia concepto 176, de cargo a abono negativo., petición MALL '2019.03.26 se cambia concepto 177, de abono a cargo., petición MALL '2019.04.10 se cambia concepto 177, de cargo a abono., petición MALL - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), SerieFolio, Fecha, If(ConceptoSalida = 0, IdCtaContableAlmacen, IdCtaContableRecepcionOCER), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), SerieFolio, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, SerieFolio, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then TieneError = True Exit For From 28b42b681fcd74c9d14782833fe9f7d5adedd2d3 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:12:07 -0700 Subject: [PATCH 05/11] - envio de parametro de usuario --- OC/CatEstatus.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OC/CatEstatus.aspx.vb b/OC/CatEstatus.aspx.vb index 84303384c..f44f0a3d6 100644 --- a/OC/CatEstatus.aspx.vb +++ b/OC/CatEstatus.aspx.vb @@ -280,7 +280,7 @@ Partial Class OC_CatEstatus Dim CveSuperior As Integer = If(tblSuperior.Visible = True, ddlSuperior.SelectedValue.ToEntero, -1) If hdnCveEstatusUsuarios.Value.ToEntero = -1 Then - If objOC.AddEstatusUsuarios(hdnCveEstatus.Value.ToEntero, CboSubProyecto.SelectedValue.ToEntero, hdnCveUsuario.Value.ToEntero, True, CveSuperior, LimiteSuperior, LimiteInferior) Then + If objOC.AddEstatusUsuarios(hdnCveEstatus.Value.ToEntero, CboSubProyecto.SelectedValue.ToEntero, hdnCveUsuario.Value.ToEntero, True, CveSuperior, LimiteSuperior, LimiteInferior, UsuarioActual.CveUsuario) Then RegistraScript(String.Format("{0}.style.background-color='yellow'", IDCellYellow.Value)) End If From 5264f95b7d05aeb7d767f9a6960ff11f53fe1e0f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:12:28 -0700 Subject: [PATCH 06/11] -- cambio en alerta de guardado --- Contabilidad/RegPrePoliza.aspx.vb | 59 +++++++++++++++++-------------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index cd307959c..28d7b8831 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -982,34 +982,39 @@ Partial Class ContabilidadC_RegPrePoliza Else MsgError = "No se pudo insertar la póliza" - End If - Catch ex As Exception - MsgError = "Error" - End Try - - If MsgError = "" Then - 'MENSAJE IE - If CveIE > 0 Then - MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) - Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") - Else - Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") - End If - - ObjIE.Commit() - If Conta IsNot Nothing Then Conta.Commit() - - UPPDocumento.Update() - - TxtObservaciones.Text = "" - GvMov.DataBind() - TxtFecha.Text = "" - TxtObservaciones.Text = "" - Else - ObjIE.RollBack() + End If + + If MsgError = "" Then + + 'MENSAJE IE + If CveIE > 0 Then + MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) + Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") + Else + Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") + End If + + ObjIE.Commit() + If Conta IsNot Nothing Then Conta.Commit() + + 'UPPDocumento.Update() + 'TxtObservaciones.Text = "" + 'GvMov.DataBind() + 'TxtFecha.Text = "" + 'TxtObservaciones.Text = "" + Else + ObjIE.RollBack() + If Conta IsNot Nothing Then Conta.RollBack() + End If + Catch ex As Exception + ObjIE.RollBack() If Conta IsNot Nothing Then Conta.RollBack() - End If - + Alert("Ocurrio un error al registrar el movimiento", TipoMensaje.MsgInformacion) + ex.GuardaLog(ex.Message) + End Try + + + ObjIE.Dispose() ObjMov.Dispose() If Conta IsNot Nothing Then Conta.Dispose() From 2d317f5baf359c4e03b34745ed21c065c5c01e5b Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:12:44 -0700 Subject: [PATCH 07/11] -- cambio en la cuenta contable enviada --- Compras/ReembolsosComprobaciones.aspx.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index 36b4176d3..f5d83d58c 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -644,7 +644,7 @@ Partial Class Compras_ReembolsosComprobaciones ConceptoMovimiento = $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}" Referencia = gvr.DataKey("SerieFolio").ToString IdCtaProveedor = gvr.DataKey("IdCtaContProveedores").ToEntero - CveCuentaProveedor = gvr.DataKey("IdCtaContProveedoresSIG").ToEntero + ImportePagar = gvr.FCTextBox("TxtAbonar").Text.ToDecimal ImporteOriginal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal @@ -660,6 +660,11 @@ Partial Class Compras_ReembolsosComprobaciones Case Else End Select End If + If gvr.DataKey("CveTipoConcepto").ToEntero = 2 Then + IdCtaProveedor = gvr.DataKey("IdCtaContAcreedor").ToEntero + Else + IdCtaProveedor = gvr.DataKey("IdCtaContProveedores").ToEntero + End If If SaldoCheque > 0 Then ImporteMovto = If(ImportePagar > SaldoCheque, SaldoCheque, ImportePagar) From 0f53eedd2661c7df76f3d1e7a05c0a81122bf49c Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:13:26 -0700 Subject: [PATCH 08/11] -- cambios en parametro de concepto de prepoliza --- Bancos/FluctuacionCambiaria.aspx.vb | 42 ++++++++++++++--------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index b2b635433..98b0fec8d 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -20,12 +20,12 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto) - CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas) - CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras) - CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales) - CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreedores, Nothing, LblSubProyectoAcreedores) - CargarCentrosDeCosto(Nothing, DdlSubProyectoDeudores, Nothing, LblSubProyectoDeudores) + CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto, "") + CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas, "") + CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras, "") + CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "") + CargarCentrosDeCosto(Nothing, DdlSubProyectoAcreedores, Nothing, LblSubProyectoAcreedores, "") + CargarCentrosDeCosto(Nothing, DdlSubProyectoDeudores, Nothing, LblSubProyectoDeudores, "") CargaUltimaFluctuacion() End If @@ -347,9 +347,8 @@ Partial Class Bancos_FluctuacionCambiaria TipoMovto = False End If If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Math.Abs(Total), "Fluctuación Ventas", CveConceptoContable, "Fluctuación Ventas", Now, idCta, 0, ImporteMX:=Math.Abs(Total), CveCuenta:=CveCuenta, CveSubProyecto:=DdlsubProyectoVentas.SelectedValue.ToEntero) Then - ErrorRegistrar = True - End If + ErrorRegistrar = True + End If Dim CveConconceptoCliente As Integer = 203 @@ -397,7 +396,6 @@ Partial Class Bancos_FluctuacionCambiaria Conta.IniciaTransacSQL() Dim ObjContPaq As New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq.IniciaTransacSQL() - Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, "Fluctuación Bancaria", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim idCta As Integer = 0 Dim CveCuenta As Integer = 0 Dim CveCuentaPerdida, CveCuentaGanancia As Integer @@ -405,28 +403,28 @@ Partial Class Bancos_FluctuacionCambiaria Dim TipoMovto As Boolean = False Dim CveConceptoContable As Integer = 0 Dim ErrorRegistrar As Boolean = False - Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal - + Dim TCCierreFluctuacion As Decimal = LtTipoCambioActual.Text.ToDecimal + Dim MesTCtexto As String = String.Format("{0} TC:{1}", TxtFecha.Text.ToDate.ToString("MMMM-yyyy"), TCCierreFluctuacion) + + Dim CvePrePoliza As Integer = Conta.AddPrePolizas("Banc/FluctuaB", 1, 0, 0, 1, TxtFecha.Text.ToDate, String.Format("Fluctuación Bancaria {0} ", MesTCtexto), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + + CveCuentaPerdida = 0 ' 55379 CveCuentaGanancia = 0 ' 55382 idCtaPerdida = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria '1227 IdCtaGanancia = UsuarioActual.Empresa.IdCuentaGananciaCambiaria '1230 Dim TC As Decimal = 2 ' se pone 2, para que cumpla con el check constrains de complementarias - Total = LblTotalBancos.Text.ToDecimal - - - - - Dim CveConconceptoBancos As Integer = 204 - - - 'saco las cuentas de pérdida y ganancia + Total = LblTotalBancos.Text.ToDecimal + + Dim CveConconceptoBancos As Integer = 204 + + 'saco las cuentas de pérdida y ganancia For Each gvr As GridViewRow In GvCuentas.Rows Dim cb As CheckBox = gvr.FCCheckBox("ChkGenerarBancos") If cb.Checked Then Total = gvr.DataKey("Fluctuacion").ToDecimal Dim IdCtaComplementaria As Integer = gvr.DataKey("IdCtaAfectable").ToEntero - Dim ConceptoReferencia As String = $"{gvr.DataKey("Banco")} - {gvr.DataKey("NumCuenta")} " + Dim ConceptoReferencia As String = String.Format("{0} - {1} {2}", gvr.DataKey("Banco"), gvr.DataKey("NumCuenta"), MesTCtexto) 'MOVIMIENTO DE FLUCTUACION From b85454b2e5967fd138ced06ae80cdaa0371f4d0f Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:13:50 -0700 Subject: [PATCH 09/11] -- recepcion por OC --- Compras/Compras.aspx.vb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index be933f6a1..b71f8ecfd 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -15052,7 +15052,7 @@ Partial Class Compras_Compras 'SI PUEDE RECIBIR POR OC Y COMPRA ' si usa almacen, si tiene activado que reciba por OC, y que si la compra tipo Proveedor. que lo muestre - If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then + If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then DivOCVinculaInv.Visible = True End If @@ -15434,15 +15434,16 @@ Partial Class Compras_Compras 'SI PUEDE RECIBIR POR OC Y COMPRA - If UsuarioActual.CveEmpresa.Contiene(119) Then - If UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 And Not UsuarioActual.Empresa.Funcionalidad(153).ToEntero > 0 Then - If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then - Alert("El campo Tipo de recepción almacén es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) - Exit Sub - End If + + If UsuarioActual.CveEmpresa = 119 AndAlso UsuarioActual.Empresa.UsaInventarios And UsuarioActual.Empresa.Funcionalidad(131).ToEntero > 0 AndAlso CveTipoConcepto = 1 Then + + If DdlOCVinculaInv.SelectedValue.ToEntero <= 0 Then + Alert("El campo Tipo de recepción almacén es necesario. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + Exit Sub End If End If + If Math.Abs(HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal) > 0.05 AndAlso UsuarioActual.CveEmpresa.Contiene(119) Then Alert($"Hay una diferencia de IEPS entre la factura y la OC. Dif: {HdnIEPSModificadoOC.Value.ToDecimal - LbIEPSOC2.Text.ToDecimal}", TipoMensaje.MsgAdvertencia) Exit Sub @@ -19831,7 +19832,7 @@ Partial Class Compras_Compras End If Else '2018.11.24 se cambia concepto 177, de cargo a abono negativo., petición MALL - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), ConceptoPartida, Fecha, If(ConceptoSalida = 0, IdCtaContableAlmacen, IdCtaContableRecepcionOCER), -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, -DiferenciaInvOC, SerieFolio, If(ConceptoSalida = 0, 177, 177), ConceptoPartida, Fecha, IdCtaContableRecepcionOCER, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=-DiferenciaInvOC, CveCuenta:=CveCuentaAlmacen, CveOCDetalle:=CveOCDetalle, CveSubProyecto:=CveSubProyecto) Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, DiferenciaInvOC, SerieFolio, 176, ConceptoPartida, Fecha, IdCtaContableRecepcionOC, -1, CveProveedor:=CveProveedor, CveMovimientoAlmacen:=CveMovimientoAlmacen, CveOC:=CveOrdenCompra, ImporteMX:=DiferenciaInvOC, CveOCDetalle:=CveOCDetalle) Then Retorno = False Exit For From a71c16b7caf7dc4f11590af70232c4391d5c3afa Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:14:06 -0700 Subject: [PATCH 10/11] columna de descripcion --- Compras/RepCxPDetalle.aspx | 12 +++++++++++- Compras/RepCxPDetalle.aspx.vb | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Compras/RepCxPDetalle.aspx b/Compras/RepCxPDetalle.aspx index 120b5ff4b..33b22246f 100644 --- a/Compras/RepCxPDetalle.aspx +++ b/Compras/RepCxPDetalle.aspx @@ -249,7 +249,7 @@ + CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None"> @@ -366,6 +366,14 @@ + + + Descripción + + + + + @@ -419,6 +427,8 @@ + + diff --git a/Compras/RepCxPDetalle.aspx.vb b/Compras/RepCxPDetalle.aspx.vb index 842000f1e..8a61cd2fe 100644 --- a/Compras/RepCxPDetalle.aspx.vb +++ b/Compras/RepCxPDetalle.aspx.vb @@ -621,6 +621,8 @@ Partial Class RepCxPDetalle GvDatos.Columns(13).Visible = False End If + GvDatos.Columns(14).Visible = ChkDescripcion.Checked + Personalizo = 1 If Personalizo = 1 Then ImgExcelPersonalizado.Visible = True From df8932c7e7d605f3c9bc7f20c93fa200688adeaf Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 8 Oct 2020 18:20:31 -0700 Subject: [PATCH 11/11] label --- Bancos/FluctuacionCambiaria.aspx.vb | 46 ++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 4c6bd01d8..56901e562 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -20,7 +20,7 @@ Partial Class Bancos_FluctuacionCambiaria Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyecto, "") + CargarCentrosDeCosto(Nothing, DdlSubproyectoBancos, Nothing, LblSubProyectoBancos, "") CargarCentrosDeCosto(Nothing, DdlsubProyectoVentas, Nothing, LblSubProyectoVentas, "") CargarCentrosDeCosto(Nothing, DdlSubProyectoCompras, Nothing, LblSubProyectoCompras, "") CargarCentrosDeCosto(Nothing, DdlSubProyectoFiliales, Nothing, LblSubProyectoFiliales, "") @@ -342,31 +342,31 @@ Partial Class Bancos_FluctuacionCambiaria Dim CveConconceptoCliente As Integer = 203 - 'saco las cuentas de pérdida y ganancia - For Each gvr As GridViewRow In GvVentas.Rows - Total = -gvr.DataKey("Fluctuacion").ToDecimal - - If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then - CveConconceptoCliente = 226 - Else - CveConconceptoCliente = 203 - End If - - 'movimiento de complementaria - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria, CveIE:=gvr.DataKey("CveIE").ToEntero) Then - ErrorRegistrar = True - Exit For - End If - Next - - If Not ErrorRegistrar Then - Conta.Commit() - Alert(String.Format("La Fluctuación se ha generado
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) + 'saco las cuentas de pérdida y ganancia + For Each gvr As GridViewRow In GvVentas.Rows + Total = -gvr.DataKey("Fluctuacion").ToDecimal + If gvr.DataKey("CveIE").ToEntero > 0 AndAlso gvr.DataKey("CveVenta").ToEntero < 0 Then + CveConconceptoCliente = 226 Else - Conta.RollBack() + CveConconceptoCliente = 203 End If - Conta.Dispose() + + 'movimiento de complementaria + If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), CveConconceptoCliente, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveVenta:=gvr.DataKey("CveVenta").ToEntero, TipoCambio:=TC, ImporteMX:=Total, ImporteME:=Total, CveCuenta:=CveCuentaComplementaria, CveIE:=gvr.DataKey("CveIE").ToEntero) Then + ErrorRegistrar = True + Exit For + End If + Next + + If Not ErrorRegistrar Then + Conta.Commit() + Alert(String.Format("La Fluctuación se ha generado
Ver PrePóliza", CvePrePoliza), TipoMensaje.MsgInformacion) + + Else + Conta.RollBack() + End If + Conta.Dispose() End Sub #End Region