@provis/provis-common-be-module 3.0.1 → 3.0.4

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.
Files changed (42) hide show
  1. package/dist/class/main.repository.js +4 -4
  2. package/dist/constants/claim/general.js +1 -1
  3. package/dist/constants/claim/kalog.js +1 -1
  4. package/dist/constants/claim/life.d.ts +2 -2
  5. package/dist/constants/claim/life.js +1 -1
  6. package/dist/constants/claim/loket.js +40 -40
  7. package/dist/constants/claim/motorVehicle.js +1 -1
  8. package/dist/constants/claim/travel.js +1 -1
  9. package/dist/constants/config.js +2 -2
  10. package/dist/constants/invoice/coa.d.ts +14 -0
  11. package/dist/constants/invoice/coa.js +19 -5
  12. package/dist/constants/product/cargo/deductible.json +49 -49
  13. package/dist/constants/product/cargo/quotation.d.ts +22 -31
  14. package/dist/constants/product/cargo/quotation.js +245 -8
  15. package/dist/constants/product.d.ts +1 -0
  16. package/dist/constants/product.js +20 -14
  17. package/dist/constants/source.js +1 -1
  18. package/dist/helpers/alphaNumericCleansing.js +1 -1
  19. package/dist/helpers/amountDescription.js +1 -1
  20. package/dist/helpers/axiosGet.js +1 -1
  21. package/dist/helpers/axiosPost.js +1 -1
  22. package/dist/helpers/axiosPut.js +1 -1
  23. package/dist/helpers/calculateByType.js +1 -1
  24. package/dist/helpers/calculateForNullable.js +6 -6
  25. package/dist/helpers/decimalAmount.js +4 -4
  26. package/dist/helpers/getHeaderUser.js +4 -4
  27. package/dist/helpers/invoicePeriod.d.ts +11 -0
  28. package/dist/helpers/invoicePeriod.js +66 -0
  29. package/dist/helpers/loop.js +2 -2
  30. package/dist/helpers/loopBackward.js +2 -2
  31. package/dist/helpers/readExcel.d.ts +0 -2
  32. package/package.json +1 -1
  33. package/dist/constants/bankAccount.d.ts +0 -8
  34. package/dist/constants/bankAccount.js +0 -54
  35. package/dist/constants/product/cargo.d.ts +0 -39
  36. package/dist/constants/product/cargo.js +0 -41
  37. package/dist/constants/product/coretax.d.ts +0 -12
  38. package/dist/constants/product/coretax.js +0 -14
  39. package/dist/constants/product/mv.d.ts +0 -30
  40. package/dist/constants/product/mv.js +0 -158
  41. package/dist/constants/product/property/occupation.d.ts +0 -5
  42. package/dist/constants/product/property/occupation.js +0 -1725
@@ -1,11 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const cargo_1 = require("./cargo");
4
3
  const quotation = {
4
+ PRODUCT_NAME: {
5
+ desc: {
6
+ en: 'Marine Cargo Insurance',
7
+ id: 'Asuransi Pengiriman Barang',
8
+ }
9
+ },
5
10
  // input: company address, Annual Spending Value (number only, format currency)
6
11
  INTEREST_INSURED: {
7
- en: 'All type of Cargo and/or Merchandise and/or Property of any descriptions',
8
- id: '',
12
+ en: 'All type of Cargo and/or Merchandise and/or Property of any descriptions. Except;',
13
+ id: 'Semua jenis Kargo dan/atau Barang Dagangan dan/atau Properti dari deskripsi apa pun. Kecuali;',
9
14
  },
10
15
  INTEREST_INSURED_EXCLUDE: {
11
16
  en: '- Livestock\n- Jewelry, gold, precious stone/metal, money and the likes\n- Antique goods and artwork\n- Firearms, ammunition\n- Cotton in bulk\n- Painting\n- Rejection cargo, containers insured as such;\n- Satellites – including launch and pre-launch coverage\n- Container fleet accounts as cargo\n- Bulk products with GOT – Guaranteed Out Turn\n- Marijuana or CBD containing products\n- Cash in Transit (coins or notes)\n- Other precious minerals',
@@ -16,14 +21,14 @@ const quotation = {
16
21
  id: '',
17
22
  },
18
23
  LIMIT_OF_LIABILITY: {
19
- en: 'Limit of Liability USD 500,000 anyone conveyance[a',
20
- id: '',
24
+ en: 'Limit of Liability IDR 10.000.000.000 anyone conveyance',
25
+ id: 'Batas Tanggung Jawab Rp 10.000.000.000 per 1 (satu) alat angkut',
21
26
  },
22
27
  DEDUCTIBLE: {
23
- en: '5% of Claim Amount, minimum IDR 500.000 for each and every loss',
24
- id: '',
28
+ en: '- 5% of Claim Amount, minimum IDR 500.000 for each and every loss\n- 5% of Claim Amount, minimum IDR 1.000.000 for each and every loss in respect of Glass, Ceramic, Cement and Building Material',
29
+ id: '- 5% dari jumlah klaim, dengan minimum sebesar Rp 500.000 untuk setiap kerugian\n- 5% dari jumlah klaim, dengan minimum sebesar Rp 1.000.000 untuk setiap kerugian yang berkaitan dengan kaca, keramik, semen, dan bahan bangunan',
25
30
  },
26
- LIST_INSURANCE_TYPE: cargo_1.default.TYPE,
31
+ // LIST_INSURANCE_TYPE: cargo.TYPE, // checkbox -> untuk default rate akan di catat di BO service as const (dan bisa diedit)
27
32
  SPECIAL_CONDITIONS: {
28
33
  isDefault: false,
29
34
  desc: {
@@ -31,6 +36,26 @@ const quotation = {
31
36
  id: '',
32
37
  },
33
38
  },
39
+ DEFAULT_RATE: {
40
+ OPTION_1: {
41
+ desc: {
42
+ en: 'Invoice Value +10%\nICC A : 0,06% x Total Sum Insured\nICC C : 0,04% x Total Sum Insured',
43
+ id: 'Nilai barang sesuai dengan nilai invoice barang\nICC A : 0,06% x Nilai Keseluruhan Pertanggungan\nICC C : 0,04% x Nilai Keseluruhan Pertanggungan',
44
+ },
45
+ },
46
+ OPTION_2: {
47
+ desc: {
48
+ en: 'Maximum Limit of Liability, per container\n<table class="premi-table"><thead><tr><th rowspan="2">Sum Insured</th><th colspan="2">Flat Premium</th></tr><tr><th>ICC A</th><th>ICC C</th></tr></thead><tbody><tr><td class="si">IDR 50.000.000</td><td>0,06%</td><td>0,04%</td></tr><tr><td class="si">IDR 100.000.000</td><td>0,06%</td><td>0,04%</td></tr><tr><td class="si">IDR 200.000.000</td><td>0,06%</td><td>0,04%</td></tr></tbody></table>',
49
+ id: 'Batas Maksimum Pertanggungan, per kontainer\n<table class="premi-table"><thead><tr><th rowspan="2">Nilai Pertanggungan</th><th colspan="2">Flat Premium</th></tr><tr><th>ICC A</th><th>ICC C</th></tr></thead><tbody><tr><td class="si">Rp 50.000.000</td><td>0,06%</td><td>0,04%</td></tr><tr><td class="si">Rp 100.000.000</td><td>0,06%</td><td>0,04%</td></tr><tr><td class="si">Rp 200.000.000</td><td>0,06%</td><td>0,04%</td></tr></tbody></table>',
50
+ },
51
+ },
52
+ OPTION_3: {
53
+ desc: {
54
+ en: 'Option I\n\nInvoice Value +10%\nICC A : 0,06% x Total Sum Insured\nICC C : 0,04% x Total Sum Insured\n\nOption II\n\nMaximum Limit of Liability, per container\n<table class="premi-table"><thead><tr><th rowspan="2">Sum Insured</th><th colspan="2">Flat Premium</th></tr><tr><th>ICC A</th><th>ICC C</th></tr></thead><tbody><tr><td class="si">IDR 50.000.000</td><td>0,06%</td><td>0,04%</td></tr><tr><td class="si">IDR 100.000.000</td><td>0,06%</td><td>0,04%</td></tr><tr><td class="si">IDR 200.000.000</td><td>0,06%</td><td>0,04%</td></tr></tbody></table>',
55
+ id: 'Pilihan I\n\nNilai barang sesuai dengan nilai invoice barang\nICC A : 0,06% x Nilai Keseluruhan Pertanggungan\nICC C : 0,04% x Nilai Keseluruhan Pertanggungan\n\nPilihan IIBatas Maksimum Pertanggungan, per kontainer\n<table class="premi-table"><thead><tr><th rowspan="2">Nilai Pertanggungan</th><th colspan="2">Flat Premium</th></tr><tr><th>ICC A</th><th>ICC C</th></tr></thead><tbody><tr><td class="si">Rp 50.000.000</td><td>0,06%</td><td>0,04%</td></tr><tr><td class="si">Rp 100.000.000</td><td>0,06%</td><td>0,04%</td></tr><tr><td class="si">Rp 200.000.000</td><td>0,06%</td><td>0,04%</td></tr></tbody></table>',
56
+ },
57
+ },
58
+ },
34
59
  LIST_OF_DANGEROUS_GOODS: [
35
60
  { code: 'DG001', desc: { en: 'LIMBAH SISA LAB, ELEKTRONIK, LISTRIK, MEDIS/KLINIS', id: '' } },
36
61
  { code: 'DG002', desc: { en: 'KOPRA', id: '' } },
@@ -75,5 +100,217 @@ const quotation = {
75
100
  { code: 'DG041', desc: { en: 'SODIUM HYPOCHLORITE', id: '' } },
76
101
  { code: 'DG042', desc: { en: 'SULPHURIC SOLID', id: '' } },
77
102
  ],
103
+ LIST_OF_GOODS_INTEREST: [
104
+ {
105
+ "code": "GI-001",
106
+ "desc": {
107
+ "en": "Livestock and Bloodstock",
108
+ "id": "Hewan Ternak dan Bloodstock"
109
+ }
110
+ },
111
+ {
112
+ "code": "GI-002",
113
+ "desc": {
114
+ "en": "Rejection, Prohibition and Embargo Risks",
115
+ "id": "Risiko Penolakan, Larangan dan Embargo"
116
+ }
117
+ },
118
+ {
119
+ "code": "GI-003",
120
+ "desc": {
121
+ "en": "Illegal Cargo",
122
+ "id": "Kargo Ilegal"
123
+ }
124
+ },
125
+ {
126
+ "code": "GI-004",
127
+ "desc": {
128
+ "en": "Nuclear or aerospace including satellites, launch vehicles and/or major parts there of",
129
+ "id": "Nuklir atau luar angkasa termasuk satelit, kendaraan peluncuran dan/atau bagian-bagiannya yang utama"
130
+ }
131
+ },
132
+ {
133
+ "code": "GI-005",
134
+ "desc": {
135
+ "en": "Japanese Kamigoto oil storage project",
136
+ "id": "Proyek penyimpanan minyak Kamigoto Jepang"
137
+ }
138
+ },
139
+ {
140
+ "code": "GI-006",
141
+ "desc": {
142
+ "en": "Military Weapons (Subject to Special Acceptance)",
143
+ "id": "Senjata Militer (Tergantung Penerimaan Khusus)"
144
+ }
145
+ },
146
+ {
147
+ "code": "GI-007",
148
+ "desc": {
149
+ "en": "Energy Risks (onshore/offshore)",
150
+ "id": "Risiko Energi (darat/lepas pantai)"
151
+ }
152
+ },
153
+ {
154
+ "code": "GI-008",
155
+ "desc": {
156
+ "en": "Storage risk beyond ordinary course of transit (stock through put)",
157
+ "id": "Risiko penyimpanan di luar transit biasa (stok melalui put)"
158
+ }
159
+ },
160
+ {
161
+ "code": "GI-009",
162
+ "desc": {
163
+ "en": "Project Cargo for large project such as Power Plant (Subject to Special Acceptance)",
164
+ "id": "Project Cargo untuk proyek besar seperti Power Plant (Subject to Special Acceptance)"
165
+ }
166
+ },
167
+ {
168
+ "code": "GI-010",
169
+ "desc": {
170
+ "en": "Temperature Control Pharmaceutical",
171
+ "id": "Produk Farmasi yang memerlukan kontrol terhadap suhu (Vaksin, darah, insulin, alat Kesehatan, plasma dan produk farmasi atau medis lainnya yang dikirim harus dilindungi dari panas dan dingin)"
172
+ }
173
+ },
174
+ {
175
+ "code": "GI-011",
176
+ "desc": {
177
+ "en": "Unprotected or unpacked items and/or Breakbulk cargo",
178
+ "id": "Barang yang tidak dilindungi atau tidak dikemas dan/atau kargo Breakbulk"
179
+ }
180
+ },
181
+ {
182
+ "code": "GI-012",
183
+ "desc": {
184
+ "en": "Bulk cargoes (Cotton, Liquid and Solid)",
185
+ "id": "Kargo curah (Kapas, Cair dan Padat)"
186
+ }
187
+ },
188
+ {
189
+ "code": "GI-013",
190
+ "desc": {
191
+ "en": "Gas and or petroleum product unless oil or lubricant oil packed in can thence containerized",
192
+ "id": "Gas dan atau produk minyak bumi kecuali minyak atau minyak pelumas yang dikemas dalam dapat dikemas dalam kemasan"
193
+ }
194
+ },
195
+ {
196
+ "code": "GI-014",
197
+ "desc": {
198
+ "en": "Long Steel, Steel scarp or Scrap Metal",
199
+ "id": "Baja Panjang, Baja scrap atau Scrap Metal (Besi, alumunium, kuningan, tembaga bekas {rongsokan})"
200
+ }
201
+ },
202
+ {
203
+ "code": "GI-015",
204
+ "desc": {
205
+ "en": "Used cardboard, used plastic and used bottles (In respect of ICC A)",
206
+ "id": "Kardus, plastic dan botol bekas (Sehubungan dengan ICC A)"
207
+ }
208
+ },
209
+ {
210
+ "code": "GI-016",
211
+ "desc": {
212
+ "en": "Minerals including but not limited to Coal, Tin Ore, Nickel Ore, Iron Ore, Limestone, and the like.",
213
+ "id": "Mineral termasuk namun tidak terbatas pada Batubara, Bijih Timah, Bijih Nikel, Bijih Besi, Batu Kapur, dan sejenisnya."
214
+ }
215
+ },
216
+ {
217
+ "code": "GI-017",
218
+ "desc": {
219
+ "en": "Fine art / antique, Paintings and the like",
220
+ "id": "Seni rupa / barang antik, Lukisan dan sejenisnya"
221
+ }
222
+ },
223
+ {
224
+ "code": "GI-018",
225
+ "desc": {
226
+ "en": "Firearms, ammunition",
227
+ "id": "Senjata api, amunisi"
228
+ }
229
+ },
230
+ {
231
+ "code": "GI-019",
232
+ "desc": {
233
+ "en": "Ship owner interest",
234
+ "id": "Kepentingan pemilik kapal"
235
+ }
236
+ },
237
+ {
238
+ "code": "GI-020",
239
+ "desc": {
240
+ "en": "Overdue risk such as guarantee risk, liability risk, consequential loss advance or loss of profit",
241
+ "id": "Risiko jatuh tempo seperti risiko jaminan, risiko kewajiban, kerugian konsekuensial di muka atau kehilangan keuntungan"
242
+ }
243
+ },
244
+ {
245
+ "code": "GI-021",
246
+ "desc": {
247
+ "en": "Explosive goods (except as per mentioned in the list of Dangerous Goods)",
248
+ "id": "Barang peledak (kecuali yang disebutkan dalam daftar Barang Berbahaya)"
249
+ }
250
+ },
251
+ {
252
+ "code": "GI-022",
253
+ "desc": {
254
+ "en": "Bullion and the like, jewelry, gold, tin, silver and the like",
255
+ "id": "Bullion dan sejenisnya, perhiasan, emas, timah, perak dan sejenisnya"
256
+ }
257
+ },
258
+ {
259
+ "code": "GI-023",
260
+ "desc": {
261
+ "en": "Rare Goods, including but not limited to hideskin, tusks (Ivory), animal teeths, chinaware",
262
+ "id": "Barang Langka, termasuk namun tidak terbatas pada kulit kulit, gading (Gading), gigi hewan, chinaware"
263
+ }
264
+ },
265
+ {
266
+ "code": "GI-024",
267
+ "desc": {
268
+ "en": "Marijuana or CBD containing products",
269
+ "id": "Produk yang mengandung ganja atau CBD"
270
+ }
271
+ },
272
+ {
273
+ "code": "GI-025",
274
+ "desc": {
275
+ "en": "Money, Valuable Document, Cheque, Giro, STNK, BPKB, and the like",
276
+ "id": "Uang, Dokumen Berharga, Cek, Giro, STNK, BPKB, dan sejenisnya"
277
+ }
278
+ },
279
+ {
280
+ "code": "GI-026",
281
+ "desc": {
282
+ "en": "Container and/or Iso-Tank",
283
+ "id": "Kontainer dan/atau Iso-Tank sebagai kargo"
284
+ }
285
+ },
286
+ {
287
+ "code": "GI-027",
288
+ "desc": {
289
+ "en": "Personal Effect",
290
+ "id": "Barang Pindahan"
291
+ }
292
+ },
293
+ {
294
+ "code": "GI-028",
295
+ "desc": {
296
+ "en": "Other precious minerals",
297
+ "id": "Mineral berharga lainnya"
298
+ }
299
+ },
300
+ {
301
+ "code": "GI-029",
302
+ "desc": {
303
+ "en": "Lightweight concrete block (In respect of ICC A)",
304
+ "id": "Bata ringan (Sehubungan dengan ICC A)"
305
+ }
306
+ },
307
+ {
308
+ "code": "GI-030",
309
+ "desc": {
310
+ "en": "Plant and Trees including Seeds",
311
+ "id": "Tanaman dan Pohon termasuk Benih"
312
+ }
313
+ }
314
+ ],
78
315
  };
79
316
  exports.default = quotation;
@@ -73,5 +73,6 @@ declare const product: {
73
73
  PRODUCT_CODE_FINE_ART_COLLECTION: string;
74
74
  PRODUCT_CODE_MONEY: string;
75
75
  PRODUCT_CODE_FIDELITY_GUARANTEE_INSURANCE: string;
76
+ PRODUCT_CODE_BPR_MANDIRI: string;
76
77
  };
77
78
  export default product;
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const occupation_simple_1 = require("./product/property/occupation-simple");
4
4
  const product = {
5
- LIST: {},
6
- MANUAL_LIST: [],
7
- CARGO_BY_SYSTEM_LIST: [],
5
+ LIST: {}, // ini buat semua product
6
+ MANUAL_LIST: [], // ini buat product yang bisa diadd manual -> di form quotation / policy
7
+ CARGO_BY_SYSTEM_LIST: [], // ini buat product yang by sistem
8
8
  PRODUCT_CODE_PROPERTY_ALL_RISK: 'polismall-property-allrisk',
9
9
  PRODUCT_CODE_EARTHQUAKE: 'polismall-earthquake',
10
10
  PRODUCT_CODE_VEHICLE: 'polismall-vehicle',
@@ -46,7 +46,7 @@ const product = {
46
46
  PRODUCT_CODE_ERECTION_ALL_RISK: 'polismall-erection-all-risk',
47
47
  PRODUCT_CODE_PA_SOGO_ELI_DAYIN: 'polismall-eli',
48
48
  PRODUCT_CODE_PRODUCT_LIABILITY: 'polismall-product-liability',
49
- PRODUCT_POLISMALL_CARGO_QUOTATION: 'polismall-cargo-quotation',
49
+ PRODUCT_POLISMALL_CARGO_QUOTATION: 'polismall-cargo-quotation', // buat quotation
50
50
  // CARGO
51
51
  PRODUCT_POLISMALL_CARGO_MERATUS: 'polismall-cargo-meratus-paliside',
52
52
  PRODUCT_POLISMALL_CARGO: 'polismall-cargo',
@@ -54,17 +54,17 @@ const product = {
54
54
  PRODUCT_CODE_CARGO_BUNDLE: 'polismall-cargo-bundle',
55
55
  PRODUCT_CODE_MERIMEN_CARGO: 'polismall-merimen-cargo',
56
56
  PRODUCT_CODE_CARGO_TEMAS: 'polismall-cargo-temas',
57
- PRODUCT_CODE_CARGO_SINGLE_SHIPMENT: 'polismall-cargo-single-shipment',
57
+ PRODUCT_CODE_CARGO_SINGLE_SHIPMENT: 'polismall-cargo-single-shipment', // Marine Cargo Single Shipment, buat add manual di policy
58
58
  // OTTO
59
- PRODUCT_CODE_OTTO_CI: 'polismall-otto-critical-illness',
60
- PRODUCT_CODE_OTTO_FLEXAS: 'polismall-otto-flexas',
61
- PRODUCT_CODE_OTTO_CRACK_SCREEN: 'polismall-otto-crack',
62
- PRODUCT_CODE_OTTO_AUM_GP: 'polismall-otto-aum-gp',
63
- PRODUCT_CODE_OTTO_AUM_PLN: 'polismall-otto-aum-pln',
64
- PRODUCT_CODE_OTTO_AUM_PDAM: 'polismall-otto-aum-pdam',
65
- PRODUCT_CODE_OTTO_AUM_SB: 'polismall-otto-aum-sb',
66
- PRODUCT_CODE_OTTO_AUM_FB: 'polismall-otto-aum-fb',
67
- PRODUCT_CODE_OTTO_AUM_FBK: 'polismall-otto-aum-fbk',
59
+ PRODUCT_CODE_OTTO_CI: 'polismall-otto-critical-illness', // ELI
60
+ PRODUCT_CODE_OTTO_FLEXAS: 'polismall-otto-flexas', // MNC
61
+ PRODUCT_CODE_OTTO_CRACK_SCREEN: 'polismall-otto-crack', // MNC
62
+ PRODUCT_CODE_OTTO_AUM_GP: 'polismall-otto-aum-gp', // AUM Gamers Protection
63
+ PRODUCT_CODE_OTTO_AUM_PLN: 'polismall-otto-aum-pln', // AUM Biller Protection PLN
64
+ PRODUCT_CODE_OTTO_AUM_PDAM: 'polismall-otto-aum-pdam', // AUM Biller Protection PDAM
65
+ PRODUCT_CODE_OTTO_AUM_SB: 'polismall-otto-aum-sb', // AUM Merchant Protection Stock Barang
66
+ PRODUCT_CODE_OTTO_AUM_FB: 'polismall-otto-aum-fb', // AUM Merchant Protection FLEXAS+BANJIR
67
+ PRODUCT_CODE_OTTO_AUM_FBK: 'polismall-otto-aum-fbk', // AUM Merchant Protection FLEXAS+BANJIR+KEBONGKARAN
68
68
  // BDKI
69
69
  PRODUCT_CODE_BDKI_MOTOR: 'polismall-bdki-motor',
70
70
  PRODUCT_CODE_BDKI_RUMAH: 'polismall-bdki-rumah',
@@ -81,6 +81,7 @@ const product = {
81
81
  PRODUCT_CODE_FINE_ART_COLLECTION: 'polismall-fine-art-collections',
82
82
  PRODUCT_CODE_MONEY: 'polismall-money',
83
83
  PRODUCT_CODE_FIDELITY_GUARANTEE_INSURANCE: 'polismall-fidelity-guarantee-insurance',
84
+ PRODUCT_CODE_BPR_MANDIRI: 'polismall-bpr-mandiri',
84
85
  };
85
86
  product.LIST = {
86
87
  [product.PRODUCT_CODE_BNI_RUMAH]: {
@@ -375,6 +376,10 @@ product.LIST = {
375
376
  value: product.PRODUCT_CODE_WRPL,
376
377
  name: "Wreck Removal & Pollution Liability",
377
378
  },
379
+ [product.PRODUCT_CODE_BPR_MANDIRI]: {
380
+ value: product.PRODUCT_CODE_BPR_MANDIRI,
381
+ name: "BPR Mandiri",
382
+ },
378
383
  };
379
384
  product.MANUAL_LIST = [
380
385
  product.LIST[product.PRODUCT_CODE_FIDELITY_GUARANTEE_INSURANCE],
@@ -422,6 +427,7 @@ product.MANUAL_LIST = [
422
427
  product.LIST[product.PRODUCT_CODE_PRODUCT_LIABILITY],
423
428
  product.LIST[product.PRODUCT_POLISMALL_CARGO_QUOTATION],
424
429
  product.LIST[product.PRODUCT_CODE_MONEY],
430
+ product.LIST[product.PRODUCT_CODE_BPR_MANDIRI],
425
431
  ];
426
432
  product.CARGO_BY_SYSTEM_LIST = [
427
433
  product.LIST[product.PRODUCT_POLISMALL_CARGO_MERATUS],
@@ -6,7 +6,7 @@ const source = {
6
6
  SOURCE_TANTO: 'TANTO',
7
7
  SOURCE_MERATUS_PALISIDE: 'MERATUS-PALISIDE',
8
8
  SOURCE_TEMAS: 'TEMAS',
9
- SOURCE_DOMESTIK: 'DOMESTIK',
9
+ SOURCE_DOMESTIK: 'DOMESTIK', // Cargo Revamp - Domestix
10
10
  SOURCE_YUDHA_EXCEL: 'YUDHA',
11
11
  SOURCE_EXIM: 'EXIM',
12
12
  SOURCE_UPLOAD_BUNDLE: 'UPLOAD-BUNDLE',
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = alphaNumericCleansing;
3
4
  function alphaNumericCleansing(text) {
4
5
  if (typeof text !== 'string')
5
6
  return '';
@@ -7,4 +8,3 @@ function alphaNumericCleansing(text) {
7
8
  .toLowerCase()
8
9
  .replace(/[^a-z0-9]/g, '');
9
10
  }
10
- exports.default = alphaNumericCleansing;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = terbilang;
3
4
  function terbilang(value) {
4
5
  const satuan = ['', 'satu', 'dua', 'tiga', 'empat', 'lima', 'enam', 'tujuh', 'delapan', 'sembilan'];
5
6
  const belasan = ['sepuluh', 'sebelas', 'dua belas', 'tiga belas', 'empat belas', 'lima belas', 'enam belas', 'tujuh belas', 'delapan belas', 'sembilan belas'];
@@ -41,4 +42,3 @@ function terbilang(value) {
41
42
  // Menghilangkan spasi yang double
42
43
  return result.replace(/\s+/g, ' ').trim();
43
44
  }
44
- exports.default = terbilang;
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
13
13
  const generateRelationId_1 = require("./generateRelationId");
14
14
  const getCurrentDate_1 = require("./getCurrentDate");
15
15
  const constants_1 = require("../constants");
16
- exports.default = ({ url, headers, params, callback, }) => __awaiter(void 0, void 0, void 0, function* () {
16
+ exports.default = (_a) => __awaiter(void 0, [_a], void 0, function* ({ url, headers, params, callback, }) {
17
17
  return yield axios_1.default.get(url, {
18
18
  params,
19
19
  headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
13
13
  const generateRelationId_1 = require("./generateRelationId");
14
14
  const getCurrentDate_1 = require("./getCurrentDate");
15
15
  const constants_1 = require("../constants");
16
- exports.default = ({ url, headers, body, callback, }) => __awaiter(void 0, void 0, void 0, function* () {
16
+ exports.default = (_a) => __awaiter(void 0, [_a], void 0, function* ({ url, headers, body, callback, }) {
17
17
  return yield axios_1.default.post(url, body, {
18
18
  headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
19
19
  }).then((result) => __awaiter(void 0, void 0, void 0, function* () {
@@ -13,7 +13,7 @@ const axios_1 = require("axios");
13
13
  const constants_1 = require("../constants");
14
14
  const generateRelationId_1 = require("./generateRelationId");
15
15
  const getCurrentDate_1 = require("./getCurrentDate");
16
- exports.default = ({ url, headers, body, callback, }) => __awaiter(void 0, void 0, void 0, function* () {
16
+ exports.default = (_a) => __awaiter(void 0, [_a], void 0, function* ({ url, headers, body, callback, }) {
17
17
  return yield axios_1.default.put(url, body, {
18
18
  headers: Object.assign({ 'Content-Type': 'application/json', 'X-Correlation-Id': (0, generateRelationId_1.default)(24), 'X-Transmission-Date-Time': (0, getCurrentDate_1.default)() }, headers),
19
19
  }).then((result) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const brokerage_1 = require("../constants/brokerage");
4
5
  function default_1(request) {
5
6
  try {
@@ -16,4 +17,3 @@ function default_1(request) {
16
17
  return null;
17
18
  }
18
19
  }
19
- exports.default = default_1;
@@ -1,6 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.roundTo = exports.minusN = exports.sumN = exports.divide = exports.multiple = exports.minus = exports.sum = void 0;
3
+ exports.minusN = exports.sumN = void 0;
4
+ exports.sum = sum;
5
+ exports.minus = minus;
6
+ exports.multiple = multiple;
7
+ exports.divide = divide;
8
+ exports.roundTo = roundTo;
4
9
  function sum(a, b) {
5
10
  try {
6
11
  if (a == null && b == null)
@@ -11,7 +16,6 @@ function sum(a, b) {
11
16
  return null;
12
17
  }
13
18
  }
14
- exports.sum = sum;
15
19
  function minus(a, b) {
16
20
  try {
17
21
  if (a == null && b == null)
@@ -22,7 +26,6 @@ function minus(a, b) {
22
26
  return null;
23
27
  }
24
28
  }
25
- exports.minus = minus;
26
29
  function multiple(a, b) {
27
30
  try {
28
31
  if (a == null && b == null)
@@ -33,7 +36,6 @@ function multiple(a, b) {
33
36
  return null;
34
37
  }
35
38
  }
36
- exports.multiple = multiple;
37
39
  function roundTo(num, precision = 2) {
38
40
  try {
39
41
  if (num == null && precision == null)
@@ -45,7 +47,6 @@ function roundTo(num, precision = 2) {
45
47
  return null;
46
48
  }
47
49
  }
48
- exports.roundTo = roundTo;
49
50
  function divide(a, b) {
50
51
  try {
51
52
  if (a == null && b == null)
@@ -58,7 +59,6 @@ function divide(a, b) {
58
59
  return null;
59
60
  }
60
61
  }
61
- exports.divide = divide;
62
62
  const sumN = (...numbers) => {
63
63
  let result = null;
64
64
  numbers.forEach(each => {
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sumUnits = exports.fromUnits = exports.toUnits = exports.AMOUNT_SCALE = void 0;
3
+ exports.AMOUNT_SCALE = void 0;
4
+ exports.toUnits = toUnits;
5
+ exports.fromUnits = fromUnits;
6
+ exports.sumUnits = sumUnits;
4
7
  // Untuk nilai uang yang dipakai ledger (kolom decimal(16,4)): semua hitungan dilakukan
5
8
  // dalam integer (nilai * 10^4) biar debit dan kredit tidak pernah beda gara-gara float.
6
9
  // Konversi ke string cuma sekali, waktu mau disimpan.
@@ -19,15 +22,12 @@ function toUnits(value) {
19
22
  }
20
23
  return units;
21
24
  }
22
- exports.toUnits = toUnits;
23
25
  function fromUnits(units) {
24
26
  return (units / FACTOR).toFixed(exports.AMOUNT_SCALE);
25
27
  }
26
- exports.fromUnits = fromUnits;
27
28
  function sumUnits(...values) {
28
29
  return values.reduce((total, value) => total + value, 0);
29
30
  }
30
- exports.sumUnits = sumUnits;
31
31
  exports.default = {
32
32
  AMOUNT_SCALE: exports.AMOUNT_SCALE,
33
33
  toUnits,
@@ -5,10 +5,10 @@ exports.default = (req, { isUserCodeMandatory = true } = {}) => {
5
5
  if (!userCode && isUserCodeMandatory)
6
6
  throw new Error('Usercode is not found');
7
7
  return {
8
- userCode: req.headers['x-user'] || req.headers['userCode'],
9
- username: req.headers['x-username'] || req.headers['username'],
10
- userEmail: req.headers['x-useremail'] || req.headers['x-user-email'] || req.headers['userEmail'],
11
- isAdmin: req.headers['x-admin'] || req.headers['isAdmin'],
8
+ userCode: req.headers['x-user'] || req.headers['userCode'], //x-user -> isinya userCode
9
+ username: req.headers['x-username'] || req.headers['username'], //x-username -> isinya auth.username
10
+ userEmail: req.headers['x-useremail'] || req.headers['x-user-email'] || req.headers['userEmail'], //x-useremail -> isinya auth.username
11
+ isAdmin: req.headers['x-admin'] || req.headers['isAdmin'], //x-admin // isi 1/undefined -> jika 1 berarti admin
12
12
  isPublic: req.headers['x-public'], //x-public isi 1/undefined -> jika 1 berarti akses public
13
13
  };
14
14
  };
@@ -0,0 +1,11 @@
1
+ export declare const CUTOFF_DAY = 15;
2
+ export declare const monthsBetween: (issueDate: string | Date, actionDate: string | Date) => number | null;
3
+ export declare const requiresCreditNote: (issueDate: string | Date, actionDate: string | Date) => boolean;
4
+ export declare const canReviseInPlace: (issueDate: string | Date, actionDate: string | Date) => boolean;
5
+ declare const _default: {
6
+ CUTOFF_DAY: number;
7
+ monthsBetween: (issueDate: string | Date, actionDate: string | Date) => number | null;
8
+ requiresCreditNote: (issueDate: string | Date, actionDate: string | Date) => boolean;
9
+ canReviseInPlace: (issueDate: string | Date, actionDate: string | Date) => boolean;
10
+ };
11
+ export default _default;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.canReviseInPlace = exports.requiresCreditNote = exports.monthsBetween = exports.CUTOFF_DAY = void 0;
4
+ // Buku bulan N ditutup tanggal 15 bulan N+1. Selama periode invoice masih terbuka, revisi dan
5
+ // cancel boleh langsung ubah invoice yang sama. Kalau sudah ditutup, invoice lama harus dicancel
6
+ // dan terbit Credit Note (untuk revisi: plus invoice baru dengan nomor baru).
7
+ //
8
+ // contoh invoice terbit 1 Januari 2026:
9
+ // 31 Januari -> boleh langsung, bulannya sama
10
+ // 14 Februari -> boleh langsung, buku Januari belum ditutup
11
+ // 15 Februari -> wajib CN, buku Januari sudah ditutup
12
+ // 10 Maret -> wajib CN
13
+ exports.CUTOFF_DAY = 15;
14
+ // ambil komponen tanggalnya saja biar tidak kena geser zona waktu.
15
+ // terima Date maupun string 'YYYY-MM-DD...' seperti yang disimpan di database
16
+ const toDateParts = (value) => {
17
+ if (!value)
18
+ return null;
19
+ if (value instanceof Date) {
20
+ if (isNaN(value.getTime()))
21
+ return null;
22
+ return {
23
+ year: value.getFullYear(),
24
+ month: value.getMonth() + 1,
25
+ day: value.getDate(),
26
+ };
27
+ }
28
+ const matched = /^(\d{4})-(\d{2})-(\d{2})/.exec(`${value}`.trim());
29
+ if (!matched)
30
+ return null;
31
+ return {
32
+ year: parseInt(matched[1], 10),
33
+ month: parseInt(matched[2], 10),
34
+ day: parseInt(matched[3], 10),
35
+ };
36
+ };
37
+ const monthsBetween = (issueDate, actionDate) => {
38
+ const issue = toDateParts(issueDate);
39
+ const action = toDateParts(actionDate);
40
+ if (!issue || !action)
41
+ return null;
42
+ return ((action.year - issue.year) * 12) + (action.month - issue.month);
43
+ };
44
+ exports.monthsBetween = monthsBetween;
45
+ // true = tidak boleh diubah langsung, wajib terbitkan Credit Note.
46
+ // kalau tanggalnya tidak kebaca, balikin false biar perilaku lama (revisi langsung) tetap jalan
47
+ const requiresCreditNote = (issueDate, actionDate) => {
48
+ const monthsDiff = (0, exports.monthsBetween)(issueDate, actionDate);
49
+ const action = toDateParts(actionDate);
50
+ if (monthsDiff === null || !action)
51
+ return false;
52
+ if (monthsDiff <= 0)
53
+ return false; // masih bulan yang sama
54
+ if (monthsDiff === 1)
55
+ return action.day >= exports.CUTOFF_DAY; // buku bulan lalu ditutup tanggal 15
56
+ return true; // dua bulan atau lebih, periodenya pasti sudah tutup
57
+ };
58
+ exports.requiresCreditNote = requiresCreditNote;
59
+ const canReviseInPlace = (issueDate, actionDate) => !(0, exports.requiresCreditNote)(issueDate, actionDate);
60
+ exports.canReviseInPlace = canReviseInPlace;
61
+ exports.default = {
62
+ CUTOFF_DAY: exports.CUTOFF_DAY,
63
+ monthsBetween: exports.monthsBetween,
64
+ requiresCreditNote: exports.requiresCreditNote,
65
+ canReviseInPlace: exports.canReviseInPlace,
66
+ };
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function loop(list, callback, result = []) {
13
- return __awaiter(this, void 0, void 0, function* () {
12
+ function loop(list_1, callback_1) {
13
+ return __awaiter(this, arguments, void 0, function* (list, callback, result = []) {
14
14
  if (list && list.length > 0) {
15
15
  const [head, ...tail] = list;
16
16
  return loop(tail, callback, [yield callback(head), ...result]);
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- function loop(list, callback, result = []) {
13
- return __awaiter(this, void 0, void 0, function* () {
12
+ function loop(list_1, callback_1) {
13
+ return __awaiter(this, arguments, void 0, function* (list, callback, result = []) {
14
14
  if (list && list.length > 0) {
15
15
  const [head, ...tail] = list;
16
16
  return loop(tail, callback, [...result, yield callback(head)]);
@@ -1,5 +1,3 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
1
  import IReadExcel from '../interface/read.excel.interface';
4
2
  declare function readExcel(file: Buffer, data: IReadExcel): Promise<any>;
5
3
  export default readExcel;