Skip to content

Commit

Permalink
fixed duplication of rupee symbol to be work for both ubuntu and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hitswa committed May 5, 2018
1 parent 048d2a8 commit 170a1be
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
}

function numberToCurrency($number) {
if(setlocale(LC_MONETARY, 'en_IN'))
return money_format('%.0n', $number);
else {
// if(setlocale(LC_MONETARY, 'en_IN'))
// return money_format('%.0n', $number);
// else {
$explrestunits = "" ;
$number = explode('.', $number);
$num = $number[0];
Expand Down Expand Up @@ -76,9 +76,11 @@ function numberToCurrency($number) {
}

// return '₹ ' . $thecash;
}
// }
}



function dateFormatter($date) {
$date = explode('-', $date);
$year = $date[0];
Expand Down Expand Up @@ -273,7 +275,7 @@ function dateFormatter($date) {
<table>
<tr class="fullWidth">
<td class="grayscale fullWidth tenPadding alignTop">
<b>Balance Due (INR) <span class="pull-right totalAmount"> <?php echo numberToCurrency($finalAmount); ?></span></b>
<b>Balance Due (INR) <span class="pull-right totalAmount">&#8377; <?php echo numberToCurrency($finalAmount); ?></span></b>
</td>
</tr>
</table>
Expand Down Expand Up @@ -343,7 +345,7 @@ function dateFormatter($date) {
</tr>
<tr class="grayscale tenPadding">
<td class="tenPadding"><b>Balance due (INR)</b></td>
<td class="tableRightValue totalAmount"><b> <?php echo numberToCurrency($finalAmount); ?></b></td>
<td class="tableRightValue totalAmount"><b>&#8377; <?php echo numberToCurrency($finalAmount); ?></b></td>
</tr>
</table>

Expand Down Expand Up @@ -407,11 +409,11 @@ function dateFormatter($date) {
</tr>
<tr class="borderBottom">
<td><b>Balance Due (INR)</b></td>
<td class="align-right totalAmount"> <?php echo numberToCurrency($finalAmount); ?></td>
<td class="align-right totalAmount">&#8377; <?php echo numberToCurrency($finalAmount); ?></td>
</tr>
<tr class="borderBottom">
<td><b>Amount Enclosed</b></td>
<td class="align-right totalAmount"> <?php echo numberToCurrency($finalAmount); ?></td>
<td class="align-right totalAmount">&#8377; <?php echo numberToCurrency($finalAmount); ?></td>
</tr>
</table>
</td>
Expand Down

0 comments on commit 170a1be

Please sign in to comment.