diff --git a/html/ajax_card.php b/html/ajax_card.php
index 63dd8b509..ca5fae651 100644
--- a/html/ajax_card.php
+++ b/html/ajax_card.php
@@ -279,7 +279,7 @@ case 'st':
*
----------------------------------------------------------------------*/
case 'sc':
- $html=HtmlInput::button_close($ctl);
+ $html=HtmlInput::anchor_close($ctl);
$html.=h2info('Nouvelle fiche');
if ( $user->check_action(FICADD)==1 )
{
diff --git a/html/ajax_misc.php b/html/ajax_misc.php
index 5ec3e61b7..6c7b4ec61 100644
--- a/html/ajax_misc.php
+++ b/html/ajax_misc.php
@@ -173,7 +173,7 @@ case 'dsp_tva':
$Res=$cn->exec_sql("select * from tva_rate order by tva_rate desc");
$Max=Database::num_row($Res);
$r="";
- $r=HtmlInput::button_close('tva_select');
+ $r=HtmlInput::anchor_close('tva_select');
$r.=h2info('Choississez la TVA ');
$r.='
';
$r.= '
';
diff --git a/include/class_fiche.php b/include/class_fiche.php
index eb5bc7e44..a484e29f1 100644
--- a/include/class_fiche.php
+++ b/include/class_fiche.php
@@ -580,7 +580,7 @@ class Fiche
$w->set_attribute('ipopup','ipop_account');
$w->set_attribute('account',"av_text".$r->ad_id);
// account created automatically
- $w->table=1;
+ $w->table=0;
// account created automatically
$sql="select account_auto($this->fiche_def)";
$ret_sql=$this->cn->exec_sql($sql);
@@ -643,7 +643,7 @@ class Fiche
$w=new IPoste("av_text".$r->ad_id);
$w->set_attribute('ipopup','ipop_account');
$w->set_attribute('account',"av_text".$r->ad_id);
- $w->table=1;
+ $w->table=0;
$bulle=HtmlInput::infobulle(14);
break;
case 'card':
@@ -974,7 +974,7 @@ class Fiche
}
// Normal traitement
- $sql="update fiche_detail set ad_value=upper($1) where jft_id=$2";
+ $sql="update fiche_detail set ad_value=$1 where jft_id=$2";
$this->cn->exec_sql($sql,array($value,$jft_id));
}
}
diff --git a/include/class_icard.php b/include/class_icard.php
index a0bf1825f..79db2e513 100644
--- a/include/class_icard.php
+++ b/include/class_icard.php
@@ -61,13 +61,7 @@
// If double click call the javascript fill_ipopcard
$W1->set_dblclick("fill_ipopcard(this);");
-// This attribute is mandatory, it is the name of the IPopup
- $W1->set_attribute('ipopup','ipopcard');
-
- // name of the field to update with the name of the card
- $W1->set_attribute('label','e_client_label');
-
- // Type of card : deb, cred,
+ // Type of card : deb, cred or all
$W1->set_attribute('typecard','deb');
$W1->extra='deb';
@@ -81,10 +75,14 @@
// when the data change
$W1->javascript=sprintf(' onchange="fill_data_onchange(\'%s\');" ',
$W1->name);
- $f_client_qcode=$W1->input();
+
+ // name of the field to update with the name of the card
+ $W1->set_attribute('label','e_client_label');
$client_label=new ISpan();
$client_label->table=0;
$f_client=$client_label->input("e_client_label",$e_client_label);
+
+ $f_client_qcode=$W1->input();
// Search button for card
$f_client_bt=$W1->search();
@@ -92,18 +90,9 @@
For searching a card, you need a popup, the script card.js and set
the values for card, popup filter_card callback
@code
-echo JS_CARD;
-
-
-$search_card=new IPopup('ipop_card');
-$search_card->title=_('Recherche de fiche');
-$search_card->value='';
-echo $search_card->input();
-
$card=new ICard('acc');
$card->name="acc";
$card->extra="all";
-$card->set_attribute('popup','ipopcard');
$card->set_attribute('typecard','all');
$card->set_callback('filter_card');
@@ -159,6 +148,7 @@ class ICard extends HtmlInput
}
/*!\brief return the html string for creating the ipopup, this ipopup
* can be used for adding, modifying or display a card
+ *@note ipopup is obsolete, the popin is created by javascript
*\param $p_name name of the ipopup, must be set after with set_attribute
\code
$f_add_button=new IButton('add_card');
diff --git a/include/class_iposte.php b/include/class_iposte.php
index 0057664b8..e0d44540e 100644
--- a/include/class_iposte.php
+++ b/include/class_iposte.php
@@ -138,7 +138,7 @@ class IPoste extends HtmlInput
/* create the button */
$ibutton=$this->dsp_button();
- if ( $this->table=3)
+ if ( $this->table==3)
{
$r=''.tr(td($ibutton).td($itext->input()));
$r.='
';