From 55f203ee96d71ba38c8cb3eecbe4a4eff4f3c668 Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <gua@adhisimon.org>
Date: Wed, 11 Apr 2018 17:08:38 +0700
Subject: [PATCH] kelas kwh

---
 partner-simplepay.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/partner-simplepay.js b/partner-simplepay.js
index 51a57d5..e80a595 100644
--- a/partner-simplepay.js
+++ b/partner-simplepay.js
@@ -377,12 +377,13 @@ function _createSnFromReverseReport(qs) {
     const info = _parseInfoFromReverseReport(qs.info);
     if (info) {
         const cust_name = (typeof info.cust_name === 'string') ? info.cust_name.replace(/\W+/g, '-').replace(/^\W+/, '').replace(/\W+$/, '') : '-';
-        const kelas = (typeof info.kelas === 'string') ? info.kelas.replace(/\W+/g, '-').replace(/^\W+/, '').replace(/\W+$/, '') : '-';
-        const kwh = (typeof info.size === 'string') ? info.size.replace(/\W+/g, '-').replace(/^\W+/, '').replace(/\W+$/, '') : '-';
+        const kelas = (typeof info.kelas === 'string') ? info.kelas.trim() : '-';
+        const kwh = (typeof info.size === 'string') ? info.size.trim() : '-';
 
         sn = [
             token || '-',
             cust_name || '-',
+            kelas || '-',
             kwh || '-'
         ].join('/');
     }
-- 
1.9.0