@rangka-os/create 0.5.0-alpha.19 → 0.5.0-alpha.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rangka-os/create",
3
- "version": "0.5.0-alpha.19",
3
+ "version": "0.5.0-alpha.20",
4
4
  "description": "Start a Rangka OS project: npm create @rangka-os@latest my-shop",
5
5
  "license": "Elastic-2.0",
6
6
  "homepage": "https://rangka-os.github.io/rangka-os/guide/quick-start",
@@ -3,11 +3,11 @@
3
3
  # (TaxInvoiceBulk) and the unified withholding slips the firm issues (BPPU, BpuBulk), checked before download.
4
4
  # Decisions and sources: reports/keputusan-riset/09-pajak-coretax.md in the project folder.
5
5
  name: coretax
6
- version: 1.1.0
6
+ version: 1.2.0
7
7
  title: {id: Lapor pajak Coretax, en: Coretax tax filing}
8
8
  summary:
9
9
  id: Siapkan masa pajak dan berkas unduhan untuk lapor di Coretax.
10
10
  en: Prepare tax periods and the files to report in Coretax.
11
11
  category: tax
12
12
  icon: file-list-3-line
13
- requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.2, catalogue: ^1.2, invoicing: ^1.7, procurement: ^1.1, payments: ^1.4}
13
+ requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.2, catalogue: ^1.2, invoicing: ^1.9, procurement: ^1.1, payments: ^1.4}
@@ -11,7 +11,9 @@ related:
11
11
  invoices:
12
12
  model: sales_invoice
13
13
  range: {posting_date: [period_start, period_end]}
14
- filter: docstatus == 1 && tax_rate > 0 && ppn > 0 && kind != 'retention'
14
+ # 07/08 (tidak dipungut, dibebaskan): a faktur pajak with PPN stated but not collected (card t_611be720); export
15
+ # (PEB is its faktur) and Pasal 4A (no faktur) stay out
16
+ filter: "docstatus == 1 && kind != 'retention' && ((tax_rate > 0 && ppn > 0) || efaktur_code == '07' || efaktur_code == '08')"
15
17
  sort: name
16
18
  children: true
17
19
  limit: 1000
@@ -37,3 +39,6 @@ related:
37
39
  message: {id: 'Jumlah barang di faktur pajak maksimal 2 desimal: pakai satuan yang lebih kecil (misalnya gram)'}
38
40
  - check: efaktur_code == '' || buyer_id_type != 'Passport' || buyer_country != 'IDN'
39
41
  message: {id: 'Pembeli dengan paspor harus punya kode negara selain IDN di Data pajak pelanggan'}
42
+ # Keterangan Tambahan and Cap Fasilitas are validated by DJP for 07/08 (template v1.6.1, sheet Keterangan)
43
+ - check: "(efaktur_code != '07' && efaktur_code != '08') || (coretax_add_info != '' && coretax_stamp != '')"
44
+ message: {id: 'Faktur PPN dibebaskan atau tidak dipungut belum punya fasilitas PPN: pilih fasilitasnya di faktur'}
@@ -15,17 +15,23 @@
15
15
  its PPN was taken on the whole DPP */}}
16
16
  {{- $pb := .dpp}}{{if .ppn_base}}{{$pb = .ppn_base}}{{end}}
17
17
  {{- $fee := ne (dec $pb 2) (dec .dpp 2)}}
18
+ {{- /* 07/08: the faktur states the PPN the facility leaves uncollected at the company's rate (coretax_vat_rate, frozen on
19
+ submit); an invoice submitted before that field charges its own rate */}}
20
+ {{- $vr := .tax_rate}}{{if .coretax_vat_rate}}{{$vr = .coretax_vat_rate}}{{end}}
18
21
  {{- $s := "0"}}{{$n := "0"}}{{range .items}}{{if not (and $fee .ppn_exclude)}}{{$n = add $n 1}}{{if $fx}}{{$s = add $s .amount_fx_idr}}{{else}}{{$s = add $s .amount}}{{end}}{{end}}{{end}}
19
22
  {{- $r := sub $s $pb}}{{$k := "0"}}{{$acc := "0"}}
20
23
  <TaxInvoice>
21
24
  <TaxInvoiceDate>{{isodate .posting_date}}</TaxInvoiceDate>
22
25
  <TaxInvoiceOpt>Normal</TaxInvoiceOpt>
23
26
  <TrxCode>{{.efaktur_code}}</TrxCode>
24
- <AddInfo/>
25
- <CustomDoc/>
26
- <CustomDocMonthYear/>
27
+ {{- /* facility elements on a 07/08 faktur only, the customs document on 07 only: what a draft kept after its rate was
28
+ raised or its ground changed stays off (audit coretax-07-08 F1, F2) */}}
29
+ {{- $fac := or (eq .efaktur_code "07") (eq .efaktur_code "08")}}
30
+ {{if and $fac .coretax_add_info}}<AddInfo>{{.coretax_add_info}}</AddInfo>{{else}}<AddInfo/>{{end}}
31
+ {{if and (eq .efaktur_code "07") .customs_doc}}<CustomDoc>{{.customs_doc}}</CustomDoc>{{else}}<CustomDoc/>{{end}}
32
+ {{if and (eq .efaktur_code "07") .customs_doc}}<CustomDocMonthYear>{{.customs_doc_period}}</CustomDocMonthYear>{{else}}<CustomDocMonthYear/>{{end}}
27
33
  <RefDesc>{{.name}}{{if .dp_invoice}}; uang muka {{.dp_invoice}}{{end}}{{if $fee}}; upah tenaga kerja di luar DPP (PMK 83/2012){{end}}</RefDesc>
28
- <FacilityStamp/>
34
+ {{if and $fac .coretax_stamp}}<FacilityStamp>{{.coretax_stamp}}</FacilityStamp>{{else}}<FacilityStamp/>{{end}}
29
35
  <SellerIDTKU>{{$seller}}</SellerIDTKU>
30
36
  <BuyerTin>{{.buyer_tin}}</BuyerTin>
31
37
  <BuyerDocument>{{.buyer_id_type}}</BuyerDocument>
@@ -55,8 +61,8 @@
55
61
  <TotalDiscount>{{dec (sub (round (mul $p $q) 2) $tb) 2}}</TotalDiscount>
56
62
  <TaxBase>{{dec $tb 2}}</TaxBase>
57
63
  <OtherTaxBase>{{dec $otb 2}}</OtherTaxBase>
58
- <VATRate>{{dec $inv.tax_rate 2}}</VATRate>
59
- <VAT>{{dec (round (div (mul $otb $inv.tax_rate) 100) 2) 2}}</VAT>
64
+ <VATRate>{{dec $vr 2}}</VATRate>
65
+ <VAT>{{dec (round (div (mul $otb $vr) 100) 2) 2}}</VAT>
60
66
  <STLGRate>0</STLGRate>
61
67
  <STLG>0</STLG>
62
68
  </GoodService>
@@ -46,6 +46,7 @@ steps:
46
46
  posting_date: event.invoice_date
47
47
  tax_rate: '0'
48
48
  tax_rate_reason: "'exempt'"
49
+ coretax_facility: "'education_pp49'"
49
50
  notes: "'Biaya kursus ' + event.description + ' [' + event.name + ']'"
50
51
  items: "[{'item': event.item, 'description': event.description, 'qty': 1, 'rate': event.amount}]"
51
52
  - if: "!event.vat_exempt"
@@ -1,6 +1,6 @@
1
1
  # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
2
2
  name: courses
3
- version: 1.3.0
3
+ version: 1.3.1
4
4
  title: {id: Kursus dan pelatihan, en: Courses and training}
5
5
  summary:
6
6
  id: Program kursus, angkatan, peserta, pendaftaran, jadwal pertemuan dan tagihannya.
@@ -11,4 +11,4 @@ icon: graduation-cap-line
11
11
  # teacher and a weekly schedule, students (a person or an employee of a client company), enrollments, sessions with
12
12
  # attendance, and charges (paid in full, in instalments or monthly) that become draft sales invoices. Research and plan:
13
13
  # rangka research_notes/kursus, plans/kursus.md.
14
- requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0, invoicing: ^1.8}
14
+ requires: {rangka: '>=0.5', users: ^1.0, contacts: ^1.0, catalogue: ^1.0, invoicing: ^1.9}
@@ -145,6 +145,48 @@ fields:
145
145
  - {value: exempt, label: {id: 'Dibebaskan (Pasal 16B, PP 49/2022, mis. jasa pendidikan)'}}
146
146
  - {value: not_collected, label: {id: 'Tidak dipungut (Pasal 16B, mis. kawasan berikat)'}}
147
147
  - {value: not_taxable, label: {id: 'Bukan objek PPN (Pasal 4A) atau bukan penyerahan'}}
148
+ # A PKP invoice dibebaskan (08) or tidak dipungut (07) is still a faktur pajak in Coretax, with the facility's
149
+ # Keterangan Tambahan and Cap Fasilitas (DJP template v1.6.1 REF-KetTambahan / REF-CapFasilitas, the column of the
150
+ # code) and, for a bonded zone, the customs document (card t_611be720, reports/keputusan-riset/coretax-fasilitas-07-08.md)
151
+ - name: coretax_facility
152
+ type: select
153
+ label: {id: Fasilitas PPN}
154
+ help: {id: 'Fasilitas dari dasar tarif 0: menentukan kode keterangan dan cap fasilitas di faktur pajak Coretax.'}
155
+ depends_on: tax_rate == 0 && (tax_rate_reason == 'exempt' || tax_rate_reason == 'not_collected')
156
+ read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]
157
+ options:
158
+ - {value: education_pp49, label: {id: 'Dibebaskan: jasa pendidikan, PP 49/2022 (kode 08)'}}
159
+ - {value: bonded_zone, label: {id: 'Tidak dipungut: tempat penimbunan berikat (kode 07)'}}
160
+ - {value: special_economic_zone, label: {id: 'Tidak dipungut: kawasan ekonomi khusus, PP 40/2021 (kode 07)'}}
161
+ - {value: free_zone, label: {id: 'Tidak dipungut: kawasan bebas, PP 41/2021 (kode 07)'}}
162
+ - name: customs_doc
163
+ type: data
164
+ label: {id: Nomor dokumen pabean}
165
+ help: {id: 'Nomor aju BC 4.0 (tanpa tanda baca), PPKEK#nomor, atau PJKEK#nomor bila penyerahan memakai dokumen pabean.'}
166
+ depends_on: tax_rate == 0 && tax_rate_reason == 'not_collected'
167
+ read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]
168
+ - name: customs_doc_period
169
+ type: data
170
+ label: {id: Masa dokumen pabean (BBTTTT)}
171
+ depends_on: customs_doc != ''
172
+ read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]
173
+ # the PPN the facility leaves uncollected: the faktur pajak states it (DJP sample 07, FAQ 08), the invoice does not bill it
174
+ - name: coretax_vat_rate
175
+ type: percent
176
+ label: {id: Tarif PPN di faktur pajak}
177
+ depends_on: app_installed('coretax') && efaktur_code != ''
178
+ compute: "tax_rate > 0 ? tax_rate : (efaktur_code == '07' || efaktur_code == '08' ? tax.ppn_rate : 0)"
179
+ - name: coretax_add_info
180
+ type: data
181
+ label: {id: Keterangan tambahan faktur pajak}
182
+ depends_on: app_installed('coretax') && coretax_facility != ''
183
+ # only on a 07/08 faktur: a facility left on a draft whose rate was raised is ignored (audit coretax-07-08 F1)
184
+ compute: "efaktur_code != '07' && efaktur_code != '08' ? '' : coretax_facility == 'education_pp49' ? 'TD.00510' : (coretax_facility == 'bonded_zone' ? 'TD.00502' : (coretax_facility == 'special_economic_zone' ? 'TD.00517' : (coretax_facility == 'free_zone' ? 'TD.00518' : '')))"
185
+ - name: coretax_stamp
186
+ type: data
187
+ label: {id: Cap fasilitas faktur pajak}
188
+ depends_on: app_installed('coretax') && coretax_facility != ''
189
+ compute: "efaktur_code != '07' && efaktur_code != '08' ? '' : coretax_facility == 'education_pp49' ? 'TD.01110' : (coretax_facility == 'bonded_zone' ? 'TD.01102' : (coretax_facility == 'special_economic_zone' ? 'TD.01117' : (coretax_facility == 'free_zone' ? 'TD.01118' : '')))"
148
190
  - {name: dpp_num, type: int, label: {id: DPP nilai lain (pembilang)}, default: 'tax.dpp_num', read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]}
149
191
  - {name: dpp_den, type: int, label: {id: DPP nilai lain (penyebut)}, default: 'tax.dpp_den', read_only_for: [sales_manager, sales_rep, field_sales, head_office, project_admin]}
150
192
  # The PPN base: the DPP, or with config tax.ppn_fee_only (kernel contract 0010 §8, default off) the fee part of it:
@@ -316,8 +358,8 @@ fields:
316
358
  - name: efaktur_code
317
359
  type: data
318
360
  label: {id: Kode transaksi e-Faktur}
319
- depends_on: app_installed('coretax') && tax_rate > 0
320
- compute: "tax_rate == 0 ? '' : (customer.vat_collector == 'government' ? '02' : (customer.vat_collector == 'other' ? '03' : (dpp_num == dpp_den ? '01' : '04')))"
361
+ depends_on: app_installed('coretax') && (tax_rate > 0 || coretax_facility != '')
362
+ compute: "tax_rate == 0 ? (!tax.pkp || coretax_facility == '' ? '' : (tax_rate_reason == 'exempt' ? '08' : (tax_rate_reason == 'not_collected' ? '07' : ''))) : (customer.vat_collector == 'government' ? '02' : (customer.vat_collector == 'other' ? '03' : (dpp_num == dpp_den ? '01' : '04')))"
321
363
  # The invoice this one amends (kernel amended_from as a link), so the Coretax export can refuse a replacement of
322
364
  # an invoice of an earlier period: that one is a Faktur Pengganti made in Coretax.
323
365
  - name: replaces
@@ -437,6 +479,18 @@ rules:
437
479
  on: save
438
480
  check: dpp_den > 0 && dpp_num > 0 && dpp_num <= dpp_den && tax_rate >= 0 && tax_rate <= 100
439
481
  message: {id: Tarif PPN atau faktor DPP tidak valid}
482
+ - name: facility_needs_kind
483
+ on: save
484
+ check: "!tax.pkp || kind == 'retention' || tax_rate > 0 || (tax_rate_reason != 'exempt' && tax_rate_reason != 'not_collected') || coretax_facility != ''"
485
+ message: {id: 'PPN dibebaskan atau tidak dipungut: pilih fasilitasnya (untuk kode dan cap fasilitas faktur pajak)'}
486
+ - name: facility_matches_reason
487
+ on: save
488
+ check: "coretax_facility == '' || tax_rate > 0 || (coretax_facility == 'education_pp49' ? tax_rate_reason == 'exempt' : tax_rate_reason == 'not_collected')"
489
+ message: {id: 'Fasilitas tidak cocok dengan dasar tarif 0: jasa pendidikan dibebaskan, kawasan berikat/KEK/kawasan bebas tidak dipungut'}
490
+ - name: customs_doc_period_format
491
+ on: save
492
+ check: "customs_doc == '' || customs_doc_period.matches('^(0[1-9]|1[0-2])[0-9]{4}$')"
493
+ message: {id: 'Masa dokumen pabean ditulis BBTTTT, misalnya 122026'}
440
494
  # a PKP invoice at 0% names its ground (card t_3106eb6c); a ground left on a rate above 0 is ignored (Coretax and
441
495
  # ppn read the rate), so raising the rate never trips over the hidden field (audit zero-rate N2)
442
496
  - name: zero_rate_needs_reason
@@ -533,7 +587,7 @@ views:
533
587
  fields: [items]
534
588
  - section: {id: Pajak & potongan}
535
589
  columns:
536
- - [discount_amount, dp_invoice, down_payment, tax_rate, tax_rate_reason, dpp_num, dpp_den, ppn_base, ppn]
590
+ - [discount_amount, dp_invoice, down_payment, tax_rate, tax_rate_reason, coretax_facility, customs_doc, customs_doc_period, dpp_num, dpp_den, ppn_base, ppn]
537
591
  - [pph23_applies, pph23_rate, pph23_amount, retention_percent, retention_of, retention_amount]
538
592
  - section: {id: Ringkasan}
539
593
  columns:
@@ -1,6 +1,6 @@
1
1
  # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/module.json
2
2
  name: invoicing
3
- version: 1.8.0
3
+ version: 1.9.0
4
4
  title: {id: Faktur, en: Invoicing}
5
5
  summary:
6
6
  id: Buat faktur penjualan, pilih cara bayar termasuk QRIS, dan kirim pengingat tagihan.