mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 19:14:40 -04:00
Merge branch 'master' of github.com:hillelcoren/invoice-ninja
This commit is contained in:
commit
f431426469
@ -128,6 +128,7 @@ class ConstantsSeeder extends Seeder
|
||||
Currency::create(array('name' => 'Rand', 'code' => 'ZAR', 'symbol' => 'R', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
Currency::create(array('name' => 'Danish Krone', 'code' => 'DKK', 'symbol' => 'kr ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
Currency::create(array('name' => 'Israeli Shekel', 'code' => 'ILS', 'symbol' => 'NIS ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
Currency::create(array('name' => 'Singapore Dollar', 'code' => 'SGD', 'symbol' => 'SGD ', 'precision' => '2', 'thousand_separator' => ',', 'decimal_separator' => '.'));
|
||||
|
||||
DatetimeFormat::create(array('format' => 'd/M/Y g:i a', 'label' => '10/Mar/2013'));
|
||||
DatetimeFormat::create(array('format' => 'd-M-Yk g:i a', 'label' => '10-Mar-2013'));
|
||||
|
@ -140,6 +140,19 @@ class Utils
|
||||
|
||||
$phoneNumber = '+'.$countryCode.' ('.$areaCode.') '.$nextThree.'-'.$lastFour;
|
||||
}
|
||||
else if(strlen($phoneNumber) == 10 && in_array(substr($phoneNumber, 0, 3), array(653, 656, 658, 659))) {
|
||||
/**
|
||||
* SG country code are 653, 656, 658, 659
|
||||
* US area code consist of 650, 651 and 657
|
||||
* @see http://en.wikipedia.org/wiki/Telephone_numbers_in_Singapore#Numbering_plan
|
||||
* @see http://www.bennetyee.org/ucsd-pages/area.html
|
||||
*/
|
||||
$countryCode = substr($phoneNumber, 0, 2);
|
||||
$nextFour = substr($phoneNumber, 2, 4);
|
||||
$lastFour = substr($phoneNumber, 6, 4);
|
||||
|
||||
$phoneNumber = '+'.$countryCode.' '.$nextFour.' '.$lastFour;
|
||||
}
|
||||
else if(strlen($phoneNumber) == 10) {
|
||||
$areaCode = substr($phoneNumber, 0, 3);
|
||||
$nextThree = substr($phoneNumber, 3, 3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user