Fix: Plantage creation produit
This commit is contained in:
parent
e99ae9fc29
commit
5de83d5494
@ -141,12 +141,13 @@ class Product
|
|||||||
{
|
{
|
||||||
$this->errno = 0;
|
$this->errno = 0;
|
||||||
|
|
||||||
|
// Clean parameters
|
||||||
$this->ref = trim(sanitize_string($this->ref));
|
$this->ref = trim(sanitize_string($this->ref));
|
||||||
|
|
||||||
if ($this->tva_tx=='') $this->tva_tx = 0;
|
if ($this->tva_tx=='') $this->tva_tx = 0;
|
||||||
if ($this->price=='') $this->price = 0;
|
if ($this->price=='') $this->price = 0;
|
||||||
if ($this->status=='') $this->status = 0;
|
if ($this->status=='') $this->status = 0;
|
||||||
|
$price_ht=0;
|
||||||
|
$price_ttc=0;
|
||||||
if ($this->price > 0)
|
if ($this->price > 0)
|
||||||
{
|
{
|
||||||
if ($this->price_base_type == 'TTC')
|
if ($this->price_base_type == 'TTC')
|
||||||
@ -161,7 +162,7 @@ class Product
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_syslog("Product::Create ref=".$this->ref." Categorie : ".$this->catid);
|
dolibarr_syslog("Product::Create ref=".$this->ref." price=".$this->price." tva_tx=".$this->tva_tx." Categorie : ".$this->catid);
|
||||||
|
|
||||||
if ($this->ref)
|
if ($this->ref)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -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-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2007 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-2007 Régis Houssin <regis.houssin@cap-networks.com>
|
* Copyright (C) 2005-2007 Régis Houssin <regis.houssin@cap-networks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
@ -96,8 +96,7 @@ if ($_POST["action"] == 'add' && $user->rights->produit->creer)
|
|||||||
{
|
{
|
||||||
if($_POST["price_".$i])
|
if($_POST["price_".$i])
|
||||||
{
|
{
|
||||||
$price = ereg_replace(" ","", $_POST["price_".$i]);
|
$price = price2num($_POST["price_".$i]);
|
||||||
$price = ereg_replace(",",".", $price);
|
|
||||||
$product->multiprices["$i"] = $price;
|
$product->multiprices["$i"] = $price;
|
||||||
$product->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i];
|
$product->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user