From 9d702afd106e7c6224d2b122b1861e9563a9f265 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Mon, 5 Jun 2023 23:35:36 -0700 Subject: [PATCH 1/9] Clientes Validacion en alta de cuenta sig --- Ventas/Clientes.aspx.vb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 43a0427be..2c00d8389 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2750,11 +2750,15 @@ Partial Class Clientes End If End If - If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then - ErrorProceso = True + + If IdCuentaAltaCompaq > 0 Then + If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, 1, ObjClientes.IniciaTransacSQL) Then + ErrorProceso = True + End If End If + If ErrorProceso Then ObjClientes.RollBack() Else From c77b33db132aa375a9376fa73a8aabee28427dd2 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Tue, 6 Jun 2023 06:52:32 -0700 Subject: [PATCH 2/9] --- App_Code/LogicNominas.vb | 2 +- Nomina/Nomina.aspx.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/App_Code/LogicNominas.vb b/App_Code/LogicNominas.vb index 50079a832..baed693a2 100644 --- a/App_Code/LogicNominas.vb +++ b/App_Code/LogicNominas.vb @@ -190,7 +190,7 @@ Public Class LogicNominas If continuar AndAlso objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) AndAlso objPersonal.DtResultados.Rows.Count > 0 Then RFC = objPersonal.RFC cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString() - NombreCompleto = String.Format("{0} {1} {2}", objPersonal.Nombres, objPersonal.APaterno, objPersonal.AMaterno) + NombreCompleto = String.Format("{0} {1} {2}", objPersonal.Nombres, objPersonal.APaterno, objPersonal.AMaterno).Trim() CodigoPostal = objPersonal.CP Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1") CURP = objPersonal.CURP diff --git a/Nomina/Nomina.aspx.cs b/Nomina/Nomina.aspx.cs index 4b1641e62..99b856a6a 100644 --- a/Nomina/Nomina.aspx.cs +++ b/Nomina/Nomina.aspx.cs @@ -1636,8 +1636,8 @@ public partial class Nomina_Nomina2 : ClsPaginas { Correo = drow["Correo"].ToString(); NombreCompleto = drow["NombreCompleto"].ToString(); - RFC = drow["RFC"].ToString(); - CURP = drow["CURP"].ToString(); + //RFC = drow["RFC"].ToString(); + //CURP = drow["CURP"].ToString(); } string Msg = "";// lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, (UsuarioActual.CveUsuario == 100 ? 4 : 4)); Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, versionTimbre: (UsuarioActual.CveEmpresa == 119 ? VersionTimbradoEnum.PorDefectoEmpresa : VersionTimbradoEnum.Version3_3)); From 08c14700c13746af71c609021bc80748feac8b47 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Tue, 6 Jun 2023 16:58:28 -0700 Subject: [PATCH 3/9] Clientes Quitar seccion de asiganacion de cuenta padre con base en funcionalidad 114 --- Ventas/Clientes.aspx.vb | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 2c00d8389..911037aab 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -2638,31 +2638,31 @@ Partial Class Clientes Dim CtaCliente As Integer = DdlCtaContableClientes.SelectedValue.ToEntero() ' si tiene la funcionalidad de la cuenta contable padre - If UsuarioActual.Empresa.Funcionalidad(114) <> "" Then + 'If UsuarioActual.Empresa.Funcionalidad(114) <> "" Then - Dim ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) + ' Dim ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) - ObjContaAC.IniciaTransacSQL() - 'se registra la cuenta contable automaticamente + ' ObjContaAC.IniciaTransacSQL() + ' 'se registra la cuenta contable automaticamente - CtaCliente = ObjContaAC.AddSiguienteCuentaHijo(UsuarioActual.Empresa.Funcionalidad(114).ToEntero(), TxtNombreComercial.Text.Trim, "A", 2) + ' CtaCliente = ObjContaAC.AddSiguienteCuentaHijo(UsuarioActual.Empresa.Funcionalidad(114).ToEntero(), TxtNombreComercial.Text.Trim, "A", 2) - If CtaCliente > 0 Then - ObjContaAC.Commit() - DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString())) - DdlCtaContableClientes.SelectedValue = CtaCliente.ToString() - 'MsgCuentaContable = String.Format("
Con la cuenta contable: {0}", NewCuenta) + ' If CtaCliente > 0 Then + ' ObjContaAC.Commit() + ' DdlCtaContableClientes.Items.Add(New ListItem(TxtNombreComercial.Text.Trim, CtaCliente.ToString())) + ' DdlCtaContableClientes.SelectedValue = CtaCliente.ToString() + ' 'MsgCuentaContable = String.Format("
Con la cuenta contable: {0}", NewCuenta) - Else + ' Else - ObjContaAC.RollBack() - ObjContaAC.Dispose() - Alert("Error al guardar la cuenta contable ", TipoMensaje.MsgError) - ObjClientes.Dispose() - Exit Sub - End If - ObjContaAC.Dispose() - End If + ' ObjContaAC.RollBack() + ' ObjContaAC.Dispose() + ' Alert("Error al guardar la cuenta contable ", TipoMensaje.MsgError) + ' ObjClientes.Dispose() + ' Exit Sub + ' End If + ' ObjContaAC.Dispose() + 'End If Dim CodigoCuentaAltaCompaq As String = "" From 7c882e39da4f009b4dfa831390f3c52ab75e2ac4 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 6 Jun 2023 19:25:49 -0700 Subject: [PATCH 4/9] Devolver cantidad disponible al cancelar traspasos --- Inventarios/TraspasoAlmacen.aspx.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 6e24b8f56..cc9d42df5 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1652,7 +1652,7 @@ Partial Class Inventarios_TraspasoAlmacen 'DEBE CONSIDERAR SOLO LAS FILAS QUE TENGA PRODUCTOS, NO EL TOTALIZADOR If CvePS > 0 Then CveMovimientoDetalleSalida = GvRow.DataKey("CveMovimientoDetalle").ToEntero - Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToString.ToDecimal + Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal() 'GvRow.FCTextBox("TxtCantidad").Text.ToString.ToDecimal 'If ChkRealizarDevolucion.Checked Then Cantidad = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal From e1383f778275e6cae4bbc26fce1756204e2925dd Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 6 Jun 2023 19:31:00 -0700 Subject: [PATCH 5/9] VSH. Agregar numero de turnos al generar una venta --- App_Code/ClsVentas.vb | 3 +- Ventas/RepProductosServiciosDetalle.aspx | 5 +- Ventas/RepProductosServiciosDetalle.aspx.vb | 5 ++ Ventas/Ventas.aspx | 67 +++++++++++++++------ Ventas/Ventas.aspx.vb | 66 ++++++++++++++++++-- 5 files changed, 120 insertions(+), 26 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 776206141..a91bc04fa 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1343,7 +1343,7 @@ Public Class ClsVentas CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1, Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1, Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0, - Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1) As Boolean + Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Integer = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasDetalleAdd") @@ -1375,6 +1375,7 @@ Public Class ClsVentas .Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo + .Add("@NumTurnos", SqlDbType.Int).Value = NumTurnos End With Try diff --git a/Ventas/RepProductosServiciosDetalle.aspx b/Ventas/RepProductosServiciosDetalle.aspx index ee33c53cb..e7aac2a0a 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx +++ b/Ventas/RepProductosServiciosDetalle.aspx @@ -427,7 +427,8 @@ <%--18--%> - + <%--19--%> + @@ -475,7 +476,7 @@ - + diff --git a/Ventas/RepProductosServiciosDetalle.aspx.vb b/Ventas/RepProductosServiciosDetalle.aspx.vb index 19dc8e898..cab107edb 100644 --- a/Ventas/RepProductosServiciosDetalle.aspx.vb +++ b/Ventas/RepProductosServiciosDetalle.aspx.vb @@ -85,6 +85,10 @@ Partial Class Ventas_RepProductosServiciosDetalle End If + If UsuarioActual.CveEmpresa.Contiene(7, 122) Then + ChkNumTurnos.Visible = True + End If + End If End Sub @@ -568,6 +572,7 @@ Partial Class Ventas_RepProductosServiciosDetalle GvDatos.Columns(16).Visible = ChkMetodoPago.Checked GvDatos.Columns(17).Visible = ChkFormaPago.Checked GvDatos.Columns(18).Visible = ChkFechaHoraEmision.Checked + GvDatos.Columns(19).Visible = ChkNumTurnos.Checked CargaDatos() UPDatos.Update() diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 0d08fa083..5b41cce53 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -948,7 +948,8 @@ <%--width="100%"--%> # - Cant + + Unidad
@@ -992,13 +993,24 @@   - - - - - - - + +
+
+ + + + + + +
+
+
+ +
+ + +
+
<%-- --%> @@ -1124,17 +1136,38 @@ <%--1--%> - + +
+
+ +
+
+
+
+ +
+
- - - - - - - - +
+
+ + + + + + + + +
+
+
+ +
+ + +
+
<%--2--%> diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index cb546ea45..998edea0a 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2748,6 +2748,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) + TmpDT.Columns.Add("NumTurnos", GetType(Integer)) + TmpDT.Columns("NumTurnos").DefaultValue = 0 GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -2778,6 +2780,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) + TmpDT.Columns.Add("NumTurnos", GetType(Integer)) + TmpDT.Columns("NumTurnos").DefaultValue = 0 GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -3151,6 +3155,11 @@ Partial Class Ventas CargaListasPrecios() End If + If CveVenta <= 0 AndAlso UsuarioActual.CveEmpresa.Contiene(7, 122) Then + TxtCantidad.Width = New Unit("100%") + DivNumTurnos.Visible = True + End If + 'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE 'If UsuarioActual.CveVendedor > 0 Then ' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString()) @@ -8067,6 +8076,12 @@ Partial Class Ventas e.Row.FCLinkButton("imgD").Visible = False End If + If UsuarioActual.CveEmpresa.Contiene(7, 122) Then + e.Row.FCTextBox("TxtCantidad").Width = New Unit("100%") + e.Row.FCLabel("LblTurnoEditar").Visible = True + e.Row.FCTextBox("TxtNumTurnosEditar").Visible = True + End If + 'If UsuarioActual.CveEmpresa = 119 Then ' e.Row.FCTextBox("TxtDescuento").Enabled = False 'End If @@ -8150,6 +8165,10 @@ Partial Class Ventas e.Row.FCLiteral("LtlPrecioLista").Visible = True End If + If UsuarioActual.CveEmpresa.Contiene(7, 122) AndAlso e.Row.DBCampo("NumTurnos").ToEntero() > 0 Then + e.Row.FCLiteral("LtlNumTurnos").Visible = True + End If + 'CANTIDAD FACTURADA Select Case e.Row.DBCampo("TipoDocto") Case "Cot" @@ -8456,6 +8475,11 @@ Partial Class Ventas ObjDescuento = CalcularDescuentos(GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero(), Cantidad, PU) End If + Dim NumTurnos As Integer = 0 + If UsuarioActual.CveEmpresa.Contiene(7, 122) Then + NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToEntero() + End If + TmpDT.Rows.Remove(TmpDT.Rows(e.RowIndex)) CalculaUsados() AgregarProductoServicio(Cantidad, DdlUM.SelectedValue.ToEntero(), DdlUM.SelectedItem.Text, DdlCla.SelectedValue.ToEntero(), DdlCla.SelectedItem.Text, @@ -8463,7 +8487,8 @@ Partial Class Ventas GvPS.Rows(e.RowIndex).FCTextBox("TxtObsPS").Text.Trim, PU, ObjDescuento.ImporteDescuento, GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedValue.ToEntero(), GvPS.Rows(e.RowIndex).FCDropDownList("DdlProyecto").SelectedItem.Text, GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero(), GvPS.Rows(e.RowIndex).FCDropDownList("DdlSubProyecto").SelectedItem.Text, - CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle, ObjDescuento:=ObjDescuento) + CuentaPredial:=CuentaPredial, CveVentaDetalle:=GvPS.Rows(e.RowIndex).DataKey("CveVentaDetalle").ToString().ToEntero(), SeActualiza:=True, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle, + ObjDescuento:=ObjDescuento, NumTurnos:=NumTurnos) ' TmpDT.Rows(e.RowIndex)("CveUM") = Ddl.SelectedValue ' TmpDT.Rows(e.RowIndex)("UM") = Ddl.SelectedItem.Text @@ -8532,8 +8557,11 @@ Partial Class Ventas TmpDT.Rows(e.RowIndex)("PorcentajeRetISR") = ClienteRetISR TmpDT.Rows(e.RowIndex)("CuentaPredial") = CuentaPredial - - + Dim NumTurnos As Integer = 0 + If UsuarioActual.CveEmpresa.Contiene(7, 122) Then + NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToEntero() + End If + TmpDT.Rows(e.RowIndex)("NumTurnos") = NumTurnos If ObjDescuento IsNot Nothing Then TmpDT.Rows(e.RowIndex)("CvePromocionDetalle") = ObjDescuento.CvePromocionDetalle @@ -13428,7 +13456,7 @@ Partial Class Ventas Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6), Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, - PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero()) Then + PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToEntero()) Then ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") Exit For Else @@ -18815,11 +18843,16 @@ Partial Class Ventas End If End If + Dim NumTurnos As Integer = 0 + If UsuarioActual.CveEmpresa.Contiene(7, 122) Then + NumTurnos = TxtNumTurnos.Text.ToEntero() + End If + AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text, CvePS, "", TxtObsPS.Text.TrimEnd, PU, ObjDescuento.ImporteDescuento, DdlProyecto.SelectedValue.ToEntero(), DdlProyecto.SelectedItem.Text, DdlSubProyecto.SelectedValue.ToEntero(), DdlSubProyecto.SelectedItem.Text, Serie:=If(DIVCod.Visible, TxtCodigoSerie.Text.Trim, ""), TiempoEntrega:=TxtTiempoEntrega.Text, CuentaPredial:=TxtCuentaPredial.Text.Trim, RegeneraIEPS:=ClienteDesglosaIEPS, CvePromocionDetalle:=ObjDescuento.CvePromocionDetalle, - ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS) + ImporteProntoPago:=ObjDescuento.ImporteProntoPago, ObjDescuento:=ObjDescuento, CvePrecioLista:=CvePrecioListaPS, PrecioLista:=PrecioListaPS, NumTurnos:=NumTurnos) CalculaUsados() @@ -18941,6 +18974,7 @@ Partial Class Ventas End Sub Private Sub LimpiaAgregar() TxtCantidad.Text = "" + TxtNumTurnos.Text = "" HdnPS.Value = "-1" HdnCodigoPS.Value = "-1" HdnTipoPS.Value = "-1" @@ -19011,7 +19045,7 @@ Partial Class Ventas Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False, Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "", - Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D) As Boolean + Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Integer = 0) As Boolean Dim Retorno As Boolean = False Try @@ -19274,6 +19308,7 @@ Partial Class Ventas Row("AFDepreciacion") = AFDepreciacion Row("AFValorInicial") = AFValorInicial + Row("NumTurnos") = NumTurnos If UsuarioActual.CveEmpresa.Contiene(119, 13, 83) Then If Not RemisionesLista.Count > 0 Then 'SI VIENE DE REMISION NO SE CONSIDERA @@ -19519,6 +19554,9 @@ Partial Class Ventas TmpDT.Columns("TieneProntoPago").DefaultValue = "No" TmpDT.Columns("ImporteProntoPago").DefaultValue = 0 + TmpDT.Columns.Add("NumTurnos", GetType(Integer)) + TmpDT.Columns("NumTurnos").DefaultValue = 0 + End Sub Private Sub CreaDTmpC() DTmpC = New DataTable @@ -33054,11 +33092,25 @@ Partial Class Ventas 'REMOVER EVENTO PARA RECARGAR ALMACEN 'spanAlmacen.Attributes.Remove("onclick") + If UsuarioActual.CveEmpresa.Contiene(7, 122) Then + TxtCantidad.Width = New Unit("100%") + DivNumTurnos.Visible = True + End If If UsuarioActual.Empresa.Funcionalidad(360) = "1" Then CargaListasPrecios() End If + BtnEditar.Visible = False + BtnEmitir.Visible = False + BtnPermisoEditarCotizacion.Visible = False + BtnEditarCotizacion.Visible = False + BtnPermisoEditarRemision.Visible = False + BtnEditarRemision.Visible = False + + BtnGenerarRemision.Visible = False + BtnGeneraAutorizacion.Visible = False + HdnCargarInventario.Value = "False" UpParametros.Update() @@ -35400,6 +35452,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) + TmpDT.Columns.Add("NumTurnos", GetType(Integer)) + TmpDT.Columns("NumTurnos").DefaultValue = 0 Return TmpDT End Function From 3f1d8bf0cc767c068d38de0d0705d72032a61e19 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 8 Jun 2023 18:38:26 -0700 Subject: [PATCH 6/9] --Cambiar NumTurnos a decimal --- App_Code/ClsVentas.vb | 4 ++-- Ventas/Ventas.aspx | 6 +++--- Ventas/Ventas.aspx.vb | 34 +++++++++++++++++----------------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index a91bc04fa..d198effdb 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1343,7 +1343,7 @@ Public Class ClsVentas CvePresupuestoIngreso As Integer, Optional TiempoEntrega As String = "", Optional CveVentaDetallePadre As Integer = -1, Optional CveContratoDetalle As Integer = -1, Optional PorcentajeIVA As Decimal = 0, Optional IEPS As Double = -1, Optional PorcentajeIEPS As Double = 0, Optional CvePromocionDetalle As Integer = -1, Optional CveMovimientoDetallePedido As Integer = -1, Optional ImporteRetIVA As Double = 0, Optional PorcentajeRetIVA As Double = 0, - Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Integer = 0) As Boolean + Optional ImporteRetISR As Double = 0, Optional PorcentajeRetISR As Double = 0, Optional CuentaPredial As String = "", Optional CvePrecioLista As Integer = -1, Optional CveActivoFijo As Integer = -1, Optional NumTurnos As Decimal = 0D) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasDetalleAdd") @@ -1375,7 +1375,7 @@ Public Class ClsVentas .Add("@CuentaPredial", SqlDbType.VarChar).Value = CuentaPredial .Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo - .Add("@NumTurnos", SqlDbType.Int).Value = NumTurnos + .Add("@NumTurnos", SqlDbType.Decimal).Value = NumTurnos End With Try diff --git a/Ventas/Ventas.aspx b/Ventas/Ventas.aspx index 5b41cce53..f72859039 100644 --- a/Ventas/Ventas.aspx +++ b/Ventas/Ventas.aspx @@ -1008,7 +1008,7 @@
- +
@@ -1144,7 +1144,7 @@
- +
@@ -1165,7 +1165,7 @@
- +
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 998edea0a..9b7a3efa4 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2748,8 +2748,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) - TmpDT.Columns.Add("NumTurnos", GetType(Integer)) - TmpDT.Columns("NumTurnos").DefaultValue = 0 + TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) + TmpDT.Columns("NumTurnos").DefaultValue = 0D GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -2780,8 +2780,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) - TmpDT.Columns.Add("NumTurnos", GetType(Integer)) - TmpDT.Columns("NumTurnos").DefaultValue = 0 + TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) + TmpDT.Columns("NumTurnos").DefaultValue = 0D GvPS.DataSource = ObjVentas.DtResultados GvPS.DataBind() @@ -8165,7 +8165,7 @@ Partial Class Ventas e.Row.FCLiteral("LtlPrecioLista").Visible = True End If - If UsuarioActual.CveEmpresa.Contiene(7, 122) AndAlso e.Row.DBCampo("NumTurnos").ToEntero() > 0 Then + If UsuarioActual.CveEmpresa.Contiene(7, 122) AndAlso e.Row.DBCampo("NumTurnos").ToDecimal() > 0 Then e.Row.FCLiteral("LtlNumTurnos").Visible = True End If @@ -8475,9 +8475,9 @@ Partial Class Ventas ObjDescuento = CalcularDescuentos(GvPS.Rows(e.RowIndex).FCDropDownLost("DdlPS").SelectedValue.ToEntero(), Cantidad, PU) End If - Dim NumTurnos As Integer = 0 + Dim NumTurnos As Decimal = 0 If UsuarioActual.CveEmpresa.Contiene(7, 122) Then - NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToEntero() + NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal() End If TmpDT.Rows.Remove(TmpDT.Rows(e.RowIndex)) @@ -8557,9 +8557,9 @@ Partial Class Ventas TmpDT.Rows(e.RowIndex)("PorcentajeRetISR") = ClienteRetISR TmpDT.Rows(e.RowIndex)("CuentaPredial") = CuentaPredial - Dim NumTurnos As Integer = 0 + Dim NumTurnos As Decimal = 0 If UsuarioActual.CveEmpresa.Contiene(7, 122) Then - NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToEntero() + NumTurnos = GvPS.Rows(e.RowIndex).FCTextBox("TxtNumTurnosEditar").Text.ToDecimal() End If TmpDT.Rows(e.RowIndex)("NumTurnos") = NumTurnos @@ -13456,7 +13456,7 @@ Partial Class Ventas Row("PU").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)))), 6), Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(factura.ConvertirPesos, factura.TipoCambio, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=Row("CvePromocionDetalle").ToString().ToEntero(), IEPS:=Row("ImporteIEPS").ToString().ToDouble, CveMovimientoDetallePedido:=Row("CveMovimientoDetallePedido").ToString().ToEntero(), ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, - PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToEntero()) Then + PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then ErrorList.Add("Ocurrió un error al agregar un Producto o Servicio a la Factura.
Revise su factura y cualquier detalle comuníquese a Soporte Técnico") Exit For Else @@ -18843,9 +18843,9 @@ Partial Class Ventas End If End If - Dim NumTurnos As Integer = 0 + Dim NumTurnos As Decimal = 0 If UsuarioActual.CveEmpresa.Contiene(7, 122) Then - NumTurnos = TxtNumTurnos.Text.ToEntero() + NumTurnos = TxtNumTurnos.Text.ToDecimal() End If AgregarProductoServicio(Cantidad, DdlUnidadMedida.SelectedValue.ToEntero(), DdlUnidadMedida.SelectedItem.Text, DdlClasificacion.SelectedValue.ToEntero(), DdlClasificacion.SelectedItem.Text, @@ -19045,7 +19045,7 @@ Partial Class Ventas Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional SeActualiza As Boolean = False, Optional CvePromocionDetalle As Integer = -1, Optional EsCargo As Boolean = False, Optional ImporteProntoPago As Decimal = 0, Optional ByRef ObjDescuento As Modelos.VentaDescuentos = Nothing, Optional CvePrecioLista As Integer = -1, Optional PrecioLista As String = "", - Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Integer = 0) As Boolean + Optional CveActivoFijo As Integer = -1, Optional AFDepreciacion As Decimal = 0D, Optional AFValorInicial As Decimal = 0D, Optional NumTurnos As Decimal = 0D) As Boolean Dim Retorno As Boolean = False Try @@ -19554,7 +19554,7 @@ Partial Class Ventas TmpDT.Columns("TieneProntoPago").DefaultValue = "No" TmpDT.Columns("ImporteProntoPago").DefaultValue = 0 - TmpDT.Columns.Add("NumTurnos", GetType(Integer)) + TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) TmpDT.Columns("NumTurnos").DefaultValue = 0 End Sub @@ -22287,7 +22287,7 @@ Partial Class Ventas Row("PU").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("ImporteIVA").ToString().ToDouble, Math.Round((Row("Total").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)) * (1 + Row("PorcentajeIVA").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)))), 6), Row("Obs").ToString(), Row("Descuento").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), Row("TipoDescuento").ToString().ToEntero(), Row("CveSubProyecto").ToString().ToEntero(), Row("CvePresupuestoIngreso").ToString().ToEntero(), PorcentajeIVA:=Row("PorcentajeIVA").ToString().ToDecimal, IEPS:=Row("ImporteIEPS").ToString().ToDouble(If(ChkConvertirDoctoPesos.Checked, TxtTipoCambio.Text.ToDecimal, 1)), PorcentajeIEPS:=Row("PorcentajeIEPS").ToString().ToDouble, TiempoEntrega:=Row("TiempoEntrega").ToString(), CveVentaDetallePadre:=Row("CveVentaDetalle").ToString().ToEntero(), CveContratoDetalle:=Row("CveContratoDetalle").ToString().ToEntero(), CvePromocionDetalle:=If(DtPromociones IsNot Nothing, DtPromociones.FiltroPrimeroValor("CvePromocionDetalle", $"CvePS={Row("CvePS").ToString()}").ToEntero(), -1), - ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero()) Then + ImporteRetIVA:=Row("ImporteRetIVA").ToString().ToDouble, ImporteRetISR:=Row("ImporteRetISR").ToString().ToDouble, PorcentajeRetIVA:=Row("PorcentajeRetIVA").ToString().ToDouble, PorcentajeRetISR:=Row("PorcentajeRetISR").ToString().ToDouble, CuentaPredial:=Row("CuentaPredial").ToString(), CvePrecioLista:=Row("CvePrecioLista").ToString().ToEntero(), CveActivoFijo:=Row("CveActivoFijo").ToString().ToEntero(), NumTurnos:=Row("NumTurnos").ToString().ToDecimal()) Then OcurrioError = True Exit For Else @@ -35452,8 +35452,8 @@ Partial Class Ventas TmpDT.Columns.Add("CveActivoFijo", GetType(Integer)) TmpDT.Columns.Add("AFDepreciacion", GetType(Decimal)) TmpDT.Columns.Add("AFValorInicial", GetType(Decimal)) - TmpDT.Columns.Add("NumTurnos", GetType(Integer)) - TmpDT.Columns("NumTurnos").DefaultValue = 0 + TmpDT.Columns.Add("NumTurnos", GetType(Decimal)) + TmpDT.Columns("NumTurnos").DefaultValue = 0D Return TmpDT End Function From 333843edafc6098ac9099a9a41fec758a92986ae Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Thu, 8 Jun 2023 18:39:27 -0700 Subject: [PATCH 7/9] PV.aspx Correcion al eliminar/actualizar recepcion de usados --- Ventas/PV.aspx.vb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index 8beaa4a38..fc6e5ad78 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -2009,8 +2009,8 @@ Partial Class PV End If If TmpDTRecepcionUsados IsNot Nothing Then - If TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then - Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"CvePS={Row("CvePS").ToString.ToEntero}")(0) + If TmpDTRecepcionUsados.Select($"ConsecUsado={Row("Consec").ToString.ToEntero} AND CvePS={Row("CvePS").ToString.ToEntero}").Length > 0 Then + Dim rowInv As DataRow = TmpDTRecepcionUsados.Select($"ConsecUsado={Row("Consec").ToString.ToEntero} AND CvePS={Row("CvePS").ToString.ToEntero}")(0) rowInv("CveVentaDetalle") = CveVentaDetalle End If End If @@ -7858,11 +7858,15 @@ Partial Class PV If TmpDTRecepcionUsados.Rows.Count > 0 Then Dim Elimino As Boolean = False For Each Row As DataRow In TmpDTRecepcionUsados.Rows - If Row("CvePSRelacionado").ToString().ToEntero() = CvePS Then + If Row("CvePSRelacionado").ToString().ToEntero() = CvePS AndAlso + Row("ConsecUsado").ToString().ToEntero() = ListaPSCargo.FirstOrDefault().ConsecutivoUsado AndAlso + Row("ConsecRelacionado").ToString().ToEntero() = ListaPSCargo.FirstOrDefault().Consecutivo Then + Row.Delete() Elimino = True End If Next + If Elimino Then TmpDTRecepcionUsados.AcceptChanges() End If @@ -8179,7 +8183,7 @@ Partial Class PV 'ELIMINAR LOS USADOS QUE SE MANDAN A RECEPCION For Each drow As DataRow In TmpDT.Select($"Consec ={Consec}") For Each RowRecepcionUsados As DataRow In TmpDTRecepcionUsados.Rows - If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) Then + If (RowRecepcionUsados("CvePSRelacionado").ToString() = drow("CvePS").ToString()) AndAlso RowRecepcionUsados("ConsecRelacionado").ToString() = drow("Consec").ToString() Then RowRecepcionUsados.Delete() End If Next From 461a19865fa9a8d0b372efa117c5a92114c8b0ab Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Fri, 9 Jun 2023 08:47:51 -0700 Subject: [PATCH 8/9] IE Mensaje de error al eminar un movimiento con una cancelacion relacionada --- App_Code/ClsBancos.vb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 81d76146e..b662d915d 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1806,7 +1806,14 @@ Public Class ClsBancos ' Me.OnError("Ocurrió un error al guardar los cambios en el Banco", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) Catch ex As Exception - OnError("Ocurrió un error al cancelar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + + If ex.Message.Contains("El Movimiento no se puede eliminar porque tiene una cancelación relacionada") Then + OnError("El Movimiento no se puede eliminar porque tiene una cancelación relacionada, se tiene que eliminar primero la cancelación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Else + OnError("Ocurrió un error al eliminar el movimiento en bancos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End If + + End Try Return Retorno From 72d69c64035cc73cbd8701a309dba72167be0432 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Sat, 10 Jun 2023 09:37:21 -0700 Subject: [PATCH 9/9] Filtro por fechas de vencimiento, correciones de margenes --- Ventas/Clientes.aspx | 12 ++++++------ Ventas/Clientes.aspx.vb | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index d72745756..fa1f6c881 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -1699,7 +1699,7 @@
-
+
@@ -1898,15 +1898,15 @@ Estado de Cuenta
+
-
-
+
@@ -1919,7 +1919,7 @@
-
+
@@ -1934,7 +1934,7 @@
-
+
@@ -1947,7 +1947,7 @@
-
+
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 911037aab..0b80dafe3 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -4123,11 +4123,11 @@ Partial Class Clientes Dim FechaCorte As Date = ("9999/01/01").ToDate() Dim TipoDocto As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM) Dim TipoDocto2 As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM(True)) - Dim FechaVencimientoI As String = If(TxtFechaVICxP.Text = "", "-1", TxtFechaVICxP.Text).ToString() - Dim FechaVencimientoF As String = If(TxtFechaVFCxP.Text = "", "-1", TxtFechaVFCxP.Text).ToString() + Dim FechaVencimientoI As DateTime = If(TxtFechaVICxP.Text = "", MinFecha, TxtFechaVICxP.Text.ToDate()) + Dim FechaVencimientoF As DateTime = If(TxtFechaVFCxP.Text = "", MaxFecha, TxtFechaVFCxP.Text.ToDate()) Dim ObjMovtos As New ClsMovimientos() - If ObjMovtos.GetCxCClienteDetalle(CveCliente, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero()) Then + If ObjMovtos.GetCxCClienteDetalle(CveCliente, FI, FF, -1, -1, UsuarioActual.CveEmpresa, DdlSucursalCliente.SelectedValue.ToEntero(), FechaVencimientoI:=FechaVencimientoI, FechaVencimientoF:=FechaVencimientoF) Then DtCxCFact = If(DdlTipoCuentasCxC.SelectedValue = "-1", ObjMovtos.DtResultados.FiltraParametros("", "TipoDocto").Copy, ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "TipoDocto")) 'cargo los anticipos NC DtCxCFact.Columns.Add("SaldoAnticipo", GetType(Decimal))