User Order all Margins / Checkout
This commit is contained in:
parent
a96d7d5c77
commit
224bf9e951
92 changed files with 3551 additions and 561 deletions
|
|
@ -16963,10 +16963,40 @@
|
|||
*
|
||||
* @static
|
||||
*/
|
||||
public static function reCalculateShippingPrice()
|
||||
public static function reCalculate()
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->reCalculateShippingPrice();
|
||||
return $instance->reCalculate();
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function calculateMargins()
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->calculateMargins();
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function getYardMargin()
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->getYardMargin();
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function getYardCommission()
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->getYardCommission();
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
|
@ -16977,6 +17007,26 @@
|
|||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->setShippingCountryWithPrice($shipping_country_id, $shipping_is_for);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function setShoppingUser($user, $payment_credit = false)
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->setShoppingUser($user, $payment_credit);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function getPaymentCredit()
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->getPaymentCredit();
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
|
@ -17031,6 +17081,26 @@
|
|||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->totalWithShipping($decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function totalWithShippingWithoutCredit($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->totalWithShippingWithoutCredit($decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @static
|
||||
*/
|
||||
public static function totalfromCredit($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->totalfromCredit($decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
/**
|
||||
* Get the total price of the items in the cart.
|
||||
|
|
@ -17103,10 +17173,10 @@
|
|||
* @return float
|
||||
* @static
|
||||
*/
|
||||
public static function subtotal($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
public static function subtotal($decimals = null, $decimalPoint = null, $thousandSeperator = null, $discount = true)
|
||||
{
|
||||
/** @var \App\Services\Yard $instance */
|
||||
return $instance->subtotal($decimals, $decimalPoint, $thousandSeperator);
|
||||
return $instance->subtotal($decimals, $decimalPoint, $thousandSeperator, $discount);
|
||||
}
|
||||
/**
|
||||
*
|
||||
|
|
|
|||
|
|
@ -626,7 +626,7 @@ class ShoppingUserController extends Controller
|
|||
'subtotal' => Yard::instance('shopping')->subtotal(2, '.', ''),
|
||||
'shipping' => Yard::instance('shopping')->shipping(2, '.', ','),
|
||||
'shipping_net' => Yard::instance('shopping')->shippingNet(2, '.', ''),
|
||||
'subtotal_ws' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''),
|
||||
'subtotal_shipping' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''),
|
||||
'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''),
|
||||
'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
|
||||
'points' => Yard::instance('shopping')->points(),
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ class CustomerController extends Controller
|
|||
data-action="shopping-user-is-like-member"
|
||||
data-back="'.route('admin_customers').'"
|
||||
data-modal="modal-xl"
|
||||
data-route="'.route('modal_load').'"><span class="fa fa-edit"></span> Berater zuordnen</button>';
|
||||
data-route="'.route('modal_load').'"><span class="fa fa-edit"></span> Vertriebspartner zuordnen</button>';
|
||||
}
|
||||
if($ShoppingUser->member_id){
|
||||
return '<a href="'.route('admin_lead_edit', [$ShoppingUser->member_id]).'">'.$ShoppingUser->member->getFullName().'</a>';
|
||||
|
|
|
|||
|
|
@ -222,25 +222,27 @@ class LeadController extends Controller
|
|||
public function released($action, $id){
|
||||
|
||||
$user = User::findOrFail($id);
|
||||
|
||||
if($action === 'completed'){
|
||||
$validator = Validator::make(Request::all(), []);
|
||||
if(!$user->m_sponsor){
|
||||
$validator->errors()->add('m_sponsor', __('Berater hat keinen Sponsor.'));
|
||||
}
|
||||
/*if(!$user->m_sponsor){
|
||||
$validator->errors()->add('m_sponsor', __('Vertriebspartner hat keinen Sponsor.'));
|
||||
}*/
|
||||
if(!$user->account->m_first_name){
|
||||
$validator->errors()->add('m_first_name', __('Berater hat keinen Vornamen.'));
|
||||
$validator->errors()->add('m_first_name', __('Vertriebspartner hat keinen Vornamen.'));
|
||||
}
|
||||
if(!$user->account->m_first_name){
|
||||
$validator->errors()->add('m_last_name', __('Berater hat keinen Nachnamen.'));
|
||||
}
|
||||
if(!$user->account->m_account){
|
||||
$validator->errors()->add('m_account', __('Berater hat keine Account ID'));
|
||||
if(!$user->account->m_last_name){
|
||||
$validator->errors()->add('m_last_name', __('Vertriebspartner hat keinen Nachnamen.'));
|
||||
}
|
||||
|
||||
if ($validator->errors()->count()) {
|
||||
return back()->withErrors($validator)->withRequest(Request::all());
|
||||
}
|
||||
|
||||
if(!$user->account->m_account){
|
||||
$user->account->m_account = UserAccount::max('m_account') +1;
|
||||
$user->account->save();
|
||||
}
|
||||
|
||||
//create PDF
|
||||
$pdf = new ContractPDFRepository($user);
|
||||
$pdf->_set('disk', 'user');
|
||||
|
|
@ -271,7 +273,7 @@ class LeadController extends Controller
|
|||
}
|
||||
|
||||
UserHistory::create(['user_id' => $user->id, 'action'=>'released_completed', 'status'=>0]);
|
||||
\Session()->flash('alert-success', "Berater freigeschaltet!");
|
||||
\Session()->flash('alert-success', "Vertriebspartner freigeschaltet!");
|
||||
}
|
||||
|
||||
if($action === 'incomplete'){
|
||||
|
|
@ -303,7 +305,7 @@ class LeadController extends Controller
|
|||
->save();
|
||||
}
|
||||
UserHistory::create(['user_id' => $user->id, 'action'=>'released_incomplete', 'status'=>0]);
|
||||
\Session()->flash('alert-success', "E-Mail an Berater gesendet.");
|
||||
\Session()->flash('alert-success', "E-Mail an Vertriebspartner gesendet.");
|
||||
|
||||
}
|
||||
return redirect(route('admin_lead_edit', [$user->id]));
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class MembershipController extends Controller
|
|||
'identifier' => $identifier,
|
||||
'user_shop_id' => 1, //is first faker shop for nuy intern
|
||||
'auth_user_id' => Auth::user()->id,
|
||||
'payment' => 3, //Berater Membership
|
||||
'payment' => 3, //Vertriebspartner Membership
|
||||
'subdomain' => url('/'),
|
||||
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||
'shopping_data' => $data,
|
||||
|
|
|
|||
|
|
@ -63,6 +63,12 @@ class ModalController extends Controller
|
|||
}
|
||||
|
||||
|
||||
if($data['action'] === 'user-order-show-user-level-margin'){
|
||||
$user = User::find($data['id']);
|
||||
$ret = view("admin.modal.user_level_margin", compact('user', 'data'))->render();
|
||||
}
|
||||
|
||||
|
||||
if($data['action'] === 'homeparty-add-product') {
|
||||
$homeparty = Homeparty::find($data['id']);
|
||||
$homeparty_user = HomepartyUser::find($data['user_id']);
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ class PaymentMethodController extends Controller
|
|||
'short' => $data['short'],
|
||||
'pos' => $data['pos'],
|
||||
'show_at' => $data['show_at'],
|
||||
'max_price' => $data['max_price'],
|
||||
'default' => isset($data['default']) ? true : false,
|
||||
'active' => isset($data['active']) ? true : false,
|
||||
]);
|
||||
|
|
@ -44,6 +45,7 @@ class PaymentMethodController extends Controller
|
|||
$model->name = $data['name'];
|
||||
$model->short = $data['short'];
|
||||
$model->pos = $data['pos'];
|
||||
$model->max_price = $data['max_price'];
|
||||
$model->show_at = $data['show_at'];
|
||||
$model->default = isset($data['default']) ? true : false;
|
||||
$model->active = isset($data['active']) ? true : false;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,10 @@ class ProductController extends Controller
|
|||
$rules = array(
|
||||
'name' => 'required',
|
||||
);
|
||||
if($data['wp_number']){
|
||||
/*if(isset($data['number']) && $data['number'] != ""){
|
||||
$rules['number'] = 'int';
|
||||
}*/
|
||||
if(isset($data['wp_number'])){
|
||||
if($data['id'] !== "new"){
|
||||
$model = Product::findOrFail($data['id']);
|
||||
$rules['wp_number'] = 'unique:products,wp_number,'.$model->id;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class SalesController extends Controller
|
|||
})
|
||||
->addColumn('is_for', function (ShoppingOrder $ShoppingOrder) {
|
||||
if($ShoppingOrder->shopping_user->is_for === 'me'){
|
||||
return '<span class="badge badge-pill badge-secondary">Beraterbestellung</span>';
|
||||
return '<span class="badge badge-pill badge-secondary">Vertriebspartnerbestellung</span>';
|
||||
}
|
||||
if($ShoppingOrder->shopping_user->is_for === 'ot'){
|
||||
return '<span class="badge badge-pill badge-info">Kundenbestellung</span>';
|
||||
|
|
@ -216,7 +216,7 @@ class SalesController extends Controller
|
|||
})
|
||||
->addColumn('is_for', function (ShoppingOrder $ShoppingOrder) {
|
||||
if($ShoppingOrder->shopping_user->is_for === 'me'){
|
||||
return '<span class="badge badge-pill badge-secondary">Beraterbestellung</span>';
|
||||
return '<span class="badge badge-pill badge-secondary">Vertriebspartnerbestellung</span>';
|
||||
}
|
||||
if($ShoppingOrder->shopping_user->is_for === 'ot'){
|
||||
return '<span class="badge badge-pill badge-info">Kundenbestellung</span>';
|
||||
|
|
@ -239,7 +239,7 @@ class SalesController extends Controller
|
|||
data-action="shopping-user-is-like-member"
|
||||
data-back="'.route('admin_sales_customers').'"
|
||||
data-modal="modal-xl"
|
||||
data-route="'.route('modal_load').'"><span class="fa fa-edit"></span> Berater zuordnen</button>';
|
||||
data-route="'.route('modal_load').'"><span class="fa fa-edit"></span> Vertriebspartner zuordnen</button>';
|
||||
}
|
||||
return '';
|
||||
})
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ use App\Models\PaymentTransaction;
|
|||
use App\Models\ShippingCountry;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingOrderItem;
|
||||
use App\Models\ShoppingOrderMargin;
|
||||
use App\Models\ShoppingPayment;
|
||||
use App\Models\ShoppingUser;
|
||||
use App\Services\CustomerPriority;
|
||||
|
|
@ -125,14 +126,13 @@ class CheckoutController extends Controller
|
|||
|
||||
if($is_from !== 'shopping' && Util::getAuthUser()){
|
||||
$user = Util::getAuthUser();
|
||||
$payment_methods = $user->payment_methods;
|
||||
$user_payment_methods = $user->payment_methods;
|
||||
$payment_data = $user->account->payment_data;
|
||||
}else{
|
||||
$payment_methods = PaymentMethod::getDefaultAsArray()->toArray();
|
||||
$user_payment_methods = PaymentMethod::getDefaultAsArray()->toArray();
|
||||
$payment_data = false;
|
||||
}
|
||||
|
||||
$payment_methods_active = \App\Models\PaymentMethod::where('active', true)->get()->pluck( 'id', 'short')->toArray();
|
||||
$data = [
|
||||
'is_from' => $is_from,
|
||||
'is_for' => $is_for,
|
||||
|
|
@ -140,8 +140,7 @@ class CheckoutController extends Controller
|
|||
'user_shop' => Util::getUserShop(),
|
||||
'shopping_user' => $shopping_user,
|
||||
'shopping_mode' => Util::getUserShoppingMode(),
|
||||
'payment_methods' => $payment_methods,
|
||||
'payment_methods_active' => $payment_methods_active,
|
||||
'user_payment_methods' => $user_payment_methods,
|
||||
'identifier' => $identifier,
|
||||
'payment_data' => $payment_data,
|
||||
'back' => url()->previous(),
|
||||
|
|
@ -402,18 +401,25 @@ class CheckoutController extends Controller
|
|||
private function makeShoppingOrder($shopping_user){
|
||||
|
||||
$user_shop = Util::getUserShop();
|
||||
|
||||
$discount = 0;
|
||||
if(Yard::instance('shopping')->getYardMargin()){
|
||||
$discount = Yard::instance('shopping')->getYardMargin()->net_discount;
|
||||
}
|
||||
$data = [
|
||||
'shopping_user_id' => $shopping_user->id,
|
||||
'auth_user_id' => $shopping_user->auth_user_id,
|
||||
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||
'payment_for' => Util::getUserPaymentFor(),
|
||||
'total' => Yard::instance('shopping')->total(2, '.', ''),
|
||||
'subtotal_full' => Yard::instance('shopping')->subtotal(2, '.', '', false),
|
||||
'discount' => $discount,
|
||||
'subtotal' => Yard::instance('shopping')->subtotal(2, '.', ''),
|
||||
'shipping' => Yard::instance('shopping')->shipping(2, '.', ','),
|
||||
'shipping_net' => Yard::instance('shopping')->shippingNet(2, '.', ''),
|
||||
'subtotal_ws' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''),
|
||||
'subtotal_shipping' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''),
|
||||
'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''),
|
||||
'total_without_credit' => Yard::instance('shopping')->totalWithShippingWithoutCredit(2, '.', ''),
|
||||
'payment_credit' => Yard::instance('shopping')->totalfromCredit(2, '.', ''),
|
||||
'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
|
||||
'points' => Yard::instance('shopping')->points(),
|
||||
'weight' => Yard::instance('shopping')->weight(),
|
||||
|
|
@ -433,8 +439,9 @@ class CheckoutController extends Controller
|
|||
if(!$shopping_order){
|
||||
$shopping_order = ShoppingOrder::create($data);
|
||||
}
|
||||
$this->putPayments('shopping_order_id', $shopping_order->id);
|
||||
$this->makeOrderMargin($shopping_order);
|
||||
|
||||
$this->putPayments('shopping_order_id', $shopping_order->id);
|
||||
$items = Yard::instance('shopping')->getContentByOrder();
|
||||
$shopping_order->shopping_order_items()->each(function($model) use ($items, $shopping_order, $shopping_user) {
|
||||
foreach ($items as $item) {
|
||||
|
|
@ -477,6 +484,38 @@ class CheckoutController extends Controller
|
|||
return $shopping_order;
|
||||
}
|
||||
|
||||
private function makeOrderMargin(ShoppingOrder $shopping_order)
|
||||
{
|
||||
|
||||
if (Yard::instance('shopping')->getYardMargin()) {
|
||||
|
||||
$data = [
|
||||
'shopping_order_id' => $shopping_order->id,
|
||||
'user_id' => $shopping_order->auth_user_id,
|
||||
'net_price' => Yard::instance('shopping')->getYardMargin()->net_price,
|
||||
'net_discount' => Yard::instance('shopping')->getYardMargin()->net_discount,
|
||||
'net_amount' => Yard::instance('shopping')->getYardMargin()->net_amount,
|
||||
'from_payment_credit' => Yard::instance('shopping')->totalfromCredit(2, '.', ''),
|
||||
'from' => now(),
|
||||
'content' => serialize(Yard::instance('shopping')->getYardMargin()->toArray())
|
||||
];
|
||||
if(Yard::instance('shopping')->getYardMargin()->net_partner_commission > 0){
|
||||
$data['m_sponsor_id'] = $shopping_order->auth_user->m_sponsor;
|
||||
$data['net_partner_commission'] = Yard::instance('shopping')->getYardMargin()->net_partner_commission;
|
||||
}
|
||||
$shopping_order_margin = false;
|
||||
if ($this->getPayments('shopping_order_margin_id')) {
|
||||
$shopping_order_margin = ShoppingOrderMargin::find($this->getPayments('shopping_order_margin_id'));
|
||||
if ($shopping_order_margin) {
|
||||
$shopping_order_margin->fill($data);
|
||||
$shopping_order_margin->save();}
|
||||
}
|
||||
if (!$shopping_order_margin) {
|
||||
$shopping_order_margin = ShoppingOrderMargin::create($data);
|
||||
}
|
||||
$this->putPayments('shopping_order_margin_id', $shopping_order_margin->id);
|
||||
}
|
||||
}
|
||||
private function putPayments($key, $value){
|
||||
$content = $this->getContent();
|
||||
$content->put($key, $value);
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ class HomepartyController extends Controller
|
|||
'identifier' => $identifier,
|
||||
'user_shop_id' => 1, //is first faker shop for nuy intern
|
||||
'auth_user_id' => Auth::user()->id,
|
||||
'payment' => 5, //Berater Membership
|
||||
'payment' => 5, //Vertriebspartner Membership
|
||||
'subdomain' => url('/'),
|
||||
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||
'shopping_data' => $data,
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class OrderController extends Controller
|
|||
})
|
||||
->addColumn('is_for', function (ShoppingOrder $ShoppingOrder) {
|
||||
if($ShoppingOrder->shopping_user->is_for === 'me'){
|
||||
return '<span class="badge badge-pill badge-secondary">Beraterbestellung</span>';
|
||||
return '<span class="badge badge-pill badge-secondary">Vertriebspartnerbestellung</span>';
|
||||
}
|
||||
if($ShoppingOrder->shopping_user->is_for === 'ot'){
|
||||
return '<span class="badge badge-pill badge-info">Kundenbestellung</span>';
|
||||
|
|
@ -149,6 +149,8 @@ class OrderController extends Controller
|
|||
}
|
||||
|
||||
Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country_id, $for);
|
||||
Yard::instance('shopping')->setShoppingUser($user, true);
|
||||
|
||||
|
||||
$data = [
|
||||
'shopping_user' => $shopping_user,
|
||||
|
|
@ -177,7 +179,6 @@ class OrderController extends Controller
|
|||
$validator = Validator::make(Request::all(), $rules);
|
||||
|
||||
if ($validator->fails()) {
|
||||
dd($validator);
|
||||
return back()->withErrors($validator)->withInput(Request::all());
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +215,7 @@ class OrderController extends Controller
|
|||
'identifier' => $identifier,
|
||||
'user_shop_id' => 1, //is first faker shop for buy intern
|
||||
'auth_user_id' => Auth::user()->id,
|
||||
'payment' => 2, //Berater Shop
|
||||
'payment' => 2, //Vertriebspartner Shop
|
||||
'subdomain' => url('/'),
|
||||
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||
'shopping_data' => $data,
|
||||
|
|
@ -294,12 +295,12 @@ class OrderController extends Controller
|
|||
$q->where('show_at', '=', 0)
|
||||
->orWhere('show_at', '=', 1);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
//Kunden und Berater
|
||||
//->orWhere('show_at', '=', 2); // Nur Berater
|
||||
|
||||
//Kunden und Vertriebspartner
|
||||
//->orWhere('show_at', '=', 2); // Nur Vertriebspartner
|
||||
//->orderBy('pos', 'DESC')
|
||||
//->orderBy('id', 'DESC');
|
||||
|
||||
|
|
@ -346,6 +347,7 @@ class OrderController extends Controller
|
|||
</div>';
|
||||
|
||||
})*/
|
||||
|
||||
->addColumn('picture', function (Product $product) {
|
||||
if(count($product->images)){
|
||||
return '<img class="img-fluid img-extra" alt="" src="'.route('product_image', [$product->images->first()->slug]).'">';
|
||||
|
|
@ -361,8 +363,15 @@ class OrderController extends Controller
|
|||
->addColumn('price_vk_gross', function (Product $product) {
|
||||
return $product->getFormattedPriceWith(false, false). " €";
|
||||
})
|
||||
->addColumn('single_commission', function (Product $product) {
|
||||
return $product->single_commission ? '<span class="badge badge-warning">Handelspanne: '.$product->getFormattedValueCommission().' %</span>' : '<span class="badge badge-primary">Staffelprovision</span> <button class="btn btn-default btn-xs icon-btn md-btn-flat product-tooltip" title="details" data-modal="modal-lg"
|
||||
data-toggle="modal" data-target="#modals-load-content" data-id="'.Auth::user()->id.'" data-route="'.route('modal_load').'"
|
||||
data-action="user-order-show-user-level-margin" data-view="customer"><i class="ion ion-md-eye"></i></button>';
|
||||
})
|
||||
|
||||
|
||||
->addColumn('action', function (Product $product) {
|
||||
return '<button class="btn btn-default btn-sm icon-btn md-btn-flat product-tooltip" title="details" data-modal="modal-lg"
|
||||
return '<button class="btn btn-default btn-sm icon-btn md-btn-flat product-tooltip" title="details" data-modal="modal-lg"
|
||||
data-toggle="modal" data-target="#modals-load-content" data-id="'.$product->id.'" data-route="'.route('modal_load').'"
|
||||
data-action="user-order-show-product" data-view="customer"><i class="ion ion-md-eye"></i></button>';
|
||||
})
|
||||
|
|
@ -379,9 +388,10 @@ class OrderController extends Controller
|
|||
->orderColumn('price_gross', 'price_gross $1')
|
||||
->orderColumn('price_vk_gross', 'price $1')
|
||||
->orderColumn('contents_total', 'contents_total $1')
|
||||
->orderColumn('single_commission', 'single_commission $1')
|
||||
->orderColumn('weight', 'weight $1')
|
||||
|
||||
->rawColumns(['add_card', 'product', 'quantity', 'picture', 'action'])
|
||||
->rawColumns(['add_card', 'product', 'quantity', 'picture', 'action', 'single_commission'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
|
@ -401,7 +411,16 @@ class OrderController extends Controller
|
|||
}
|
||||
|
||||
//get the card item
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(false, true), $product->tax, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points]);
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(false, true), $product->tax,
|
||||
[
|
||||
'image' => $image,
|
||||
'slug' => $product->slug,
|
||||
'weight' => $product->weight,
|
||||
'single_commission' => $product->single_commission,
|
||||
'amount_commission' => $product->amount_commission,
|
||||
'value_commission' => $product->value_commission,
|
||||
'partner_commission' => $product->partner_commission,
|
||||
]);
|
||||
Yard::setTax($cartItem->rowId, $product->tax);
|
||||
|
||||
if(isset($data['qty']) && $data['qty'] > 0){
|
||||
|
|
@ -411,10 +430,8 @@ class OrderController extends Controller
|
|||
Yard::instance('shopping')->remove($cartItem->rowId);
|
||||
}
|
||||
//
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
//$this->checkCompProduct(Yard::instance('shopping')->getNumComp());
|
||||
Yard::instance('shopping')->reCalculate();
|
||||
$html_card = view("user.order.yard_view_form", $data)->render();
|
||||
//$html_comp = view("user.order.comp_product", $data)->render();
|
||||
|
||||
return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>'']);
|
||||
}
|
||||
|
|
@ -435,19 +452,6 @@ class OrderController extends Controller
|
|||
//$html_comp = view("user.order.comp_product", $data)->render();
|
||||
return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>'']);
|
||||
}
|
||||
/* if($data['action'] === 'updateCompProduct'){
|
||||
// $data['comp_product_id']
|
||||
// $data['comp_num']
|
||||
//count_comp_products
|
||||
$this->updateCompProduct($data);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
$html_card = view("user.order.yard_view_form", $data)->render();
|
||||
$html_comp = view("user.order.comp_product", $data)->render();
|
||||
|
||||
return response()->json(['response' => true, 'data'=>$data, 'html_card'=>$html_card, 'html_comp'=>$html_comp]);
|
||||
|
||||
}
|
||||
*/
|
||||
return response()->json(['response' => false, 'data'=>$data]);
|
||||
}
|
||||
}
|
||||
|
|
@ -484,10 +488,5 @@ class OrderController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
private function getCompProducts($for){
|
||||
if($for === 'me'){
|
||||
return Product::whereActive(true)->where('show_at', '=', 1)->where('shipping_addon', true)->orderBy('pos', 'DESC')->get();
|
||||
}
|
||||
return null;
|
||||
}*/
|
||||
*/
|
||||
}
|
||||
|
|
@ -5,8 +5,11 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Models\Attribute;
|
||||
use App\Models\ProductAttribute;
|
||||
use App\Models\Shipping;
|
||||
use App\Models\UserLevel;
|
||||
use App\Models\UserLevelMargin;
|
||||
use Request;
|
||||
use Validator;
|
||||
|
||||
|
||||
class UserLevelController extends Controller
|
||||
|
|
@ -27,42 +30,95 @@ class UserLevelController extends Controller
|
|||
return view('admin.level.index', $data);
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
if($id === "new"){
|
||||
$user_level = new UserLevel();
|
||||
$user_level->active = 1;
|
||||
|
||||
}else{
|
||||
$user_level = UserLevel::findOrFail($id);
|
||||
|
||||
}
|
||||
$data = [
|
||||
'value' => $user_level,
|
||||
];
|
||||
return view('admin.level.edit', $data);
|
||||
|
||||
|
||||
}
|
||||
public function store()
|
||||
{
|
||||
|
||||
$data = Request::all();
|
||||
if($data['id'] == "new"){
|
||||
$model = UserLevel::create([
|
||||
'name' => $data['name'],
|
||||
'pos' => $data['pos'],
|
||||
'content' => $data['content'],
|
||||
'active' => isset($data['active']) ? true : false,
|
||||
]);
|
||||
}else{
|
||||
$model = UserLevel::find($data['id']);
|
||||
$model->name = $data['name'];
|
||||
$model->pos = $data['pos'];
|
||||
$model->content = $data['content'];
|
||||
$model->active = isset($data['active']) ? true : false;
|
||||
$model->save();
|
||||
}
|
||||
|
||||
if(!empty($data['trans'])){
|
||||
$trans = [];
|
||||
foreach ($data['trans'] as $lang => $value){
|
||||
if($value && $value != null){
|
||||
$trans[$lang] = $value;
|
||||
if($data['action'] === 'user_level') {
|
||||
if ($data['id'] === "new") {
|
||||
$user_level = UserLevel::create([
|
||||
'name' => $data['name'],
|
||||
'pos' => $data['pos'],
|
||||
'content' => $data['content'],
|
||||
'partner_provision' => isset($data['partner_provision']) ? true : false,
|
||||
'active' => isset($data['active']) ? true : false,
|
||||
]);
|
||||
} else {
|
||||
$user_level = UserLevel::find($data['id']);
|
||||
$user_level->name = $data['name'];
|
||||
$user_level->pos = $data['pos'];
|
||||
$user_level->content = $data['content'];
|
||||
$user_level->partner_provision = isset($data['partner_provision']) ? true : false;
|
||||
$user_level->active = isset($data['active']) ? true : false;
|
||||
$user_level->save();
|
||||
}
|
||||
|
||||
if (!empty($data['trans'])) {
|
||||
$trans = [];
|
||||
foreach ($data['trans'] as $lang => $value) {
|
||||
if ($value && $value != null) {
|
||||
$trans[$lang] = $value;
|
||||
}
|
||||
}
|
||||
if (count($trans)) {
|
||||
$user_level->trans_name = $trans;
|
||||
$user_level->save();
|
||||
}
|
||||
}
|
||||
if(count($trans)){
|
||||
$model->trans_name = $trans;
|
||||
$model->save();
|
||||
}
|
||||
|
||||
if($data['action'] === 'user_level_margin') {
|
||||
$user_level = UserLevel::findOrFail($data['user_level_id']);
|
||||
$rules = array('price_from' => 'required');
|
||||
$ret = ['value' => $user_level];
|
||||
$validator = Validator::make(Request::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
return view('admin.level.edit', $ret)->withErrors($validator);
|
||||
}
|
||||
if ($data['id'] === "new") {
|
||||
$user_level_margin = UserLevelMargin::create($data);
|
||||
} else {
|
||||
$user_level_margin = UserLevelMargin::findOrFail($data['id']);
|
||||
if($user_level_margin->user_level_id != $user_level->id){
|
||||
abort(404);
|
||||
}
|
||||
$user_level_margin->fill($data);
|
||||
$user_level_margin->save();
|
||||
}
|
||||
}
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('admin_levels'));
|
||||
return redirect(route('admin_level_edit', [$user_level->id]));
|
||||
|
||||
}
|
||||
|
||||
public function delete($do, $id)
|
||||
{
|
||||
if($do === 'user_level_margin'){
|
||||
$model = UserLevelMargin::findOrFail($id);
|
||||
$id = $model->user_level->id;
|
||||
$model->delete();
|
||||
\Session()->flash('alert-success', "Eintrag gelöscht");
|
||||
return redirect(route('admin_level_edit', [$id]));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ class WizardController extends Controller
|
|||
'identifier' => $identifier,
|
||||
'user_shop_id' => 1, //is first faker shop for buy intern
|
||||
'auth_user_id' => Auth::user()->id,
|
||||
'payment' => 4, //Berater Wizard
|
||||
'payment' => 4, //Vertriebspartner Wizard
|
||||
'subdomain' => url('/'),
|
||||
'country_id' => Yard::instance('shopping')->getShippingCountryId(),
|
||||
'shopping_data' => $data,
|
||||
|
|
|
|||
|
|
@ -58,16 +58,16 @@ class MailInfo extends Mailable
|
|||
}
|
||||
$content .= "E-Mail: ".$this->user->email;
|
||||
|
||||
$copy1line = "Infos zum Berater:"."\n";
|
||||
$button = "zum Berater";
|
||||
$title = "Ein Berater möchte seine Mitgliedschaft beenden.";
|
||||
$copy1line = "Infos zum Vertriebspartner:"."\n";
|
||||
$button = "zum Vertriebspartner";
|
||||
$title = "Ein Vertriebspartner möchte seine Mitgliedschaft beenden.";
|
||||
$url = route('admin_lead_edit', $this->user->id).'?show=check_lead';
|
||||
}
|
||||
|
||||
if($this->action === "check_is_like_customer") {
|
||||
$copy1line = "Hier geht es zum Kunden:"."\n";
|
||||
$button = "zum Kunden";
|
||||
$title = "Ein Kunden muss überprüft werden und einem Berater zugeordnet werden, da die Adresse nicht eindeutig ist.";
|
||||
$title = "Ein Kunden muss überprüft werden und einem Vertriebspartner zugeordnet werden, da die Adresse nicht eindeutig ist.";
|
||||
$url = route('admin_customer_detail', $this->user->id);
|
||||
$content .= $this->user ? 'Firma: '.$this->user->billing_company."\n" : '';
|
||||
$content .= \App\Services\HTMLHelper::getSalutationLang($this->user->billing_salutation)." ";
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class MailReleaseAccount extends Mailable
|
|||
public function __construct(User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->subject = 'Neuer Berater Registrierung prüfen';
|
||||
$this->subject = 'Neuer Vertriebspartner Registrierung prüfen';
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -42,19 +42,19 @@ class MailReleaseAccount extends Mailable
|
|||
$content .= "E-Mail: ".$this->user->email;
|
||||
|
||||
|
||||
$copy1line = "Ein neuer Berater hat sich registriert und wartet auf die Überprüfung und Freigabe seiner Daten:"."\n";
|
||||
$copy1line = "Ein neuer Vertriebspartner hat sich registriert und wartet auf die Überprüfung und Freigabe seiner Daten:"."\n";
|
||||
$copy1line .= "+ Überprüfung der Ausweisdate"."\n";
|
||||
$copy1line .= "+ Überprüfung des Gewerbenachweises"."\n";
|
||||
$copy1line .= "+ Eintrag Account ID"."\n";
|
||||
$copy1line .= "+ Überprüfung / Kenntnisnahme Sponsor"."\n";
|
||||
$copy1line .= "+ Überprüfung der Rechnungsdaten"."\n";
|
||||
$copy1line .= 'Nach erfolgreicher Überprüfung mit dem Button „Daten vollständig => Berater freischalten“ den Berater freischalten.'."\n";
|
||||
$copy1line .= 'Der Berater erhält eine Mail, dass sein Account freigeschaltet wurde. Der Vertrag wird automatisch mit den Daten des Vertriebspartners erstellt.'."\n";
|
||||
$copy1line .= 'Nach erfolgreicher Überprüfung mit dem Button „Daten vollständig => Vertriebspartner freischalten“ den Vertriebspartner freischalten.'."\n";
|
||||
$copy1line .= 'Der Vertriebspartner erhält eine Mail, dass sein Account freigeschaltet wurde. Der Vertrag wird automatisch mit den Daten des Vertriebspartners erstellt.'."\n";
|
||||
|
||||
return $this->view('emails.info')->with([
|
||||
'url' => route('admin_lead_edit', $this->user->id).'?show=check_lead',
|
||||
'title' => 'Berater Registrierung prüfen',
|
||||
'button' => 'zur Berater Prüfung',
|
||||
'title' => 'Vertriebspartner Registrierung prüfen',
|
||||
'button' => 'zur Vertriebspartner Prüfung',
|
||||
'copy1line' => $copy1line,
|
||||
'copy2line' => __('email.copy2line'),
|
||||
'content' => $content,
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\Util;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
|
@ -35,6 +36,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereShowAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\PaymentMethod whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @property string|null $max_price
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|PaymentMethod whereMaxPrice($value)
|
||||
*/
|
||||
class PaymentMethod extends Model
|
||||
{
|
||||
|
|
@ -52,6 +55,7 @@ class PaymentMethod extends Model
|
|||
'name',
|
||||
'short',
|
||||
'show_at',
|
||||
'max_price',
|
||||
'pos',
|
||||
'default',
|
||||
'active'
|
||||
|
|
@ -59,11 +63,11 @@ class PaymentMethod extends Model
|
|||
|
||||
public static $showATs = [
|
||||
0 => 'Nur Kunden Shop',
|
||||
1 => 'Nur Berater Shop',
|
||||
2 => 'Kunden + Berater Shop',
|
||||
3 => 'Nur Reg/Mitgliedschaft Berater',
|
||||
4 => 'Kunden + Berater Shop + Reg/Mitgliedschaft',
|
||||
5 => 'Berater Shop + Reg/Mitgliedschaft',
|
||||
1 => 'Nur Vertriebspartner Shop',
|
||||
2 => 'Kunden + Vertriebspartner Shop',
|
||||
3 => 'Nur Reg/Mitgliedschaft Vertriebspartner',
|
||||
4 => 'Kunden + Vertriebspartner Shop + Reg/Mitgliedschaft',
|
||||
5 => 'Vertriebspartner Shop + Reg/Mitgliedschaft',
|
||||
9 => 'überall',
|
||||
];
|
||||
|
||||
|
|
@ -74,4 +78,37 @@ class PaymentMethod extends Model
|
|||
public static function getDefaultAsArray($short=false){
|
||||
return PaymentMethod::where('active', true)->where('default', true)->pluck('id');
|
||||
}
|
||||
|
||||
public function setMaxPriceAttribute($value)
|
||||
{
|
||||
$this->attributes['max_price'] = $value ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function getFormattedMaxPrice()
|
||||
{
|
||||
return isset($this->attributes['max_price']) ? Util::formatNumber($this->attributes['max_price']) : "";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $short //PP FNC VOR CC SB ...
|
||||
* @param $user_payment_methods //PaymentMethod [] IDs
|
||||
* @param $total //Full price
|
||||
*/
|
||||
public static function isShowPaymentMethod($short, $user_payment_methods, $total = 0){
|
||||
|
||||
$payment_method = PaymentMethod::whereShort($short)->first();
|
||||
|
||||
if($payment_method && $payment_method->active){
|
||||
if(in_array($payment_method->id, $user_payment_methods)){
|
||||
if($payment_method->max_price > 0){
|
||||
if($payment_method->max_price >= $total){
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,13 +103,20 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @property-read int|null $country_prices_count
|
||||
* @property int|null $wp_number
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereWpNumber($value)
|
||||
* @property bool|null $shipping_addon
|
||||
* @property bool|null $single_commission
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Product whereShippingAddon($value)
|
||||
* @property-read int|null $ingredients_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProductIngredient[] $product_ingredients
|
||||
* @property-read int|null $product_ingredients_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Ingredient[] $p_ingredients
|
||||
* @property-read int|null $p_ingredients_count
|
||||
* @property bool $amount_commission
|
||||
* @property string|null $value_commission
|
||||
* @property string|null $partner_commission
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product whereAmountCommission($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product wherePartnerCommission($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product whereSingleCommission($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Product whereValueCommission($value)
|
||||
*/
|
||||
class Product extends Model
|
||||
{
|
||||
|
|
@ -132,7 +139,8 @@ class Product extends Model
|
|||
'trans_ingredients' => 'array',
|
||||
'action' => 'array',
|
||||
'wp_number' => 'int',
|
||||
'shipping_addon' => 'bool',
|
||||
'single_commission' => 'bool',
|
||||
'amount_commission' => 'bool',
|
||||
'active' => 'bool'
|
||||
];
|
||||
use Sluggable;
|
||||
|
|
@ -164,7 +172,10 @@ class Product extends Model
|
|||
'amount',
|
||||
'active',
|
||||
'show_at',
|
||||
'shipping_addon',
|
||||
'single_commission',
|
||||
'amount_commission',
|
||||
'value_commission',
|
||||
'partner_commission',
|
||||
'identifier',
|
||||
'action',
|
||||
'upgrade_to_id'
|
||||
|
|
@ -175,8 +186,8 @@ class Product extends Model
|
|||
'show_upgrade' => 'Kann geupdatet werden',
|
||||
'show_order' => 'Wird immer als Option angezeigt',
|
||||
'upgrade' => 'Produktupgrade zur Produkt ID',
|
||||
'upgrade_member' => 'Beraterupgrade zur Karriere ID',
|
||||
//'proportional_voucher' => 'Anteiliger Gutschein Berater',
|
||||
'upgrade_member' => 'Vertriebspartnerupgrade zur Karriere ID',
|
||||
//'proportional_voucher' => 'Anteiliger Gutschein Vertriebspartner',
|
||||
|
||||
|
||||
];
|
||||
|
|
@ -190,12 +201,12 @@ class Product extends Model
|
|||
|
||||
public $showATs = [
|
||||
0 => 'Nur Kunden Bestellungen',
|
||||
1 => 'Kunden + Berater Bestellungen',
|
||||
2 => 'Nur Berater Bestellungen',
|
||||
3 => 'Registrierung / Mitgliedschaft Berater',
|
||||
4 => 'Nur Mitgliedschaft Berater',
|
||||
//5 => 'Onboarding Berater',
|
||||
//6 => 'Onboarding Berater + Berater Shop',
|
||||
1 => 'Kunden + Vertriebspartner Bestellungen',
|
||||
2 => 'Nur Vertriebspartner Bestellungen',
|
||||
3 => 'Registrierung / Mitgliedschaft Vertriebspartner',
|
||||
4 => 'Nur Mitgliedschaft Vertriebspartner',
|
||||
//5 => 'Onboarding Vertriebspartner',
|
||||
//6 => 'Onboarding Vertriebspartner + Vertriebspartner Shop',
|
||||
7 => 'zur internen Berechnung',
|
||||
|
||||
];
|
||||
|
|
@ -279,6 +290,14 @@ class Product extends Model
|
|||
$this->attributes['price_old'] = $value ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function setValueCommissionAttribute( $value ) {
|
||||
$this->attributes['value_commission'] = $value ? Util::reFormatNumber($value) : 0;
|
||||
}
|
||||
|
||||
public function setPartnerCommissionAttribute( $value ) {
|
||||
$this->attributes['partner_commission'] = $value ? Util::reFormatNumber($value) : 0;
|
||||
}
|
||||
|
||||
public function getFormattedPrice()
|
||||
{
|
||||
return isset($this->attributes['price']) ? Util::formatNumber($this->attributes['price']) : "";
|
||||
|
|
@ -298,6 +317,16 @@ class Product extends Model
|
|||
{
|
||||
return isset($this->attributes['price_old']) ? Util::formatNumber($this->attributes['price_old']) : "";
|
||||
}
|
||||
public function getFormattedValueCommission()
|
||||
{
|
||||
return isset($this->attributes['value_commission']) ? Util::formatNumber($this->attributes['value_commission']) : 0;
|
||||
}
|
||||
|
||||
public function getFormattedPartnerCommission()
|
||||
{
|
||||
return isset($this->attributes['partner_commission']) ? Util::formatNumber($this->attributes['partner_commission']) : 0;
|
||||
}
|
||||
|
||||
|
||||
/*price by user Factor*/
|
||||
private function calcPriceUserFactor($price){
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
/**
|
||||
* Class Setting
|
||||
*
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $identifier
|
||||
* @property string $slug
|
||||
|
|
@ -23,8 +23,27 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property int $status
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
* @package App\Models
|
||||
* @property string|null $full_text
|
||||
* @property string|null $text
|
||||
* @property string|null $type
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting findSimilarSlugs(string $attribute, array $config, string $slug)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereAction($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereFullText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereIdentifier($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereObject($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereReferenz($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Setting extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @method static \Illuminate\Database\Query\Builder|\App\Models\ShoppingOrder withoutTrashed()
|
||||
* @property-read \App\Models\ShippingCountry $shipping_country
|
||||
* @property float|null $shipping_net
|
||||
* @property float|null $subtotal_ws
|
||||
* @property float|null $subtotal_shipping
|
||||
* @property int|null $points
|
||||
* @property int|null $shipped
|
||||
* @property string|null $tracking
|
||||
|
|
@ -82,6 +82,15 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ShoppingOrder whereWpInvoicePath($value)
|
||||
* @property array|null $wp_notice
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereWpNotice($value)
|
||||
* @property string|null $subtotal_full
|
||||
* @property-read \App\Models\ShoppingOrderMargin|null $shopping_order_margin
|
||||
* @property-read \App\Models\ShoppingPayment|null $shopping_payment_last
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereSubtotalFull($value)
|
||||
* @property string|null $discount
|
||||
* @property string|null $payment_credit
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereDiscount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder wherePaymentCredit($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrder whereSubtotalShipping($value)
|
||||
*/
|
||||
class ShoppingOrder extends Model
|
||||
{
|
||||
|
|
@ -97,11 +106,15 @@ class ShoppingOrder extends Model
|
|||
'country_id',
|
||||
'user_shop_id',
|
||||
'total',
|
||||
'subtotal_full',
|
||||
'discount',
|
||||
'subtotal',
|
||||
'shipping',
|
||||
'shipping_net',
|
||||
'subtotal_ws',
|
||||
'subtotal_shipping',
|
||||
'tax',
|
||||
'total_without_credit',
|
||||
'payment_credit',
|
||||
'total_shipping',
|
||||
'points',
|
||||
'weight',
|
||||
|
|
@ -176,6 +189,10 @@ class ShoppingOrder extends Model
|
|||
return $this->hasOne('App\Models\UserHistory','shopping_order_id')->latest();
|
||||
}
|
||||
|
||||
public function shopping_order_margin()
|
||||
{
|
||||
return $this->hasOne('App\Models\ShoppingOrderMargin','shopping_order_id')->latest();
|
||||
}
|
||||
|
||||
public function shopping_order_items(){
|
||||
return $this->hasMany('App\Models\ShoppingOrderItem', 'shopping_order_id');
|
||||
|
|
@ -228,11 +245,21 @@ class ShoppingOrder extends Model
|
|||
return formatNumber($this->attributes['total']);
|
||||
}
|
||||
|
||||
public function getFormattedSubtotalFull()
|
||||
{
|
||||
return formatNumber($this->attributes['subtotal_full']);
|
||||
}
|
||||
|
||||
public function getFormattedSubtotal()
|
||||
{
|
||||
return formatNumber($this->attributes['subtotal']);
|
||||
}
|
||||
|
||||
public function getFormattedDiscount()
|
||||
{
|
||||
return formatNumber($this->attributes['discount']);
|
||||
}
|
||||
|
||||
public function getFormattedShipping()
|
||||
{
|
||||
return formatNumber($this->attributes['shipping']);
|
||||
|
|
@ -243,15 +270,24 @@ class ShoppingOrder extends Model
|
|||
return formatNumber($this->attributes['shipping_net']);
|
||||
}
|
||||
|
||||
public function getFormattedSubtotalWs()
|
||||
public function getFormattedSubtotalShipping()
|
||||
{
|
||||
return formatNumber($this->attributes['subtotal_ws']);
|
||||
return formatNumber($this->attributes['subtotal_shipping']);
|
||||
}
|
||||
|
||||
public function getFormattedTax()
|
||||
{
|
||||
return formatNumber($this->attributes['tax']);
|
||||
}
|
||||
public function getFormattedTotalWithoutCredit()
|
||||
{
|
||||
return formatNumber($this->attributes['total_without_credit']);
|
||||
}
|
||||
public function getFormattedPaymentCredit()
|
||||
{
|
||||
return formatNumber($this->attributes['payment_credit']);
|
||||
}
|
||||
|
||||
|
||||
public function getFormattedTotalShipping()
|
||||
{
|
||||
|
|
|
|||
108
app/Models/ShoppingOrderMargin.php
Normal file
108
app/Models/ShoppingOrderMargin.php
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class ShoppingOrderMargin
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $shopping_order_id
|
||||
* @property int $user_id
|
||||
* @property float|null $net_price
|
||||
* @property float|null $net_discount
|
||||
* @property float|null $net_amount
|
||||
* @property int|null $m_sponsor_id
|
||||
* @property float|null $net_partner_commission
|
||||
* @property Carbon|null $from
|
||||
* @property bool $paid
|
||||
* @property bool $cancellation
|
||||
* @property int $status
|
||||
* @property string|null $content
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property User $user
|
||||
* @property ShoppingOrder $shopping_order
|
||||
* @package App\Models
|
||||
* @property float|null $from_payment_credit
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereCancellation($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereFrom($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereFromPaymentCredit($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereMSponsorId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereNetAmount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereNetDiscount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereNetPartnerCommission($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereNetPrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin wherePaid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereShoppingOrderId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ShoppingOrderMargin whereUserId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ShoppingOrderMargin extends Model
|
||||
{
|
||||
protected $table = 'shopping_order_margins';
|
||||
|
||||
protected $casts = [
|
||||
'shopping_order_id' => 'int',
|
||||
'user_id' => 'int',
|
||||
'net_price' => 'float',
|
||||
'net_discount' => 'float',
|
||||
'net_amount' => 'float',
|
||||
'from_payment_credit' => 'float',
|
||||
'm_sponsor_id' => 'int',
|
||||
'net_partner_commission' => 'float',
|
||||
'paid' => 'bool',
|
||||
'cancellation' => 'bool',
|
||||
'status' => 'int'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
'from'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'shopping_order_id',
|
||||
'user_id',
|
||||
'net_price',
|
||||
'net_discount',
|
||||
'net_amount',
|
||||
'from_payment_credit',
|
||||
'm_sponsor_id',
|
||||
'net_partner_commission',
|
||||
'from',
|
||||
'paid',
|
||||
'cancellation',
|
||||
'status',
|
||||
'content'
|
||||
];
|
||||
|
||||
public function user()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'user_id');
|
||||
}
|
||||
|
||||
public function shopping_order()
|
||||
{
|
||||
return $this->belongsTo(ShoppingOrder::class, 'shopping_order_id');
|
||||
}
|
||||
|
||||
public function m_sponsor_id()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'm_sponsor_id');
|
||||
}
|
||||
}
|
||||
|
|
@ -31,15 +31,21 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property array|null $trans_content
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevel whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevel whereTransContent($value)
|
||||
* @property bool $partner_provision
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\UserLevelMargin[] $user_level_margins
|
||||
* @property-read int|null $user_level_margins_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\UserLevelMargin[] $user_level_margins_re
|
||||
* @property-read int|null $user_level_margins_re_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevel wherePartnerProvision($value)
|
||||
*/
|
||||
class UserLevel extends Model
|
||||
{
|
||||
protected $table = 'user_levels';
|
||||
|
||||
protected $casts = ['trans_name' => 'array', 'trans_content' => 'array'];
|
||||
protected $casts = ['trans_name' => 'array', 'trans_content' => 'array', 'partner_provision'=>'bool'];
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'content', 'pos', 'active',
|
||||
'name', 'content', 'pos', 'active', 'partner_provision',
|
||||
];
|
||||
|
||||
|
||||
|
|
@ -49,6 +55,17 @@ class UserLevel extends Model
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
public function user_level_margins()
|
||||
{
|
||||
return $this->hasMany('App\Models\UserLevelMargin', 'user_level_id', 'id');
|
||||
}
|
||||
|
||||
public function user_level_margins_re()
|
||||
{
|
||||
return $this->hasMany('App\Models\UserLevelMargin', 'user_level_id', 'id')->orderBy('price_from', 'DESC');
|
||||
}
|
||||
|
||||
public function setPosAttribute($value){
|
||||
$this->attributes['pos'] = is_numeric($value) ? $value : null;
|
||||
|
||||
|
|
|
|||
90
app/Models/UserLevelMargin.php
Normal file
90
app/Models/UserLevelMargin.php
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\Util;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class UserLevelMargin
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_level_id
|
||||
* @property float|null $price_from
|
||||
* @property float|null $trading_margin
|
||||
* @property float|null $commission
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property UserLevel $user_level
|
||||
* @package App\Models
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin whereCommission($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin wherePriceFrom($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin whereTradingMargin($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserLevelMargin whereUserLevelId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class UserLevelMargin extends Model
|
||||
{
|
||||
protected $table = 'user_level_margins';
|
||||
|
||||
protected $casts = [
|
||||
'user_level_id' => 'int',
|
||||
'price_from' => 'float',
|
||||
'trading_margin' => 'float',
|
||||
'commission' => 'float'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'user_level_id',
|
||||
'price_from',
|
||||
'trading_margin',
|
||||
'commission'
|
||||
];
|
||||
|
||||
public function user_level()
|
||||
{
|
||||
return $this->belongsTo(UserLevel::class);
|
||||
}
|
||||
|
||||
|
||||
public function setPriceFromAttribute($value)
|
||||
{
|
||||
$this->attributes['price_from'] = $value ? Util::reFormatNumber($value) : 0;
|
||||
}
|
||||
|
||||
public function getFormattedPriceFrom()
|
||||
{
|
||||
return isset($this->attributes['price_from']) ? Util::formatNumber($this->attributes['price_from']) : "";
|
||||
}
|
||||
|
||||
public function setTradingMarginAttribute($value)
|
||||
{
|
||||
$this->attributes['trading_margin'] = $value ? Util::reFormatNumber($value) : 0;
|
||||
}
|
||||
|
||||
public function getFormattedTradingMargin()
|
||||
{
|
||||
return isset($this->attributes['trading_margin']) ? Util::formatNumber($this->attributes['trading_margin']) : "";
|
||||
}
|
||||
|
||||
public function setCommissionAttribute($value)
|
||||
{
|
||||
$this->attributes['commission'] = $value ? Util::reFormatNumber($value) : 0;
|
||||
}
|
||||
|
||||
public function getFormattedCommission()
|
||||
{
|
||||
return isset($this->attributes['commission']) ? Util::formatNumber($this->attributes['commission']) : "";
|
||||
}
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ class ContractPDFRepository extends BaseRepository {
|
|||
if(!Storage::disk($this->disk)->exists( $this->dir )){
|
||||
Storage::disk($this->disk)->makeDirectory($this->dir); //creates directory
|
||||
}
|
||||
$filename = "Beratervertrag.pdf";
|
||||
$filename = "Vertriebspartnervertrag.pdf";
|
||||
Storage::disk($this->disk)->put($this->dir.$filename, $pdf->Output('S'));
|
||||
$size = Storage::disk($this->disk)->size($this->dir.$filename);
|
||||
$mine = Storage::disk($this->disk)->getMimeType($this->dir.$filename);
|
||||
|
|
|
|||
|
|
@ -27,9 +27,8 @@ class ProductRepository extends BaseRepository {
|
|||
{
|
||||
|
||||
$data['active'] = isset($data['active']) ? 1 : 0;
|
||||
$data['shipping_addon'] = isset($data['shipping_addon']) ? 1 : 0;
|
||||
|
||||
|
||||
$data['single_commission'] = isset($data['single_commission']) ? 1 : 0;
|
||||
$data['amount_commission'] = isset($data['amount_commission']) ? 1 : 0;
|
||||
if($data['id'] === "new"){
|
||||
$this->model = Product::create($data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,6 +65,29 @@ class HTMLHelper
|
|||
|
||||
}
|
||||
|
||||
public static function setContentReadMore($content){
|
||||
|
||||
$sep = '##mehr lesen##';
|
||||
if(strpos($content, $sep) !== false){
|
||||
$name = 'collapse_'.random_int(1000, 10000);
|
||||
$split = explode($sep, $content);
|
||||
$first = isset($split[0]) ? $split[0] : "";
|
||||
$text = isset($split[1]) ? $split[1] : "";
|
||||
|
||||
$content = $first;
|
||||
$content .= '<br><a class="btn btn-primary btn-sm mt-2 collapsed" data-toggle="collapse" href="#'.$name.'" role="button" aria-expanded="false" aria-controls="'.$name.'">
|
||||
<span class="if-collapsed">'.__('mehr lesen').'</span>
|
||||
<span class="if-not-collapsed">'.__('weniger lesen').'</span>
|
||||
</a>';
|
||||
$content .= '<div class="collapse" id="'.$name.'">
|
||||
<div class="card card-body pt-0">
|
||||
'.$text.'
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
public static function getRolesOptions(){
|
||||
$ret = "";
|
||||
foreach (self::$roles as $role_id => $value){
|
||||
|
|
|
|||
|
|
@ -141,6 +141,21 @@ class Payment
|
|||
|
||||
}
|
||||
}
|
||||
//if the order has action
|
||||
if($shopping_order->shopping_user->is_from === 'user_order'){
|
||||
//is margin -> set paid
|
||||
$shopping_order->shopping_order_margin->paid = true;
|
||||
$shopping_order->shopping_order_margin->save();
|
||||
//is payment credit, reduce
|
||||
if($shopping_order->shopping_order_margin->from_payment_credit > 0){
|
||||
$new_credit = $shopping_order->auth_user->payment_credit - $shopping_order->shopping_order_margin->from_payment_credit;
|
||||
$new_credit = $new_credit < 0 ? 0 : $new_credit;
|
||||
$shopping_order->auth_user->payment_credit = $new_credit;
|
||||
$shopping_order->auth_user->save();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return $send_link;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@ class Slim {
|
|||
if (empty($value)) {return null;}
|
||||
|
||||
// If magic quotes enabled
|
||||
if (get_magic_quotes_gpc()) {
|
||||
/* if (get_magic_quotes_gpc()) {
|
||||
$value = stripslashes($value);
|
||||
}
|
||||
|
||||
*/
|
||||
// The data is posted as a JSON String so to be used it needs to be deserialized first
|
||||
$data = json_decode($value);
|
||||
|
||||
|
|
|
|||
87
app/Services/UserMarign.php
Normal file
87
app/Services/UserMarign.php
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
|
||||
use App\Models\ShoppingOrderMargin;
|
||||
use App\User;
|
||||
use Carbon;
|
||||
|
||||
class UserMarign
|
||||
{
|
||||
|
||||
|
||||
|
||||
public static function getMontlyPrice(User $user, $date = null, $format = false){
|
||||
|
||||
$now = $date ? Carbon::parse($date) : Carbon::now();
|
||||
$startDay = $now->startOfMonth()->toDateString();
|
||||
$endDay = $now->endOfMonth()->toDateString();
|
||||
|
||||
$sum_net_amount = ShoppingOrderMargin::whereUserId($user->id)
|
||||
->whereBetween('from', [$startDay, $endDay])
|
||||
->wherePaid(true)
|
||||
->whereCancellation(false)
|
||||
->sum('net_price');
|
||||
if($format){
|
||||
$sum_net_amount = Util::formatNumber($sum_net_amount);
|
||||
}
|
||||
return $sum_net_amount;
|
||||
}
|
||||
|
||||
public static function getMontlyPriceOpen(User $user, $date = null, $format = false){
|
||||
|
||||
$now = $date ? Carbon::parse($date) : Carbon::now();
|
||||
$startDay = $now->startOfMonth()->toDateString();
|
||||
$endDay = $now->endOfMonth()->toDateString();
|
||||
|
||||
$sum_net_amount = ShoppingOrderMargin::whereUserId($user->id)
|
||||
->whereBetween('from', [$startDay, $endDay])
|
||||
->wherePaid(false)
|
||||
->whereCancellation(false)
|
||||
->sum('net_price');
|
||||
if($format){
|
||||
$sum_net_amount = Util::formatNumber($sum_net_amount);
|
||||
}
|
||||
return $sum_net_amount;
|
||||
}
|
||||
|
||||
public static function getMontlyAmount(User $user, $date = null, $format = false){
|
||||
|
||||
$now = $date ? Carbon::parse($date) : Carbon::now();
|
||||
$startDay = $now->startOfMonth()->toDateString();
|
||||
$endDay = $now->endOfMonth()->toDateString();
|
||||
|
||||
$sum_net_amount = ShoppingOrderMargin::whereUserId($user->id)
|
||||
->whereBetween('from', [$startDay, $endDay])
|
||||
->wherePaid(true)
|
||||
->whereCancellation(false)
|
||||
->sum('net_amount');
|
||||
if($format){
|
||||
$sum_net_amount = Util::formatNumber($sum_net_amount);
|
||||
}
|
||||
|
||||
return $sum_net_amount;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function getMontlyPartnerCommission(User $user, $date = null, $format = false){
|
||||
|
||||
$now = $date ? Carbon::parse($date) : Carbon::now();
|
||||
$startDay = $now->startOfMonth()->toDateString();
|
||||
$endDay = $now->endOfMonth()->toDateString();
|
||||
|
||||
$sum_net_amount = ShoppingOrderMargin::whereMSponsorId($user->id)
|
||||
->whereBetween('from', [$startDay, $endDay])
|
||||
->wherePaid(true)
|
||||
->whereCancellation(false)
|
||||
->sum('net_partner_commission');
|
||||
if($format){
|
||||
$sum_net_amount = Util::formatNumber($sum_net_amount);
|
||||
}
|
||||
|
||||
return $sum_net_amount;
|
||||
}
|
||||
//monthy amount, sum
|
||||
|
||||
}
|
||||
|
|
@ -3,6 +3,9 @@ namespace App\Services;
|
|||
|
||||
use App\Models\Product;
|
||||
use App\Models\ShippingCountry;
|
||||
use App\Services\Yard\Commission;
|
||||
use App\Services\Yard\Margin;
|
||||
use App\Services\Yard\MarginItems;
|
||||
use Gloudemans\Shoppingcart\Cart;
|
||||
use Gloudemans\Shoppingcart\CartItem;
|
||||
use Gloudemans\Shoppingcart\Contracts\Buyable;
|
||||
|
|
@ -23,6 +26,13 @@ class Yard extends Cart
|
|||
private $ysession;
|
||||
private $yinstance;
|
||||
private $shopping_data = [];
|
||||
private $user;
|
||||
private $payment_credit;
|
||||
|
||||
private $yard_commission;
|
||||
private $yard_margin;
|
||||
|
||||
private $global_tax_rate = 19;
|
||||
|
||||
public function __construct(SessionManager $session, Dispatcher $events)
|
||||
{
|
||||
|
|
@ -52,6 +62,25 @@ class Yard extends Cart
|
|||
$this->shipping_is_for = $this->getYardExtra('shipping_is_for');
|
||||
}
|
||||
|
||||
if($this->getYardExtra('shopping_user')){
|
||||
$this->user = $this->getYardExtra('shopping_user');
|
||||
}
|
||||
|
||||
if($this->getYardExtra('user')){
|
||||
$this->user = $this->getYardExtra('user');
|
||||
}
|
||||
if($this->getYardExtra('payment_credit')){
|
||||
$this->payment_credit = $this->getYardExtra('payment_credit');
|
||||
}
|
||||
|
||||
if($this->getYardExtra('yard_commission')){
|
||||
$this->yard_commission = $this->getYardExtra('yard_commission');
|
||||
}
|
||||
|
||||
if($this->getYardExtra('yard_margin')){
|
||||
$this->yard_margin = $this->getYardExtra('yard_margin');
|
||||
}
|
||||
|
||||
/*if($this->getYardExtra('num_comp')){
|
||||
$this->num_comp = $this->getYardExtra('num_comp');
|
||||
}*/
|
||||
|
|
@ -123,10 +152,111 @@ class Yard extends Cart
|
|||
}
|
||||
|
||||
|
||||
public function reCalculateShippingPrice(){
|
||||
public function reCalculate(){
|
||||
$this->calculateShippingPrice();
|
||||
}
|
||||
/* * ***** */
|
||||
|
||||
public function calculateMargins(){
|
||||
//get user monthy amount
|
||||
$monthy_amount = UserMarign::getMontlyAmount($this->user);
|
||||
|
||||
$content = $this->getContent();
|
||||
|
||||
/*single + partner Commissions */
|
||||
//get price net commission, add amount, partner (total) from products is single_commission
|
||||
$yard_commission = new Commission();
|
||||
$yard_commission = $content->reduce(function ($yard_commission, CartItem $cartItem) {
|
||||
$price_net = $cartItem->price / ((100 + $cartItem->taxRate) / 100);
|
||||
if($cartItem->options->single_commission){
|
||||
$value_commission = $price_net / 100 * $cartItem->options->value_commission;
|
||||
$partner_commission = $price_net / 100 * $cartItem->options->partner_commission;
|
||||
|
||||
$price_net_commission = ($cartItem->qty * $price_net) - ($cartItem->qty * $value_commission);
|
||||
$yard_commission->single_price_net += ($cartItem->qty * $price_net);
|
||||
$yard_commission->single_value_commission += ($cartItem->qty * $value_commission);
|
||||
if($this->user->user_level->partner_provision){
|
||||
$yard_commission->single_partner_commission += ($cartItem->qty * $partner_commission);
|
||||
}
|
||||
$yard_commission->single_price_net_commission += $price_net_commission;
|
||||
//
|
||||
if($cartItem->options->amount_commission){
|
||||
$yard_commission->single_amount_commission += $price_net_commission;
|
||||
}
|
||||
}else{
|
||||
$yard_commission->price_net = $yard_commission->price_net + ($cartItem->qty * $price_net);
|
||||
}
|
||||
return $yard_commission;
|
||||
}, $yard_commission);
|
||||
|
||||
$this->yard_commission = $yard_commission;
|
||||
$this->putYardExtra('yard_commission', $this->yard_commission);
|
||||
|
||||
//dump($monthy_amount);
|
||||
//add to $monthy_amount für max level margins
|
||||
$start_monthy_amount = $monthy_amount + $yard_commission->single_amount_commission;
|
||||
$end_monthy_amount = $start_monthy_amount + $yard_commission->price_net;
|
||||
|
||||
//dump($start_monthy_amount);
|
||||
//dump($end_monthy_amount);
|
||||
|
||||
$margin = new Margin();
|
||||
$rest_amount = 0;
|
||||
$range = 0;
|
||||
$price_net = $yard_commission->price_net;
|
||||
if($yard_commission->price_net > 0 && $this->user && $this->user->user_level && $this->user->user_level->user_level_margins){
|
||||
foreach ($this->user->user_level->user_level_margins_re as $user_level_margin) {
|
||||
//total split?
|
||||
if ($end_monthy_amount >= $user_level_margin->price_from) {
|
||||
if(!isset($balance)){
|
||||
if($start_monthy_amount >= $user_level_margin->price_from){
|
||||
$balance = $yard_commission->price_net;
|
||||
$rest_amount = 0;
|
||||
}else{
|
||||
$balance = $end_monthy_amount - $user_level_margin->price_from;
|
||||
$rest_amount = $end_monthy_amount - ($start_monthy_amount + $balance);
|
||||
}
|
||||
}else{
|
||||
$range = $last_limit-$user_level_margin->price_from;
|
||||
if($rest_amount >= $range){
|
||||
$balance = $range;
|
||||
}else{
|
||||
$balance = $rest_amount;
|
||||
}
|
||||
$rest_amount = $rest_amount-$balance;
|
||||
}
|
||||
$last_limit = $user_level_margin->price_from;
|
||||
if($balance != 0){
|
||||
$margin->add($user_level_margin->price_from, [
|
||||
'price_net' => $price_net,
|
||||
'range' => $range,
|
||||
'rest_amount' => $rest_amount,
|
||||
'balance' => $balance,
|
||||
'trading_margin'=> $user_level_margin->trading_margin,
|
||||
'commission'=> $user_level_margin->commission,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$margin->setCommission($this->yard_commission);
|
||||
$margin->calculate();
|
||||
|
||||
$this->yard_margin = $margin;
|
||||
$this->putYardExtra('yard_margin', $this->yard_margin);
|
||||
|
||||
//dump($margin);
|
||||
}
|
||||
|
||||
public function getYardMargin(){
|
||||
return $this->yard_margin;
|
||||
}
|
||||
public function getYardCommission(){
|
||||
return $this->yard_commission;
|
||||
}
|
||||
/* * ***** */
|
||||
public function setShippingCountryWithPrice($shipping_country_id, $shipping_is_for = 'ot')
|
||||
{
|
||||
$this->shipping_country_id = $shipping_country_id;
|
||||
|
|
@ -139,6 +269,21 @@ class Yard extends Cart
|
|||
|
||||
}
|
||||
|
||||
public function setShoppingUser($user, $payment_credit = false){
|
||||
$this->user = $user;
|
||||
$this->payment_credit = $payment_credit;
|
||||
$this->putYardExtra('user', $user);
|
||||
$this->putYardExtra('payment_credit', $payment_credit);
|
||||
|
||||
}
|
||||
|
||||
public function getPaymentCredit(){
|
||||
if($this->payment_credit && $this->user->payment_credit > 0){
|
||||
return $this->user->payment_credit;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private function calculateShippingPrice(){
|
||||
|
||||
$shippingCountry = ShippingCountry::find($this->shipping_country_id);
|
||||
|
|
@ -151,10 +296,8 @@ class Yard extends Cart
|
|||
$shipping_price->price = 0;
|
||||
$shipping_price->price_comp = 0;
|
||||
}else{
|
||||
|
||||
|
||||
//first by price
|
||||
$shipping_price = $this->shippingPriceByTotal($shipping->shipping_prices, $this->total(2, '.', ''));
|
||||
$shipping_price = $this->shippingPriceBySubTotal($shipping->shipping_prices, $this->subtotal(2, '.', ''));
|
||||
//sec by weight
|
||||
if(!$shipping_price){
|
||||
$shipping_price = $this->shippingPriceByWeight($shipping->shipping_prices, $this->weight());
|
||||
|
|
@ -186,7 +329,7 @@ class Yard extends Cart
|
|||
}
|
||||
}
|
||||
|
||||
private function shippingPriceByTotal($prices, $total){
|
||||
private function shippingPriceBySubTotal($prices, $total){
|
||||
foreach ($prices as $price){
|
||||
if($price->total_from > 0 && $price->total_to > 0){
|
||||
if($total >= $price->total_from && $total <= $price->total_to){
|
||||
|
|
@ -243,19 +386,56 @@ class Yard extends Cart
|
|||
|
||||
public function taxWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
$total = $this->totalWithShipping(2, '.', '');
|
||||
|
||||
// $total = $this->totalWithShipping(2, '.', '');
|
||||
// $totalTax = (float) $this->tax(2, '.', '') + $this->shipping_tax;
|
||||
$totalTax = $this->subtotalWithShipping(2, '.', '');
|
||||
return $this->numberFormat(($total - $totalTax), $decimals, $decimalPoint, $thousandSeperator);
|
||||
$subtotal_shipping = $this->subtotalWithShipping(2, '.', '');
|
||||
return $this->numberFormat(($subtotal_shipping / 100 * $this->global_tax_rate), $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
|
||||
public function totalWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
$total = (float) ($this->total(2, '.', '')) + $this->shipping_price;
|
||||
//$total = (float) ($this->total(2, '.', '')) + $this->shipping_price;
|
||||
$subtotal_shipping = $this->subtotalWithShipping(2, '.', '');
|
||||
$tax = $subtotal_shipping / 100 * $this->global_tax_rate;
|
||||
$total = ($subtotal_shipping + $tax);
|
||||
if($PaymentCredit = $this->getPaymentCredit()){
|
||||
$total = $total - $PaymentCredit;
|
||||
if($total < 0){
|
||||
$total = 0;
|
||||
}
|
||||
}
|
||||
return $this->numberFormat($total, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
|
||||
public function totalWithShippingWithoutCredit($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
//$total = (float) ($this->total(2, '.', '')) + $this->shipping_price;
|
||||
$subtotal_shipping = $this->subtotalWithShipping(2, '.', '');
|
||||
$tax = $subtotal_shipping / 100 * $this->global_tax_rate;
|
||||
$total = ($subtotal_shipping + $tax);
|
||||
return $this->numberFormat($total, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
public function totalfromCredit($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
$rest = 0;
|
||||
if ($PaymentCredit = $this->getPaymentCredit()) {
|
||||
$subtotal_shipping= $this->subtotalWithShipping(2, '.', '');
|
||||
$tax = $subtotal_shipping/ 100 * $this->global_tax_rate;
|
||||
$total = ($subtotal_shipping+ $tax);
|
||||
$rest = $PaymentCredit - $total;
|
||||
if($rest < 0){
|
||||
$rest = $PaymentCredit;
|
||||
}else{
|
||||
$rest = $PaymentCredit - $rest;
|
||||
}
|
||||
}
|
||||
return $this->numberFormat($rest, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the total price of the items in the cart.
|
||||
*
|
||||
|
|
@ -270,7 +450,6 @@ class Yard extends Cart
|
|||
$total = $content->reduce(function ($total, CartItem $cartItem) {
|
||||
return $total + ($cartItem->options->weight ? ($cartItem->options->weight*$cartItem->qty) : 0);
|
||||
}, 0);
|
||||
|
||||
return $total;
|
||||
}
|
||||
|
||||
|
|
@ -280,7 +459,6 @@ class Yard extends Cart
|
|||
$total = $content->reduce(function ($total, CartItem $cartItem) {
|
||||
return $total + ($cartItem->options->points ? ($cartItem->options->points * $cartItem->qty) : 0);
|
||||
}, 0);
|
||||
|
||||
return $total;
|
||||
}
|
||||
|
||||
|
|
@ -312,10 +490,8 @@ class Yard extends Cart
|
|||
|
||||
if ($withFees === true) {
|
||||
$fees = $this->feeTotal(null, null, null, true);
|
||||
|
||||
$total = $total + $fees;
|
||||
}
|
||||
|
||||
return $this->numberFormat($total, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
|
|
@ -340,7 +516,6 @@ class Yard extends Cart
|
|||
|
||||
if ($withFees === true) {
|
||||
$fees = $this->feeTax();
|
||||
|
||||
$tax = $tax + floatval($fees);
|
||||
}
|
||||
|
||||
|
|
@ -356,7 +531,7 @@ class Yard extends Cart
|
|||
* @param string $thousandSeperator
|
||||
* @return float
|
||||
*/
|
||||
public function subtotal($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
public function subtotal($decimals = null, $decimalPoint = null, $thousandSeperator = null, $discount = true)
|
||||
{
|
||||
$content = $this->getContent();
|
||||
|
||||
|
|
@ -365,6 +540,9 @@ class Yard extends Cart
|
|||
return $subTotal + ($cartItem->qty * $price_net);
|
||||
}, 0);
|
||||
|
||||
if($discount && $this->yard_margin){
|
||||
$subTotal -= $this->yard_margin->net_discount;
|
||||
}
|
||||
return $this->numberFormat($subTotal, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
|
|
@ -379,7 +557,17 @@ class Yard extends Cart
|
|||
if($set_price === 'with'){
|
||||
$price = $product->getPriceWith(false, true);
|
||||
}
|
||||
$cartItem = $this->getCartItem($product->id, $product->getLang('name'), 1, $price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points]);
|
||||
$cartItem = $this->getCartItem($product->id, $product->getLang('name'), 1, $price,
|
||||
[
|
||||
'image' => $image,
|
||||
'slug' => $product->slug,
|
||||
'weight' => $product->weight,
|
||||
'single_commission' => $product->single_commission,
|
||||
'amount_commission' => $product->amount_commission,
|
||||
'value_commission' => $product->value_commission,
|
||||
'partner_commission' => $product->partner_commission,
|
||||
]
|
||||
);
|
||||
$content = $this->getContent();
|
||||
|
||||
if ($content->has($cartItem->rowId)){
|
||||
|
|
|
|||
34
app/Services/Yard/Commission.php
Normal file
34
app/Services/Yard/Commission.php
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
namespace App\Services\Yard;
|
||||
|
||||
|
||||
use App\Services\Util;
|
||||
|
||||
class Commission
|
||||
{
|
||||
public $price_net;
|
||||
public $single_price_net;
|
||||
public $single_value_commission;
|
||||
public $single_partner_commission;
|
||||
public $single_amount_commission;
|
||||
public $single_price_net_commission;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->price_net = 0;
|
||||
$this->single_price_net = 0;
|
||||
$this->single_amount_commission = 0;
|
||||
$this->single_partner_commission = 0;
|
||||
$this->single_value_commission = 0;
|
||||
$this->single_price_net_commission = 0;
|
||||
}
|
||||
|
||||
public function isCommission(){
|
||||
return ($this->single_value_commission > 0) ? true : false;
|
||||
}
|
||||
|
||||
public function getFormatted($key)
|
||||
{
|
||||
return isset($this->{$key}) ? Util::formatNumber($this->{$key}) : "";
|
||||
}
|
||||
}
|
||||
104
app/Services/Yard/Margin.php
Normal file
104
app/Services/Yard/Margin.php
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<?php
|
||||
namespace App\Services\Yard;
|
||||
|
||||
use App\Services\Util;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
class Margin
|
||||
{
|
||||
public $items;
|
||||
public $commission;
|
||||
public $net_discount;
|
||||
public $net_partner_commission;
|
||||
public $net_price;
|
||||
public $net_amount;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->items = new Collection;
|
||||
}
|
||||
|
||||
public function add($price_from, $values){
|
||||
$this->items->push(new MarginItems($price_from, $values));
|
||||
}
|
||||
|
||||
public function setCommission(Commission $commission){
|
||||
$this->commission = $commission;
|
||||
}
|
||||
public function isMargin(){
|
||||
return count($this->items) ? true : false;
|
||||
}
|
||||
|
||||
public function calculate(){
|
||||
|
||||
if($this->commission){
|
||||
$this->net_discount += $this->commission->single_value_commission;
|
||||
$this->net_partner_commission += $this->commission->single_partner_commission;
|
||||
$this->net_amount += $this->commission->single_amount_commission;
|
||||
$this->net_price += $this->commission->single_price_net_commission;
|
||||
|
||||
}
|
||||
|
||||
if($this->isMargin()){
|
||||
foreach ($this->items as $item){
|
||||
$this->net_discount += $item->value_margin;
|
||||
$this->net_partner_commission += $item->value_commission;
|
||||
$this->net_amount += $item->new_price_net;
|
||||
$this->net_price += $item->new_price_net;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public function getFormatted($key)
|
||||
{
|
||||
return isset($this->{$key}) ? Util::formatNumber($this->{$key}) : "";
|
||||
}
|
||||
|
||||
|
||||
public function toArray()
|
||||
{
|
||||
return [
|
||||
'items' => $this->items,
|
||||
'commission' => $this->commission,
|
||||
'net_discount' => $this->net_discount,
|
||||
'net_partner_commission' => $this->net_partner_commission,
|
||||
'net_price' => $this->net_price,
|
||||
'net_amount' => $this->net_amount,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public function restore($content)
|
||||
{
|
||||
|
||||
// Unserialize the content (either array if new, or collection if old)
|
||||
$storedContent = unserialize($content);
|
||||
|
||||
if (is_array($storedContent)) {
|
||||
$this->fromArray($storedContent);
|
||||
}
|
||||
//TODO - check this
|
||||
// If the old approach and is Collection, push into existing items
|
||||
/* if ($storedContent instanceof Collection) {
|
||||
foreach ($storedContent as $item) {
|
||||
$this->items->put($item);
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function fromArray($array)
|
||||
{
|
||||
$this->items = $array['items'];
|
||||
$this->commission = $array['commission'];
|
||||
$this->net_discount = $array['net_discount'];
|
||||
$this->net_partner_commission = $array['net_partner_commission'];
|
||||
$this->net_price = $array['net_price'];
|
||||
$this->net_amount = $array['net_amount'];
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
46
app/Services/Yard/MarginItems.php
Normal file
46
app/Services/Yard/MarginItems.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
namespace App\Services\Yard;
|
||||
|
||||
use App\Services\Util;
|
||||
|
||||
class MarginItems
|
||||
{
|
||||
public $price_from;
|
||||
public $range;
|
||||
public $rest_amount;
|
||||
|
||||
public $balance;
|
||||
|
||||
public $value_margin;
|
||||
public $new_price_net;
|
||||
public $trading_margin;
|
||||
|
||||
public $value_commission;
|
||||
public $commission;
|
||||
|
||||
public function __construct($price_from, $values)
|
||||
{
|
||||
$this->price_from = $price_from;
|
||||
$this->range = $values['range'];
|
||||
$this->rest_amount = $values['rest_amount'];
|
||||
$this->balance = $values['balance'];
|
||||
$this->trading_margin = $values['trading_margin'];
|
||||
$this->commission = $values['commission'];
|
||||
$this->calculate();
|
||||
}
|
||||
|
||||
public function calculate(){
|
||||
$this->value_margin = $this->balance / 100 * $this->trading_margin;
|
||||
$this->new_price_net = $this->balance - $this->value_margin;
|
||||
if($this->commission > 0){
|
||||
$this->value_commission = $this->balance / 100 * $this->commission;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function getFormatted($key)
|
||||
{
|
||||
return isset($this->{$key}) ? Util::formatNumber($this->{$key}) : "";
|
||||
}
|
||||
}
|
||||
|
|
@ -96,6 +96,8 @@ use Util;
|
|||
* @property string|null $payment_account
|
||||
* @property-read \App\Models\UserLevel|null $next_user_level
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User wherePaymentAccount($value)
|
||||
* @property string|null $payment_credit
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User wherePaymentCredit($value)
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ class CreateUserLevelsTable extends Migration
|
|||
$table->text('content')->nullable();
|
||||
$table->text('trans_content')->nullable();
|
||||
|
||||
$table->boolean('partner_provision')->default(false);
|
||||
|
||||
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||
$table->boolean('active')->default(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,12 @@ class CreateProductsTable extends Migration
|
|||
|
||||
|
||||
$table->tinyInteger('show_at')->unsigned()->nullable()->default(0);
|
||||
$table->boolean('shipping_addon')->default(false);
|
||||
$table->tinyInteger('amount_commission')->unsigned()->nullable()->default(0);
|
||||
|
||||
$table->boolean('single_commission')->default(false);
|
||||
$table->decimal('value_commission', 5, 2)->nullable();
|
||||
$table->decimal('partner_commission', 5, 2)->nullable();
|
||||
|
||||
|
||||
$table->string('identifier', 20)->nullable();
|
||||
$table->string('action')->nullable();
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ class CreatePaymentMethodsTable extends Migration
|
|||
$table->string('short', 10);
|
||||
$table->unsignedTinyInteger('show_at')->nullable()->default(0);
|
||||
$table->unsignedTinyInteger('pos')->nullable()->default(0);
|
||||
$table->decimal('max_price', 8, 2)->nullable();
|
||||
|
||||
$table->boolean('active')->default(false);
|
||||
$table->boolean('default')->default(false);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,13 +26,19 @@ class CreateShoppingOrdersTable extends Migration
|
|||
$table->unsignedTinyInteger('payment_for')->nullable();
|
||||
|
||||
$table->decimal('total', 13, 2)->nullable();
|
||||
$table->decimal('subtotal_full', 13, 2)->nullable();
|
||||
$table->decimal('discount', 13, 2)->nullable();
|
||||
$table->decimal('subtotal', 13, 2)->nullable();
|
||||
|
||||
|
||||
$table->decimal('shipping', 8, 2)->nullable();
|
||||
$table->decimal('shipping_net', 8, 2)->nullable();
|
||||
|
||||
$table->decimal('subtotal_ws', 13, 2)->nullable();
|
||||
$table->decimal('subtotal_shipping', 13, 2)->nullable();
|
||||
$table->decimal('tax', 8, 2)->nullable();
|
||||
|
||||
$table->decimal('total_without_credit', 13, 2)->nullable();
|
||||
$table->decimal('payment_credit', 13, 2)->nullable();
|
||||
$table->decimal('total_shipping', 13, 2)->nullable();
|
||||
|
||||
$table->unsignedInteger('points')->nullable();
|
||||
|
|
@ -47,7 +53,6 @@ class CreateShoppingOrdersTable extends Migration
|
|||
$table->unsignedTinyInteger('shipped')->default(0);
|
||||
$table->string('tracking', 255)->nullable();
|
||||
|
||||
|
||||
$table->char('mode', 4)->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateUserLevelMarginsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_level_margins', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('user_level_id');
|
||||
|
||||
$table->decimal('price_from', 8, 2)->nullable();
|
||||
//$table->decimal('price_to', 8, 2)->nullable();
|
||||
|
||||
$table->decimal('trading_margin', 5, 2)->nullable();
|
||||
$table->decimal('commission', 5, 2)->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('user_level_id')
|
||||
->references('id')
|
||||
->on('user_levels')
|
||||
->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('user_level_margins');
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateShoppingOrderMarginsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('shopping_order_margins', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedInteger('shopping_order_id');
|
||||
$table->unsignedInteger('user_id');
|
||||
|
||||
$table->decimal('net_price', 13, 2)->nullable();
|
||||
$table->decimal('net_discount', 13, 2)->nullable();
|
||||
$table->decimal('net_amount', 13, 2)->nullable();
|
||||
$table->decimal('from_payment_credit', 13, 2)->nullable();
|
||||
|
||||
$table->unsignedInteger('m_sponsor_id')->nullable();
|
||||
$table->decimal('net_partner_commission', 13, 2)->nullable();
|
||||
|
||||
$table->date('from')->nullable();
|
||||
|
||||
$table->boolean('paid')->default(false);
|
||||
$table->boolean('cancellation')->default(false);
|
||||
$table->unsignedTinyInteger('status')->index()->default(0);
|
||||
|
||||
|
||||
$table->text('content')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
|
||||
$table->foreign('shopping_order_id')
|
||||
->references('id')
|
||||
->on('shopping_orders');
|
||||
|
||||
$table->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
|
||||
$table->foreign('m_sponsor_id')
|
||||
->references('id')
|
||||
->on('users');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('shopping_order_margins');
|
||||
}
|
||||
}
|
||||
102
public/css/mycolors.css
Normal file
102
public/css/mycolors.css
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
body {
|
||||
line-height: 1.2em;
|
||||
}
|
||||
.text-muted {
|
||||
color: #8e8f90 !important;
|
||||
}
|
||||
.btn-primary:hover {
|
||||
background: #5f7567;
|
||||
}
|
||||
.btn-primary:focus,
|
||||
.btn-primary.focus {
|
||||
background: #5f7567;
|
||||
}
|
||||
a {
|
||||
color: #46564d;
|
||||
}
|
||||
|
||||
|
||||
a:hover {
|
||||
color: #5f7567;
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
border-color: #f2ffeb;
|
||||
background-color: #b5c49b;
|
||||
color: #f2ffea;
|
||||
}
|
||||
|
||||
.mr-lg-1-5 {
|
||||
margin-right: 1rem !important;
|
||||
}
|
||||
|
||||
#accordion a.card-header {
|
||||
background: #fff;
|
||||
padding: 0.6rem 1.5rem;
|
||||
}
|
||||
|
||||
#accordion a.card-header:hover, #accordion a.card-header:focus {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.text-dark[href]:hover {
|
||||
color: #696f5b !important
|
||||
}
|
||||
|
||||
#accordion .card-body {
|
||||
font-size: 0.95em;
|
||||
}
|
||||
.user-view-table tr td:first-child {
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
border-top: 1px solid #d6d6de;
|
||||
}
|
||||
.btn {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.footer.bg-white .footer-link:hover, .footer.bg-white .footer-link:focus {
|
||||
color: rgba(0, 0, 0, 0.9);
|
||||
text-decoration: underline;
|
||||
|
||||
}
|
||||
.footer.bg-white .footer-link {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
text-decoration: none;
|
||||
|
||||
}
|
||||
.footer p {
|
||||
color:#000;
|
||||
}
|
||||
.footer.bg-white {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.footer a {
|
||||
color:#000;
|
||||
|
||||
}
|
||||
.footer a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.badge-success {
|
||||
background-color: #b5c49b;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.form-control.has-error {
|
||||
border: 1px solid #ea8e49;
|
||||
}
|
||||
.text-dark.active {
|
||||
color: #fff !important;
|
||||
background-color: #928876 !important;
|
||||
}
|
||||
|
||||
[data-toggle="collapse"].collapsed .if-not-collapsed {
|
||||
display: none;
|
||||
}
|
||||
[data-toggle="collapse"]:not(.collapsed) .if-collapsed {
|
||||
display: none;
|
||||
}
|
||||
1346
public/css/theme-corporate.css
Normal file
1346
public/css/theme-corporate.css
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -153,11 +153,11 @@
|
|||
@if($user->isActiveAccount() )
|
||||
<div class="badge btn-success p-2">
|
||||
<i class="ion ion-md-checkmark-circle-outline text-white"></i>
|
||||
<strong>{{__('Berater-Mitgliedschaft aktiv')}}</strong> {{__('bis zum:')}} <strong></strong>{{ $user->getPaymentAccountDateFormat() }}</div>
|
||||
<strong>{{__('Vertriebspartner-Mitgliedschaft aktiv')}}</strong> {{__('bis zum:')}} <strong></strong>{{ $user->getPaymentAccountDateFormat() }}</div>
|
||||
@else
|
||||
<div class="badge badge-danger p-2">
|
||||
<i class="ion ion-md-close-circle-outline text-white"></i>
|
||||
<strong>{{__('Berater-Account inaktiv')}} </strong>
|
||||
<strong>{{__('Vertriebspartner-Account inaktiv')}} </strong>
|
||||
@if($user->payment_account)
|
||||
{{__('abgelaufen am')}}: <strong></strong>{{ $user->getPaymentAccountDateFormat() }}
|
||||
@endif
|
||||
|
|
@ -167,11 +167,11 @@
|
|||
@if($user->isActiveShop())
|
||||
<div class="badge btn-success p-2">
|
||||
<i class="ion ion-md-checkmark-circle-outline text-white"></i>
|
||||
<strong>{{__('Berater-Online-Shop aktiv')}}</strong> {{__('bis zum')}}: <strong></strong>{{ $user->getPaymentShopDateFormat() }}</div>
|
||||
<strong>{{__('Vertriebspartner-Online-Shop aktiv')}}</strong> {{__('bis zum')}}: <strong></strong>{{ $user->getPaymentShopDateFormat() }}</div>
|
||||
@else
|
||||
<div class="badge badge-danger p-2">
|
||||
<i class="ion ion-md-close-circle-outline text-white"></i>
|
||||
<strong>{{__('Berater-Shop inaktiv')}}</strong>
|
||||
<strong>{{__('Vertriebspartner-Shop inaktiv')}}</strong>
|
||||
@if($user->payment_shop)
|
||||
{{__('abgelaufen am')}}: <strong></strong>{{ $user->getPaymentShopDateFormat() }}
|
||||
@endif
|
||||
|
|
@ -235,7 +235,7 @@
|
|||
@if($user->active == 1)
|
||||
@if($user->files->count())
|
||||
@foreach($user->files()->whereIdentifier('contract')->get() as $file)
|
||||
<a class="btn btn-secondary btn-block mb-3" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank"><i class="ion ion-ios-download text-default mr-1"></i> MIVITA_Beratervertrag.pdf</a>
|
||||
<a class="btn btn-secondary btn-block mb-3" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank"><i class="ion ion-ios-download text-default mr-1"></i> MIVITA_Vertriebspartnervertrag.pdf</a>
|
||||
<hr class="mb-3">
|
||||
@endforeach
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@
|
|||
jeder aktiv eine kluge Entscheidung für Gesundheit und Umwelt.</p>
|
||||
|
||||
<p>Wir legen nicht nur auf die Qualität unserer Produkte einen hohen Stellenwert, sondern natürlich auch
|
||||
auf umfassende, kompetente Beratung durch freundliche und fachkundige Berater und Beraterinnen.</p>
|
||||
auf umfassende, kompetente Beratung durch freundliche und fachkundige Vertriebspartner und Vertriebspartnerinnen.</p>
|
||||
|
||||
<p>Wir entwickeln und vertreiben ausschließlich Produkte, die qualitativ hochwertig sind. So sind sie
|
||||
bei sachgemäßer Anwendung und Pflege langlebig und sehr ergiebig. Faktoren, die uns die
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@
|
|||
</span>
|
||||
<a href="{{ url(Util::getPostRoute().'card/checkout/server') }}" class="btn btn-primary btn-lg btn-block mt-4 btn-text-500 faa-parent animated-hover"><i class="fa fa-mail-forward faa-horizontal"></i> zur Kasse</a>
|
||||
<hr>
|
||||
<p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i class="fa fa-lock"></i> Sie werden auf unseren checkout Server weitergeletet, die Verbindung ist mit SSL verschlüsselt.</em></p>
|
||||
<p class="text-center" style="line-height: 1.2em;"><em class="small text-center"> <i class="fa fa-lock"></i> Du werden auf unseren checkout weitergeletet, die Verbindung ist mit SSL verschlüsselt.</em></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ Bei jedem Aufruf unserer Website werden allgemeine Daten und Informationen erfas
|
|||
Wir benötigen diese Informationen, um die Inhalte unserer Website zutreffend bereitstellen zu können. die dauerhafte Funktionsfähigkeit unseres IT-Systems gewährleisten zu können und um im Falle eines Cyberangriffes den Behörden die zu einer Strafverfolgung notwendigen Informationen bereitstellen zu können. Hierin liegt auch unser berechtigtes Interesse im Rahmen der Rechtsgrundlage für die Verarbeitung dieser Daten gemäß Art. 6 Abs. 1 lit. f DSGVO. Bei der Nutzung dieser allgemeinen Daten und Informationen ziehen wir keine Rückschlüsse auf die betroffene Person. Die anonymen Daten der Server-Logfiles speichern wir getrennt von allen personenbezogenen Daten.
|
||||
V. Elektronische Kontaktaufnahme mit uns
|
||||
<br><br>
|
||||
Aufgrund der Regelungen des Telemediengesetzes (TMG) sind wir zur Angabe einer allgemeinen Mailadresse im Impressum unserer Website verpflichtet, über die Sie uns per Mail kontaktieren können. Weiterhin haben Sie die Möglichkeit, über Kontaktformulare auf unserer Website Kontakt mit uns aufzunehmen. Über die Kontaktformulare können Sie u.a. Anfragen zu den Produkten oder unserem Geschäft stellen bzw. sich als Berater bei uns bewerben. Die von Ihnen per Mail oder unsere Kontaktformulare an uns übermittelten personenbezogenen Daten werden automatisch für Zwecke der Bearbeitung oder der Kontaktaufnahme zu Ihnen gespeichert.
|
||||
Aufgrund der Regelungen des Telemediengesetzes (TMG) sind wir zur Angabe einer allgemeinen Mailadresse im Impressum unserer Website verpflichtet, über die Sie uns per Mail kontaktieren können. Weiterhin haben Sie die Möglichkeit, über Kontaktformulare auf unserer Website Kontakt mit uns aufzunehmen. Über die Kontaktformulare können Sie u.a. Anfragen zu den Produkten oder unserem Geschäft stellen bzw. sich als Vertriebspartner bei uns bewerben. Die von Ihnen per Mail oder unsere Kontaktformulare an uns übermittelten personenbezogenen Daten werden automatisch für Zwecke der Bearbeitung oder der Kontaktaufnahme zu Ihnen gespeichert.
|
||||
<br><br>
|
||||
Mit Absenden Ihrer Nachricht willigen Sie in die Verarbeitung der übermittelten Daten ein. Die Verarbeitung erfolgt auf Grundlage des Art. 6 Abs. 1 lit. a DSGVO mit Ihrer Einwilligung. Sie können Ihre Einwilligung jederzeit durch Mitteilung an uns widerrufen, ohne dass die Rechtmäßigkeit der aufgrund der Einwilligung bis zum Widerruf erfolgten Verarbeitung berührt wird. Ihre E-Mail-Adresse nutzen wir nur zur Bearbeitung Ihrer Anfrage. Ihre Daten werden anschließend gelöscht, sofern Sie der weitergehenden Verarbeitung und Nutzung nicht zugestimmt haben.
|
||||
<br><br>
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@
|
|||
|
||||
<div class="col-md-12">
|
||||
<h2>Schulung auf der Mallorca Farm</h2>
|
||||
<p>Zweimal jährlich veranstaltet MIVITA eine Schulung für Berater. Neben Eurer Begehung der Farm
|
||||
<p>Zweimal jährlich veranstaltet MIVITA eine Schulung für Vertriebspartner. Neben Eurer Begehung der Farm
|
||||
und Produktionsstätte, weiht Euch Farmbetreiber Werner Telwest in die Geheimnisse der
|
||||
„Wüstenlilie“ ein. Und das Beste: Zu jeder Schulung gibt es eine Ausschreibung. Wer
|
||||
entsprechend Umsatz generiert wird mit der Reise von MIVITA belohnt und fliegt FOR FREE auf
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
</div>
|
||||
<div class="col-md-6">
|
||||
<h2>MIVITA Reisen by NETWORKTRIPS</h2>
|
||||
<p>Wir legen jedem Berater ans Herz, mit uns gemeinsam die Aloe Vera Schulung auf Mallorca zu erleben. Hierzu haben wir für Euch gemeinsam mit unserem Reise-Portal NETWORKTRIPS und angeschlossenem Reisebüro STERN TOURS in Berlin verschiedene Buchungsmöglichkeiten für<br><br>
|
||||
<p>Wir legen jedem Vertriebspartner ans Herz, mit uns gemeinsam die Aloe Vera Schulung auf Mallorca zu erleben. Hierzu haben wir für Euch gemeinsam mit unserem Reise-Portal NETWORKTRIPS und angeschlossenem Reisebüro STERN TOURS in Berlin verschiedene Buchungsmöglichkeiten für<br><br>
|
||||
|
||||
• Nur-Hotel<br>
|
||||
• Hotel & Flug<br>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
<p>Insbesondere im Direktvertrieb mit seinen Möglichkeiten der freien Zeiteinteilung und
|
||||
passivem Einkommen hast Du mittelfristig soviel Freiheit, wie es Dir ein fester Job
|
||||
nicht
|
||||
bieten kann. Als selbständige MIVITA Beraterin entscheidest Du selbst, wann und wo Du
|
||||
bieten kann. Als selbständige MIVITA Vertriebspartnerin entscheidest Du selbst, wann und wo Du
|
||||
arbeitest. Und das betrifft ja nicht nur junge Eltern. Auch für Menschen, die ihre
|
||||
Familienangehörigen pflegen müssen oder einfach grundsätzlich mehr Zeit und finanzielle
|
||||
Entlastung erreichen wollen, stellt der Direktvertrieb eine perfekte Lösung dar:
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
|
||||
<div class="col-md-4">
|
||||
<h3>Vorteile bei MIVITA:</h3>
|
||||
<p>Es gibt sehr viele gute Gründe, um sich mit mivita selbständig zu machen. Viele Beraterinnen und Beratern antworten auf die Frage, warum sie sich für den Direktvertrieb bei mivita entschieden haben:</p>
|
||||
<p>Es gibt sehr viele gute Gründe, um sich mit mivita selbständig zu machen. Viele Vertriebspartnerinnen und Vertriebspartnern antworten auf die Frage, warum sie sich für den Direktvertrieb bei mivita entschieden haben:</p>
|
||||
<ul class="small">
|
||||
<li>20-40% Verkaufsmarge</li>
|
||||
<li>Attraktive Boni und Aktionen</li>
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@
|
|||
jeder aktiv eine kluge Entscheidung für Gesundheit und Umwelt.</p>
|
||||
|
||||
<p>Wir legen nicht nur auf die Qualität unserer Produkte einen hohen Stellenwert, sondern natürlich auch
|
||||
auf umfassende, kompetente Beratung durch freundliche und fachkundige Berater und Beraterinnen.</p>
|
||||
auf umfassende, kompetente Beratung durch freundliche und fachkundige Vertriebspartner und Vertriebspartnerinnen.</p>
|
||||
|
||||
<p>Wir entwickeln und vertreiben ausschließlich Produkte, die qualitativ hochwertig sind. So sind sie
|
||||
bei sachgemäßer Anwendung und Pflege langlebig und sehr ergiebig. Faktoren, die uns die
|
||||
|
|
|
|||
|
|
@ -70,14 +70,14 @@
|
|||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="text-muted small">Zugewiesener Berater</div>
|
||||
<div class="text-muted small">Zugewiesener Vertriebspartner</div>
|
||||
@if($shopping_user->is_like)
|
||||
<button type="button" class="btn btn-xs btn-outline-info" data-toggle="modal" data-target="#modals-load-content"
|
||||
data-id="{{$shopping_user->id}}"
|
||||
data-action="shopping-user-is-like-member"
|
||||
data-back="{{route('admin_customer_detail', [$shopping_user->id])}}"
|
||||
data-modal="modal-xl"
|
||||
data-route="{{route('modal_load')}}"><span class="fa fa-edit"></span> Berater zuordnen</button>
|
||||
data-route="{{route('modal_load')}}"><span class="fa fa-edit"></span> Vertriebspartner zuordnen</button>
|
||||
@else
|
||||
@if($shopping_user->member)
|
||||
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_user->member->id])}}"><i class="ion ion-ios-contacts"></i></a>
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
@endif
|
||||
</div>
|
||||
<div class="col-md-3 mb-3">
|
||||
<div class="text-muted small">ist Berater</div>
|
||||
<div class="text-muted small">ist Vertriebspartner</div>
|
||||
@if($shopping_user->auth_user)
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
|
||||
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_user->auth_user->id])}}"><i class="ion ion-ios-contacts"></i></a>
|
||||
|
|
|
|||
|
|
@ -11,16 +11,16 @@
|
|||
<div class="card-header">
|
||||
<div class="form-row align-items-center">
|
||||
{{-- <div class="col-sm-5 mb-2">
|
||||
<label class="form-label" for="filter_user_shop_id">Filter Kunden/Berater</label>
|
||||
<label class="form-label" for="filter_user_shop_id">Filter Kunden/Vertriebspartner</label>
|
||||
<select class="custom-select" name="filter_customer_member" id="filter_customer_member">
|
||||
<option value="">Filter aus</option>
|
||||
<option value="customers" @if(get_user_attr('filter_customer_member') === 'customers') selected @endif>Kunden</option>
|
||||
<option value="members" @if(get_user_attr('filter_customer_member') === 'members') selected @endif>Berater</option>
|
||||
<option value="members" @if(get_user_attr('filter_customer_member') === 'members') selected @endif>Vertriebspartner</option>
|
||||
|
||||
</select>
|
||||
</div>--}}
|
||||
<div class="col-sm-10 mb-2">
|
||||
<label class="form-label" for="filter_user_shop_id">Filter zugewiesener Berater</label>
|
||||
<label class="form-label" for="filter_user_shop_id">Filter zugewiesener Vertriebspartner</label>
|
||||
<select class="custom-select" name="filter_member_id" id="filter_member_id">
|
||||
<option value="">Filter aus</option>
|
||||
@foreach($filter_members as $member)
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
</div>
|
||||
<div class="card-datatable table-responsive">
|
||||
<div class="ml-4">
|
||||
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
|
||||
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a> -->
|
||||
</div>
|
||||
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
|
||||
<thead>
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
<th>#</th>
|
||||
<th>{{__('Nummer')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th>{{__('ist Berater')}}</th>
|
||||
<th>{{__('ist Vertriebspartner')}}</th>
|
||||
<th>{{__('Anrede')}}</th>
|
||||
<th>{{__('Firma')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
<th>{{__('Land')}}</th>
|
||||
<th>{{__('Käufe')}}</th>
|
||||
<th>{{__('Newsletter')}}</th>
|
||||
<th>{{__('zugewiesener Berater')}}</th>
|
||||
<th>{{__('zugewiesener Vertriebspartner')}}</th>
|
||||
<th>{{__('Datum')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
|
||||
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
@if(!$user->id || $user->id === 'new')
|
||||
{{ __('Neuen Berater erstellen') }}
|
||||
{{ __('Neuen Vertriebspartner erstellen') }}
|
||||
@else
|
||||
{{ __('Berater bearbeiten') }}
|
||||
{{ __('Vertriebspartner bearbeiten') }}
|
||||
@endif
|
||||
</h4>
|
||||
|
||||
|
|
@ -79,12 +79,12 @@
|
|||
<form class="modal-content" action="{{route('admin_lead_released', ['incomplete', $user->id])}}?show={{$show}}" method="post">
|
||||
@csrf
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> {{__('Berater Daten nicht vollständig')}}</h5>
|
||||
<h5 class="modal-title"> {{__('Vertriebspartner Daten nicht vollständig')}}</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>Berater eine E-Mail senden, dass die Daten nicht vollständig sind?<br>
|
||||
Vervollständige die Nachricht welche Daten fehlerhaft sind, die Nachricht wird an den Berater gesendet. Anrede, Links, Absender wird automatisch in die E-Mail eingefügt. </p>
|
||||
<p>Vertriebspartner eine E-Mail senden, dass die Daten nicht vollständig sind?<br>
|
||||
Vervollständige die Nachricht welche Daten fehlerhaft sind, die Nachricht wird an den Vertriebspartner gesendet. Anrede, Links, Absender wird automatisch in die E-Mail eingefügt. </p>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
|
|
|
|||
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Berater') }}
|
||||
{{ __('Vertriebspartner') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
{{-- <div class="ml-4">
|
||||
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a>
|
||||
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a>
|
||||
</div>--}}
|
||||
<table class="datatables-leads table table-striped table-bordered">
|
||||
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
</table>
|
||||
{{-- <div class="mt-4 ml-4">
|
||||
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a>
|
||||
<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a>
|
||||
</div> --}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<div class="card-body">
|
||||
<div class="float-right">
|
||||
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal" data-target="#modals-edit-m-data">
|
||||
<span class="far fa-edit"></span> Berater Daten bearbeiten
|
||||
<span class="far fa-edit"></span> Vertriebspartner Daten bearbeiten
|
||||
</button>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
<a href="#" class="@if($show !== 'check_lead' || !$m_data_load) collapsed @endif" data-toggle="collapse" data-target="#collapseMRegister" aria-expanded="@if($show !== 'check_lead' || !$m_data_load) false @else true @endif" aria-controls="collapseMRegister">
|
||||
<i class="fa fa-caret-expand"></i> {{__('Berater Status') }}
|
||||
<i class="fa fa-caret-expand"></i> {{__('Vertriebspartner Status') }}
|
||||
</a>
|
||||
</h5>
|
||||
<div class="collapse @if($show === 'check_lead' || $m_data_load) show @endif" id="collapseMRegister">
|
||||
|
|
@ -20,10 +20,10 @@
|
|||
|
||||
@if($user->payment_account )
|
||||
<p><span class="ion ion-md-checkmark-circle-outline text-primary"></span>
|
||||
<strong>{{__('Berater-Account aktiv')}}</strong> {{__('bis zum:')}} {{ $user->getPaymentAccountDateFormat() }}</p>
|
||||
<strong>{{__('Vertriebspartner-Account aktiv')}}</strong> {{__('bis zum:')}} {{ $user->getPaymentAccountDateFormat() }}</p>
|
||||
@else
|
||||
<p><span class="ion ion-md-close-circle-outline text-danger"></span>
|
||||
<strong>{{__('Berater-Account inaktiv')}}</strong></p>
|
||||
<strong>{{__('Vertriebspartner-Account inaktiv')}}</strong></p>
|
||||
@endif
|
||||
|
||||
@if($user->active == 1)
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<strong>{{__('Daten vollständig, freigeschaltet')}}</strong>: {{ $user->getActiveDateFormat() }}</p>
|
||||
@if($user->files->count())
|
||||
@foreach($user->files()->whereIdentifier('contract')->get() as $file)
|
||||
<a class="btn btn-secondary" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank">Beratervertrag.pdf</a>
|
||||
<a class="btn btn-secondary" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank">Vertriebspartnervertrag.pdf</a>
|
||||
@endforeach
|
||||
@endif
|
||||
@else
|
||||
|
|
@ -69,12 +69,12 @@
|
|||
<hr>
|
||||
@if($user->release_account)
|
||||
<strong>Registrierung abgeschlossen {{ $user->getReleaseAccountFormat() }}</strong><br>
|
||||
<a href="{{route('admin_lead_released', ['completed', $user->id])}}" class="btn btn-success" onclick="return confirm('Alle Daten vollständig und Berater freischalten?');">Die Daten sind vollständigt => Berater freischalten</a>
|
||||
<a href="{{route('admin_lead_released', ['completed', $user->id])}}" class="btn btn-success" onclick="return confirm('Alle Daten vollständig und Vertriebspartner freischalten?');">Die Daten sind vollständigt => Vertriebspartner freischalten</a>
|
||||
<button type="button" class="btn btn-sm btn-danger float-right" data-toggle="modal" data-target="#modals-register-m-data">
|
||||
Berater eine E-Mail senden => Daten nicht vollständigt
|
||||
Vertriebspartner eine E-Mail senden => Daten nicht vollständigt
|
||||
</button>
|
||||
@else
|
||||
<strong><span class="text-danger">Berater muss Registrierung noch abschließen</span></strong>
|
||||
<strong><span class="text-danger">Vertriebspartner muss Registrierung noch abschließen</span></strong>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
|
|
|
|||
207
resources/views/admin/level/edit.blade.php
Executable file
207
resources/views/admin/level/edit.blade.php
Executable file
|
|
@ -0,0 +1,207 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Create/Edit Rolle') }}
|
||||
</h4>
|
||||
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<a href="{{ route('admin_levels') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
<div class="card mb-2">
|
||||
{!! Form::open(['url' => route('admin_level_store',), 'class' => 'form-horizontal', 'id'=>'']) !!}
|
||||
<input type="hidden" name="id" value="@if($value->id>0){{$value->id}}@else new @endif">
|
||||
<h5 class="card-header">
|
||||
{{ __('Rolle') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">{{__('Name')}}*</label>
|
||||
{{ Form::text('name', $value->name, array('placeholder'=>__('Bezeichnung'), 'class'=>'form-control', 'required')) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="content" class="form-label">{{__('Beschreibung')}}</label>
|
||||
{{ Form::textarea('content', $value->content, array('placeholder'=>__('Beschreibung'), 'class'=>'form-control summernote-small')) }}
|
||||
<p> <i>Platzhalter ##mehr lesen## </i></p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-12">
|
||||
<label class="custom-control custom-checkbox m-2">
|
||||
{!! Form::checkbox('partner_provision', 1, $value->partner_provision, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">Vertriebspartner Provision berechnen</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label class="custom-control custom-checkbox m-2">
|
||||
{!! Form::checkbox('active', 1, $value->active, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('active')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
{{ Form::text('pos', $value->pos, array('placeholder'=>__('Number to move the position if necessary'), 'class'=>'form-control')) }}
|
||||
</div>
|
||||
</div>
|
||||
@if(isset($trans))
|
||||
<hr>
|
||||
@foreach($trans as $tran)
|
||||
@if($tran != 'de')
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name" class="form-label">{{__('Translate')}} <strong style="text-transform: uppercase">{{$tran}}</strong></label>
|
||||
<input type="text" class="form-control" name="trans[{{$tran}}]" id="trans_{{$tran}}" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
<div class="text-left mt-0 mb-2">
|
||||
<button type="submit" class="btn btn-secondary" name="action" value="user_level">{{ __('save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
|
||||
@if($value->id>0)
|
||||
<div class="card mb-2">
|
||||
<h6 class="card-header">
|
||||
{{__('Staffelpreise')}}
|
||||
</h6>
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-style table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Preis ab')}} €</th>
|
||||
<th>{{__('Handelsspanne')}} %</th>
|
||||
<th>{{__('Provision')}} %</th>
|
||||
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($value->user_level_margins as $user_level_margin)
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-user-level-margin"
|
||||
data-id="{{ $user_level_margin->id }}"
|
||||
data-price_from="{{ $user_level_margin->getFormattedPriceFrom() }}"
|
||||
data-trading_margin="{{ $user_level_margin->getFormattedTradingMargin() }}"
|
||||
data-commission="{{ $user_level_margin->getFormattedCommission() }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ $user_level_margin->getFormattedPriceFrom() }}</td>
|
||||
<td>{{ $user_level_margin->getFormattedTradingMargin() }}</td>
|
||||
<td>{{ $user_level_margin->getFormattedCommission() }}</td>
|
||||
<td><a class="text-danger" href="{{ route('admin_level_delete', ['user_level_margin', $user_level_margin->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-user-level-margin"
|
||||
data-id="new"
|
||||
data-price_from=""
|
||||
data-trading_margin=""
|
||||
data-commission=""
|
||||
>{{__('Neuen Staffelpreis erstellen')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal template price -->
|
||||
<div class="modal fade" id="modals-user-level-margin">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_level_store') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id">
|
||||
<input type="hidden" name="user_level_id" value="@if($value->id>0){{$value->id}}@else new @endif">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title"> {{__('Staffelpreis')}} <span class="font-weight-light">{{__('create/edit')}}</span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label for="price_from" class="form-label">{{__('ab Preis')}}*</label>
|
||||
<input type="text" class="form-control" name="price_from" placeholder="{{__('Preis in Euro')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-6">
|
||||
<label for="trading_margin" class="form-label">{{__('Handelspanne')}}</label>
|
||||
<input type="text" class="form-control" name="trading_margin" placeholder="{{__('in %')}}">
|
||||
</div>
|
||||
<div class="form-group col-6">
|
||||
<label for="commission" class="form-label">{{__('Provision')}}</label>
|
||||
<input type="text" class="form-control" name="commission" placeholder="{{__('in %')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary" name="action" value="user_level_margin">{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#modals-user-level-margin').on('show.bs.modal', function (event) {
|
||||
var button = $(event.relatedTarget);
|
||||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
$(this).find(".modal-body input[name='price_from']").val(button.data('price_from'));
|
||||
$(this).find(".modal-body input[name='trading_margin']").val(button.data('trading_margin'));
|
||||
$(this).find(".modal-body input[name='commission']").val(button.data('commission'));
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@endif
|
||||
<div class="text-left mt-2 mb-2">
|
||||
<a href="{{ route('admin_levels') }}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
|
|
@ -20,7 +20,10 @@
|
|||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td>
|
||||
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
<a href="{{route('admin_level_edit', [$value->id])}}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="far fa-edit"></span>
|
||||
</a>
|
||||
{{--<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="{{ $value->id }}"
|
||||
data-pos="{{ $value->pos }}"
|
||||
data-name="{{ $value->name }}"
|
||||
|
|
@ -28,11 +31,10 @@
|
|||
data-trans_name="{{ json_encode($value->trans_name) }}"
|
||||
data-active="{{ $value->active }}">
|
||||
<span class="far fa-edit"></span>
|
||||
</button>
|
||||
</button>--}}
|
||||
</td>
|
||||
<td>{{ $value->pos }}</td>
|
||||
<td>{{ $value->name }}</td>
|
||||
<td>{{ $value->getFormattedMargin() }}</td>
|
||||
<td>{{ $value->getTranNames() }}</td>
|
||||
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
|
||||
</tr>
|
||||
|
|
@ -40,22 +42,47 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
<a href="{{route('admin_level_edit', ['new'])}}" class="btn btn-sm btn-primary">
|
||||
{{__('Neue Rolle erstellen')}}
|
||||
</a>
|
||||
|
||||
{{-- <button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="new"
|
||||
data-pos=""
|
||||
data-name=""
|
||||
data-content=""
|
||||
data-active="1"
|
||||
>{{__('Neue Rolle erstellen')}}</button>
|
||||
--}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-style').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"aoColumns": [
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "8%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "19%" },
|
||||
{ "sWidth": "30%" },
|
||||
{ "sWidth": "10%" },
|
||||
{ "sWidth": "8%" },
|
||||
],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-default">
|
||||
{{-- <div class="modal fade" id="modals-default">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_level_store') }}" method="post">
|
||||
@csrf
|
||||
|
|
@ -148,5 +175,5 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script> --}}
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
Der Kunde hat ggf. unter einer anderen Email-Adresse bestellt als sonst.
|
||||
<span class="font-weight-light"> Bitte vor der Bearbeitung prüfen und dem richtigen Berater zuordnen.</span>
|
||||
<span class="font-weight-light"> Bitte vor der Bearbeitung prüfen und dem richtigen Vertriebspartner zuordnen.</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
|
|
@ -71,7 +71,7 @@
|
|||
<input type="hidden" name="change_shopping_user" value="true">
|
||||
|
||||
<hr>
|
||||
<p class="font-weight-bold">Zugeordneter Berater:</p>
|
||||
<p class="font-weight-bold">Zugeordneter Vertriebspartner:</p>
|
||||
<p>
|
||||
<span class="text-muted">#{{$current->member->number}}</span><br>
|
||||
{{$current->member->getFullName()}}<br>
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
@endif
|
||||
<label class="custom-control custom-radio mt-3">
|
||||
<input type="radio" class="custom-control-input" name="is_like_shopping_user_id" value="{{$current->id}}">
|
||||
<span class="custom-control-label">Nein, das ist ein neuer Kunde, Berater <span class="text-muted">#{{$current->member->number}}</span> zuordnen</span>
|
||||
<span class="custom-control-label">Nein, das ist ein neuer Kunde, Vertriebspartner <span class="text-muted">#{{$current->member->number}}</span> zuordnen</span>
|
||||
</label>
|
||||
</p>
|
||||
@endif
|
||||
|
|
@ -109,7 +109,7 @@
|
|||
@if(!$current->member_id)
|
||||
<label class="custom-control custom-radio mt-3">
|
||||
<input type="radio" class="custom-control-input" name="is_like_shopping_user_id" value="{{$current->id}}">
|
||||
<span class="custom-control-label">Nein, das ist ein neuer Kunde, Berater <span class="text-muted">#{{$current->shopping_order->user_shop->user->number}}</span> zuordnen</span>
|
||||
<span class="custom-control-label">Nein, das ist ein neuer Kunde, Vertriebspartner <span class="text-muted">#{{$current->shopping_order->user_shop->user->number}}</span> zuordnen</span>
|
||||
</label>
|
||||
@endif
|
||||
@else
|
||||
|
|
@ -180,7 +180,7 @@
|
|||
</div>
|
||||
<div class="col-sm-12">
|
||||
<hr>
|
||||
<p class="font-weight-bold">Zugeordneter Berater:</p>
|
||||
<p class="font-weight-bold">Zugeordneter Vertriebspartner:</p>
|
||||
<p>
|
||||
@if($possible->member_id)
|
||||
<span class="text-muted">#{{$possible->member->number}}</span><br>
|
||||
|
|
@ -198,10 +198,10 @@
|
|||
|
||||
<label class="custom-control custom-radio mt-3">
|
||||
<input type="radio" class="custom-control-input" name="is_like_shopping_user_id" value="{{$possible->id}}">
|
||||
<span class="custom-control-label">Stimmt, das ist der gleiche Kunde, Berater <span class="text-muted">#{{$possible->member->number}}</span> zuordnen</span>
|
||||
<span class="custom-control-label">Stimmt, das ist der gleiche Kunde, Vertriebspartner <span class="text-muted">#{{$possible->member->number}}</span> zuordnen</span>
|
||||
</label>
|
||||
@else
|
||||
Keinem Berater zugeordnet
|
||||
Keinem Vertriebspartner zugeordnet
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -222,7 +222,7 @@
|
|||
<div class="form-group col">
|
||||
<label class="custom-control custom-checkbox mt-3">
|
||||
<input type="checkbox" class="custom-control-input" name="send_member_mail" value="send" checked>
|
||||
<span class="custom-control-label">zugeordneten Berater die Bestellung als E-Mail zusenden</span>
|
||||
<span class="custom-control-label">zugeordneten Vertriebspartner die Bestellung als E-Mail zusenden</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{!! Form::open(['url' => $route, 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!}
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Berater') }}
|
||||
{{ __('Vertriebspartner') }}
|
||||
<span class="font-weight-light">zuweisen/ändern</span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
|
|
@ -19,11 +19,11 @@
|
|||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="change_member_id" class="form-label">{{ __('Berater zuweisen') }}*</label>
|
||||
<label for="change_member_id" class="form-label">{{ __('Vertriebspartner zuweisen') }}*</label>
|
||||
<select class="selectpicker" name="change_member_id" id="change_member_id" data-style="btn-light" data-live-search="true" required>
|
||||
{!! HTMLHelper::getMembersOptions($value->member_id, true) !!}
|
||||
</select>
|
||||
<p class="text-muted">Es werden nur aktive Berater mit aktiven Accounts angezeigt.</p>
|
||||
<p class="text-muted">Es werden nur aktive Vertriebspartner mit aktiven Accounts angezeigt.</p>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="customer_set_member_for" value="0">
|
||||
|
|
@ -32,11 +32,11 @@
|
|||
<div class="custom-controls-stacked">
|
||||
<label class="custom-control custom-radio">
|
||||
<input name="customer_set_member_for" value="0" type="radio" class="custom-control-input" checked="">
|
||||
<span class="custom-control-label">Nur dieser Bestellung einen neuen Berater zuweisen</span>
|
||||
<span class="custom-control-label">Nur dieser Bestellung einen neuen Vertriebspartner zuweisen</span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio">
|
||||
<input name="customer_set_member_for" value="1" type="radio" class="custom-control-input">
|
||||
<span class="custom-control-label">Jeder Bestellung vom Kunden #{{$value->shopping_user->number}} einen neuen Berater zuweisen</span>
|
||||
<span class="custom-control-label">Jeder Bestellung vom Kunden #{{$value->shopping_user->number}} einen neuen Vertriebspartner zuweisen</span>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
|
@ -46,11 +46,11 @@
|
|||
<div class="custom-controls-stacked">
|
||||
<label class="custom-control custom-radio">
|
||||
<input name="customer_set_member_for" value="0" type="radio" class="custom-control-input" checked="">
|
||||
<span class="custom-control-label">Nur diesen Kunden Bestellung einen neuen Berater zuweisen</span>
|
||||
<span class="custom-control-label">Nur diesen Kunden Bestellung einen neuen Vertriebspartner zuweisen</span>
|
||||
</label>
|
||||
<label class="custom-control custom-radio">
|
||||
<input name="customer_set_member_for" value="1" type="radio" class="custom-control-input">
|
||||
<span class="custom-control-label">Jeder Bestellung diesen Kunden #{{$value->number}} einen neuen Berater zuweisen</span>
|
||||
<span class="custom-control-label">Jeder Bestellung diesen Kunden #{{$value->number}} einen neuen Vertriebspartner zuweisen</span>
|
||||
</label>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
46
resources/views/admin/modal/user_level_margin.blade.php
Normal file
46
resources/views/admin/modal/user_level_margin.blade.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
{{ __('Staffelprovision') }} <strong>{{$user->user_level->name}}
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="action" value="{{$data['action']}}">
|
||||
<input type="hidden" name="id" value="{{$data['id']}}">
|
||||
<input type="hidden" name="view" value="{{$data['view']}}">
|
||||
|
||||
@if(isset($user) && $user->user_level && $user->user_level->user_level_margins)
|
||||
|
||||
<table class="table table-striped" style="border-top: 0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Umsatz netto</th>
|
||||
<th>Handelspanne</th>
|
||||
<th>Provision Vertriebspartner</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($user->user_level->user_level_margins as $user_level_margin)
|
||||
<tr>
|
||||
<th scope="row">ab {{$user_level_margin->getFormattedPriceFrom()}}</th>
|
||||
<td>{{$user_level_margin->getFormattedTradingMargin()}} %</td>
|
||||
<td>{{$user_level_margin->getFormattedCommission()}} %</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@endif
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
$( document ).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
|
@ -27,6 +27,7 @@
|
|||
data-name="{{ $value->name }}"
|
||||
data-short="{{ $value->short }}"
|
||||
data-show_at="{{ $value->show_at }}"
|
||||
data-max_price="{{ $value->getFormattedMaxPrice() }}"
|
||||
data-default="{{ $value->default }}"
|
||||
data-active="{{ $value->active }}">
|
||||
<span class="far fa-edit"></span>
|
||||
|
|
@ -47,6 +48,7 @@
|
|||
data-pos=""
|
||||
data-name=""
|
||||
data-short=""
|
||||
data-max_price=""
|
||||
data-show_at="9"
|
||||
data-default="1"
|
||||
data-active="1"
|
||||
|
|
@ -84,9 +86,16 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-5">
|
||||
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }}</label>
|
||||
{{ Form::select('show_at', \App\Models\PaymentMethod::$showATs, 9, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
|
||||
<div class="form-row">
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="show_at">{{ __('Produkt anzeigen') }}</label>
|
||||
{{ Form::select('show_at', \App\Models\PaymentMethod::$showATs, 9, array('data-live-search'=>'false', 'class'=>'selectpicker', 'id'=>'show_at') ) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="max_price">{{ __('Max. Preis für Zahlung') }}</label>
|
||||
<input type="text" class="form-control" name="max_price" placeholder="{{__('Aktiv wenn Preis > 0')}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
|
|
@ -126,12 +135,12 @@
|
|||
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||
$(this).find(".modal-body input[name='name']").val(button.data('name'));
|
||||
$(this).find(".modal-body input[name='short']").val(button.data('short'));
|
||||
$(this).find(".modal-body input[name='max_price']").val(button.data('max_price'));
|
||||
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
|
||||
$(this).find(".modal-body select[name='show_at']").val(button.data('show_at'));
|
||||
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||
$(this).find(".modal-body input[name='default']").prop( "checked", button.data('default'));
|
||||
|
||||
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -45,10 +45,7 @@
|
|||
<label class="form-label" for="copy">{{ __('Produktbeschreibung') }}</label>
|
||||
{{ Form::textarea('copy', $product->copy , array('placeholder'=>__('Produktbeschreibung'), 'class'=>'form-control summernote', 'id'=>'copy')) }}
|
||||
</div>
|
||||
<label class="custom-control custom-checkbox float-right">
|
||||
{!! Form::checkbox('shipping_addon', 1, $product->shipping_addon, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">Kompensationprodukt beim Versand für Berater</span>
|
||||
</label>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -58,22 +55,18 @@
|
|||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-4 col-md-3">
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="price">{{ __('Preis VK in EUR (Brutto)') }}</label>
|
||||
{{ Form::text('price', $product->getFormattedPrice(), array('placeholder'=>__('Preis VK in EUR (Brutto)'), 'class'=>'form-control', 'id'=>'price')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-4 col-md-3">
|
||||
<label class="form-label" for="price_ek">{{ __('Preis EK in EUR') }}</label>
|
||||
{{ Form::text('price_ek', $product->getFormattedPriceEk(), array('placeholder'=>__('Preis EK in EUR'), 'class'=>'form-control', 'id'=>'price_ek')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-4 col-md-3">
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="tax">{{ __('MwSt in %') }}</label>
|
||||
{{ Form::text('tax', $product->getFormattedTax(), array('placeholder'=>__('MwSt in %'), 'class'=>'form-control', 'id'=>'tax')) }}
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-4 col-md-3">
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="price_old">{{ __('Streichpreis in EUR (wenn > 0)') }}</label>
|
||||
{{ Form::text('price_old', $product->getFormattedPriceOld(), array('placeholder'=>__('Streichpreis'), 'class'=>'form-control', 'id'=>'price_old')) }}
|
||||
|
||||
|
|
@ -85,16 +78,45 @@
|
|||
<label class="form-label" for="weight">{{ __('Gewicht in g') }}</label>
|
||||
{{ Form::text('weight', $product->weight, array('placeholder'=>__('Gewicht in g'), 'class'=>'form-control', 'id'=>'weight')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{-- <div class="form-group col-sm-4">
|
||||
<label class="form-label" for="points">{{ __('Points pro Produkt') }}</label>
|
||||
{{ Form::text('points', $product->points, array('placeholder'=>__('Points pro Produkt'), 'class'=>'form-control', 'id'=>'points')) }}
|
||||
</div>
|
||||
--}}
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="amount">{{ __('Anzahl/Verfügbarkeit') }}</label>
|
||||
{{ Form::text('amount', $product->amount, array('placeholder'=>__('Anzahl/Verfügbarkeit'), 'class'=>'form-control', 'id'=>'amount')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="price_ek">{{ __('Preis EK in EUR') }}</label>
|
||||
{{ Form::text('price_ek', $product->getFormattedPriceEk(), array('placeholder'=>__('Preis EK in EUR'), 'class'=>'form-control', 'id'=>'price_ek')) }}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="weight">{{ __('Keine Staffelprovision') }}</label>
|
||||
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('single_commission', 1, $product->single_commission, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">Einzelrabatt für dieses Produkt</span>
|
||||
</label>
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('amount_commission', 1, $product->amount_commission, ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">Betrag zum Staffelumsatz addieren</span>
|
||||
</label>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="value_commission">{{ __('Einzelrabatt in %') }}</label>
|
||||
{{ Form::text('value_commission', $product->getFormattedValueCommission(), array('placeholder'=>__('Einzelrabatt in %'), 'class'=>'form-control', 'id'=>'value_commission')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<label class="form-label" for="partner_commission">{{ __('Vertriebspartner Einzelrabatt in %') }}</label>
|
||||
{{ Form::text('partner_commission', $product->getFormattedPartnerCommission(), array('placeholder'=>__('Vertriebspartner Einzelrabatt in %'), 'class'=>'form-control', 'id'=>'partner_commission')) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -20,14 +20,13 @@
|
|||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Artikelnummer')}}</th>
|
||||
<th>{{__('Kategorie')}}</th>
|
||||
<th>{{__('Points')}}</th>
|
||||
<th>{{__('Preis')}}</th>
|
||||
<th>{{__('Inhalt')}}</th>
|
||||
<th>{{__('Einheit')}}</th>
|
||||
<th>{{__('Grundpreis')}}</th>
|
||||
<th>{{__('Gewicht')}}</th>
|
||||
<th>{{__('sichbar')}}</th>
|
||||
<th>{{__('KP')}}</th>
|
||||
<th>{{__('ER')}}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
@ -54,13 +53,12 @@
|
|||
@endforeach
|
||||
</td>
|
||||
<td>{{ $value->getFormattedPrice() }}</td>
|
||||
<td>{{ $value->points }}</td>
|
||||
<td>{{ $value->contents_total }}</td>
|
||||
<td>{{ $value->getUnitType() }}</td>
|
||||
<td>{{ $value->getBasePriceFormatted() }}</td>
|
||||
<td>{{ $value->weight }}</td>
|
||||
<td>{{ $value->getShowAtType() }}</td>
|
||||
<td data-sort="{{ $value->shipping_addon }}">{!! get_active_badge($value->shipping_addon) !!}</td>
|
||||
<td data-sort="{{ $value->single_commission }}">{!! get_active_badge($value->single_commission) !!}</td>
|
||||
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
|
||||
<td><a class="text-info" href="{{ route('admin_product_copy', [$value->id]) }}" onclick="return confirm('{{__('Eintrag kopieren?')}}');"><i class="far fa-copy"></i></a>
|
||||
<a class="text-danger" href="{{ route('admin_product_delete', [$value->id]) }}" onclick="return confirm('{{__('Really delete entry?')}}');"><i class="far fa-trash-alt"></i></a></td>
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@
|
|||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="text-muted small">Zugewiesener Berater</div>
|
||||
<div class="text-muted small">Zugewiesener Vertriebspartner</div>
|
||||
@if($isView === 'sales_user')
|
||||
{{-- @if($shopping_order->user_shop)
|
||||
{{$shopping_order->user_shop->title}}
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
data-action="shopping-user-is-like-member"
|
||||
data-back="{{route('admin_sales_customers_detail', [$shopping_order->id])}}"
|
||||
data-modal="modal-xl"
|
||||
data-route="{{route('modal_load')}}"><span class="fa fa-edit"></span> Berater zuordnen</button>
|
||||
data-route="{{route('modal_load')}}"><span class="fa fa-edit"></span> Vertriebspartner zuordnen</button>
|
||||
@else
|
||||
@if($shopping_order->member)
|
||||
<a class="btn btn-xs btn-outline-primary" href="{{route('admin_lead_edit', [$shopping_order->member->id])}}"><i class="ion ion-ios-contacts"></i></a>
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
@if($shopping_order->shopping_user->is_from === 'shopping' || $shopping_order->shopping_user->is_from === 'extern')
|
||||
Rechnungsadresse des Kunden
|
||||
@else
|
||||
Rechnungsadresse des Beraters
|
||||
Rechnungsadresse des Vertriebspartners
|
||||
@endif
|
||||
</h6>
|
||||
<div class="row">
|
||||
|
|
@ -186,16 +186,16 @@
|
|||
<h6 class="small font-weight-semibold">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order' || $shopping_order->shopping_user->is_from === 'extern')
|
||||
@if($shopping_order->shopping_user->is_for === 'me')
|
||||
Lieferadresse des Berater
|
||||
Lieferadresse des Vertriebspartner
|
||||
@else
|
||||
Lieferadresse des Kunden
|
||||
@endif
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'wizard')
|
||||
Lieferadresse des Berater
|
||||
Lieferadresse des Vertriebspartner
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'membership')
|
||||
Lieferadresse des Berater
|
||||
Lieferadresse des Vertriebspartner
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'shopping')
|
||||
Lieferadresse des Kunden
|
||||
|
|
@ -266,22 +266,22 @@
|
|||
<h6 class="small font-weight-semibold">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
@if($shopping_order->shopping_user->is_for === 'me')
|
||||
<strong>Bestellung für Berater</strong>
|
||||
<strong>Bestellung für Vertriebspartner</strong>
|
||||
@else
|
||||
<strong>Bestellung für Kunde</strong>
|
||||
@endif
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'wizard')
|
||||
<strong>Beraterbestellung für Registrierung</strong>
|
||||
<strong>Vertriebspartnerbestellung für Registrierung</strong>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'membership')
|
||||
<strong>Beraterbestellung für Mitgliedschaft</strong>
|
||||
<strong>Vertriebspartnerbestellung für Mitgliedschaft</strong>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'shopping')
|
||||
<strong>Kundenbestellung über Shop</strong>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'homeparty')
|
||||
<h5>Beraterbestellung für eine Homeparty</h5>
|
||||
<h5>Vertriebspartnerbestellung für eine Homeparty</h5>
|
||||
<hr>
|
||||
@endif
|
||||
</h6>
|
||||
|
|
@ -360,43 +360,92 @@
|
|||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<style>
|
||||
.table_small_td {
|
||||
padding-top: 0.125rem !important;
|
||||
}
|
||||
</style>
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
<tr class="">
|
||||
<td colspan="3">
|
||||
Zwischensumme
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||||
{{ $shopping_order->getFormattedSubtotalFull() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td class="table_small_td" colspan="3">
|
||||
Handelspanne
|
||||
</td>
|
||||
<td class="table_small_td" style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||||
- {{ $shopping_order->getFormattedDiscount() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-bottom">
|
||||
<td class="table_small_td" colspan="3">
|
||||
<strong>Summe (Netto)</strong>
|
||||
</td>
|
||||
<td class="table_small_td" style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||||
<strong>{{ $shopping_order->getFormattedSubtotal() }} €*</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr class="border-bottom">
|
||||
<td colspan="3">
|
||||
{{__('email.checkout_mail_shipping')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.4em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order->getFormattedShippingNet() }} €
|
||||
{{ $shopping_order->getFormattedShippingNet() }} €*
|
||||
@else
|
||||
{{ $shopping_order->getFormattedShipping() }} €
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3">
|
||||
{{__('email.checkout_mail_subtotal_ws')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order->getFormattedSubtotalWs() }} €
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||||
{{ $shopping_order->getFormattedSubtotalShipping() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-bottom">
|
||||
<td colspan="3">
|
||||
<td class="table_small_td" colspan="3">
|
||||
{{__('email.checkout_mail_tax')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
<td class="table_small_td" style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||||
{{ $shopping_order->getFormattedTax() }} €
|
||||
</td>
|
||||
</tr>
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order' && $shopping_order->payment_credit > 0)
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<b> Summe (Brutto):</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||||
<b> {{ $shopping_order->getFormattedTotalWithoutCredit() }} €</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-bottom">
|
||||
<td class="table_small_td" colspan="3">
|
||||
aus Guthaben (Brutto):
|
||||
</td>
|
||||
<td class="table_small_td" style="color:#37302d; text-align: right; vertical-align: top;line-height:1.2em;">
|
||||
{{ $shopping_order->getFormattedPaymentCredit() }} €
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<b>{{__('email.checkout_mail_total')}}</b>
|
||||
<b>Gesamtsumme (Brutto):</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.4em;">
|
||||
<b>{{ $shopping_order->getFormattedTotalShipping() }} €</b>
|
||||
<br>
|
||||
<span style="font-size: 0.8em">{{__('email.checkout_mail_tax_info')}}</span>
|
||||
<span style="font-size: 0.9em"><em>* Nettobeträge</em></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<div class="card-header">
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col-sm-4 mb-2">
|
||||
<label class="form-label" for="filter_member_id">Filter zugewiesener Berater</label>
|
||||
<label class="form-label" for="filter_member_id">Filter zugewiesener Vertriebspartner</label>
|
||||
<select class="custom-select" name="filter_member_id" id="filter_member_id">
|
||||
<option value="">Filter aus</option>
|
||||
@foreach($filter_members as $member)
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
<th>{{__('First name')}}</th>
|
||||
<th>{{__('Last name')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th>{{__('zugewiesener Berater')}}</th>
|
||||
<th>{{__('zugewiesener Vertriebspartner')}}</th>
|
||||
<th>{{__('Rf-Nr.')}}</th>
|
||||
<th>{{__('Käufe')}}</th>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
<a href="{{route('admin_sales_users')}}" class="btn btn-sm btn-default float-right">zurück</a>
|
||||
{{ __('Bestellung Berater') }} <span class="text-muted">#{{$shopping_order->id}}</span>
|
||||
{{ __('Bestellung Vertriebspartner') }} <span class="text-muted">#{{$shopping_order->id}}</span>
|
||||
</h4>
|
||||
@include('admin.sales._detail')
|
||||
<a href="{{route('admin_sales_users')}}" class="btn btn-sm btn-default mt-2 float-right">zurück</a>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
|
||||
<h4 class="font-weight-bold py-2 mb-2">
|
||||
{{ __('Bestellungen Berater') }}
|
||||
{{ __('Bestellungen Vertriebspartner') }}
|
||||
</h4>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<form method="POST" class="my-3" action="{{ route('user_register') }}" aria-label="{{ __('Register') }}">
|
||||
@csrf
|
||||
@if($from_member_id)
|
||||
@if(isset($from_member_id))
|
||||
{!! Form::hidden('from_member_id', $from_member_id) !!}
|
||||
@endif
|
||||
<div class="form-group">
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@
|
|||
<!-- / Stats + Links -->
|
||||
</div> --}}
|
||||
|
||||
<div class="d-flex col-xl-6 align-items-stretch">
|
||||
<div class="d-flex col-md-6 align-items-stretch">
|
||||
<!-- SHOP -->
|
||||
<div class="card w-100 mb-4">
|
||||
<h5 class="card-header with-elements">
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
@if($user->isActiveAccount() )
|
||||
<div class="badge btn-success p-2">
|
||||
<i class="ion ion-md-checkmark-circle-outline text-white"></i>
|
||||
<strong>{{__('Berater-Mitgliedschaft aktiv')}}</strong> {{__('bis zum:')}} <strong></strong>{{ $user->getPaymentAccountDateFormat() }}</div>
|
||||
<strong>{{__('Vertriebspartner-Mitgliedschaft aktiv')}}</strong> {{__('bis zum:')}} <strong></strong>{{ $user->getPaymentAccountDateFormat() }}</div>
|
||||
<hr>
|
||||
<p><span class="ion ion-md-checkmark-circle-outline text-success"></span>
|
||||
<strong>{{__('Aktive Rolle')}}:</strong>
|
||||
|
|
@ -161,16 +161,47 @@
|
|||
@endif
|
||||
</p>
|
||||
<hr>
|
||||
<p><span class="ion ion-md-checkmark-circle-outline text-success"></span>
|
||||
<strong>{{__('Guthaben')}}:</strong>
|
||||
@if($user->payment_credit)
|
||||
{{ $user->getFormattedPaymentCredit() }} €
|
||||
@endif
|
||||
<h6>{{__('Umsätze')}} {{date('m.Y')}}</h6>
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Umsatz gesamt')}}:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyPrice($user, null, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Umsatz Staffelrabatt')}}:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyAmount($user, null, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Umsatz Zahlung offen')}}:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyPriceOpen($user, null, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr>
|
||||
<h6>{{__('Provision')}} {{date('m.Y')}}</h6>
|
||||
<table class="table table-striped table-bordered">
|
||||
<tr>
|
||||
<td class="text-left font-weight-semibold">{{__('Vertriebspartner Provision')}}:</td>
|
||||
<td class="text-right font-weight-bold">
|
||||
{!! \App\Services\UserMarign::getMontlyPartnerCommission($user, null, true) !!} €*
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="text-right" style="font-size: 0.9em"><i>* Nettobeträge</i></p>
|
||||
<hr>
|
||||
<p><span class="ion ion-md-checkmark-circle-outline text-secondary"></span>
|
||||
{{__('Guthaben')}} bis {{ $user->getPaymentAccountDateFormat(false) }}: <strong>{{ $user->getFormattedPaymentCredit() }} €</strong>
|
||||
</p>
|
||||
<hr>
|
||||
@else
|
||||
<div class="badge badge-danger p-2">
|
||||
<i class="ion ion-md-close-circle-outline text-white"></i>
|
||||
<strong>{{__('Berater-Account inaktiv')}} </strong>
|
||||
<strong>{{__('Vertriebspartner-Account inaktiv')}} </strong>
|
||||
@if($user->payment_account)
|
||||
{{__('abgelaufen am')}}: <strong></strong>{{ $user->getPaymentAccountDateFormat() }}
|
||||
@endif
|
||||
|
|
@ -184,7 +215,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="d-flex col-xl-6 align-items-stretch">
|
||||
<div class="d-flex col-md-6 align-items-stretch">
|
||||
<div class="card w-100 mb-4">
|
||||
<h5 class="card-header with-elements">
|
||||
<div class="card-header-title">{{__('Activities') }}</div>
|
||||
|
|
@ -220,7 +251,7 @@
|
|||
@if($user->files->count())
|
||||
@foreach($user->files()->whereIdentifier('contract')->get() as $file)
|
||||
<div class="card-footer pt-3">
|
||||
<a class="btn btn-secondary btn-block" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank"><i class="ion ion-ios-download text-default mr-1"></i> Beratervertrag.pdf</a>
|
||||
<a class="btn btn-secondary btn-block" href="{{ route('storage_file', [$file->id, 'user']) }}" target="_blank"><i class="ion ion-ios-download text-default mr-1"></i> Vertriebspartnervertrag.pdf</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
|
|
|||
186
resources/views/emails/_checkout_product_list.blade.php
Normal file
186
resources/views/emails/_checkout_product_list.blade.php
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<hr><br>
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
@if($shopping_order->shopping_user->is_for === 'me')
|
||||
<b>{{__('email.checkout_mail_order_for_me')}}</b>
|
||||
@else
|
||||
<b>{{__('email.checkout_mail_order_for_ot')}}</b>
|
||||
@endif
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'wizard')
|
||||
<b>{{__('email.checkout_mail_order_for_wizard')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'membership')
|
||||
<b>{{__('email.checkout_mail_order_for_membership')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'shopping')
|
||||
<b>{{__('email.checkout_mail_hl1')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'homeparty')
|
||||
<b>{{ __('navigation.my_homeparty') }} / {{ $shopping_order->homeparty->name }} - {{ $shopping_order->homeparty->date }}</b><br>
|
||||
<b>{{__('email.checkout_mail_hl1')}}</b>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #fff;line-height:1.6em;" cellpadding="2" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th style="color:#43413f; text-align: left; vertical-align: top;line-height:1.2em;">Produkt</th>
|
||||
<th style="color:#43413f; text-align: center; vertical-align: top;line-height:1.2em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
Netto-Preis
|
||||
@else
|
||||
Preis
|
||||
@endif
|
||||
</th>
|
||||
<th style="color:#43413f; text-align: center; vertical-align: top;line-height:1.2em;">Anzahl</th>
|
||||
<th style="color:#43413f; text-align: right; vertical-align: top;line-height:1.2em;">Summe</th>
|
||||
</tr>
|
||||
@foreach($shopping_order->shopping_order_items as $shopping_order_item)
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order_item->product->name }}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: center; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order_item->getFormattedPriceNet() }} €
|
||||
@else
|
||||
{{ $shopping_order_item->getFormattedPrice() }} €
|
||||
@endif
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: center; vertical-align: top; width: 10%;line-height:1.6em;">
|
||||
{{ $shopping_order_item->qty }}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order_item->getFormattedTotalPriceNet() }} €
|
||||
@else
|
||||
{{ $shopping_order_item->getFormattedTotalPrice() }} €
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
Zwischensumme
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order->getFormattedSubtotalFull() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
Handelspanne
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
- {{ $shopping_order->getFormattedDiscount() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
<b>Summe (Netto)</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
<b>{{ $shopping_order->getFormattedSubtotal() }} €*</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_shipping')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order->getFormattedShippingNet() }} €*
|
||||
@else
|
||||
{{ $shopping_order->getFormattedShipping() }} €
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_subtotal_ws')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order->getFormattedSubtotalShipping() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_tax')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order->getFormattedTax() }} €
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order' && $shopping_order->payment_credit > 0)
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
<b>Summe (Brutto)</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
<b>{{ $shopping_order->getFormattedTotalWithoutCredit() }} €*</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
aus Guthaben (Brutto):
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
- {{ $shopping_order->getFormattedPaymentCredit() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
<b>Gesamtsumme (Brutto):</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
<b>{{ $shopping_order->getFormattedTotalShipping() }} €</b>
|
||||
<br>
|
||||
<span style="font-size: 0.9em"><i>* Nettobeträge</i></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
|
@ -130,132 +130,8 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<hr><br>
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
@if($shopping_order->shopping_user->is_for === 'me')
|
||||
<b>{{__('email.checkout_mail_order_for_me')}}</b>
|
||||
@else
|
||||
<b>{{__('email.checkout_mail_order_for_ot')}}</b>
|
||||
@endif
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'wizard')
|
||||
<b>{{__('email.checkout_mail_order_for_wizard')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'membership')
|
||||
<b>{{__('email.checkout_mail_order_for_membership')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'shopping')
|
||||
<b>{{__('email.checkout_mail_hl1')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'homeparty')
|
||||
<b>{{ __('navigation.my_homeparty') }} / {{ $shopping_order->homeparty->name }} - {{ $shopping_order->homeparty->date }}</b><br>
|
||||
<b>{{__('email.checkout_mail_hl1')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'extern')
|
||||
<b>{{__('email.checkout_mail_order_for_extern')}}</b>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #fff;line-height:1.6em;" cellpadding="2" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th style="color:#43413f; text-align: left; vertical-align: top;line-height:1.2em;">Produkt</th>
|
||||
<th style="color:#43413f; text-align: center; vertical-align: top;line-height:1.2em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
Netto-Preis
|
||||
@else
|
||||
Preis
|
||||
@endif
|
||||
</th>
|
||||
<th style="color:#43413f; text-align: center; vertical-align: top;line-height:1.2em;">Anzahl</th>
|
||||
<th style="color:#43413f; text-align: right; vertical-align: top;line-height:1.2em;">Summe</th>
|
||||
</tr>
|
||||
@foreach($shopping_order->shopping_order_items as $shopping_order_item)
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order_item->product->name }}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: center; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order_item->getFormattedPriceNet() }} €
|
||||
@else
|
||||
{{ $shopping_order_item->getFormattedPrice() }} €
|
||||
@endif
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: center; vertical-align: top; width: 10%;line-height:1.6em;">
|
||||
{{ $shopping_order_item->qty }}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order_item->getFormattedTotalPriceNet() }} €
|
||||
@else
|
||||
{{ $shopping_order_item->getFormattedTotalPrice() }} €
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_shipping')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order->getFormattedShippingNet() }} €
|
||||
@else
|
||||
{{ $shopping_order->getFormattedShipping() }} €
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@include('emails._checkout_product_list')
|
||||
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_subtotal_ws')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order->getFormattedSubtotalWs() }} €
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_tax')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order->getFormattedTax() }} €
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
<b>{{__('email.checkout_mail_total')}}</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
<b>{{ $shopping_order->getFormattedTotalShipping() }} €</b>
|
||||
<br>
|
||||
<span style="font-size: 0.8em">{{__('email.checkout_mail_tax_info')}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
@if($shopping_order->shopping_user->is_from !== 'extern')
|
||||
|
||||
@if($send_link)
|
||||
|
|
@ -528,7 +404,7 @@
|
|||
<td style="color:#37302d;line-height:1.6em;">
|
||||
|
||||
@if($shopping_order->member)
|
||||
Berater: {{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->member->account->m_salutation) }} {{ $shopping_order->member->account->m_first_name }} {{ $shopping_order->member->account->m_last_name }}
|
||||
Vertriebspartner: {{ \App\Services\HTMLHelper::getSalutationLang($shopping_order->member->account->m_salutation) }} {{ $shopping_order->member->account->m_first_name }} {{ $shopping_order->member->account->m_last_name }}
|
||||
<br>
|
||||
Account ID: {{ $shopping_order->member->account->m_account }} <br>
|
||||
@if($shopping_order->member->user_level)
|
||||
|
|
|
|||
|
|
@ -179,128 +179,8 @@
|
|||
</td>
|
||||
</tr>
|
||||
|
||||
@include('emails._checkout_product_list')
|
||||
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<hr><br>
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
@if($shopping_order->shopping_user->is_for === 'me')
|
||||
<b>{{__('email.checkout_mail_order_for_me')}}</b>
|
||||
@else
|
||||
<b>{{__('email.checkout_mail_order_for_ot')}}</b>
|
||||
@endif
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'wizard')
|
||||
<b>{{__('email.checkout_mail_order_for_wizard')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'membership')
|
||||
<b>{{__('email.checkout_mail_order_for_membership')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'shopping')
|
||||
<b>{{__('email.checkout_mail_hl1')}}</b>
|
||||
@endif
|
||||
@if($shopping_order->shopping_user->is_from === 'homeparty')
|
||||
<b>{{ __('navigation.my_homeparty') }} / {{ $shopping_order->homeparty->name }} - {{ $shopping_order->homeparty->date }}</b><br>
|
||||
<b>{{__('email.checkout_mail_hl1')}}</b>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="padding: 20px; border:1px solid #eee; background-color: #fff;line-height:1.6em;" cellpadding="2" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th style="color:#43413f; text-align: left; vertical-align: top;line-height:1.2em;">Produkt</th>
|
||||
<th style="color:#43413f; text-align: center; vertical-align: top;line-height:1.2em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
Netto-Preis
|
||||
@else
|
||||
Preis
|
||||
@endif
|
||||
</th>
|
||||
<th style="color:#43413f; text-align: center; vertical-align: top;line-height:1.2em;">Anzahl</th>
|
||||
<th style="color:#43413f; text-align: right; vertical-align: top;line-height:1.2em;">Summe</th>
|
||||
</tr>
|
||||
@foreach($shopping_order->shopping_order_items as $shopping_order_item)
|
||||
<tr>
|
||||
<td style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order_item->product->name }}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: center; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order_item->getFormattedPriceNet() }} €
|
||||
@else
|
||||
{{ $shopping_order_item->getFormattedPrice() }} €
|
||||
@endif
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: center; vertical-align: top; width: 10%;line-height:1.6em;">
|
||||
{{ $shopping_order_item->qty }}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order_item->getFormattedTotalPriceNet() }} €
|
||||
@else
|
||||
{{ $shopping_order_item->getFormattedTotalPrice() }} €
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_shipping')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
@if($shopping_order->shopping_user->is_from === 'user_order')
|
||||
{{ $shopping_order->getFormattedShippingNet() }} €
|
||||
@else
|
||||
{{ $shopping_order->getFormattedShipping() }} €
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_subtotal_ws')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order->getFormattedSubtotalWs() }} €
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
{{__('email.checkout_mail_tax')}}
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
{{ $shopping_order->getFormattedTax() }} €
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" style="color:#37302d; text-align: left; vertical-align: top;line-height:1.6em;">
|
||||
<b>{{__('email.checkout_mail_total')}}</b>
|
||||
</td>
|
||||
<td style="color:#37302d; text-align: right; vertical-align: top;line-height:1.6em;">
|
||||
<b>{{ $shopping_order->getFormattedTotalShipping() }} €</b>
|
||||
<br>
|
||||
<span style="font-size: 0.8em">{{__('email.checkout_mail_tax_info')}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<hr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="sub_headline">
|
||||
<b>{{__('email.checkout_mail_invoice_addess')}}</b>
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@
|
|||
<!-- Core stylesheets -->
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/css/bootstrap.css') }}">
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/css/appwork.css') }}">
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/css/theme-corporate.css') }}">
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/css/colors.css') }}">
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/css/uikit.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('/vendor/css/mycolors.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('/css/theme-corporate.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('/css/mycolors.css') }}">
|
||||
|
||||
<link rel="stylesheet" href="{{ mix('/vendor/libs/growl/growl.css') }}">
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
Wir benötigen diese Informationen, um die Inhalte unserer Website zutreffend bereitstellen zu können. die dauerhafte Funktionsfähigkeit unseres IT-Systems gewährleisten zu können und um im Falle eines Cyberangriffes den Behörden die zu einer Strafverfolgung notwendigen Informationen bereitstellen zu können. Hierin liegt auch unser berechtigtes Interesse im Rahmen der Rechtsgrundlage für die Verarbeitung dieser Daten gemäß Art. 6 Abs. 1 lit. f DSGVO. Bei der Nutzung dieser allgemeinen Daten und Informationen ziehen wir keine Rückschlüsse auf die betroffene Person. Die anonymen Daten der Server-Logfiles speichern wir getrennt von allen personenbezogenen Daten.
|
||||
V. Elektronische Kontaktaufnahme mit uns
|
||||
<br><br>
|
||||
Aufgrund der Regelungen des Telemediengesetzes (TMG) sind wir zur Angabe einer allgemeinen Mailadresse im Impressum unserer Website verpflichtet, über die Sie uns per Mail kontaktieren können. Weiterhin haben Sie die Möglichkeit, über Kontaktformulare auf unserer Website Kontakt mit uns aufzunehmen. Über die Kontaktformulare können Sie u.a. Anfragen zu den Produkten oder unserem Geschäft stellen bzw. sich als Berater bei uns bewerben. Die von Ihnen per Mail oder unsere Kontaktformulare an uns übermittelten personenbezogenen Daten werden automatisch für Zwecke der Bearbeitung oder der Kontaktaufnahme zu Ihnen gespeichert.
|
||||
Aufgrund der Regelungen des Telemediengesetzes (TMG) sind wir zur Angabe einer allgemeinen Mailadresse im Impressum unserer Website verpflichtet, über die Sie uns per Mail kontaktieren können. Weiterhin haben Sie die Möglichkeit, über Kontaktformulare auf unserer Website Kontakt mit uns aufzunehmen. Über die Kontaktformulare können Sie u.a. Anfragen zu den Produkten oder unserem Geschäft stellen bzw. sich als Vertriebspartner bei uns bewerben. Die von Ihnen per Mail oder unsere Kontaktformulare an uns übermittelten personenbezogenen Daten werden automatisch für Zwecke der Bearbeitung oder der Kontaktaufnahme zu Ihnen gespeichert.
|
||||
<br><br>
|
||||
Mit Absenden Ihrer Nachricht willigen Sie in die Verarbeitung der übermittelten Daten ein. Die Verarbeitung erfolgt auf Grundlage des Art. 6 Abs. 1 lit. a DSGVO mit Ihrer Einwilligung. Sie können Ihre Einwilligung jederzeit durch Mitteilung an uns widerrufen, ohne dass die Rechtmäßigkeit der aufgrund der Einwilligung bis zum Widerruf erfolgten Verarbeitung berührt wird. Ihre E-Mail-Adresse nutzen wir nur zur Bearbeitung Ihrer Anfrage. Ihre Daten werden anschließend gelöscht, sofern Sie der weitergehenden Verarbeitung und Nutzung nicht zugestimmt haben.
|
||||
<br><br>
|
||||
|
|
|
|||
|
|
@ -144,7 +144,6 @@
|
|||
{!! Form::hidden('is_for', $shopping_user->is_for) !!}
|
||||
{!! Form::hidden('is_from', $shopping_user->is_from) !!}
|
||||
|
||||
@dump($shopping_user->is_from)
|
||||
<div class="row m-checkout">
|
||||
<div class="col-lg-8 col-md-7">
|
||||
<!-- BILLING -->
|
||||
|
|
@ -529,7 +528,7 @@
|
|||
<div class="table-responsive">
|
||||
<table class="table table- m-0" id="membership_package_payment">
|
||||
<tbody class="switchers-stacked">
|
||||
@if(array_key_exists('PP', $payment_methods_active) && in_array($payment_methods_active['PP'], $payment_methods))
|
||||
@if(\App\Models\PaymentMethod::isShowPaymentMethod('PP', $user_payment_methods, Yard::instance('shopping')->totalWithShipping(2, '.', '')))
|
||||
<tr>
|
||||
<td class="text-center align-middle px-0 ui-w-20">
|
||||
<label class="switcher switcher-secondary">
|
||||
|
|
@ -550,7 +549,7 @@
|
|||
</tr>
|
||||
@endif
|
||||
|
||||
@if(array_key_exists('SB', $payment_methods_active) && in_array($payment_methods_active['SB'], $payment_methods))
|
||||
@if(\App\Models\PaymentMethod::isShowPaymentMethod('SB', $user_payment_methods, Yard::instance('shopping')->totalWithShipping(2, '.', '')))
|
||||
<tr>
|
||||
<td class="text-center align-middle px-0 ui-w-20">
|
||||
<label class="switcher switcher-secondary">
|
||||
|
|
@ -570,7 +569,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if(array_key_exists('CC', $payment_methods_active) && in_array($payment_methods_active['CC'], $payment_methods))
|
||||
@if(\App\Models\PaymentMethod::isShowPaymentMethod('CC', $user_payment_methods, Yard::instance('shopping')->totalWithShipping(2, '.', '')))
|
||||
<tr>
|
||||
<td class="text-center align-middle px-0 ui-w-20">
|
||||
<label class="switcher switcher-secondary">
|
||||
|
|
@ -590,7 +589,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if(array_key_exists('SEPA', $payment_methods_active) && in_array($payment_methods_active['SEPA'], $payment_methods))
|
||||
@if(\App\Models\PaymentMethod::isShowPaymentMethod('SEPA', $user_payment_methods, Yard::instance('shopping')->totalWithShipping(2, '.', '')))
|
||||
<tr>
|
||||
<td class="text-center align-middle px-0 ui-w-20">
|
||||
<label class="switcher switcher-secondary">
|
||||
|
|
@ -610,7 +609,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if(array_key_exists('VOR', $payment_methods_active) && in_array($payment_methods_active['VOR'], $payment_methods))
|
||||
@if(\App\Models\PaymentMethod::isShowPaymentMethod('VOR', $user_payment_methods, Yard::instance('shopping')->totalWithShipping(2, '.', '')))
|
||||
<tr>
|
||||
<td class="text-center align-middle px-0 ui-w-20">
|
||||
<label class="switcher switcher-secondary">
|
||||
|
|
@ -630,7 +629,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if(array_key_exists('FNC', $payment_methods_active) && in_array($payment_methods_active['FNC'], $payment_methods))
|
||||
@if(\App\Models\PaymentMethod::isShowPaymentMethod('FNC', $user_payment_methods, Yard::instance('shopping')->totalWithShipping(2, '.', '')))
|
||||
<tr>
|
||||
<td class="text-center align-middle px-0 ui-w-20">
|
||||
<label class="switcher switcher-secondary">
|
||||
|
|
@ -823,7 +822,17 @@
|
|||
</div>
|
||||
|
||||
<hr />
|
||||
@if(Yard::instance('shopping')->getPaymentCredit())
|
||||
<div class="clearfix mb-2">
|
||||
<span class="pull-right">{{ Yard::instance('shopping')->totalWithShippingWithoutCredit() }} €</span>
|
||||
<span class="pull-left">Summe:</span>
|
||||
</div>
|
||||
|
||||
<div class="clearfix mb-2">
|
||||
<span class="pull-right"> - {{ Yard::instance('shopping')->totalfromCredit() }} €</span>
|
||||
<span class="pull-left">aus Guthaben:</span>
|
||||
</div>
|
||||
@endif
|
||||
<div class="clearfix">
|
||||
<span class="pull-right size-20"><strong>{{ Yard::instance('shopping')->totalWithShipping() }} €</strong></span>
|
||||
<strong class="pull-left">Gesamtsumme:</strong>
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="text-left" style="display: none" id="show-button-without-email">
|
||||
<p class="mt-2">Hinweis: Du kannst Deine Kunden auch ohne Email-Adresse anlegen. Das System gleicht dann Nachname und Postleitzahl ab. Sollte es hier mal Übereinstimmungen geben, gleicht der Support von gruene-seele.bio die Kundensätze ab und ordnet sie den Beratern entsprechend zu. Daher empfehlen wir im besten Fall immer die Angabe einer Email-Adresse. Diese ist einzigartig und damit eindeutig einem Kunden zuzuordnen.</p>
|
||||
<p class="mt-2">Hinweis: Du kannst Deine Kunden auch ohne Email-Adresse anlegen. Das System gleicht dann Nachname und Postleitzahl ab. Sollte es hier mal Übereinstimmungen geben, gleicht der Support von gruene-seele.bio die Kundensätze ab und ordnet sie den Vertriebspartner entsprechend zu. Daher empfehlen wir im besten Fall immer die Angabe einer Email-Adresse. Diese ist einzigartig und damit eindeutig einem Kunden zuzuordnen.</p>
|
||||
<button type="submit" class="btn btn-secondary" name="action" value="add_customer_without_email">{{ __('weiter ohne E-Mail') }}</button>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<div class="ml-4">
|
||||
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
|
||||
<!--<a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a> -->
|
||||
</div>
|
||||
<table class="datatables-customers table table-striped table-bordered" id="datatables-customers">
|
||||
<thead>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
<div class="mt-4 ml-4">
|
||||
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Berater erstellen')}}</a> -->
|
||||
<!-- <a href="{{ route('admin_lead_edit', ['new']) }}" class="btn btn-sm btn-primary">{{__('Neuen Vertriebspartner erstellen')}}</a> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<div class="card mb-4">
|
||||
<h5 class="card-header">
|
||||
{{ __('Berater einladen') }}
|
||||
{{ __('Vertriebspartner einladen') }}
|
||||
</h5>
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label class="custom-control custom-checkbox m-0">
|
||||
<input type="checkbox" class="custom-control-input" name="contact_verify" id="contact_verify" checked>
|
||||
<span class="custom-control-label"> {{ __('Berater erstellen und eine E-Mail zur Einladung senden!') }}</span>
|
||||
<span class="custom-control-label"> {{ __('Vertriebspartner erstellen und eine E-Mail zur Einladung senden!') }}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@
|
|||
<button type="submit" class="btn btn-secondary"><i class="ion ion-ios-redo"></i> bestätigen und weiter zur Kasse</button>
|
||||
</div>
|
||||
<br><br>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
@else
|
||||
<div class="alert alert-warning">
|
||||
Die Bestellung kann erst abgesendet werden, wenn die Lieferadresse Gastgeber/in angelegt ist. <a href="{{route('user_homeparty_guest_detail', [$homeparty->id, $homeparty->homeparty_host->id])}}"><i class="fa fa-edit"></i> </a></h6>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
{!! Form::open(['url' => route('user_membership_store', ['change_level']), 'class' => 'form-horizontal']) !!}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table- m-0">
|
||||
<tbody class="switchers-stacked">
|
||||
|
|
@ -20,7 +19,7 @@
|
|||
<div class="media align-items-center">
|
||||
<div class="media-body">
|
||||
<h5 class="d-block text-dark">{{$user_level->name}}</h5>
|
||||
{!! $user_level->getLang('content') !!}
|
||||
{!! \App\Services\HTMLHelper::setContentReadMore($user_level->getLang('content')) !!}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
<hr>
|
||||
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>
|
||||
<br><br>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
@endif
|
||||
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>
|
||||
<br><br>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,6 @@
|
|||
@include('user.membership._abo_options')
|
||||
<button type="submit" class="btn btn-secondary">{{ __('wählen und weiter zur Kasse') }}</button>
|
||||
<br><br>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
|
@ -45,11 +45,11 @@
|
|||
--}}
|
||||
@if($user->payment_order_id)
|
||||
@if($user->payment_order_product->identifier === 'show_upgrade')
|
||||
<p><strong>Eine Rückstufung Deiner Berater-Mitgliedschaft ist nicht mehr möglich.</strong></p>
|
||||
<p><strong>Eine Rückstufung Deiner Vertriebspartner-Mitgliedschaft ist nicht mehr möglich.</strong></p>
|
||||
<p><strong>Du hast die Möglichkeit Dein Paket zu upgraden, wähle einfach das erweiterte Paket aus und gehe weiter zur Zahlung.</strong></p>
|
||||
@endif
|
||||
@if($user->payment_order_product->identifier === 'show_order')
|
||||
<p><strong>Eine Änderung Deines Berater-Paketes ist nicht mehr möglich.</strong></p>
|
||||
<p><strong>Eine Änderung Deines Vertriebspartner-Paketes ist nicht mehr möglich.</strong></p>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
<h6 class="alert badge-{{$userHistoryUpgradeOrder->getStatusColor()}}">Eine Zahlung wurde ausgeführt. Status: {{ trans('payment.status.'.$userHistoryUpgradeOrder->getStatusType())}}</h6>
|
||||
@endif
|
||||
<h5 class="d-block text-dark">Erweitere jetzt Deine Mitglidschaft auf MIVITA BUSINESS Paket!</h5>
|
||||
<p>Berechnet werden die restlichen Monate bis zur Berater-Mitgliedschaft Verlängerung. Danach wird jährlich der MIVITA BUSINESS Paketpreis berechnet.</p>
|
||||
<p>Berechnet werden die restlichen Monate bis zur Vertriebspartner-Mitgliedschaft Verlängerung. Danach wird jährlich der MIVITA BUSINESS Paketpreis berechnet.</p>
|
||||
@if($userHistoryUpgradeOrder && $userHistoryUpgradeOrder->status > 2)
|
||||
<h5 class="card-header bg-light">
|
||||
<a href="#" class="" data-toggle="collapse" data-target="#collapsePaymentForm" aria-expanded="false" aria-controls="collapsePaymentForm">
|
||||
|
|
@ -158,7 +158,7 @@
|
|||
|
||||
<div class="card-body">
|
||||
|
||||
<p>Du möchtest kein Berater mehr sein und Deine Mitgliedschaft beenden?<br>
|
||||
<p>Du möchtest kein Vertriebspartner mehr sein und Deine Mitgliedschaft beenden?<br>
|
||||
Damit gibst du alle möglichen Provisionen, Vergünstigungen, Zugang zum Sales-Center und noch viel mehr auf. Mit absenden dieser Option erhalten wir ein Nachricht und kümmern uns um die Löschung Deines Accounts. Dieser Vorgang kann ein paar Tage dauern.</p>
|
||||
|
||||
@if($userHistoryDeleteMembership && $userHistoryDeleteMembership->status == 50)
|
||||
|
|
@ -208,7 +208,7 @@
|
|||
</div>
|
||||
</li>
|
||||
<li class="list-group-item d-flex justify-content-between align-items-center">
|
||||
<div class="text-muted">{{ __('Berater-Mitgliedschaft') }}</div>
|
||||
<div class="text-muted">{{ __('Vertriebspartner-Mitgliedschaft') }}</div>
|
||||
<div class="text-right">
|
||||
@if($user->isActiveAccount() )
|
||||
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> {{ __('aktiv') }}</span>
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@
|
|||
@if($user->user_level)
|
||||
<p>Die Produktpreise werden entsprechend Deiner Rolle: <strong>{{$user->user_level->name}}</strong> angezeigt.<br>
|
||||
Hinweis: Wenn Du den Warenkorb verlässt, gehen alle Einstellungen verloren.</p>
|
||||
<strong>Prozente noch nicht eingebaut, müssen über Produkte eingestellt werden</strong>
|
||||
@else
|
||||
<p>Hinweis: Dir wurde noch keine Rolle zugewisen. Bitte wende dich an serivce@gruene-seele.bio</p>
|
||||
@endif
|
||||
|
|
@ -78,10 +77,10 @@
|
|||
<tr>
|
||||
<th>{{__('Bild')}}</th>
|
||||
<th>{{__('Produkt')}}</th>
|
||||
<th>{{__('Mein Preis netto')}}</th>
|
||||
<th>{{__('Mein Preis brutto')}}</th>
|
||||
<th>{{__('Preis netto')}}</th>
|
||||
<th>{{__('Preis brutto')}}</th>
|
||||
<th>{{__('Provision')}}</th>
|
||||
<th>{{__('Gewicht')}}</th>
|
||||
<th>{{__('VK-Preis brutto')}}</th>
|
||||
<th><span class="no-line-break">{{__('Inhalt (ml)')}}</span></th>
|
||||
<th>{{__('Artikelnummer')}}</th>
|
||||
<th>#</th>
|
||||
|
|
@ -153,8 +152,8 @@
|
|||
{ data: 'product', name: 'product' },
|
||||
{ data: 'price_net', name: 'price_net', searchable: false, orderable: false },
|
||||
{ data: 'price_gross', name: 'price_gross', searchable: false, orderable: false },
|
||||
{ data: 'single_commission', name: 'single_commission', searchable: false },
|
||||
{ data: 'weight', name: 'weight', searchable: false },
|
||||
{ data: 'price_vk_gross', name: 'price_vk_gross', searchable: false },
|
||||
{ data: 'contents_total', name: 'contents_total', searchable: false },
|
||||
{ data: 'number', name: 'number' },
|
||||
{ data: 'action', name: 'action', searchable: false, orderable: false },
|
||||
|
|
|
|||
|
|
@ -82,6 +82,10 @@
|
|||
min-width: 4em;
|
||||
display: inline-block;
|
||||
}
|
||||
.no-border-top{
|
||||
border-top: none !important;
|
||||
padding-top: 0.125rem !important;
|
||||
}
|
||||
</style>
|
||||
<div id="cartContent">
|
||||
|
||||
|
|
@ -99,7 +103,7 @@
|
|||
Einzelpreis
|
||||
</div>
|
||||
<div class="col-6 col-sm-3 col-md-3 text-right">
|
||||
Anzahl
|
||||
Anzahl/Preis
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -129,7 +133,6 @@
|
|||
</div>
|
||||
<div class="options">
|
||||
<a href="#" class="auto-delete-product remove_item_form_cart product-tooltip" data-row-id="{{$row->rowId}}" data-product-id="{{ $product->id }}"><i class="fa fa-times"></i> Artikel entfernen</a>
|
||||
|
||||
{{--
|
||||
@if(!$row->options->comp)
|
||||
@else
|
||||
|
|
@ -145,7 +148,7 @@
|
|||
</div>
|
||||
|
||||
<div class="col-6 col-sm-3 col-md-2 text-left font-semi-bold price-single">
|
||||
<div class="no-line-break">{{ Yard::instance('shopping')->rowPriceNet($row, 3) }} €</div>
|
||||
<div class="no-line-break">{{ Yard::instance('shopping')->rowPriceNet($row, 3) }} €*</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-sm-3 col-md-3 quantity">
|
||||
|
|
@ -159,7 +162,7 @@
|
|||
--}}
|
||||
</div>
|
||||
<div class="price-total text-right">
|
||||
<div class="no-line-break">{{ Yard::instance('shopping')->rowSubtotalNet($row) }} €</div>
|
||||
<div class="no-line-break">{{ Yard::instance('shopping')->rowSubtotalNet($row) }} €*</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -171,6 +174,8 @@
|
|||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
{{ Yard::instance('shopping')->calculateMargins() }}
|
||||
|
||||
<!-- / Shopping cart table -->
|
||||
<div class="d-flex flex-wrap justify-content-between pb-4">
|
||||
<div class="mt-2">
|
||||
|
|
@ -183,34 +188,97 @@
|
|||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="text-left" style="border-top:none;">Zwischensumme:</td>
|
||||
<td style="border-top:none;">{{ Yard::instance('shopping')->subtotal() }} €</td>
|
||||
<td class="text-left no-border-top">Zwischensumme:</td>
|
||||
<td class="no-border-top">
|
||||
{{ Yard::instance('shopping')->subtotal(null, null, null, false) }} €*
|
||||
</td>
|
||||
</tr>
|
||||
@if(Yard::instance('shopping')->getYardMargin() && Yard::instance('shopping')->getYardMargin()->isMargin())
|
||||
@foreach(Yard::instance('shopping')->getYardMargin()->items as $item)
|
||||
<tr>
|
||||
<td class="text-left">Staffelrabatt
|
||||
<br>ab {{ $item->getFormatted('price_from') }} / {{ $item->getFormatted('trading_margin') }}% :</td>
|
||||
<td>
|
||||
- {{ $item->getFormatted('value_margin') }} €*
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
@if(Yard::instance('shopping')->getYardCommission() && Yard::instance('shopping')->getYardCommission()->isCommission())
|
||||
<tr>
|
||||
<td class="text-left">Einzelrabatt:</td>
|
||||
<td>
|
||||
- {{ Yard::instance('shopping')->getYardCommission()->getFormatted('single_value_commission') }} €*
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="text-left"><strong>Summe (Netto):</strong></td>
|
||||
<td>
|
||||
<strong>{{ Yard::instance('shopping')->subtotal() }} €*</strong>
|
||||
</td>
|
||||
</tr>
|
||||
@if(Yard::instance('shopping')->getYardMargin() && Yard::instance('shopping')->getYardMargin()->net_partner_commission > 0)
|
||||
<tr>
|
||||
<td class="text-left"><em>Provision Vertriebspartern:</em></td>
|
||||
<td>
|
||||
<em>{{ Yard::instance('shopping')->getYardMargin()->getFormatted('net_partner_commission') }} €*</em>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
|
||||
<tr>
|
||||
<td class="text-left">Lieferland:</td>
|
||||
<td>{{ Yard::instance('shopping')->getShippingCountryName() }}</td>
|
||||
<td>
|
||||
{{ Yard::instance('shopping')->getShippingCountryName() }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">Versandkosten:</td>
|
||||
<td>
|
||||
{{ Yard::instance('shopping')->shippingNet() }} €
|
||||
<td class="text-left no-border-top">Versandkosten:</td>
|
||||
<td class="no-border-top">
|
||||
{{ Yard::instance('shopping')->shippingNet() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">Summe ohne MwSt:</td>
|
||||
<td>
|
||||
{{ Yard::instance('shopping')->subtotalWithShipping() }} €
|
||||
{{ Yard::instance('shopping')->subtotalWithShipping() }} €*
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left">zzgl. MwSt:</td>
|
||||
<td>{{ Yard::instance('shopping')->taxWithShipping() }} €</td>
|
||||
<td class="text-left no-border-top">zzgl. MwSt:</td>
|
||||
<td class="no-border-top">
|
||||
{{ Yard::instance('shopping')->taxWithShipping() }} €
|
||||
</td>
|
||||
</tr>
|
||||
@if(Yard::instance('shopping')->getPaymentCredit())
|
||||
<tr>
|
||||
<td class="text-left"><strong>Summe (Brutto):</strong></td>
|
||||
<td>
|
||||
<strong>{{ Yard::instance('shopping')->totalWithShippingWithoutCredit() }} €</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-left"><strong>Gesamtsumme Brutto:</strong></td>
|
||||
<td><strong>{{ Yard::instance('shopping')->totalWithShipping() }} €</strong></td>
|
||||
<td class="text-left no-border-top">aus Guthaben (Brutto):</td>
|
||||
<td class="no-border-top">
|
||||
- {{ Yard::instance('shopping')->totalfromCredit() }} €
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td class="text-left"><strong>Gesamtsumme (Brutto):</strong></td>
|
||||
<td>
|
||||
<strong>{{ Yard::instance('shopping')->totalWithShipping() }} €</strong>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2"><em>* Nettobeträge</em></td>
|
||||
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
|
@ -221,7 +289,7 @@
|
|||
<button type="submit" class="btn btn-secondary"><i class="ion ion-ios-redo"></i> bestätigen und weiter zur Kasse</button>
|
||||
</div>
|
||||
<br><br>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
<em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout weitergeletet, die Verbindung ist SSL verschlüsselt.</em>
|
||||
@endif
|
||||
|
||||
@endif
|
||||
|
|
@ -19,10 +19,10 @@
|
|||
{{ __('navigation.my_team') }}
|
||||
</h4>
|
||||
<div class="card">
|
||||
<h5 class="card-header">Berater registrieren</h5>
|
||||
<h5 class="card-header">Vertriebspartner registrieren</h5>
|
||||
<div class="row no-gutters row-bordered">
|
||||
<div class="col-md-12 p-4">
|
||||
<h6 class="mb-4">Link für Beraterregistrierung</h6>
|
||||
<h6 class="mb-4">Link für Vertriebspartnerregistrierung</h6>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-prepend">
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
<input type="text" class="form-control" name="register_link" value="{{$register_link}}" id="register_link" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<p>Du möchtest einen neuen Berater registrieren? Super, das freut uns. Sende ihm einfach nachfolgenden Link per Mail, WhatsApp oder SMS zu. Er gelangt damit auf die Registrierungsseite von partner.gruene-seele.bio. Wichtig ist, dass Du diesen Link nicht veränderst, denn die angehängte Berater-ID identifiziert Dich als Sponsor von dem neuen Berater. Nur so können Dir künftige Provisionen durch Umsätze von ihm zugeordnet werden. Nutze das „Kopier-Symbol“, um den Link gleich in Deine Zwischenablage zu kopieren.
|
||||
<p>Du möchtest einen neuen Vertriebspartner registrieren? Super, das freut uns. Sende ihm einfach nachfolgenden Link per Mail, WhatsApp oder SMS zu. Er gelangt damit auf die Registrierungsseite von partner.gruene-seele.bio. Wichtig ist, dass Du diesen Link nicht veränderst, denn die angehängte Vertriebspartner-ID identifiziert Dich als Sponsor von dem neuen Vertriebspartner. Nur so können Dir künftige Provisionen durch Umsätze von ihm zugeordnet werden. Nutze das „Kopier-Symbol“, um den Link gleich in Deine Zwischenablage zu kopieren.
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- Target -->
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<div class="media align-items-center">
|
||||
<div class="media-body">
|
||||
<h5 class="d-block text-dark">{{$user_level->name}}</h5>
|
||||
{!! $user_level->getLang('content') !!}
|
||||
{!! \App\Services\HTMLHelper::setContentReadMore($user_level->getLang('content')) !!}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@
|
|||
<br>
|
||||
<br>
|
||||
|
||||
{{-- <em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout Server weitergeletet, die Verbindung ist SSL verschlüsselt.</em> --}}
|
||||
{{-- <em class="small text-center"> <i class="fa fa-lock"></i> Du wirst auf unseren checkout weitergeletet, die Verbindung ist SSL verschlüsselt.</em> --}}
|
||||
{!! Form::close() !!}
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
|
|
|||
|
|
@ -316,7 +316,10 @@ Route::group(['middleware' => ['superadmin']], function() {
|
|||
Route::post('/admin/country/store', 'CountryController@store')->name('admin_country_store');
|
||||
|
||||
Route::get('/admin/levels', 'UserLevelController@index')->name('admin_levels');
|
||||
Route::get('/admin/level/edit/{id}', 'UserLevelController@edit')->name('admin_level_edit');
|
||||
Route::post('/admin/level/store', 'UserLevelController@store')->name('admin_level_store');
|
||||
Route::get('/admin/level/delete/{do}/{id}', 'UserLevelController@delete')->name('admin_level_delete');
|
||||
|
||||
|
||||
Route::get('/admin/settings', 'SettingController@index')->name('admin_settings');
|
||||
Route::post('/admin/setting/store', 'SettingController@store')->name('admin_setting_store');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue