Skip to content

Instantly share code, notes, and snippets.

@sergio
Last active June 16, 2021 06:48
Show Gist options
  • Select an option

  • Save sergio/cc40394a5c4982990ca7cacb0f7e77a8 to your computer and use it in GitHub Desktop.

Select an option

Save sergio/cc40394a5c4982990ca7cacb0f7e77a8 to your computer and use it in GitHub Desktop.

Revisions

  1. sergio revised this gist Jun 16, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion summary-from-xmls.ps1
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    gci xmls | % { [xml]$x = gc $_; $c = $x.Comprobante; New-Object PSObject -Property @{Folio=$c.Folio;Serie=$c.Serie;Rfc=$c.Receptor.Rfc;UUID=$c.Complemento.TimbreFiscalDigital.UUID;FormaPago=$c.FormaPago;Total=$c.Total;Fecha=$c.Fecha;Tipo=$c.TipoDeComprobante}} | export-csv -Path cfdis.csv
    gci xmls | % { [xml]$x = gc $_; $c = $x.Comprobante; New-Object PSObject -Property @{Folio=$c.Folio;Serie=$c.Serie;RfcEmisor=$c.Emisor.Rfc;RfcReceptor=$c.Receptor.Rfc;UUID=$c.Complemento.TimbreFiscalDigital.UUID;FormaPago=$c.FormaPago;Total=$c.Total;Fecha=$c.Fecha;Tipo=$c.TipoDeComprobante}} | export-csv -Path cfdis.csv
  2. sergio revised this gist Mar 11, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion summary-from-xmls.ps1
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    gci xmls | % { [xml]$x = gc $_; $c = $x.Comprobante; New-Object PSObject -Property @{Folio=$c.Folio;Serie=$c.Serie;Rfc=$c.Receptor.Rfc;UUID=$c.Complemento.TimbreFiscalDigital.UUID;FormaPago=$c.FormaPago;Total=$c.Total,$c.Fecha}} | export-csv -Path cfdis.csv
    gci xmls | % { [xml]$x = gc $_; $c = $x.Comprobante; New-Object PSObject -Property @{Folio=$c.Folio;Serie=$c.Serie;Rfc=$c.Receptor.Rfc;UUID=$c.Complemento.TimbreFiscalDigital.UUID;FormaPago=$c.FormaPago;Total=$c.Total;Fecha=$c.Fecha;Tipo=$c.TipoDeComprobante}} | export-csv -Path cfdis.csv
  3. sergio created this gist Mar 11, 2021.
    1 change: 1 addition & 0 deletions summary-from-xmls.ps1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    gci xmls | % { [xml]$x = gc $_; $c = $x.Comprobante; New-Object PSObject -Property @{Folio=$c.Folio;Serie=$c.Serie;Rfc=$c.Receptor.Rfc;UUID=$c.Complemento.TimbreFiscalDigital.UUID;FormaPago=$c.FormaPago;Total=$c.Total,$c.Fecha}} | export-csv -Path cfdis.csv