From 8a13a4d967015a4e62e8c1d147d9354f14594bbf Mon Sep 17 00:00:00 2001 From: rmolina Date: Fri, 6 Dec 2019 11:32:27 -0700 Subject: [PATCH 1/8] ventas, considerar en actualziar el recalculo de ieps --- App_Code/Modelos.vb | 2 +- Inventarios/RecepcionUsados.aspx.vb | 6 +++--- Ventas/Clientes.aspx.vb | 8 ++++---- Ventas/Ventas.aspx.vb | 4 +++- packages.config | 3 +++ 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 8d840b5a5..e0a88a441 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -4001,7 +4001,7 @@ Namespace Modelos End If End If Else - Retorno.Mensaje = "No se pudo comprobar la vigencia de la factura." + Retorno.Mensaje = "SAT - No se pudo verificar el estatus de la factura." Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia Return Retorno diff --git a/Inventarios/RecepcionUsados.aspx.vb b/Inventarios/RecepcionUsados.aspx.vb index 269c53936..7fe120eaa 100644 --- a/Inventarios/RecepcionUsados.aspx.vb +++ b/Inventarios/RecepcionUsados.aspx.vb @@ -1086,7 +1086,7 @@ Partial Class Inventarios_RecepcionUsados 'si es selectedvalue = 2, es entrada ,3 -salida Dim CveConceptoUsados As Integer = If(RBLOpcion.SelectedValue.ToEntero = 2, 1, 2) - If RBLOpcion.SelectedValue.ToEntero = 2 AndAlso EsDistribuidor Then + If RBLOpcion.SelectedValue.ToEntero = 2 AndAlso EsDistribuidor Then If Not ObjAcum.DistribuidorMovtosAdd(DdlClientes.SelectedValue.ToEntero, Dr("Cantidad").ToString.ToEntero(), Dr("CveTamaño").ToString.ToEntero, CveConceptoUsados, CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 0, Dr("Observaciones").ToString, CveMovimiento:=CveMovimiento) Then @@ -1096,7 +1096,7 @@ Partial Class Inventarios_RecepcionUsados End If End If - Next + Next If Not ErrorMovInv Then @@ -1646,7 +1646,7 @@ Partial Class Inventarios_RecepcionUsados #Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED" Private Sub InicializaClientes() - DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa) '.FiltraParametros("EsDistribuidor = 1") + DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltraParametros("EsDistribuidor = 1") DdlClientes.DataBind() DdlClientes.Items.Insert(0, New ListItem("Seleccione", "-1")) DdlClientes.SelectedValue = "-1" diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index c2751d5d1..54de8ab19 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -9199,7 +9199,7 @@ Partial Class Clientes Dim Serie As String = "" If FolioNotaCredito(Tipo) Then - Folio = FolioNotaAcumulador + Folio = -1 Serie = SerieNotaAcumulador End If @@ -9305,9 +9305,9 @@ Partial Class Clientes End If ObjFactura.FechaEjecucion = Now - ObjFactura.CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero - ObjFactura.CveSubProyectoCobranza = DdlSubProyecto.SelectedValue.ToEntero - ObjFactura.CveSubProyectoEjecucion = DdlSubProyecto.SelectedValue.ToEntero + ObjFactura.CveSubProyecto = UsuarioActual.CveSubProyecto + ObjFactura.CveSubProyectoCobranza = UsuarioActual.CveSubProyecto + ObjFactura.CveSubProyectoEjecucion = UsuarioActual.CveSubProyecto ObjFactura.AtencionA = "-1" ObjFactura.MotivoDescuento = "" ObjFactura.Observaciones = "" diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 3079f5ad9..15fbafaec 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -5897,6 +5897,8 @@ Partial Class Ventas End If Dim TotalCalculableImpuestos As Decimal = ((Cantidad * PU) - (Descuento)) + Dim TotalCalculableImpuestosIVA As Decimal = 0 + TotalCalculableImpuestosIVA = TotalCalculableImpuestos * (1 + TmpDT.Rows(e.RowIndex)("IEPSPorcentaje").ToString.ToDecimal) TmpDT.Rows(e.RowIndex)("CveUM") = GvPS.Rows(e.RowIndex).FCDropDownList("DdlUnidadMedida").SelectedValue.ToEntero @@ -5907,7 +5909,7 @@ Partial Class Ventas TmpDT.Rows(e.RowIndex)("PU") = PU TmpDT.Rows(e.RowIndex)("Descuento") = Descuento TmpDT.Rows(e.RowIndex)("TotalImporte") = Math.Round(Cantidad * PU, NumeroDecimales) - TmpDT.Rows(e.RowIndex)("ImporteIVA") = Math.Round(TmpDT.Rows(e.RowIndex)("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales) + TmpDT.Rows(e.RowIndex)("ImporteIVA") = Math.Round(TmpDT.Rows(e.RowIndex)("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestosIVA, NumeroDecimales) TmpDT.Rows(e.RowIndex)("ImporteIEPS") = Math.Round(TmpDT.Rows(e.RowIndex)("PorcentajeIEPS").ToString.ToDecimal * TotalCalculableImpuestos, NumeroDecimales) TmpDT.Rows(e.RowIndex)("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, NumeroDecimales) TmpDT.Rows(e.RowIndex)("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, NumeroDecimales) diff --git a/packages.config b/packages.config index 745b27f24..c1f65a236 100644 --- a/packages.config +++ b/packages.config @@ -3,12 +3,15 @@ + + + From 08f740980a380271696d580b33e3b02fed96f0b6 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 6 Dec 2019 12:17:08 -0700 Subject: [PATCH 2/8] Nominas --- App_Code/clsGemBoxDocument.vb | 4 +- Nomina/Nomina2.aspx | 12 +- Nomina/Nomina2.aspx.cs | 1515 +++++++++++++++++++++++++++- Nomina/RepConceptosAcumulados.aspx | 105 +- RH/Personal.aspx | 2 +- Scripts/custom.js | 2 +- Site.master.vb | 2 +- 7 files changed, 1576 insertions(+), 66 deletions(-) diff --git a/App_Code/clsGemBoxDocument.vb b/App_Code/clsGemBoxDocument.vb index 6177426df..ea81a4af3 100644 --- a/App_Code/clsGemBoxDocument.vb +++ b/App_Code/clsGemBoxDocument.vb @@ -7,8 +7,8 @@ Public Class clsGemBoxDocument Implements IDisposable - Private documento As DocumentModel - Private rutaSalvado As String + Public documento As DocumentModel + Public rutaSalvado As String Public StremFile As String Public memoryStream As New MemoryStream() diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index e6577b557..29bbe7a6f 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -73,6 +73,10 @@ + +
  • + Lista de Raya +
  • @@ -890,12 +894,14 @@ @@ -904,7 +910,7 @@ Formato Formato - cargar y autorizar + cargar diff --git a/Nomina/Nomina2.aspx.cs b/Nomina/Nomina2.aspx.cs index b07e6318c..679f76b00 100644 --- a/Nomina/Nomina2.aspx.cs +++ b/Nomina/Nomina2.aspx.cs @@ -31,6 +31,17 @@ public partial class Nomina_Nomina2 : ClsPaginas set { ViewState["dtConceptos"] = value; } } + + private DataTable dtempleadosConceptos + { + get + { + if (ViewState["dtempleadosConceptos"] == null) { return null; } + else { return (DataTable)ViewState["dtempleadosConceptos"]; } + } + + set { ViewState["dtempleadosConceptos"] = value; } + } private DataTable dtempleados { get @@ -227,6 +238,7 @@ public partial class Nomina_Nomina2 : ClsPaginas if (objnom.GetNominaEmpleado(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, CveEmpresa, Agrupador) && objnom.DTSetResultados.Tables.Count > 1) { dtempleados = objnom.DTSetResultados.Tables[3]; + dtempleadosConceptos = objnom.DTSetResultados.Tables[4]; dtConceptos = objnom.DTSetResultados.Tables[0]; dtPeriodo = objnom.DTSetResultados.Tables[1]; dtasistencia = objnom.DTSetResultados.Tables[2]; @@ -282,7 +294,7 @@ public partial class Nomina_Nomina2 : ClsPaginas GvNominas.Columns[CurrentColumn].Visible = (dtempleados.SUM(string.Format("[V_{0}]", CveConcepto)) > 0); bf = (BoundField)GvNominas.Columns[CurrentColumn]; bf.DataField = string.Format("V_{0}", CveConcepto); - bf.HeaderText = Concepto; + bf.HeaderText = Concepto; if (GvNominas.Columns[CurrentColumn].Visible) { CurrentColumn++; @@ -748,15 +760,15 @@ public partial class Nomina_Nomina2 : ClsPaginas { using (ClsNominas objNomina = new ClsNominas(objpersonal.IniciaTransacSQL())) { - foreach (DataRow row in DTEXcel.Rows) + foreach (DataRow row in DTEXcel.FiltraParametros("CvePersonal>0").Rows) { string Codigo = row["Codigo"].ToString(); - int CvePersonal = 0; + int CvePersonal = row["CvePersonal"].ToString().ToEntero(); int CveNomina = 0; double SubTotal = 0; double Total = 0; int CveMetodoPago = 0; - if (Codigo != "-1" && objpersonal.GetPersonal(-1, Codigo, "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) && + if (Codigo != "-1" && objpersonal.GetPersonal(CvePersonal, Codigo, "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, 2, -1, -1, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) && objpersonal.DtResultados.Rows.Count == 1) { CvePersonal = objpersonal.CvePersonal; @@ -794,21 +806,48 @@ public partial class Nomina_Nomina2 : ClsPaginas } if (CveNomina > 0) { - foreach (int CveConcepto in lConceptos) + //foreach (int CveConcepto in lConceptos) + //{ + // decimal Importe = 0; + // decimal ImporteGravado = 0; + // decimal ImporteExento = 0; + // Importe = row[CveConcepto.ToString()].ToString().ToDecimal(); + // //try + // //{ + // // ImporteExento = row[string.Format("E{0}", CveConcepto)].ToString().ToDecimal(); + // //} + // //catch (Exception) { } + // ImporteGravado = Importe - ImporteExento; + // objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario); + + //} + for (int i = 3; i < DTEXcel.Columns.Count; i++) { + int CveConcepto = DTEXcel.Columns[i].ColumnName.ToEntero(); decimal Importe = 0; decimal ImporteGravado = 0; decimal ImporteExento = 0; - Importe = row[CveConcepto.ToString()].ToString().ToDecimal(); - try - { - ImporteExento = row[string.Format("E{0}", CveConcepto)].ToString().ToDecimal(); - } - catch (Exception) { } + bool dontsaveconcepto = ((row[i].ToString().ToUpper() == "N") || (DTEXcel.Rows[0][i].ToString().ToUpper() == "N")); + Importe = row[i].ToString().ToDecimal(); ImporteGravado = Importe - ImporteExento; - objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario); + if (CveConcepto > 0) + { + if (!dontsaveconcepto)//el usuario definira si desea actualizar o no el concepto en el periodo + { + if (!objNomina.AddUPNom_NominasDetalles(objNomina.CveNomina, CvePeriodoSeleccionado, CvePersonal, CveConcepto, Importe, ImporteGravado, ImporteExento, UsuarioActual.CveUsuario)) + { + rollback = true; + } + } + } + else + { + rollback = false; + stringError = "ocurrio un error al procesar el archivo favor de intentar de nuevo volviendo a descargar el archivo.
    si el problema Persiste Contacte a soporte."; + } } + } } if (rollback) @@ -1199,7 +1238,11 @@ public partial class Nomina_Nomina2 : ClsPaginas var libro = wb.AddWorksheet("Nomina"); int column = 1; libro.Row(1).Hide(); + libro.Column(1).Hide(); + libro.Cell(1, column).Value = "CvePersonal"; + libro.Cell(2, column).Value = "CvePersonal"; + column++; libro.Cell(1, column).Value = "Codigo"; libro.Cell(2, column).Value = "Codigo"; column++; @@ -1214,12 +1257,12 @@ public partial class Nomina_Nomina2 : ClsPaginas libro.Cell(1, column).Value = CveConcepto; libro.Cell(2, column).Value = Concepto; libro.Column(column).Width = 15; - column++; - CveConcepto = string.Format("E{0}", row["CveConcepto"]); - Concepto = string.Format("Exento {0}", row["Concepto"]); - libro.Cell(1, column).Value = CveConcepto; - libro.Cell(2, column).Value = Concepto; - libro.Column(column).Width = 15; + //column++; + //CveConcepto = string.Format("E{0}", row["CveConcepto"]); + //Concepto = string.Format("Exento {0}", row["Concepto"]); + //libro.Cell(1, column).Value = CveConcepto; + //libro.Cell(2, column).Value = Concepto; + //libro.Column(column).Width = 15; } libro.Row(1).CellsUsed().Style.Font.FontColor = ClosedXML.Excel.XLColor.White; @@ -1229,22 +1272,40 @@ public partial class Nomina_Nomina2 : ClsPaginas //libro.Row(1).Cell(13).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(247, 150, 70)); //libro.Row(1).Cell(14).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(0, 176, 240)); //libro.Row(1).Cell(15).Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199)); - int Fila = 2; + + libro.Cell(3, 1).Value = 0; + libro.Range(3, 2, 3, 3).Merge().Value = "¿Modificar SI(S)/NO(N)?"; + column = 3; + foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows) + { + column++; + string Concepto = string.Format("V_{0}", row["CveConcepto"]); + libro.Cell(3, column).Value = "N"; + //column++; + //string ConceptoG = string.Format("VG_{0}", row["CveConcepto"]); + //libro.Cell(3, column).Value = "N"; + + } + libro.Row(3).CellsUsed().Style.Fill.SetBackgroundColor(ClosedXML.Excel.XLColor.FromArgb(177, 160, 199)); + + int Fila = 3; foreach (DataRow erow in dtempleados.FiltraParametros("CvePersonal>0").Rows) { Fila++; column = 1; + libro.Cell(Fila, column).Value = erow["CvePersonal"]; + column++; libro.Cell(Fila, column).Value = erow["Codigo"]; column++; libro.Cell(Fila, column).Value = erow["Nombre"]; foreach (DataRow row in dtConceptos.FiltraParametros("Tipo IN ('P','D','O') AND EsPadre = 1 ").Rows) { column++; - string Concepto = row["CveConcepto"].ToString(); - libro.Cell(Fila, column).Value = erow[Concepto]; - column++; - Concepto = string.Format("{0}-E", row["CveConcepto"]); + string Concepto = string.Format("V_{0}", row["CveConcepto"]); libro.Cell(Fila, column).Value = erow[Concepto]; + //column++; + //string ConceptoG = string.Format("VG_{0}", row["CveConcepto"]); + //libro.Cell(Fila, column).Value = erow[Concepto].ToString().ToDecimal() - erow[ConceptoG].ToString().ToDecimal(); } } @@ -1383,4 +1444,1412 @@ public partial class Nomina_Nomina2 : ClsPaginas UpModalTablas.Update(); RegistraScript("$('#ModalTablas').modal();"); } + + private void ImprimirReporte() + { + string RutaDocumento = System.IO.Path.Combine(Server.MapPath("/"), "Empresas/Grales/Lista de Raya.docx"); + if (dtempleados != null && dtempleados.Rows.Count > 0) + { + if (System.IO.File.Exists(RutaDocumento)) + { + try + { + clsGemBoxDocument GemDocumen = new clsGemBoxDocument(RutaDocumento); + List listaTags = new List(); + string strEmpresa = UsuarioActual.Empresa.Empresa; + string strFechaInicio = ""; + string strFechaFin = ""; + string strTipo = ""; + string strPeriodoNum = ""; + string strUbicacion = string.Format ("{0}, {1}, {2}, {3}",UsuarioActual.Empresa.Direccion, UsuarioActual.Empresa.Colonia, UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado ); + string strRegPatImss = ""; + string strRFC = UsuarioActual.Empresa.RFC; + string strfecha = DateTime.Now.ToString("dd/MMM/yyyy", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX")); + string strhora = DateTime.Now.ToString("HH:mm:ss", System.Globalization.CultureInfo.CreateSpecificCulture("es-MX")); + + + int CvePeriodo = DdlPeriodo.SelectedValue.ToEntero(); + DataRow rperiodo = dtPeriodos.FiltroPrimero(string.Format("CvePeriodo = {0}", CvePeriodo)); + if (rperiodo != null) + { + strFechaInicio =string.Format("{0:dd/MM/yyyy}", rperiodo["FechaInicio"]); + strFechaFin = string.Format("{0:dd/MM/yyyy}", rperiodo["FechaFin"]); + strPeriodoNum = rperiodo["Numero"].ToString(); + + strTipo = DdlTipoPeriodo.SelectedItem.Text ; + } + listaTags.Add(new TagsDocumentos("[Empresa]", strEmpresa)); + listaTags.Add(new TagsDocumentos("[FechaInicio]", strFechaInicio)); + listaTags.Add(new TagsDocumentos("[FechaFin]", strFechaFin)); + listaTags.Add(new TagsDocumentos("[Tipo]", strTipo)); + listaTags.Add(new TagsDocumentos("[PeriodoNum]", strPeriodoNum)); + listaTags.Add(new TagsDocumentos("[Ubicacion]", strUbicacion)); + listaTags.Add(new TagsDocumentos("[RegPatImss]", strRegPatImss)); + listaTags.Add(new TagsDocumentos("[RFC]", strRFC)); + listaTags.Add(new TagsDocumentos("[fecha]", strfecha)); + listaTags.Add(new TagsDocumentos("[hora]", strhora)); + + GemBox.Document.DocumentModel document = GemDocumen.documento; + var section = document.Sections[0]; + GemBox.Document.Tables.TableRow row; + GemBox.Document.Tables.Table sobrereciboTable; + GemBox.Document.Tables.Table tconeptos; + GemBox.Document.Paragraph paragraphh; + int CveDepartamento = 0; + string Departamento = ""; + GemBox.Document.ParagraphStyle styilo = (GemBox.Document.ParagraphStyle)document.Styles.GetOrAdd(GemBox.Document.StyleTemplateType.Normal); + GemBox.Document.ParagraphStyle styilostrong = (GemBox.Document.ParagraphStyle)document.Styles.GetOrAdd(GemBox.Document.StyleTemplateType.NoSpacing); + //GemBox.Document.Style styilonegrita = GemBox.Document.Style.CreateStyle(GemBox.Document.StyleTemplateType.Strong, document); + //document.Styles.Add(styilonegrita); + foreach (DataRow drow in dtempleados.FiltraParametros("", "", new string[] { "CveDepartamento", "Departamento" }).Rows) + { + CveDepartamento = drow["CveDepartamento"].ToString().ToEntero(); + Departamento = drow["Departamento"].ToString(); + + paragraphh = new GemBox.Document.Paragraph(document, Departamento); + paragraphh.ParagraphFormat.Style = styilostrong; + section.Blocks.Add(paragraphh); + paragraphh = new GemBox.Document.Paragraph(document, "........................................................................................................................................................................"); + section.Blocks.Add(paragraphh); + foreach (DataRow drow2 in dtempleados.FiltraParametros(string.Format("CveDepartamento={0}", CveDepartamento)).Rows) + { + + sobrereciboTable = new GemBox.Document.Tables.Table(document); + sobrereciboTable.TableFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(100, GemBox.Document.Tables.TableWidthUnit.Percentage); + section.Blocks.Add(sobrereciboTable); + + row = new GemBox.Document.Tables.TableRow(document); + sobrereciboTable.Rows.Add(row); + var cell = new GemBox.Document.Tables.TableCell(document); + row.Cells.Add(cell); + /* + string SalarioDiariop = ""; + string FechaIngreso = "", Nombre = "", DiasLaborados = "";*/ + + paragraphh = new GemBox.Document.Paragraph(document,string.Format("{1} : {0}", drow2["Nombre"].ToString(), drow2["Codigo"].ToString())); cell.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + paragraphh = new GemBox.Document.Paragraph(document, string.Format("Fecha Ingr:{0:dd/MM/yyyy}, S.D.:{1:N2} ", drow2["FechaIngreso"], drow2["SalarioDiario"])); cell.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + paragraphh = new GemBox.Document.Paragraph(document, string.Format("Días pagados:{0}, Retardos: {1}, Ausencias:{2} ", drow2["DiasPago"], drow2["DiasRetardos"], drow2["DiasFaltados"])); cell.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + /* + Gonzalez Gaitan Jorge + DIRECTOR OPERATIVO RFC: GOGJ-720331-TZ3 Afiliación IMSS: 11-96-72-1082-1 + Fecha Ingr: 01/03/2019 Sal. diario: 3849.84 S.D.I: 4023.87 S.B.C: 2112.25 Cotiza Fijo + Días pagados: 15.00 Tot Hrs trab: 120.00 Hrs día: 8.00 Hrs extras: 0.00 CURP: GOGJ-720331-HMCNTR09 + */ + + row = new GemBox.Document.Tables.TableRow(document); + sobrereciboTable.Rows.Add(row); + cell = new GemBox.Document.Tables.TableCell(document); + row.Cells.Add(cell); + + tconeptos = new GemBox.Document.Tables.Table(document); + tconeptos.TableFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(100, GemBox.Document.Tables.TableWidthUnit.Percentage); + cell.Blocks.Add(tconeptos); + GemBox.Document.Tables.TableRow rowx; GemBox.Document.Tables.TableCell cellx; + + + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Percepción"); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Valor"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Importe"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Deducción"); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Valor"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Importe"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + //Percepción Valor Importe Deducción Valor Importe + bool gonext = true; + int cindex = 0; + int CvePersonal = 1; + while (gonext) + { + cindex = cindex + 1; + CvePersonal = drow2["CvePersonal"].ToString().ToEntero(); + int CveConcepto; string Concepto = ""; string Codigo = ""; string importe = ""; string valor = ""; + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + DataRow rowconcept = dtempleadosConceptos.FiltroPrimero(string.Format("CvePersonal={0} AND Tipo =1 AND Fila ={1}", CvePersonal, cindex)); + if (rowconcept != null) + { + CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero(); + importe = string.Format("${0:N2}", rowconcept["Importe"]); + valor = string.Format("{0:#,###.##}", rowconcept["Valor"]); + + Concepto = ""; + + rowconcept = dtConceptos.FiltroPrimero(string.Format("CveConcepto={0}", CveConcepto)); + if (rowconcept != null) + { + Concepto = rowconcept["Concepto"].ToString(); + Codigo = rowconcept["Codigo"].ToString(); + } + } + else + { + gonext = false; + } + //percepciones + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Codigo); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Concepto); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, valor); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, importe); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + + + + CveConcepto = 0; Concepto = ""; importe = ""; Codigo = "";valor = ""; + + + rowconcept = dtempleadosConceptos.FiltroPrimero(string.Format("CvePersonal={0} AND Tipo =2 AND Fila ={1}", CvePersonal, cindex)); + if (rowconcept != null) + { + + CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero(); + importe = string.Format("${0:N2}", rowconcept["Importe"]); + valor = string.Format("{0:#,###.##}", rowconcept["Valor"]); + //string valor = ""; + Concepto = ""; + + rowconcept = dtConceptos.FiltroPrimero(string.Format("CveConcepto={0}", CveConcepto)); + if (rowconcept != null) + { + Concepto = rowconcept["Concepto"].ToString(); + Codigo = rowconcept["Codigo"].ToString(); + } + gonext = true; + } + + //deducciones + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Codigo); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Concepto); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, valor); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, importe); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + } + { + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + } + //Total Percepciones y deducciones + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total Percepciones"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", drow2["SumaPercepciones"])); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total Deducciones"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", drow2["SumaDeducciones"])); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + //Neto a Pagar + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Neto a Pagar"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", drow2["Total"])); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + + + setborderclear(tconeptos); + keeptablesamepage(sobrereciboTable); + } + + paragraphh = new GemBox.Document.Paragraph(document, "........................................................................................................................................................................"); + section.Blocks.Add(paragraphh); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("Total Departamento {0}", Departamento.ToUpper())); + paragraphh.ParagraphFormat.Style = styilostrong; + section.Blocks.Add(paragraphh); + + #region "totaldepto" + { + + sobrereciboTable = new GemBox.Document.Tables.Table(document); + sobrereciboTable.TableFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(100, GemBox.Document.Tables.TableWidthUnit.Percentage); + section.Blocks.Add(sobrereciboTable); + row = new GemBox.Document.Tables.TableRow(document); + sobrereciboTable.Rows.Add(row); + var cell = new GemBox.Document.Tables.TableCell(document); + row.Cells.Add(cell); + tconeptos = new GemBox.Document.Tables.Table(document); + tconeptos.TableFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(100, GemBox.Document.Tables.TableWidthUnit.Percentage); + cell.Blocks.Add(tconeptos); + GemBox.Document.Tables.TableRow rowx; GemBox.Document.Tables.TableCell cellx; + //Percepción Valor Importe Deducción Valor Importe + bool gonext = true; + int cindex = 0; + int OrdenP = -999; + int ordenD = -999; + #region "Titulos" + + { + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Percepción"); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Valor"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Importe"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Deducción"); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Valor"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Importe"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + #endregion + #region "Titulos" + + while (gonext) + { + cindex = cindex + 1; + int CveConcepto; string Concepto = ""; string Codigo = ""; string importe = ""; + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + DataRow rowconcept; + while ((rowconcept = dtConceptos.FiltroPrimero(string.Format("Orden>{0} AND Tipo ='P'", OrdenP))) != null && importe == "") + { + double sumaimporte = dtempleadosConceptos.SUM("Importe", string.Format("CveDepartamento={0} AND CveConcepto={1}", CveDepartamento, rowconcept["CveConcepto"])); + OrdenP = rowconcept["Orden"].ToString().ToEntero(); + if (sumaimporte > 0) + { + CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero(); + importe = string.Format("${0:N2}", sumaimporte); + Concepto = rowconcept["Concepto"].ToString(); + Codigo = rowconcept["Codigo"].ToString(); + + } + } + if (importe == "") + { + gonext = false; + } + //percepciones + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Codigo); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Concepto); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, importe); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + + + + CveConcepto = 0; Concepto = ""; importe = ""; Codigo = ""; + + while ((rowconcept = dtConceptos.FiltroPrimero(string.Format("Orden>{0} AND Tipo ='D'", ordenD))) != null && importe == "") + { + double sumaimporte = dtempleadosConceptos.SUM("Importe", string.Format("CveDepartamento={0} AND CveConcepto={1}", CveDepartamento, rowconcept["CveConcepto"])); + ordenD = rowconcept["Orden"].ToString().ToEntero(); + if (sumaimporte > 0) + { + CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero(); + importe = string.Format("${0:N2}", sumaimporte); + Concepto = rowconcept["Concepto"].ToString(); + Codigo = rowconcept["Codigo"].ToString(); + + } + } + if (importe != "") + { + gonext = true; + } + + + //deducciones + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Codigo); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Concepto); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, importe); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + } + #endregion + + { + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + } + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total Percepciones"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaPercepciones", string.Format("CveDepartamento={0}", CveDepartamento)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total Deducciones"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaDeducciones", string.Format("CveDepartamento={0}", CveDepartamento)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + + //no empleados + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total de empleados"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("{0:N0}", dtempleados.COUNT("CvePersonal", string.Format("CveDepartamento={0}", CveDepartamento)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + } + } + //Neto depto + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Neto del departamento"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("Total", string.Format("CveDepartamento={0}", CveDepartamento)))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + + + setborderclear(tconeptos); + keeptablesamepage(sobrereciboTable); + } + #endregion + + } + + paragraphh = new GemBox.Document.Paragraph(document, "TOTAL "); + paragraphh.ParagraphFormat.Style = styilostrong; + section.Blocks.Add(paragraphh); + + #region "total" + { + + sobrereciboTable = new GemBox.Document.Tables.Table(document); + sobrereciboTable.TableFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(100, GemBox.Document.Tables.TableWidthUnit.Percentage); + section.Blocks.Add(sobrereciboTable); + row = new GemBox.Document.Tables.TableRow(document); + sobrereciboTable.Rows.Add(row); + var cell = new GemBox.Document.Tables.TableCell(document); + row.Cells.Add(cell); + tconeptos = new GemBox.Document.Tables.Table(document); + tconeptos.TableFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(100, GemBox.Document.Tables.TableWidthUnit.Percentage); + cell.Blocks.Add(tconeptos); + GemBox.Document.Tables.TableRow rowx; GemBox.Document.Tables.TableCell cellx; + //Percepción Valor Importe Deducción Valor Importe + bool gonext = true; + int cindex = 0; + int OrdenP = -999; + int ordenD = -999; + //Titulos + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Percepción"); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Valor"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Importe"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Deducción"); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Valor"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Importe"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + //conceptos percep,deduc + while (gonext) + { + cindex = cindex + 1; + int CveConcepto; string Concepto = ""; string Codigo = ""; string importe = ""; + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + DataRow rowconcept; + while ((rowconcept = dtConceptos.FiltroPrimero(string.Format("Orden>{0} AND Tipo ='P'", OrdenP))) != null && importe == "") + { + double sumaimporte = dtempleadosConceptos.SUM("Importe", string.Format(" CveConcepto={0}", rowconcept["CveConcepto"])); + OrdenP = rowconcept["Orden"].ToString().ToEntero(); + if (sumaimporte > 0) + { + CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero(); + importe = string.Format("${0:N2}", sumaimporte); + Concepto = rowconcept["Concepto"].ToString(); + Codigo = rowconcept["Codigo"].ToString(); + + } + } + if (importe == "") + { + gonext = false; + } + //percepciones + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Codigo); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Concepto); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, importe); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + + + + CveConcepto = 0; Concepto = ""; importe = ""; Codigo = ""; + + while ((rowconcept = dtConceptos.FiltroPrimero(string.Format("Orden>{0} AND Tipo ='D'", ordenD))) != null && importe == "") + { + double sumaimporte = dtempleadosConceptos.SUM("Importe", string.Format(" CveConcepto={0}", rowconcept["CveConcepto"])); + ordenD = rowconcept["Orden"].ToString().ToEntero(); + if (sumaimporte > 0) + { + CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero(); + importe = string.Format("${0:N2}", sumaimporte); + Concepto = rowconcept["Concepto"].ToString(); + Codigo = rowconcept["Codigo"].ToString(); + + } + } + if (importe != "") + { + gonext = true; + } + + + //deducciones + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Codigo); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Concepto); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, importe); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + } + { + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + } + //Totales perceciones deducciones + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total Percepciones"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaPercepciones"))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total Deducciones"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaDeducciones"))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total de empleados general"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("{0:N0}", dtempleados.COUNT("CvePersonal"))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + } + } + //neto empresa + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Neto general"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("Total"))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + gonext = true; + int OrdenO = -999; + + //basura para espacio + { + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, " "); cellx.Blocks.Add(paragraphh); + } + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, " "); cellx.Blocks.Add(paragraphh); + } + } + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Obligación"); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Importe"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + while (gonext) + { + cindex = cindex + 1; + int CveConcepto; string Concepto = ""; string Codigo = ""; string importe = ""; + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + { + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Codigo); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.ColumnSpan = 2; + paragraphh = new GemBox.Document.Paragraph(document, Concepto); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + //cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + //cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + //paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + //paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, importe); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + } + DataRow rowconcept; + while ((rowconcept = dtConceptos.FiltroPrimero(string.Format("Orden>{0} AND Tipo ='O'", OrdenO))) != null && importe == "") + { + double sumaimporte = dtempleadosConceptos.SUM("Valor", string.Format(" CveConcepto={0}", rowconcept["CveConcepto"])); + OrdenO = rowconcept["Orden"].ToString().ToEntero(); + if (sumaimporte > 0) + { + CveConcepto = rowconcept["CveConcepto"].ToString().ToEntero(); + importe = string.Format("${0:N2}", sumaimporte); + Concepto = rowconcept["Concepto"].ToString(); + Codigo = rowconcept["Codigo"].ToString(); + + } + } + if (importe == "") + { + gonext = false; + } + //Obligaciones + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Codigo); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, Concepto); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, importe); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + } + + + } + + { + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + } + { + + rowx = new GemBox.Document.Tables.TableRow(document); + tconeptos.Rows.Add(rowx); + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, " "); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + + { + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(3, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(30, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, "Total Obligaciones"); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(6, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, ""); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilo; + + + cellx = new GemBox.Document.Tables.TableCell(document); rowx.Cells.Add(cellx); + cellx.CellFormat.PreferredWidth = new GemBox.Document.Tables.TableWidth(11, GemBox.Document.Tables.TableWidthUnit.Percentage); + paragraphh = new GemBox.Document.Paragraph(document, string.Format("${0:N2}", dtempleados.SUM("SumaObligaciones"))); cellx.Blocks.Add(paragraphh); paragraphh.ParagraphFormat.Alignment = GemBox.Document.HorizontalAlignment.Right; + paragraphh.ParagraphFormat.Style = styilostrong; + + } + } + setborderclear(tconeptos); + keeptablesamepage(tconeptos); + keeptablesamepage(sobrereciboTable); + } + #endregion + + + + GemDocumen.SustituirTags(listaTags); + GemDocumen.GuardarStreamPDF(); + //GemDocumen.GuardarStream(); + + System.IO.MemoryStream memoryStream = new System.IO.MemoryStream(GemDocumen.GetBytesDocumento()); + GemDocumen.Dispose(); + Response.Clear(); + Response.ContentType = "application/pdf"; + Response.AddHeader("content-disposition", $"attachment;filename=Lista de Raya.pdf"); + //Response.AddHeader("content-disposition", $"attachment;filename=Lista de Raya.docx"); + Response.Buffer = true; + memoryStream.WriteTo(Response.OutputStream); + Response.End(); + } + + + + catch (Exception e) + { + + Extensiones.ModExtensiones.GuardaLog(string.Format("Nomina2(errorLayout):{0} ", e.ToString())); + Alert("No se pudo generar la lista de raya favor de contactar a soporte tecnico.", Extensiones.ModExtensiones.TipoMensaje.ToastError); + + } + } + else + { + Alert("No se encontro la plantilla.", Extensiones.ModExtensiones.TipoMensaje.ToastAdventencia); + } + + } + else + { + Alert("es necesario calcular el periodo primero.", Extensiones.ModExtensiones.TipoMensaje.ToastAdventencia); + } + } + + #region "Gembox" + private void keeptablesamepage(GemBox.Document.Tables.Table table) + { + //Mantener tabla unida + { + // Get all Paragraph formats in a Table element. + IEnumerable formats = table.GetChildElements(true, GemBox.Document.ElementType.TableCell) + .Cast() + .SelectMany(cell => + { + if (cell.Blocks.Count == 0) + cell.Blocks.Add(new GemBox.Document.Paragraph(cell.Document)); + return cell.GetChildElements(true, GemBox.Document.ElementType.Paragraph); + }) + .Cast() + .Select(p => p.ParagraphFormat); + + // Set KeepLinesTogether and KeepWithNext properties. + foreach (GemBox.Document.ParagraphFormat format in formats) + { + format.KeepLinesTogether = true; + format.KeepWithNext = true; + } + } + } + private void setborderclear(GemBox.Document.Tables.Table table) + { + table.TableFormat.Borders.SetBorders(GemBox.Document.MultipleBorderTypes.All, GemBox.Document.BorderStyle.None, GemBox.Document.Color.Empty, 0); + foreach (var row in table.Rows) + { + foreach (var cell in row.Cells) + { + cell.CellFormat.Borders.ClearBorders(); + } + } + } + #endregion + protected void LnkListaRaya_Click(object sender, EventArgs e) + { + ImprimirReporte(); + } } \ No newline at end of file diff --git a/Nomina/RepConceptosAcumulados.aspx b/Nomina/RepConceptosAcumulados.aspx index 0a44eeeb9..bbd16b73a 100644 --- a/Nomina/RepConceptosAcumulados.aspx +++ b/Nomina/RepConceptosAcumulados.aspx @@ -3,6 +3,11 @@ + @@ -14,9 +19,50 @@ +
    + + +
    +
    +
    +
    + +
    + + + +
    + + +
    + + + + + + +
    + + +
    + + + +
    + +
    + + + +
    +
    +
    +
    +
    + - + @@ -86,12 +116,14 @@
    - + Nombre + @@ -100,15 +132,17 @@ Acumulado Actual + - + Acumulado Anterior + @@ -118,6 +152,7 @@ Acumulado Anual + diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 76e79d612..e1ae3ceb6 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -2270,7 +2270,7 @@ diff --git a/Scripts/custom.js b/Scripts/custom.js index 034aef08c..39e2ae95b 100644 --- a/Scripts/custom.js +++ b/Scripts/custom.js @@ -1769,7 +1769,7 @@ jQuery(document).ready(function () { loadsortadscroll(); QuickSidebar.init(); - MoveFixedDiv(); + MoveFixedDiv(); setswitch(); function ocultarbtnmaster() { if ($('#btnmaster_actionssidebar + ul').text().trim() == "") { $('#btnmaster_actionssidebar').css('display', 'none'); } else { $('#btnmaster_actionssidebar').css('display', 'block'); } } diff --git a/Site.master.vb b/Site.master.vb index 6afa57abc..bd03f5832 100644 --- a/Site.master.vb +++ b/Site.master.vb @@ -405,7 +405,7 @@ Partial Class Site Case 8 Return "" Case 9 - Return "" + Return "" Case 10 Return "" Case Else From 42ac1cc77de1782773a12565f098bd03e9da73e3 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 6 Dec 2019 12:42:27 -0700 Subject: [PATCH 3/8] --- Empresas/80/Formatos/SolicitudVacaciones.docx | Bin 0 -> 42231 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Empresas/80/Formatos/SolicitudVacaciones.docx diff --git a/Empresas/80/Formatos/SolicitudVacaciones.docx b/Empresas/80/Formatos/SolicitudVacaciones.docx new file mode 100644 index 0000000000000000000000000000000000000000..6ada065ec34ad87e693f9d0a6ed3dc42414317c2 GIT binary patch literal 42231 zcmeFY1Cu5}yDj>*-?nW{_q1)>nzn6o+MM>ZZA{y?ZQHi(+uy!%ZtNTT{DX6{A~P$h zvMQpg)_M|am4Y-FI2r&F00aO4!~hNS+RJbd06+~206+x*LA8YKY@JPPo%NL6?M<9? z=ziN+6Xk(}Qsw|azuW)c^ndUhs81Y|>tjF?eUf+=-lvsXuN45YUIYxGP$}|tH&B#_ zzQ^!-fAGc^Rv=lX3yu6xVsg6TC6JEqF*hkS1|haIb6TA8paG%IoNXLm8QLfBFq0H9 zNG#6ylTkrjJ9GVN$)MpG3SD9|z5+MHZ%=Rl7a5v*r(dGftPehGMcIOR`zxW_&a;D? zE>pBR#qgphIFN#}zrAFF8?rD;;GqouIZ8Fzo zdBEnpLW{V&Gz!ag(rf}ms4M-a00(LIZGU|L9k6k+0!g9`HSOpiet9_~{NJR5J>M)H zf-lFTt;^zR0>U|Q4xjhjn@DZvvzLOM3B+mBiX*{HYQ!FHI@pfaofe+YH&MU7zyJ#W zKMJR+_&|Jq<8tSlp|IZ+)^jwmcA}^IPx*hT`+qQB|J$RN$H_{AF(L(D1$+^YcW|#! zk<4!BiX6)te}D)xz4@mj#+5XFZBmBQ%{PP)FuNa(FbglHci=Bj53&4K>#3y_teM+{ zt1R1YaaUgtkP@1lKE_wG-v&>Ay*2#kCzZ67`ap^sMN6hS7VX71oaNP$`h$3WD|?nt zJ~FgyK=dJmzgJ3Q$M9(?z-v%iQ9@)pfnI!w^o-VMwj_DdaLDIiY zXfixk9BeqGSP^Q-O97I%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AUDILLO ESPARZA Date: Fri, 6 Dec 2019 12:42:48 -0700 Subject: [PATCH 4/8] --- RH/Personal.aspx.vb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 9cfdf863e..031648ed0 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -4531,8 +4531,9 @@ Partial Class RH_Personal Response.ContentType = "application/force-download" Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicitud_Vacaciones_" & Now.ToString("yyyyMMddhhmmss") & ".pdf") Response.BinaryWrite(bytesInStream) - Response.End() - + Response.End() + Else + Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.") End If End Sub From b0e65c6e3563d92f2f03c87e5a4c7fd0a26653d7 Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 6 Dec 2019 16:37:15 -0700 Subject: [PATCH 5/8] nominas juntas con janeth --- App_Code/ClsInventarios.vb | 6 +++--- Nomina/Nomina2.aspx.cs | 4 ++-- RH/Personal.aspx.vb | 7 ++++--- RH/RepUniformesResguardo.aspx | 33 ++++++++++++++++++++++++++++---- RH/RepUniformesResguardo.aspx.vb | 14 +++++++++++++- 5 files changed, 51 insertions(+), 13 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 01e316e08..b9c5da30d 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -4493,7 +4493,7 @@ Public Class ClsInventarios #Region "INVENTARIOS - REPORTE UNIFORMES RESGUARDO" - Public Function GetResguardoUniformesRep(CveEmpresa As Integer, Optional CvePersonal As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveDepartamento As Integer = -1) As Boolean + Public Function GetResguardoUniformesRep(CveEmpresa As Integer, Optional CvePersonal As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional CveDepartamento As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Inv_ResguardoUniformesRep") @@ -4502,8 +4502,8 @@ Public Class ClsInventarios .Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveDepartamento", SqlDbType.Int).Value = CveDepartamento - - + .Add("@FechaInicio", SqlDbType.VarChar).Value = FechaInicio + .Add("@FechaFin", SqlDbType.VarChar).Value = FechaFin End With Try SqlAdapter.Fill(Data) diff --git a/Nomina/Nomina2.aspx.cs b/Nomina/Nomina2.aspx.cs index 679f76b00..8bdc089db 100644 --- a/Nomina/Nomina2.aspx.cs +++ b/Nomina/Nomina2.aspx.cs @@ -1200,8 +1200,8 @@ public partial class Nomina_Nomina2 : ClsPaginas //parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", "")); //parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", "")); //parametros.Add(new Microsoft.Reporting.WebForms.ReportParameter("", "")); - - ImprimirPDF("D:/ADSistemas/Proyectos/SIG/WEB/Empresas/Grales/Formatos/SobreRecibo.rdlc", lrds, parametros, "SobreRecibo.pdf", "PDF", null); + ; + ImprimirPDF(System.IO.Path.Combine(Server.MapPath("/"), "Empresas/Grales/Formatos/SobreRecibo.rdlc"), lrds, parametros, "SobreRecibo", "PDF", null); } protected void BtnGuardarInfornavit_Click(object sender, EventArgs e) { diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index 031648ed0..acfc103cb 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -4533,7 +4533,7 @@ Partial Class RH_Personal Response.BinaryWrite(bytesInStream) Response.End() Else - Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.") + Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia) End If End Sub @@ -4582,8 +4582,9 @@ Partial Class RH_Personal Response.ContentType = "application/force-download" Response.AddHeader("content-disposition", "attachment; filename=" & CvePersonal & "_Solicituddepermiso_" & Now.ToString("yyyyMMddhhmmss") & ".pdf") Response.BinaryWrite(bytesInStream) - Response.End() - + Response.End() + Else + Alert("No se encontro el Formato, favor de revisarlo con soporte tecnico.", TipoMensaje.MsgAdvertencia) End If End Sub diff --git a/RH/RepUniformesResguardo.aspx b/RH/RepUniformesResguardo.aspx index d9240e9f2..3d84a60b2 100644 --- a/RH/RepUniformesResguardo.aspx +++ b/RH/RepUniformesResguardo.aspx @@ -25,9 +25,9 @@
    -
    +
    - + <%-- --%>
    @@ -59,8 +59,33 @@
    - diff --git a/RH/RepUniformesResguardo.aspx.vb b/RH/RepUniformesResguardo.aspx.vb index 60ff1b216..d121d3035 100644 --- a/RH/RepUniformesResguardo.aspx.vb +++ b/RH/RepUniformesResguardo.aspx.vb @@ -51,7 +51,19 @@ Partial Class RH_RepUniformesResguardo Dim ObjInv As New ClsInventarios - If ObjInv.GetResguardoUniformesRep(UsuarioActual.CveEmpresa, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, CveDepartamento:=DdlDepartamento.SelectedValue.ToEntero) Then + Dim strFechaInicio As String = "-1" + Dim strFechaFin As String = "-1" + + Dim dfecha As Date = TxtFechaInicio.Text.ToDate() + If dfecha.Year > 1900 Then + strFechaInicio = dfecha.ToString("yyyy/MM/dd") + End If + + dfecha = TxtFechaFin.Text.ToDate() + If dfecha.Year > 1900 Then + strFechaFin = dfecha.ToString("yyyy/MM/dd") + End If + If ObjInv.GetResguardoUniformesRep(UsuarioActual.CveEmpresa, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, CveDepartamento:=DdlDepartamento.SelectedValue.ToEntero, FechaInicio:=strFechaInicio, FechaFin:=strFechaFin) Then GvUniformes.DataSource = ObjInv.DtResultados DTDatos = ObjInv.DtResultados Else From 80a759638cdc90970d852b667a44f2e134197fbd Mon Sep 17 00:00:00 2001 From: rmolina Date: Fri, 6 Dec 2019 19:13:13 -0700 Subject: [PATCH 6/8] -cambios reportes de ventas. parametro de condiciones de ago pv. ajustes de usados clsinventarois. parametro de tipoalmacen --- App_Code/ClsInventarios.vb | 5 ++-- Inventarios/RecepcionEntrega.aspx.vb | 24 +++++++++---------- Ventas/PV.aspx.vb | 35 +++++++++++++++------------- Ventas/RepVentaDetalle.aspx.vb | 8 ++++--- Ventas/RepVentas.aspx.vb | 1 + 5 files changed, 40 insertions(+), 33 deletions(-) diff --git a/App_Code/ClsInventarios.vb b/App_Code/ClsInventarios.vb index 649c5f07f..456a2cf9b 100644 --- a/App_Code/ClsInventarios.vb +++ b/App_Code/ClsInventarios.vb @@ -969,7 +969,7 @@ Public Class ClsInventarios .Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda '.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing) - .Add("@FechaMovto", SqlDbType.DateTime).Value = $"{FechaMovto.ToShortDateString} {Now.Hour}:{Now.Minute}:{Now.Second}".ToDateTime + .Add("@FechaMovto", SqlDbType.DateTime).Value = String.Format("{0} {1}:{2}:{3}", FechaMovto.ToShortDateString, Now.Hour, Now.Minute, Now.Second).ToDateTime .Add("@Folio", SqlDbType.Int).Value = tFolio .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa @@ -3290,7 +3290,7 @@ Public Class ClsInventarios #End Region #Region " INVENTARIOS - COSTO PS " - Public Function GetCostoPS(CvePS As Integer, Cantidad As Double, CveAlmacen As Integer, SerieLote As String, FechaFin As Date, Optional CveSubProyecto As Integer = -1) As Decimal + Public Function GetCostoPS(CvePS As Integer, Cantidad As Double, CveAlmacen As Integer, SerieLote As String, FechaFin As Date, Optional CveSubProyecto As Integer = -1, Optional CveTipoAlmacen As Integer = 1) As Decimal Dim Retorno As Decimal = -1D DataAdapter("PA_Inv_PSCostoGet") @@ -3301,6 +3301,7 @@ Public Class ClsInventarios .Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote .Add("@FechaFin", SqlDbType.Date).Value = FechaFin .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen .Add("@Costo", SqlDbType.Money).Direction = ParameterDirection.Output End With diff --git a/Inventarios/RecepcionEntrega.aspx.vb b/Inventarios/RecepcionEntrega.aspx.vb index bf4cb291b..1ab6dbd11 100644 --- a/Inventarios/RecepcionEntrega.aspx.vb +++ b/Inventarios/RecepcionEntrega.aspx.vb @@ -1659,7 +1659,7 @@ Partial Class Inventarios_RecepcionEntrega If Not CveMovimientoSalida > 0 Then CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString.ToEntero, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), - CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, Modulo:="RE/G") + CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, Modulo:="RE/G1") FolioSalida = ObjInventario.Folio If Not CveMovimientoSalida > 0 Then @@ -1710,7 +1710,7 @@ Partial Class Inventarios_RecepcionEntrega If Not CveMovimientoSalida > 0 Then CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString.ToEntero, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), - CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, Modulo:="RE/G") + CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, Modulo:="RE/G2") FolioSalida = ObjInventario.Folio If Not CveMovimientoSalida > 0 Then @@ -1759,7 +1759,7 @@ Partial Class Inventarios_RecepcionEntrega If Not CveMovimientoSalida > 0 Then CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, - CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, Modulo:="RE/G") + CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, Modulo:="RE/G3") FolioSalida = ObjInventario.Folio If Not CveMovimientoSalida > 0 Then @@ -1808,7 +1808,7 @@ Partial Class Inventarios_RecepcionEntrega CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, - Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G") + Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4") FolioEntrada = ObjInventario.Folio If Not CveMovimientoEntradaApartado > 0 Then @@ -1849,7 +1849,7 @@ Partial Class Inventarios_RecepcionEntrega End If If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then - CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 2, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="RE/G") + CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 2, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="RE/G5") FolioGarantia = ObjInventario.Folio For Each RowGarantia As DataRow In DtGarantias.Rows @@ -1932,7 +1932,7 @@ Partial Class Inventarios_RecepcionEntrega If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, - Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="RE/G") + Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="RE/G6") FolioVirtual = ObjInventario.Folio If CveMovimientoVirtual > 0 Then @@ -1985,7 +1985,7 @@ Partial Class Inventarios_RecepcionEntrega End If CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, - CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Modulo:="RE/G") + CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Modulo:="RE/G7") Folio = ObjInventario.Folio 'SALIDA DE ALMACEN - SALIDA POR TRASPASO CUANDO ES REMISION - DEVOLUCION (SI ES TRASPASO Y TIENE CONTRATO NO HACE DEVOLUCIóN) @@ -2076,7 +2076,7 @@ Partial Class Inventarios_RecepcionEntrega If Not ErrorMovInv Then If CveAlmacenTraspasoDestino > 0 AndAlso Not (TipoMovimiento = 2 And TipoDocto = "Dev" And EsDevolucionVenta = 1) Then ' TRASPASO CUANDO ES REMISION CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, - CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, Modulo:="RE/G") + CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, Modulo:="RE/G8") FolioEntrada = ObjInventario.Folio If CveMovimientoEntrada <= 0 Then @@ -2198,7 +2198,7 @@ Partial Class Inventarios_RecepcionEntrega If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString.ToEntero Then CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, - CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="RE/G") + CveAlmacenDestino:=Dr("CveAlmacen").ToString.ToEntero, Modulo:="RE/G9") FolioSalida = ObjInventario.Folio CveAlmacenApartado = Dr("CveAlmacen").ToString.ToEntero @@ -2230,7 +2230,7 @@ Partial Class Inventarios_RecepcionEntrega CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString.ToEntero, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero, CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, - CveCliente:=CveCliente, Modulo:="RE/G") + CveCliente:=CveCliente, Modulo:="RE/G10") FolioEntrada = ObjInventario.Folio If Not CveMovimientoEntradaApartado > 0 Then @@ -2469,7 +2469,7 @@ Partial Class Inventarios_RecepcionEntrega If Not ErrorMovInv Then ConceptoMovimiento = 26 CveMovimientoSalida = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:="", - CveContrato:=-1, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/G") + CveContrato:=-1, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT") FolioSalida = ObjInventario.Folio If CveMovimientoSalida > 0 Then Dim CantidadPendiente As Decimal = 0 @@ -2515,7 +2515,7 @@ Partial Class Inventarios_RecepcionEntrega Almacen2 = If(ChkTransitorio.Checked, DdlAlmacenTransitorio.SelectedValue.ToEntero, CveAlmacenTraspasoDestino) CveMovimientoEntrada = ObjInventario.AddMovimiento(Almacen2, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:="", CveContrato:=CveContrato, CveMovimientoRelacionado:=CveMovimientoSalida, CveAlmacenDestino:=CveAlmacenTraspasoDestino, - Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/G") + Recibio:=If(ChkTransitorio.Checked, TxtResponsable.Text.Trim, ""), Modulo:="RE/GT1") FolioEntrada = ObjInventario.Folio If CveMovimientoEntrada > 0 Then If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index dbd45512d..d283cc000 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5215,9 +5215,9 @@ Partial Class PV If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then Dim CveMarca As Integer = -1 - If GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows.Count > 0 Then - CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0)("CveMarca").ToString.ToEntero - End If + + CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero + Dim ObjAcum As New ClsAcumuladores If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then If ObjAcum.DtResultados.Rows.Count > 0 Then @@ -5230,24 +5230,24 @@ Partial Class PV Dim CveTamaño As Integer = 0 If DdlPSAjuste.SelectedValue.ToEntero > 0 Then - Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).Rows(0) + Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("") If Dr IsNot Nothing Then CargoGarantia = Dr("Cargo").ToString.ToDecimal End If End If If DdlPS.SelectedValue.ToEntero > 0 Then - Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero).Rows(0) + Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero).FiltroPrimero("") If Dr IsNot Nothing Then CveTamaño = Dr("CveTamaño").ToString.ToEntero End If End If - If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows(0) IsNot Nothing AndAlso GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows.Count > 0 Then - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}").Rows(0) - If DrCargo IsNot Nothing Then - CargoVendido = DrCargo("Cargo").ToString.ToDecimal - End If + Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}") + If DrCargo IsNot Nothing Then + + CargoVendido = DrCargo("Cargo").ToString.ToDecimal + End If 'el ajuste no puede ser mayor al precio de lo vendido de nuevo @@ -5259,6 +5259,10 @@ Partial Class PV TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}." TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero + Else + 'cuando no está registrada, no da ajuste + TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo" + TxtImporteAjuste.Text = "0.00" End If End If ObjAcum.Dispose() @@ -5340,14 +5344,13 @@ Partial Class PV If TmpDT.Select($"Consec={ConsecutivoVenta}").Length > 0 Then Dim Dr As DataRow = TmpDT.Select($"Consec={ConsecutivoVenta}")(0) Dim CvePSCargo As Integer = -1 - If GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").Rows(0) IsNot Nothing AndAlso GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").Rows.Count > 0 Then - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño")}").Rows(0) - If DrCargo IsNot Nothing Then - CvePSCargo = DrCargo("CvePSCargo").ToString.ToEntero - CargoActual = DrCargo("Cargo").ToString.ToDouble - End If + Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {Dr("CveTamaño").ToString.ToEntero}").FiltroPrimero("") + If DrCargo IsNot Nothing Then + CvePSCargo = DrCargo("CvePSCargo").ToString.ToEntero + CargoActual = DrCargo("Cargo").ToString.ToDouble End If + Dr("Descuento") = Math.Round(TxtImporteAjuste.Text.ToDouble, NumeroDecimales) '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 diff --git a/Ventas/RepVentaDetalle.aspx.vb b/Ventas/RepVentaDetalle.aspx.vb index 7a770f5d0..64acd3894 100644 --- a/Ventas/RepVentaDetalle.aspx.vb +++ b/Ventas/RepVentaDetalle.aspx.vb @@ -942,7 +942,7 @@ Partial Class RepVentaDetalle Private Sub GenerarPDF(Optional Formato As String = "PDF") If DtVentas IsNot Nothing Then - Dim Grupo, CveCliente, CveSucursal, CveSucursalEjec, Vendedor, CveUsuario, CveEstatusFactura, TipoDocto As String + Dim Grupo, CveCliente, CveSucursal, CveSucursalEjec, Vendedor, CveUsuario, CveEstatusFactura, TipoDocto, CondicionesPago As String Dim FechaIEjec, FechaFEjec As String 'Dim CveSubProyecto As Integer @@ -963,7 +963,9 @@ Partial Class RepVentaDetalle Vendedor = If(DdlVendedor.GetSelectedText = "", "", $" Vendedor: {DdlVendedor.GetSelectedText}") CveUsuario = If(DdlUsuario.SelectedValue = "-1", "", $" Usuario: {DdlUsuario.SelectedItem.Text}") CveEstatusFactura = If(DdlEstatus.GetSelectedText = "", "", $" Estatus: {DdlEstatus.GetSelectedText}") - + CondicionesPago = If(DdlCondicionesPago.selectedValue = "-1", "", String.Format(" Condiciones Pago: {0}", DdlCondicionesPago.SelectedItem.Text)) + + Dim RutaFormato = String.Format("{0}Formatos\RepVentaDetalle.rdlc", UsuarioActual.Empresa.Ruta) Dim Archivo As New System.IO.FileInfo(RutaFormato) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) @@ -977,7 +979,7 @@ Partial Class RepVentaDetalle params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) params.Add(New ReportParameter("TipoDocto", TipoDocto)) - params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo} {TipoDocto} {FechaIn} {FechaFn} {FechaIEjec} {FechaFEjec} {CveCliente} {CveSucursal} {CveSucursalEjec} {Vendedor} {CveUsuario} {CveEstatusFactura} ")) + params.Add(New ReportParameter("AgrupadoPor", $"Agrupado Por: {Grupo} {TipoDocto} {FechaIn} {FechaFn} {FechaIEjec} {FechaFEjec} {CveCliente} {CveSucursal} {CveSucursalEjec} {Vendedor} {CveUsuario} {CveEstatusFactura} {CondicionesPago} ")) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", logouri)) Else diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index 09a8632a8..56346f6fd 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -550,6 +550,7 @@ Partial Class Ventas_RepVentas If TxtFechaFEjec.Text <> "" Then StrFiltro.AppendFormat(" Fecha I. Ejecución: {0}", TxtFechaFEjec.Text.ToDate.ToShortDateString) If DdlUsuario.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Usuario: {0}", DdlUsuario.SelectedItem.Text) If DdlClienteClasificacion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Clasificación Cliente: {0}", DdlClienteClasificacion.SelectedItem.Text) + If DdlCondicionesPago.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Condiciones Pago: {0}", DdlCondicionesPago.SelectedItem.Text) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) From 1163c6d1aad792ee05f559a19ae28b7cfaeb9172 Mon Sep 17 00:00:00 2001 From: rmolina Date: Fri, 6 Dec 2019 19:20:17 -0700 Subject: [PATCH 7/8] try --- Ventas/PV.aspx.vb | 80 +++++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index d283cc000..82bfc6d9f 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -5212,61 +5212,67 @@ Partial Class PV 'Alert("No se ha especificado producto a entregar") Exit Sub End If + Try - If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then - Dim CveMarca As Integer = -1 - CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero + If DdlTipoUso.SelectedValue.ToEntero > 0 AndAlso DdlPSAjuste.SelectedValue.ToEntero > 0 AndAlso TxtMesesUso.Text <> "" AndAlso DdlPS.SelectedValue.ToEntero > 0 Then + Dim CveMarca As Integer = -1 - Dim ObjAcum As New ClsAcumuladores - If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then - If ObjAcum.DtResultados.Rows.Count > 0 Then - TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString + CveMarca = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimeroValor("CveMarca", "").ToEntero - TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero + Dim ObjAcum As New ClsAcumuladores + If ObjAcum.GarantiasMesesGet(-1, UsuarioActual.CveEmpresa, CveMarca, DdlTipoUso.SelectedValue.ToEntero, TxtMesesUso.Text.ToEntero) Then + If ObjAcum.DtResultados.Rows.Count > 0 Then + TxtPorcentajeAjuste.Text = (ObjAcum.DtResultados.Rows(0)("Valor").ToString.ToDouble / 100).ToString - Dim CargoVendido As Decimal = 0 - Dim CargoGarantia As Decimal = 0 - Dim CveTamaño As Integer = 0 + TxtImporteAjuste.Text = (TxtPorcentajeAjuste.Text.ToDecimal * TxtPUFactura.Text.ToDecimal).FormatoNumero - If DdlPSAjuste.SelectedValue.ToEntero > 0 Then - Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("") - If Dr IsNot Nothing Then - CargoGarantia = Dr("Cargo").ToString.ToDecimal + Dim CargoVendido As Decimal = 0 + Dim CargoGarantia As Decimal = 0 + Dim CveTamaño As Integer = 0 + + If DdlPSAjuste.SelectedValue.ToEntero > 0 Then + Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPSAjuste.SelectedValue.ToEntero).FiltroPrimero("") + If Dr IsNot Nothing Then + CargoGarantia = Dr("Cargo").ToString.ToDecimal + End If End If - End If - If DdlPS.SelectedValue.ToEntero > 0 Then - Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero).FiltroPrimero("") - If Dr IsNot Nothing Then - CveTamaño = Dr("CveTamaño").ToString.ToEntero + If DdlPS.SelectedValue.ToEntero > 0 Then + Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero).FiltroPrimero("") + If Dr IsNot Nothing Then + CveTamaño = Dr("CveTamaño").ToString.ToEntero + End If End If - End If - Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}") - If DrCargo IsNot Nothing Then + Dim DrCargo As DataRow = GlobalDTAcumTamaños.FiltroPrimero($"CveEmpresa = {UsuarioActual.CveEmpresa} AND CveTamaño = {CveTamaño}") + If DrCargo IsNot Nothing Then - CargoVendido = DrCargo("Cargo").ToString.ToDecimal + CargoVendido = DrCargo("Cargo").ToString.ToDecimal - End If + End If - 'el ajuste no puede ser mayor al precio de lo vendido de nuevo - If (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))) < 0 Then + 'el ajuste no puede ser mayor al precio de lo vendido de nuevo + If (TxtPrecio.Text.ToDouble - ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia))) < 0 Then + TxtImporteAjuste.Text = "0.00" + CargoGarantia = CargoVendido + End If + TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}." + TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero + + Else + 'cuando no está registrada, no da ajuste + TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo" TxtImporteAjuste.Text = "0.00" - CargoGarantia = CargoVendido End If - TxtImporteAjuste.ToolTip = $"La diferencia de ajuste fue: {(TxtPrecio.Text.ToDouble - TxtImporteAjuste.Text.ToDouble).FormatoNumero()}. La diferencia de tamaños fue: {(CargoVendido - CargoGarantia).FormatoNumero}." - TxtImporteAjuste.Text = ((TxtPUFactura.Text.ToDouble - TxtImporteAjuste.Text.ToDouble) - (CargoVendido - CargoGarantia)).FormatoNumero - - Else - 'cuando no está registrada, no da ajuste - TxtImporteAjuste.ToolTip = "El producto no tiene ajuste en ese periodo" - TxtImporteAjuste.Text = "0.00" End If + ObjAcum.Dispose() End If - ObjAcum.Dispose() - End If + Catch ex As Exception + OnError("Ocurrió un error al recalcular el costo", ex) + End Try + UpAjuste.Update() End Sub From 27658824499b4de7d703272f26fe72a2231f991e Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Fri, 6 Dec 2019 19:53:07 -0700 Subject: [PATCH 8/8] --- Nomina/Nomina2.aspx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Nomina/Nomina2.aspx b/Nomina/Nomina2.aspx index 29bbe7a6f..a07420312 100644 --- a/Nomina/Nomina2.aspx +++ b/Nomina/Nomina2.aspx @@ -698,7 +698,6 @@
    -
    @@ -781,6 +780,11 @@
    + + + + +
    @@ -24,58 +70,42 @@ Datos del Concepto - + + + - - - - - +
    Concepto: Tipo: - - - - Codigo:
    Tipo: - +
    + +
    Datos del Periodo - - + + + - + - - - - - + + + + +
    Ejercicio:
    - - - - - - -
    Tipo Periodo: - - -
    Periodo: - - -