Add support for additional currencies + improve how currencies are displayed

This commit is contained in:
Dave Earley 2016-08-12 13:02:37 +01:00
parent b1a6f6698e
commit 3b804b00d5
24 changed files with 888 additions and 632 deletions

View File

@ -2,35 +2,15 @@
if(!function_exists('money')) {
/**
* @param int $amount
* @param string $currency_code
* @param int $decimals
* @param string $dec_point
* @param string $thousands_sep
* Format a given amount to the given currency
*
* @param $amount
* @param \App\Models\Currency $currency
* @return string
*/
function money($amount, $currency_code = '', $decimals = 2, $dec_point = '.', $thousands_sep = ',')
function money($amount, \App\Models\Currency $currency)
{
switch ($currency_code) {
case 'USD':
case 'AUD':
case 'CAD':
$currency_symbol = '$';
break;
case 'EUR':
$currency_symbol = '€';
break;
case 'GBP':
$currency_symbol = '£';
break;
default:
$currency_symbol = '';
break;
}
return $currency_symbol . number_format($amount, $decimals, $dec_point, $thousands_sep);
return $currency->symbol_left . number_format($amount, $currency->decimal_place, $currency->decimal_point, $currency->thousand_point) . $currency->symbol_right;
}
}

View File

@ -147,7 +147,7 @@ class EventOrdersController extends MyBaseController
} elseif ($order->organiser_amount == 0) {
$error_message = 'Nothing to refund';
} elseif ($refund_type !== 'full' && $refund_amount > round(($order->organiser_amount - $order->amount_refunded), 2)) {
$error_message = 'The maximum amount you can refund is '.(money($order->organiser_amount - $order->amount_refunded, $order->event->currency->code));
$error_message = 'The maximum amount you can refund is '.(money($order->organiser_amount - $order->amount_refunded, $order->event->currency));
}
if (!$error_message) {
try {

View File

@ -1,558 +0,0 @@
<?php
use Illuminate\Database\Seeder;
class ConstantsSeeder extends Seeder
{
public function run()
{
$order_statuses = [
[
'id' => 1,
'name' => 'Completed',
],
[
'id' => 2,
'name' => 'Refunded',
],
[
'id' => 3,
'name' => 'Partially Refunded',
],
[
'id' => 4,
'name' => 'Cancelled',
],
];
DB::table('order_statuses')->insert($order_statuses);
$ticket_statuses = [
[
'id' => 1,
'name' => 'Sold Out',
],
[
'id' => 2,
'name' => 'Sales Have Ended',
],
[
'id' => 3,
'name' => 'Not On Sale Yet',
],
[
'id' => 4,
'name' => 'On Sale',
],
[
'id' => 5,
'name' => 'On Sale',
],
];
DB::table('ticket_statuses')->insert($ticket_statuses);
$currencies = [
[
'id' => 1,
'title' => 'U.S. Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'USD',
'decimal_place' => 2,
'value' => 1.00000000,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 2,
'title' => 'Euro',
'symbol_left' => '€',
'symbol_right' => '',
'code' => 'EUR',
'decimal_place' => 2,
'value' => 0.74970001,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 3,
'title' => 'Pound Sterling',
'symbol_left' => '£',
'symbol_right' => '',
'code' => 'GBP',
'decimal_place' => 2,
'value' => 0.62220001,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 4,
'title' => 'Australian Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'AUD',
'decimal_place' => 2,
'value' => 0.94790000,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 5,
'title' => 'Canadian Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'CAD',
'decimal_place' => 2,
'value' => 0.98500001,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
// array(
// 'id' => 6,
// 'title' => 'Czech Koruna',
// 'symbol_left' => '',
// 'symbol_right' => 'Kč',
// 'code' => 'CZK',
// 'decimal_place' => 2,
// 'value' => 19.16900063,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 7,
// 'title' => 'Danish Krone',
// 'symbol_left' => 'kr',
// 'symbol_right' => '',
// 'code' => 'DKK',
// 'decimal_place' => 2,
// 'value' => 5.59420013,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 8,
// 'title' => 'Hong Kong Dollar',
// 'symbol_left' => '$',
// 'symbol_right' => '',
// 'code' => 'HKD',
// 'decimal_place' => 2,
// 'value' => 7.75290012,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 9,
// 'title' => 'Hungarian Forint',
// 'symbol_left' => 'Ft',
// 'symbol_right' => '',
// 'code' => 'HUF',
// 'decimal_place' => 2,
// 'value' => 221.27000427,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 10,
// 'title' => 'Israeli New Sheqel',
// 'symbol_left' => '?',
// 'symbol_right' => '',
// 'code' => 'ILS',
// 'decimal_place' => 2,
// 'value' => 3.73559999,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 11,
// 'title' => 'Japanese Yen',
// 'symbol_left' => '¥',
// 'symbol_right' => '',
// 'code' => 'JPY',
// 'decimal_place' => 2,
// 'value' => 88.76499939,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 12,
// 'title' => 'Mexican Peso',
// 'symbol_left' => '$',
// 'symbol_right' => '',
// 'code' => 'MXN',
// 'decimal_place' => 2,
// 'value' => 12.63899994,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 13,
// 'title' => 'Norwegian Krone',
// 'symbol_left' => 'kr',
// 'symbol_right' => '',
// 'code' => 'NOK',
// 'decimal_place' => 2,
// 'value' => 5.52229977,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 14,
// 'title' => 'New Zealand Dollar',
// 'symbol_left' => '$',
// 'symbol_right' => '',
// 'code' => 'NZD',
// 'decimal_place' => 2,
// 'value' => 1.18970001,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 15,
// 'title' => 'Philippine Peso',
// 'symbol_left' => 'Php',
// 'symbol_right' => '',
// 'code' => 'PHP',
// 'decimal_place' => 2,
// 'value' => 40.58000183,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 16,
// 'title' => 'Polish Zloty',
// 'symbol_left' => '',
// 'symbol_right' => 'zł',
// 'code' => 'PLN',
// 'decimal_place' => 2,
// 'value' => 3.08590007,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 17,
// 'title' => 'Singapore Dollar',
// 'symbol_left' => '$',
// 'symbol_right' => '',
// 'code' => 'SGD',
// 'decimal_place' => 2,
// 'value' => 1.22560000,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 18,
// 'title' => 'Swedish Krona',
// 'symbol_left' => 'kr',
// 'symbol_right' => '',
// 'code' => 'SEK',
// 'decimal_place' => 2,
// 'value' => 6.45870018,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 19,
// 'title' => 'Swiss Franc',
// 'symbol_left' => 'CHF',
// 'symbol_right' => '',
// 'code' => 'CHF',
// 'decimal_place' => 2,
// 'value' => 0.92259997,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 20,
// 'title' => 'Taiwan New Dollar',
// 'symbol_left' => 'NT$',
// 'symbol_right' => '',
// 'code' => 'TWD',
// 'decimal_place' => 2,
// 'value' => 28.95199966,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// ),
// array(
// 'id' => 21,
// 'title' => 'Thai Baht',
// 'symbol_left' => '฿',
// 'symbol_right' => '',
// 'code' => 'THB',
// 'decimal_place' => 2,
// 'value' => 30.09499931,
// 'decimal_point' => '.',
// 'thousand_point' => ',',
// 'status' => 1,
// 'created_at' => '2013-11-29 19:51:38',
// 'updated_at' => '2013-11-29 19:51:38',
// )
];
DB::table('currencies')->insert($currencies);
\App\Models\DateTimeFormat::create([
'format' => 'd/M/Y g:i a',
'picker_format' => '',
'label' => '10/Mar/2016'
]);
\App\Models\DateTimeFormat::create([
'format' => 'd-M-Y g:i a',
'picker_format' => '',
'label' => '10-Mar-2016'
]);
\App\Models\DateTimeFormat::create([
'format' => 'd/F/Y g:i a',
'picker_format' => '',
'label' => '10/March/2016'
]);
\App\Models\DateTimeFormat::create([
'format' => 'd-F-Y g:i a',
'picker_format' => '',
'label' => '10-March-2016'
]);
\App\Models\DateTimeFormat::create([
'format' => 'M j, Y g:i a',
'picker_format' => '',
'label' => 'Mar 10, 2016 6:15 pm'
]);
\App\Models\DateTimeFormat::create([
'format' => 'F j, Y g:i a',
'picker_format' => '',
'label' => 'March 10, 2016 6:15 pm'
]);
\App\Models\DateTimeFormat::create([
'format' => 'D M jS, Y g:ia',
'picker_format' => '',
'label' => 'Mon March 10th, 2016 6:15 pm'
]);
\App\Models\DateFormat::create([
'format' => 'd/M/Y', 'picker_format' => 'dd/M/yyyy', 'label' => '10/Mar/2013']);
\App\Models\DateFormat::create([
'format' => 'd-M-Y', 'picker_format' => 'dd-M-yyyy', 'label' => '10-Mar-2013']);
\App\Models\DateFormat::create([
'format' => 'd/F/Y', 'picker_format' => 'dd/MM/yyyy', 'label' => '10/March/2013']);
\App\Models\DateFormat::create([
'format' => 'd-F-Y', 'picker_format' => 'dd-MM-yyyy', 'label' => '10-March-2013']);
\App\Models\DateFormat::create([
'format' => 'M j, Y', 'picker_format' => 'M d, yyyy', 'label' => 'Mar 10, 2013']);
\App\Models\DateFormat::create([
'format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013']);
\App\Models\DateFormat::create([
'format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013']);
$timezones = [
'Pacific/Midway' => '(GMT-11:00) Midway Island',
'US/Samoa' => '(GMT-11:00) Samoa',
'US/Hawaii' => '(GMT-10:00) Hawaii',
'US/Alaska' => '(GMT-09:00) Alaska',
'US/Pacific' => '(GMT-08:00) Pacific Time (US &amp; Canada)',
'America/Tijuana' => '(GMT-08:00) Tijuana',
'US/Arizona' => '(GMT-07:00) Arizona',
'US/Mountain' => '(GMT-07:00) Mountain Time (US &amp; Canada)',
'America/Chihuahua' => '(GMT-07:00) Chihuahua',
'America/Mazatlan' => '(GMT-07:00) Mazatlan',
'America/Mexico_City' => '(GMT-06:00) Mexico City',
'America/Monterrey' => '(GMT-06:00) Monterrey',
'Canada/Saskatchewan' => '(GMT-06:00) Saskatchewan',
'US/Central' => '(GMT-06:00) Central Time (US &amp; Canada)',
'US/Eastern' => '(GMT-05:00) Eastern Time (US &amp; Canada)',
'US/East-Indiana' => '(GMT-05:00) Indiana (East)',
'America/Bogota' => '(GMT-05:00) Bogota',
'America/Lima' => '(GMT-05:00) Lima',
'America/Caracas' => '(GMT-04:30) Caracas',
'Canada/Atlantic' => '(GMT-04:00) Atlantic Time (Canada)',
'America/La_Paz' => '(GMT-04:00) La Paz',
'America/Santiago' => '(GMT-04:00) Santiago',
'Canada/Newfoundland' => '(GMT-03:30) Newfoundland',
'America/Buenos_Aires' => '(GMT-03:00) Buenos Aires',
'Greenland' => '(GMT-03:00) Greenland',
'Atlantic/Stanley' => '(GMT-02:00) Stanley',
'Atlantic/Azores' => '(GMT-01:00) Azores',
'Atlantic/Cape_Verde' => '(GMT-01:00) Cape Verde Is.',
'Africa/Casablanca' => '(GMT) Casablanca',
'Europe/Dublin' => '(GMT) Dublin',
'Europe/Lisbon' => '(GMT) Lisbon',
'Europe/London' => '(GMT) London',
'Africa/Monrovia' => '(GMT) Monrovia',
'Europe/Amsterdam' => '(GMT+01:00) Amsterdam',
'Europe/Belgrade' => '(GMT+01:00) Belgrade',
'Europe/Berlin' => '(GMT+01:00) Berlin',
'Europe/Bratislava' => '(GMT+01:00) Bratislava',
'Europe/Brussels' => '(GMT+01:00) Brussels',
'Europe/Budapest' => '(GMT+01:00) Budapest',
'Europe/Copenhagen' => '(GMT+01:00) Copenhagen',
'Europe/Ljubljana' => '(GMT+01:00) Ljubljana',
'Europe/Madrid' => '(GMT+01:00) Madrid',
'Europe/Paris' => '(GMT+01:00) Paris',
'Europe/Prague' => '(GMT+01:00) Prague',
'Europe/Rome' => '(GMT+01:00) Rome',
'Europe/Sarajevo' => '(GMT+01:00) Sarajevo',
'Europe/Skopje' => '(GMT+01:00) Skopje',
'Europe/Stockholm' => '(GMT+01:00) Stockholm',
'Europe/Vienna' => '(GMT+01:00) Vienna',
'Europe/Warsaw' => '(GMT+01:00) Warsaw',
'Europe/Zagreb' => '(GMT+01:00) Zagreb',
'Europe/Athens' => '(GMT+02:00) Athens',
'Europe/Bucharest' => '(GMT+02:00) Bucharest',
'Africa/Cairo' => '(GMT+02:00) Cairo',
'Africa/Harare' => '(GMT+02:00) Harare',
'Europe/Helsinki' => '(GMT+02:00) Helsinki',
'Europe/Istanbul' => '(GMT+02:00) Istanbul',
'Asia/Jerusalem' => '(GMT+02:00) Jerusalem',
'Europe/Kiev' => '(GMT+02:00) Kyiv',
'Europe/Minsk' => '(GMT+02:00) Minsk',
'Europe/Riga' => '(GMT+02:00) Riga',
'Europe/Sofia' => '(GMT+02:00) Sofia',
'Europe/Tallinn' => '(GMT+02:00) Tallinn',
'Europe/Vilnius' => '(GMT+02:00) Vilnius',
'Asia/Baghdad' => '(GMT+03:00) Baghdad',
'Asia/Kuwait' => '(GMT+03:00) Kuwait',
'Africa/Nairobi' => '(GMT+03:00) Nairobi',
'Asia/Riyadh' => '(GMT+03:00) Riyadh',
'Asia/Tehran' => '(GMT+03:30) Tehran',
'Europe/Moscow' => '(GMT+04:00) Moscow',
'Asia/Baku' => '(GMT+04:00) Baku',
'Europe/Volgograd' => '(GMT+04:00) Volgograd',
'Asia/Muscat' => '(GMT+04:00) Muscat',
'Asia/Tbilisi' => '(GMT+04:00) Tbilisi',
'Asia/Yerevan' => '(GMT+04:00) Yerevan',
'Asia/Kabul' => '(GMT+04:30) Kabul',
'Asia/Karachi' => '(GMT+05:00) Karachi',
'Asia/Tashkent' => '(GMT+05:00) Tashkent',
'Asia/Kolkata' => '(GMT+05:30) Kolkata',
'Asia/Kathmandu' => '(GMT+05:45) Kathmandu',
'Asia/Yekaterinburg' => '(GMT+06:00) Ekaterinburg',
'Asia/Almaty' => '(GMT+06:00) Almaty',
'Asia/Dhaka' => '(GMT+06:00) Dhaka',
'Asia/Novosibirsk' => '(GMT+07:00) Novosibirsk',
'Asia/Bangkok' => '(GMT+07:00) Bangkok',
'Asia/Jakarta' => '(GMT+07:00) Jakarta',
'Asia/Krasnoyarsk' => '(GMT+08:00) Krasnoyarsk',
'Asia/Chongqing' => '(GMT+08:00) Chongqing',
'Asia/Hong_Kong' => '(GMT+08:00) Hong Kong',
'Asia/Kuala_Lumpur' => '(GMT+08:00) Kuala Lumpur',
'Australia/Perth' => '(GMT+08:00) Perth',
'Asia/Singapore' => '(GMT+08:00) Singapore',
'Asia/Taipei' => '(GMT+08:00) Taipei',
'Asia/Ulaanbaatar' => '(GMT+08:00) Ulaan Bataar',
'Asia/Urumqi' => '(GMT+08:00) Urumqi',
'Asia/Irkutsk' => '(GMT+09:00) Irkutsk',
'Asia/Seoul' => '(GMT+09:00) Seoul',
'Asia/Tokyo' => '(GMT+09:00) Tokyo',
'Australia/Adelaide' => '(GMT+09:30) Adelaide',
'Australia/Darwin' => '(GMT+09:30) Darwin',
'Asia/Yakutsk' => '(GMT+10:00) Yakutsk',
'Australia/Brisbane' => '(GMT+10:00) Brisbane',
'Australia/Canberra' => '(GMT+10:00) Canberra',
'Pacific/Guam' => '(GMT+10:00) Guam',
'Australia/Hobart' => '(GMT+10:00) Hobart',
'Australia/Melbourne' => '(GMT+10:00) Melbourne',
'Pacific/Port_Moresby' => '(GMT+10:00) Port Moresby',
'Australia/Sydney' => '(GMT+10:00) Sydney',
'Asia/Vladivostok' => '(GMT+11:00) Vladivostok',
'Asia/Magadan' => '(GMT+12:00) Magadan',
'Pacific/Auckland' => '(GMT+12:00) Auckland',
'Pacific/Fiji' => '(GMT+12:00) Fiji',
];
foreach ($timezones as $name => $location) {
\App\Models\Timezone::create(['name' => $name, 'location' => $location]);
}
$payment_gateways = [
[
'id' => 1,
'name' => 'Stripe',
'provider_name' => 'Stripe',
'provider_url' => 'https://www.stripe.com',
'is_on_site' => 1,
'can_refund' => 1,
],
[
'id' => 2,
'name' => 'PayPal_Express',
'provider_name' => 'PayPal Express',
'provider_url' => 'https://www.paypal.com',
'is_on_site' => 0,
'can_refund' => 0
],
[
'id' => 3,
'name' => 'Coinbase',
'provider_name' => 'Coinbase',
'provider_url' => 'https://coinbase.com',
'is_on_site' => 0,
'can_refund' => 0,
],
];
DB::table('payment_gateways')->insert($payment_gateways);
}
}

View File

@ -0,0 +1,532 @@
<?php
use Illuminate\Database\Seeder;
class CurrencySeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Schema::disableForeignKeyConstraints();
DB::table('currencies')->delete();
Schema::enableForeignKeyConstraints();
$currencies = [
[
'id' => 1,
'title' => 'U.S. Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'USD',
'decimal_place' => 2,
'value' => 1.00000000,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 2,
'title' => 'Euro',
'symbol_left' => '€',
'symbol_right' => '',
'code' => 'EUR',
'decimal_place' => 2,
'value' => 0.74970001,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 3,
'title' => 'Pound Sterling',
'symbol_left' => '£',
'symbol_right' => '',
'code' => 'GBP',
'decimal_place' => 2,
'value' => 0.62220001,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 4,
'title' => 'Australian Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'AUD',
'decimal_place' => 2,
'value' => 0.94790000,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 5,
'title' => 'Canadian Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'CAD',
'decimal_place' => 2,
'value' => 0.98500001,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 6,
'title' => 'Czech Koruna',
'symbol_left' => '',
'symbol_right' => 'Kč',
'code' => 'CZK',
'decimal_place' => 2,
'value' => 19.16900063,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 7,
'title' => 'Danish Krone',
'symbol_left' => 'kr',
'symbol_right' => '',
'code' => 'DKK',
'decimal_place' => 2,
'value' => 5.59420013,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 8,
'title' => 'Hong Kong Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'HKD',
'decimal_place' => 2,
'value' => 7.75290012,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 9,
'title' => 'Hungarian Forint',
'symbol_left' => 'Ft',
'symbol_right' => '',
'code' => 'HUF',
'decimal_place' => 2,
'value' => 221.27000427,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 10,
'title' => 'Israeli New Sheqel',
'symbol_left' => '?',
'symbol_right' => '',
'code' => 'ILS',
'decimal_place' => 2,
'value' => 3.73559999,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 11,
'title' => 'Japanese Yen',
'symbol_left' => '¥',
'symbol_right' => '',
'code' => 'JPY',
'decimal_place' => 2,
'value' => 88.76499939,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 12,
'title' => 'Mexican Peso',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'MXN',
'decimal_place' => 2,
'value' => 12.63899994,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 13,
'title' => 'Norwegian Krone',
'symbol_left' => 'kr',
'symbol_right' => '',
'code' => 'NOK',
'decimal_place' => 2,
'value' => 5.52229977,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 14,
'title' => 'New Zealand Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'NZD',
'decimal_place' => 2,
'value' => 1.18970001,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 15,
'title' => 'Philippine Peso',
'symbol_left' => 'Php',
'symbol_right' => '',
'code' => 'PHP',
'decimal_place' => 2,
'value' => 40.58000183,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 16,
'title' => 'Polish Zloty',
'symbol_left' => '',
'symbol_right' => 'zł',
'code' => 'PLN',
'decimal_place' => 2,
'value' => 3.08590007,
'decimal_point' => ',',
'thousand_point' => '.',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 17,
'title' => 'Singapore Dollar',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'SGD',
'decimal_place' => 2,
'value' => 1.22560000,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 18,
'title' => 'Swedish Krona',
'symbol_left' => 'kr',
'symbol_right' => '',
'code' => 'SEK',
'decimal_place' => 2,
'value' => 6.45870018,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 19,
'title' => 'Swiss Franc',
'symbol_left' => 'CHF',
'symbol_right' => '',
'code' => 'CHF',
'decimal_place' => 2,
'value' => 0.92259997,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 20,
'title' => 'Taiwan New Dollar',
'symbol_left' => 'NT$',
'symbol_right' => '',
'code' => 'TWD',
'decimal_place' => 2,
'value' => 28.95199966,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 21,
'title' => 'Thai Baht',
'symbol_left' => '฿',
'symbol_right' => '',
'code' => 'THB',
'decimal_place' => 2,
'value' => 30.09499931,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2013-11-29 19:51:38',
'updated_at' => '2013-11-29 19:51:38',
],
[
'id' => 22,
'title' => 'Ukrainian hryvnia',
'symbol_left' => '₴',
'symbol_right' => '',
'code' => 'UAH',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 23,
'title' => 'Icelandic króna',
'symbol_left' => 'kr',
'symbol_right' => '',
'code' => 'ISK',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 24,
'title' => 'Croatian kuna',
'symbol_left' => 'kn',
'symbol_right' => '',
'code' => 'HRK',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 25,
'title' => 'Romanian leu',
'symbol_left' => 'lei',
'symbol_right' => '',
'code' => 'RON',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 26,
'title' => 'Bulgarian lev',
'symbol_left' => 'лв.',
'symbol_right' => '',
'code' => 'BGN',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 27,
'title' => 'Turkish lira',
'symbol_left' => '₺',
'symbol_right' => '',
'code' => 'TRY',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 28,
'title' => 'Chilean peso',
'symbol_left' => '$',
'symbol_right' => '',
'code' => 'CLP',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 29,
'title' => 'South African rand',
'symbol_left' => 'R',
'symbol_right' => '',
'code' => 'ZAR',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 30,
'title' => 'Brazilian real',
'symbol_left' => 'R$',
'symbol_right' => '',
'code' => 'BRL',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 31,
'title' => 'Malaysian ringgit',
'symbol_left' => 'RM',
'symbol_right' => '',
'code' => 'MYR',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 32,
'title' => 'Russian ruble',
'symbol_left' => '₽',
'symbol_right' => '',
'code' => 'RUB',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 33,
'title' => 'Indonesian rupiah',
'symbol_left' => 'Rp',
'symbol_right' => '',
'code' => 'IDR',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 34,
'title' => 'Indian rupee',
'symbol_left' => '₹',
'symbol_right' => '',
'code' => 'INR',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 35,
'title' => 'Korean won',
'symbol_left' => '₩',
'symbol_right' => '',
'code' => 'KRW',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
[
'id' => 36,
'title' => 'Renminbi',
'symbol_left' => '¥',
'symbol_right' => '',
'code' => 'CNY',
'decimal_place' => 2,
'value' => 0.00,
'decimal_point' => '.',
'thousand_point' => ',',
'status' => 1,
'created_at' => '2015-07-22 23:25:30',
'updated_at' => '2015-07-22 23:25:30',
],
];
DB::table('currencies')->insert($currencies);
}
}

View File

@ -13,14 +13,12 @@ class DatabaseSeeder extends Seeder
{
Eloquent::unguard();
$this->call('ConstantsSeeder');
$this->command->info('Seeded the constants!');
// $this->call('UserTableSeeder');
$this->call('CountriesSeeder');
$this->command->info('Seeded the countries!');
$this->call('CurrencySeeder');
$this->call('OrderStatusSeeder');
$this->call('PaymentGatewaySeeder');
$this->call('QuestionTypesSeeder');
$this->command->info('Seeded the question types!');
$this->call('TicketStatusSeeder');
$this->call('TimeZoneSeeder');
}
}

View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Seeder;
class OrderStatusSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$order_statuses = [
[
'id' => 1,
'name' => 'Completed',
],
[
'id' => 2,
'name' => 'Refunded',
],
[
'id' => 3,
'name' => 'Partially Refunded',
],
[
'id' => 4,
'name' => 'Cancelled',
],
];
DB::table('order_statuses')->insert($order_statuses);
}
}

View File

@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Seeder;
class PaymentGatewaySeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$payment_gateways = [
[
'id' => 1,
'name' => 'Stripe',
'provider_name' => 'Stripe',
'provider_url' => 'https://www.stripe.com',
'is_on_site' => 1,
'can_refund' => 1,
],
[
'id' => 2,
'name' => 'PayPal_Express',
'provider_name' => 'PayPal Express',
'provider_url' => 'https://www.paypal.com',
'is_on_site' => 0,
'can_refund' => 0
],
[
'id' => 3,
'name' => 'Coinbase',
'provider_name' => 'Coinbase',
'provider_url' => 'https://coinbase.com',
'is_on_site' => 0,
'can_refund' => 0,
],
];
DB::table('payment_gateways')->insert($payment_gateways);
}
}

View File

@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Seeder;
class TicketStatusSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$ticket_statuses = [
[
'id' => 1,
'name' => 'Sold Out',
],
[
'id' => 2,
'name' => 'Sales Have Ended',
],
[
'id' => 3,
'name' => 'Not On Sale Yet',
],
[
'id' => 4,
'name' => 'On Sale',
],
[
'id' => 5,
'name' => 'On Sale',
],
];
DB::table('ticket_statuses')->insert($ticket_statuses);
}
}

View File

@ -0,0 +1,185 @@
<?php
use Illuminate\Database\Seeder;
class TimezoneSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
\App\Models\DateTimeFormat::create([
'format' => 'd/M/Y g:i a',
'picker_format' => '',
'label' => '10/Mar/2016'
]);
\App\Models\DateTimeFormat::create([
'format' => 'd-M-Y g:i a',
'picker_format' => '',
'label' => '10-Mar-2016'
]);
\App\Models\DateTimeFormat::create([
'format' => 'd/F/Y g:i a',
'picker_format' => '',
'label' => '10/March/2016'
]);
\App\Models\DateTimeFormat::create([
'format' => 'd-F-Y g:i a',
'picker_format' => '',
'label' => '10-March-2016'
]);
\App\Models\DateTimeFormat::create([
'format' => 'M j, Y g:i a',
'picker_format' => '',
'label' => 'Mar 10, 2016 6:15 pm'
]);
\App\Models\DateTimeFormat::create([
'format' => 'F j, Y g:i a',
'picker_format' => '',
'label' => 'March 10, 2016 6:15 pm'
]);
\App\Models\DateTimeFormat::create([
'format' => 'D M jS, Y g:ia',
'picker_format' => '',
'label' => 'Mon March 10th, 2016 6:15 pm'
]);
\App\Models\DateFormat::create([
'format' => 'd/M/Y', 'picker_format' => 'dd/M/yyyy', 'label' => '10/Mar/2013']);
\App\Models\DateFormat::create([
'format' => 'd-M-Y', 'picker_format' => 'dd-M-yyyy', 'label' => '10-Mar-2013']);
\App\Models\DateFormat::create([
'format' => 'd/F/Y', 'picker_format' => 'dd/MM/yyyy', 'label' => '10/March/2013']);
\App\Models\DateFormat::create([
'format' => 'd-F-Y', 'picker_format' => 'dd-MM-yyyy', 'label' => '10-March-2013']);
\App\Models\DateFormat::create([
'format' => 'M j, Y', 'picker_format' => 'M d, yyyy', 'label' => 'Mar 10, 2013']);
\App\Models\DateFormat::create([
'format' => 'F j, Y', 'picker_format' => 'MM d, yyyy', 'label' => 'March 10, 2013']);
\App\Models\DateFormat::create([
'format' => 'D M j, Y', 'picker_format' => 'D MM d, yyyy', 'label' => 'Mon March 10, 2013']);
$timezones = [
'Pacific/Midway' => '(GMT-11:00) Midway Island',
'US/Samoa' => '(GMT-11:00) Samoa',
'US/Hawaii' => '(GMT-10:00) Hawaii',
'US/Alaska' => '(GMT-09:00) Alaska',
'US/Pacific' => '(GMT-08:00) Pacific Time (US &amp; Canada)',
'America/Tijuana' => '(GMT-08:00) Tijuana',
'US/Arizona' => '(GMT-07:00) Arizona',
'US/Mountain' => '(GMT-07:00) Mountain Time (US &amp; Canada)',
'America/Chihuahua' => '(GMT-07:00) Chihuahua',
'America/Mazatlan' => '(GMT-07:00) Mazatlan',
'America/Mexico_City' => '(GMT-06:00) Mexico City',
'America/Monterrey' => '(GMT-06:00) Monterrey',
'Canada/Saskatchewan' => '(GMT-06:00) Saskatchewan',
'US/Central' => '(GMT-06:00) Central Time (US &amp; Canada)',
'US/Eastern' => '(GMT-05:00) Eastern Time (US &amp; Canada)',
'US/East-Indiana' => '(GMT-05:00) Indiana (East)',
'America/Bogota' => '(GMT-05:00) Bogota',
'America/Lima' => '(GMT-05:00) Lima',
'America/Caracas' => '(GMT-04:30) Caracas',
'Canada/Atlantic' => '(GMT-04:00) Atlantic Time (Canada)',
'America/La_Paz' => '(GMT-04:00) La Paz',
'America/Santiago' => '(GMT-04:00) Santiago',
'Canada/Newfoundland' => '(GMT-03:30) Newfoundland',
'America/Buenos_Aires' => '(GMT-03:00) Buenos Aires',
'Greenland' => '(GMT-03:00) Greenland',
'Atlantic/Stanley' => '(GMT-02:00) Stanley',
'Atlantic/Azores' => '(GMT-01:00) Azores',
'Atlantic/Cape_Verde' => '(GMT-01:00) Cape Verde Is.',
'Africa/Casablanca' => '(GMT) Casablanca',
'Europe/Dublin' => '(GMT) Dublin',
'Europe/Lisbon' => '(GMT) Lisbon',
'Europe/London' => '(GMT) London',
'Africa/Monrovia' => '(GMT) Monrovia',
'Europe/Amsterdam' => '(GMT+01:00) Amsterdam',
'Europe/Belgrade' => '(GMT+01:00) Belgrade',
'Europe/Berlin' => '(GMT+01:00) Berlin',
'Europe/Bratislava' => '(GMT+01:00) Bratislava',
'Europe/Brussels' => '(GMT+01:00) Brussels',
'Europe/Budapest' => '(GMT+01:00) Budapest',
'Europe/Copenhagen' => '(GMT+01:00) Copenhagen',
'Europe/Ljubljana' => '(GMT+01:00) Ljubljana',
'Europe/Madrid' => '(GMT+01:00) Madrid',
'Europe/Paris' => '(GMT+01:00) Paris',
'Europe/Prague' => '(GMT+01:00) Prague',
'Europe/Rome' => '(GMT+01:00) Rome',
'Europe/Sarajevo' => '(GMT+01:00) Sarajevo',
'Europe/Skopje' => '(GMT+01:00) Skopje',
'Europe/Stockholm' => '(GMT+01:00) Stockholm',
'Europe/Vienna' => '(GMT+01:00) Vienna',
'Europe/Warsaw' => '(GMT+01:00) Warsaw',
'Europe/Zagreb' => '(GMT+01:00) Zagreb',
'Europe/Athens' => '(GMT+02:00) Athens',
'Europe/Bucharest' => '(GMT+02:00) Bucharest',
'Africa/Cairo' => '(GMT+02:00) Cairo',
'Africa/Harare' => '(GMT+02:00) Harare',
'Europe/Helsinki' => '(GMT+02:00) Helsinki',
'Europe/Istanbul' => '(GMT+02:00) Istanbul',
'Asia/Jerusalem' => '(GMT+02:00) Jerusalem',
'Europe/Kiev' => '(GMT+02:00) Kyiv',
'Europe/Minsk' => '(GMT+02:00) Minsk',
'Europe/Riga' => '(GMT+02:00) Riga',
'Europe/Sofia' => '(GMT+02:00) Sofia',
'Europe/Tallinn' => '(GMT+02:00) Tallinn',
'Europe/Vilnius' => '(GMT+02:00) Vilnius',
'Asia/Baghdad' => '(GMT+03:00) Baghdad',
'Asia/Kuwait' => '(GMT+03:00) Kuwait',
'Africa/Nairobi' => '(GMT+03:00) Nairobi',
'Asia/Riyadh' => '(GMT+03:00) Riyadh',
'Asia/Tehran' => '(GMT+03:30) Tehran',
'Europe/Moscow' => '(GMT+04:00) Moscow',
'Asia/Baku' => '(GMT+04:00) Baku',
'Europe/Volgograd' => '(GMT+04:00) Volgograd',
'Asia/Muscat' => '(GMT+04:00) Muscat',
'Asia/Tbilisi' => '(GMT+04:00) Tbilisi',
'Asia/Yerevan' => '(GMT+04:00) Yerevan',
'Asia/Kabul' => '(GMT+04:30) Kabul',
'Asia/Karachi' => '(GMT+05:00) Karachi',
'Asia/Tashkent' => '(GMT+05:00) Tashkent',
'Asia/Kolkata' => '(GMT+05:30) Kolkata',
'Asia/Kathmandu' => '(GMT+05:45) Kathmandu',
'Asia/Yekaterinburg' => '(GMT+06:00) Ekaterinburg',
'Asia/Almaty' => '(GMT+06:00) Almaty',
'Asia/Dhaka' => '(GMT+06:00) Dhaka',
'Asia/Novosibirsk' => '(GMT+07:00) Novosibirsk',
'Asia/Bangkok' => '(GMT+07:00) Bangkok',
'Asia/Jakarta' => '(GMT+07:00) Jakarta',
'Asia/Krasnoyarsk' => '(GMT+08:00) Krasnoyarsk',
'Asia/Chongqing' => '(GMT+08:00) Chongqing',
'Asia/Hong_Kong' => '(GMT+08:00) Hong Kong',
'Asia/Kuala_Lumpur' => '(GMT+08:00) Kuala Lumpur',
'Australia/Perth' => '(GMT+08:00) Perth',
'Asia/Singapore' => '(GMT+08:00) Singapore',
'Asia/Taipei' => '(GMT+08:00) Taipei',
'Asia/Ulaanbaatar' => '(GMT+08:00) Ulaan Bataar',
'Asia/Urumqi' => '(GMT+08:00) Urumqi',
'Asia/Irkutsk' => '(GMT+09:00) Irkutsk',
'Asia/Seoul' => '(GMT+09:00) Seoul',
'Asia/Tokyo' => '(GMT+09:00) Tokyo',
'Australia/Adelaide' => '(GMT+09:30) Adelaide',
'Australia/Darwin' => '(GMT+09:30) Darwin',
'Asia/Yakutsk' => '(GMT+10:00) Yakutsk',
'Australia/Brisbane' => '(GMT+10:00) Brisbane',
'Australia/Canberra' => '(GMT+10:00) Canberra',
'Pacific/Guam' => '(GMT+10:00) Guam',
'Australia/Hobart' => '(GMT+10:00) Hobart',
'Australia/Melbourne' => '(GMT+10:00) Melbourne',
'Pacific/Port_Moresby' => '(GMT+10:00) Port Moresby',
'Australia/Sydney' => '(GMT+10:00) Sydney',
'Asia/Vladivostok' => '(GMT+11:00) Vladivostok',
'Asia/Magadan' => '(GMT+12:00) Magadan',
'Pacific/Auckland' => '(GMT+12:00) Auckland',
'Pacific/Fiji' => '(GMT+12:00) Fiji',
];
foreach ($timezones as $name => $location) {
\App\Models\Timezone::create(['name' => $name, 'location' => $location]);
}
}
}

View File

@ -46,7 +46,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money($order_item->unit_price, $order->event->currency->code)}}
{{money($order_item->unit_price, $order->event->currency)}}
@endif
</td>
@ -54,7 +54,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
-
@else
{{money($order_item->unit_booking_fee, $order->event->currency->code)}}
{{money($order_item->unit_booking_fee, $order->event->currency)}}
@endif
</td>
@ -62,7 +62,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency->code)}}
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency)}}
@endif
</td>
@ -79,7 +79,7 @@ Order Email: <b>{{$order->email}}</b><br>
<b>Sub Total</b>
</td>
<td colspan="2">
{{money($order->amount + $order->order_fee, $order->event->currency->code)}}
{{money($order->amount + $order->order_fee, $order->event->currency)}}
</td>
</tr>
</table>

View File

@ -52,7 +52,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money($order_item->unit_price, $order->event->currency->code)}}
{{money($order_item->unit_price, $order->event->currency)}}
@endif
</td>
@ -60,7 +60,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
-
@else
{{money($order_item->unit_booking_fee, $order->event->currency->code)}}
{{money($order_item->unit_booking_fee, $order->event->currency)}}
@endif
</td>
@ -68,7 +68,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency->code)}}
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency)}}
@endif
</td>
@ -85,7 +85,7 @@ Order Email: <b>{{$order->email}}</b><br>
<b>Sub Total</b>
</td>
<td colspan="2">
{{money($order->total_amount, $order->event->currency->code)}}
{{money($order->total_amount, $order->event->currency)}}
</td>
</tr>
</table>

View File

@ -50,7 +50,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money($order_item->unit_price, $order->event->currency->code)}}
{{money($order_item->unit_price, $order->event->currency)}}
@endif
</td>
@ -58,7 +58,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
-
@else
{{money($order_item->unit_booking_fee, $order->event->currency->code)}}
{{money($order_item->unit_booking_fee, $order->event->currency)}}
@endif
</td>
@ -66,7 +66,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency->code)}}
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency)}}
@endif
</td>
@ -83,7 +83,7 @@ Order Email: <b>{{$order->email}}</b><br>
<b>Sub Total</b>
</td>
<td colspan="2">
{{money($order->amount + $order->order_fee, $order->event->currency->code)}}
{{money($order->amount + $order->order_fee, $order->event->currency)}}
</td>
</tr>
</table>

View File

@ -249,7 +249,7 @@
<td>{{ $affiliate->name }}</td>
<td>{{ $affiliate->visits }}</td>
<td>{{ $affiliate->tickets_sold }}</td>
<td>{{ money($affiliate->sales_volume, $event->currency->code) }}</td>
<td>{{ money($affiliate->sales_volume, $event->currency) }}</td>
<td>{{ $affiliate->updated_at->format('M dS H:i A') }}</td>
</tr>
@endforeach

View File

@ -39,7 +39,7 @@
<div class="row">
<div class="col-sm-3">
<div class="stat-box">
<h3>{{ money($event->sales_volume + $event->organiser_fees_volume, $event->currency->code) }}</h3>
<h3>{{ money($event->sales_volume + $event->organiser_fees_volume, $event->currency) }}</h3>
<span>Sales Volume</span>
</div>
</div>
@ -98,7 +98,7 @@
<h3 class="panel-title">
Ticket Sales Volume
<span style="color: green; float: right;">
{{money($event->sales_volume + $event->organiser_fees_volume, $event->currency->code)}}
{{money($event->sales_volume + $event->organiser_fees_volume, $event->currency)}}
Total
</span>
</h3>

View File

@ -123,7 +123,7 @@
<div class="help-text">
Refund the
entire {{(money($order->organiser_amount - $order->amount_refunded, $order->event->currency->code))}}
entire {{(money($order->organiser_amount - $order->amount_refunded, $order->event->currency))}}
</div>
</div>
</div>
@ -147,7 +147,7 @@
<div class="col-sm-8">
<input type="text" name="refund_amount" class="form-control"
id="refundAmount"
placeholder="Max {{(money($order->organiser_amount - $order->amount_refunded, $order->event->currency->code))}}">
placeholder="Max {{(money($order->organiser_amount - $order->amount_refunded, $order->event->currency))}}">
</div>
</div>
</div>
@ -160,7 +160,7 @@
@else
<div class="alert alert-info">
All {{money($order->amount, $order->event->currency->code)}} of this order has been
All {{money($order->amount, $order->event->currency)}} of this order has been
refunded.
</div>

View File

@ -17,7 +17,7 @@
@if($order->is_refunded || $order->is_partially_refunded)
<div class="alert alert-info">
{{money($order->amount_refunded, $order->event->currency->code)}} of this order has been refunded.
{{money($order->amount_refunded, $order->event->currency)}} of this order has been refunded.
</div>
@endif
@ -47,7 +47,7 @@
</div>
<div class="col-sm-6 col-xs-6">
<b>Amount</b><br>{{money($order->total_amount, $order->event->currency->code)}}
<b>Amount</b><br>{{money($order->total_amount, $order->event->currency)}}
</div>
<div class="col-sm-6 col-xs-6">
@ -106,7 +106,7 @@
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money($order_item->unit_price, $order->event->currency->code)}}
{{money($order_item->unit_price, $order->event->currency)}}
@endif
</td>
@ -114,7 +114,7 @@
@if((int)ceil($order_item->unit_price) == 0)
-
@else
{{money($order_item->unit_booking_fee, $order->event->currency->code)}}
{{money($order_item->unit_booking_fee, $order->event->currency)}}
@endif
</td>
@ -122,7 +122,7 @@
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency->code)}}
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency)}}
@endif
</td>
@ -139,7 +139,7 @@
<b>Sub Total</b>
</td>
<td colspan="2">
{{money($order->total_amount, $order->event->currency->code)}}
{{money($order->total_amount, $order->event->currency)}}
</td>
</tr>
</tbody>

View File

@ -114,8 +114,8 @@ Event Orders
> {{$order->email}}</a>
</td>
<td>
<a href="#" class="hint--top" data-hint="{{money($order->amount, $event->currency->code)}} + {{money($order->organiser_booking_fee, $event->currency->code)}} Organiser Booking Fee">
{{money($order->amount + $order->organiser_booking_fee, $event->currency->code)}}
<a href="#" class="hint--top" data-hint="{{money($order->amount, $event->currency)}} + {{money($order->organiser_booking_fee, $event->currency)}} Organiser Booking Fee">
{{money($order->amount + $order->organiser_booking_fee, $event->currency)}}
@if($order->is_refunded || $order->is_partially_refunded)
@endif

View File

@ -122,7 +122,7 @@
<i class="ico-ticket ticket_icon mr5 ellipsis"></i>
{{$ticket->title}}
<span class="pull-right">
{{ ($ticket->is_free) ? "FREE" : money($ticket->price, $event->currency->code) }}
{{ ($ticket->is_free) ? "FREE" : money($ticket->price, $event->currency) }}
</span>
</h3>
</div>
@ -148,8 +148,8 @@
<li>
<div class="section">
<h4 class="nm hint--top"
title="{{money($ticket->sales_volume, $event->currency->code)}} + {{money($ticket->organiser_fees_volume, $event->currency->code)}} Organiser Booking Fees">
{{money($ticket->sales_volume + $ticket->organiser_fees_volume, $event->currency->code)}}
title="{{money($ticket->sales_volume, $event->currency)}} + {{money($ticket->organiser_fees_volume, $event->currency)}} Organiser Booking Fees">
{{money($ticket->sales_volume + $ticket->organiser_fees_volume, $event->currency)}}
<sub title="Doesn't account for refunds.">*</sub>
</h4>

View File

@ -70,7 +70,7 @@
<div class="col-sm-4">
<div class="stat-box">
<h3>
{{ money($organiser->events->sum('sales_volume') + $organiser->events->sum('organiser_fees_volume'), $organiser->account->currency->code) }}
{{ money($organiser->events->sum('sales_volume') + $organiser->events->sum('organiser_fees_volume'), $organiser->account->currency) }}
</h3>
<span>
Sales Volume

View File

@ -32,7 +32,7 @@
<li>
<div class="section">
<h4 class="nm">{{{money($event->sales_volume + $event->organiser_fees_volume, $event->currency->code)}}}</h4>
<h4 class="nm">{{{money($event->sales_volume + $event->organiser_fees_volume, $event->currency)}}}</h4>
<p class="nm text-muted">Revenue</p>
</div>
</li>

View File

@ -23,7 +23,7 @@
@if((int)ceil($ticket['full_price']) === 0)
FREE
@else
{{ money($ticket['full_price'], $event->currency->code) }}
{{ money($ticket['full_price'], $event->currency) }}
@endif
</td>
</tr>
@ -33,7 +33,7 @@
@if($order_total > 0)
<div class="panel-footer">
<h5>
Total: <span style="float: right;"><b>{{ money($order_total + $total_booking_fee,$event->currency->code) }}</b></span>
Total: <span style="float: right;"><b>{{ money($order_total + $total_booking_fee,$event->currency) }}</b></span>
</h5>
</div>
@endif

View File

@ -41,7 +41,7 @@
<?php
$is_free_event = false;
?>
<span title='{{money($ticket->price, $event->currency->code)}} Ticket Price + {{money($ticket->total_booking_fee, $event->currency->code)}} Booking Fees'>{{money($ticket->total_price, $event->currency->code)}} </span>
<span title='{{money($ticket->price, $event->currency)}} Ticket Price + {{money($ticket->total_booking_fee, $event->currency)}} Booking Fees'>{{money($ticket->total_price, $event->currency)}} </span>
<meta property="priceCurrency" content="{{ $event->currency->code }}">
<meta property="price" content="{{ number_format($ticket->price, 2, '.', '') }}">
@endif

View File

@ -146,7 +146,7 @@
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money($order_item->unit_price, $order->event->currency->code)}}
{{money($order_item->unit_price, $order->event->currency)}}
@endif
</td>
@ -154,7 +154,7 @@
@if((int)ceil($order_item->unit_price) == 0)
-
@else
{{money($order_item->unit_booking_fee, $order->event->currency->code)}}
{{money($order_item->unit_booking_fee, $order->event->currency)}}
@endif
</td>
@ -162,7 +162,7 @@
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency->code)}}
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency)}}
@endif
</td>
@ -179,7 +179,7 @@
<b>Sub Total</b>
</td>
<td colspan="2">
{{money($order->total_amount, $order->event->currency->code)}}
{{money($order->total_amount, $order->event->currency)}}
</td>
</tr>
@if($order->is_refunded || $order->is_partially_refunded)
@ -194,7 +194,7 @@
<b>Refunded Amount</b>
</td>
<td colspan="2">
{{money($order->amount_refunded, $order->event->currency->code)}}
{{money($order->amount_refunded, $order->event->currency)}}
</td>
</tr>
<tr>
@ -208,7 +208,7 @@
<b>Total</b>
</td>
<td colspan="2">
{{money($order->total_amount - $order->amount_refunded, $order->event->currency->code)}}
{{money($order->total_amount - $order->amount_refunded, $order->event->currency)}}
</td>
</tr>
@endif

View File

@ -85,7 +85,7 @@
<h4>Attendee Ref.</h4>
{{$attendee->reference}}
<h4>Price</h4>
{{money($attendee->ticket->total_price, $order->event->currency->code)}} (inc. {{money($attendee->ticket->total_booking_fee, $order->event->currency->code)}} Fees)
{{money($attendee->ticket->total_price, $order->event->currency)}} (inc. {{money($attendee->ticket->total_booking_fee, $order->event->currency)}} Fees)
</div>
<div class="barcode">