// stock : update and bugs fix on supplier order add product interface and supplier order view interface + toolbar bug fix
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9991 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -219,6 +219,7 @@ class SupplierOrderCore extends ObjectModel
|
||||
$this->total_ti = 0;
|
||||
|
||||
$is_discount = false;
|
||||
|
||||
if (is_numeric($this->discount_rate) && (float)$this->discount_rate > 0)
|
||||
$is_discount = true;
|
||||
|
||||
@@ -229,10 +230,7 @@ class SupplierOrderCore extends ObjectModel
|
||||
{
|
||||
// apply global discount rate on each product if possible
|
||||
if ($is_discount)
|
||||
{
|
||||
$entry->applyGlobalDiscount((float)$this->discount_rate);
|
||||
$entry->save();
|
||||
}
|
||||
|
||||
// add new prices to the total
|
||||
$this->total_te += $entry->price_with_discount_te;
|
||||
|
||||
Reference in New Issue
Block a user