Merge pull request #7411 from joseplluis/patch-1
Fix: Custom info view in services
This commit is contained in:
commit
ce8caabd62
@ -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@inodbox.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-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* 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>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -1020,21 +1021,12 @@ 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)
|
||||
{
|
||||
print '<tr><td>' . $langs->trans("Duration") . '</td><td colspan="3"><input name="duration_value" size="6" maxlength="5" value="' . $duration_value . '"> ';
|
||||
print '<input name="duration_unit" type="radio" value="i">'.$langs->trans("Minute").' ';
|
||||
print '<input name="duration_unit" type="radio" value="h">'.$langs->trans("Hour").' ';
|
||||
print '<input name="duration_unit" type="radio" value="h">'.$langs->trans("Hour").' ';
|
||||
print '<input name="duration_unit" type="radio" value="d">'.$langs->trans("Day").' ';
|
||||
print '<input name="duration_unit" type="radio" value="w">'.$langs->trans("Week").' ';
|
||||
print '<input name="duration_unit" type="radio" value="m">'.$langs->trans("Month").' ';
|
||||
@ -1042,8 +1034,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','alpha'), 1);
|
||||
print '</td></tr>';
|
||||
|
||||
// Weight
|
||||
print '<tr><td>'.$langs->trans("Weight").'</td><td colspan="3">';
|
||||
print '<input name="weight" size="4" value="'.GETPOST('weight').'">';
|
||||
@ -1375,7 +1373,7 @@ else
|
||||
|
||||
// Public Url
|
||||
print '<tr><td>'.$langs->trans("PublicUrl").'</td><td colspan="3">';
|
||||
print '<input type="text" name="url" class="quatrevingtpercent" value="'.$object->url.'">';
|
||||
print '<input type="text" name="url" class="quatrevingtpercent" value="'.$object->url.'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Stock
|
||||
@ -1403,22 +1401,13 @@ 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
|
||||
print '<tr><td>'.$langs->trans("Duration").'</td><td colspan="3"><input name="duration_value" size="3" maxlength="5" value="'.$object->duration_value.'">';
|
||||
print ' ';
|
||||
print '<input name="duration_unit" type="radio" value="i"'.($object->duration_unit=='i'?' checked':'').'>'.$langs->trans("Minute");
|
||||
print ' ';
|
||||
print ' ';
|
||||
print '<input name="duration_unit" type="radio" value="h"'.($object->duration_unit=='h'?' checked':'').'>'.$langs->trans("Hour");
|
||||
print ' ';
|
||||
print '<input name="duration_unit" type="radio" value="d"'.($object->duration_unit=='d'?' checked':'').'>'.$langs->trans("Day");
|
||||
@ -1431,7 +1420,13 @@ else
|
||||
print '</td></tr>';
|
||||
}
|
||||
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.'"> ';
|
||||
@ -1439,13 +1434,13 @@ else
|
||||
print '</td></tr>';
|
||||
if (empty($conf->global->PRODUCT_DISABLE_SIZE))
|
||||
{
|
||||
// Length
|
||||
print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">';
|
||||
print '<input name="size" size="5" value="'.$object->length.'">x';
|
||||
print '<input name="sizewidth" size="5" value="'.$object->width.'">x';
|
||||
print '<input name="sizeheight" size="5" value="'.$object->height.'"> ';
|
||||
print $formproduct->select_measuring_units("size_units", "size", $object->length_units);
|
||||
print '</td></tr>';
|
||||
// Length
|
||||
print '<tr><td>'.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").'</td><td colspan="3">';
|
||||
print '<input name="size" size="5" value="'.$object->length.'">x';
|
||||
print '<input name="sizewidth" size="5" value="'.$object->width.'">x';
|
||||
print '<input name="sizeheight" size="5" value="'.$object->height.'"> ';
|
||||
print $formproduct->select_measuring_units("size_units", "size", $object->length_units);
|
||||
print '</td></tr>';
|
||||
}
|
||||
if (empty($conf->global->PRODUCT_DISABLE_SURFACE))
|
||||
{
|
||||
@ -1823,14 +1818,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
|
||||
@ -1849,6 +1836,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 != '')
|
||||
@ -1920,7 +1911,7 @@ else
|
||||
}
|
||||
|
||||
// Custom code
|
||||
if (! $object->isService() && 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