Custom Price / Land / User Order Homeparty
This commit is contained in:
parent
d46824a4ac
commit
51d81d8ec6
55 changed files with 1951 additions and 681 deletions
|
|
@ -55,81 +55,75 @@ diQ860kC4h++erAa8dvB1DUG5oldYYPiEKOyyyn+tNU298QcEkLrG1JcLuUXpfTg
|
|||
8dPIr+VpGomsvpwGTfJFjlE=
|
||||
-----END PRIVATE KEY-----";
|
||||
private static $ssl_certificate_sni_crt = "-----BEGIN CERTIFICATE-----
|
||||
MIIHTTCCBjWgAwIBAgIQH4gEWhBDcY8AMLZ32r5QTzANBgkqhkiG9w0BAQsFADCB
|
||||
lTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
|
||||
A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMT0wOwYDVQQD
|
||||
EzRTZWN0aWdvIFJTQSBPcmdhbml6YXRpb24gVmFsaWRhdGlvbiBTZWN1cmUgU2Vy
|
||||
dmVyIENBMB4XDTE5MDgwODAwMDAwMFoXDTIxMDgwODIzNTk1OVowgcsxCzAJBgNV
|
||||
BAYTAkRFMQ4wDAYDVQQREwU4Nzc1NTEPMA0GA1UECBMGQmF5ZXJuMRUwEwYDVQQH
|
||||
EwxLaXJjaGhhc2xhY2gxEzARBgNVBAkTCkxlaW5mZWxkIDIxFjAUBgNVBAoTDXJp
|
||||
d2EtdGVjIGUuSy4xITAfBgNVBAsTGEF1dGhvcml6ZWQgYnkgVW5pdGVkIFNTTDEc
|
||||
MBoGA1UECxMTUHJlbWl1bVNTTCBXaWxkY2FyZDEWMBQGA1UEAwwNKi5taXZpdGEu
|
||||
Y2FyZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJU6G05MkGflX1KY
|
||||
eaj8RrA2I7RXAc5Weet+do8PYDUN4qoeYB8xNrJsdoJ+L6a59Xy956Z9jWPqtert
|
||||
EVTjpIwFsWV9mopL/fNvZ3fJFPs4FTzc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
|
||||
-----END CERTIFICATE-----";
|
||||
private static $ssl_certificate_sni_bundle = "-----BEGIN CERTIFICATE-----
|
||||
MIIGGTCCBAGgAwIBAgIQE31TnKp8MamkM3AZaIR6jTANBgkqhkiG9w0BAQwFADCB
|
||||
MIIGEzCCA/ugAwIBAgIQfVtRJrR2uhHbdBYLvFMNpzANBgkqhkiG9w0BAQwFADCB
|
||||
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
|
||||
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
|
||||
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTgx
|
||||
MTAyMDAwMDAwWhcNMzAxMjMxMjM1OTU5WjCBlTELMAkGA1UEBhMCR0IxGzAZBgNV
|
||||
MTAyMDAwMDAwWhcNMzAxMjMxMjM1OTU5WjCBjzELMAkGA1UEBhMCR0IxGzAZBgNV
|
||||
BAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEYMBYGA1UE
|
||||
ChMPU2VjdGlnbyBMaW1pdGVkMT0wOwYDVQQDEzRTZWN0aWdvIFJTQSBPcmdhbml6
|
||||
YXRpb24gVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENBMIIBIjANBgkqhkiG9w0B
|
||||
AQEFAAOCAQ8AMIIBCgKCAQEAnJMCRkVKUkiS/FeN+S3qU76zLNXYqKXsW2kDwB0Q
|
||||
9lkz3v4HSKjojHpnSvH1jcM3ZtAykffEnQRgxLVK4oOLp64m1F06XvjRFnG7ir1x
|
||||
on3IzqJgJLBSoDpFUd54k2xiYPHkVpy3O/c8Vdjf1XoxfDV/ElFw4Sy+BKzL+k/h
|
||||
fGVqwECn2XylY4QZ4ffK76q06Fha2ZnjJt+OErK43DOyNtoUHZZYQkBuCyKFHFEi
|
||||
r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cjC8azjUeqkk+B5
|
||||
yOGBQMkKW+ESPMFgKuOXwIlCypTPRpgSabuY0MLTDXJLR27lk8QyKGOHQ+SwMj4K
|
||||
00u/I5sUKUErmgQfky3xxzlIPK1aEn8=
|
||||
-----END CERTIFICATE-----
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIFgTCCBGmgAwIBAgIQOXJEOvkit1HX02wQ3TE1lTANBgkqhkiG9w0BAQwFADB7
|
||||
|
|
@ -228,117 +222,111 @@ UrRHcP8347EOn9uLFjyZrPEQ773tUVaERAZDeO0nAoGAZXMhlmKmqTrM2jSb64ja\n
|
|||
pEddcEW2LuTvwQueOKUuSSwmCydKXkcgrYZ4EHyOgvVN9JZ5ZfW6ZathFipVEKdy\n
|
||||
diQ860kC4h++erAa8dvB1DUG5oldYYPiEKOyyyn+tNU298QcEkLrG1JcLuUXpfTg\n
|
||||
8dPIr+VpGomsvpwGTfJFjlE=\n
|
||||
-----END PRIVATE KEY-----
|
||||
-----END PRIVATE KEY-----\n
|
||||
",
|
||||
"ssl_certificate_sni_crt" => "-----BEGIN CERTIFICATE-----\n
|
||||
MIIHTTCCBjWgAwIBAgIQH4gEWhBDcY8AMLZ32r5QTzANBgkqhkiG9w0BAQsFADCB\n
|
||||
lTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G\n
|
||||
A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMT0wOwYDVQQD\n
|
||||
EzRTZWN0aWdvIFJTQSBPcmdhbml6YXRpb24gVmFsaWRhdGlvbiBTZWN1cmUgU2Vy\n
|
||||
dmVyIENBMB4XDTE5MDgwODAwMDAwMFoXDTIxMDgwODIzNTk1OVowgcsxCzAJBgNV\n
|
||||
BAYTAkRFMQ4wDAYDVQQREwU4Nzc1NTEPMA0GA1UECBMGQmF5ZXJuMRUwEwYDVQQH\n
|
||||
EwxLaXJjaGhhc2xhY2gxEzARB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E0R3ZJgou7P4o9KL2yRgAaeGbbClgIhAPL86sD0GwPZ9ZsL31q07Y/S\n
|
||||
1kq5ohBt907fOisMwI0HMA0GCSqGSIb3DQEBCwUAA4IBAQAaYeV2NtUM2HkxWbfd\n
|
||||
3jVAs1PdBIYtktBpx7UwNphylqF4qlsZwV5XZxeD/K7mTW5tgNaHHrEjaOME/y1s\n
|
||||
rWTIt1D+UUmDdiSgKfVF5gfajPFVepOcb5OC+ielevvnVJn/6Tqa/RNz0GstwMnB\n
|
||||
3lBaoP7oGuBy2Ow3LG0+yO4Q0j82gIkOM15CsjY9ZK540HAXllxKGN29Yf+RDkqE\n
|
||||
zRk4TE12MEW+Ugw6RxDSUCfKmev4iUAT9vq790OESAfOKY1zg/6hIF3noH1IFt1d\n
|
||||
e0wVWz58KTXBqHsmxX3F1PUuT6NY+wRsVfnc8hR8mfJibJ0VL8wxjzScDXyHpZr/\n
|
||||
o3I7\n
|
||||
-----END CERTIFICATE-----
|
||||
",
|
||||
"ssl_certificate_sni_bundle" => "-----BEGIN CERTIFICATE-----\n
|
||||
MIIGGTCCBAGgAwIBAgIQE31TnKp8MamkM3AZaIR6jTANBgkqhkiG9w0BAQwFADCB\n
|
||||
MIIGEzCCA/ugAwIBAgIQfVtRJrR2uhHbdBYLvFMNpzANBgkqhkiG9w0BAQwFADCB\n
|
||||
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl\n
|
||||
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV\n
|
||||
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTgx\n
|
||||
MTAyMDAwMDAwWhcNMzAxMjMxMjM1OTU5WjCBlTELMAkGA1UEBhMCR0IxGzAZBgNV\n
|
||||
MTAyMDAwMDAwWhcNMzAxMjMxMjM1OTU5WjCBjzELMAkGA1UEBhM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L17e8vgg8CAwEAAaOB8jCB7zAfBgNVHSMEGDAWgBSg\n
|
||||
EQojPpbxB+zirynvgqV/0DCktDAdBgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rID\n
|
||||
ZsswDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0gBAowCDAG\n
|
||||
BgRVHSAAMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29t\n
|
||||
L0FBQUNlcnRpZmljYXRlU2VydmljZXMuY3JsMDQGCCsGAQUFBwEBBCgwJjAkBggr\n
|
||||
BgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMA0GCSqGSIb3DQEBDAUA\n
|
||||
A4IBAQAYh1HcdCE9nIrgJ7cz0C7M7PDmy14R3iJvm3WOnnL+5Nb+qh+cli3vA0p+\n
|
||||
rvSNb3I8QzvAP+u431yqqcau8vzY7qN7Q/aGNnwU4M309z/+3ri0ivCRlv79Q2R+\n
|
||||
/czSAaF9ffgZGclCKxO/WIu6pKJmBHaIkU4MiRTOok3JMrO66BQavHHxW/BBC5gA\n
|
||||
CiIDEOUMsfnNkjcZ7Tvx5Dq2+UUTJnWvu6rvP3t3O9LEApE9GQDTF1w52z97GA1F\n
|
||||
zZOFli9d31kWTz9RvdVFGD/tSo7oBmF0Ixa1DVBzJ0RHfxBdiSprhTEUxOipakyA\n
|
||||
vGp4z7h/jnZymQyd/teRCBaho1+V\n
|
||||
-----END CERTIFICATE-----
|
||||
",
|
||||
"ssl_certificate_sni_chainfile" => null,
|
||||
|
|
|
|||
|
|
@ -43,11 +43,10 @@ class MembershipController extends Controller
|
|||
$userHistoryUpgradeOrder = UserHistory::whereUserId($user->id)->whereAction('upgrade_order')->get()->last();
|
||||
$userHistoryDeleteMembership = UserHistory::whereUserId($user->id)->whereAction('delete_membership')->whereStatus(50)->get()->last();
|
||||
|
||||
|
||||
$data = [
|
||||
'user' => $user,
|
||||
'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(),
|
||||
'upgrade' => Product::where('active', true)->where('show_at', '=', 4)->where('identifier', 'upgrade')->get(),
|
||||
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
|
||||
'upgrade' => Product::where('active', true)->whereJsonContains('show_on', '5')->where('identifier', 'upgrade')->get(),
|
||||
'diff_months' => $diff_months,
|
||||
'userHistoryPaymentOrder' => $userHistoryPaymentOrder,
|
||||
'userHistoryUpgradeOrder' => $userHistoryUpgradeOrder,
|
||||
|
|
@ -91,7 +90,7 @@ class MembershipController extends Controller
|
|||
$user->abo_options = true;
|
||||
$user->save();
|
||||
}
|
||||
if($product && $product->active && $product->show_at >= 3){
|
||||
if($product && $product->active){
|
||||
$image = "";
|
||||
if($product->images->count()){
|
||||
$image = $product->images->first()->slug;
|
||||
|
|
@ -136,7 +135,7 @@ class MembershipController extends Controller
|
|||
\Session()->flash('alert-success', "keine Änderung vorgenommen.");
|
||||
return back();
|
||||
}
|
||||
if($product && $product->active && $product->show_at >= 3){
|
||||
if($product && $product->active){
|
||||
$user->payment_order_id = $product->id;
|
||||
$user->save();
|
||||
UserHistory::create(['user_id' => $user->id, 'action'=>$action, 'status'=>10, 'product_id'=>$product->id]);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class PaymentMethodController extends Controller
|
|||
'name' => $data['name'],
|
||||
'short' => $data['short'],
|
||||
'pos' => $data['pos'],
|
||||
'show_at' => $data['show_at'],
|
||||
'show_on' => isset($data['show_on']) ? $data['show_on'] : null,
|
||||
'default' => isset($data['default']) ? true : false,
|
||||
'active' => isset($data['active']) ? true : false,
|
||||
]);
|
||||
|
|
@ -44,7 +44,7 @@ class PaymentMethodController extends Controller
|
|||
$model->name = $data['name'];
|
||||
$model->short = $data['short'];
|
||||
$model->pos = $data['pos'];
|
||||
$model->show_at = $data['show_at'];
|
||||
$model->show_on = isset($data['show_on']) ? $data['show_on'] : null;
|
||||
$model->default = isset($data['default']) ? true : false;
|
||||
$model->active = isset($data['active']) ? true : false;
|
||||
$model->save();
|
||||
|
|
|
|||
|
|
@ -115,14 +115,21 @@ class AdminToolsController extends Controller
|
|||
$user_shops = UserShop::all();
|
||||
$text = "";
|
||||
|
||||
$kas = new KasController();
|
||||
/* $kas = new KasController();
|
||||
$domain = 'mivita.care';
|
||||
|
||||
$ssl = KasSLLController::getApiSSLParameter();
|
||||
|
||||
$subdomains = $kas->action('get_subdomains');
|
||||
foreach ($subdomains as $subdomain){
|
||||
$text .= $subdomain['subdomain_name']." - ".$subdomain['ssl_certificate_sni']."\n";
|
||||
/*if($subdomain['subdomain_name'] === 'bio-aloe.mivita.care'){
|
||||
dump($subdomain);
|
||||
}
|
||||
if($subdomain['subdomain_name'] === 'rockmyworld-by-conny.mivita.care'){
|
||||
dd($subdomain);
|
||||
}*/
|
||||
/*
|
||||
$text .= $subdomain['subdomain_name']." - ".$subdomain['ssl_certificate_sni']." - ";
|
||||
|
||||
if($subdomain['ssl_certificate_sni'] !== "Y"){
|
||||
$pra = array(
|
||||
|
|
@ -130,9 +137,18 @@ class AdminToolsController extends Controller
|
|||
);
|
||||
$pra = array_merge($pra, $ssl);
|
||||
$value = $kas->action('update_ssl', $pra);
|
||||
$text .= $value."\n";
|
||||
$text .= $value;
|
||||
}else{
|
||||
if(isset($subdomain['ssl_certificate_sni_is_active'])){
|
||||
$text .= $subdomain['ssl_certificate_sni_is_active'].'-is_active';
|
||||
}else{
|
||||
$text .= '-CHECK!';
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$text .= "\n";
|
||||
}*/
|
||||
$data = [
|
||||
'values' => $user_shops,
|
||||
'text' => $text,
|
||||
|
|
|
|||
|
|
@ -2,25 +2,22 @@
|
|||
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Homeparty;
|
||||
use App\Models\HomepartyUser;
|
||||
use App\Models\HomepartyUserOrderItem;
|
||||
use App\Models\Product;
|
||||
use App\Models\ShippingCountry;
|
||||
use App\Models\ShoppingInstance;
|
||||
use App\Models\ShoppingOrder;
|
||||
use App\Models\ShoppingUser;
|
||||
use App\Models\UserHistory;
|
||||
use App\Models\UserShop;
|
||||
use App\Services\HomepartyCart;
|
||||
use App\Services\Payment;
|
||||
use App\Services\Util;
|
||||
use App\User;
|
||||
use Auth;
|
||||
use Request;
|
||||
use Validator;
|
||||
use Yard;
|
||||
use Request;
|
||||
use App\User;
|
||||
use Validator;
|
||||
use App\Services\Util;
|
||||
use App\Models\Product;
|
||||
use App\Models\Homeparty;
|
||||
use App\Models\UserHistory;
|
||||
use App\Models\HomepartyUser;
|
||||
use App\Services\UserService;
|
||||
use App\Models\ShippingCountry;
|
||||
use App\Services\HomepartyCart;
|
||||
use App\Models\ShoppingInstance;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\HomepartyUserOrderItem;
|
||||
|
||||
|
||||
class HomepartyController extends Controller
|
||||
|
|
@ -34,18 +31,28 @@ class HomepartyController extends Controller
|
|||
public function index()
|
||||
{
|
||||
$data = [
|
||||
'homepartys' => Homeparty::where('auth_user_id', '=', \Auth::user()->id)->get(),
|
||||
'homepartys' => Homeparty::where('auth_user_id', '=', \Auth::user()->id)->orderByDesc('id')->get(),
|
||||
];
|
||||
return view('user.homeparty.index', $data);
|
||||
}
|
||||
|
||||
public function detail($id)
|
||||
public function detail($id, $step = false)
|
||||
{
|
||||
if($id === 'new'){
|
||||
$homeparty = new Homeparty();
|
||||
$homeparty->id = 0;
|
||||
$step = 1;
|
||||
$homeparty->description = "Willkommen zu unserer Auszeitparty rund um das Thema Bio Aloe Vera und Naturkosmetik. Wir informieren Dich darüber, was Premiumqualität bei Naturkosmetik wirklich ausmacht, zeigen Dir viele Anwendungsbeispiele bei Haut- und Darmproblemen und natürlich kannst Du unsere Produkte ausgiebig testen. Wir freuen uns auf Dich!";
|
||||
}else{
|
||||
$homeparty = $this->getHomparty($id);
|
||||
if($homeparty->step < 10){
|
||||
$step = $homeparty->step;
|
||||
}else{
|
||||
if(!$step){
|
||||
$step = 10;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if($homeparty->homeparty_host){
|
||||
$homeparty_user = $homeparty->homeparty_host;
|
||||
|
|
@ -61,22 +68,43 @@ class HomepartyController extends Controller
|
|||
$data = [
|
||||
'homeparty' => $homeparty,
|
||||
'homeparty_user' => $homeparty_user,
|
||||
'step' => $step,
|
||||
|
||||
];
|
||||
return view('user.homeparty.detail', $data);
|
||||
}
|
||||
|
||||
public function store($id = null)
|
||||
public function store($id = null, $step = false)
|
||||
{
|
||||
$data = Request::all();
|
||||
if($data['action'] === 'homeparty-party-store'){
|
||||
if($data['action'] === 'homeparty-party-store-detail'){
|
||||
$rules = array(
|
||||
'date' => 'required',
|
||||
'name' => 'required',
|
||||
'place' => 'required'
|
||||
'place' => 'required',
|
||||
);
|
||||
if(!$id){
|
||||
$rules = array(
|
||||
'date' => 'required',
|
||||
'name' => 'required',
|
||||
'place' => 'required',
|
||||
'country_id' => 'required'
|
||||
);
|
||||
}
|
||||
}
|
||||
if($data['action'] === 'homeparty-party-store-address'){
|
||||
$rules = array(
|
||||
'shipping_firstname' => 'required',
|
||||
'shipping_lastname' => 'required',
|
||||
'shipping_address' => 'required',
|
||||
'shipping_zipcode' => 'required',
|
||||
'shipping_city' => 'required',
|
||||
'shipping_salutation' => 'required',
|
||||
'shipping_country_id' => 'required'
|
||||
);
|
||||
}
|
||||
if($data['action'] === 'homeparty-user-store'){
|
||||
|
||||
if($data['action'] === 'homeparty-party-store-host'){
|
||||
$rules = array(
|
||||
'billing_salutation' => 'required',
|
||||
'billing_firstname' => 'required',
|
||||
|
|
@ -86,25 +114,13 @@ class HomepartyController extends Controller
|
|||
'billing_city' => 'required',
|
||||
'billing_country_id' => 'required',
|
||||
);
|
||||
if (!Request::get('same_as_billing')) {
|
||||
$rules = array_merge($rules, [
|
||||
'shipping_firstname' => 'required',
|
||||
'shipping_lastname' => 'required',
|
||||
'shipping_address' => 'required',
|
||||
'shipping_zipcode' => 'required',
|
||||
'shipping_city' => 'required',
|
||||
'shipping_salutation' => 'required',
|
||||
'shipping_country_id' => 'required'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
$validator = Validator::make(Request::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
return back()->withErrors($validator)->withInput(Request::all());
|
||||
}
|
||||
|
||||
if($data['action'] === 'homeparty-party-store'){
|
||||
|
||||
if($data['action'] === 'homeparty-party-store-detail'){
|
||||
if(!$id){
|
||||
//first save create and empty user/host
|
||||
do {
|
||||
|
|
@ -112,29 +128,51 @@ class HomepartyController extends Controller
|
|||
} while( Homeparty::where('token', $token)->count() );
|
||||
$data['token'] = $token;
|
||||
$data['auth_user_id'] = \Auth::user()->id;
|
||||
$data['step'] = 2;
|
||||
$step = 2;
|
||||
$homeparty = Homeparty::create($data);
|
||||
|
||||
$homeparty_user = HomepartyUser::create([
|
||||
'homeparty_id' => $homeparty->id,
|
||||
'auth_user_id' => \Auth::user()->id,
|
||||
'shipping_country_id' => $homeparty->country_id,
|
||||
'billing_country_id' => $homeparty->country_id,
|
||||
'same_as_billing' => false,
|
||||
'is_host' => true,
|
||||
]);
|
||||
}else {
|
||||
$homeparty = $this->getHomparty($id);
|
||||
$homeparty->fill($data)->save();
|
||||
$step = 10;
|
||||
}
|
||||
}
|
||||
if($data['action'] === 'homeparty-party-store-address'){
|
||||
$homeparty = $this->getHomparty($id);
|
||||
$homeparty_user = $homeparty->homeparty_host;
|
||||
$homeparty_user->fill($data)->save();
|
||||
if($homeparty->step === 2){
|
||||
$homeparty->step = 3;
|
||||
$homeparty->save();
|
||||
$step = 3;
|
||||
}else{
|
||||
$step = 12;
|
||||
}
|
||||
}
|
||||
|
||||
if($data['action'] === 'homeparty-user-store'){
|
||||
if($data['action'] === 'homeparty-party-store-host'){
|
||||
$homeparty = $this->getHomparty($id);
|
||||
$data['same_as_billing'] = isset($data['same_as_billing']) ? true : false;
|
||||
$data['shipping_country_id'] = isset($data['shipping_country_id']) ? $data['shipping_country_id'] : $data['billing_country_id'];
|
||||
$homeparty_user = $homeparty->homeparty_host;
|
||||
$homeparty_user->fill($data)->save();
|
||||
if($homeparty->step === 3){
|
||||
$homeparty->step = 10;
|
||||
$homeparty->save();
|
||||
$step = 10;
|
||||
}else{
|
||||
$step = 13;
|
||||
}
|
||||
}
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('user_homeparty_detail', $homeparty->id));
|
||||
return redirect(route('user_homeparty_detail', [$homeparty->id, $step]));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -154,6 +192,8 @@ class HomepartyController extends Controller
|
|||
if($gid === 'new'){
|
||||
$homeparty_user = new HomepartyUser();
|
||||
$homeparty_user->same_as_billing = true;
|
||||
$homeparty_user->billing_country_id = $homeparty->country_id;
|
||||
$homeparty_user->shipping_country_id = $homeparty->country_id;
|
||||
}else{
|
||||
$homeparty_user = HomepartyUser::findOrFail($gid);
|
||||
if($homeparty->id !== $homeparty_user->homeparty_id){
|
||||
|
|
@ -222,9 +262,20 @@ class HomepartyController extends Controller
|
|||
public function order($id = null)
|
||||
{
|
||||
$user = User::find(Auth::user()->id);
|
||||
|
||||
$homeparty = $this->getHomparty($id);
|
||||
$shipping_country_id = $this->checkShoppingCountry($homeparty->country_id);
|
||||
if(!$shipping_country_id){
|
||||
\Session()->flash('custom-error', __('validation.custom.shipping_not_found'));
|
||||
return redirect(route('user_homepartys'));
|
||||
}
|
||||
UserService::checkUserTaxShippingCountry($user, $shipping_country_id);
|
||||
if($this->userChangeCountry($homeparty)){
|
||||
\Session()->flash('custom-error', 'Das Rechnungsland wurde geändert und der Warenkrob zurückgesetzt.');
|
||||
return redirect(route('user_homeparty_order', [$homeparty->id]));
|
||||
}
|
||||
HomepartyCart::calculateHomeparty($homeparty);
|
||||
$homeparty->card_info = UserService::getYardInfo();
|
||||
$homeparty->save();
|
||||
$userHistoryPaymentOrder = UserHistory::whereUserId($user->id)->whereAction('payment_homeparty')->where('referenz', $homeparty->id)->get()->last();
|
||||
$data = [
|
||||
'homeparty' => $homeparty,
|
||||
|
|
@ -232,10 +283,34 @@ class HomepartyController extends Controller
|
|||
];
|
||||
return view('user.homeparty.order', $data);
|
||||
}
|
||||
|
||||
private function userChangeCountry($homeparty){
|
||||
if(isset($homeparty->card_info['user_country_id'])){
|
||||
if($homeparty->card_info['user_country_id'] !== UserService::$user_country->id){
|
||||
// es wurde schon eine order angelegt, aber das Rechungsland geändert
|
||||
if($homeparty->homeparty_order_items->count()){
|
||||
foreach($homeparty->homeparty_order_items as $homeparty_order_item){
|
||||
$homeparty_order_item->delete();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private function checkShoppingCountry($country_id){
|
||||
if($country_id){
|
||||
if($shipping_country = ShippingCountry::whereCountryId($country_id)->first()){
|
||||
return $shipping_country->id;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//perform Request
|
||||
public function orderStore($id = null)
|
||||
{
|
||||
|
||||
$homeparty = $this->getHomparty($id);
|
||||
|
||||
if(Request::ajax()) {
|
||||
|
|
@ -257,20 +332,37 @@ class HomepartyController extends Controller
|
|||
$HomepartyUserOrderItem->qty = $HomepartyUserOrderItem->qty+1;
|
||||
$HomepartyUserOrderItem->save();
|
||||
}else{
|
||||
$HomepartyUserOrderItem = HomepartyUserOrderItem::create([
|
||||
'homeparty_id' => $homeparty->id,
|
||||
'homeparty_user_id' => $homeparty_user->id,
|
||||
'product_id' => $product->id,
|
||||
'qty' => 1,
|
||||
'price' => $product->price,
|
||||
'price_net' => $product->getPriceWith(true, false),
|
||||
'tax_rate' => $product->tax,
|
||||
'points' => $product->points,
|
||||
'margin' => $margin,
|
||||
'ek-price' => $product->getPriceWith(false, true),
|
||||
'ek-price_net' => $product->getPriceWith(true, true),
|
||||
'slug' => $product->slug
|
||||
]);
|
||||
if($homeparty->getCardInfo('user_tax_free')){
|
||||
$HomepartyUserOrderItem = HomepartyUserOrderItem::create([
|
||||
'homeparty_id' => $homeparty->id,
|
||||
'homeparty_user_id' => $homeparty_user->id,
|
||||
'product_id' => $product->id,
|
||||
'qty' => 1,
|
||||
'price' => $product->getPriceWith(true, false, $homeparty->getUserCountry()),
|
||||
'price_net' => $product->getPriceWith(true, false, $homeparty->getUserCountry()),
|
||||
'tax_rate' => 0,
|
||||
'points' => $product->points,
|
||||
'margin' => $margin,
|
||||
'ek-price' => $product->getPriceWith(true, true, $homeparty->getUserCountry()),
|
||||
'ek-price_net' => $product->getPriceWith(true, true, $homeparty->getUserCountry()),
|
||||
'slug' => $product->slug
|
||||
]);
|
||||
}else{
|
||||
$HomepartyUserOrderItem = HomepartyUserOrderItem::create([
|
||||
'homeparty_id' => $homeparty->id,
|
||||
'homeparty_user_id' => $homeparty_user->id,
|
||||
'product_id' => $product->id,
|
||||
'qty' => 1,
|
||||
'price' => $product->getPriceWith(false, false, $homeparty->getUserCountry()),
|
||||
'price_net' => $product->getPriceWith(true, false, $homeparty->getUserCountry()),
|
||||
'tax_rate' => $product->getTaxWith($homeparty->getUserCountry()),
|
||||
'points' => $product->points,
|
||||
'margin' => $margin,
|
||||
'ek-price' => $product->getPriceWith(false, true, $homeparty->getUserCountry()),
|
||||
'ek-price_net' => $product->getPriceWith(true, true, $homeparty->getUserCountry()),
|
||||
'slug' => $product->slug
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -280,7 +372,7 @@ class HomepartyController extends Controller
|
|||
HomepartyCart::calculateHomeparty($homeparty);
|
||||
$html_user_cart = view("user.homeparty.show_products_order", ['homeparty' => $homeparty, 'homeparty_guest' => $homeparty_user])->render();
|
||||
$html_bonus = view("user.homeparty.show_bonus", ['homeparty' => $homeparty])->render();
|
||||
$html_host_bonus = view("user.homeparty.show_calc_bonus_host")->render();
|
||||
$html_host_bonus = view("user.homeparty.show_calc_bonus_host", ['homeparty' => $homeparty])->render();
|
||||
$html_total = view("user.homeparty.show_total_order", ['homeparty' => $homeparty])->render();
|
||||
return response()->json(['response' => true, 'data'=>$data, 'html_user_cart'=>$html_user_cart, 'html_bonus'=>$html_bonus, 'html_host_bonus'=>$html_host_bonus, 'html_total'=>$html_total]);
|
||||
}
|
||||
|
|
@ -458,18 +550,24 @@ class HomepartyController extends Controller
|
|||
return $homeparty;
|
||||
}
|
||||
|
||||
public function datatable(){
|
||||
$query = Product::select('products.*')->where('active', true)->where(function ($q) {
|
||||
$q->where('show_at', '=', 0)
|
||||
->orWhere('show_at', '=', 1);
|
||||
});
|
||||
public function datatable($homeparty_id){
|
||||
|
||||
$query = Product::select('products.*')->where('active', true)->whereJsonContains('show_on', '3');
|
||||
$homeparty = Homeparty::findOrFail($homeparty_id);
|
||||
|
||||
return \DataTables::eloquent($query)
|
||||
|
||||
->addColumn('add_card', function (Product $product) {
|
||||
return '<button type="button" class="btn btn-sm btn-md-extra btn-secondary add-product-basket" data-product-id="'.$product->id.'">
|
||||
<strong>€ '.$product->getFormattedPriceWith(false, false).'</strong> +<span class="ion ion-md-cart"></span>
|
||||
</button>';
|
||||
->addColumn('add_card', function (Product $product) use ($homeparty) {
|
||||
if($homeparty->getCardInfo('user_tax_free')){
|
||||
return '<button type="button" class="btn btn-sm btn-md-extra btn-secondary add-product-basket" data-product-id="'.$product->id.'">
|
||||
<strong>€ '.$product->getFormattedPriceWith(true, false, $homeparty->getUserCountry()).'</strong> +<span class="ion ion-md-cart"></span>
|
||||
</button>';
|
||||
}else{
|
||||
return '<button type="button" class="btn btn-sm btn-md-extra btn-secondary add-product-basket" data-product-id="'.$product->id.'">
|
||||
<strong>€ '.$product->getFormattedPriceWith(false, false, $homeparty->getUserCountry()).'</strong> +<span class="ion ion-md-cart"></span>
|
||||
</button>';
|
||||
}
|
||||
|
||||
})
|
||||
->addColumn('picture', function (Product $product) {
|
||||
if(count($product->images)){
|
||||
|
|
@ -477,14 +575,28 @@ class HomepartyController extends Controller
|
|||
}
|
||||
return "";
|
||||
})
|
||||
->addColumn('price_net', function (Product $product) {
|
||||
return $product->getFormattedPriceWith(true, true). " €";
|
||||
/*->addColumn('price_net', function (Product $product) use ($homeparty) {
|
||||
return '<span class="no-line-break">'.$product->getFormattedPriceWith(true, true, $homeparty->getUserCountry()). " €</span>".
|
||||
'<span class="no-line-break">'.$product->getFormattedPriceCurrencyWith(true, true, $homeparty->getUserCountry()).'</span>';
|
||||
})
|
||||
->addColumn('price_gross', function (Product $product) {
|
||||
return $product->getFormattedPriceWith(false, true). " €";
|
||||
*/
|
||||
->addColumn('price_gross', function (Product $product) use ($homeparty) {
|
||||
if($homeparty->getCardInfo('user_tax_free')){
|
||||
return '<span class="no-line-break">'.$product->getFormattedPriceWith(true, true, $homeparty->getUserCountry()). " €</span>".
|
||||
'<span class="no-line-break">'.$product->getFormattedPriceCurrencyWith(true, true, $homeparty->getUserCountry()).'</span>';
|
||||
}else{
|
||||
return '<span class="no-line-break">'.$product->getFormattedPriceWith(false, true, $homeparty->getUserCountry()). " €</span>".
|
||||
'<span class="no-line-break">'.$product->getFormattedPriceCurrencyWith(false, true, $homeparty->getUserCountry()).'</span>';
|
||||
}
|
||||
})
|
||||
->addColumn('price_vk_gross', function (Product $product) {
|
||||
return $product->getFormattedPriceWith(false, false). " €";
|
||||
->addColumn('price_vk_gross', function (Product $product) use ($homeparty) {
|
||||
if($homeparty->getCardInfo('user_tax_free')){
|
||||
return '<span class="no-line-break">'.$product->getFormattedPriceWith(true, false, $homeparty->getUserCountry()). " €</span>".
|
||||
'<span class="no-line-break">'.$product->getFormattedPriceCurrencyWith(true, false, $homeparty->getUserCountry()).'</span>';
|
||||
}else{
|
||||
return '<span class="no-line-break">'.$product->getFormattedPriceWith(false, false, $homeparty->getUserCountry()). " €</span>".
|
||||
'<span class="no-line-break">'.$product->getFormattedPriceCurrencyWith(false, false, $homeparty->getUserCountry()).'</span>';
|
||||
}
|
||||
})
|
||||
->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"
|
||||
|
|
@ -506,7 +618,7 @@ class HomepartyController extends Controller
|
|||
->orderColumn('contents_total', 'contents_total $1')
|
||||
->orderColumn('weight', 'weight $1')
|
||||
|
||||
->rawColumns(['add_card', 'product', 'quantity', 'picture', 'action'])
|
||||
->rawColumns(['add_card', 'product', 'quantity', 'picture', 'price_net', 'price_gross', 'price_vk_gross', 'action'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ use App\Models\ShoppingUser;
|
|||
use App\Models\UserHistory;
|
||||
use App\Models\UserShop;
|
||||
use App\Services\Payment;
|
||||
use App\Services\UserService;
|
||||
use App\Services\Util;
|
||||
use App\User;
|
||||
use Auth;
|
||||
|
|
@ -102,7 +103,6 @@ class OrderController extends Controller
|
|||
public function delivery($for, $id=null)
|
||||
{
|
||||
$user = User::find(\Auth::user()->id);
|
||||
|
||||
$shopping_user = null;
|
||||
$delivery_id = null;
|
||||
if($for === 'ot'){
|
||||
|
|
@ -134,10 +134,10 @@ class OrderController extends Controller
|
|||
|
||||
public function list($for, $id=null)
|
||||
{
|
||||
|
||||
$user = User::find(\Auth::user()->id);
|
||||
$shopping_user = null;
|
||||
$delivery_id = null;
|
||||
|
||||
if($for === 'ot'){
|
||||
$shopping_user = $this->checkShoppingUser($id, $user);
|
||||
$delivery_id = $shopping_user->id;
|
||||
|
|
@ -147,8 +147,10 @@ class OrderController extends Controller
|
|||
\Session()->flash('custom-error', __('validation.custom.shipping_not_found'));
|
||||
return redirect(route('user_order_my_delivery', [$for, $delivery_id]));
|
||||
}
|
||||
|
||||
UserService::checkUserTaxShippingCountry($user, $shipping_country_id);
|
||||
Yard::instance('shopping')->setShippingCountryWithPrice($shipping_country_id, $for);
|
||||
Yard::instance('shopping')->setUserPriceInfos(UserService::getYardInfo());
|
||||
|
||||
|
||||
$data = [
|
||||
'shopping_user' => $shopping_user,
|
||||
|
|
@ -202,6 +204,7 @@ class OrderController extends Controller
|
|||
$data['is_from'] = 'user_order';
|
||||
$data['is_for'] = $for;
|
||||
$data['shopping_user_id'] = $id;
|
||||
$data['user_price_infos'] = Yard::instance('shopping')->getUserPriceInfos();
|
||||
unset($data['quantity']);
|
||||
unset($data['_token']);
|
||||
|
||||
|
|
@ -232,7 +235,7 @@ class OrderController extends Controller
|
|||
$country_id = null;
|
||||
if($for === 'me'){
|
||||
$user = User::find(\Auth::user()->id);
|
||||
if($user->same_as_billing){
|
||||
if($user->account->same_as_billing){
|
||||
$country_id = $user->account->country_id;
|
||||
}else{
|
||||
$country_id = $user->account->shipping_country_id;
|
||||
|
|
@ -246,7 +249,6 @@ class OrderController extends Controller
|
|||
$country_id = $shopping_user->shipping_country_id;
|
||||
}
|
||||
}
|
||||
|
||||
if($country_id){
|
||||
if($shipping_country = ShippingCountry::whereCountryId($country_id)->first()){
|
||||
return $shipping_country->id;
|
||||
|
|
@ -272,50 +274,28 @@ class OrderController extends Controller
|
|||
|
||||
public function datatable(){
|
||||
|
||||
$show_at = 1;
|
||||
|
||||
// $user = User::find(\Auth::user()->id);
|
||||
;
|
||||
|
||||
if(Request::get('shipping_is_for') === 'me'){
|
||||
$query = Product::select('products.*')->where('active', true)->where(function ($q) {
|
||||
$q->where('show_at', '=', 1)
|
||||
->orWhere('show_at', '=', 2)
|
||||
->orWhere('show_at', '=', 6);
|
||||
|
||||
});
|
||||
|
||||
$query = Product::select('products.*')->where('active', true)->whereJsonContains('show_on', '2');
|
||||
}else{
|
||||
$query = Product::select('products.*')->where('active', true)->where(function ($q) {
|
||||
$q->where('show_at', '=', 0)
|
||||
->orWhere('show_at', '=', 1);
|
||||
});
|
||||
|
||||
$query = Product::select('products.*')->where('active', true)->whereJsonContains('show_on', '1');
|
||||
}
|
||||
|
||||
|
||||
//Kunden und Berater
|
||||
//->orWhere('show_at', '=', 2); // Nur Berater
|
||||
//->orderBy('pos', 'DESC')
|
||||
//->orderBy('id', 'DESC');
|
||||
|
||||
return \DataTables::eloquent($query)
|
||||
|
||||
->addColumn('product', function (Product $product) {
|
||||
|
||||
$cartItem = Yard::instance('shopping')->getCartItemByProduct($product->id);
|
||||
$qty = isset($cartItem->qty) ? $cartItem->qty : 0;
|
||||
$rowId = isset($cartItem->rowId) ? $cartItem->rowId : '';
|
||||
return '<strong>'.$product->name.'</strong><br><div class="no-line-break input-group-min-w">
|
||||
<div class="input-group d-inline-flex w-auto">
|
||||
<span class="input-group-prepend">
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra remove-product-basket" data-row-id="'.$rowId.'" data-product-id="'.$product->id.'">-</button>
|
||||
</span>
|
||||
<input type="text" class="form-control text-center input-extra table-input-event-onchange" name="product_qty_'.$product->id.'" data-row-id="'.$rowId.'" data-product-id="'.$product->id.'" value="'.$qty.'">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra add-product-basket" data-row-id="'.$rowId.'" data-product-id="'.$product->id.'">+</button>
|
||||
</span>
|
||||
</div>
|
||||
return '<strong>'.$product->name.'</strong><br>
|
||||
<div class="no-line-break input-group-min-w">
|
||||
<div class="input-group d-inline-flex w-auto">
|
||||
<span class="input-group-prepend">
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra remove-product-basket" data-row-id="'.$rowId.'" data-product-id="'.$product->id.'">-</button>
|
||||
</span>
|
||||
<input type="text" class="form-control text-center input-extra table-input-event-onchange" name="product_qty_'.$product->id.'" data-row-id="'.$rowId.'" data-product-id="'.$product->id.'" value="'.$qty.'">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-secondary icon-btn md-btn-extra add-product-basket" data-row-id="'.$rowId.'" data-product-id="'.$product->id.'">+</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>';
|
||||
})
|
||||
/*
|
||||
|
|
@ -349,13 +329,13 @@ class OrderController extends Controller
|
|||
return "";
|
||||
})
|
||||
->addColumn('price_net', function (Product $product) {
|
||||
return $product->getFormattedPriceWith(true, true). " €";
|
||||
return '<span class="no-line-break">'.$product->getFormattedPriceWith(true, true, Yard::instance('shopping')->getUserCountry()). " €</span>".'<span class="no-line-break">'.$product->getFormattedPriceCurrencyWith(true, true, Yard::instance('shopping')->getUserCountry()).'</span>';
|
||||
})
|
||||
->addColumn('price_gross', function (Product $product) {
|
||||
return $product->getFormattedPriceWith(false, true). " €";
|
||||
return '<span class="no-line-break">'.$product->getFormattedPriceWith(false, true, Yard::instance('shopping')->getUserCountry()). " €</span>".'<span class="no-line-break">'.$product->getFormattedPriceCurrencyWith(false, true, Yard::instance('shopping')->getUserCountry()).'</span>';
|
||||
})
|
||||
->addColumn('price_vk_gross', function (Product $product) {
|
||||
return $product->getFormattedPriceWith(false, false). " €";
|
||||
return '<span class="no-line-break">'.$product->getFormattedPriceWith(false, false, Yard::instance('shopping')->getUserCountry()). " €</span>".'<span class="no-line-break">'.$product->getFormattedPriceCurrencyWith(false, false, Yard::instance('shopping')->getUserCountry()).'</span>';
|
||||
})
|
||||
->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"
|
||||
|
|
@ -377,7 +357,7 @@ class OrderController extends Controller
|
|||
->orderColumn('contents_total', 'contents_total $1')
|
||||
->orderColumn('weight', 'weight $1')
|
||||
|
||||
->rawColumns(['add_card', 'product', 'quantity', 'picture', 'action'])
|
||||
->rawColumns(['add_card', 'price_net', 'price_gross', 'price_vk_gross', 'product', 'quantity', 'picture', 'action'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
|
@ -398,8 +378,8 @@ class OrderController extends Controller
|
|||
}
|
||||
|
||||
//get the card item
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(false, true), ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points]);
|
||||
Yard::setTax($cartItem->rowId, $product->tax);
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), 1, $product->getPriceWith(false, true, Yard::instance('shopping')->getUserCountry()), ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points]);
|
||||
Yard::setTax($cartItem->rowId, $product->getTaxWith(Yard::instance('shopping')->getUserCountry()));
|
||||
|
||||
if(isset($data['qty']) && $data['qty'] > 0){
|
||||
Yard::instance('shopping')->update($cartItem->rowId, $data['qty']);
|
||||
|
|
@ -485,7 +465,7 @@ 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 Product::whereActive(true)->whereJsonContains('show_on', ['1', '2', '3'])->where('shipping_addon', true)->orderBy('pos', 'DESC')->get();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,14 +76,14 @@ class UserDataController extends Controller
|
|||
if(isset($data['reverse_charge_delete'])){
|
||||
$user->account->tax_identification_number = '';
|
||||
$user->account->reverse_charge = 0;
|
||||
$user->account->reverse_charge_code = null;
|
||||
$user->account->reverse_charge_valid = null;
|
||||
$user->account->save();
|
||||
\Session()->flash('alert-success', 'Reverse Charge Verfahren und UST-ID gelöscht.');
|
||||
return redirect('/user/edit');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$rules = array(
|
||||
'salutation' => 'required',
|
||||
'first_name'=>'required',
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ class HomepartyController extends Controller
|
|||
if($gid === 'new'){
|
||||
$homeparty_user = new HomepartyUser();
|
||||
$homeparty_user->same_as_billing = true;
|
||||
$homeparty_user->billing_country_id = $homeparty->country_id;
|
||||
$homeparty_user->shipping_country_id = $homeparty->country_id;
|
||||
|
||||
}else{
|
||||
//no edit
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ class SiteController extends Controller
|
|||
$set_products = ['aloe-vera-koerper-set', 'baby-set', 'aloe-vera-gel-set'];
|
||||
|
||||
$data = [
|
||||
'products' => Product::whereIn('slug', $products)->where('active', true)->where('show_at', '<=', 1)->get(),
|
||||
'set_products' => Product::whereIn('slug', $set_products)->where('active', true)->where('show_at', '<=', 1)->get(),
|
||||
'products' => Product::whereIn('slug', $products)->where('active', true)->whereJsonContains('show_on', '1')->get(),
|
||||
'set_products' => Product::whereIn('slug', $set_products)->where('active', true)->whereJsonContains('show_on', '1')->get(),
|
||||
'user_shop' => Util::getUserShop(),
|
||||
'site' => IqSite::find(1),
|
||||
];
|
||||
|
|
@ -47,7 +47,7 @@ class SiteController extends Controller
|
|||
if($product_slug){
|
||||
|
||||
$category = Category::where('slug', $subsite)->where('active', true)->first();
|
||||
$product = Product::where('slug', $product_slug)->where('active', true)->where('show_at', '<=', 1)->first();
|
||||
$product = Product::where('slug', $product_slug)->where('active', true)->whereJsonContains('show_on', '1')->first();
|
||||
if ($category && $product) {
|
||||
|
||||
$data = [
|
||||
|
|
@ -55,7 +55,7 @@ class SiteController extends Controller
|
|||
'subsite' => $subsite,
|
||||
'categories' => Category::where('active', true)->orderBy('pos', 'ASC')->get(),
|
||||
'product' => $product,
|
||||
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||
'p_count' => Product::where('active', true)->whereJsonContains('show_on', '1')->count(),
|
||||
|
||||
];
|
||||
return view('web.templates.produkte-show', $data);
|
||||
|
|
@ -74,7 +74,7 @@ class SiteController extends Controller
|
|||
|
||||
|
||||
$product_categories = ProductCategory::where('category_id', $category->id)->whereHas('product', function ($query) use ($category) {
|
||||
$query->where('active', true)->where('show_at', '<=', 1);
|
||||
$query->where('active', true)->whereJsonContains('show_on', '1');
|
||||
})->orderBy('pos', 'DESC')->get();
|
||||
|
||||
$data = [
|
||||
|
|
@ -83,7 +83,7 @@ class SiteController extends Controller
|
|||
'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(),
|
||||
'products' => false,
|
||||
'product_categories' => $product_categories,
|
||||
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||
'p_count' => Product::where('active', true)->whereJsonContains('show_on', '1')->count(),
|
||||
'headline' => $category->getLang('headline'),
|
||||
'headline_image' => $headline_image,
|
||||
];
|
||||
|
|
@ -95,9 +95,9 @@ class SiteController extends Controller
|
|||
'user_shop' => Util::getUserShop(),
|
||||
'subsite' => 'alle-produkte',
|
||||
'categories' => Category::where('active', true)->orderBy('pos', 'DESC')->get(),
|
||||
'products' => Product::where('active', true)->where('show_at', '<=', 1)->orderBy('pos', 'DESC')->get(),
|
||||
'products' => Product::where('active', true)->whereJsonContains('show_on', '1')->orderBy('pos', 'DESC')->get(),
|
||||
'product_categories' => false,
|
||||
'p_count' => Product::where('active', true)->where('show_at', '<=', 1)->count(),
|
||||
'p_count' => Product::where('active', true)->whereJsonContains('show_on', '1')->count(),
|
||||
'headline' => 'Produktwelt',
|
||||
'headline_image' => false,
|
||||
];
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ class WizardController extends Controller
|
|||
$data = [
|
||||
'user' => Auth::user(),
|
||||
'step' => $step,
|
||||
'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->where('show_at', '=', 5)->orderBy('pos', 'ASC')->get(),
|
||||
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
|
||||
'userHistoryWizardPayment' => $userHistoryWizardPayment,
|
||||
];
|
||||
|
||||
|
|
@ -94,8 +94,8 @@ class WizardController extends Controller
|
|||
$data = [
|
||||
'user' => Auth::user(),
|
||||
'step' => $step,
|
||||
'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->where('show_at', '=', 5)->orderBy('pos', 'ASC')->get(),
|
||||
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
|
||||
];
|
||||
if($step == 5){
|
||||
return view('user.wizard.register_release', $data);
|
||||
|
|
@ -123,8 +123,8 @@ class WizardController extends Controller
|
|||
$data = [
|
||||
'user' => Auth::user(),
|
||||
'step' => 0,
|
||||
'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->where('show_at', '=', 5)->orderBy('pos', 'ASC')->get(),
|
||||
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
|
||||
'userHistoryWizardPayment' => $userHistoryWizardPayment,
|
||||
];
|
||||
|
||||
|
|
@ -158,8 +158,8 @@ class WizardController extends Controller
|
|||
$data = [
|
||||
'user' => Auth::user(),
|
||||
'step' => $step,
|
||||
'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->where('show_at', '=', 5)->orderBy('pos', 'ASC')->get(),
|
||||
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
|
||||
];
|
||||
$user->wizard = 0;
|
||||
$user->save();
|
||||
|
|
@ -320,8 +320,8 @@ class WizardController extends Controller
|
|||
$data = [
|
||||
'user' => Auth::user(),
|
||||
'step' => $step,
|
||||
'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->where('show_at', '=', 5)->orderBy('pos', 'ASC')->get(),
|
||||
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
|
||||
];
|
||||
$user->wizard = 10;
|
||||
$user->save();
|
||||
|
|
@ -359,8 +359,8 @@ class WizardController extends Controller
|
|||
$data = [
|
||||
'user' => Auth::user(),
|
||||
'step' => $step,
|
||||
'products' => Product::where('active', true)->where('show_at', '=', 3)->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->where('show_at', '=', 5)->orderBy('pos', 'ASC')->get(),
|
||||
'products' => Product::where('active', true)->whereJsonContains('show_on', ['4', '5'])->whereJsonContains('show_on', ['4', '5'])->orderBy('pos', 'ASC')->get(),
|
||||
'products_on_board' => Product::where('active', true)->whereJsonContains('show_on', '6')->orderBy('pos', 'ASC')->get(),
|
||||
];
|
||||
return view('user.wizard.create', $data)->withErrors($validator);
|
||||
}
|
||||
|
|
@ -433,7 +433,7 @@ class WizardController extends Controller
|
|||
$user->save();
|
||||
}
|
||||
|
||||
if($product && $product->active && $product->show_at == 3){
|
||||
if($product && $product->active){
|
||||
//set membership product
|
||||
$image = "";
|
||||
if($product->images->count()){
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class Checkout
|
|||
Yard::instance('shopping')->putYardExtra('shopping_data', $shopping_instance->shopping_data);
|
||||
$is_for = isset($shopping_instance->shopping_data['is_for']) ? $shopping_instance->shopping_data['is_for'] : 'ot';
|
||||
Yard::instance('shopping')->setShippingCountryWithPrice($shopping_instance->country_id, $is_for);
|
||||
|
||||
Yard::instance('shopping')->setUserPriceInfos($shopping_instance->shopping_data['user_price_infos']);
|
||||
ShoppingInstance::where('identifier', $request->route('identifier'))->delete();
|
||||
$request->route()->forgetParameter('identifier');
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@
|
|||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use App\Models\Country;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use PHPUnit\Framework\Constraint\Count;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
/**
|
||||
* Class Homeparty
|
||||
|
|
@ -66,12 +68,15 @@ class Homeparty extends Model
|
|||
'pos' => 'int',
|
||||
'completed' => 'int',
|
||||
'status' => 'int',
|
||||
'step' => 'int',
|
||||
'country_id' => 'int',
|
||||
'order_to' => 'bool',
|
||||
'active' => 'bool',
|
||||
'default' => 'bool',
|
||||
'token_active' => 'bool',
|
||||
'settings' => 'array',
|
||||
'order' => 'array'
|
||||
'order' => 'array',
|
||||
'card_info' => 'array',
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
|
|
@ -87,24 +92,33 @@ class Homeparty extends Model
|
|||
'date',
|
||||
'name',
|
||||
'place',
|
||||
'country_id',
|
||||
'description',
|
||||
'pos',
|
||||
'completed',
|
||||
'status',
|
||||
'step',
|
||||
'order_to',
|
||||
'active',
|
||||
'default',
|
||||
'token',
|
||||
'token_active',
|
||||
'settings',
|
||||
'order'
|
||||
'order',
|
||||
'card_info'
|
||||
];
|
||||
private $user_country;
|
||||
|
||||
public function auth_user()
|
||||
{
|
||||
return $this->belongsTo('App\User', 'auth_user_id');
|
||||
}
|
||||
|
||||
public function country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Country', 'country_id');
|
||||
}
|
||||
|
||||
public function homeparty_users()
|
||||
{
|
||||
return $this->hasMany('App\Models\HomepartyUser', 'homeparty_id');
|
||||
|
|
@ -141,5 +155,32 @@ class Homeparty extends Model
|
|||
public function getTokenLink(){
|
||||
return url('homeparty/'.$this->token);
|
||||
}
|
||||
|
||||
public function getCardInfo($key)
|
||||
{
|
||||
return isset($this->card_info[$key]) ? $this->card_info[$key] : null;
|
||||
}
|
||||
|
||||
public function getUserCountry(){
|
||||
if(!$this->user_country){
|
||||
if($user_country_id = $this->getCardInfo('user_country_id')){
|
||||
$this->user_country = Country::findOrFail($user_country_id);
|
||||
}
|
||||
}
|
||||
return $this->user_country;
|
||||
}
|
||||
|
||||
public function isPriceCurrency()
|
||||
{
|
||||
$user_country = $this->getUserCountry();
|
||||
return ($user_country && $user_country->currency) ? true : false;
|
||||
}
|
||||
|
||||
public function getPriceCurrencyUnit()
|
||||
{
|
||||
$user_country = $this->getUserCountry();
|
||||
return ($user_country && $user_country->currency) ? $user_country->currency_unit : false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -188,5 +188,29 @@ class HomepartyUserOrderItem extends Model
|
|||
{
|
||||
return (float) (($this->attributes['price'] - $this->attributes['ek-price']) * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
|
||||
public function getCurrencyByKey($key)
|
||||
{
|
||||
$rNumber = 0;
|
||||
if($this->homeparty && $this->homeparty->isPriceCurrency()){
|
||||
$user_country = $this->homeparty->getUserCountry();
|
||||
$faktor = isset($user_country->currency_faktor) ? $user_country->currency_faktor : 1;
|
||||
switch ($key) {
|
||||
case 'TotalIncomePrice':
|
||||
$rNumber = $this->geTotalIncomePrice() * $faktor;
|
||||
break;
|
||||
case 'TotalPrice':
|
||||
$rNumber = $this->getTotalPrice() * $faktor;
|
||||
break;
|
||||
case 'TotalEKPrice':
|
||||
$rNumber = $this->geTotalEKPrice() * $faktor;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return formatNumber($rNumber);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,12 +46,14 @@ class PaymentMethod extends Model
|
|||
'pos' => 'int',
|
||||
'active' => 'bool',
|
||||
'default' => 'bool',
|
||||
'show_on' => 'array',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'short',
|
||||
'show_at',
|
||||
'show_on',
|
||||
'pos',
|
||||
'default',
|
||||
'active'
|
||||
|
|
@ -67,10 +69,30 @@ class PaymentMethod extends Model
|
|||
9 => 'überall',
|
||||
];
|
||||
|
||||
public static $showONs = [
|
||||
1 => 'KundenShop',
|
||||
2 => 'BeraterShop',
|
||||
3 => 'Auszeitparty',
|
||||
4 => 'Registrierung Berater',
|
||||
5 => 'Mitgliedschaft Berater',
|
||||
//6 => 'Onboarding Berater',
|
||||
10 => 'überall',
|
||||
];
|
||||
|
||||
public function getShowAtType(){
|
||||
return isset(self::$showATs[$this->show_at]) ? self::$showATs[$this->show_at] : '-';
|
||||
}
|
||||
|
||||
public function getShowOnTypes(){
|
||||
$ret = [];
|
||||
if($this->show_on){
|
||||
foreach($this->show_on as $show){
|
||||
$ret[] = isset(self::$showONs[$show]) ? self::$showONs[$show] : '-';
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function getDefaultAsArray($short=false){
|
||||
return PaymentMethod::where('active', true)->where('default', true)->pluck('id');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,10 +128,12 @@ class Product extends Model
|
|||
'trans_description' => 'array',
|
||||
'trans_usage' => 'array',
|
||||
'trans_ingredients' => 'array',
|
||||
'show_on' => 'array',
|
||||
'action' => 'array',
|
||||
'wp_number' => 'int',
|
||||
'shipping_addon' => 'bool',
|
||||
'active' => 'bool'
|
||||
'active' => 'bool',
|
||||
'no_commission' => 'bool',
|
||||
];
|
||||
use Sluggable;
|
||||
|
||||
|
|
@ -149,6 +151,7 @@ class Product extends Model
|
|||
'price_old',
|
||||
'points',
|
||||
'weight',
|
||||
'no_commission',
|
||||
'contents',
|
||||
'contents_total',
|
||||
'unit',
|
||||
|
|
@ -162,6 +165,7 @@ class Product extends Model
|
|||
'amount',
|
||||
'active',
|
||||
'show_at',
|
||||
'show_on',
|
||||
'shipping_addon',
|
||||
'identifier',
|
||||
'action',
|
||||
|
|
@ -175,8 +179,6 @@ class Product extends Model
|
|||
'upgrade' => 'Produktupgrade zur Produkt ID',
|
||||
'upgrade_member' => 'Beraterupgrade zur Karriere ID',
|
||||
'proportional_voucher' => 'Anteiliger Gutschein Berater',
|
||||
|
||||
|
||||
];
|
||||
public $unitTypes = [
|
||||
0 => '',
|
||||
|
|
@ -195,7 +197,16 @@ class Product extends Model
|
|||
5 => 'Onboarding Berater',
|
||||
6 => 'Onboarding Berater + Berater Shop',
|
||||
7 => 'zur internen Berechnung',
|
||||
];
|
||||
|
||||
public $showONs = [
|
||||
1 => 'KundenShop',
|
||||
2 => 'BeraterShop',
|
||||
3 => 'Auszeitparty',
|
||||
4 => 'Registrierung Berater',
|
||||
5 => 'Mitgliedschaft Berater',
|
||||
6 => 'Onboarding Berater',
|
||||
10 => 'zur internen Berechnung',
|
||||
];
|
||||
|
||||
public $actions = [
|
||||
|
|
@ -262,19 +273,19 @@ class Product extends Model
|
|||
|
||||
public function setPriceAttribute( $value ) {
|
||||
|
||||
$this->attributes['price'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['price'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
public function setPriceEkAttribute( $value ) {
|
||||
|
||||
$this->attributes['price_ek'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['price_ek'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
public function setTaxAttribute( $value ) {
|
||||
|
||||
$this->attributes['tax'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['tax'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
public function setPriceOldAttribute( $value ) {
|
||||
|
||||
$this->attributes['price_old'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['price_old'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function getFormattedPrice()
|
||||
|
|
@ -287,10 +298,6 @@ class Product extends Model
|
|||
return isset($this->attributes['price_ek']) ? Util::formatNumber($this->attributes['price_ek']) : "";
|
||||
}
|
||||
|
||||
public function getFormattedTax()
|
||||
{
|
||||
return isset($this->attributes['tax']) ? Util::formatNumber($this->attributes['tax'], 0) : "";
|
||||
}
|
||||
|
||||
public function getFormattedPriceOld()
|
||||
{
|
||||
|
|
@ -299,6 +306,9 @@ class Product extends Model
|
|||
|
||||
/*price by user Factor*/
|
||||
private function calcPriceUserFactor($price){
|
||||
if($this->no_commission){
|
||||
return $price;
|
||||
}
|
||||
if(\Auth::user() && \Auth::user()->user_level){
|
||||
$margin = ((\Auth::user()->user_level->margin -100)*-1) / 100;
|
||||
$price = $price * $margin;
|
||||
|
|
@ -306,24 +316,36 @@ class Product extends Model
|
|||
return $price;
|
||||
}
|
||||
/*price net*/
|
||||
private function calcPriceNet($price){
|
||||
$tax_rate = ($this->attributes['tax'] + 100) / 100;
|
||||
|
||||
private function calcPriceNet($price, $country=null){
|
||||
$tax = $this->getTaxWith($country);
|
||||
$tax_rate = ($tax + 100) / 100;
|
||||
return $price / $tax_rate;
|
||||
}
|
||||
//price calu with
|
||||
public function getPriceWith(Bool $net = true, Bool $ufactor = true){
|
||||
$price = $this->attributes['price'];
|
||||
$price = $net ? $this->calcPriceNet($price) : $price;
|
||||
public function getPriceWith(Bool $net = true, Bool $ufactor = true, $country = null){
|
||||
$price = isset($this->attributes['price']) ? $this->attributes['price'] : null;
|
||||
$cprice = $country ? $this->getCPrice($country) : null;
|
||||
$price = $cprice ? $cprice : $price;
|
||||
$price = $net ? $this->calcPriceNet($price, $country) : $price;
|
||||
$price = $ufactor ? $this->calcPriceUserFactor($price) : $price;
|
||||
return round($price, 2);
|
||||
}
|
||||
/*out*/
|
||||
public function getFormattedPriceWith(Bool $net = true, Bool $ufactor = true)
|
||||
{
|
||||
return isset($this->attributes['price']) ? Util::formatNumber($this->getPriceWith($net, $ufactor)) : "";
|
||||
public function getFormattedPriceWith(Bool $net = true, Bool $ufactor = true, $country = null)
|
||||
{
|
||||
return isset($this->attributes['price']) ? Util::formatNumber($this->getPriceWith($net, $ufactor, $country)) : "";
|
||||
}
|
||||
|
||||
public function getTaxWith($country = null){
|
||||
$tax = isset($this->attributes['tax']) ? $this->attributes['tax'] : null;
|
||||
$ctax = $country ? $this->getCTax($country) : null;
|
||||
return $ctax !== null ? $ctax : $tax;
|
||||
}
|
||||
|
||||
public function getFormattedTax($country = null)
|
||||
{
|
||||
return isset($this->attributes['tax']) ? Util::formatNumber($this->getTaxWith($country), 0) : "";
|
||||
}
|
||||
|
||||
public function getBasePriceFormattedFull(){
|
||||
if($price = $this->getBasePrice()){
|
||||
|
|
@ -368,6 +390,14 @@ class Product extends Model
|
|||
return isset($this->showATs[$this->show_at]) ? $this->showATs[$this->show_at] : '-';
|
||||
}
|
||||
|
||||
public function getShowOnTypes(){
|
||||
$ret = [];
|
||||
foreach($this->show_on as $show){
|
||||
$ret[] = isset($this->showONs[$show]) ? $this->showONs[$show] : '-';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
public function setPosAttribute($value){
|
||||
$this->attributes['pos'] = is_numeric($value) ? $value : null;
|
||||
|
|
@ -403,29 +433,40 @@ class Product extends Model
|
|||
return rtrim($ret, ', ');
|
||||
}
|
||||
|
||||
public function getCountryPrice($country_id){
|
||||
return $this->country_prices->where('country_id', '=', $country_id)->first() ?: new CountryPrice();
|
||||
public function getCountryPrice(Country $country){
|
||||
if($country->own_eur){
|
||||
return $this->country_prices->where('country_id', '=', $country->id)->first() ?: new CountryPrice();
|
||||
}
|
||||
return new CountryPrice();
|
||||
}
|
||||
|
||||
public function getCPrice($country_id){
|
||||
return $this->getCountryPrice($country_id)->c_price;
|
||||
public function getCPrice(Country $country){
|
||||
return $this->getCountryPrice($country)->c_price;
|
||||
}
|
||||
public function getCTax($country_id){
|
||||
return $this->getCountryPrice($country_id)->c_tax;
|
||||
public function getCTax(Country $country){
|
||||
return $this->getCountryPrice($country)->c_tax;
|
||||
}
|
||||
public function getCPriceOld($country_id){
|
||||
return $this->getCountryPrice($country_id)->c_price_old;
|
||||
public function getCPriceOld(Country $country){
|
||||
return $this->getCountryPrice($country)->c_price_old;
|
||||
}
|
||||
public function getCCurrency($country_id){
|
||||
return $this->getCountryPrice($country_id)->c_currency;
|
||||
public function getCCurrency(Country $country){
|
||||
return $this->getCountryPrice($country)->c_currency;
|
||||
}
|
||||
|
||||
public function getRealPrice(Country $country){
|
||||
if($country->own_eur && $this->getCPrice($country->id)){
|
||||
return $this->getCPrice($country->id);
|
||||
if($country->own_eur && $this->getCPrice($country)){
|
||||
return $this->getCPrice($country);
|
||||
}
|
||||
return $this->price;
|
||||
}
|
||||
|
||||
|
||||
public function getFormattedPriceCurrencyWith(Bool $net = true, Bool $ufactor = true, Country $country = null){
|
||||
$ret = "";
|
||||
if($country->currency){
|
||||
$price = $this->getPriceWith($net, $ufactor, $country);
|
||||
$ret = formatNumber($price * $country->currency_faktor)." ".$country->currency_unit;
|
||||
return '<br><span class="small">~'.$ret.'<span>';
|
||||
}
|
||||
return "" ;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Models\ShippingCountry as ModelsShippingCountry;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
|
|
@ -50,4 +51,17 @@ class ShippingCountry extends Model
|
|||
return $this->hasMany('App\Models\ShoppingOrder', 'country_id');
|
||||
}
|
||||
|
||||
|
||||
public static function getActiveShippingCountries(){
|
||||
$ret = [];
|
||||
$ShippingCountries = ShippingCountry::all();
|
||||
foreach($ShippingCountries as $ShippingCountry){
|
||||
if($ShippingCountry->shipping->active){
|
||||
$ret[$ShippingCountry->country_id] = $ShippingCountry->country->getLocated();
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,32 +58,32 @@ class ShippingPrice extends Model
|
|||
|
||||
public function setPriceAttribute($value)
|
||||
{
|
||||
$this->attributes['price'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['price'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function setPriceCompAttribute($value)
|
||||
{
|
||||
$this->attributes['price_comp'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['price_comp'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function setFactorAttribute($value)
|
||||
{
|
||||
$this->attributes['factor'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['factor'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function setTaxRateAttribute($value)
|
||||
{
|
||||
$this->attributes['tax_rate'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['tax_rate'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function setTotalFromAttribute($value)
|
||||
{
|
||||
$this->attributes['total_from'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['total_from'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function setTotalToAttribute($value)
|
||||
{
|
||||
$this->attributes['total_to'] = $value ? Util::reFormatNumber($value) : null;
|
||||
$this->attributes['total_to'] = $value !== null ? Util::reFormatNumber($value) : null;
|
||||
}
|
||||
|
||||
public function getFormattedPrice()
|
||||
|
|
|
|||
|
|
@ -101,5 +101,4 @@ class ShoppingOrderItem extends Model
|
|||
{
|
||||
return formatNumber($this->attributes['price_net'] * $this->attributes['qty']);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -28,6 +28,8 @@ class ProductRepository extends BaseRepository {
|
|||
|
||||
$data['active'] = isset($data['active']) ? 1 : 0;
|
||||
$data['shipping_addon'] = isset($data['shipping_addon']) ? 1 : 0;
|
||||
$data['no_commission'] = isset($data['no_commission']) ? 1 : 0;
|
||||
$data['show_on'] = isset($data['show_on']) ? $data['show_on'] : null;
|
||||
|
||||
|
||||
if($data['id'] === "new"){
|
||||
|
|
|
|||
|
|
@ -23,15 +23,12 @@ class UserRepository extends BaseRepository {
|
|||
{
|
||||
|
||||
if($data['user_id'] === "new" || $data['user_id'] == 0){
|
||||
|
||||
$this->model = User::create([
|
||||
'email' => $data['email'],
|
||||
'password' => env('APP_KEY'),
|
||||
]);
|
||||
$this->model->payment_methods = PaymentMethod::getDefaultAsArray();
|
||||
$this->model->save();
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
$this->model = $this->getById($data['user_id']);
|
||||
|
|
@ -44,8 +41,6 @@ class UserRepository extends BaseRepository {
|
|||
}
|
||||
|
||||
$data['same_as_billing'] = !isset($data['same_as_billing']) ? 0 : 1;
|
||||
|
||||
|
||||
$account->fill($data)->save();
|
||||
|
||||
if(!$this->model->account_id){
|
||||
|
|
@ -139,6 +134,7 @@ class UserRepository extends BaseRepository {
|
|||
if($result->valid == true) {
|
||||
$user->account->tax_identification_number = $data['tax_identification_number'];
|
||||
$user->account->reverse_charge = 1;
|
||||
$user->account->reverse_charge_code = $countryCode;
|
||||
$user->account->reverse_charge_valid = now();
|
||||
$user->account->save();
|
||||
return 'valid';
|
||||
|
|
|
|||
|
|
@ -217,6 +217,8 @@ class HTMLHelper
|
|||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static function getContriesCodes($id, $all=true){#
|
||||
$values = Country::all();
|
||||
$counter = 1;
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ class HomepartyCart
|
|||
public static $ek_price_net = 0;
|
||||
|
||||
public static $income_price = 0;
|
||||
public static $homeparty;
|
||||
|
||||
private static $shipping_total = 0;
|
||||
private static $shipping_net_total = 0;
|
||||
|
||||
private static $homeparty;
|
||||
private static $userCarts = [];
|
||||
|
||||
public static $user_host_id;
|
||||
|
|
@ -311,6 +311,11 @@ class HomepartyCart
|
|||
return formatNumber(self::$points, 0);
|
||||
}
|
||||
|
||||
public static function getFormattedPointsTotal()
|
||||
{
|
||||
return formatNumber(self::$points - self::$bonus_points_diff, 0);
|
||||
}
|
||||
|
||||
public static function getFormattedPrice()
|
||||
{
|
||||
return formatNumber(self::$price);
|
||||
|
|
@ -398,4 +403,46 @@ class HomepartyCart
|
|||
|
||||
return number_format($value, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
|
||||
public static function getCurrencyByKey($key)
|
||||
{
|
||||
$rNumber = 0;
|
||||
if(self::$homeparty && self::$homeparty->isPriceCurrency()){
|
||||
$user_country = self::$homeparty->getUserCountry();
|
||||
$faktor = isset($user_country->currency_faktor) ? $user_country->currency_faktor : 1;
|
||||
switch ($key) {
|
||||
case 'BonusValue':
|
||||
$rNumber = self::$bonus_value * $faktor;
|
||||
break;
|
||||
case 'BonusCoupon':
|
||||
$rNumber = self::$bonus_coupon * $faktor;
|
||||
break;
|
||||
case 'IncomePrice':
|
||||
$rNumber = self::$income_price * $faktor;
|
||||
break;
|
||||
case 'Price':
|
||||
$rNumber = self::$price * $faktor;
|
||||
break;
|
||||
case 'EkPrice':
|
||||
$rNumber = self::$ek_price * $faktor;
|
||||
break;
|
||||
case 'PriceNet':
|
||||
$rNumber = self::$price_net * $faktor;
|
||||
break;
|
||||
case 'EkPriceNet':
|
||||
$rNumber = self::$ek_price_net * $faktor;
|
||||
break;
|
||||
case 'PriceTax':
|
||||
$rNumber = (self::$price - self::$price_net) * $faktor;
|
||||
break;
|
||||
case 'EkPriceTax':
|
||||
$rNumber = (self::$ek_price - self::$ek_price_net)* $faktor;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return formatNumber($rNumber);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -125,4 +125,31 @@ class HomepartyUserCart
|
|||
|
||||
return number_format($value, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
|
||||
public function getCurrencyByKey($key)
|
||||
{
|
||||
$rNumber = 0;
|
||||
if($this->homepartyUser->homeparty && $this->homepartyUser->homeparty->isPriceCurrency()){
|
||||
$user_country = $this->homepartyUser->homeparty->getUserCountry();
|
||||
$faktor = isset($user_country->currency_faktor) ? $user_country->currency_faktor : 1;
|
||||
switch ($key) {
|
||||
case 'ShippingPrice':
|
||||
$rNumber = $this->shipping_price * $faktor;
|
||||
break;
|
||||
case 'IncomePrice':
|
||||
$rNumber = $this->income_price * $faktor;
|
||||
break;
|
||||
case 'Price':
|
||||
$rNumber = $this->price * $faktor;
|
||||
break;
|
||||
case 'EkPrice':
|
||||
$rNumber = $this->ek_price * $faktor;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return formatNumber($rNumber);
|
||||
}
|
||||
}
|
||||
29
app/Services/PriceService.php
Normal file
29
app/Services/PriceService.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
|
||||
use App\User;
|
||||
|
||||
class PriceService
|
||||
{
|
||||
public static $country;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function createConfirmationCode() {
|
||||
$unique = false;
|
||||
do{
|
||||
$confirmation_code = str_random(30);
|
||||
if(User::where('confirmation_code', '=', $confirmation_code)->count() == 0){
|
||||
$unique = true;
|
||||
}
|
||||
}
|
||||
while(!$unique);
|
||||
return $confirmation_code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
13
app/Services/TaxPriceHelper.php
Normal file
13
app/Services/TaxPriceHelper.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
|
||||
class TaxPriceHelper
|
||||
{
|
||||
public static function userOrders() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -3,9 +3,89 @@ namespace App\Services;
|
|||
|
||||
|
||||
use App\User;
|
||||
use App\Models\ShippingCountry;
|
||||
|
||||
class UserService
|
||||
{
|
||||
public static $user_country;
|
||||
public static $shipping_country;
|
||||
public static $user_tax_free;
|
||||
public static $user_reverse_charge = false;
|
||||
|
||||
|
||||
public static function checkUserTaxShippingCountry(User $user, $shipping_country_id) {
|
||||
|
||||
if(!$user->account && !$user->account->country_id){
|
||||
abort(403, 'Error: User hat kein Land!');
|
||||
}
|
||||
$ShippingCountry = ShippingCountry::findOrFail($shipping_country_id);
|
||||
self::$user_tax_free = self::performUserTaxShippingCountry($user, $ShippingCountry);
|
||||
|
||||
/*
|
||||
dump( self::$user_price_code );
|
||||
dump( self::$user_tax_free );
|
||||
dump( self::$user_reverse_charge );
|
||||
*/
|
||||
}
|
||||
|
||||
public static function performUserTaxShippingCountry($user, $ShippingCountry){
|
||||
//preise für das Land
|
||||
self::$user_country = $user->account->country;
|
||||
self::$shipping_country = $ShippingCountry->country;
|
||||
//ausgehend vom Land des Rechnungsempfänger $user->account->country
|
||||
//ist der Rechnungsempfänger im Drittland?
|
||||
if($user->account->country->supply_country){
|
||||
if($ShippingCountry->country->supply_country){
|
||||
//Lieferadresse im Drittland?
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//Rechnungsempfänger in der EU
|
||||
|
||||
//Lieferland mit RSV
|
||||
if($ShippingCountry->country->eu_country){
|
||||
//Rechnungsempfänger mit valid aktiv RSV
|
||||
if($user->account->reverse_charge && $user->account->reverse_charge_valid){
|
||||
//Rechnungsland ist auch Lieferland, dann RSV
|
||||
if(strtolower($user->account->reverse_charge_code) == strtolower($ShippingCountry->country->code)){
|
||||
self::$user_reverse_charge = true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Lieferland ohne RSV
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getYardInfo(){
|
||||
return [
|
||||
'user_tax_free' => self::$user_tax_free,
|
||||
'user_reverse_charge' => self::$user_reverse_charge,
|
||||
'user_country_id' => self::$user_country->id,
|
||||
'shipping_country_id' => self::$shipping_country->id,
|
||||
];
|
||||
}
|
||||
|
||||
public static function getOrderInfo($key = false){
|
||||
|
||||
switch ($key) {
|
||||
case 'billing_state':
|
||||
return self::$user_country->getLocated();
|
||||
break;
|
||||
case 'shipping_state':
|
||||
return self::$shipping_country->getLocated();
|
||||
break;
|
||||
case 'tax_free':
|
||||
return self::$user_tax_free ? 'Nein' : 'Ja';
|
||||
break;
|
||||
case 'user_reverse_charge':
|
||||
return self::$user_reverse_charge ? 'Ja' : 'Nein';
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static function createConfirmationCode() {
|
||||
$unique = false;
|
||||
do{
|
||||
|
|
@ -18,4 +98,6 @@ class UserService
|
|||
return $confirmation_code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,14 +1,15 @@
|
|||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\Country;
|
||||
use App\Models\Product;
|
||||
use App\Models\ShippingCountry;
|
||||
use \Gloudemans\Shoppingcart\Cart;
|
||||
use Illuminate\Support\Collection;
|
||||
use Gloudemans\Shoppingcart\CartItem;
|
||||
use Gloudemans\Shoppingcart\Contracts\Buyable;
|
||||
use Illuminate\Session\SessionManager;
|
||||
use Illuminate\Contracts\Events\Dispatcher;
|
||||
use Illuminate\Support\Collection;
|
||||
use Gloudemans\Shoppingcart\Contracts\Buyable;
|
||||
|
||||
|
||||
class Yard extends Cart
|
||||
|
|
@ -21,7 +22,10 @@ class Yard extends Cart
|
|||
private $shipping_is_for;
|
||||
private $num_comp;
|
||||
private $ysession;
|
||||
private $yinstance;
|
||||
private $user_tax_free;
|
||||
private $user_reverse_charge;
|
||||
private $user_country_id;
|
||||
private $user_country;
|
||||
private $shopping_data = [];
|
||||
|
||||
public function __construct(SessionManager $session, Dispatcher $events)
|
||||
|
|
@ -51,10 +55,21 @@ class Yard extends Cart
|
|||
if($this->getYardExtra('shipping_is_for')){
|
||||
$this->shipping_is_for = $this->getYardExtra('shipping_is_for');
|
||||
}
|
||||
|
||||
if($this->getYardExtra('num_comp')){
|
||||
$this->num_comp = $this->getYardExtra('num_comp');
|
||||
}
|
||||
if($this->getYardExtra('user_tax_free')){
|
||||
$this->user_tax_free = $this->getYardExtra('user_tax_free');
|
||||
}
|
||||
if($this->getYardExtra('user_reverse_charge')){
|
||||
$this->user_reverse_charge = $this->getYardExtra('user_reverse_charge');
|
||||
}
|
||||
if($this->getYardExtra('user_country_id')){
|
||||
$this->user_country_id = $this->getYardExtra('user_country_id');
|
||||
}
|
||||
if($this->getYardExtra('user_country')){
|
||||
$this->user_country = $this->getYardExtra('user_country');
|
||||
}
|
||||
|
||||
|
||||
parent::__construct($session, $events);
|
||||
|
|
@ -139,6 +154,44 @@ class Yard extends Cart
|
|||
|
||||
}
|
||||
|
||||
public function setUserPriceInfos($setUserPriceInfos = [])
|
||||
{
|
||||
$this->user_tax_free = $setUserPriceInfos['user_tax_free'];
|
||||
$this->putYardExtra('user_tax_free', $setUserPriceInfos['user_tax_free']);
|
||||
|
||||
$this->user_reverse_charge = $setUserPriceInfos['user_reverse_charge'];
|
||||
$this->putYardExtra('user_reverse_charge', $setUserPriceInfos['user_reverse_charge']);
|
||||
|
||||
$this->user_country_id = $setUserPriceInfos['user_country_id'];
|
||||
$this->putYardExtra('user_country_id', $setUserPriceInfos['user_country_id']);
|
||||
|
||||
$this->user_country = Country::findOrFail($setUserPriceInfos['user_country_id']);
|
||||
$this->putYardExtra('user_country', $this->user_country);
|
||||
}
|
||||
|
||||
public function getUserPriceInfos(){
|
||||
return [
|
||||
'user_tax_free' =>$this->user_tax_free,
|
||||
'user_reverse_charge' =>$this->user_reverse_charge,
|
||||
'user_country_id' =>$this->user_country_id,
|
||||
];
|
||||
}
|
||||
|
||||
public function getUserCountryId()
|
||||
{
|
||||
return $this->user_country_id;
|
||||
}
|
||||
|
||||
public function getUserCountry()
|
||||
{
|
||||
return $this->user_country;
|
||||
}
|
||||
|
||||
public function getUserTaxFree()
|
||||
{
|
||||
return $this->user_tax_free;
|
||||
}
|
||||
|
||||
private function calculateShippingPrice(){
|
||||
|
||||
$shippingCountry = ShippingCountry::find($this->shipping_country_id);
|
||||
|
|
@ -146,9 +199,11 @@ class Yard extends Cart
|
|||
return;
|
||||
}
|
||||
$shipping = $shippingCountry->shipping;
|
||||
|
||||
if($this->weight() == 0){
|
||||
$shipping_price = $shipping->shipping_prices->first();
|
||||
if(!$shipping_price){
|
||||
return;
|
||||
}
|
||||
$shipping_price->price = 0;
|
||||
$shipping_price->price_comp = 0;
|
||||
}else{
|
||||
|
|
@ -241,16 +296,24 @@ class Yard extends Cart
|
|||
|
||||
public function taxWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
if($this->user_tax_free){
|
||||
return $this->numberFormat(0, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
$total = $this->totalWithShipping(2, '.', '');
|
||||
// $totalTax = (float) $this->tax(2, '.', '') + $this->shipping_tax;
|
||||
$totalTax = $this->subtotalWithShipping(2, '.', '');
|
||||
// $totalTax = (float) $this->tax(2, '.', '') + $this->shipping_tax;
|
||||
$totalTax = $this->subtotalWithShipping(2, '.', '');
|
||||
return $this->numberFormat(($total - $totalTax), $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
|
||||
public function totalWithShipping($decimals = null, $decimalPoint = null, $thousandSeperator = null)
|
||||
{
|
||||
$total = (float) ($this->total(2, '.', '')) + $this->shipping_price;
|
||||
if($this->user_tax_free){
|
||||
$total = (float) ($this->subtotal(2, '.', '')) + $this->shipping_price_net;
|
||||
}else{
|
||||
$total = (float) ($this->total(2, '.', '')) + $this->shipping_price;
|
||||
}
|
||||
|
||||
return $this->numberFormat($total, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
|
|
@ -359,7 +422,7 @@ class Yard extends Cart
|
|||
}
|
||||
$price = $product->price;
|
||||
if($set_price === 'with'){
|
||||
$price = $product->getPriceWith(false, true);
|
||||
$price = $product->getPriceWith(false, true, $this->getUserCountry());
|
||||
}
|
||||
$cartItem = $this->getCartItem($product->id, $product->getLang('name'), 1, $price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight, 'points' => $product->points]);
|
||||
$content = $this->getContent();
|
||||
|
|
@ -402,6 +465,71 @@ class Yard extends Cart
|
|||
return $this->numberFormat(($price * $row->qty), $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
|
||||
public function isPriceCurrency()
|
||||
{
|
||||
return ($this->user_country && $this->user_country->currency) ? true : false;
|
||||
}
|
||||
|
||||
public function getPriceCurrencyUnit()
|
||||
{
|
||||
return ($this->user_country && $this->user_country->currency) ? $this->user_country->currency_unit : false;
|
||||
}
|
||||
|
||||
public function convertCurrency($value = 0, $decimals = null, $decimalPoint = null, $thousandSeperator = null){
|
||||
if($this->isPriceCurrency()){
|
||||
$faktor = isset($this->user_country->currency_faktor) ? $this->user_country->currency_faktor : 1;
|
||||
$value = Util::reFormatNumber($value);
|
||||
return $this->numberFormat($value, $decimals, $decimalPoint, $thousandSeperator);
|
||||
}
|
||||
return '';
|
||||
|
||||
}
|
||||
public function getCurrencyByKey($key = false, CartItem $row = null, $decimals = null, $decimalPoint = null, $thousandSeperator = null){
|
||||
|
||||
if($this->isPriceCurrency()){
|
||||
$rNumber = 0;
|
||||
$faktor = isset($this->user_country->currency_faktor) ? $this->user_country->currency_faktor : 1;
|
||||
switch ($key) {
|
||||
case 'rowPriceNetCurrency':
|
||||
if($row){
|
||||
$price = round($row->price / ((100 + $row->taxRate) /100), 4);
|
||||
$rNumber = $price * $faktor;
|
||||
}
|
||||
break;
|
||||
case 'rowSubtotalCurrency':
|
||||
if($row){
|
||||
$price = round($row->price / ((100 + $row->taxRate) /100), 4);
|
||||
$rNumber = $price * $faktor * $row->qty;
|
||||
}
|
||||
break;
|
||||
case 'subtotal':
|
||||
$rNumber = (float) ($this->subtotal(2, '.', '')) * $faktor;
|
||||
break;
|
||||
case 'shippingNet':
|
||||
$rNumber = (float) ($this->shippingNet(2, '.', '')) * $faktor;
|
||||
break;
|
||||
case 'subtotalWithShipping':
|
||||
$rNumber = (float) ($this->subtotalWithShipping(2, '.', '')) * $faktor;
|
||||
break;
|
||||
case 'taxWithShipping':
|
||||
$rNumber = (float) ($this->taxWithShipping(2, '.', '')) * $faktor;
|
||||
break;
|
||||
case 'totalWithShipping':
|
||||
$rNumber = (float) ($this->totalWithShipping(2, '.', '')) * $faktor;
|
||||
break;
|
||||
case 'total':
|
||||
$rNumber = (float) ($this->total(2, '.', '')) * $faktor;
|
||||
break;
|
||||
case 'shipping':
|
||||
$rNumber = (float) ($this->shipping(2, '.', '')) * $faktor;
|
||||
break;
|
||||
}
|
||||
return $this->numberFormat($rNumber, $decimals, $decimalPoint, $thousandSeperator);
|
||||
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
public function getNumComp(){
|
||||
return $this->num_comp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue