From 7414be538b20de68b89514e888b057bdea12d479 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 14 Apr 2021 19:36:23 -0700 Subject: [PATCH 01/11] -- cambios en concepto de gasto. --- Bancos/DepositosCaja.aspx | 30 ++++++++++++++---------------- Bancos/DepositosCaja.aspx.vb | 26 ++++++++++++++------------ 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 668920538..25e3319ec 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -32,9 +32,9 @@
- +
- +
@@ -97,13 +97,13 @@
-
- +
+
- +
@@ -118,15 +118,13 @@
-
- - +
Seleccionado: $ - 00.00 + 0.00
@@ -134,25 +132,25 @@
- - + +
- + - +

- + @@ -193,7 +191,7 @@ - +
diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 6d2911286..e3ebcf401 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -38,7 +38,7 @@ Partial Class Bancos_DepositosCaja DdlSubProyectos.DataBind() DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2) DdlClasificacion.DataBind() DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) End Sub @@ -60,7 +60,7 @@ Partial Class Bancos_DepositosCaja UpGvFacturas.Update() GvFacturas.DataBind() - lblValorTotal.Text = "00.00" + lblValorTotal.Text = "0.00" divLabelTotal.Visible = True DivComision.Visible = True End Sub @@ -126,23 +126,23 @@ Partial Class Bancos_DepositosCaja 'Salida de Caja Chica - FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2) + FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) If Not FolioIE > 0 Then OcurrioError = True End If - CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If TxtComision.Text.ToEntero > 0 Then CveSubProyecto = DdlSubProyectos.SelectedValue.ToEntero CveClasificacion = DdlClasificacion.SelectedValue.ToEntero - If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TxtComision.Text.ToEntero, "Comisión", 78, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TxtComision.Text.ToEntero, "Comisión", 51, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then OcurrioError = True End If Else OcurrioError = True End If Else - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then OcurrioError = True End If End If @@ -161,14 +161,14 @@ Partial Class Bancos_DepositosCaja Dim CveVenta As Integer = Gvr.DataKey("CveVenta").ToEntero Dim CvePrePoliza As Integer = Gvr.DataKey("CvePrePoliza").ToEntero - FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) + FolioIE = ObjBancos.GetNextFolio(DdlCajaChica.SelectedValue.ToEntero, 2) If Not FolioIE > 0 Then OcurrioError = True End If - CveIEDestino = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Importe.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then OcurrioError = True End If @@ -177,8 +177,8 @@ Partial Class Bancos_DepositosCaja OcurrioError = True End If Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") - documentos += String.Format("Documento {1}     ", CveIEDestino.ToString, SerieFolio) - documentos += String.Format("Imprimir {1}

", StrEncript, SerieFolio) + 'documentos += String.Format("Documento {1}     ", CveIEDestino.ToString, SerieFolio) + 'documentos += String.Format("Imprimir {1}

", StrEncript, SerieFolio) End If @@ -192,9 +192,11 @@ Partial Class Bancos_DepositosCaja Else ObjContabilidad.Commit() CargaDatos() + documentos += String.Format("Prepóliza

", NuevaCvePrePoliza) Alert(documentos.ToString) + End If ObjContabilidad.Dispose() From 7b8e3b4c9c8b9bb4f15c91dc87f1dc4b1e471ca8 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Apr 2021 13:10:03 -0700 Subject: [PATCH 02/11] =?UTF-8?q?--=20cambio=20de=20texto,=20de=20comisi?= =?UTF-8?q?=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/DepositosCaja.aspx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 25e3319ec..c307c846e 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -132,7 +132,7 @@
- +
From 46e195b79aaf16162b2eeafcac182035afb5d0e2 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Apr 2021 13:11:26 -0700 Subject: [PATCH 03/11] -- redondeos --- Ventas/Ventas.aspx.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ceecd7d8f..a0694ccf2 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -16827,7 +16827,7 @@ Partial Class Ventas End If - TotalCalculableImpuestos = (Cantidad * (PU)) - Descuento + TotalCalculableImpuestos = ((Cantidad * (PU)) - Descuento).RoundSQL TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + DrPS("IEPSPorcentaje").ToString().ToDecimal) Row("PU") = PU @@ -16897,7 +16897,7 @@ Partial Class Ventas Row("Descuento") = (Descuento).RoundSQL(NumeroDecimales) Row("TipoDescuento") = HdnTipoDescuento.Value Row("CvePromocionDetalle") = CvePromocionDetalle - Row("Total") = (Cantidad * PU) + Row("Total") = (Cantidad * PU).RoundSQL(NumeroDecimales) Row("TotalImporte") = (Cantidad * PU).RoundSQL(NumeroDecimales) 'Row("AsientoContableVentas") = DrPS("AsientoContableVentas") @@ -17018,7 +17018,7 @@ Partial Class Ventas End If PU = PU.RoundSQL(6) DrPoliza("PU") = PU - TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU)) + TotalCalculableImpuestos = (DrPoliza("Cantidad").ToString().ToDecimal * (PU)).RoundSQL If DrPSAdicional("IVA").ToString().Contiene("-1", "") Then DrPoliza("PorcentajeIVA") = PorcentajeIVA @@ -17036,7 +17036,7 @@ Partial Class Ventas DrPoliza("IEPS") = DrPoliza("ImporteIEPS") DrPoliza("Descuento") = 0 ' Descuento DrPoliza("TipoDescuento") = HdnTipoDescuento.Value - DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU) + DrPoliza("Total") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales) DrPoliza("TotalImporte") = (DrPoliza("Cantidad").ToString().ToDecimal * PU).RoundSQL(NumeroDecimales) DrPoliza("SATClaveProdServ") = DrPSAdicional("SATClavePS") DrPoliza("SATClaveUM") = DrPSAdicional("SATClaveUnidadMedida") From e254a687aee7b716abd2692a455a3cc42cd9beec Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 15 Apr 2021 15:13:31 -0700 Subject: [PATCH 04/11] --- Inventarios/EntradasSalidas.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index e6e103354..2258b921e 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -4658,7 +4658,7 @@ Partial Class Inventarios_EntradasSalidas CveUM = DrPS("CveUnidadMedida").ToString().ToEntero() UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}") End If - AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", "-1", "-1", "", + AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", Codigo, "-1", "", Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False) NumAgregados = NumAgregados + 1 From e311ba1bf7a3fd2978f4f8ae70bba9ce0673b8ac Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 15 Apr 2021 15:32:12 -0700 Subject: [PATCH 05/11] Cambios visuales --- Bancos/DepositosCaja.aspx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 3e76962a8..aea4fc4ca 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -81,18 +81,17 @@
-
- -
- - -
-
+
- From d537ed8a175fe0892c07457fe1c5b9733d08d10e Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Apr 2021 15:46:15 -0700 Subject: [PATCH 06/11] -- mejora visual --- Bancos/DepositosCaja.aspx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 9b7c16844..ab3b72676 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -34,7 +34,7 @@
- +
@@ -77,22 +77,22 @@ - + -
- -
- - -
-
+ - From 3c4e0bf83fad2e2a4c8ad2e051875fc1909e559c Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 15 Apr 2021 17:05:10 -0700 Subject: [PATCH 07/11] Cambios para comisiones negativas --- Bancos/DepositosCaja.aspx | 24 ++++++++++++++++-------- Bancos/DepositosCaja.aspx.vb | 5 +++-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index aea4fc4ca..b590e7f4b 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -230,32 +230,42 @@ var comision = 0; function FnSuma(chk, cantidad) { - debugger; var saldo = ToDouble($('#C_lblValorTotal').text()); - debugger; if (chk.checked == false) { cantidad = cantidad * -1; - debugger; } saldo = saldo + cantidad; - debugger; $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); $('#C_lblValorTotalSeleccionado').text(FormatoNumero(saldo, 2)); ValorTotalSeleccionado = saldo - debugger; } function txtSuma(txt) { var saldo = ToDouble($('#C_lblValorTotal').text()); var comision2 = ToDouble($('#C_TxtComision').val()); + if (comision2 < 0) { + comision2 = comision2 * -1; + debugger; + } if (comision2 < ValorTotalSeleccionado) { comision2 = comision2 - comision saldo = saldo - comision2; $('#C_lblValorTotal').text(FormatoNumero(saldo, 2)); comision = ToDouble($('#C_TxtComision').val()) + if (comision < 0) { + comision = comision * -1; + debugger; + } } else { - $('#C_TxtComision').val(comision) + var comisionNegativo = ToDouble($('#C_TxtComision').val()); + if (comisionNegativo < 0) { + $('#C_TxtComision').val(comision*-1) + debugger; + } else { + $('#C_TxtComision').val(comision) + + } alert("No es posible poner una comision superior a lo seleccionado") } @@ -265,14 +275,12 @@ $('#LblClasificacion').css("display", "block"); $('#divClasificacion').css("display", "block"); - debugger; } else { $('#LblSubproyecto').css("display", "none"); $('#divSubProyecto').css("display", "none"); $('#LblClasificacion').css("display", "none"); $('#divClasificacion').css("display", "none"); - debugger; } diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index c9520b792..98f963bc6 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -71,6 +71,7 @@ Partial Class Bancos_DepositosCaja Dim TotalImporte As Decimal = 0 Dim TotalImportePrePoliza As Decimal + Dim Comision As Integer = IIf(TxtComision.Text.ToEntero > 0, TxtComision.Text.ToEntero, (TxtComision.Text.ToEntero * -1)).ToString.ToEntero For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal @@ -82,7 +83,7 @@ Partial Class Bancos_DepositosCaja End If TotalImportePrePoliza = TotalImporte - If TxtComision.Text.ToEntero > 0 Then + If Comision > 0 Then TotalImporte = TotalImporte - TxtComision.Text.ToEntero If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) @@ -134,7 +135,7 @@ Partial Class Bancos_DepositosCaja End If CveIEOrigen = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If TxtComision.Text.ToEntero > 0 Then + If Comision > 0 Then CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero CveClasificacion = DdlClasificacion.SelectedValue.ToEntero If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then From 6aabc80eee8e95cab61bb96c9d3cc6cd87b030cb Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 15 Apr 2021 17:43:40 -0700 Subject: [PATCH 08/11] Cambios Comision --- Bancos/DepositosCaja.aspx.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 2cd68d821..7b5d4c120 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -71,7 +71,7 @@ Partial Class Bancos_DepositosCaja Dim TotalImporte As Decimal = 0 Dim TotalImportePrePoliza As Decimal - Dim Comision As Integer = IIf(TxtComision.Text.ToEntero > 0, TxtComision.Text.ToEntero, (TxtComision.Text.ToEntero * -1)).ToString.ToEntero + Dim Comision As Decimal = Abs(TxtComision.Text.ToDecimal) For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal @@ -84,7 +84,7 @@ Partial Class Bancos_DepositosCaja TotalImportePrePoliza = TotalImporte If Comision > 0 Then - TotalImporte = TotalImporte - TxtComision.Text.ToEntero + TotalImporte = TotalImporte - Comision If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) Exit Sub @@ -139,7 +139,7 @@ Partial Class Bancos_DepositosCaja CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero CveClasificacion = DdlClasificacion.SelectedValue.ToEntero If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TxtComision.Text.ToEntero, "Comisión", 51, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Comision, "Comisión", 51, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then OcurrioError = True End If Else OcurrioError = True From b96598e3f0cb769746f0ccebdc247d1f7dc6afb8 Mon Sep 17 00:00:00 2001 From: HECTOR RODRIGUEZ Date: Thu, 15 Apr 2021 17:44:06 -0700 Subject: [PATCH 09/11] Cambio validacion de fechas documento para las empresas UsaAC --- Bancos/ProveedoresAbonar.aspx.vb | 17 +++++++++-------- Ventas/ClientesAbonar.aspx.vb | 16 +++++++++------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Bancos/ProveedoresAbonar.aspx.vb b/Bancos/ProveedoresAbonar.aspx.vb index 6f9274c1e..3dd2dfad1 100644 --- a/Bancos/ProveedoresAbonar.aspx.vb +++ b/Bancos/ProveedoresAbonar.aspx.vb @@ -732,14 +732,15 @@ Partial Class Bancos_ProveedoresAbonar Dim AnioDocumento As Integer = FechaDocumento.Year Dim MesDocumento As Integer = FechaDocumento.Month - If AnioFactura > AnioDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") - ValFechaDocumento = True - ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") - ValFechaDocumento = True + If UsuarioActual.Empresa.UsaAC = False Then + If AnioFactura > AnioDocumento Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + End If End If - End If Next @@ -782,7 +783,7 @@ Partial Class Bancos_ProveedoresAbonar Exit Sub End If - Dim ImporteSeleccionado As Decimal = 0 + Dim ImporteSeleccionado As Decimal = 0 If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then Dim Validada As Boolean = False Dim MsgValidadas As New StringBuilder diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index fc2aa4147..cf95982d6 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -671,14 +671,16 @@ Partial Class Ventas_ClientesAbonar Dim AnioDocumento As Integer = FechaDocumento.Year Dim MesDocumento As Integer = FechaDocumento.Month - If AnioFactura > AnioDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") - ValFechaDocumento = True - ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then - FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") - ValFechaDocumento = True - End If + If UsuarioActual.Empresa.UsaAC = False Then + If AnioFactura > AnioDocumento Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + ElseIf AnioFactura = AnioDocumento And MesFactura > MesDocumento Then + FoliosFechasValFechaDocumento.AppendLine($"Folio: { gvRowVal.DataKey("SerieFolio") } fecha: {gvRowVal.DataKey("Fecha").ToDate.ToString("dd/MM/yyyy") }
") + ValFechaDocumento = True + End If + End If End If Next From 0ee009a9a03fd7d71d515457c9560478234e24eb Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Apr 2021 17:58:22 -0700 Subject: [PATCH 10/11] =?UTF-8?q?cambio=20en=20todecimal=20y=20se=20agreg?= =?UTF-8?q?=C3=B3=20m=C3=A1s=20texto=20a=20referencia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bancos/DepositosCaja.aspx | 2 +- Bancos/DepositosCaja.aspx.vb | 46 ++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 4c73b0798..73efc4f02 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -268,7 +268,7 @@ alert("No es posible poner una comision superior a lo seleccionado") } - if (comision > 0) { + if (comision != 0) { $('#LblSubproyecto').css("display", "block"); $('#divSubProyecto').css("display", "block"); $('#LblClasificacion').css("display", "block"); diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 2cd68d821..d04585cfc 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -41,7 +41,7 @@ Partial Class Bancos_DepositosCaja DdlSubProyectoDeposito.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectoDeposito.DataBind() - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=2) DdlClasificacion.DataBind() End Sub @@ -71,20 +71,21 @@ Partial Class Bancos_DepositosCaja Dim TotalImporte As Decimal = 0 Dim TotalImportePrePoliza As Decimal - Dim Comision As Integer = IIf(TxtComision.Text.ToEntero > 0, TxtComision.Text.ToEntero, (TxtComision.Text.ToEntero * -1)).ToString.ToEntero + Dim Comision As Decimal = TxtComision.Text.Todecimal For Each Gvr As GridViewRow In GvFacturas.Rows If Gvr.FCCheckBox("ChkFactura").Checked Then TotalImporte += Gvr.DataKey("Importe").ToDecimal Next If TotalImporte = 0 Then - Alert("Seleccion una factura para realizar el deposito", TipoMensaje.MsgAdvertencia) + Alert("Seleccion una factura para realizar el depósito", TipoMensaje.MsgAdvertencia) Exit Sub End If TotalImportePrePoliza = TotalImporte - If Comision > 0 Then - TotalImporte = TotalImporte - TxtComision.Text.ToEntero + If Comision <> 0 Then + TotalImporte = TotalImporte + Comision + Comision = -(Comision) ' se inverte el valor, va cargada If DdlSubProyectoDeposito.SelectedValue.ToEntero = -1 Or DdlClasificacion.SelectedValue.ToEntero = -1 Then Alert("Debes Seleccionar un Subproyecto y una Clasificación", TipoMensaje.MsgAdvertencia) Exit Sub @@ -126,28 +127,28 @@ Partial Class Bancos_DepositosCaja NuevaCvePrePoliza = ObjContabilidad.AddPrePolizas("Vta", 13, TotalImportePrePoliza, TotalImportePrePoliza, CveMoneda, Fecha, "Depósito Bancario", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - - - 'Salida de Caja Chica + 'Entrada a bancos FolioIE = ObjBancos.GetNextFolio(DdlCuentaDeposito.SelectedValue.ToEntero, 8) If Not FolioIE > 0 Then OcurrioError = True End If CveIEOrigen = ObjBancos.AddBancos_IE(DdlCuentaDeposito.SelectedValue.ToEntero, 8, Fecha, FolioIE.ToString, "Depósito Bancario", TotalImporte, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Comision > 0 Then - CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero - CveClasificacion = DdlClasificacion.SelectedValue.ToEntero - If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TxtComision.Text.ToEntero, "Comisión", 51, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=TxtComision.Text.ToEntero * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + documentos += String.Format("Depósito: {1}    
", CveIEOrigen, FolioIE) + + + If ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then + + If Comision <> 0 Then + CveSubProyecto = DdlSubProyectoDeposito.SelectedValue.ToEntero + CveClasificacion = DdlClasificacion.SelectedValue.ToEntero + + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, Comision, "Comisión", 51, "Depósito Bancario ", Fecha, IdCuentaBancariaOrigen, -1, CveClasificacion:=CveClasificacion, CveSubProyecto:=CveSubProyecto, ImporteMX:=Comision * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then OcurrioError = True End If - Else OcurrioError = True End If Else - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, False, TotalImporte, "Depósito Bancario", 30, "Depósito Bancario", Fecha, IdCuentaBancariaOrigen, -1, CveIE:=CveIEOrigen, ImporteMX:=TotalImporte * TipoCambio, CveCuenta:=CveCuentaBancariaOrigen) Then - OcurrioError = True - End If + OcurrioError = True End If For Each Gvr As GridViewRow In GvFacturas.Rows @@ -156,7 +157,7 @@ Partial Class Bancos_DepositosCaja 'Datos de las Nuevas PrePolizas 'Entrada a Bancos - Dim Importe As Double = Gvr.DataKey("Importe").ToDouble + Dim Importe As Decimal = Gvr.DataKey("Importe").ToDecimal Dim SerieFolio As String = Gvr.DataKey("SerieFolio").ToString 'Datos de las Prepolizas A Cancelar @@ -168,10 +169,10 @@ Partial Class Bancos_DepositosCaja If Not FolioIE > 0 Then OcurrioError = True End If - CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, "Depósito Bancario", Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + CveIEDestino = ObjBancos.AddBancos_IE(DdlCajaChica.SelectedValue.ToEntero, 2, Fecha, FolioIE.ToString, String.Format("Depósito Bancario: {0}", SerieFolio), Importe, CveMoneda, 1, "Depósito Bancario", "", False, False, -1, NuevaCvePrePoliza, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe.ToDecimal, SerieFolio, 30, "Depósito Bancario", Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe.ToDecimal * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then + If Not ObjContabilidad.AddPrePolizasDetalle(NuevaCvePrePoliza, True, Importe, SerieFolio, 30, String.Format("Depósito Bancario: {0}", SerieFolio), Fecha, IdCuentaBancariaDestino, -1, CveIE:=CveIEDestino, ImporteMX:=Importe * TipoCambio, CveCuenta:=CveCuentaBancariaDestino) Then OcurrioError = True End If @@ -180,21 +181,20 @@ Partial Class Bancos_DepositosCaja OcurrioError = True End If Dim StrEncript As String = Encripta($"OP=DC&CveIE={CveIEDestino}&CuentaCaja={DdlCajaChica.SelectedItem.Text}&CuentaDepo={DdlCuentaDeposito.SelectedItem.Text}") - 'documentos += String.Format("Documento {1}     ", CveIEDestino.ToString, SerieFolio) + 'documentos += String.Format("Imprimir {1}

", StrEncript, SerieFolio) End If - Next - If OcurrioError Then ObjContabilidad.RollBack() Alert("Ocurrio un error al realizar los depositos", TipoMensaje.MsgError) Else ObjContabilidad.Commit() CargaDatos() + documentos += String.Format("Prepóliza

", NuevaCvePrePoliza) Alert(documentos.ToString) From 9e13cdea701b3d311502d4a6a78b3da4526530e8 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 15 Apr 2021 18:01:23 -0700 Subject: [PATCH 11/11] Redondeos --- Ventas/ClientesAbonar.aspx.vb | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Ventas/ClientesAbonar.aspx.vb b/Ventas/ClientesAbonar.aspx.vb index fc2aa4147..866df187a 100644 --- a/Ventas/ClientesAbonar.aspx.vb +++ b/Ventas/ClientesAbonar.aspx.vb @@ -973,8 +973,8 @@ Partial Class Ventas_ClientesAbonar ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago importeMX = ImporteMovimiento * tipoCambioVenta End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) + ImporteMovimiento = ImporteMovimiento.RoundSQL + importeMX = importeMX.RoundSQL TipoCambioGeneral = tipoCambioVenta CveSubProyectoContabilizar = CveSubProyecto @@ -1020,8 +1020,8 @@ Partial Class Ventas_ClientesAbonar ImporteMovimiento = gvr.DataKey("RetIVA").ToDecimal * PorcentajePago importeMX = ImporteMovimiento * tipoCambioVenta End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) + ImporteMovimiento = ImporteMovimiento.RoundSQL + importeMX = importeMX.RoundSQL TipoCambioGeneral = tipoCambioVenta CveSubProyectoContabilizar = CveSubProyecto @@ -1055,8 +1055,8 @@ Partial Class Ventas_ClientesAbonar ImporteMovimiento = gvr.DataKey("RetISR").ToDecimal * PorcentajePago importeMX = ImporteMovimiento * tipoCambioVenta End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) + ImporteMovimiento = ImporteMovimiento.RoundSQL + importeMX = importeMX.RoundSQL TipoCambioGeneral = tipoCambioVenta CveSubProyectoContabilizar = CveSubProyecto @@ -1137,8 +1137,8 @@ Partial Class Ventas_ClientesAbonar ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) + ImporteMovimiento = ImporteMovimiento.RoundSQL + importeMX = importeMX.RoundSQL TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) CveSubProyectoContabilizar = CveSubProyecto @@ -1185,8 +1185,8 @@ Partial Class Ventas_ClientesAbonar ImporteMovimiento = (gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) + ImporteMovimiento = ImporteMovimiento.RoundSQL + importeMX = importeMX.RoundSQL TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) CveSubProyectoContabilizar = CveSubProyecto @@ -1220,8 +1220,8 @@ Partial Class Ventas_ClientesAbonar ImporteMovimiento = (gvr.DataKey("RetISR").ToDecimal * PorcentajePago) importeMX = ImporteMovimiento * If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2, MidpointRounding.AwayFromZero) + ImporteMovimiento = ImporteMovimiento.RoundSQL + importeMX = importeMX.RoundSQL TipoCambioGeneral = If(FuncionalidadFluctuacionImpuestos, tipoCambioPago, tipoCambioVenta) CveSubProyectoContabilizar = CveSubProyecto @@ -1484,8 +1484,8 @@ Partial Class Ventas_ClientesAbonar TipoMovimiento = True End If - ImporteMovimiento = Math.Round(ImporteMovimiento, 2, MidpointRounding.AwayFromZero) - importeMX = Math.Round(importeMX, 2) + ImporteMovimiento = ImporteMovimiento.RoundSQL + importeMX = importeMX.RoundSQL TipoCambioGeneral = tipoCambioPago CveSubProyectoContabilizar = CveSubProyecto