diff --git a/app/Http/Controllers/MembershipController.php b/app/Http/Controllers/MembershipController.php index 4308f61..d0694a1 100755 --- a/app/Http/Controllers/MembershipController.php +++ b/app/Http/Controllers/MembershipController.php @@ -2,18 +2,20 @@ namespace App\Http\Controllers; -use App\Mail\MailInfo; -use App\Models\Product; -use App\Models\ShoppingInstance; -use App\Models\UserHistory; -use App\User; use Auth; -use Carbon; -use Config; -use Illuminate\Validation\Rules\In; -use Request; use Util; use Yard; +use Carbon; +use Config; +use Request; +use App\User; +use App\Mail\MailInfo; +use App\Models\Product; +use App\Models\UserHistory; +use App\Services\UserService; +use App\Models\ShippingCountry; +use App\Models\ShoppingInstance; +use Illuminate\Validation\Rules\In; use Illuminate\Support\Facades\Mail; @@ -43,6 +45,13 @@ class MembershipController extends Controller $userHistoryUpgradeOrder = UserHistory::whereUserId($user->id)->whereAction('upgrade_order')->get()->last(); $userHistoryDeleteMembership = UserHistory::whereUserId($user->id)->whereAction('delete_membership')->whereStatus(50)->get()->last(); + $shipping_country_id = $this->checkShoppingCountry($user); + if(!$shipping_country_id){ + abort(403, __('validation.custom.shipping_not_found')); + } + + UserService::checkUserTaxShippingCountry($user, $shipping_country_id); + $data = [ 'user' => $user, 'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(), @@ -51,11 +60,27 @@ class MembershipController extends Controller 'userHistoryPaymentOrder' => $userHistoryPaymentOrder, 'userHistoryUpgradeOrder' => $userHistoryUpgradeOrder, 'userHistoryDeleteMembership' => $userHistoryDeleteMembership, + 'yard_info' => UserService::getYardInfo(), ]; return view('user.membership.index', $data); } + private function checkShoppingCountry($user ){ + + $country_id = null; + if($user->account->same_as_billing){ + $country_id = $user->account->country_id; + }else{ + $country_id = $user->account->shipping_country_id; + } + if($country_id){ + if($shipping_country = ShippingCountry::whereCountryId($country_id)->first()){ + return $shipping_country->id; + } + } + return false; + } public function storePayment($action){ @@ -90,13 +115,29 @@ class MembershipController extends Controller $user->abo_options = true; $user->save(); } + + $shipping_country_id = $this->checkShoppingCountry($user); + if(!$shipping_country_id){ + abort(403, __('validation.custom.shipping_not_found')); + } + + UserService::checkUserTaxShippingCountry($user, $shipping_country_id); + Yard::instance('shopping')->setUserPriceInfos(UserService::getYardInfo()); + Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country_id); + + if($product && $product->active){ $image = ""; if($product->images->count()){ $image = $product->images->first()->slug; } $qty = Request::get('qty') ? Request::get('qty') : 1; - Yard::instance('shopping')->add($product->id, $product->getLang('name'), $qty, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]); + $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $qty, $product->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]); + if(\App\Services\UserService::getTaxFree()){ + Yard::setTax($cartItem->rowId, 0); + }else{ + Yard::setTax($cartItem->rowId, $product->getTaxWith(\App\Services\UserService::$user_country)); + } do { $identifier = Util::getToken(); @@ -105,6 +146,7 @@ class MembershipController extends Controller $data = []; $data['is_from'] = 'membership'; $data['is_for'] = 'me'; + $data['user_price_infos'] = \App\Services\UserService::getUserPriceInfos(); ShoppingInstance::create([ 'identifier' => $identifier, diff --git a/app/Http/Controllers/User/HomepartyController.php b/app/Http/Controllers/User/HomepartyController.php index ac2107d..0ca5176 100755 --- a/app/Http/Controllers/User/HomepartyController.php +++ b/app/Http/Controllers/User/HomepartyController.php @@ -460,7 +460,8 @@ class HomepartyController extends Controller $date = date('d.m.Y H:i:s', $time); $user = User::find(Auth::user()->id); Yard::instance('shopping')->destroy(); - Yard::instance('shopping')->add($homeparty->id, 'Bestellung Homeparty '.$date, 1, \App\Services\HomepartyCart::$ek_price, ['image' => "", 'slug' => $time, 'weight' => 0]); + $cartItem = Yard::instance('shopping')->add($homeparty->id, 'Bestellung Homeparty '.$date, 1, \App\Services\HomepartyCart::$ek_price, ['image' => "", 'slug' => $time, 'weight' => 0]); + Yard::setTax($cartItem->rowId, 0); do { $identifier = Util::getToken(); } while( ShoppingInstance::where('identifier', $identifier)->count() ); @@ -469,10 +470,22 @@ class HomepartyController extends Controller $data = []; $data['is_from'] = 'homeparty'; - $data['shop_price_net'] = HomepartyCart::getFormattedEkPriceNet(); - $data['shop_price_tax'] = HomepartyCart::getFormattedEkPriceTax(); + + if($homeparty->getCardInfo('user_tax_free')){ + $data['shop_price'] = HomepartyCart::getFormattedEkPrice(); + $data['shop_price_net'] = HomepartyCart::getFormattedEkPrice(); + $data['shop_price_tax'] = 0; + $data['user_tax_free'] = true; + }else{ + $data['shop_price'] = HomepartyCart::getFormattedEkPrice(); + $data['shop_price_net'] = HomepartyCart::getFormattedEkPriceNet(); + $data['shop_price_tax'] = HomepartyCart::getFormattedEkPriceTax(); + $data['user_tax_free'] = false; + } + $data['homeparty_id'] = $homeparty->id; $data['is_for'] = 'hp'; + $data['user_price_infos'] = $homeparty->card_info; ShoppingInstance::create([ 'identifier' => $identifier, diff --git a/app/Http/Controllers/User/OrderController.php b/app/Http/Controllers/User/OrderController.php index 2b7cc18..916e53b 100755 --- a/app/Http/Controllers/User/OrderController.php +++ b/app/Http/Controllers/User/OrderController.php @@ -251,7 +251,10 @@ class OrderController extends Controller } if($country_id){ if($shipping_country = ShippingCountry::whereCountryId($country_id)->first()){ - return $shipping_country->id; + if($shipping_country->shipping && $shipping_country->shipping->active){ + return $shipping_country->id; + } + } } return false; diff --git a/app/Http/Controllers/Web/CardController.php b/app/Http/Controllers/Web/CardController.php index 0dacd10..b1e15f5 100755 --- a/app/Http/Controllers/Web/CardController.php +++ b/app/Http/Controllers/Web/CardController.php @@ -3,12 +3,13 @@ namespace App\Http\Controllers\Web; -use App\Http\Controllers\Controller; -use App\Models\Product; -use App\Models\ShoppingInstance; -use App\Services\Util; use Yard; use Request; +use App\Services\Shop; +use App\Services\Util; +use App\Models\Product; +use App\Models\ShoppingInstance; +use App\Http\Controllers\Controller; class CardController extends Controller { @@ -32,8 +33,12 @@ class CardController extends Controller if($product->images->count()){ $image = $product->images->first()->slug; } - $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product_slug, 'weight' => $product->weight]); - Yard::setTax($cartItem->rowId, $product->tax); + $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]); + if(Yard::instance('shopping')->getUserTaxFree()){ + Yard::setTax($cartItem->rowId, 0); + }else{ + Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry())); + } Yard::instance('shopping')->reCalculateShippingPrice(); \Session()->flash('show-card-after-add', true); @@ -55,7 +60,12 @@ class CardController extends Controller } $quantity = Request::get('quantity') ? Request::get('quantity') : 1; $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]); - Yard::setTax($cartItem->rowId, $product->tax); + $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->getPriceWith(Yard::instance('shopping')->getUserTaxFree(), false, Yard::instance('shopping')->getUserCountry()), ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]); + if(Yard::instance('shopping')->getUserTaxFree()){ + Yard::setTax($cartItem->rowId, 0); + }else{ + Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry())); + } Yard::instance('shopping')->reCalculateShippingPrice(); \Session()->flash('show-card-after-add', true); @@ -74,6 +84,8 @@ class CardController extends Controller } $data = [ 'user_shop' => Util::getUserShop(), + 'mylangs' => Shop::getLangChange(), + ]; return view('web.templates.card', $data); } @@ -103,6 +115,8 @@ class CardController extends Controller $data = []; $data['is_from'] = 'shopping'; + $data['user_price_infos'] = Yard::instance('shopping')->getUserPriceInfos(); + ShoppingInstance::create([ 'identifier' => $identifier, diff --git a/app/Http/Controllers/Web/CheckoutController.php b/app/Http/Controllers/Web/CheckoutController.php index 7acf7cc..f977ec7 100755 --- a/app/Http/Controllers/Web/CheckoutController.php +++ b/app/Http/Controllers/Web/CheckoutController.php @@ -89,6 +89,13 @@ class CheckoutController extends Controller $shopping_user->same_as_billing = false; } + if(!$shopping_user->billing_country){ + $shopping_user->billing_country = Yard::instance('shopping')->getUserCountry(); + } + if(!$shopping_user->shipping_country){ + $shopping_user->shipping_country = Yard::instance('shopping')->getUserCountry(); + } + if(old('selected_country') && old('selected_country') === 'change'){ \Session::forget('_old_input.selected_country'); $shopping_user->billing_state = old('billing_state'); @@ -479,7 +486,7 @@ class CheckoutController extends Controller 'subtotal_ws' => 0, 'tax' => 0, 'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''), - 'points' => $homeparty->order['points'], + 'points' => $homeparty->order['points'] - $homeparty->order['bonus_points_diff'], 'weight' => 0, 'txaction' => 'prev', 'mode' => Util::getUserShoppingMode(), diff --git a/app/Http/Controllers/Web/ContactController.php b/app/Http/Controllers/Web/ContactController.php index 1af7609..b5bbea3 100755 --- a/app/Http/Controllers/Web/ContactController.php +++ b/app/Http/Controllers/Web/ContactController.php @@ -3,13 +3,14 @@ namespace App\Http\Controllers\Web; -use App\Http\Controllers\Controller; -use App\Mail\MailContact; -use GuzzleHttp\Client; use Request; -use Illuminate\Support\Facades\Mail; -use App\Services\Util; use Validator; +use App\Services\Shop; +use App\Services\Util; +use GuzzleHttp\Client; +use App\Mail\MailContact; +use App\Http\Controllers\Controller; +use Illuminate\Support\Facades\Mail; class ContactController extends Controller @@ -27,11 +28,14 @@ class ContactController extends Controller } + public function create() { $data = [ 'GOOGLE_ReCAPTCHA_KEY' => $this->GOOGLE_ReCAPTCHA_KEY, 'user_shop' => Util::getUserShop(), + 'mylangs' => Shop::getLangChange(), + ]; return view('web.templates.kontakt', $data); } @@ -91,6 +95,7 @@ class ContactController extends Controller $data = [ 'user_shop' => Util::getUserShop(), + 'mylangs' => Shop::getLangChange(), ]; return view('web.templates.contact-final', $data); diff --git a/app/Http/Controllers/Web/SiteController.php b/app/Http/Controllers/Web/SiteController.php index aeccb60..1b4b709 100755 --- a/app/Http/Controllers/Web/SiteController.php +++ b/app/Http/Controllers/Web/SiteController.php @@ -3,35 +3,29 @@ namespace App\Http\Controllers\Web; -use App\Http\Controllers\Controller; -use App\Models\Category; +use Yard; +use Request; use App\Models\IqSite; -use App\Models\Product; -use App\Models\ProductCategory; +use App\Services\Shop; use App\Services\Util; +use App\Models\Product; +use App\Models\Category; +use App\Models\ProductCategory; +use App\Http\Controllers\Controller; class SiteController extends Controller { - /** - * Create a new controller instance. - * - * @return void - */ - public function __construct() - { - } - public function index() { $products = ['aloe-vera-gel-99', 'aloe-vera-saft-500-ml', 'aloe-vera-lippenbalsam']; // $set_products = ['aloe-vera-cleaner-set', 'aloe-vera-koerper-set', 'aloe-vera-repair-set']; $set_products = ['aloe-vera-koerper-set', 'baby-set', 'aloe-vera-gel-set']; - $data = [ 'products' => Product::whereIn('slug', $products)->where('active', true)->whereJsonContains('show_on', '1')->get(), 'set_products' => Product::whereIn('slug', $set_products)->where('active', true)->whereJsonContains('show_on', '1')->get(), 'user_shop' => Util::getUserShop(), + 'mylangs' => Shop::getLangChange(), 'site' => IqSite::find(1), ]; return view('web.index', $data); @@ -40,6 +34,20 @@ class SiteController extends Controller public function domainCheck(){ die("checked"); } + + public function changeLang(){ + $data = Request::all(); + if(isset($data['change_country_id'])){ + $mylangs = Shop::getLangChange(); + foreach($mylangs as $code => $country){ + if(strtolower($data['change_country_id']) === strtolower($code)){ + Shop::initUserShopLang($country); + return back(); + } + } + } + } + public function site($site, $subsite = false, $product_slug = false) { $subsite = trim($subsite, '/'); @@ -52,11 +60,11 @@ class SiteController extends Controller $data = [ 'user_shop' => Util::getUserShop(), + 'mylangs' => Shop::getLangChange(), 'subsite' => $subsite, 'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(), 'product' => $product, 'p_count' => Product::where('active', true)->whereJsonContains('show_on', '1')->count(), - ]; return view('web.templates.produkte-show', $data); } @@ -79,6 +87,7 @@ class SiteController extends Controller $data = [ 'user_shop' => Util::getUserShop(), + 'mylangs' => Shop::getLangChange(), 'subsite' => $subsite, 'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(), 'products' => false, @@ -93,6 +102,7 @@ class SiteController extends Controller } $data = [ 'user_shop' => Util::getUserShop(), + 'mylangs' => Shop::getLangChange(), 'subsite' => 'alle-produkte', 'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(), 'products' => Product::where('active', true)->whereJsonContains('show_on', '1')->orderBy('pos', 'DESC')->get(), @@ -104,7 +114,8 @@ class SiteController extends Controller return view('web.templates.'.$site, $data); } $data = [ - 'user_shop' => Util::getUserShop() + 'user_shop' => Util::getUserShop(), + 'mylangs' => Shop::getLangChange(), ]; if($subsite){ if(!view()->exists('web.templates.'.$subsite)){ diff --git a/app/Http/Controllers/WizardController.php b/app/Http/Controllers/WizardController.php index 41ff72f..f086ac1 100755 --- a/app/Http/Controllers/WizardController.php +++ b/app/Http/Controllers/WizardController.php @@ -2,21 +2,23 @@ namespace App\Http\Controllers; -use App\Mail\MailReleaseAccount; -use App\Models\File; -use App\Models\Product; -use App\Models\ShoppingInstance; -use App\Models\UserAccount; -use App\Models\UserHistory; -use App\Repositories\FileRepository; -use App\Services\Util; -use App\User; use Auth; use Hash; -use Illuminate\Support\Facades\Mail; -use Request; -use Validator; use Yard; +use Request; +use App\User; +use Validator; +use App\Models\File; +use App\Services\Util; +use App\Models\Product; +use App\Models\UserAccount; +use App\Models\UserHistory; +use App\Services\UserService; +use App\Models\ShippingCountry; +use App\Mail\MailReleaseAccount; +use App\Models\ShoppingInstance; +use App\Repositories\FileRepository; +use Illuminate\Support\Facades\Mail; class WizardController extends Controller { @@ -119,6 +121,15 @@ class WizardController extends Controller } $userHistoryWizardPayment = UserHistory::whereUserId($user->id)->whereAction('wizard_payment')->get()->last(); + + $shipping_country_id = $this->checkShoppingCountry($user); + if(!$shipping_country_id){ + abort(403, __('validation.custom.shipping_not_found')); + } + + UserService::checkUserTaxShippingCountry($user, $shipping_country_id); + //Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country_id, $for); + //Yard::instance('shopping')->setUserPriceInfos(UserService::getYardInfo()); $data = [ 'user' => Auth::user(), @@ -126,8 +137,10 @@ class WizardController extends Controller 'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(), 'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(), 'userHistoryWizardPayment' => $userHistoryWizardPayment, + 'yard_info' => UserService::getYardInfo(), ]; + if($user->wizard == 20){ return view('user.wizard.register_payment', $data); } @@ -135,6 +148,22 @@ class WizardController extends Controller return redirect(route('/')); } + private function checkShoppingCountry($user ){ + + $country_id = null; + if($user->account->same_as_billing){ + $country_id = $user->account->country_id; + }else{ + $country_id = $user->account->shipping_country_id; + } + if($country_id){ + if($shipping_country = ShippingCountry::whereCountryId($country_id)->first()){ + return $shipping_country->id; + } + } + return false; + } + public function storeRegister($step = false) { @@ -433,14 +462,30 @@ class WizardController extends Controller $user->save(); } + $shipping_country_id = $this->checkShoppingCountry($user); + if(!$shipping_country_id){ + abort(403, __('validation.custom.shipping_not_found')); + } + + UserService::checkUserTaxShippingCountry($user, $shipping_country_id); + Yard::instance('shopping')->setUserPriceInfos(UserService::getYardInfo()); + Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country_id); + + if($product && $product->active){ //set membership product $image = ""; if($product->images->count()){ $image = $product->images->first()->slug; } - Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]); - + + $cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]); + if(\App\Services\UserService::getTaxFree()){ + Yard::setTax($cartItem->rowId, 0); + }else{ + Yard::setTax($cartItem->rowId, $product->getTaxWith(\App\Services\UserService::$user_country)); + } + //set onboarding products if(Request::get('products_on_board')){ foreach (Request::get('products_on_board') as $product_on_board_id){ @@ -449,7 +494,12 @@ class WizardController extends Controller if($product_on_board->images->count()){ $image = $product_on_board->images->first()->slug; } - Yard::instance('shopping')->add($product_on_board->id, $product_on_board->getLang('name'), 1, $product_on_board->price, ['image' => $image, 'slug' => $product_on_board->slug, 'weight' => $product_on_board->weight]); + $cartItem = Yard::instance('shopping')->add($product_on_board->id, $product_on_board->getLang('name'), 1, $product_on_board->getPriceWith(\App\Services\UserService::getTaxFree(), false, \App\Services\UserService::$user_country), ['image' => $image, 'slug' => $product_on_board->slug, 'weight' => $product_on_board->weight]); + if(\App\Services\UserService::getTaxFree()){ + Yard::setTax($cartItem->rowId, 0); + }else{ + Yard::setTax($cartItem->rowId, $product->getTaxWith(\App\Services\UserService::$user_country)); + } } } @@ -457,11 +507,10 @@ class WizardController extends Controller $identifier = Util::getToken(); } while( ShoppingInstance::where('identifier', $identifier)->count() ); - $data = []; $data['is_from'] = 'wizard'; $data['is_for'] = 'me'; - + $data['user_price_infos'] = \App\Services\UserService::getUserPriceInfos(); ShoppingInstance::create([ 'identifier' => $identifier, diff --git a/app/Models/Product.php b/app/Models/Product.php index 9b0a8ea..07529e7 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -342,11 +342,54 @@ class Product extends Model return $ctax !== null ? $ctax : $tax; } + public function getFormattedPriceOldWith(Bool $net = true, Bool $ufactor = true, $country = null) + { + $price = isset($this->attributes['price_old']) ? $this->attributes['price_old'] : null; + $cprice = $country ? $this->getCPriceOld($country) : null; + $price = $cprice ? $cprice : $price; + $price = $net ? $this->calcPriceNet($price, $country) : $price; + $price = $ufactor ? $this->calcPriceUserFactor($price) : $price; + $price = round($price, 2); + return isset($price) ? Util::formatNumber($price) : ""; + } + + public function getFormattedTax($country = null) { return isset($this->attributes['tax']) ? Util::formatNumber($this->getTaxWith($country), 0) : ""; } + public function getBasePriceFormattedFullWith(Bool $net = true, Bool $ufactor = true, $country = null){ + $price = $this->getPriceWith($net, $ufactor, $country); + if($price = $this->getBasePriceWith($price)){ + $unit = $this->attributes['unit']; + //ml g + if($unit === 1 || $unit === 2){ + return Util::formatNumber($price) . ' € / 100 '.$this->getUnitType(); + } + //l kg + if($unit === 3 || $unit === 4){ + return Util::formatNumber($price) . ' € / 1 '.$this->getUnitType(); + } + } + return ""; + } + + public function getBasePriceWith($price){ + if(isset($this->attributes['unit']) && isset($this->attributes['contents_total']) && $this->attributes['contents_total'] != 0){ + $unit = $this->attributes['unit']; + //ml g + if($unit === 1 || $unit === 2){ + return $price * 100 / $this->attributes['contents_total']; + } + //l kg + if($unit === 3 || $unit === 4){ + return $price * 1000 / $this->attributes['contents_total']; + } + } + return ""; + } + public function getBasePriceFormattedFull(){ if($price = $this->getBasePrice()){ $unit = $this->attributes['unit']; @@ -383,6 +426,8 @@ class Product extends Model } return ""; } + + public function getUnitType(){ return isset($this->unitTypes[$this->unit]) ? $this->unitTypes[$this->unit] : '-'; } diff --git a/app/Services/HomepartyCart.php b/app/Services/HomepartyCart.php index 1d13baf..ab6cbff 100644 --- a/app/Services/HomepartyCart.php +++ b/app/Services/HomepartyCart.php @@ -276,6 +276,11 @@ class HomepartyCart 'voucher_price' => self::$voucher_price, 'voucher_name' => self::$voucher_name, ]; + if(self::$homeparty->getCardInfo('user_tax_free')){ + $data['price_net'] = round(self::$price, 2); + $data['ek_price_net'] = round(self::$ek_price, 2); + $data['shipping_price_net'] = self::$shipping_total; + } $user_data = []; foreach (self::$homeparty->homeparty_users as $homeparty_user){ @@ -438,7 +443,8 @@ class HomepartyCart break; case 'EkPriceTax': $rNumber = (self::$ek_price - self::$ek_price_net)* $faktor; - break; + break; + } } diff --git a/app/Services/HomepartyUserCart.php b/app/Services/HomepartyUserCart.php index 2213a4b..745eaab 100644 --- a/app/Services/HomepartyUserCart.php +++ b/app/Services/HomepartyUserCart.php @@ -2,14 +2,6 @@ namespace App\Services; use App\Models\HomepartyUser; -use App\Models\Product; -use App\Models\ShippingCountry; -use \Gloudemans\Shoppingcart\Cart; -use Gloudemans\Shoppingcart\CartItem; -use Gloudemans\Shoppingcart\Contracts\Buyable; -use Illuminate\Session\SessionManager; -use Illuminate\Contracts\Events\Dispatcher; -use Illuminate\Support\Collection; class HomepartyUserCart @@ -101,6 +93,11 @@ class HomepartyUserCart return formatNumber($this->ek_price); } + public function getFormattedEkPriceWithout() + { + return formatNumber($this->ek_price - $this->shipping_price); + } + public function getFormattedIncomePrice() { return formatNumber($this->income_price); @@ -145,7 +142,10 @@ class HomepartyUserCart break; case 'EkPrice': $rNumber = $this->ek_price * $faktor; - break; + break; + case 'EkPriceWithout': + $rNumber = ($this->ek_price - $this->shipping_price) * $faktor; + break; } } diff --git a/app/Services/Shop.php b/app/Services/Shop.php index dea983e..4d9c3bf 100644 --- a/app/Services/Shop.php +++ b/app/Services/Shop.php @@ -2,13 +2,18 @@ namespace App\Services; +use Yard; use App\Models\Country; -use App\Models\ShippingCountry; use App\Models\ShoppingUser; -use Gloudemans\Shoppingcart\CartItem; +use App\Models\ShippingCountry; class Shop { + public static $user_country; + public static $shipping_country; + public static $user_tax_free; + public static $user_reverse_charge = false; + public static function userOrders() { $shopping_users = ShoppingUser::whereHas('shopping_order', function($q) { $q->where('txaction', 'paid')->OrWhere('txaction', 'appointed')->OrWhere('txaction', 'extern')->OrWhere('txaction', 'invoice_open')->OrWhere('txaction', 'invoice_paid'); @@ -60,4 +65,66 @@ class Shop return ShippingCountry::all()->first()->id; } + + public static function getLangChange(){ + $ret = []; + $countries = Country::whereActive(true)->whereSwitch(true)->get(); + $first_country = null; + foreach($countries as $country){ + $ShippingCountry = ShippingCountry::whereCountryId($country->id)->first(); + if($ShippingCountry && $ShippingCountry->shipping && $ShippingCountry->shipping->active){ + if(!$first_country){ + $first_country = $country; + } + $ret[strtolower($country->code)] = $country; + } + } + Shop::getUserShopLang($first_country); + return $ret; + } + + public static function getUserShopLang($country = null){ + if(\Session::has('user_shop_lang')){ + if($user_shop_lang = \Session::get('user_shop_lang')){ + return $user_shop_lang; + } + } + if($country){ + Shop::initUserShopLang($country); + return strtolower($country->code); + } + return false; + } + + public static function initUserShopLang($country){ + Yard::instance('shopping')->destroy(); + \Session::put('user_shop_lang', strtolower($country->code)); + //init Yard + self::initUserShopYard($country); + + } + + public static function initUserShopYard($country){ + //Lieferadresse im Drittland? + self::$user_tax_free = $country->supply_country ? true : false; + $ShippingCountry = ShippingCountry::whereCountryId($country->id)->first(); + self::$shipping_country = $ShippingCountry; + self::$user_country = $country; + + Yard::instance('shopping')->setShippingCountryWithPrice($ShippingCountry->id); + Yard::instance('shopping')->setUserPriceInfos(Shop::getYardInfo()); + + + + } + + public static function getYardInfo(){ + return [ + 'user_tax_free' => self::$user_tax_free, + 'user_reverse_charge' => self::$user_reverse_charge, + 'user_country_id' => self::$user_country->id, + 'shipping_country_id' => self::$shipping_country->id, + ]; + } + } \ No newline at end of file diff --git a/app/Services/UserService.php b/app/Services/UserService.php index 8255b21..4424441 100644 --- a/app/Services/UserService.php +++ b/app/Services/UserService.php @@ -67,6 +67,18 @@ class UserService ]; } + public static function getTaxFree(){ + return self::$user_tax_free ? true : false; + } + + public static function getUserPriceInfos(){ + return [ + 'user_tax_free' => self::$user_tax_free, + 'user_reverse_charge' => self::$user_reverse_charge, + 'user_country_id' => self::$user_country->id, + ]; + } + public static function getOrderInfo($key = false){ switch ($key) { diff --git a/app/Services/Util.php b/app/Services/Util.php index 0094d7f..5d6b7a0 100644 --- a/app/Services/Util.php +++ b/app/Services/Util.php @@ -1,9 +1,11 @@ user_tax_free; + return $this->user_tax_free ? true : false; } private function calculateShippingPrice(){ @@ -505,6 +505,9 @@ class Yard extends Cart case 'subtotal': $rNumber = (float) ($this->subtotal(2, '.', '')) * $faktor; break; + case 'price': + $rNumber = (float) $row->price * $faktor; + break; case 'shippingNet': $rNumber = (float) ($this->shippingNet(2, '.', '')) * $faktor; break; diff --git a/public/images/flags/ad.png b/public/images/flags/ad.png new file mode 100755 index 0000000..625ca84 Binary files /dev/null and b/public/images/flags/ad.png differ diff --git a/public/images/flags/ae.png b/public/images/flags/ae.png new file mode 100755 index 0000000..ef3a1ec Binary files /dev/null and b/public/images/flags/ae.png differ diff --git a/public/images/flags/af.png b/public/images/flags/af.png new file mode 100755 index 0000000..a4742e2 Binary files /dev/null and b/public/images/flags/af.png differ diff --git a/public/images/flags/ag.png b/public/images/flags/ag.png new file mode 100755 index 0000000..556d550 Binary files /dev/null and b/public/images/flags/ag.png differ diff --git a/public/images/flags/ai.png b/public/images/flags/ai.png new file mode 100755 index 0000000..74ed29d Binary files /dev/null and b/public/images/flags/ai.png differ diff --git a/public/images/flags/al.png b/public/images/flags/al.png new file mode 100755 index 0000000..92354cb Binary files /dev/null and b/public/images/flags/al.png differ diff --git a/public/images/flags/am.png b/public/images/flags/am.png new file mode 100755 index 0000000..344a2a8 Binary files /dev/null and b/public/images/flags/am.png differ diff --git a/public/images/flags/an.png b/public/images/flags/an.png new file mode 100755 index 0000000..633e4b8 Binary files /dev/null and b/public/images/flags/an.png differ diff --git a/public/images/flags/ao.png b/public/images/flags/ao.png new file mode 100755 index 0000000..bcbd1d6 Binary files /dev/null and b/public/images/flags/ao.png differ diff --git a/public/images/flags/ar.png b/public/images/flags/ar.png new file mode 100755 index 0000000..e5ef8f1 Binary files /dev/null and b/public/images/flags/ar.png differ diff --git a/public/images/flags/as.png b/public/images/flags/as.png new file mode 100755 index 0000000..32f30e4 Binary files /dev/null and b/public/images/flags/as.png differ diff --git a/public/images/flags/at.png b/public/images/flags/at.png new file mode 100755 index 0000000..0f15f34 Binary files /dev/null and b/public/images/flags/at.png differ diff --git a/public/images/flags/au.png b/public/images/flags/au.png new file mode 100755 index 0000000..a01389a Binary files /dev/null and b/public/images/flags/au.png differ diff --git a/public/images/flags/aw.png b/public/images/flags/aw.png new file mode 100755 index 0000000..a3579c2 Binary files /dev/null and b/public/images/flags/aw.png differ diff --git a/public/images/flags/ax.png b/public/images/flags/ax.png new file mode 100755 index 0000000..1eea80a Binary files /dev/null and b/public/images/flags/ax.png differ diff --git a/public/images/flags/az.png b/public/images/flags/az.png new file mode 100755 index 0000000..4ee9fe5 Binary files /dev/null and b/public/images/flags/az.png differ diff --git a/public/images/flags/ba.png b/public/images/flags/ba.png new file mode 100755 index 0000000..c774992 Binary files /dev/null and b/public/images/flags/ba.png differ diff --git a/public/images/flags/bb.png b/public/images/flags/bb.png new file mode 100755 index 0000000..0df19c7 Binary files /dev/null and b/public/images/flags/bb.png differ diff --git a/public/images/flags/bd.png b/public/images/flags/bd.png new file mode 100755 index 0000000..076a8bf Binary files /dev/null and b/public/images/flags/bd.png differ diff --git a/public/images/flags/be.png b/public/images/flags/be.png new file mode 100755 index 0000000..d86ebc8 Binary files /dev/null and b/public/images/flags/be.png differ diff --git a/public/images/flags/bf.png b/public/images/flags/bf.png new file mode 100755 index 0000000..ab5ce8f Binary files /dev/null and b/public/images/flags/bf.png differ diff --git a/public/images/flags/bg.png b/public/images/flags/bg.png new file mode 100755 index 0000000..0469f06 Binary files /dev/null and b/public/images/flags/bg.png differ diff --git a/public/images/flags/bh.png b/public/images/flags/bh.png new file mode 100755 index 0000000..ea8ce68 Binary files /dev/null and b/public/images/flags/bh.png differ diff --git a/public/images/flags/bi.png b/public/images/flags/bi.png new file mode 100755 index 0000000..5cc2e30 Binary files /dev/null and b/public/images/flags/bi.png differ diff --git a/public/images/flags/bj.png b/public/images/flags/bj.png new file mode 100755 index 0000000..1cc8b45 Binary files /dev/null and b/public/images/flags/bj.png differ diff --git a/public/images/flags/bm.png b/public/images/flags/bm.png new file mode 100755 index 0000000..c0c7aea Binary files /dev/null and b/public/images/flags/bm.png differ diff --git a/public/images/flags/bn.png b/public/images/flags/bn.png new file mode 100755 index 0000000..8fb0984 Binary files /dev/null and b/public/images/flags/bn.png differ diff --git a/public/images/flags/bo.png b/public/images/flags/bo.png new file mode 100755 index 0000000..ce7ba52 Binary files /dev/null and b/public/images/flags/bo.png differ diff --git a/public/images/flags/br.png b/public/images/flags/br.png new file mode 100755 index 0000000..9b1a553 Binary files /dev/null and b/public/images/flags/br.png differ diff --git a/public/images/flags/bs.png b/public/images/flags/bs.png new file mode 100755 index 0000000..639fa6c Binary files /dev/null and b/public/images/flags/bs.png differ diff --git a/public/images/flags/bt.png b/public/images/flags/bt.png new file mode 100755 index 0000000..1d512df Binary files /dev/null and b/public/images/flags/bt.png differ diff --git a/public/images/flags/bv.png b/public/images/flags/bv.png new file mode 100755 index 0000000..160b6b5 Binary files /dev/null and b/public/images/flags/bv.png differ diff --git a/public/images/flags/bw.png b/public/images/flags/bw.png new file mode 100755 index 0000000..fcb1039 Binary files /dev/null and b/public/images/flags/bw.png differ diff --git a/public/images/flags/by.png b/public/images/flags/by.png new file mode 100755 index 0000000..504774e Binary files /dev/null and b/public/images/flags/by.png differ diff --git a/public/images/flags/bz.png b/public/images/flags/bz.png new file mode 100755 index 0000000..be63ee1 Binary files /dev/null and b/public/images/flags/bz.png differ diff --git a/public/images/flags/ca.png b/public/images/flags/ca.png new file mode 100755 index 0000000..1f20419 Binary files /dev/null and b/public/images/flags/ca.png differ diff --git a/public/images/flags/catalonia.png b/public/images/flags/catalonia.png new file mode 100755 index 0000000..5041e30 Binary files /dev/null and b/public/images/flags/catalonia.png differ diff --git a/public/images/flags/cc.png b/public/images/flags/cc.png new file mode 100755 index 0000000..aed3d3b Binary files /dev/null and b/public/images/flags/cc.png differ diff --git a/public/images/flags/cd.png b/public/images/flags/cd.png new file mode 100755 index 0000000..5e48942 Binary files /dev/null and b/public/images/flags/cd.png differ diff --git a/public/images/flags/cf.png b/public/images/flags/cf.png new file mode 100755 index 0000000..da687bd Binary files /dev/null and b/public/images/flags/cf.png differ diff --git a/public/images/flags/cg.png b/public/images/flags/cg.png new file mode 100755 index 0000000..a859792 Binary files /dev/null and b/public/images/flags/cg.png differ diff --git a/public/images/flags/ch.png b/public/images/flags/ch.png new file mode 100755 index 0000000..242ec01 Binary files /dev/null and b/public/images/flags/ch.png differ diff --git a/public/images/flags/ci.png b/public/images/flags/ci.png new file mode 100755 index 0000000..3f2c62e Binary files /dev/null and b/public/images/flags/ci.png differ diff --git a/public/images/flags/ck.png b/public/images/flags/ck.png new file mode 100755 index 0000000..746d3d6 Binary files /dev/null and b/public/images/flags/ck.png differ diff --git a/public/images/flags/cl.png b/public/images/flags/cl.png new file mode 100755 index 0000000..29c6d61 Binary files /dev/null and b/public/images/flags/cl.png differ diff --git a/public/images/flags/cm.png b/public/images/flags/cm.png new file mode 100755 index 0000000..f65c5bd Binary files /dev/null and b/public/images/flags/cm.png differ diff --git a/public/images/flags/cn.png b/public/images/flags/cn.png new file mode 100755 index 0000000..8914414 Binary files /dev/null and b/public/images/flags/cn.png differ diff --git a/public/images/flags/co.png b/public/images/flags/co.png new file mode 100755 index 0000000..a118ff4 Binary files /dev/null and b/public/images/flags/co.png differ diff --git a/public/images/flags/cr.png b/public/images/flags/cr.png new file mode 100755 index 0000000..c7a3731 Binary files /dev/null and b/public/images/flags/cr.png differ diff --git a/public/images/flags/cs.png b/public/images/flags/cs.png new file mode 100755 index 0000000..8254790 Binary files /dev/null and b/public/images/flags/cs.png differ diff --git a/public/images/flags/cu.png b/public/images/flags/cu.png new file mode 100755 index 0000000..083f1d6 Binary files /dev/null and b/public/images/flags/cu.png differ diff --git a/public/images/flags/cv.png b/public/images/flags/cv.png new file mode 100755 index 0000000..a63f7ea Binary files /dev/null and b/public/images/flags/cv.png differ diff --git a/public/images/flags/cx.png b/public/images/flags/cx.png new file mode 100755 index 0000000..48e31ad Binary files /dev/null and b/public/images/flags/cx.png differ diff --git a/public/images/flags/cy.png b/public/images/flags/cy.png new file mode 100755 index 0000000..5b1ad6c Binary files /dev/null and b/public/images/flags/cy.png differ diff --git a/public/images/flags/cz.png b/public/images/flags/cz.png new file mode 100755 index 0000000..c8403dd Binary files /dev/null and b/public/images/flags/cz.png differ diff --git a/public/images/flags/de.png b/public/images/flags/de.png new file mode 100755 index 0000000..ac4a977 Binary files /dev/null and b/public/images/flags/de.png differ diff --git a/public/images/flags/dj.png b/public/images/flags/dj.png new file mode 100755 index 0000000..582af36 Binary files /dev/null and b/public/images/flags/dj.png differ diff --git a/public/images/flags/dk.png b/public/images/flags/dk.png new file mode 100755 index 0000000..e2993d3 Binary files /dev/null and b/public/images/flags/dk.png differ diff --git a/public/images/flags/dm.png b/public/images/flags/dm.png new file mode 100755 index 0000000..5fbffcb Binary files /dev/null and b/public/images/flags/dm.png differ diff --git a/public/images/flags/do.png b/public/images/flags/do.png new file mode 100755 index 0000000..5a04932 Binary files /dev/null and b/public/images/flags/do.png differ diff --git a/public/images/flags/dz.png b/public/images/flags/dz.png new file mode 100755 index 0000000..335c239 Binary files /dev/null and b/public/images/flags/dz.png differ diff --git a/public/images/flags/ec.png b/public/images/flags/ec.png new file mode 100755 index 0000000..0caa0b1 Binary files /dev/null and b/public/images/flags/ec.png differ diff --git a/public/images/flags/ee.png b/public/images/flags/ee.png new file mode 100755 index 0000000..0c82efb Binary files /dev/null and b/public/images/flags/ee.png differ diff --git a/public/images/flags/eg.png b/public/images/flags/eg.png new file mode 100755 index 0000000..8a3f7a1 Binary files /dev/null and b/public/images/flags/eg.png differ diff --git a/public/images/flags/eh.png b/public/images/flags/eh.png new file mode 100755 index 0000000..90a1195 Binary files /dev/null and b/public/images/flags/eh.png differ diff --git a/public/images/flags/england.png b/public/images/flags/england.png new file mode 100755 index 0000000..3a7311d Binary files /dev/null and b/public/images/flags/england.png differ diff --git a/public/images/flags/er.png b/public/images/flags/er.png new file mode 100755 index 0000000..13065ae Binary files /dev/null and b/public/images/flags/er.png differ diff --git a/public/images/flags/es.png b/public/images/flags/es.png new file mode 100755 index 0000000..c2de2d7 Binary files /dev/null and b/public/images/flags/es.png differ diff --git a/public/images/flags/et.png b/public/images/flags/et.png new file mode 100755 index 0000000..2e893fa Binary files /dev/null and b/public/images/flags/et.png differ diff --git a/public/images/flags/europeanunion.png b/public/images/flags/europeanunion.png new file mode 100755 index 0000000..d6d8711 Binary files /dev/null and b/public/images/flags/europeanunion.png differ diff --git a/public/images/flags/fam.png b/public/images/flags/fam.png new file mode 100755 index 0000000..cf50c75 Binary files /dev/null and b/public/images/flags/fam.png differ diff --git a/public/images/flags/fi.png b/public/images/flags/fi.png new file mode 100755 index 0000000..14ec091 Binary files /dev/null and b/public/images/flags/fi.png differ diff --git a/public/images/flags/fj.png b/public/images/flags/fj.png new file mode 100755 index 0000000..cee9988 Binary files /dev/null and b/public/images/flags/fj.png differ diff --git a/public/images/flags/fk.png b/public/images/flags/fk.png new file mode 100755 index 0000000..ceaeb27 Binary files /dev/null and b/public/images/flags/fk.png differ diff --git a/public/images/flags/fm.png b/public/images/flags/fm.png new file mode 100755 index 0000000..066bb24 Binary files /dev/null and b/public/images/flags/fm.png differ diff --git a/public/images/flags/fo.png b/public/images/flags/fo.png new file mode 100755 index 0000000..cbceb80 Binary files /dev/null and b/public/images/flags/fo.png differ diff --git a/public/images/flags/fr.png b/public/images/flags/fr.png new file mode 100755 index 0000000..8332c4e Binary files /dev/null and b/public/images/flags/fr.png differ diff --git a/public/images/flags/ga.png b/public/images/flags/ga.png new file mode 100755 index 0000000..0e0d434 Binary files /dev/null and b/public/images/flags/ga.png differ diff --git a/public/images/flags/gb.png b/public/images/flags/gb.png new file mode 100755 index 0000000..ff701e1 Binary files /dev/null and b/public/images/flags/gb.png differ diff --git a/public/images/flags/gd.png b/public/images/flags/gd.png new file mode 100755 index 0000000..9ab57f5 Binary files /dev/null and b/public/images/flags/gd.png differ diff --git a/public/images/flags/ge.png b/public/images/flags/ge.png new file mode 100755 index 0000000..728d970 Binary files /dev/null and b/public/images/flags/ge.png differ diff --git a/public/images/flags/gf.png b/public/images/flags/gf.png new file mode 100755 index 0000000..8332c4e Binary files /dev/null and b/public/images/flags/gf.png differ diff --git a/public/images/flags/gh.png b/public/images/flags/gh.png new file mode 100755 index 0000000..4e2f896 Binary files /dev/null and b/public/images/flags/gh.png differ diff --git a/public/images/flags/gi.png b/public/images/flags/gi.png new file mode 100755 index 0000000..e76797f Binary files /dev/null and b/public/images/flags/gi.png differ diff --git a/public/images/flags/gl.png b/public/images/flags/gl.png new file mode 100755 index 0000000..ef12a73 Binary files /dev/null and b/public/images/flags/gl.png differ diff --git a/public/images/flags/gm.png b/public/images/flags/gm.png new file mode 100755 index 0000000..0720b66 Binary files /dev/null and b/public/images/flags/gm.png differ diff --git a/public/images/flags/gn.png b/public/images/flags/gn.png new file mode 100755 index 0000000..ea660b0 Binary files /dev/null and b/public/images/flags/gn.png differ diff --git a/public/images/flags/gp.png b/public/images/flags/gp.png new file mode 100755 index 0000000..dbb086d Binary files /dev/null and b/public/images/flags/gp.png differ diff --git a/public/images/flags/gq.png b/public/images/flags/gq.png new file mode 100755 index 0000000..ebe20a2 Binary files /dev/null and b/public/images/flags/gq.png differ diff --git a/public/images/flags/gr.png b/public/images/flags/gr.png new file mode 100755 index 0000000..8651ade Binary files /dev/null and b/public/images/flags/gr.png differ diff --git a/public/images/flags/gs.png b/public/images/flags/gs.png new file mode 100755 index 0000000..7ef0bf5 Binary files /dev/null and b/public/images/flags/gs.png differ diff --git a/public/images/flags/gt.png b/public/images/flags/gt.png new file mode 100755 index 0000000..c43a70d Binary files /dev/null and b/public/images/flags/gt.png differ diff --git a/public/images/flags/gu.png b/public/images/flags/gu.png new file mode 100755 index 0000000..92f37c0 Binary files /dev/null and b/public/images/flags/gu.png differ diff --git a/public/images/flags/gw.png b/public/images/flags/gw.png new file mode 100755 index 0000000..b37bcf0 Binary files /dev/null and b/public/images/flags/gw.png differ diff --git a/public/images/flags/gy.png b/public/images/flags/gy.png new file mode 100755 index 0000000..22cbe2f Binary files /dev/null and b/public/images/flags/gy.png differ diff --git a/public/images/flags/hk.png b/public/images/flags/hk.png new file mode 100755 index 0000000..d5c380c Binary files /dev/null and b/public/images/flags/hk.png differ diff --git a/public/images/flags/hm.png b/public/images/flags/hm.png new file mode 100755 index 0000000..a01389a Binary files /dev/null and b/public/images/flags/hm.png differ diff --git a/public/images/flags/hn.png b/public/images/flags/hn.png new file mode 100755 index 0000000..96f8388 Binary files /dev/null and b/public/images/flags/hn.png differ diff --git a/public/images/flags/hr.png b/public/images/flags/hr.png new file mode 100755 index 0000000..696b515 Binary files /dev/null and b/public/images/flags/hr.png differ diff --git a/public/images/flags/ht.png b/public/images/flags/ht.png new file mode 100755 index 0000000..416052a Binary files /dev/null and b/public/images/flags/ht.png differ diff --git a/public/images/flags/hu.png b/public/images/flags/hu.png new file mode 100755 index 0000000..7baafe4 Binary files /dev/null and b/public/images/flags/hu.png differ diff --git a/public/images/flags/id.png b/public/images/flags/id.png new file mode 100755 index 0000000..c6bc0fa Binary files /dev/null and b/public/images/flags/id.png differ diff --git a/public/images/flags/ie.png b/public/images/flags/ie.png new file mode 100755 index 0000000..26baa31 Binary files /dev/null and b/public/images/flags/ie.png differ diff --git a/public/images/flags/il.png b/public/images/flags/il.png new file mode 100755 index 0000000..2ca772d Binary files /dev/null and b/public/images/flags/il.png differ diff --git a/public/images/flags/in.png b/public/images/flags/in.png new file mode 100755 index 0000000..e4d7e81 Binary files /dev/null and b/public/images/flags/in.png differ diff --git a/public/images/flags/io.png b/public/images/flags/io.png new file mode 100755 index 0000000..3e74b6a Binary files /dev/null and b/public/images/flags/io.png differ diff --git a/public/images/flags/iq.png b/public/images/flags/iq.png new file mode 100755 index 0000000..878a351 Binary files /dev/null and b/public/images/flags/iq.png differ diff --git a/public/images/flags/ir.png b/public/images/flags/ir.png new file mode 100755 index 0000000..c5fd136 Binary files /dev/null and b/public/images/flags/ir.png differ diff --git a/public/images/flags/is.png b/public/images/flags/is.png new file mode 100755 index 0000000..b8f6d0f Binary files /dev/null and b/public/images/flags/is.png differ diff --git a/public/images/flags/it.png b/public/images/flags/it.png new file mode 100755 index 0000000..89692f7 Binary files /dev/null and b/public/images/flags/it.png differ diff --git a/public/images/flags/jm.png b/public/images/flags/jm.png new file mode 100755 index 0000000..7be119e Binary files /dev/null and b/public/images/flags/jm.png differ diff --git a/public/images/flags/jo.png b/public/images/flags/jo.png new file mode 100755 index 0000000..11bd497 Binary files /dev/null and b/public/images/flags/jo.png differ diff --git a/public/images/flags/jp.png b/public/images/flags/jp.png new file mode 100755 index 0000000..325fbad Binary files /dev/null and b/public/images/flags/jp.png differ diff --git a/public/images/flags/ke.png b/public/images/flags/ke.png new file mode 100755 index 0000000..51879ad Binary files /dev/null and b/public/images/flags/ke.png differ diff --git a/public/images/flags/kg.png b/public/images/flags/kg.png new file mode 100755 index 0000000..0a818f6 Binary files /dev/null and b/public/images/flags/kg.png differ diff --git a/public/images/flags/kh.png b/public/images/flags/kh.png new file mode 100755 index 0000000..30f6bb1 Binary files /dev/null and b/public/images/flags/kh.png differ diff --git a/public/images/flags/ki.png b/public/images/flags/ki.png new file mode 100755 index 0000000..2dcce4b Binary files /dev/null and b/public/images/flags/ki.png differ diff --git a/public/images/flags/km.png b/public/images/flags/km.png new file mode 100755 index 0000000..812b2f5 Binary files /dev/null and b/public/images/flags/km.png differ diff --git a/public/images/flags/kn.png b/public/images/flags/kn.png new file mode 100755 index 0000000..febd5b4 Binary files /dev/null and b/public/images/flags/kn.png differ diff --git a/public/images/flags/kp.png b/public/images/flags/kp.png new file mode 100755 index 0000000..d3d509a Binary files /dev/null and b/public/images/flags/kp.png differ diff --git a/public/images/flags/kr.png b/public/images/flags/kr.png new file mode 100755 index 0000000..9c0a78e Binary files /dev/null and b/public/images/flags/kr.png differ diff --git a/public/images/flags/kw.png b/public/images/flags/kw.png new file mode 100755 index 0000000..96546da Binary files /dev/null and b/public/images/flags/kw.png differ diff --git a/public/images/flags/ky.png b/public/images/flags/ky.png new file mode 100755 index 0000000..15c5f8e Binary files /dev/null and b/public/images/flags/ky.png differ diff --git a/public/images/flags/kz.png b/public/images/flags/kz.png new file mode 100755 index 0000000..45a8c88 Binary files /dev/null and b/public/images/flags/kz.png differ diff --git a/public/images/flags/la.png b/public/images/flags/la.png new file mode 100755 index 0000000..e28acd0 Binary files /dev/null and b/public/images/flags/la.png differ diff --git a/public/images/flags/lb.png b/public/images/flags/lb.png new file mode 100755 index 0000000..d0d452b Binary files /dev/null and b/public/images/flags/lb.png differ diff --git a/public/images/flags/lc.png b/public/images/flags/lc.png new file mode 100755 index 0000000..a47d065 Binary files /dev/null and b/public/images/flags/lc.png differ diff --git a/public/images/flags/li.png b/public/images/flags/li.png new file mode 100755 index 0000000..6469909 Binary files /dev/null and b/public/images/flags/li.png differ diff --git a/public/images/flags/lk.png b/public/images/flags/lk.png new file mode 100755 index 0000000..088aad6 Binary files /dev/null and b/public/images/flags/lk.png differ diff --git a/public/images/flags/lr.png b/public/images/flags/lr.png new file mode 100755 index 0000000..89a5bc7 Binary files /dev/null and b/public/images/flags/lr.png differ diff --git a/public/images/flags/ls.png b/public/images/flags/ls.png new file mode 100755 index 0000000..33fdef1 Binary files /dev/null and b/public/images/flags/ls.png differ diff --git a/public/images/flags/lt.png b/public/images/flags/lt.png new file mode 100755 index 0000000..c8ef0da Binary files /dev/null and b/public/images/flags/lt.png differ diff --git a/public/images/flags/lu.png b/public/images/flags/lu.png new file mode 100755 index 0000000..4cabba9 Binary files /dev/null and b/public/images/flags/lu.png differ diff --git a/public/images/flags/lv.png b/public/images/flags/lv.png new file mode 100755 index 0000000..49b6998 Binary files /dev/null and b/public/images/flags/lv.png differ diff --git a/public/images/flags/ly.png b/public/images/flags/ly.png new file mode 100755 index 0000000..b163a9f Binary files /dev/null and b/public/images/flags/ly.png differ diff --git a/public/images/flags/ma.png b/public/images/flags/ma.png new file mode 100755 index 0000000..f386770 Binary files /dev/null and b/public/images/flags/ma.png differ diff --git a/public/images/flags/mc.png b/public/images/flags/mc.png new file mode 100755 index 0000000..1aa830f Binary files /dev/null and b/public/images/flags/mc.png differ diff --git a/public/images/flags/md.png b/public/images/flags/md.png new file mode 100755 index 0000000..4e92c18 Binary files /dev/null and b/public/images/flags/md.png differ diff --git a/public/images/flags/me.png b/public/images/flags/me.png new file mode 100755 index 0000000..ac72535 Binary files /dev/null and b/public/images/flags/me.png differ diff --git a/public/images/flags/mg.png b/public/images/flags/mg.png new file mode 100755 index 0000000..d2715b3 Binary files /dev/null and b/public/images/flags/mg.png differ diff --git a/public/images/flags/mh.png b/public/images/flags/mh.png new file mode 100755 index 0000000..fb523a8 Binary files /dev/null and b/public/images/flags/mh.png differ diff --git a/public/images/flags/mk.png b/public/images/flags/mk.png new file mode 100755 index 0000000..db173aa Binary files /dev/null and b/public/images/flags/mk.png differ diff --git a/public/images/flags/ml.png b/public/images/flags/ml.png new file mode 100755 index 0000000..2cec8ba Binary files /dev/null and b/public/images/flags/ml.png differ diff --git a/public/images/flags/mm.png b/public/images/flags/mm.png new file mode 100755 index 0000000..f464f67 Binary files /dev/null and b/public/images/flags/mm.png differ diff --git a/public/images/flags/mn.png b/public/images/flags/mn.png new file mode 100755 index 0000000..9396355 Binary files /dev/null and b/public/images/flags/mn.png differ diff --git a/public/images/flags/mo.png b/public/images/flags/mo.png new file mode 100755 index 0000000..deb801d Binary files /dev/null and b/public/images/flags/mo.png differ diff --git a/public/images/flags/mp.png b/public/images/flags/mp.png new file mode 100755 index 0000000..298d588 Binary files /dev/null and b/public/images/flags/mp.png differ diff --git a/public/images/flags/mq.png b/public/images/flags/mq.png new file mode 100755 index 0000000..010143b Binary files /dev/null and b/public/images/flags/mq.png differ diff --git a/public/images/flags/mr.png b/public/images/flags/mr.png new file mode 100755 index 0000000..319546b Binary files /dev/null and b/public/images/flags/mr.png differ diff --git a/public/images/flags/ms.png b/public/images/flags/ms.png new file mode 100755 index 0000000..d4cbb43 Binary files /dev/null and b/public/images/flags/ms.png differ diff --git a/public/images/flags/mt.png b/public/images/flags/mt.png new file mode 100755 index 0000000..00af948 Binary files /dev/null and b/public/images/flags/mt.png differ diff --git a/public/images/flags/mu.png b/public/images/flags/mu.png new file mode 100755 index 0000000..b7fdce1 Binary files /dev/null and b/public/images/flags/mu.png differ diff --git a/public/images/flags/mv.png b/public/images/flags/mv.png new file mode 100755 index 0000000..5073d9e Binary files /dev/null and b/public/images/flags/mv.png differ diff --git a/public/images/flags/mw.png b/public/images/flags/mw.png new file mode 100755 index 0000000..13886e9 Binary files /dev/null and b/public/images/flags/mw.png differ diff --git a/public/images/flags/mx.png b/public/images/flags/mx.png new file mode 100755 index 0000000..5bc58ab Binary files /dev/null and b/public/images/flags/mx.png differ diff --git a/public/images/flags/my.png b/public/images/flags/my.png new file mode 100755 index 0000000..9034cba Binary files /dev/null and b/public/images/flags/my.png differ diff --git a/public/images/flags/mz.png b/public/images/flags/mz.png new file mode 100755 index 0000000..76405e0 Binary files /dev/null and b/public/images/flags/mz.png differ diff --git a/public/images/flags/na.png b/public/images/flags/na.png new file mode 100755 index 0000000..63358c6 Binary files /dev/null and b/public/images/flags/na.png differ diff --git a/public/images/flags/nc.png b/public/images/flags/nc.png new file mode 100755 index 0000000..2cad283 Binary files /dev/null and b/public/images/flags/nc.png differ diff --git a/public/images/flags/ne.png b/public/images/flags/ne.png new file mode 100755 index 0000000..d85f424 Binary files /dev/null and b/public/images/flags/ne.png differ diff --git a/public/images/flags/nf.png b/public/images/flags/nf.png new file mode 100755 index 0000000..f9bcdda Binary files /dev/null and b/public/images/flags/nf.png differ diff --git a/public/images/flags/ng.png b/public/images/flags/ng.png new file mode 100755 index 0000000..3eea2e0 Binary files /dev/null and b/public/images/flags/ng.png differ diff --git a/public/images/flags/ni.png b/public/images/flags/ni.png new file mode 100755 index 0000000..3969aaa Binary files /dev/null and b/public/images/flags/ni.png differ diff --git a/public/images/flags/nl.png b/public/images/flags/nl.png new file mode 100755 index 0000000..fe44791 Binary files /dev/null and b/public/images/flags/nl.png differ diff --git a/public/images/flags/no.png b/public/images/flags/no.png new file mode 100755 index 0000000..160b6b5 Binary files /dev/null and b/public/images/flags/no.png differ diff --git a/public/images/flags/np.png b/public/images/flags/np.png new file mode 100755 index 0000000..aeb058b Binary files /dev/null and b/public/images/flags/np.png differ diff --git a/public/images/flags/nr.png b/public/images/flags/nr.png new file mode 100755 index 0000000..705fc33 Binary files /dev/null and b/public/images/flags/nr.png differ diff --git a/public/images/flags/nu.png b/public/images/flags/nu.png new file mode 100755 index 0000000..c3ce4ae Binary files /dev/null and b/public/images/flags/nu.png differ diff --git a/public/images/flags/nz.png b/public/images/flags/nz.png new file mode 100755 index 0000000..10d6306 Binary files /dev/null and b/public/images/flags/nz.png differ diff --git a/public/images/flags/om.png b/public/images/flags/om.png new file mode 100755 index 0000000..2ffba7e Binary files /dev/null and b/public/images/flags/om.png differ diff --git a/public/images/flags/pa.png b/public/images/flags/pa.png new file mode 100755 index 0000000..9b2ee9a Binary files /dev/null and b/public/images/flags/pa.png differ diff --git a/public/images/flags/pe.png b/public/images/flags/pe.png new file mode 100755 index 0000000..62a0497 Binary files /dev/null and b/public/images/flags/pe.png differ diff --git a/public/images/flags/pf.png b/public/images/flags/pf.png new file mode 100755 index 0000000..771a0f6 Binary files /dev/null and b/public/images/flags/pf.png differ diff --git a/public/images/flags/pg.png b/public/images/flags/pg.png new file mode 100755 index 0000000..10d6233 Binary files /dev/null and b/public/images/flags/pg.png differ diff --git a/public/images/flags/ph.png b/public/images/flags/ph.png new file mode 100755 index 0000000..b89e159 Binary files /dev/null and b/public/images/flags/ph.png differ diff --git a/public/images/flags/pk.png b/public/images/flags/pk.png new file mode 100755 index 0000000..e9df70c Binary files /dev/null and b/public/images/flags/pk.png differ diff --git a/public/images/flags/pl.png b/public/images/flags/pl.png new file mode 100755 index 0000000..d413d01 Binary files /dev/null and b/public/images/flags/pl.png differ diff --git a/public/images/flags/pm.png b/public/images/flags/pm.png new file mode 100755 index 0000000..ba91d2c Binary files /dev/null and b/public/images/flags/pm.png differ diff --git a/public/images/flags/pn.png b/public/images/flags/pn.png new file mode 100755 index 0000000..aa9344f Binary files /dev/null and b/public/images/flags/pn.png differ diff --git a/public/images/flags/pr.png b/public/images/flags/pr.png new file mode 100755 index 0000000..82d9130 Binary files /dev/null and b/public/images/flags/pr.png differ diff --git a/public/images/flags/ps.png b/public/images/flags/ps.png new file mode 100755 index 0000000..f5f5477 Binary files /dev/null and b/public/images/flags/ps.png differ diff --git a/public/images/flags/pt.png b/public/images/flags/pt.png new file mode 100755 index 0000000..ece7980 Binary files /dev/null and b/public/images/flags/pt.png differ diff --git a/public/images/flags/pw.png b/public/images/flags/pw.png new file mode 100755 index 0000000..6178b25 Binary files /dev/null and b/public/images/flags/pw.png differ diff --git a/public/images/flags/py.png b/public/images/flags/py.png new file mode 100755 index 0000000..cb8723c Binary files /dev/null and b/public/images/flags/py.png differ diff --git a/public/images/flags/qa.png b/public/images/flags/qa.png new file mode 100755 index 0000000..ed4c621 Binary files /dev/null and b/public/images/flags/qa.png differ diff --git a/public/images/flags/re.png b/public/images/flags/re.png new file mode 100755 index 0000000..8332c4e Binary files /dev/null and b/public/images/flags/re.png differ diff --git a/public/images/flags/readme.txt b/public/images/flags/readme.txt new file mode 100755 index 0000000..1028eec --- /dev/null +++ b/public/images/flags/readme.txt @@ -0,0 +1,9 @@ +Flag icons - http://www.famfamfam.com + +These icons are public domain, and as such are free for any use (attribution appreciated but not required). + +Note that these flags are named using the ISO3166-1 alpha-2 country codes where appropriate. A list of codes can be found at http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 + +If you find these icons useful, please donate via paypal to mjames@gmail.com (or click the donate button available at http://www.famfamfam.com/lab/icons/silk) + +Contact: mjames@gmail.com \ No newline at end of file diff --git a/public/images/flags/ro.png b/public/images/flags/ro.png new file mode 100755 index 0000000..57e74a6 Binary files /dev/null and b/public/images/flags/ro.png differ diff --git a/public/images/flags/rs.png b/public/images/flags/rs.png new file mode 100755 index 0000000..9439a5b Binary files /dev/null and b/public/images/flags/rs.png differ diff --git a/public/images/flags/ru.png b/public/images/flags/ru.png new file mode 100755 index 0000000..47da421 Binary files /dev/null and b/public/images/flags/ru.png differ diff --git a/public/images/flags/rw.png b/public/images/flags/rw.png new file mode 100755 index 0000000..5356491 Binary files /dev/null and b/public/images/flags/rw.png differ diff --git a/public/images/flags/sa.png b/public/images/flags/sa.png new file mode 100755 index 0000000..b4641c7 Binary files /dev/null and b/public/images/flags/sa.png differ diff --git a/public/images/flags/sb.png b/public/images/flags/sb.png new file mode 100755 index 0000000..a9937cc Binary files /dev/null and b/public/images/flags/sb.png differ diff --git a/public/images/flags/sc.png b/public/images/flags/sc.png new file mode 100755 index 0000000..39ee371 Binary files /dev/null and b/public/images/flags/sc.png differ diff --git a/public/images/flags/scotland.png b/public/images/flags/scotland.png new file mode 100755 index 0000000..a0e57b4 Binary files /dev/null and b/public/images/flags/scotland.png differ diff --git a/public/images/flags/sd.png b/public/images/flags/sd.png new file mode 100755 index 0000000..eaab69e Binary files /dev/null and b/public/images/flags/sd.png differ diff --git a/public/images/flags/se.png b/public/images/flags/se.png new file mode 100755 index 0000000..1994653 Binary files /dev/null and b/public/images/flags/se.png differ diff --git a/public/images/flags/sg.png b/public/images/flags/sg.png new file mode 100755 index 0000000..dd34d61 Binary files /dev/null and b/public/images/flags/sg.png differ diff --git a/public/images/flags/sh.png b/public/images/flags/sh.png new file mode 100755 index 0000000..4b1d2a2 Binary files /dev/null and b/public/images/flags/sh.png differ diff --git a/public/images/flags/si.png b/public/images/flags/si.png new file mode 100755 index 0000000..bb1476f Binary files /dev/null and b/public/images/flags/si.png differ diff --git a/public/images/flags/sj.png b/public/images/flags/sj.png new file mode 100755 index 0000000..160b6b5 Binary files /dev/null and b/public/images/flags/sj.png differ diff --git a/public/images/flags/sk.png b/public/images/flags/sk.png new file mode 100755 index 0000000..7ccbc82 Binary files /dev/null and b/public/images/flags/sk.png differ diff --git a/public/images/flags/sl.png b/public/images/flags/sl.png new file mode 100755 index 0000000..12d812d Binary files /dev/null and b/public/images/flags/sl.png differ diff --git a/public/images/flags/sm.png b/public/images/flags/sm.png new file mode 100755 index 0000000..3df2fdc Binary files /dev/null and b/public/images/flags/sm.png differ diff --git a/public/images/flags/sn.png b/public/images/flags/sn.png new file mode 100755 index 0000000..eabb71d Binary files /dev/null and b/public/images/flags/sn.png differ diff --git a/public/images/flags/so.png b/public/images/flags/so.png new file mode 100755 index 0000000..4a1ea4b Binary files /dev/null and b/public/images/flags/so.png differ diff --git a/public/images/flags/sr.png b/public/images/flags/sr.png new file mode 100755 index 0000000..5eff927 Binary files /dev/null and b/public/images/flags/sr.png differ diff --git a/public/images/flags/st.png b/public/images/flags/st.png new file mode 100755 index 0000000..2978557 Binary files /dev/null and b/public/images/flags/st.png differ diff --git a/public/images/flags/sv.png b/public/images/flags/sv.png new file mode 100755 index 0000000..2498799 Binary files /dev/null and b/public/images/flags/sv.png differ diff --git a/public/images/flags/sy.png b/public/images/flags/sy.png new file mode 100755 index 0000000..f5ce30d Binary files /dev/null and b/public/images/flags/sy.png differ diff --git a/public/images/flags/sz.png b/public/images/flags/sz.png new file mode 100755 index 0000000..914ee86 Binary files /dev/null and b/public/images/flags/sz.png differ diff --git a/public/images/flags/tc.png b/public/images/flags/tc.png new file mode 100755 index 0000000..8fc1156 Binary files /dev/null and b/public/images/flags/tc.png differ diff --git a/public/images/flags/td.png b/public/images/flags/td.png new file mode 100755 index 0000000..667f21f Binary files /dev/null and b/public/images/flags/td.png differ diff --git a/public/images/flags/tf.png b/public/images/flags/tf.png new file mode 100755 index 0000000..80529a4 Binary files /dev/null and b/public/images/flags/tf.png differ diff --git a/public/images/flags/tg.png b/public/images/flags/tg.png new file mode 100755 index 0000000..3aa00ad Binary files /dev/null and b/public/images/flags/tg.png differ diff --git a/public/images/flags/th.png b/public/images/flags/th.png new file mode 100755 index 0000000..dd8ba91 Binary files /dev/null and b/public/images/flags/th.png differ diff --git a/public/images/flags/tj.png b/public/images/flags/tj.png new file mode 100755 index 0000000..617bf64 Binary files /dev/null and b/public/images/flags/tj.png differ diff --git a/public/images/flags/tk.png b/public/images/flags/tk.png new file mode 100755 index 0000000..67b8c8c Binary files /dev/null and b/public/images/flags/tk.png differ diff --git a/public/images/flags/tl.png b/public/images/flags/tl.png new file mode 100755 index 0000000..77da181 Binary files /dev/null and b/public/images/flags/tl.png differ diff --git a/public/images/flags/tm.png b/public/images/flags/tm.png new file mode 100755 index 0000000..828020e Binary files /dev/null and b/public/images/flags/tm.png differ diff --git a/public/images/flags/tn.png b/public/images/flags/tn.png new file mode 100755 index 0000000..183cdd3 Binary files /dev/null and b/public/images/flags/tn.png differ diff --git a/public/images/flags/to.png b/public/images/flags/to.png new file mode 100755 index 0000000..f89b8ba Binary files /dev/null and b/public/images/flags/to.png differ diff --git a/public/images/flags/tr.png b/public/images/flags/tr.png new file mode 100755 index 0000000..be32f77 Binary files /dev/null and b/public/images/flags/tr.png differ diff --git a/public/images/flags/tt.png b/public/images/flags/tt.png new file mode 100755 index 0000000..2a11c1e Binary files /dev/null and b/public/images/flags/tt.png differ diff --git a/public/images/flags/tv.png b/public/images/flags/tv.png new file mode 100755 index 0000000..28274c5 Binary files /dev/null and b/public/images/flags/tv.png differ diff --git a/public/images/flags/tw.png b/public/images/flags/tw.png new file mode 100755 index 0000000..f31c654 Binary files /dev/null and b/public/images/flags/tw.png differ diff --git a/public/images/flags/tz.png b/public/images/flags/tz.png new file mode 100755 index 0000000..c00ff79 Binary files /dev/null and b/public/images/flags/tz.png differ diff --git a/public/images/flags/ua.png b/public/images/flags/ua.png new file mode 100755 index 0000000..09563a2 Binary files /dev/null and b/public/images/flags/ua.png differ diff --git a/public/images/flags/ug.png b/public/images/flags/ug.png new file mode 100755 index 0000000..33f4aff Binary files /dev/null and b/public/images/flags/ug.png differ diff --git a/public/images/flags/um.png b/public/images/flags/um.png new file mode 100755 index 0000000..c1dd965 Binary files /dev/null and b/public/images/flags/um.png differ diff --git a/public/images/flags/us.png b/public/images/flags/us.png new file mode 100755 index 0000000..10f451f Binary files /dev/null and b/public/images/flags/us.png differ diff --git a/public/images/flags/uy.png b/public/images/flags/uy.png new file mode 100755 index 0000000..31d948a Binary files /dev/null and b/public/images/flags/uy.png differ diff --git a/public/images/flags/uz.png b/public/images/flags/uz.png new file mode 100755 index 0000000..fef5dc1 Binary files /dev/null and b/public/images/flags/uz.png differ diff --git a/public/images/flags/va.png b/public/images/flags/va.png new file mode 100755 index 0000000..b31eaf2 Binary files /dev/null and b/public/images/flags/va.png differ diff --git a/public/images/flags/vc.png b/public/images/flags/vc.png new file mode 100755 index 0000000..8fa17b0 Binary files /dev/null and b/public/images/flags/vc.png differ diff --git a/public/images/flags/ve.png b/public/images/flags/ve.png new file mode 100755 index 0000000..00c90f9 Binary files /dev/null and b/public/images/flags/ve.png differ diff --git a/public/images/flags/vg.png b/public/images/flags/vg.png new file mode 100755 index 0000000..4156907 Binary files /dev/null and b/public/images/flags/vg.png differ diff --git a/public/images/flags/vi.png b/public/images/flags/vi.png new file mode 100755 index 0000000..ed26915 Binary files /dev/null and b/public/images/flags/vi.png differ diff --git a/public/images/flags/vn.png b/public/images/flags/vn.png new file mode 100755 index 0000000..ec7cd48 Binary files /dev/null and b/public/images/flags/vn.png differ diff --git a/public/images/flags/vu.png b/public/images/flags/vu.png new file mode 100755 index 0000000..b3397bc Binary files /dev/null and b/public/images/flags/vu.png differ diff --git a/public/images/flags/wales.png b/public/images/flags/wales.png new file mode 100755 index 0000000..e0d7cee Binary files /dev/null and b/public/images/flags/wales.png differ diff --git a/public/images/flags/wf.png b/public/images/flags/wf.png new file mode 100755 index 0000000..9f95587 Binary files /dev/null and b/public/images/flags/wf.png differ diff --git a/public/images/flags/ws.png b/public/images/flags/ws.png new file mode 100755 index 0000000..c169508 Binary files /dev/null and b/public/images/flags/ws.png differ diff --git a/public/images/flags/ye.png b/public/images/flags/ye.png new file mode 100755 index 0000000..468dfad Binary files /dev/null and b/public/images/flags/ye.png differ diff --git a/public/images/flags/yt.png b/public/images/flags/yt.png new file mode 100755 index 0000000..c298f37 Binary files /dev/null and b/public/images/flags/yt.png differ diff --git a/public/images/flags/za.png b/public/images/flags/za.png new file mode 100755 index 0000000..57c58e2 Binary files /dev/null and b/public/images/flags/za.png differ diff --git a/public/images/flags/zm.png b/public/images/flags/zm.png new file mode 100755 index 0000000..c25b07b Binary files /dev/null and b/public/images/flags/zm.png differ diff --git a/public/images/flags/zw.png b/public/images/flags/zw.png new file mode 100755 index 0000000..53c9725 Binary files /dev/null and b/public/images/flags/zw.png differ diff --git a/resources/views/admin/sales/_detail_homparty.blade.php b/resources/views/admin/sales/_detail_homparty.blade.php index 263842a..ca6c1d5 100644 --- a/resources/views/admin/sales/_detail_homparty.blade.php +++ b/resources/views/admin/sales/_detail_homparty.blade.php @@ -7,9 +7,9 @@ {{__('Produkt')}} {{__('Anzahl')}} {{__('Marge')}} - {{__('EK-Preis')}} {{__('Points')}} {{__('Verdienst')}} + {{__('EK-Preis')}} {{__('VK-Preis')}} @@ -34,9 +34,6 @@ {{ $value->margin }}% - - {{ $value->getFormattedTotalEKPrice() }} € - {{ $value->getFormattedTotalPoints() }} @@ -46,6 +43,9 @@ {{ $value->getFormattedTotalPrice() }} € + + {{ $value->getFormattedTotalEKPrice() }} € + @endforeach @@ -69,24 +69,24 @@ Versandkosten   -   + {{ Util::formatNumber($user_cart['shipping_price'])}} € {{ Util::formatNumber($user_cart['shipping_price'])}} € @endif Gesamt: - {{Util::formatNumber($user_cart['ek_price'])}} € {{$user_cart['points']}} {{Util::formatNumber($user_cart['income_price'])}} € {{Util::formatNumber($user_cart['price'])}} € + {{Util::formatNumber($user_cart['ek_price'])}} € @else @if($hp_order['is_bonus']) Gutschrift Homeparty Gutschein   -   + - {{ Util::formatNumber($hp_order['bonus_value']) }} € - {{ Util::formatNumber($hp_order['bonus_value']) }} € @endif @@ -94,16 +94,17 @@ Gutschrift Bonus   -   + - {{ Util::formatNumber($hp_order['bonus_coupon']) }} € - {{ Util::formatNumber($hp_order['bonus_coupon']) }} € @endif @if($hp_order['is_bonus']) - Abzug Points durch Gutschein + Abzug Points durch Gutschein - {{ $hp_order['bonus_points_diff'] }}     +   @endif @@ -114,10 +115,11 @@ Summen: - {{Util::formatNumber($user_cart['ek_price'])}} € {{$user_cart['points']}} {{Util::formatNumber($user_cart['income_price'])}} € {{Util::formatNumber($user_cart['price'])}} € + {{Util::formatNumber($user_cart['ek_price'])}} € + @endif diff --git a/resources/views/admin/sales/_detail_homparty_total.blade.php b/resources/views/admin/sales/_detail_homparty_total.blade.php index 8a50629..067d73c 100644 --- a/resources/views/admin/sales/_detail_homparty_total.blade.php +++ b/resources/views/admin/sales/_detail_homparty_total.blade.php @@ -3,10 +3,10 @@ Gesamt - {{__('EK-Preis')}} {{__('Points')}} {{__('Verdienst')}} {{__('VK-Preis')}} + {{__('EK-Preis')}} @@ -28,10 +28,10 @@ Gesamtsummen: - {{ Util::formatNumber($hp_order['ek_price'])}} € - {{ $hp_order['points']}} + {{ $hp_order['points'] - $hp_order['bonus_points_diff'] }} {{ Util::formatNumber($hp_order['income_price'])}} € {{ Util::formatNumber($hp_order['price'])}} € + {{ Util::formatNumber($hp_order['ek_price'])}} € @@ -39,9 +39,9 @@   -     {{ Util::formatNumber($hp_order['price_net'])}} € + {{ Util::formatNumber($hp_order['ek_price_net'])}} € @@ -49,9 +49,9 @@   -     {{ Util::formatNumber($hp_order['price']-$hp_order['price_net'])}} € + {{ Util::formatNumber($hp_order['ek_price']-$hp_order['ek_price_net'])}} € diff --git a/resources/views/emails/homeparty_detail.blade.php b/resources/views/emails/homeparty_detail.blade.php index 5183198..8e60bbd 100644 --- a/resources/views/emails/homeparty_detail.blade.php +++ b/resources/views/emails/homeparty_detail.blade.php @@ -6,6 +6,7 @@ {{__('Produkt')}} {{__('Anzahl')}} {{__('VK-Preis')}} + {{__('EK-Preis')}} @foreach($homeparty_guest->homeparty_user_order_items as $value) @@ -20,7 +21,9 @@ {{ $value->getFormattedTotalPrice() }} € - + + + {{ $value->getFormattedTotalEKPrice() }} € @endforeach @@ -42,7 +45,7 @@ @if($homeparty_guest->getDelivery() === 'direct') Versandkosten - + {{ Util::formatNumber($user_cart['shipping_price'])}} € {{ Util::formatNumber($user_cart['shipping_price'])}} € @endif @@ -50,19 +53,20 @@ Gesamt: {{Util::formatNumber($user_cart['price'])}} € + {{Util::formatNumber($user_cart['ek_price'])}} € @else @if($hp_order['is_bonus']) Gutschrift Homeparty Gutschein - + - {{ Util::formatNumber($hp_order['bonus_value']) }} € - {{ Util::formatNumber($hp_order['bonus_value']) }} € @endif @if($hp_order['is_bonus_coupon']) Gutschrift Bonus - + - {{ Util::formatNumber($hp_order['bonus_coupon']) }} € - {{ Util::formatNumber($hp_order['bonus_coupon']) }} € @endif @@ -70,13 +74,13 @@ @endif - Versandkosten: - + Versandkosten: {{Util::formatNumber($user_cart['shipping_price'])}} € Summen: {{Util::formatNumber($user_cart['price'])}} € + {{Util::formatNumber($user_cart['ek_price'])}} € @endif diff --git a/resources/views/emails/homeparty_detail_total.blade.php b/resources/views/emails/homeparty_detail_total.blade.php index 7b7e56d..7195411 100644 --- a/resources/views/emails/homeparty_detail_total.blade.php +++ b/resources/views/emails/homeparty_detail_total.blade.php @@ -5,6 +5,7 @@ Gesamt {{__('VK-Preis')}} + {{__('EK-Preis')}} @if($hp_order['is_bonus']) @@ -15,22 +16,26 @@ @endif - + Gesamtsummen: {{ Util::formatNumber($hp_order['price'])}} € + {{ Util::formatNumber($hp_order['ek_price'])}} € + - + Summe ohne MwSt: {{ Util::formatNumber($hp_order['price_net'])}} € + {{ Util::formatNumber($hp_order['ek_price_net'])}} € - - + + Enthaltene MwSt: {{ Util::formatNumber($hp_order['price']-$hp_order['price_net'])}} € + {{ Util::formatNumber($hp_order['ek_price']-$hp_order['ek_price_net'])}} € diff --git a/resources/views/layouts/includes/layout-sidenav.blade.php b/resources/views/layouts/includes/layout-sidenav.blade.php index 6912a70..1501b59 100755 --- a/resources/views/layouts/includes/layout-sidenav.blade.php +++ b/resources/views/layouts/includes/layout-sidenav.blade.php @@ -74,7 +74,7 @@ @endif - @if(Auth::user()->isActiveAccount() && \App\Services\Util::checkUserLandIsNot(Auth::user())) + @if(Auth::user()->isActiveAccount())
  • @@ -90,7 +90,7 @@
  • @endif - @if(Auth::user()->isActiveAccount() && \App\Services\Util::checkUserLandIsNot(Auth::user())) + @if(Auth::user()->isActiveAccount())
  • diff --git a/resources/views/user/homeparty/detail.blade.php b/resources/views/user/homeparty/detail.blade.php index e8c1464..a4529fa 100644 --- a/resources/views/user/homeparty/detail.blade.php +++ b/resources/views/user/homeparty/detail.blade.php @@ -12,12 +12,11 @@ zurück -