From c3fdfad4927c400cfcde3d70e99f20da87466853 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 6 Nov 2019 13:12:01 -0700 Subject: [PATCH 1/6] - --- Bancos/IE.aspx.vb | 2 ++ Bancos/PagoDeudor.aspx.cs | 2 +- Ventas/PV.aspx.vb | 2 +- Ventas/Ventas.aspx.vb | 30 +++++++++++++++--------------- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 1eeb43303..6e73cd85f 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -2457,6 +2457,8 @@ Partial Class Bancos_IE If CveIE > 0 Then If DdlTipoTransaccion.SelectedValue = "1" Then FolioFijo = ObjIE.Folio.ToEntero 'cheque + If UsuarioActual.CveEmpresa = 119 Then FolioFijo = 0 + CvePrePoliza = ObjMov.AddPrePolizas("Bancos/IE " + If(Request("Opcion") IsNot Nothing, Request("Opcion").ToString, "") + " " + RBL.SelectedValue, CvePlantillaPoliza, TxtImporte.Text.Trim.ToDouble, TxtImporte.Text.Trim.ToDouble, tCveMoneda, TxtFechaDocumento.Text.ToDate, PagueseA, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FolioFijo:=FolioFijo, ReglaFolioPoliza:=ObjComp.ObtenerReglaFolio(DdlTipoTransaccion.SelectedValue, Nothing, UsuarioActual.CveEmpresa), CveTipoPoliza:=ObjMov.ObtenerTipoPoliza(DdlTipoTransaccion.SelectedValue, "-1", UsuarioActual.CveEmpresa)) 'valida prepoliza diff --git a/Bancos/PagoDeudor.aspx.cs b/Bancos/PagoDeudor.aspx.cs index e837bbdfa..e2d5b27ef 100644 --- a/Bancos/PagoDeudor.aspx.cs +++ b/Bancos/PagoDeudor.aspx.cs @@ -844,7 +844,7 @@ public partial class Bancos_PagoDeudor : ClsPaginas } } bool AutoConta = UsuarioActual.Empresa.Funcionalidad(200).Equals("1"); - if (UsuarioActual.CveEmpresa == 119) AutoConta = false; + //if (UsuarioActual.CveEmpresa == 119) AutoConta = false; if (AutoConta && MsgError.Equals("")) { diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index e9d5dff51..1140a2b57 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5095,7 +5095,7 @@ Partial Class PV 'Dim NoMesesTrascurridos = Math.Ceiling(MesesTranscurridos) - TxtMesesUso.Text = (DateDiff(DateInterval.Month, FechaI, FechaF) + 1).ToString() + TxtMesesUso.Text = (DateDiff(DateInterval.Month, FechaI, FechaF)).ToString() CalculaPorcentajeAjuste() End Sub diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 587fc5346..028985042 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -9572,24 +9572,24 @@ Partial Class Ventas TCFluctuacion = GlobalTipoCambio(TxtFecha.Text.ToDate).ToDecimal End If - If DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Not Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then - ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion - ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then - ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion - ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then - Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion - ImporteMN251 = Dr("Importe").ToString.ToDecimal - Else - ImporteMN251 = Dr("Importe").ToString.ToDecimal - End If + If DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Not Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then + ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion + ElseIf DdlMoneda.SelectedValue.ToEntero = 2 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then + ImporteMN251 = Dr("Importe").ToString.ToDecimal * TCFluctuacion + ElseIf DdlMoneda.SelectedValue.ToEntero = 1 AndAlso Dr("TCCambioValuacion").ToString.ToDecimal > 1 Then + Importe251 = Dr("Importe").ToString.ToDecimal / TCFluctuacion + ImporteMN251 = Dr("Importe").ToString.ToDecimal + Else + ImporteMN251 = Dr("Importe").ToString.ToDecimal + End If - Importe251 = (Importe251 * Multiplicador).RoundSQL + Importe251 = Importe251.RoundSQL - Importe91 = (Importe91 * ValorMultiplicador).RoundSQL - ImporteMN91 = (ImporteMN91 * Multiplicador).RoundSQL - If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${Importe91.FormatoNumero(2)}" + Importe91 = (Importe91).RoundSQL + ImporteMN91 = (ImporteMN91 * Multiplicador).RoundSQL + If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${Importe91.FormatoNumero(2)}" - CveUltimaVenta = Dr("CveVenta").ToString.ToEntero + CveUltimaVenta = Dr("CveVenta").ToString.ToEntero Dim ImporteComplementarioIngreso As Decimal = 0 If UsaComplementariaClientes = True AndAlso tipoCambio > 1 Then From b1d4830ebc8703c8619a8fc6c06f8863554b590e Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 7 Nov 2019 11:02:39 -0700 Subject: [PATCH 2/6] =?UTF-8?q?alert=20de=20m=C3=A1s,=20se=20quit=C3=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/PV.aspx.vb | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index a76ce216c..da7da6193 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -4920,7 +4920,7 @@ Partial Class PV TmpDTAjustes.Columns.Add("CveUM", GetType(Integer)) TmpDTAjustes.Columns.Add("CveVentaDetalle", GetType(Integer)) TmpDTAjustes.Columns.Add("CveVenta", GetType(Integer)) - TmpDTAjustes.Columns.Add("PUFactura", GetType(Integer)) + TmpDTAjustes.Columns.Add("PUFactura", GetType(Double)) End Sub @@ -5094,18 +5094,21 @@ Partial Class PV End Sub Private Sub CalculaMesesUso() - Dim FechaI = TxtFechaAjuste.Text.ToDate.AddDays(1) - Dim FechaF = Now - 'Dim NumDiasAlMes As Double = (365 / 12) - 'Dim DiasTranscurridos = DateDiff(DateInterval.Day, FechaI, FechaF) - 'Dim MesesTranscurridos As Double = (DiasTranscurridos / NumDiasAlMes) - 'Dim Diff = Math.Round(MesesTranscurridos - Math.Truncate(MesesTranscurridos), 2) + Dim FechaI As Date = TxtFechaAjuste.Text.ToDate.AddDays(1) + Dim FechaF As Date = Now + Dim FechaT As Date = String.Format("{0}/{1}/{2}", FechaI.Day, FechaF.Month, FechaF.Year).ToDate 'armo la fecha con el día del mes actual - 'Dim NoMesesTrascurridos = Math.Ceiling(MesesTranscurridos) - Dim NoMesesTrascurridos2 = DateDiff(DateInterval.Month, FechaI, FechaF) + Dim MesesTrascurridos As Integer = Math.Round(DateDiff(DateInterval.Day, FechaI, FechaT) / 30.4, 2).ToEntero 'saco los meses y lo redondeo + + If FechaT > FechaF Then + 'todavía está en el mes actual. + MesesTrascurridos = MesesTrascurridos + Else + MesesTrascurridos = MesesTrascurridos + 1 + End If + + TxtMesesUso.Text = MesesTrascurridos.ToString - 'TxtMesesUso.Text = If(Diff > 0.5, NoMesesTrascurridos, NoMesesTrascurridos2).ToString() - TxtMesesUso.Text = NoMesesTrascurridos2.ToString CalculaPorcentajeAjuste() End Sub @@ -5177,6 +5180,13 @@ Partial Class PV End If End If + 'el ajuste no puede ser mayor al precio de lo vendido de nuevo + If (TxtPrecio.Text.ToDouble - ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior))) < 0 Then + TxtDescuentoAjuste.Text = TxtPrecio.Text + TxtImporteAjuste.Text = "0.00" + CargoAnterior = CargoActual + End If + TxtDescuentoAjuste.Text = ((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior)).FormatoNumero TxtDescuentoAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoActual - CargoAnterior).FormatoNumero}." End If @@ -5294,6 +5304,7 @@ Partial Class PV End If Dr("Descuento") = Math.Round((TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoActual - CargoAnterior), NumeroDecimales) + If Dr("Descuento").ToString.ToDouble > TxtPrecio.Text.ToDouble Then Dr("Descuento") = TxtPrecio.Text.ToDouble Dim TotalCalculableImpuestos As Decimal = (Dr("Cantidad").ToString.ToDecimal * (Dr("PU").ToString.ToDecimal)) - Dr("Descuento").ToString.ToDecimal Dr("ImporteIVA") = Math.Round(Dr("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales) From b98f0362dda393e52904ae00098c952a49b82d6f Mon Sep 17 00:00:00 2001 From: janeth arvizu Date: Thu, 7 Nov 2019 12:43:23 -0700 Subject: [PATCH 3/6] Validacion de Recepcion de Usados --- Ventas/PV.aspx.vb | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index a76ce216c..da6b993e0 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -3482,13 +3482,50 @@ Partial Class PV Return False End If - Dim CantidadUsados As Decimal = 0 + + 'Validacion de Recepción de Usados + Dim Vendido As Decimal = 0 + Dim Entregado As Decimal = 0 + Dim UltimoEntregado As Decimal = 0 + For Each Gvr As GridViewRow In GvRecepcionUsados.Rows If Gvr.RowType = DataControlRowType.DataRow Then - CantidadUsados = CantidadUsados + Gvr.FCTextBox("TxtCantidad").Text.ToEntero() + If Gvr.FCTextBox("TxtCantidad").Text.ToEntero() > 0 Then + Entregado += (Gvr.FCTextBox("TxtCantidad").Text.ToEntero * Gvr.DataKey("Cargo").ToDecimal) + UltimoEntregado = Gvr.DataKey("Cargo").ToDecimal + End If End If Next + If Entregado > 0 Then + 'Calcular Vendido + Dim DTTamanios As New DataTable + Dim ObjAcum As New ClsAcumuladores + If ObjAcum.TamañoGet(-1, UsuarioActual.CveEmpresa) Then + DTTamanios = ObjAcum.DtResultados + End If + ObjAcum.Dispose() + Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") + + If DTTamanios.Rows.Count > 0 And DTTamanios IsNot Nothing And DrPS("CveTamaño").ToString.ToEntero > 0 Then + Vendido = DTTamanios.FiltroPrimeroValor("Cargo", $" CveTamaño = { DrPS("CveTamaño") }").ToDecimal + End If + + If Entregado > Vendido Then + If (Entregado - Vendido) >= UltimoEntregado Then + Alert("No puede entregar un cargo mayor a lo Vendido", TipoMensaje.MsgAdvertencia) + Return False + End If + End If + End If + + 'Dim CantidadUsados As Decimal = 0 + 'For Each Gvr As GridViewRow In GvRecepcionUsados.Rows + ' If Gvr.RowType = DataControlRowType.DataRow Then + ' CantidadUsados = CantidadUsados + Gvr.FCTextBox("TxtCantidad").Text.ToEntero() + ' End If + 'Next + 'If CantidadUsados > TxtCantidad.Text.ToEntero() Then ' Alert("No puede tener una cantidad mayor a la de los cargos", TipoMensaje.MsgAdvertencia) ' Return False From 159ba3b28a9b40e875fdcab85573fe59eadb7413 Mon Sep 17 00:00:00 2001 From: rrene Date: Thu, 7 Nov 2019 13:50:18 -0700 Subject: [PATCH 4/6] =?UTF-8?q?se=20agreg=C3=B3=20columna=20de=20cleinte,?= =?UTF-8?q?=20y=20refrescar=20al=20recibir?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/RecepcionUsados.aspx | 2 ++ Inventarios/RecepcionUsados.aspx.vb | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/Inventarios/RecepcionUsados.aspx b/Inventarios/RecepcionUsados.aspx index cd25a6832..804c83873 100644 --- a/Inventarios/RecepcionUsados.aspx +++ b/Inventarios/RecepcionUsados.aspx @@ -324,6 +324,8 @@ + + diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 96262ce47..1b073987b 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1096,6 +1096,7 @@ Partial Class Inventarios_RecepcionUsados EnvioCorreo() + CargaPendientesRecibir() UPDatos.Update() Else @@ -1923,6 +1924,10 @@ Partial Class Inventarios_RecepcionUsados End Sub Protected Sub BtnConsultarPendientes_Click(sender As Object, e As EventArgs) + CargaPendientesRecibir() + End Sub + + Private Sub CargaPendientesRecibir() Dim ObjVentas As New ClsVentas If ObjVentas.GetVentasUsados(-1, DdlSubProyectos.SelectedValue.ToEntero(), TxtFechaPendientes.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then GVPendientes.DataSource = ObjVentas.DtResultados From 2945b20316dbcdbf5f7ba8ce4186f0b13d6a1889 Mon Sep 17 00:00:00 2001 From: janeth arvizu Date: Thu, 7 Nov 2019 13:52:57 -0700 Subject: [PATCH 5/6] Formato de Reporte de Solicitudes de Anticipo --- .../Grales/Formatos/RepSolicitudAnticipo.rdlc | 969 ++++++++++++++++++ 1 file changed, 969 insertions(+) create mode 100644 Empresas/Grales/Formatos/RepSolicitudAnticipo.rdlc diff --git a/Empresas/Grales/Formatos/RepSolicitudAnticipo.rdlc b/Empresas/Grales/Formatos/RepSolicitudAnticipo.rdlc new file mode 100644 index 000000000..0a0262614 --- /dev/null +++ b/Empresas/Grales/Formatos/RepSolicitudAnticipo.rdlc @@ -0,0 +1,969 @@ + + + + + + + + + + + + true + true + + + + + OC + + + + + + + Textbox28 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 7.36287cm + + + 3.6966cm + + + 2.91394cm + + + 1.65333cm + + + 2.5cm + + + + + 0.46771cm + + + + + true + true + + + + + =Fields!RazonSocial.Value + + + + + + + RazonSocial + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Nombre.Value + + + + + + + Nombre + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!ImporteSol.Value + + + + + + + ImporteSol + + + 2pt + 2pt + 2pt + 2pt + es-MX + + + + + + + + true + true + + + + + =Fields!FolioMov.Value + + + + + + + FolioMov + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe + + + 2pt + 2pt + 2pt + 2pt + + + true + + + + + + + + + + + 0.46771cm + + + true + true + + + + + Proveedor + + + + + + + Textbox6 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Usuario Solicitó + + + + + + + Textbox4 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Importe Solicitud + + + + + + + Textbox40 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.46771cm + + + true + true + + + + + Mov. Banc. + + + + + + + Textbox5 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + =IIf(Parameters!Estatus.Value = "3",False,True) + + + + + 0.46771cm + + + true + true + + + + + Importe + + + + + + + Textbox18 + + + Gray + 2pt + 2pt + 2pt + 2pt + + + + + + =IIf(Parameters!Estatus.Value = "3",False,True) + + + + + + + + + + 1.60042cm + + + true + true + + + + + =Fields!Folio.Value + + + + + + + Folio + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + DataSet1 + 0.82931cm + 0.06614cm + 0.93542cm + 19.72716cm + + + + + + true + true + + + + + =Parameters!AgrupadoPor.Value + HTML + + + + + + + Textbox1 + 0.07056cm + 0.06614cm + 0.58236cm + 19.58715cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + 0.79506in + + + + + + + Textbox1 + 2.43857cm + 0.6cm + 14.68354cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE SOLICITUDES DE ANTICIPO + + + + + + + + + + + + + + + + Textbox2 + 0.63528cm + 2.40329cm + 0.52945cm + 14.68354cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 1.61043cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.40041cm + 16.97887cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!ExecutionTime + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IMPRESO EN SIG, Rep. Solicitudes Anticipo + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.40041cm + 0.06614cm + 0cm + 19.58715cm + 6 + + + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm +