Qual: Simplify and fix multiprice management
This commit is contained in:
parent
aa23471000
commit
d724ee4427
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -15,17 +15,13 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* $Source$
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/expedition/stats/index.php
|
\file htdocs/expedition/stats/index.php
|
||||||
\ingroup expedition
|
\ingroup expedition
|
||||||
\brief Page des stats expeditions
|
\brief Page des stats expeditions
|
||||||
\version $Revision$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
@ -59,7 +55,7 @@ if ($db->query($sql))
|
|||||||
}
|
}
|
||||||
$db->free();
|
$db->free();
|
||||||
|
|
||||||
print '</table><br><i>Statistiques effectuées sur les expéditions validées uniquement</i>';
|
print '</table><br><i>Statistiques effectuees sur les expeditions validees uniquement</i>';
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -63,7 +63,7 @@ if (! $mesg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
print '<tr><td align="center">Nombre d\'expédition par mois</td>';
|
print '<tr><td align="center">Nombre d expedition par mois</td>';
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<img src="'.$fileurl.'">';
|
print '<img src="'.$fileurl.'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -71,5 +71,5 @@ print '</table>';
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -844,22 +844,9 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$product->libelle.'</td></tr>';
|
||||||
|
|
||||||
// MultiPrix
|
// MultiPrix
|
||||||
if($conf->global->PRODUIT_MULTIPRICES == 1)
|
if($conf->global->PRODUIT_MULTIPRICES)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("SellingPrice").' 1</td>';
|
for ($i=1; $i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++)
|
||||||
|
|
||||||
if ($product->price_base_type == 'TTC')
|
|
||||||
{
|
|
||||||
print '<td>'.price($product->price_ttc);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td>'.price($product->price);
|
|
||||||
}
|
|
||||||
|
|
||||||
print ' '.$langs->trans($product->price_base_type);
|
|
||||||
print '</td></tr>';
|
|
||||||
for($i=2;$i<=$conf->global->PRODUIT_MULTIPRICES_LIMIT;$i++)
|
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("SellingPrice").' '.$i.'</td>';
|
print '<tr><td>'.$langs->trans("SellingPrice").' '.$i.'</td>';
|
||||||
|
|
||||||
@ -880,13 +867,24 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
{
|
{
|
||||||
print ' '.$langs->trans($product->price_base_type);
|
print ' '.$langs->trans($product->price_base_type);
|
||||||
}
|
}
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Prix mini
|
||||||
|
print '<tr><td>'.$langs->trans("MinPrice").' '.$i.'</td><td>';
|
||||||
|
if ($product->multiprices_base_type["$i"] == 'TTC')
|
||||||
|
{
|
||||||
|
print price($product->multiprices_min_ttc["$i"]).' '.$langs->trans($product->multiprices_base_type["$i"]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print price($product->multiprices_min["$i"]).' '.$langs->trans($product->multiprices_base_type["$i"]);
|
||||||
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Prix
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// Prix
|
||||||
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td>';
|
print '<tr><td>'.$langs->trans("SellingPrice").'</td><td>';
|
||||||
if ($product->price_base_type == 'TTC')
|
if ($product->price_base_type == 'TTC')
|
||||||
{
|
{
|
||||||
@ -897,7 +895,6 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print price($product->price).' '.$langs->trans($product->price_base_type);
|
print price($product->price).' '.$langs->trans($product->price_base_type);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
|
||||||
|
|
||||||
// Prix mini
|
// Prix mini
|
||||||
print '<tr><td>'.$langs->trans("MinPrice").'</td><td>';
|
print '<tr><td>'.$langs->trans("MinPrice").'</td><td>';
|
||||||
@ -910,6 +907,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print price($product->price_min).' '.$langs->trans($product->price_base_type);
|
print price($product->price_min).' '.$langs->trans($product->price_base_type);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// TVA
|
// TVA
|
||||||
print '<tr><td>'.$langs->trans("VATRate").'</td><td>'.vatrate($product->tva_tx,true).'</td></tr>';
|
print '<tr><td>'.$langs->trans("VATRate").'</td><td>'.vatrate($product->tva_tx,true).'</td></tr>';
|
||||||
|
|||||||
@ -156,7 +156,7 @@ if ($conf->global->PRODUIT_MULTIPRICES)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Prix minimum
|
// Prix minimum
|
||||||
print '<tr><td>'.$langs->trans("MinPrice").'</td><td>';
|
print '<tr><td>'.$langs->trans("MinPrice").' '.$i.'</td><td>';
|
||||||
if ($product->multiprices_base_type["$i"] == 'TTC')
|
if ($product->multiprices_base_type["$i"] == 'TTC')
|
||||||
{
|
{
|
||||||
print price($product->multiprices_min_ttc["$i"]).' '.$langs->trans($product->multiprices_base_type["$i"]);
|
print price($product->multiprices_min_ttc["$i"]).' '.$langs->trans($product->multiprices_base_type["$i"]);
|
||||||
@ -314,7 +314,7 @@ if ($_GET["action"] == 'edit_price' && $user->rights->produit->creer)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
$text=$langs->trans('MinPrice') ;
|
$text=$langs->trans('MinPrice').' '.$i;
|
||||||
print $html->textwithhelp($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),$direction=1,$usehelpcursor=1);
|
print $html->textwithhelp($text,$langs->trans("PrecisionUnitIsLimitedToXDecimals",$conf->global->MAIN_MAX_DECIMALS_UNIT),$direction=1,$usehelpcursor=1);
|
||||||
if ($product->multiprices_base_type["$i"] == 'TTC')
|
if ($product->multiprices_base_type["$i"] == 'TTC')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -19,11 +19,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\file htdocs/product/reassort.php
|
* \file htdocs/product/reassort.php
|
||||||
\ingroup produit
|
* \ingroup produit
|
||||||
\brief Page liste des produits ou services
|
* \brief Page liste des produits ou services
|
||||||
\version $Id$
|
* \version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/product.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/product.class.php');
|
||||||
@ -33,7 +33,7 @@ $langs->load("products");
|
|||||||
$langs->load("stocks");
|
$langs->load("stocks");
|
||||||
|
|
||||||
if (!$user->rights->produit->lire)
|
if (!$user->rights->produit->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
$sref=isset($_GET["sref"])?$_GET["sref"]:$_POST["sref"];
|
$sref=isset($_GET["sref"])?$_GET["sref"]:$_POST["sref"];
|
||||||
@ -275,11 +275,11 @@ if ($resql)
|
|||||||
{
|
{
|
||||||
if ($sref || $snom || $sall || $_POST["search"])
|
if ($sref || $snom || $sall || $_POST["search"])
|
||||||
{
|
{
|
||||||
print_barre_liste($texte, $page, "reassort.php", "&sref=".$sref."&snom=".$snom."&sall=".$sall."&envente=".$_POST["envente"], $sortfield, $sortorder,'',$num);
|
print_barre_liste('', $page, "reassort.php", "&sref=".$sref."&snom=".$snom."&sall=".$sall."&envente=".$_POST["envente"], $sortfield, $sortorder,'',$num, 0, '');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print_barre_liste($texte, $page, "reassort.php", "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num);
|
print_barre_liste('', $page, "reassort.php", "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num, 0, '');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
|
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
|
||||||
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
@ -130,10 +130,11 @@ llxHeader("","",$langs->trans("WarehouseCard"));
|
|||||||
|
|
||||||
if ($_GET["action"] == 'create')
|
if ($_GET["action"] == 'create')
|
||||||
{
|
{
|
||||||
|
print_fiche_titre($langs->trans("NewWarehouse"));
|
||||||
|
|
||||||
print "<form action=\"fiche.php\" method=\"post\">\n";
|
print "<form action=\"fiche.php\" method=\"post\">\n";
|
||||||
print '<input type="hidden" name="action" value="add">';
|
print '<input type="hidden" name="action" value="add">';
|
||||||
print '<input type="hidden" name="type" value="'.$type.'">'."\n";
|
print '<input type="hidden" name="type" value="'.$type.'">'."\n";
|
||||||
print_titre($langs->trans("NewWarehouse"));
|
|
||||||
|
|
||||||
if ($mesg)
|
if ($mesg)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user