In my application, I am utilizing the MEAN stack with AngularJS for the front-end. I have a table that contains two values - 'Payment value' with commas and 'commission' without commas. How can I multiply these two values? For example: in a transaction where the payment value is 1,925.10 and the commission value is 3, the result would be 1,925.10*3 = 5775.3...
Another example: In a transaction where the payment value is 1,925.10 and the commission value is 5, the multiplication of these values will be 1,925.10*5 = 9625.5...
My HTML:
<td >{{mani.payment }}</td>
<td >{{mani.commission}}</td>
<td >{{(mani.payment) * (mani.commission)}}</td>
My Data:
{
"_id": "5816f4fad0be79f809519f98",
"user": {
"_id": "57400c32bd07906c1308e2cf",
"displayName": "mani selvam"
},
"__v": 0,
"created": "2016-10-31T07:38:34.999Z",
"remarks": "-",
"commission": "3",
"status": "pending",
"amt": "4000",
"cheque_currency": "Rs",
"cheque_value": "300",
"payment": "1,925.10",
"debitnote_no_payment": "3",
"supplier_name": "karikalan",
"buyer_name": "Manidesigns"
},
{
"_id": "5816f4fad0be79f809519f98",
"user": {
"_id": "57400c32bd07906c1308e2cf",
"displayName": "mani selvam"
},
"__v": 0,
"created": "2016-10-31T07:38:34.999Z",
"remarks": "-",
"commission": "5",
"status": "pending",
"amt": "2000",
"cheque_currency": "Rs",
"cheque_value": "300",
"payment": "1,925.10",
"debitnote_no_payment": "3",
"supplier_name": "karikalan",
"buyer_name": "Manidesigns"
},
I have created a Plunker for reference: Plunker