Fix: Custom info view in services
In services view, custom info should be hide. Also, Nature field is moved and grouped with product fields
This commit is contained in:
parent
3debd0f49d
commit
c43515f484
@ -1,20 +1,21 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2006 Auguria SARL <info@auguria.org>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2015 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2006 Auguria SARL <info@auguria.org>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2011-2017 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||
* Copyright (C) 2017 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
*
|
||||
* 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
|
||||
@ -1004,15 +1005,6 @@ else
|
||||
print '<input name="desiredstock" type="hidden" value="0">';
|
||||
}
|
||||
|
||||
// Nature
|
||||
if ($type != 1)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="3">';
|
||||
$statutarray=array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
|
||||
print $form->selectarray('finished',$statutarray,GETPOST('finished'),1);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
// Duration
|
||||
if ($type == 1)
|
||||
{
|
||||
@ -1025,8 +1017,14 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($type != 1) // Le poids et le volume ne concerne que les produits et pas les services
|
||||
if ($type != 1) // Nature, Weight and volume only applies to products and not to services
|
||||
{
|
||||
// Nature
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="3">';
|
||||
$statutarray=array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
|
||||
print $form->selectarray('finished',$statutarray,GETPOST('finished'),1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Weight
|
||||
print '<tr><td>'.$langs->trans("Weight").'</td><td colspan="3">';
|
||||
print '<input name="weight" size="4" value="'.GETPOST('weight').'">';
|
||||
@ -1318,15 +1316,6 @@ else
|
||||
print '<input name="desiredstock" type="hidden" value="'.$object->desiredstock.'">';
|
||||
}*/
|
||||
|
||||
// Nature
|
||||
if($object->type!= Product::TYPE_SERVICE)
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="3">';
|
||||
$statutarray=array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
|
||||
print $form->selectarray('finished',$statutarray,$object->finished);
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($object->isService())
|
||||
{
|
||||
// Duration
|
||||
@ -1346,6 +1335,11 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nature
|
||||
print '<tr><td>'.$langs->trans("Nature").'</td><td colspan="3">';
|
||||
$statutarray=array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
|
||||
print $form->selectarray('finished',$statutarray,$object->finished);
|
||||
print '</td></tr>';
|
||||
// Weight
|
||||
print '<tr><td>'.$langs->trans("Weight").'</td><td colspan="3">';
|
||||
print '<input name="weight" size="5" value="'.$object->weight.'"> ';
|
||||
@ -1659,14 +1653,6 @@ else
|
||||
print '<div class="underbanner clearboth"></div>';
|
||||
print '<table class="border tableforfield" width="100%">';
|
||||
|
||||
// Nature
|
||||
if($object->type!= Product::TYPE_SERVICE)
|
||||
{
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td colspan="2">';
|
||||
print $object->getLibFinished();
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($object->isService())
|
||||
{
|
||||
// Duration
|
||||
@ -1685,6 +1671,10 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nature
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Nature").'</td><td colspan="2">';
|
||||
print $object->getLibFinished();
|
||||
print '</td></tr>';
|
||||
// Weight
|
||||
print '<tr><td class="titlefield">'.$langs->trans("Weight").'</td><td colspan="2">';
|
||||
if ($object->weight != '')
|
||||
@ -1756,7 +1746,7 @@ else
|
||||
}
|
||||
|
||||
// Custom code
|
||||
if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO))
|
||||
if (! $object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("CustomCode").'</td><td colspan="2">'.$object->customcode.'</td>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user