Nominas.rdlc agregar Version CFDI y uso cfdi como parametro

This commit is contained in:
Oscar Irigoyen
2023-07-08 11:40:10 -07:00
parent 17eee67e49
commit b6214a10d6
6 changed files with 1566 additions and 1809 deletions

View File

@@ -6702,11 +6702,17 @@ Public Class ClsPaginas
Dim ImgCBB As String
Dim RutaFormato As String = String.Format("{0}Formatos\Nomina.rdlc", RutaEmpresa)
Dim RutaFormatoDefault As String = String.Format("Empresas\Grales\Formatos\Nomina.rdlc")
Dim CFDIVersion As String = ""
Dim UsoCFDI As String = ""
'SI ESTA TIMBRADA - CON XML
If System.IO.File.Exists(PathXML) Then
Dim XmlDoc As New System.Xml.XmlDocument
'XmlDoc.Load(Ruta & "XML\\Nomina\NOM A-3845.xml")
XmlDoc.Load(PathXML)
If ValorNodoXML(XmlDoc.DocumentElement, "version").Contiene("3.3", "4.0") Then
FechaEmision = XmlDoc.DocumentElement.Attributes("Fecha").InnerText.ToDate
NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("NoCertificado").InnerText
@@ -6733,6 +6739,27 @@ Public Class ClsPaginas
Next
End If
Try
CFDIVersion = ValorNodoXML(XmlDoc.DocumentElement, "version")
Dim nsManager As New XmlNamespaceManager(XmlDoc.NameTable)
nsManager.AddNamespace("cfdi", If(CFDIVersion = "4.0", "http://www.sat.gob.mx/cfd/4", "http://www.sat.gob.mx/cfd/3"))
Dim receptorNode As XmlNode = XmlDoc.SelectSingleNode("/cfdi:comprobante/cfdi:emisor/cfdi:receptor", nsManager)
If receptorNode IsNot Nothing Then
UsoCFDI = ValorNodoXML(receptorNode, "usocfdi")
UsoCFDI = GlobalDTSATUsosCFDI(-1, "-1").FiltroPrimeroValor("UsoCFDIDescripcion", $" UsoCFDI = '{UsoCFDI}' ")
End If
Catch ex As Exception
End Try
'SIN TIMBRAR - SIN XML
Else
FolioFiscal = "Sin Timbrar"
@@ -6860,6 +6887,9 @@ Public Class ClsPaginas
RptParametro.Add(New ReportParameter("CadenaOriginal", CadenaOriginalCFD))
RptParametro.Add(New ReportParameter("QR", ImgCBB.ToString))
RptParametro.Add(New ReportParameter("CFDIVersion", CFDIVersion))
RptParametro.Add(New ReportParameter("UsoCFDI", UsoCFDI))
Dim LSRds As New List(Of ReportDataSource)
Dim rds2 = New ReportDataSource()

View File

@@ -2858,7 +2858,15 @@ Lugar de expedición: 83220 Hermosillo</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Versión del comprobante: 4.0</Value>
<Value>Versión del comprobante: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!CFDIVersion.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -2929,7 +2937,15 @@ Lugar de expedición: 83220 Hermosillo</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Usos del CFDI "CN01" Nómina</Value>
<Value>Usos del CFDI: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!UsoCFDI.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -4704,7 +4720,6 @@ Lugar de expedición: 83220 Hermosillo</Value>
</Style>
</Textbox>
<ColSpan>2</ColSpan>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell />
@@ -5629,6 +5644,18 @@ Lugar de expedición: 83220 Hermosillo</Value>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="CFDIVersion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="UsoCFDI">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="logo">

View File

@@ -2852,7 +2852,15 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Versión del comprobante: 3.3</Value>
<Value>Versión del comprobante: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!CFDIVersion.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -2923,7 +2931,15 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Usos del CFDI "P01"(Por definir)</Value>
<Value>Usos del CFDI: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!UsoCFDI.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -5874,6 +5890,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="CFDIVersion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="UsoCFDI">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="logo">

View File

@@ -2795,6 +2795,7 @@
</Style>
</Textbox>
<ColSpan>2</ColSpan>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell />
@@ -2852,7 +2853,15 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Versión del comprobante: 3.3</Value>
<Value>Versión del comprobante: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!CFDIVersion.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -2923,7 +2932,15 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Usos del CFDI "P01"(Por definir)</Value>
<Value>Usos del CFDI: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!UsoCFDI.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -5874,6 +5891,18 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="CFDIVersion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="UsoCFDI">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="logo">

View File

@@ -656,7 +656,7 @@
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DsOC</DataSetName>
<Top>7.70215cm</Top>
<Top>7.96673cm</Top>
<Left>0.15979cm</Left>
<Height>2.05138cm</Height>
<Width>10.0953cm</Width>
@@ -1234,7 +1234,7 @@
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName>
<Top>7.70435cm</Top>
<Top>7.96893cm</Top>
<Left>10.2551cm</Left>
<Height>2.05606cm</Height>
<Width>9.79494cm</Width>
@@ -1333,7 +1333,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
<rd:DefaultName>Textbox2</rd:DefaultName>
<Top>0.12976cm</Top>
<Left>4.80311cm</Left>
<Height>2.24428cm</Height>
<Height>2.1513cm</Height>
<Width>8.10317cm</Width>
<ZIndex>2</ZIndex>
<Style>
@@ -1964,9 +1964,9 @@ Lugar de expedición: 83220 Hermosillo</Value>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DsOC</DataSetName>
<Top>9.86624cm</Top>
<Top>10.13082cm</Top>
<Left>0.15979cm</Left>
<Height>1.71208cm</Height>
<Height>1.71209cm</Height>
<Width>19.89025cm</Width>
<ZIndex>3</ZIndex>
<Style>
@@ -1979,7 +1979,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
<Source>Embedded</Source>
<Value>Logo</Value>
<Sizing>FitProportional</Sizing>
<Top>0.12976cm</Top>
<Top>0.03816cm</Top>
<Left>0.29576cm</Left>
<Height>2.1513cm</Height>
<Width>3.93798cm</Width>
@@ -2525,7 +2525,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DsOC</DataSetName>
<Top>17.07534cm</Top>
<Top>17.23409cm</Top>
<Left>0.15979cm</Left>
<Height>1.12062cm</Height>
<Width>19.89024cm</Width>
@@ -2541,7 +2541,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
<Value>=First(Fields!ImagenByte.Value, "dsImagenes")</Value>
<MIMEType>image/png</MIMEType>
<Sizing>FitProportional</Sizing>
<Top>4.64173in</Top>
<Top>4.70423in</Top>
<Left>0.068in</Left>
<Height>1.30194in</Height>
<Width>1.48366in</Width>
@@ -2858,7 +2858,15 @@ Lugar de expedición: 83220 Hermosillo</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Versión del comprobante: 3.3</Value>
<Value>Versión del comprobante: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!CFDIVersion.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -2929,7 +2937,15 @@ Lugar de expedición: 83220 Hermosillo</Value>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Usos del CFDI "P01"(Por definir)</Value>
<Value>Usos del CFDI: </Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value>=Parameters!UsoCFDI.Value</Value>
<Style>
<FontFamily>calibri</FontFamily>
<FontSize>9pt</FontSize>
@@ -2979,7 +2995,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>dsImagenes</DataSetName>
<Top>11.78999cm</Top>
<Top>11.94874cm</Top>
<Left>4.13053cm</Left>
<Height>5.21479cm</Height>
<Width>15.94535cm</Width>
@@ -3743,6 +3759,236 @@ Lugar de expedición: 83220 Hermosillo</Value>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.41479cm</Height>
<TablixCells>
<TablixCell>
<CellContents>
<Textbox Name="Textbox5">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Centro de costos</Value>
<Style>
<FontFamily>arial</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox7">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!SubProyecto.Value</Value>
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox7</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<ColSpan>2</ColSpan>
</CellContents>
</TablixCell>
<TablixCell />
<TablixCell>
<CellContents>
<Textbox Name="Textbox16">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>arial</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox16</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox19">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox19</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox21">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox21</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox22">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontFamily>arial</FontFamily>
<FontSize>7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox22</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox23">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value />
<Style>
<FontSize>7pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox23</rd:DefaultName>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
</TablixCells>
</TablixRow>
<TablixRow>
<Height>0.49417cm</Height>
<TablixCells>
@@ -5279,13 +5525,14 @@ Lugar de expedición: 83220 Hermosillo</Value>
<TablixMember />
<TablixMember />
<TablixMember />
<TablixMember />
</TablixMembers>
</TablixRowHierarchy>
<DataSetName>DsOC</DataSetName>
<Top>2.51578cm</Top>
<Top>2.33057cm</Top>
<Left>0.15979cm</Left>
<Height>5.0304cm</Height>
<Width>19.84967cm</Width>
<Height>5.44519cm</Height>
<Width>19.84968cm</Width>
<ZIndex>9</ZIndex>
<Style>
<Border>
@@ -5294,7 +5541,7 @@ Lugar de expedición: 83220 Hermosillo</Value>
</Style>
</Tablix>
</ReportItems>
<Height>18.41425cm</Height>
<Height>18.46717cm</Height>
<Style />
</Body>
<Width>20.51495cm</Width>
@@ -5628,6 +5875,24 @@ Lugar de expedición: 83220 Hermosillo</Value>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="SubProyecto">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="CFDIVersion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="UsoCFDI">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<EmbeddedImages>
<EmbeddedImage Name="logo">

File diff suppressed because it is too large Load Diff