Fix: price should not be lower than min price.

This commit is contained in:
Laurent Destailleur 2013-11-06 19:31:13 +01:00
parent 4c4064d7b9
commit 94afc84a0c
2 changed files with 6 additions and 1 deletions

View File

@ -1011,6 +1011,11 @@ class Product extends CommonObject
// Check parameters // Check parameters
if ($newvat == '') $newvat=$this->tva_tx; if ($newvat == '') $newvat=$this->tva_tx;
if (! empty($newminprice) && ($newminprice > $newprice))
{
$this->error='ErrorPricCanBeLowerThanMinPrice';
return -1;
}
if ($newprice!='' || $newprice==0) if ($newprice!='' || $newprice==0)
{ {

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>