npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@coretax-xml/cli

v0.3.0

Published

CLI coretax-xml: ubah Excel/CSV menjadi XML impor Coretax DJP, dan periksa XML sebelum diunggah

Readme

@coretax-xml/cli

npm cli

Ubah template Excel DJP (faktur pajak keluaran, retur faktur pajak masukan, atau bukti potong PPh 21/26) atau CSV sederhana menjadi XML impor Coretax, dan periksa XML sebelum diunggah. Berjalan lokal, tanpa internet. Untuk staf pajak dan konsultan yang tidak menulis kode; developer bisa memakai library @coretax-xml/core langsung.

Pra-rilis (0.x). Output sama dengan converter DJP v1.6 untuk kasus uji, tetapi belum diuji impor di Coretax sungguhan. Bukan produk DJP dan bukan nasihat pajak. XML yang lolos pemeriksaan belum tentu diterima Coretax.

Instalasi

Butuh Node.js 20 atau lebih baru.

npm install -g @coretax-xml/cli
coretax-xml --help

# atau tanpa instalasi
npx @coretax-xml/cli convert penjualan.xlsx

Pemakaian

# Template Excel resmi DJP -> XML di sebelah file Excel-nya. Jenisnya dikenali dari nama sheet:
#   Faktur + DetailFaktur = faktur pajak keluaran; Retur + DetailRetur = retur faktur pajak masukan;
#   DATA + BP21 / DATA + BP26 = bukti potong PPh 21 / 26 (template "BP21 Excel to XML v.4", "BP26 Excel to XML")
coretax-xml convert penjualan.xlsx
coretax-xml convert penjualan.xlsx -o faktur-oktober.xml
coretax-xml convert penjualan.xlsx --maks-per-file 1000   # pecah: penjualan-0001.xml, penjualan-0002.xml, ...

# CSV sederhana: satu baris per item, data faktur atau retur diulang di tiap baris
coretax-xml template faktur-keluaran -o contoh.csv     # atau: retur-masukan, bupot21, bupot26
coretax-xml convert contoh.csv                          # jenisnya dikenali dari judul kolom (no_retur = retur)

# Periksa XML yang sudah ada (buatan converter DJP atau aplikasi lain), satu file atau satu folder.
# Faktur keluaran dan retur masukan dikenali dari elemen akar.
coretax-xml check faktur-oktober.xml
coretax-xml check folder-xml/ --format html -o laporan.html

coretax-xml schemas

Kode keluar: 0 lolos, 1 ada error pada data, 2 salah pemakaian atau file tidak dikenal. Format laporan: --format teks|json|html.

Error menunjuk baris Excel

penjualan.xlsx: DITOLAK (1 error, 0 peringatan; skema [email protected])
  ERROR [UNIT_UNKNOWN] Faktur ke-2 (baris Excel 5), item 1 (baris Excel 3) <Unit>: Satuan "UM.9999" tidak ada di skema 2025.09.

Nomor baris adalah baris di sheet Faktur dan DetailFaktur (atau baris CSV), bukan baris di XML.

Cara angka dibaca

| Sumber | Default --hitung | Arti | | --- | --- | --- | | .xlsx DJP | strict | DPP, DPP nilai lain, PPN, dan PPnBM dibaca dari sel (hasil rumus yang tersimpan di file) dan dicocokkan dengan hitungan library. Angka lebih dari 2 desimal dibulatkan setengah ke genap, seperti converter DJP. | | .csv | otomatis | Library menghitung semuanya dari harga, jumlah, dan diskon. |

--hitung otomatis pada file Excel mengabaikan angka di sel dan menghitung ulang; berguna jika rumus di template sudah diubah.

Excel menyimpan rumus beserta hasil terakhir yang dihitungnya. CLI hanya membaca hasil itu dan tidak menghitung ulang rumus. Buka dan simpan file di Excel dulu jika angkanya baru diubah lewat program lain.

Keterbatasan

  • Faktur pajak keluaran, retur faktur pajak masukan, dan bukti potong PPh 21/26 (Excel dan CSV). Bupot unifikasi menyusul. --maks-per-file belum berlaku untuk bukti potong. Di CSV retur, ppn wajib diisi per baris (tarifnya tidak ada di template DJP, jadi tidak bisa dihitung).
  • .xls lama tidak didukung; simpan sebagai .xlsx.
  • Angka CSV memakai titik desimal tanpa pemisah ribuan (1500.50, bukan 1.500,50).
  • Kode barang dan kode transaksi yang kehilangan nol di depan karena Excel (4, 0) dipulihkan menjadi 04 dan 000000.
  • Template DJP sebagai file .xlsx tidak disertakan di repo ini; unduh dari halaman resmi DJP.

Lisensi MIT.