- fix when response is PLN Quota with user name using space
This commit is contained in:
parent
0e61523dab
commit
cb23ec16ae
|
@ -1488,7 +1488,17 @@ export class TransactionService {
|
|||
responseBaru[10].length > 1 ? responseBaru[10] : responseBaru[9];
|
||||
|
||||
if (dataTransaction.seri_number == 'SN:') {
|
||||
dataTransaction.seri_number = responseBaru[11];
|
||||
const s = 'SN: '
|
||||
const index = response.indexOf(s);
|
||||
const subIndex = index + s.length;
|
||||
const newRes = response.substring(subIndex);
|
||||
if (newRes.includes(' .')) {
|
||||
const splitRes = newRes.split(' .')
|
||||
const serialNumber = splitRes[0];
|
||||
dataTransaction.seri_number = serialNumber
|
||||
} else {
|
||||
dataTransaction.seri_number = responseBaru[11];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user