GX-Abgewiesen #48185 » OrderTotalDiscountFix.patch
| src/includes/modules/order_total/ot_payment.php (revision ) | ||
|---|---|---|
| 69 | 69 |
'value' => $discount['sum']); |
| 70 | 70 |
} |
| 71 | 71 |
// BOF GM_MOD: |
| 72 |
$order->info['subtotal'] = $order->info['subtotal'] + $discount['sum'];
|
|
| 73 |
$order->info['total'] = $order->info['total'] + $discount['sum'];
|
|
| 72 |
$order->info['subtotal'] = round($order->info['subtotal'] + $discount['sum'],2);
|
|
| 73 |
$order->info['total'] = round($order->info['total'] + $discount['sum'],2);
|
|
| 74 | 74 |
} |
| 75 | 75 |
} |
| 76 | 76 |
} |
| src/includes/modules/order_total/ot_subtotal_no_tax.php (revision ) | ||
|---|---|---|
| 39 | 39 |
global $order, $xtPrice; |
| 40 | 40 |
|
| 41 | 41 |
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
|
| 42 |
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == 1) {
|
|
| 43 |
// BOF GM_MOD: |
|
| 44 |
$sub_total_price = $order->info['subtotal'] + $order->info['deduction']; |
|
| 45 |
$sub_total_price = $sub_total_price - round($sub_total_price / 100 * $_SESSION['customers_status']['customers_status_ot_discount'], 2); |
|
| 46 |
$sub_total_price -= $order->info['deduction']; |
|
| 47 |
} else {
|
|
| 42 |
|
|
| 48 |
$sub_total_price = $order->info['subtotal']; |
|
| 43 |
$sub_total_price = $order->info['subtotal']; |
|
| 49 |
} |
|
| 44 |
|
|
| 50 | 45 |
$this->output[] = array('title' => $this->title . ':',
|
| 51 | 46 |
'text' => '<b>' . $xtPrice->xtcFormat($sub_total_price+($xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true)), true).'</b>', |
| 52 | 47 |
'value' => $xtPrice->xtcFormat($sub_total_price+($xtPrice->xtcFormat($order->info['shipping_cost'], false,0,true)), false)); |
| src/includes/modules/order_total/ot_discount.php (revision ) | ||
|---|---|---|
| 40 | 40 |
if ($_SESSION['customers_status']['customers_status_ot_discount_flag'] == '1' && $_SESSION['customers_status']['customers_status_ot_discount']!='0.00') {
|
| 41 | 41 |
// BOF GM_MOD: |
| 42 | 42 |
$discount_price = round($xtPrice->xtcFormat($order->info['subtotal'], false) / 100 * $_SESSION['customers_status']['customers_status_ot_discount']*-1, 2); |
| 43 |
$order->info['subtotal'] = $order->info['subtotal'] + $discount_price; |
|
| 43 | 44 |
$this->output[] = array('title' => $this->title . ':',
|
| 44 | 45 |
'text' => $xtPrice->xtcFormat($discount_price,true), |
| 45 | 46 |
'value' => $discount_price); |