MwSt
This commit is contained in:
parent
9ed251820e
commit
da08e9ff37
13 changed files with 378 additions and 56 deletions
|
|
@ -32,7 +32,8 @@ class CardController extends Controller
|
|||
if($product->images->count()){
|
||||
$image = $product->images->first()->slug;
|
||||
}
|
||||
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product_slug, 'weight' => $product->weight]);
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product_slug, 'weight' => $product->weight]);
|
||||
Yard::setTax($cartItem->rowId, $product->tax);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
|
||||
\Session()->flash('show-card-after-add', true);
|
||||
|
|
@ -53,7 +54,8 @@ class CardController extends Controller
|
|||
$image = $product->images->first()->slug;
|
||||
}
|
||||
$quantity = Request::get('quantity') ? Request::get('quantity') : 1;
|
||||
Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
|
||||
$cartItem = Yard::instance('shopping')->add($product->id, $product->getLang('name'), $quantity, $product->price, ['image' => $image, 'slug' => $product->slug, 'weight' => $product->weight]);
|
||||
Yard::setTax($cartItem->rowId, $product->tax);
|
||||
Yard::instance('shopping')->reCalculateShippingPrice();
|
||||
|
||||
\Session()->flash('show-card-after-add', true);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ class CheckoutController extends Controller
|
|||
if(Request::get('payment_method') === 'elv' && is_null(Request::get('mandate_identification'))){
|
||||
$pay = new PayoneController();
|
||||
$pay->init($shopping_user, $shopping_order);
|
||||
$amount = (int) (float) Yard::instance('shopping')->totalWithShipping(2, '.', '') *100;
|
||||
$amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100;
|
||||
$ret['elv'] = $pay->checkBankAccount($data, $amount, 'EUR', $shopping_user);
|
||||
|
||||
if($ret['elv']['status'] === 'ERROR' || $ret['elv']['status'] === 'INVALID'){
|
||||
|
|
@ -214,7 +214,7 @@ class CheckoutController extends Controller
|
|||
//other
|
||||
$pay = new PayoneController();
|
||||
$pay->init($shopping_user, $shopping_order);
|
||||
$amount = (int) (float) Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100;
|
||||
$amount = Yard::instance('shopping')->totalWithShipping(2, '.', '') * 100;
|
||||
$reference = $pay->setPrePayment(Request::get('payment_method'), $amount, 'EUR', $ret);
|
||||
$this->putPayments('payment_reference', $reference);
|
||||
$pay->setPersonalData();
|
||||
|
|
@ -333,7 +333,7 @@ class CheckoutController extends Controller
|
|||
'total' => Yard::instance('shopping')->total(2, '.', ''),
|
||||
'shipping' => Yard::instance('shopping')->shipping(2, '.', ','),
|
||||
'subtotal' => Yard::instance('shopping')->subtotalWithShipping(2, '.', ''),
|
||||
'tax_rate' => Yard::getTaxRate(),
|
||||
//'tax_rate' => Yard::getTaxRate(),
|
||||
'tax' => Yard::instance('shopping')->taxWithShipping(2, '.', ''),
|
||||
'total_shipping' => Yard::instance('shopping')->totalWithShipping(2, '.', ''),
|
||||
'weight' => Yard::instance('shopping')->weight(),
|
||||
|
|
@ -364,6 +364,7 @@ class CheckoutController extends Controller
|
|||
'product_id' => $item->id,
|
||||
'qty' => $item->qty,
|
||||
'price' => $item->price,
|
||||
'tax_rate' => $item->taxRate,
|
||||
'slug' => $item->options->slug,
|
||||
])->save();
|
||||
return false;
|
||||
|
|
@ -380,6 +381,7 @@ class CheckoutController extends Controller
|
|||
'product_id' => $item->id,
|
||||
'qty' => $item->qty,
|
||||
'price' => $item->price,
|
||||
'tax_rate' => $item->taxRate,
|
||||
'slug' => $item->options->slug
|
||||
]);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue