From 66b3a6df78c009eb72b4a2727a47dfef3d7540ea Mon Sep 17 00:00:00 2001 From: rakcsle Date: Thu, 18 Jan 2024 16:12:00 -0700 Subject: [PATCH] SMS - Establecer formatos entrega --- Compras/PopUpVerFactura.aspx.vb | 29 +- Empresas/186/Formatos/Traslado.rdlc | 1389 ++++++++++++++++++--------- 2 files changed, 971 insertions(+), 447 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index a5c3a12c6..01ef2962d 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -2,11 +2,13 @@ Option Explicit On Imports System.Data +Imports System.Data.Entity.Core.Metadata.Edm Imports System.IO Imports System.Xml Imports Extensiones Imports iText.Barcodes.Dmcode Imports Microsoft.Reporting.WebForms +Imports Modelos Partial Class PopUpVerFactura @@ -3361,13 +3363,24 @@ Partial Class PopUpVerFactura Dim CveCliente As Integer = 0 Dim CveDireccionEnvio As Integer = 0 Dim ClienteNombre As String = "", EnvioContacto As String = "", EnvioDireccion As String = "", EnvioColonia As String = "", EnvioCiudad As String = "", EnvioEstado As String = "", ClientePais As String = "", EnvioCP As String = "", Contrato As String = "", - Paqueteria As String = "", NumContrato As String = "", Guia As String = "" + Paqueteria As String = "", NumContrato As String = "", Guia As String = "", Documentacion As String = "" Dim CveContrato As Integer = 0 If DtMovimientos IsNot Nothing AndAlso DtMovimientos.Rows.Count > 0 Then CveContrato = DtMovimientos.FiltroPrimeroValor("CveContrato").ToEntero End If + + If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero + DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}") + params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion"))) + + If CveCliente = 819998 Then + RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc" + End If + End If + If CveContrato > 0 Then Contrato = GlobalDTContratos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("DescripcionContrato", $"CveContrato={CveContrato} AND CveEmpresa = {UsuarioActual.CveEmpresa}") NumContrato = GlobalDTContratos(UsuarioActual.CveEmpresa).FiltroPrimeroValor("NumeroContrato", $"CveContrato={CveContrato} AND CveEmpresa = {UsuarioActual.CveEmpresa}") @@ -3387,6 +3400,8 @@ Partial Class PopUpVerFactura EnvioCiudad = ObjVentas.DtResultados.Rows(0)("EnvioCiudad").ToString EnvioCP = ObjVentas.DtResultados.Rows(0)("EnvioCP").ToString EnvioEstado = ObjVentas.DtResultados.Rows(0)("EnvioEstado").ToString + + Else ClienteNombre = DTCliente.FiltroPrimeroValor("Nombre") EnvioContacto = DTCliente.FiltroPrimeroValor("Contacto") @@ -3401,6 +3416,8 @@ Partial Class PopUpVerFactura ObjVentas.Dispose() End If + + params.Add(New ReportParameter("ClienteNombre", ClienteNombre)) params.Add(New ReportParameter("EnvioContacto", EnvioContacto)) params.Add(New ReportParameter("EnvioDireccion", EnvioDireccion)) @@ -3524,6 +3541,16 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreAccion", Recibio)) 'TxtResponsable.Text params.Add(New ReportParameter("Accion", "RECIBIÓ")) + If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + Dim CveCliente = DtMovimientos.FiltroPrimeroValor("CveCliente").ToEntero + Dim DTCliente = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros($"CveCliente = {CveCliente}") + params.Add(New ReportParameter("Documentacion", DTCliente.FiltroPrimeroValor("Documentacion"))) + + 'If CveCliente = 819998 Then + ' RutaFormato = "{0}Formatos\TrasladoAngeles.rdlc" + 'End If + End If + If Archivo.Exists Then params.Add(New ReportParameter("CveAlmacen", DtMovimientos(0)("CveTipoAlmacen").ToString)) params.Add(New ReportParameter("CveTipoAlmacenDestino", DtMovimientos(0)("CveTipoAlmacenDestino").ToString)) diff --git a/Empresas/186/Formatos/Traslado.rdlc b/Empresas/186/Formatos/Traslado.rdlc index 1f5390b8a..e81bdb454 100644 --- a/Empresas/186/Formatos/Traslado.rdlc +++ b/Empresas/186/Formatos/Traslado.rdlc @@ -69,6 +69,18 @@ FechaCaducidad System.Date + + PUVenta + System.Decimal + + + IVAVenta + System.Decimal + + + SubTotalVenta + System.Decimal + DsInventarios @@ -91,22 +103,22 @@ 1.37635cm - 1.67779cm + 10.38681cm - 1.86634cm + 2.73912cm - 8.39839cm - - - 1.82679cm + 3.49337cm 2.76458cm - 2.41446cm + 2.5cm + + + 2.5cm @@ -166,7 +178,7 @@ - Código + Descripción @@ -203,66 +215,6 @@ - - - - true - - - - - U.M. - - - - - - - - - - - - - - - - Textbox7 - - - - Black - - 1pt - - - Black - - 1pt - - #9cc3e5 - 2pt - 2pt - 2pt - 2pt - - - - @@ -271,7 +223,7 @@ - Descripción + Referencia - Textbox12 + Textbox7 + + + + Black + + 1pt + + + Black + + 1pt + + #9cc3e5 + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox15 @@ -490,14 +488,20 @@ - =Fields!Codigo.Value + =Fields!PS.Value + + + + @@ -514,39 +518,6 @@ - - - - true - true - - - - - =Fields!UnidadMedida.Value - - - - - - - UnidadMedida - - - Bottom - 2pt - 2pt - =IIf(rownumber(nothing) = 1, "2pt", "0pt") - - - - @@ -557,14 +528,14 @@ - =Fields!PS.Value + =Fields!Codigo.Value @@ -650,16 +621,123 @@ - + true true - =Fields!Observaciones.Value + =Fields!PUVenta.Value + + + + + + PUVenta + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Fields!SubTotalVenta.Value + + + + + + + SubTotalVenta + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.33542cm + + + + + true + true + + + + + + + + + + + + Textbox19 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + @@ -668,7 +746,649 @@ - Observaciones + Textbox20 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox23 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox40 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox41 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + Sub Total + + + + + + + Textbox42 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Sum(Fields!SubTotalVenta.Value, "DsInventarios") + + + + + + + Textbox43 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.33542cm + + + + + true + true + + + + + + + + + + + + Textbox44 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox45 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox46 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox47 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox48 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + I.V.A. + + + + + + + Textbox49 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + =Sum(Fields!IVAVenta.Value, "DsInventarios") + + + + + + + Textbox50 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + 0.33542cm + + + + + true + true + + + + + + + + + + + + Textbox51 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox52 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox53 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox54 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + + + + + + + + Textbox55 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + Importe Total + + + + + + + Textbox56 + + + Bottom + 2pt + 2pt + =IIf(rownumber(nothing) = 1, "2pt", "0pt") + + + + + + + + true + true + + + + + = Sum(Fields!SubTotalVenta.Value, "DsInventarios") + Sum(Fields!IVAVenta.Value, "DsInventarios") + + + + + + + Textbox57 @@ -704,13 +1424,22 @@ + + Before + + + Before + + + Before + DsInventarios 0.14111cm 0.10068cm - 0.84327cm - 20.3247cm + 1.84953cm + 25.76023cm @@ -718,13 +1447,13 @@ - 0.43055in + 0.88788in @@ -837,7 +1566,7 @@ CIUDAD DE MEXICO Textbox2 0.07163cm - 13.61141cm + 18.69141cm 0.38833cm 6.81397cm 3 @@ -873,7 +1602,7 @@ CIUDAD DE MEXICO Textbox12 0.88084cm - 16.09549cm + 21.17549cm 0.44478cm 4.32987cm 4 @@ -910,7 +1639,7 @@ CIUDAD DE MEXICO Textbox12 1.32562cm - 16.09549cm + 21.17549cm 0.44478cm 4.32987cm 5 @@ -946,7 +1675,7 @@ CIUDAD DE MEXICO Textbox12 1.7704cm - 16.0955cm + 21.1755cm 0.44478cm 4.32987cm 6 @@ -982,8 +1711,8 @@ CIUDAD DE MEXICO Textbox12 - 2.85018cm - 16.09549cm + 2.21518cm + 21.17549cm 0.44478cm 4.32987cm 7 @@ -997,206 +1726,6 @@ CIUDAD DE MEXICO 2pt - - - - true - true - - - - - =IIf(Parameters!CveConcepto.Value = 8, "Almacén Origen:", "Almacén que recibe:") - - - - - - - - =Parameters!AlmacenOrigen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIf(Parameters!CveConcepto.Value = 8, "Almacén Destino:", "Almacén que envía:") - - - - - - - - =Parameters!AlmacenDestino.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Detalles del Movimiento: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!DireccionOrigen.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!DireccionDestino.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - 3.66157cm - 2.01145cm - 20.32792cm - 8 - - - - true true @@ -1215,10 +1744,10 @@ CIUDAD DE MEXICO CveConcepto 0.50379cm - 17.92538cm + 23.00538cm 0.2384cm 2.5cm - 9 + 8 @@ -1245,13 +1774,42 @@ CIUDAD DE MEXICO + + + + + + =Parameters!Documentacion.Value + + + + @@ -1270,74 +1828,10 @@ CIUDAD DE MEXICO - 5.83773cm + 3.8269cm true true - - true - true - - - - - Observaciones: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - true true @@ -1357,11 +1851,10 @@ CIUDAD DE MEXICO Textbox21 - 3.28266cm - 3.14986cm + 1.37766cm + 5.68986cm 0.50243cm 5.79375cm - 2 =iif(Parameters!CveConcepto.Value = 9,true,false) @@ -1394,11 +1887,11 @@ CIUDAD DE MEXICO Textbox21 - 3.28266cm - 11.86467cm + 1.37766cm + 14.40467cm 0.50243cm 5.78664cm - 3 + 1 =iif(Parameters!CveConcepto.Value = 9,true,false) @@ -1445,11 +1938,11 @@ CIUDAD DE MEXICO Textbox21 - 3.56875cm - 3.15781cm + 1.66375cm + 5.69781cm 1.2cm 5.78664cm - 4 + 2 =iif(Parameters!CveConcepto.Value = 9,true,false) @@ -1496,11 +1989,11 @@ CIUDAD DE MEXICO Textbox21 - 3.5682cm - 11.87177cm + 1.6632cm + 14.41177cm 1.2cm 5.78664cm - 5 + 3 =iif(Parameters!CveConcepto.Value = 9,true,false) @@ -1533,11 +2026,11 @@ CIUDAD DE MEXICO Textbox22 - 1.97831cm - 3.15781cm + 0.07331cm + 5.69781cm 0.6cm 5.78664cm - 6 + 4 =iif(Parameters!CveConcepto.Value = 9,true,false) @@ -1570,11 +2063,11 @@ CIUDAD DE MEXICO Textbox22 - 1.97831cm - 11.87177cm + 0.07331cm + 14.41177cm 0.6cm 5.78664cm - 7 + 5 =iif(Parameters!CveConcepto.Value = 9,true,false) @@ -1605,11 +2098,11 @@ CIUDAD DE MEXICO Textbox21 - 2.35606cm - 7.50017cm + 0.45106cm + 10.04017cm 0.63528cm 5.78664cm - 8 + 6 =iif(Parameters!CveConcepto.Value = 8, True, False) @@ -1656,11 +2149,11 @@ CIUDAD DE MEXICO Textbox21 - 3.5682cm - 7.50727cm + 1.6632cm + 10.04727cm 1.2cm 5.78664cm - 9 + 7 =iif(Parameters!CveConcepto.Value = 8, True, False) @@ -1693,11 +2186,11 @@ CIUDAD DE MEXICO Textbox22 - 1.97831cm - 7.50727cm + 0.07331cm + 10.04727cm 0.6cm 5.78664cm - 10 + 8 =iif(Parameters!CveConcepto.Value = 8, True, False) @@ -1741,11 +2234,11 @@ CIUDAD DE MEXICO Textbox29 - 5.31209cm + 3.40709cm 0.10068cm 0.41981cm 5.78083cm - 11 + 9 @@ -1779,11 +2272,11 @@ CIUDAD DE MEXICO Textbox31 - 5.31209cm - 8.15629cm + 3.40709cm + 11.33129cm 0.41981cm 5.13762cm - 12 + 10 @@ -1795,11 +2288,10 @@ CIUDAD DE MEXICO - 1.80136cm 0.13678cm 0cm 20.28859cm - 13 + 11 @@ -1807,11 +2299,10 @@ CIUDAD DE MEXICO - 0.31558cm 0.13678cm 0cm - 20.28859cm - 14 + 25.72414cm + 12 @@ -1819,11 +2310,11 @@ CIUDAD DE MEXICO - 5.17097cm + 3.26597cm 0.10068cm 0cm - 20.3247cm - 15 + 25.76024cm + 13 @@ -1849,11 +2340,11 @@ CIUDAD DE MEXICO Textbox10 - 5.31209cm - 17.60787cm + 3.40709cm + 23.00537cm 0.41981cm 2.55292cm - 16 + 14 @@ -1871,12 +2362,12 @@ CIUDAD DE MEXICO - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 1cm + 21.59cm + 27.94cm + 1cm + 1cm + 0.5cm + 0.5cm 0.13cm