fixed SMS Units and Charge display
This commit is contained in:
@@ -53,15 +53,17 @@
|
||||
const theSmsChargeTotalValue = document.getElementById('smsUnitsCharge');
|
||||
theReportRange.innerHTML = data.reportDate;
|
||||
|
||||
const formattedTNMUnits = Number(data['TNM SMSUnits']).toLocaleString('en-GH');
|
||||
//const formattedTNMUnits = Number(data.tnm_sms_units']).toLocaleString('en-GH');
|
||||
|
||||
const formattedAirtelUnits = Number(data.data['Airtel SMSUnits']).toLocaleString('en-GH', {
|
||||
minimumFractionDigits: 2,
|
||||
maximumFractionDigits: 2
|
||||
});
|
||||
// const formattedAirtelUnits = Number(data.data['airtel_sms_units']).toLocaleString('en-GH', {
|
||||
// minimumFractionDigits: 2,
|
||||
// maximumFractionDigits: 2
|
||||
// });
|
||||
|
||||
theSmsChargeTotalValue.innerHTML = 'SMS Charge(MWK) : ' + data.charge_computation;
|
||||
theSmsUnitsValue.innerHTML = `SMS Units: Airtel ${formattedAirtelUnits} | TNM: ${formattedTNMUnits}`;
|
||||
theSmsChargeTotalValue.innerHTML = 'SMS Charge (MWK) : <b>' + data.charge_computation + '</b>';
|
||||
console.log(data.charge_computation);
|
||||
console.log(data.airtel_sms_units);
|
||||
theSmsUnitsValue.innerHTML = 'SMS Units: Airtel <b>' + data.airtel_sms_units + '</b> | TNM: <b>' + data.tnm_sms_units + '</b>';
|
||||
})
|
||||
.catch(error => console.error('Error:', error));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user