Last active
June 16, 2021 06:48
-
-
Save sergio/cc40394a5c4982990ca7cacb0f7e77a8 to your computer and use it in GitHub Desktop.
[Sumarize CFDIs] Extract CSV summary from CFDI xmls in folder #PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment