Simplification gestion des lignes factures/commandes/propales
This commit is contained in:
parent
d0e2bfb024
commit
8d7bb266ef
@ -234,6 +234,7 @@ print '</form>';
|
|||||||
|
|
||||||
|
|
||||||
// Modification description produit activation/desactivation
|
// Modification description produit activation/desactivation
|
||||||
|
/* Cet option ne doit pas exister. Les description de lignes doivent toujours etre modifiable.
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<form method=\"post\" action=\"produit.php\">";
|
print "<form method=\"post\" action=\"produit.php\">";
|
||||||
print "<input type=\"hidden\" name=\"action\" value=\"changeproductdesc\">";
|
print "<input type=\"hidden\" name=\"action\" value=\"changeproductdesc\">";
|
||||||
@ -246,6 +247,7 @@ print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">'
|
|||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
*/
|
||||||
|
|
||||||
// Visualiser description produit dans les formulaires activation/desactivation
|
// Visualiser description produit dans les formulaires activation/desactivation
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|||||||
@ -536,16 +536,9 @@ if ($_POST['action'] == "addligne" && $user->rights->propale->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// La description de la ligne est celle saisie ou
|
$desc = $prod->description;
|
||||||
// celle du produit si PRODUIT_CHANGE_PROD_DESC est défini
|
$desc.= $prod->description && $_POST['np_desc'] ? "\n" : "";
|
||||||
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
$desc.= $_POST['np_desc'];
|
||||||
{
|
|
||||||
$desc = $prod->description;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$desc = $_POST['np_desc'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1085,30 +1078,19 @@ if ($_GET['propalid'] > 0)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
||||||
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
|
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
|
||||||
|
|
||||||
|
// Affiche ligne produit
|
||||||
|
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
|
||||||
if ($objp->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
if ($objp->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
||||||
else $text.= img_object($langs->trans('ShowProduct'),'product');
|
else $text.= img_object($langs->trans('ShowProduct'),'product');
|
||||||
$text.= ' '.$objp->ref.'</a>';
|
$text.= ' '.$objp->ref.'</a>';
|
||||||
$text.= ' - '.nl2br(stripslashes($objp->product));
|
$text.= ' - '.$objp->product;
|
||||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':$objp->description);
|
||||||
{
|
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||||
print $text;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $html->textwithtooltip($text,$objp->description,4,'','',$i,500,100,$objp->ref.' - '.nl2br(stripslashes($objp->product)));
|
|
||||||
}
|
|
||||||
print_date_range($objp->date_start,$objp->date_end);
|
print_date_range($objp->date_start,$objp->date_end);
|
||||||
|
|
||||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
||||||
{
|
{
|
||||||
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):'';
|
||||||
{
|
|
||||||
print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):'';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br>'.nl2br($objp->product_desc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -20,7 +20,6 @@
|
|||||||
* 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$
|
* $Id$
|
||||||
* $Source$
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -352,18 +351,9 @@ if ($_POST['action'] == 'addligne' && $user->rights->commande->creer)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// La description de la ligne est celle saisie ou
|
$desc = $prod->description;
|
||||||
// celle du produit si PRODUIT_CHANGE_PROD_DESC est défini
|
$desc.= $prod->description && $_POST['np_desc'] ? "\n" : "";
|
||||||
$libelle = $prod->libelle;
|
$desc.= $_POST['np_desc'];
|
||||||
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
|
||||||
{
|
|
||||||
$desc = $prod->description;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$desc = $_POST['np_desc'];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1343,32 +1333,20 @@ else
|
|||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
||||||
|
|
||||||
|
// Affiche ligne produit
|
||||||
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
|
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
|
||||||
if ($objp->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
if ($objp->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
||||||
else $text.= img_object($langs->trans('ShowProduct'),'product');
|
else $text.= img_object($langs->trans('ShowProduct'),'product');
|
||||||
$text.= ' '.$objp->ref.'</a>';
|
$text.= ' '.$objp->ref.'</a>';
|
||||||
$text.= ' - '.nl2br(stripslashes($objp->product));
|
$text.= ' - '.$objp->product;
|
||||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':$objp->description);
|
||||||
{
|
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||||
print $text;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $html->textwithtooltip($text,$objp->description,4,'','',$i,$objp->ref.' - '.nl2br(stripslashes($objp->product)));
|
|
||||||
}
|
|
||||||
// Todo: voir si on insert ou pas en option les dates de début et de fin de service
|
// Todo: voir si on insert ou pas en option les dates de début et de fin de service
|
||||||
//print_date_range($objp->date_start,$objp->date_end);
|
//print_date_range($objp->date_start,$objp->date_end);
|
||||||
|
|
||||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
||||||
{
|
{
|
||||||
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):'';
|
||||||
{
|
|
||||||
print ($objp->description && $objp->description!=$objp->product)?'<br>'.nl2br(stripslashes($objp->description)):'';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br>'.nl2br($objp->product_desc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -802,16 +802,9 @@ if (($_POST['action'] == 'addligne' || $_POST['action'] == 'addligne_predef') &&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// La description de la ligne est celle saisie ou
|
$desc = $prod->description;
|
||||||
// celle du produit si PRODUIT_CHANGE_PROD_DESC défini
|
$desc.= $prod->description && $_POST['np_desc'] ? "\n" : "";
|
||||||
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
$desc.= $_POST['np_desc'];
|
||||||
{
|
|
||||||
$desc = $prod->description;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$desc=$_POST['np_desc'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2248,31 +2241,19 @@ else
|
|||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
print '<a name="'.$objp->rowid.'"></a>'; // ancre pour retourner sur la ligne
|
||||||
|
|
||||||
|
// Affiche ligne produit
|
||||||
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
|
$text = '<a href="'.DOL_URL_ROOT.'/product/fiche.php?id='.$objp->fk_product.'">';
|
||||||
if ($objp->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
if ($objp->fk_product_type==1) $text.= img_object($langs->trans('ShowService'),'service');
|
||||||
else $text.= img_object($langs->trans('ShowProduct'),'product');
|
else $text.= img_object($langs->trans('ShowProduct'),'product');
|
||||||
$text.= ' '.$objp->ref.'</a>';
|
$text.= ' '.$objp->ref.'</a>';
|
||||||
$text.= ' - '.nl2br(stripslashes($objp->product));
|
$text.= ' - '.$objp->product;
|
||||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':$objp->description);
|
||||||
{
|
print $html->textwithtooltip($text,$description,3,'','',$i);
|
||||||
print $text;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print $html->textwithtooltip($text,$objp->description,4,'','',$i,$objp->ref.' - '.nl2br(stripslashes($objp->product)));
|
|
||||||
}
|
|
||||||
print_date_range($objp->date_start,$objp->date_end);
|
print_date_range($objp->date_start,$objp->date_end);
|
||||||
|
|
||||||
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
if ($conf->global->PRODUIT_DESC_IN_FORM)
|
||||||
{
|
{
|
||||||
if ($conf->global->PRODUIT_CHANGE_PROD_DESC)
|
print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):'';
|
||||||
{
|
|
||||||
print ($objp->description && $objp->description!=$objp->product)?'<br>'.stripslashes(nl2br($objp->description)):'';
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br>'.nl2br($objp->product_desc);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -116,14 +116,9 @@ if ($_POST['action'] == 'addligne' && $user->rights->fournisseur->commande->cree
|
|||||||
|
|
||||||
$libelle = $prod->libelle;
|
$libelle = $prod->libelle;
|
||||||
|
|
||||||
// La description de la ligne est celle saisie ou
|
$desc = $prod->description;
|
||||||
// celle du produit si (non saisi + PRODUIT_CHANGE_PROD_DESC défini)
|
$desc.= $prod->description && $_POST['np_desc'] ? "\n" : "";
|
||||||
// \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on
|
$desc.= $_POST['np_desc'];
|
||||||
$desc=$_POST['np_desc'];
|
|
||||||
if (! $desc && $conf->global->PRODUIT_CHANGE_PROD_DESC)
|
|
||||||
{
|
|
||||||
$desc = $prod->description;
|
|
||||||
}
|
|
||||||
|
|
||||||
$tva_tx = get_default_tva($soc,$mysoc,$prod->tva_tx);
|
$tva_tx = get_default_tva($soc,$mysoc,$prod->tva_tx);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,15 +65,15 @@ class Form
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\brief Affiche un texte+picto avec tooltip sur texte ou sur picto
|
\brief Affiche un texte+picto avec tooltip sur texte ou sur picto
|
||||||
\param text Texte à afficher
|
\param text Texte à afficher
|
||||||
\param htmltext Contenu html du tooltip, codé en html
|
\param htmltext Contenu html du tooltip, codé en html
|
||||||
\param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2, 4=tooltip Ajax
|
\param tooltipon 1=tooltip sur texte, 2=tooltip sur picto, 3=tooltip sur les 2, 4=tooltip sur les 2 et forcé en Ajaxa
|
||||||
\param direction -1=Le picto est avant, 0=pas de picto, 1=le picto est après
|
\param direction -1=Le picto est avant, 0=pas de picto, 1=le picto est après
|
||||||
\param img Code img du picto
|
\param img Code img du picto
|
||||||
\return string Code html du texte,picto
|
\return string Code html du texte,picto
|
||||||
*/
|
*/
|
||||||
function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='',$i=1,$width='200',$shiftX='10',$option='')
|
function textwithtooltip($text,$htmltext,$tooltipon=1,$direction=0,$img='',$i=1,$width='200',$shiftX='10')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ class Form
|
|||||||
$s.= '</div>'."\n";
|
$s.= '</div>'."\n";
|
||||||
$s.= '<script type=\'text/javascript\'>'."\n";
|
$s.= '<script type=\'text/javascript\'>'."\n";
|
||||||
$s.= 'TooltipManager.init("","",{width:'.$width.', shiftX:'.$shiftX.'});'."\n";
|
$s.= 'TooltipManager.init("","",{width:'.$width.', shiftX:'.$shiftX.'});'."\n";
|
||||||
$s.= 'TooltipManager.addHTML("tip'.$i.'", "tooltip_content");'."\n";
|
$s.= 'TooltipManager.addHTML("tip'.$i.'", "tooltip_content");'."\n";
|
||||||
$s.= '</script>'."\n";
|
$s.= '</script>'."\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -1062,3 +1062,5 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (10
|
|||||||
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (106,10, '22.5','0','VAT 18% Majoré à 25% (22.5%)',1);
|
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (106,10, '22.5','0','VAT 18% Majoré à 25% (22.5%)',1);
|
||||||
|
|
||||||
ALTER TABLE llx_bank_account MODIFY iban_prefix varchar(50);
|
ALTER TABLE llx_bank_account MODIFY iban_prefix varchar(50);
|
||||||
|
|
||||||
|
delete from llx_const where name='PRODUIT_CHANGE_PROD_DESC';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user