{"_id":"@deltazero/isdoc","_rev":"2-4e83f04acaab3cfd2c07966a9542cd4d","name":"@deltazero/isdoc","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@deltazero/isdoc","version":"0.1.0","description":"Create ISDOC - Czechia's standard invoice format for data exchange","author":{"name":"ΔO - David Obdržálek","email":"david@deltazero.cz"},"license":"ISC","keywords":["isdoc"],"main":"index.js","types":"index.d.ts","scripts":{"pretest":"tsc","test":"mocha tests","build":"tsc -b","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/deltazero-cz/node-isdoc.git"},"engines":{"node":">=14.0.0"},"dependencies":{"fast-xml-parser":"^4.0.9","xsd-validator":"^1.0.2"},"devDependencies":{"@types/chai":"^4.3.3","@types/mocha":"^9.1.1","@types/node":"^16.0.0","typescript":"latest","chai":"^4.3.6","mocha":"^10.0.0"},"gitHead":"33979ead2d2d39e7cb8db6711833bb248496c2e2","bugs":{"url":"https://github.com/deltazero-cz/node-isdoc/issues"},"homepage":"https://github.com/deltazero-cz/node-isdoc#readme","_id":"@deltazero/isdoc@0.1.0","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-SUhpWE9j7sSqXiyYz36EHPnS5ZDF5uy2UOZ7jG/KKjc6fqsgc85KIBKl28r94nexLmvzyjjeSzcDT+uZvqwNNA==","shasum":"37da78aaef3c64c99a04bc2dfa8190f39206e2d0","tarball":"https://registry.npmjs.org/@deltazero/isdoc/-/isdoc-0.1.0.tgz","fileCount":18,"unpackedSize":276621,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDebcyjztBMRWWl/1Q0/Tgmx+Ul6BEF0ikMBnKh0HR9PAIhAK/joGwDccMkqODZTEzrtW+C2KzUzKl41wi5fO3YBVwg"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH5PtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqJhRAAn9n/fiJljryclFmFTF0RtPi8uXhcTmtOg2CPCAfUzSTmcObq\r\n4fgXsFW/InRDopdCDDq0LFJrOpei7k0d3A3D9MfaPXRwx0vsV2yyTlRmWOnG\r\n5JFgXtsz+4Ku+eD8W1GNM5V3bIZpez99xHuxZ81H3mzkdEYm35YGDzs6UaKE\r\nSoBLr2tX1UM+sayK+SG+UzlfbT+8XuZfgZG+cL9xvonsjtCGChIPJqZWpEXN\r\nPvA1tTSP+4LExmP+7ddyRyryoAGmTHm/P/VMjUnM8BXK1xc+naKwF8AOjl65\r\nO1xe5GHf+YrwNaEk3selZLqM0qXdho6zqcR8d/CqKaeGnABYr9sPMyOgSSir\r\n2iPCSvUfueYrQh3r7BH6CnQNSqEMwHOKTI4I+7HJesHS2D+DctNusIpgtl2d\r\ngJY28npkdHSjb83hyOJAwd5XlXTM2EXdoAOGQBIFDw6sMvyxPMe76mmecs+s\r\neHEo3IukKameEQ9vcnBSvxIZmbMN7ImjhL1/6B8+IeBIjICxaBYtqMAOL5/W\r\nIVeQNyU1ZmSgF7fNgT7TCbZ1G9kvSUT7cmKTRCqjCndAQesduXHNo1lfOpjl\r\nrH4K1VoghlC8cer+a3m3BvFwfLsUARErvud2UnWt5c7/oluU59x6/RtMKtv5\r\n9UUsn2BmgreUB+gZFUl3j1XLjUOHMvWbUQw=\r\n=61cQ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deltazero","email":"david@deltazero.cz"},"directories":{},"maintainers":[{"name":"deltazero","email":"david@deltazero.cz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/isdoc_0.1.0_1663013869468_0.7556255186950545"},"_hasShrinkwrap":false},"0.1.1":{"name":"@deltazero/isdoc","version":"0.1.1","description":"Create ISDOC - Czechia's standard invoice format for data exchange","author":{"name":"ΔO - David Obdržálek","email":"david@deltazero.cz"},"license":"ISC","keywords":["isdoc"],"main":"index.js","types":"index.d.ts","scripts":{"pretest":"tsc","test":"mocha tests","build":"tsc -b","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/deltazero-cz/node-isdoc.git"},"engines":{"node":">=14.0.0"},"dependencies":{"fast-xml-parser":"^4.0.9","xsd-validator":"^1.0.2"},"devDependencies":{"@types/chai":"^4.3.3","@types/mocha":"^9.1.1","@types/node":"^16.0.0","typescript":"latest","chai":"^4.3.6","mocha":"^10.0.0"},"gitHead":"65169606b5f2ae4cca1d1ea321b0f1dc85de7896","bugs":{"url":"https://github.com/deltazero-cz/node-isdoc/issues"},"homepage":"https://github.com/deltazero-cz/node-isdoc#readme","_id":"@deltazero/isdoc@0.1.1","_nodeVersion":"18.9.0","_npmVersion":"8.19.1","dist":{"integrity":"sha512-odf2fhQzGHpc/gFv95m5jtzm2mPrL4K5N7vvwqOpjHNxnsSA98pIkpk3jr71/jyThAMMnwBGiqG1pq8CrxKlyA==","shasum":"fd774925dd7673b08c7f696cc3813ddad0386ba5","tarball":"https://registry.npmjs.org/@deltazero/isdoc/-/isdoc-0.1.1.tgz","fileCount":18,"unpackedSize":276638,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFLX1A4f2zSv0ELKLfHmju31HP+nJl+UmKanML+Hfo1/AiEA6LYyBH1Ht4/Dst4dqw9U3+X5AknOI4/DYU35+9lxHoA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjH5uEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrVQw/9HARCCxGjrPDMNbcH61G3dBSRh7epK2yfIogvDUaeCwSE9Bc4\r\nIKzcK+5ulvX79THUJJftra+3gv/4pFrBe/MOKECVVXZuvWnrzUBATRkXvZ6S\r\nUDuM8WMCry/4WWzrEem6KoAmXvw4N618OfrQdaGmTEipHSSxaFQoJy6aYtLc\r\nEbhLeosOXYvwt0z567pLQRa+lBD19bMGs0xtiC5AOafTkWgbr2jj4d8Mdp57\r\nntTPk0tZXBG2O/aPAasnzzIo1ASZuxP05Zz7tpG5EpClIca3Kdn+fDMfWs2q\r\nYTMHYHSKMQy+ivitgv9bUsUoiP+VB6+NiyAVVKOMVgiQYlGQusXj8GNBayvu\r\nx/G1cFFUtnRNqPgfwaKLaJ1Qt052Yck11lEoZb0xM9IlBGzn0esZEMlUFrxG\r\nNfEfYDS1uWaZuNF9XQzFiF1heXGBw3BkOuLI9LRRiwmeBEsyCtUcmNV0zd7z\r\nFF8zexRtQCyuaw3pU6p4n5V2TnZ3PWWhpTgOTavhTAfgG6SifMoqYWRWl4AI\r\nU/dzn1UdzdAT/f+snfxFcxWCoC8wvKiLVFFWrx0MTgBNusTIaoCETVOfqNhV\r\nA4GI5CYBm2LMhwmoRsS4Gp2/m/Q5yO1Q3geYHcxpCjy8IK0vWgp+t1PFrGtM\r\niJ+aE9rNidAifYK614XLOX4aMAOv8dKtqtw=\r\n=cw/5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"deltazero","email":"david@deltazero.cz"},"directories":{},"maintainers":[{"name":"deltazero","email":"david@deltazero.cz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/isdoc_0.1.1_1663015812032_0.9000320297857514"},"_hasShrinkwrap":false},"0.1.2":{"name":"@deltazero/isdoc","version":"0.1.2","description":"Create ISDOC - Czechia's standard invoice format for data exchange","author":{"name":"ΔO - David Obdržálek","email":"david@deltazero.cz"},"license":"ISC","keywords":["isdoc"],"main":"index.js","types":"index.d.ts","scripts":{"pretest":"tsc","test":"mocha tests","build":"tsc -b","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/deltazero-cz/node-isdoc.git"},"engines":{"node":">=14.0.0"},"dependencies":{"fast-xml-parser":"^4.2.4","xsd-validator":"^1.1.0"},"devDependencies":{"@types/chai":"^4.3.3","@types/mocha":"^9.1.1","@types/node":"^16.0.0","typescript":"latest","chai":"^4.3.6","mocha":"^10.0.0"},"gitHead":"e64b69f347379f18463389242ca0236c6523d9ae","bugs":{"url":"https://github.com/deltazero-cz/node-isdoc/issues"},"homepage":"https://github.com/deltazero-cz/node-isdoc#readme","_id":"@deltazero/isdoc@0.1.2","_nodeVersion":"20.3.0","_npmVersion":"9.7.1","dist":{"integrity":"sha512-IUlSrkz2CqAhNZ36mm2B2VQriAwkMIHRqb/FUccXBeIUkkiC5rTtxBPKPWKa2vD73zMgSWN4jWubKpf8qjG98A==","shasum":"60cbd20021593437765837edf94d83013b31c091","tarball":"https://registry.npmjs.org/@deltazero/isdoc/-/isdoc-0.1.2.tgz","fileCount":18,"unpackedSize":277002,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiWcvAgeb/YPQ+ZFtSjNpwW/IuUZfRfLKc+a7vDzk8CgIgDQcjuqc0xNqWKdTUccjUdTHQosp8ise33LtME5msAVg="}]},"_npmUser":{"name":"deltazero","email":"david@deltazero.cz"},"directories":{},"maintainers":[{"name":"deltazero","email":"david@deltazero.cz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/isdoc_0.1.2_1686599950031_0.17767183519948748"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-12T20:17:49.398Z","0.1.0":"2022-09-12T20:17:49.680Z","modified":"2023-06-12T19:59:10.310Z","0.1.1":"2022-09-12T20:50:12.238Z","0.1.2":"2023-06-12T19:59:10.212Z"},"maintainers":[{"name":"deltazero","email":"david@deltazero.cz"}],"description":"Create ISDOC - Czechia's standard invoice format for data exchange","homepage":"https://github.com/deltazero-cz/node-isdoc#readme","keywords":["isdoc"],"repository":{"type":"git","url":"git+https://github.com/deltazero-cz/node-isdoc.git"},"author":{"name":"ΔO - David Obdržálek","email":"david@deltazero.cz"},"bugs":{"url":"https://github.com/deltazero-cz/node-isdoc/issues"},"license":"ISC","readme":"# ISDOC Node.js library\n\n[ISDOC](https://isdoc.github.io/) is an XML Invoicing Standard for the Czech Republic\n\nThis library provides Node.js API for parsing, modifying or creating\nISDOC invoices. It validates ISDOC invoices agains\n[XSD definition](https://isdoc.github.io/xsd/isdoc-invoice-6.0.2.xsd). \nIt also provides **partial support** for typescript definitions for ISDOC invoices.\n\nCurrently supported ISDOC version is 6.0.2.  \nDefault version of created invoices is downgraded to 6.0.1, due to the\nlack of support for current version by the official [ISDOC Reader](https://www.isdoc.org/).\n\nFor parsing ISDOC from or attaching it to a PDF, see\n[isdoc-pdf](https://github.com/deltazero-cz/node-isdoc-pdf).\n\n### Installation\n\n```shell\nnpm i @deltazero/isdoc\n```\n\n### Usage\n\nParsing existing invoice files\n```js\nimport Invoice from '@deltazero/isdoc'\n\nconst file = await fs.readFile('invoice.isdoc')\nconst invoice = new Invoice(file) // Buffer|string\n\ninvoice.toXML()\n// string <Invoice xmlns=\"http://isdoc.cz/namespace/2013\" version=\"6.0.1\"><DocumentType>1</DocumentType>...</Invoice>\n\ninvoice.toJSON()\n// string { \"DocumentType\": 1, \"ID\": \"2022123456\", IssueDate: \"2022-09-11\", ... }\n\nconsole.log(invoice)\n// Invoice { DocumentType: number, ID: string, IssueDate: Date, ... }\n\nconsole.log(invoice.LegalMonetaryTotal.PayableAmount)\n// number 121\n```\n\nCreating new invoices\n```js\nimport Invoice from '@deltazero/isdoc'\n\nconst invoice = new Invoice({\n  DocumentType: 1,\n    // 1 | 'invoice'                Faktura - daňový doklad\n    // 2 | 'credit note'            Opravný daňový doklad (dobropis)\n    // 3 | 'debit note'             Opravný daňový doklad (vrubopis)\n    // 4 | 'proforma invoice'       Zálohová faktura (nedaňový zálohový list)\n    // 5 | 'advance invoice'        Daňový doklad při přijetí platby (daňový zálohový list)\n    // 6 | 'advance credit note'    Opravný daňový doklad při přijetí platby (dobropis DZL)\n    // 7 | 'simplified'             Zjednodušený daňový doklad\n  ID: '2022123456',\n  IssuingSystem: 'node-isdoc',\n  IssueDate: new Date(),\n  TaxPointDate: new Date(),\n  VATApplicable: true,\n  AccountingSupplierParty: {\n    Party: {\n      PartyIdentification: { ID: '12345678' },\n      PartyName: { Name: 'Test s.r.o.' },\n      PostalAddress: {\n        StreetName: 'Dodavatelská',\n        BuildingNumber: '1',\n        CityName: 'Dodavatelov',\n        PostalZone: '12345',\n        Country: { IdentificationCode: 'CZ', Name: '' }\n      },\n      PartyTaxScheme: {\n        CompanyID: 'CZ12345678',\n        TaxScheme: 'VAT'\n      },\n      Contact: {\n        Telephone: '222111000',\n        ElectronicMail: 'dodavatel@posta.cz'\n      }\n    }\n  },\n  AccountingCustomerParty: {\n    Party: {\n      PartyIdentification: { ID: '12345678' },\n      PartyName: { Name: 'Test s.r.o.' },\n      PostalAddress: {\n        StreetName: 'Dodavatelská',\n        BuildingNumber: '1',\n        CityName: 'Dodavatelov',\n        PostalZone: '12345',\n        Country: { IdentificationCode: 'CZ', Name: '' }\n      },\n      PartyTaxScheme: {\n        CompanyID: 'CZ12345678',\n        TaxScheme: 'VAT'\n      },\n      Contact: {\n        Telephone: '222111000',\n        ElectronicMail: 'dodavatel@posta.cz'\n      }\n    }\n  },\n  InvoiceLines: {\n    InvoiceLine: [\n      {\n        ID: '10001',\n        InvoicedQuantity: 1,\n        LineExtensionAmount: 100,\n        LineExtensionAmountTaxInclusive: 121,\n        LineExtensionTaxAmount: 21,\n        UnitPrice: 100,\n        UnitPriceTaxInclusive: 121,\n        ClassifiedTaxCategory: { \n            Percent: 21, \n            VATCalculationMethod: 0, \n            VATApplicable: true \n        },\n        Item: { Description: 'Zboží 10001' }\n      },\n    ]\n  },\n  TaxTotal: {\n    TaxSubTotal: {\n      TaxableAmount: 100,\n      TaxAmount: 21,\n      TaxInclusiveAmount: 121,\n      AlreadyClaimedTaxableAmount: 0,\n      AlreadyClaimedTaxAmount: 0,\n      AlreadyClaimedTaxInclusiveAmount: 0,\n      DifferenceTaxableAmount: 100,\n      DifferenceTaxAmount: 21,\n      DifferenceTaxInclusiveAmount: 121,\n      TaxCategory: {\n        Percent: 21,\n        VATApplicable: true,\n      }\n    },\n    TaxAmount: 21\n  },\n  LegalMonetaryTotal: {\n    TaxExclusiveAmount: 100,\n    TaxInclusiveAmount: 121,\n    AlreadyClaimedTaxExclusiveAmount: 0,\n    AlreadyClaimedTaxInclusiveAmount: 0,\n    DifferenceTaxExclusiveAmount: 100,\n    DifferenceTaxInclusiveAmount: 121,\n    PayableRoundingAmount: 0,\n    PaidDepositsAmount: 0,\n    PayableAmount: 121\n  },\n  PaymentMeans: {\n    Payment: {\n      PaidAmount: 121,\n      PaymentMeansCode: 42,\n      Details: {\n        PaymentDueDate: new Date(),\n        ID: '43-1234567890',\n        BankCode: '0100',\n        Name: '',\n        IBAN: '',\n        BIC: '',\n        VariableSymbol: 2022123456,\n        ConstantSymbol: '',\n        SpecificSymbol: ''\n      }\n    }\n  }\n})\n\ninvoice.toXML()\n// string <Invoice xmlns=\"http://isdoc.cz/namespace/2013\" version=\"6.0.1\"><DocumentType>1</DocumentType>...</Invoice>\n```\n","readmeFilename":"README.md"}