Correction anomalie 0000022 soumise le 16/04/2020 : Encore des problèmes de calcul de la TVA
This commit is contained in:
@@ -60,7 +60,8 @@ class PrelevementSepaValidationModuleFrontController extends ModuleFrontControll
|
|||||||
}
|
}
|
||||||
|
|
||||||
$currency = $this->context->currency;
|
$currency = $this->context->currency;
|
||||||
$total = (float)$cart->getOrderTotal(true, Cart::BOTH);
|
$total = (float) $cart->getOrderTotal(false, Cart::BOTH) * 1.20;
|
||||||
|
// $total = (float)$cart->getOrderTotal(true, Cart::BOTH);
|
||||||
|
|
||||||
$this->module->validateOrder(
|
$this->module->validateOrder(
|
||||||
(int)$cart->id,
|
(int)$cart->id,
|
||||||
|
|||||||
@@ -777,7 +777,9 @@ class PrelevementSEPA extends PaymentModule
|
|||||||
$cart = $this->context->cart;
|
$cart = $this->context->cart;
|
||||||
$total = sprintf(
|
$total = sprintf(
|
||||||
$this->trans('%1$s (tax incl.)', array(), 'Modules.PrelevementSEPA.Shop'),
|
$this->trans('%1$s (tax incl.)', array(), 'Modules.PrelevementSEPA.Shop'),
|
||||||
Tools::displayPrice($cart->getOrderTotal(true, Cart::BOTH))
|
/* TheCoreDev le 16/04/2020 : Toujours le pb de calcul de la TVA --> finalement, on prend le HT et on le multiple par 1.2
|
||||||
|
Tools::displayPrice($cart->getOrderTotal(true, Cart::BOTH)) */
|
||||||
|
Tools::displayPrice($cart->getOrderTotal(false, Cart::BOTH) * 1.20)
|
||||||
);
|
);
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|||||||
@@ -267,7 +267,9 @@ class Ps_Checkpayment extends PaymentModule
|
|||||||
$total = $this->trans(
|
$total = $this->trans(
|
||||||
'%amount% (tax incl.)',
|
'%amount% (tax incl.)',
|
||||||
array(
|
array(
|
||||||
'%amount%' => Tools::displayPrice($cart->getOrderTotal(true, Cart::BOTH)),
|
'%amount%' => Tools::displayPrice($cart->getOrderTotal(false, Cart::BOTH) * 1.20),
|
||||||
|
/* TheCoreDev le 16/04/2020 : Toujours le pb de calcul de la TVA (ano n°0000022) --> on utilise finalement le HT que l'on multiple par 1.2
|
||||||
|
'%amount%' => Tools::displayPrice($cart->getOrderTotal(true, Cart::BOTH)), */
|
||||||
),
|
),
|
||||||
'Modules.Checkpayment.Admin'
|
'Modules.Checkpayment.Admin'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ abstract class PaymentModule extends PaymentModuleCore
|
|||||||
$amount_paid = !$dont_touch_amount ? Tools::ps_round((float) $amount_paid, 2) : $amount_paid;
|
$amount_paid = !$dont_touch_amount ? Tools::ps_round((float) $amount_paid, 2) : $amount_paid;
|
||||||
$order->total_paid_real = 0;
|
$order->total_paid_real = 0;
|
||||||
$order->total_products = (float) $this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier);
|
$order->total_products = (float) $this->context->cart->getOrderTotal(false, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier);
|
||||||
$order->total_products_wt = (float) $this->context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier);
|
$order->total_products_wt = (float) $order->total_products * 1.2;
|
||||||
$order->total_discounts_tax_excl = (float) abs($this->context->cart->getOrderTotal(false, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier));
|
$order->total_discounts_tax_excl = (float) abs($this->context->cart->getOrderTotal(false, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier));
|
||||||
$order->total_discounts_tax_incl = (float) abs($this->context->cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier));
|
$order->total_discounts_tax_incl = (float) abs($this->context->cart->getOrderTotal(true, Cart::ONLY_DISCOUNTS, $order->product_list, $id_carrier));
|
||||||
$order->total_discounts = $order->total_discounts_tax_incl;
|
$order->total_discounts = $order->total_discounts_tax_incl;
|
||||||
@@ -236,12 +236,18 @@ abstract class PaymentModule extends PaymentModuleCore
|
|||||||
$order->total_wrapping_tax_incl = (float) abs($this->context->cart->getOrderTotal(true, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier));
|
$order->total_wrapping_tax_incl = (float) abs($this->context->cart->getOrderTotal(true, Cart::ONLY_WRAPPING, $order->product_list, $id_carrier));
|
||||||
$order->total_wrapping = $order->total_wrapping_tax_incl;
|
$order->total_wrapping = $order->total_wrapping_tax_incl;
|
||||||
$order->total_paid_tax_excl = (float) Tools::ps_round((float) $this->context->cart->getOrderTotal(false, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_);
|
$order->total_paid_tax_excl = (float) Tools::ps_round((float) $this->context->cart->getOrderTotal(false, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_);
|
||||||
$order->total_paid_tax_incl = (float) Tools::ps_round((float) $this->context->cart->getOrderTotal(true, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_);
|
$order->total_paid_tax_incl = (float) $order->total_paid_tax_excl * 1.2;
|
||||||
$total_in_order = $order->total_paid_tax_incl;
|
$total_in_order = $order->total_paid_tax_incl;
|
||||||
$order->total_paid = (float) Tools::ps_round((float) $this->context->cart->getOrderTotalGross(true, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_); //$order->total_paid_tax_incl;
|
$order->total_paid = (float) $order->total_paid_tax_incl;
|
||||||
$order->round_mode = Configuration::get('PS_PRICE_ROUND_MODE');
|
$order->round_mode = Configuration::get('PS_PRICE_ROUND_MODE');
|
||||||
$order->invoice_date = '0000-00-00 00:00:00';
|
$order->invoice_date = '0000-00-00 00:00:00';
|
||||||
$order->delivery_date = '0000-00-00 00:00:00';
|
$order->delivery_date = '0000-00-00 00:00:00';
|
||||||
|
|
||||||
|
/* TheCoreDev le 16/04/2020 : Toujours le pb de calcul de la TVA (ano n°0000022) --> on utilise finalement le HT que l'on multiple par 1.2
|
||||||
|
$order->total_products_wt = (float) $this->context->cart->getOrderTotal(true, Cart::ONLY_PRODUCTS, $order->product_list, $id_carrier);
|
||||||
|
$order->total_paid_tax_incl = (float) Tools::ps_round((float) $this->context->cart->getOrderTotal(true, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_);
|
||||||
|
$order->total_paid = (float) Tools::ps_round((float) $this->context->cart->getOrderTotalGross(true, Cart::BOTH, $order->product_list, $id_carrier), _PS_PRICE_COMPUTE_PRECISION_); //$order->total_paid_tax_incl;
|
||||||
|
*/
|
||||||
if (self::DEBUG_MODE) {
|
if (self::DEBUG_MODE) {
|
||||||
PrestaShopLogger::addLog('PaymentModule::validateOrder - Order is about to be added', 1, null, 'Cart', (int) $id_cart, true);
|
PrestaShopLogger::addLog('PaymentModule::validateOrder - Order is about to be added', 1, null, 'Cart', (int) $id_cart, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user