//small fix on total_paid_real

This commit is contained in:
vAugagneur
2012-07-05 15:23:45 +00:00
parent 8e2fee146d
commit 61d8ea6f70
+8 -1
View File
@@ -239,7 +239,14 @@ class OrderHistoryCore extends ObjectModel
$payment->payment_method = $payment_method->displayName;
else
$payment->payment_method = null;
// Update total_paid_real value for backward compatibility reasons
if ($payment->id_currency == $order->id_currency)
$order->total_paid_real += $payment->amount;
else
$order->total_paid_real += Tools::ps_round(Tools::convertPrice($payment->amount, $payment->id_currency, false), 2);
$order->save();
$payment->conversion_rate = 1;
$payment->save();
Db::getInstance()->execute('