From a667f61ba4e0f9030eaea798333e9026f2dac722 Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Tue, 28 Jan 2020 18:59:50 -0700 Subject: [PATCH 1/6] Validacion al remisionar autorizacion --- Ventas/Ventas.aspx.vb | 42 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 7774afcb2..86ec8f4a1 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -6257,7 +6257,7 @@ Partial Class Ventas End Try End Sub - Private Sub EmitirImprimir() + Private Sub EmitirImprimir(Optional TipoDoctoViejo As String = "") DtRemisionesTmpDT = TmpDT.Copy DtPedidos2TmpDT = TmpDT.Copy DtCotizacionTmpDT = TmpDT.Copy @@ -6582,7 +6582,7 @@ Partial Class Ventas Exit Sub End If - EmitirImprimirNew() + EmitirImprimirNew(TipoDoctoViejo) End Sub #End Region @@ -6603,7 +6603,7 @@ Partial Class Ventas UpnTools.Update() End Sub - Protected Sub EmitirImprimirNew() + Protected Sub EmitirImprimirNew(Optional TipoDoctoViejo As String = "") If ValidaPagosContado() Then @@ -6769,6 +6769,8 @@ Partial Class Ventas EsNCAmortizacion = True End If + Dim CveVentaAnterior As Integer = Me.CveVenta + GuardarVenta(ObjVentas, ObjConta, ObjInventario, ObjContr, ObjFactura, TmpDT, ObjFactura.CveNCaVincular, ObjContPaq, ObjBancos, ObjOS, ObjEventos, ObjCGame, ObjClientes, EsNCAmortizacion:=EsNCAmortizacion) @@ -6789,6 +6791,15 @@ Partial Class Ventas Next End If + If Not String.IsNullOrEmpty(TipoDoctoViejo) Then + 'SI VIENE DE UNA AUTORIZACION + If TipoDoctoViejo = "PA" Then + If Not ObjEventos.AddEventoBitacora(String.Format("Se generó una remisión en Folio: {1}", ObjFactura.CveVenta, ObjFactura.SerieFolio), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaAnterior) Then + ErrorList.Add("Ocurrió un error al agregar la bitacora de Póliza Virtual.") + End If + End If + End If + 'SI ES REFACTURACION Dim ObjNC As List(Of Object) = Nothing If ErrorList.Count = 0 Then @@ -6926,8 +6937,6 @@ Partial Class Ventas End If End If - - If ObjFactura.CveVenta > 0 AndAlso ErrorList.Count = 0 AndAlso (SeGuardoPrePoliza Or ObjFactura.TipoDocto.Contiene("Ped", "Cot", "DPe", "PeC", "PA", "Pd2")) Then ObjVentas.Commit() @@ -23584,9 +23593,30 @@ Partial Class Ventas TxtFechaPago.Text = If(TipoDoctoViejo = "Rem" AndAlso EsDiasCreditoFijo, Now.AddDays(DiasCredito), If(DdlTipoComprobante.SelectedValue = "Rem", Now.AddDays(PlazoCobranzaRemision), Now.AddDays(PlazoCobranza))).ToShortDateString TxtFechaEjecucion.Text = Now.ToString + 'VALIDAR QUE NO SE HAYA REMISIONADO + If TipoDoctoViejo = "PA" Then + Dim RowVenta As DataRow = Nothing + Dim ObjVentas As New ClsVentas + If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then + RowVenta = ObjVentas.DtResultados.Rows(0) + End If + ObjVentas.Dispose() + + If RowVenta IsNot Nothing Then + Dim CveEstatusAutorizacion As Integer = RowVenta("CveEstatusFactura").ToString().ToEntero() + 'SI LA AUTORIZACION ESTA REMISIONADA NO DEBE REMISIONAR DE NUEVO + If CveEstatusAutorizacion = 18 Then + Alert("La autorización ya esta remisionada") + Exit Sub + End If + Else + Alert("No se encontró información de la autorización") + Exit Sub + End If + End If If FolioFijo = 0 Then CargaFolios() 'RECARGA FOLIOS CON EL NUEVO TIPO DOCTO - EmitirImprimir() 'MANDA A EMITIR - PROCESO VIEJO + EmitirImprimir(TipoDoctoViejo) 'MANDA A EMITIR - PROCESO VIEJO End If End Sub From 4f274c4310315019394f43ea1af1430caf53abe1 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 29 Jan 2020 13:39:13 -0700 Subject: [PATCH 2/6] alineando columnas en rep existencias costo y creacion de prepolizas en los traspasos --- Inventarios/RepExistenciasCostos.aspx | 16 +++++++-------- Inventarios/TraspasoAlmacen.aspx.vb | 28 ++++++++++++++++++++++----- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/Inventarios/RepExistenciasCostos.aspx b/Inventarios/RepExistenciasCostos.aspx index 13489acc8..482a26a1c 100644 --- a/Inventarios/RepExistenciasCostos.aspx +++ b/Inventarios/RepExistenciasCostos.aspx @@ -135,14 +135,14 @@ - - - - - - - - + + + + + + + + diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 513937be3..eb06c2009 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -781,7 +781,6 @@ Partial Class Inventarios_TraspasoAlmacen Dim TextoError = "" Dim TipoMovimientoSalida = If(ChkTransitorio.Checked, 26, If(TipoAlmacenOrigen = 24, 26, 8)) - 'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, TipoMovimientoSalida, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"), @@ -853,7 +852,7 @@ Partial Class Inventarios_TraspasoAlmacen AlmacenEntrada = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero) CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, TipoMovimientoEntrada, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, "-1"), - CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/G") + CveAlmacenDestino:=If(ChkTransitorio.Checked, DdlAlmacenDestino.SelectedValue.ToEntero, -1), CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="TA/G") FolioEntrada = ObjInventario.Folio If CveMovimientoEntrada <= 0 Then TextoError = "Ocurrió un error al generar el movimiento de entrada" @@ -907,11 +906,30 @@ Partial Class Inventarios_TraspasoAlmacen Else ErrorMovInv = True End If - End If - - End If + End If + 'AGREGAMOS PREPOLIZAS TRASPASO DIRECTO: + If Not ErrorMovInv Then + Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then + + Dim resultado As DataTable = ObjInventario.DtResultados + Dim importe As Decimal = resultado.SUM("Total").ToDecimal + Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenOrigen.SelectedValue.ToEntero)).ToEntero + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida) Then + ErrorMovInv = True + End If + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada) Then + ErrorMovInv = True + End If + End If + End If + End If End If + + ''[IPP-1Noviembre2018] SE COMENTA PORQUE NO TIENE NI PIES NI CABEZA. LE FALTA DESARROLLO ''CONSUMO INTERNO 'If Not ErrorMovInv Then From 5876a980f9b55b85c2f0a43981a82c1d48c4ed14 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 29 Jan 2020 14:34:53 -0700 Subject: [PATCH 3/6] se agregaron 2 columnas CargoMN, AbonoMN --- .../Grales/Formatos/AuxiliarProveedor.rdlc | 189 ++++++++++++++++-- 1 file changed, 173 insertions(+), 16 deletions(-) diff --git a/Empresas/Grales/Formatos/AuxiliarProveedor.rdlc b/Empresas/Grales/Formatos/AuxiliarProveedor.rdlc index 60a9b4be0..037e9e403 100644 --- a/Empresas/Grales/Formatos/AuxiliarProveedor.rdlc +++ b/Empresas/Grales/Formatos/AuxiliarProveedor.rdlc @@ -56,7 +56,7 @@ 2.54731cm - 1.99685cm + 1.73227cm 1.66702cm @@ -65,14 +65,20 @@ 2.26144cm - 2.15555cm + 1.46086cm - 2.10255cm + 1.09776cm 1.57396cm + + 1.37522cm + + + 1.23062cm + @@ -353,6 +359,74 @@ + + + + true + true + + + + + =Fields!CargoMN.Value + + + + + + + CargoMN + + + =IIf(Fields!CveConceptoContable.Value > 0, "No Color", "#9cacc1") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!AbonoMN.Value + + + + + + + AbonoMN + + + =IIf(Fields!CveConceptoContable.Value > 0, "No Color", "#9cacc1") + 2pt + 2pt + 2pt + 2pt + + + + @@ -361,7 +435,7 @@ - 0.6cm + 0.8593cm true @@ -399,7 +473,7 @@ - 0.6cm + 0.8593cm true @@ -437,7 +511,7 @@ - 0.6cm + 0.8593cm true @@ -475,7 +549,7 @@ - 0.6cm + 0.8593cm true @@ -513,7 +587,7 @@ - 0.6cm + 0.8593cm true @@ -551,7 +625,7 @@ - 0.6cm + 0.8593cm true @@ -589,7 +663,7 @@ - 0.6cm + 0.8593cm true @@ -627,7 +701,7 @@ - 0.6cm + 0.8593cm true @@ -663,6 +737,82 @@ + + + 0.8593cm + + + true + true + + + + + Cargo MN + + + + + + + Textbox5 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.8593cm + + + true + true + + + + + Abono MN + + + + + + + Textbox13 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + @@ -670,7 +820,7 @@ - 3.67051cm + 3.06196cm true @@ -700,7 +850,6 @@ 2pt - true @@ -711,8 +860,8 @@ DataSet1 0.75875cm 0.06614cm - 1.2cm - 19.55392cm + 1.4593cm + 19.58715cm @@ -756,7 +905,7 @@ - 0.77116in + 0.87325in