Better management of price of subproducts feature
This commit is contained in:
parent
8b60c79033
commit
a0358dc0c2
@ -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-2014 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-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
@ -341,6 +341,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
if ($value['level'] <= 1)
|
if ($value['level'] <= 1)
|
||||||
{
|
{
|
||||||
|
$notdefined=0;
|
||||||
$productstatic->ref=$value['fullpath'];
|
$productstatic->ref=$value['fullpath'];
|
||||||
print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].') </td>';
|
print '<td>'.$productstatic->getNomUrl(1,'composition').' ('.$value['nb'].') </td>';
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
@ -348,12 +349,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
print $langs->trans("BuyingPriceMinShort").': ';
|
print $langs->trans("BuyingPriceMinShort").': ';
|
||||||
if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0,0);
|
if ($product_fourn->product_fourn_price_id > 0) print $product_fourn->display_price_product_fournisseur(0,0);
|
||||||
else print $langs->trans("NotDefined");
|
else { print $langs->trans("NotDefined"); $notdefined=1; }
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
$totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT');
|
$totalline=price2num($value['nb'] * $product_fourn->fourn_unitprice, 'MT');
|
||||||
$total+=$totalline;
|
$total+=$totalline;
|
||||||
print '<td align="right">'.price($totalline,'','',0,0,-1,$conf->currency).'</td>';
|
print '<td align="right">'.($notdefined?'':price($totalline,'','',0,0,-1,$conf->currency)).'</td>';
|
||||||
if (! empty($conf->stock->enabled)) print '<td align="right">'.$langs->trans("Stock").': '.$value['stock'].'</td>'; // Real stock
|
if (! empty($conf->stock->enabled)) print '<td align="right">'.$langs->trans("Stock").': '.$value['stock'].'</td>'; // Real stock
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -361,7 +362,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
for ($i=0; $i < $value['level']; $i++)
|
for ($i=0; $i < $value['level']; $i++)
|
||||||
{
|
{
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
print $productstatic->getNomUrl(1,'composition').' ('.$value['nb'].') </td>';
|
print $productstatic->getNomUrl(1,'composition').' ('.$value['nb'].') </td>';
|
||||||
print '<td><td>';
|
print '<td><td>';
|
||||||
@ -544,26 +545,6 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ************************************************************************** */
|
|
||||||
/* */
|
|
||||||
/* Barre d'action */
|
|
||||||
/* */
|
|
||||||
/* ************************************************************************** */
|
|
||||||
/*
|
|
||||||
print "\n<div class=\"tabsAction\">\n";
|
|
||||||
|
|
||||||
if ($action == '')
|
|
||||||
{
|
|
||||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
|
||||||
{
|
|
||||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/composition/fiche.php?action=edit&id='.$productid.'">'.$langs->trans("EditAssociate").'</a>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print "\n</div>\n";
|
|
||||||
*/
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user