?
Current Path : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Accounting/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Accounting/decimal2roman.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <?php function romanNumerals($num) { $n = intval($num); $res = ''; /*** roman_numerals array ***/ $roman_numerals = array( 'm' => 1000, 'cm' => 900, 'd' => 500, 'cd' => 400, 'c' => 100, 'xc' => 90, 'l' => 50, 'xl' => 40, 'x' => 10, 'ix' => 9, 'v' => 5, 'iv' => 4, 'i' => 1); foreach ($roman_numerals as $roman => $number) { /*** divide to get matches ***/ $matches = intval($n / $number); /*** assign the roman char * $matches ***/ $res .= str_repeat($roman, $matches); /*** substract from the number ***/ $n = $n % $number; } /*** return the res ***/ return $res; } ?> <!-- if($method=='cheque') { $ch_details=$this->mastermodel->get_data_srow('receipt_cheque',$rid,'reference'); $ch_date=$ch_details->ch_date; $ch_date=$this->mastermodel->convdatformat($ch_date); $bankname=$ch_details->bank_name; $ch_no=$ch_details->cheque_no; $html.='<tr><td></td><td></td><td></td></tr><tr><td>Cheque Date :</td><td>:</td><td>'.$ch_date.'</td></tr>'; $html.='<tr><td></td><td></td><td></td></tr><tr><td>Cheque Drawn on :</td><td>:</td><td>'.$bankname.'</td></tr>'; $html.='<tr><td></td><td></td><td></td></tr><tr><td>Cheque No. :</td><td>:</td><td>'.$ch_no.'</td></tr>'; } -->