@ntlab/sipd-agr 3.7.0 → 3.8.0
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,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntlab/sipd-agr",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"description": "SIPD RI Kemendagri Automation is a web automation using Selenium to help manage data such as budgeting download",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"author": "Toha <tohenk@yahoo.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@ntlab/ntlib": "^2.6.2",
|
|
10
|
-
"@ntlab/webrobot": "^1.
|
|
10
|
+
"@ntlab/webrobot": "^1.13.0",
|
|
11
11
|
"@ntlab/work": "^2.3.0",
|
|
12
12
|
"debug": "^4.4.1",
|
|
13
13
|
"exceljs": "^4.4.0",
|
|
@@ -187,6 +187,14 @@ class SipdAgrRinci {
|
|
|
187
187
|
this.fromJson(data);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
isHibahUang(data) {
|
|
191
|
+
if (data && data.nama_akun !== undefined) {
|
|
192
|
+
const rek = data.nama_akun.toLowerCase();
|
|
193
|
+
return rek.includes('hibah uang') && !rek.includes('dana bos') ? true : false;
|
|
194
|
+
}
|
|
195
|
+
return false;
|
|
196
|
+
}
|
|
197
|
+
|
|
190
198
|
fromJson(data) {
|
|
191
199
|
this.ref = data.id_rinci_sub_bl;
|
|
192
200
|
this.ssh = data.kode_standar_harga;
|
|
@@ -196,9 +204,7 @@ class SipdAgrRinci {
|
|
|
196
204
|
this.volume = SipdUtil.makeFloat(data.koefisien);
|
|
197
205
|
this.total = SipdUtil.makeFloat(data.total_harga);
|
|
198
206
|
this.satuan = data.koefisien.substr(this.volume.toString().length);
|
|
199
|
-
if (
|
|
200
|
-
data.penerima_bantuan ||
|
|
201
|
-
(data.subs_bl_teks && data.subs_bl_teks.toLowerCase().indexOf('hibah') >= 0)) {
|
|
207
|
+
if (this.isHibahUang(data)) {
|
|
202
208
|
const penerima = SipdUtil.cleanText(data.penerima_bantuan);
|
|
203
209
|
let uraian = SipdUtil.cleanText(data.ket_bl_teks);
|
|
204
210
|
if (uraian) {
|