1
0
mirror of synced 2025-01-31 07:11:42 +03:00

Fix discount (#48)

This commit is contained in:
Akolzin Dmitry 2018-02-02 12:13:45 +03:00 committed by Alex Lushpai
parent e10d492d94
commit 83cab09013
3 changed files with 3 additions and 3 deletions

View File

@ -368,7 +368,7 @@ if ( ! class_exists( 'WC_Retailcrm_Orders' ) ) :
foreach ($order->get_items() as $item) { foreach ($order->get_items() as $item) {
$uid = ($item['variation_id'] > 0) ? $item['variation_id'] : $item['product_id'] ; $uid = ($item['variation_id'] > 0) ? $item['variation_id'] : $item['product_id'] ;
$price = round($item['line_subtotal'] + $item['line_subtotal_tax'], 2); $price = round(($item['line_subtotal'] / $item->get_quantity()) + ($item['line_subtotal_tax'] / $item->get_quantity()), 2);
$product_price = $item->get_total() ? $item->get_total() / $item->get_quantity() : 0; $product_price = $item->get_total() ? $item->get_total() / $item->get_quantity() : 0;
$product_tax = $item->get_total_tax() ? $item->get_total_tax() / $item->get_quantity() : 0; $product_tax = $item->get_total_tax() ? $item->get_total_tax() / $item->get_quantity() : 0;

View File

@ -1,6 +1,6 @@
<?php <?php
/** /**
* Version: 2.0.4 * Version: 2.0.5
* Plugin Name: WooCommerce RetailCRM * Plugin Name: WooCommerce RetailCRM
* Plugin URI: https://wordpress.org/plugins/woo-retailcrm/ * Plugin URI: https://wordpress.org/plugins/woo-retailcrm/
* Description: Integration plugin for WooCommerce & RetailCRM * Description: Integration plugin for WooCommerce & RetailCRM

View File

@ -15,7 +15,7 @@
* *
* *
* @link https://wordpress.org/plugins/woo-retailcrm/ * @link https://wordpress.org/plugins/woo-retailcrm/
* @since 2.0.4 * @since 2.0.5
* *
* @package RetailCRM * @package RetailCRM
*/ */