Commit e81698329765bf70dffb2c8db9b2f15190e38920
1 parent
37f835929d
Exists in
master
Add pending on last digit of destination is 0
Showing 1 changed file with 10 additions and 1 deletions Side-by-side Diff
lib/partner.js
... | ... | @@ -10,7 +10,16 @@ function buy(task, xid) { |
10 | 10 | |
11 | 11 | setTimeout( |
12 | 12 | () => { |
13 | - if (task.destination % 2) { | |
13 | + const destination = task.destination.toString(); | |
14 | + | |
15 | + if ((destination % 10) === 0) { | |
16 | + pull.report({ | |
17 | + trx_id: task.trx_id, | |
18 | + rc: '68', | |
19 | + message: `PENDING karena nomor tujuan ${task.destination} diakhiri 0`, | |
20 | + balance: config.supplier_ending_balance, | |
21 | + }); | |
22 | + } else if (destination % 2) { | |
14 | 23 | pull.report({ |
15 | 24 | trx_id: task.trx_id, |
16 | 25 | rc: '14', |