Fix: Pb in price level management
This commit is contained in:
parent
53cf18e3e8
commit
e9aae286cd
@ -18,20 +18,20 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/lib/agenda.lib.php
|
||||
\brief Ensemble de fonctions de base de dolibarr sous forme d'include
|
||||
\version $Id$
|
||||
*/
|
||||
* \file htdocs/lib/agenda.lib.php
|
||||
* \brief Ensemble de fonctions de base de dolibarr sous forme d'include
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
\brief Show actions to do array
|
||||
\param max Max nb of records
|
||||
*/
|
||||
* \brief Show actions to do array
|
||||
* \param max Max nb of records
|
||||
*/
|
||||
function show_array_actions_to_do($max=5)
|
||||
{
|
||||
global $langs, $conf, $user, $db, $bc, $socid;
|
||||
|
||||
|
||||
include_once(DOL_DOCUMENT_ROOT.'/actioncomm.class.php');
|
||||
include_once(DOL_DOCUMENT_ROOT.'/client.class.php');
|
||||
|
||||
@ -93,13 +93,13 @@ function show_array_actions_to_do($max=5)
|
||||
if ($obj->percent > 0 && $obj->percent < 100 && $obj->dp2 && date("U",$obj->dp2) < time()) $late=1;
|
||||
if ($obj->percent > 0 && $obj->percent < 100 && ! $obj->dp2 && $obj->dp && date("U",$obj->dp) < time()) $late=1;
|
||||
if ($late) print img_warning($langs->trans("Late"));
|
||||
print "</td>";
|
||||
print "</td>";
|
||||
|
||||
// Statut
|
||||
print "<td align=\"center\" width=\"14\">".$staticaction->LibStatut($obj->percent,3)."</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
@ -120,7 +120,7 @@ function show_array_actions_to_do($max=5)
|
||||
function show_array_last_actions_done($max=5)
|
||||
{
|
||||
global $langs, $conf, $user, $db, $bc, $socid;
|
||||
|
||||
|
||||
$sql = "SELECT a.id, a.percent, ".$db->pdate("a.datep")." as da, ".$db->pdate("a.datep2")." as da2, a.fk_user_author, a.label,";
|
||||
$sql.= " c.code, c.libelle,";
|
||||
$sql.= " s.rowid, s.nom as sname, s.client";
|
||||
@ -160,7 +160,7 @@ function show_array_last_actions_done($max=5)
|
||||
$var=!$var;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
|
||||
$staticaction->code=$obj->code;
|
||||
$staticaction->libelle=$obj->libelle;
|
||||
$staticaction->id=$obj->id;
|
||||
@ -175,7 +175,7 @@ function show_array_last_actions_done($max=5)
|
||||
|
||||
// Date
|
||||
print '<td width="100" align="right">'.dol_print_date($obj->da2,'day');
|
||||
print "</td>";
|
||||
print "</td>";
|
||||
|
||||
// Statut
|
||||
print "<td align=\"center\" width=\"14\">".$staticaction->LibStatut($obj->percent,3)."</td>\n";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Regis Houssin <regis@dolibarr.fr>
|
||||
/* Copyright (C) 2007-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* 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
|
||||
@ -16,8 +16,12 @@
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
* or see http://www.gnu.org/
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/lib/agenda.lib.php
|
||||
* \brief Page called by Ajax request for produts
|
||||
* \version $Id$
|
||||
*/
|
||||
|
||||
function ajax_indicator($htmlname,$indicator='working')
|
||||
@ -27,14 +31,14 @@ function ajax_indicator($htmlname,$indicator='working')
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Recupere la valeur d'un champ, effectue un traitement Ajax et affiche le resultat
|
||||
\param htmlname nom et id du champ
|
||||
\param keysearch nom et id complementaire du champ de collecte
|
||||
\param url chemin du fichier de reponse : /chemin/fichier.php
|
||||
\param option champ supplementaire de recherche dans les parametres
|
||||
\param indicator Nom de l'image gif sans l'extension
|
||||
\return script script complet
|
||||
*/
|
||||
* \brief Recupere la valeur d'un champ, effectue un traitement Ajax et affiche le resultat
|
||||
* \param htmlname nom et id du champ
|
||||
* \param keysearch nom et id complementaire du champ de collecte
|
||||
* \param url chemin du fichier de reponse : /chemin/fichier.php
|
||||
* \param option champ supplementaire de recherche dans les parametres
|
||||
* \param indicator Nom de l'image gif sans l'extension
|
||||
* \return script script complet
|
||||
*/
|
||||
function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
||||
{
|
||||
$script = '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'" value="">';
|
||||
@ -46,7 +50,7 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
||||
Element.show(\'indicator'.$htmlname.'\');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
onComplete: function() {
|
||||
if(Ajax.activeRequestCount == 0){
|
||||
Element.hide(\'indicator'.$htmlname.'\');
|
||||
@ -54,6 +58,7 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
||||
}
|
||||
};';
|
||||
$script.='Ajax.Responders.register(myIndicator'.$htmlname.');';
|
||||
//print 'param='.$keysearch.'="+$F("'.$keysearch.$htmlname.'")+"&htmlname='.$htmlname.$option; exit;
|
||||
$script.='new Form.Element.Observer($("'.$keysearch.$htmlname.'"), 1,
|
||||
function(){
|
||||
var myAjax = new Ajax.Updater( {
|
||||
@ -65,20 +70,20 @@ function ajax_updater($htmlname,$keysearch,$url,$option='',$indicator='working')
|
||||
});';
|
||||
$script.='</script>';
|
||||
$script.='<div class="nocellnopadd" id="ajdynfield'.$htmlname.'"></div>';
|
||||
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Récupére la valeur d'un champ, effectue un traitement Ajax et affiche le résultat
|
||||
\param htmlname nom et id du champ
|
||||
\param keysearch nom et id complémentaire du champ de collecte
|
||||
\param id ID du champ a modifier
|
||||
\param url chemin du fichier de réponse : /chemin/fichier.php
|
||||
\param option champ supplémentaire de recherche dans les paramétres
|
||||
\param indicator Nom de l'image gif sans l'extension
|
||||
\return script script complet
|
||||
*/
|
||||
* \brief Get value of a field, do Ajax process and show result
|
||||
* \param htmlname nom et id du champ
|
||||
* \param keysearch nom et id complementaire du champ de collecte
|
||||
* \param id ID du champ a modifier
|
||||
* \param url chemin du fichier de reponse : /chemin/fichier.php
|
||||
* \param option champ supplementaire de recherche dans les parametres
|
||||
* \param indicator Nom de l'image gif sans l'extension
|
||||
* \return script script complet
|
||||
*/
|
||||
function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator='working')
|
||||
{
|
||||
$script = '<input type="hidden" name="'.$htmlname.'" id="'.$htmlname.'" value="">';
|
||||
@ -90,7 +95,7 @@ function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator=
|
||||
Element.show(\'indicator'.$htmlname.'\');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
onComplete: function() {
|
||||
if(Ajax.activeRequestCount == 0){
|
||||
Element.hide(\'indicator'.$htmlname.'\');
|
||||
@ -107,17 +112,17 @@ function ajax_updaterWithID($htmlname,$keysearch,$id,$url,$option='',$indicator=
|
||||
var myAjax = new Ajax.Updater(elementHTML,url,o_options);
|
||||
});';
|
||||
$script.='</script>';
|
||||
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Récupére la valeur d'un champ, effectue un traitement Ajax et affiche le résultat
|
||||
\param htmlname nom et id du champ
|
||||
\param url chemin du fichier de réponse : /chemin/fichier.php
|
||||
\param indicator nom de l'image gif sans l'extension
|
||||
\return script script complet
|
||||
*/
|
||||
* \brief Get vlaue of field, do Ajax process and return result
|
||||
* \param htmlname nom et id du champ
|
||||
* \param url chemin du fichier de reponse : /chemin/fichier.php
|
||||
* \param indicator nom de l'image gif sans l'extension
|
||||
* \return script script complet
|
||||
*/
|
||||
function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working')
|
||||
{
|
||||
if ($indicator) $script.= ajax_indicator($htmlname,$indicator);
|
||||
@ -132,7 +137,7 @@ function ajax_autocompleter($selected='',$htmlname,$url,$indicator='working')
|
||||
afterUpdateElement: ac_return
|
||||
});';
|
||||
$script.= '</script>';
|
||||
|
||||
|
||||
return $script;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user