From 27ca6d965242e741abc91ff25f85d14c7b27a1b7 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Thu, 1 Feb 2018 16:10:48 +0100 Subject: [PATCH] Use carrier_tax_rate --- cron_export_sales_monthly.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cron_export_sales_monthly.php b/cron_export_sales_monthly.php index 04fa5a7..90e003b 100644 --- a/cron_export_sales_monthly.php +++ b/cron_export_sales_monthly.php @@ -478,7 +478,7 @@ if ($orderNb > 0) { $_total_products_wo_taxes_40, $_total_taxes_40, $_total_products_wo_taxes_export, - ($address['id_country'] != 19 ? (float) $order['total_shipping'] / (strtotime($order['date_add']) >= mktime(0, 0, 0, 1, 1, 2014) ? 1.2 : 1.196) : 0.0), + ($address['id_country'] != 19 ? (float) $order['total_shipping'] / ( 1 + $order['carrier_tax_rate'] / 100) : 0.0), ($address['id_country'] != 19 ? 0.0 : $order['total_shipping']), $country, $order['total_discounts'], @@ -852,7 +852,7 @@ if($slipNb > 0) { $_total_products_wo_taxes_export = 0.0; foreach($total_products_wo_taxes_export as $value) { - $_total_products_wo_taxes_export += $value; + //$_total_products_wo_taxes_export += $value; } $refundreason = Db::getInstance()->getValue(' @@ -912,7 +912,7 @@ if($slipNb > 0) { '-'.$_total_products_wo_taxes_40, '-'.$_total_taxes_40, '-'.$_total_products_wo_taxes_export, - '-'.($slip['shipping_cost'] == 1 ? ($address['id_country'] != 19 ? (float) $order['total_shipping'] / (strtotime($order['date_add']) >= mktime(0, 0, 0, 1, 1, 2014) ? 1.2 : 1.196) : 0.0) : 0.0), + '-'.($slip['shipping_cost'] == 1 ? ($address['id_country'] != 19 ? (float) $order['total_shipping'] / (1 + $order['carrier_tax_rate'] / 100) : 0.0) : 0.0), '-'.($slip['shipping_cost'] == 1 ? ($address['id_country'] != 19 ? 0.0 : $order['total_shipping']) : 0.0), $country, '-0.0',