diff --git a/html/image/popout.png b/html/image/popout.png new file mode 100644 index 000000000..4d7c6b8b0 Binary files /dev/null and b/html/image/popout.png differ diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index 13d8811dd..ce0e5b596 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -431,7 +431,6 @@ function compute_ledger(p_ctl_nb) g('e_quant' + p_ctl_nb).value = trim(g('e_quant' + p_ctl_nb).value); var quantity = g('e_quant' + p_ctl_nb).value; var querystring = 'gDossier=' + dossier + '&c=' + qcode + '&t=' + tva_id + '&p=' + price + '&q=' + quantity + '&n=' + p_ctl_nb; - $('sum').hide(); var action = new Ajax.Request( "compute.php", { diff --git a/html/js/card.js b/html/js/card.js index 229774491..7662c8e97 100644 --- a/html/js/card.js +++ b/html/js/card.js @@ -540,7 +540,7 @@ function successFill_ipopcard(req,json) * a card *@param input field (obj) it must have the attribute ipopup * possible attribute : - * - filter is the filter but with a fd_id list, -1 means there is no filter + * - filter possible values are deb, cred, fd_id list, -1 means there is no filter * - ref if we want to refresh the window after adding a card * - type type of card (supplier, customer...) *@see ajax_card.php diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index 5c40bc403..481364b88 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -1609,13 +1609,9 @@ class Acc_Ledger extends jrn_def_sql $ret = ""; if ($g_user->check_action(FICADD) == 1) { - /* Add button */ - $f_add_button = new IButton('add_card'); - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button->set_attribute('jrn', $this->id); - $f_add_button->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);"; - $f_add_button->input(); + // Button for adding customer + $js_deb="this.filter='-1';this.jrn=\$('p_jrn').value; select_card_type(this);"; + $str_add_button= HtmlInput::button_image($js_deb,"xx",'class="smallbutton image_search"',"image/bouton-plus.png"); } $wLedger = $this->select_ledger('ODS', 2); if ($wLedger == null) @@ -1707,8 +1703,6 @@ class Acc_Ledger extends jrn_def_sql $ret.=HtmlInput::hidden('jrn_type', $this->get_type()); $info = HtmlInput::infobulle(0); $info_poste = HtmlInput::infobulle(9); - if ($g_user->check_action(FICADD) == 1) - $ret.=$f_add_button->input(); $ret.='
| Quickcode' . $info . ' | ' . @@ -1794,7 +1788,7 @@ class Acc_Ledger extends jrn_def_sql $deb->javascript = ' onChange="checkTotalDirect()"'; $ret.='||
|---|---|---|
| ' . $quick_code->input() . $quick_code->search() . ' | '; + $ret.='' . $quick_code->input() . $quick_code->search() .$str_add_button. ' | '; $ret.='' . $poste->input() . '' . ' | '; diff --git a/include/class/acc_ledger_fin.class.php b/include/class/acc_ledger_fin.class.php index 451edcf6e..ed41b7fc3 100644 --- a/include/class/acc_ledger_fin.class.php +++ b/include/class/acc_ledger_fin.class.php @@ -248,12 +248,12 @@ class Acc_Ledger_Fin extends Acc_Ledger $min_article=$this->get_min_row(); - $f_add_button = new IButton('add_card'); - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button->set_attribute('jrn', $this->id); - $f_add_button->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);"; - $str_add_button = ($g_user->check_action(FICADD) == 1) ? $f_add_button->input() : ""; + $str_add_button = ""; + if ( $g_user->check_action(FICADD) == 1) { + // Button for adding new tiers + $js_deb="this.filter='deb';this.jrn=\$('p_jrn').value; select_card_type(this);"; + $str_add_button = HtmlInput::button_image($js_deb,"xx",'class="smallbutton image_search"',"image/bouton-plus.png"); + } // The first day of the periode $pPeriode = new Periode($this->db); diff --git a/include/class/acc_ledger_purchase.class.php b/include/class/acc_ledger_purchase.class.php index 438f8178b..7211c40c2 100644 --- a/include/class/acc_ledger_purchase.class.php +++ b/include/class/acc_ledger_purchase.class.php @@ -966,16 +966,18 @@ class Acc_Ledger_Purchase extends Acc_Ledger $flag_tva=$g_parameter->MY_TVA_USE; /* Add button */ - $f_add_button=new IButton('add_card'); - $f_add_button->label=_('Créer une nouvelle fiche'); - $f_add_button->tabindex=-1; - $f_add_button->set_attribute('jrn',$this->id); - $f_add_button->javascript=" this.jrn=\$('p_jrn').value;select_card_type(this);"; - - $str_add_button=""; - if ($g_user->check_action(FICADD)==1) - { - $str_add_button=$f_add_button->input(); + + $str_add_button_tiers = ""; + $str_add_button_item = ""; + if ($g_user->check_action(FICADD) == 1) { + $js_deb="this.filter='deb';this.jrn=\$('p_jrn').value; select_card_type(this);"; + $js_cred="this.filter='cred';this.jrn=\$('p_jrn').value; select_card_type(this);"; + + // Button for adding customer + $str_add_button_tiers = HtmlInput::button_image($js_cred,"xx",'class="smallbutton image_search"',"image/bouton-plus.png"); + + // Button for adding services or items to sale + $str_add_button_item = HtmlInput::button_image($js_deb,"xx",'class="smallbutton image_search"',"image/bouton-plus.png"); } // The first day of the periode $oPeriode=new Periode($this->db); @@ -1233,7 +1235,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger if ( $g_parameter->MY_UPDLAB == 'Y') { $Span=new IText("e_march".$i."_label"); - $Span->css_size="100%"; + $Span->css_size="40"; } else { $Span=new ISpan("e_march".$i."_label"); diff --git a/include/class/acc_ledger_sold.class.php b/include/class/acc_ledger_sold.class.php index d3291f2a8..aa4de825d 100644 --- a/include/class/acc_ledger_sold.class.php +++ b/include/class/acc_ledger_sold.class.php @@ -1008,26 +1008,17 @@ EOF; $flag_tva = $g_parameter->MY_TVA_USE; /* Add button */ - $f_add_button = new IButton('add_card'); - $f_add_button->tabindex = -1; - $f_add_button->label = _('Créer une nouvelle fiche'); - $f_add_button->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button->set_attribute('jrn', $this->id); - $f_add_button->javascript = "this.jrn=\$('p_jrn').value; select_card_type(this);"; - - $f_add_button2 = new IButton('add_card2'); - $f_add_button2->tabindex = -1; - $f_add_button2->label = _('Créer une nouvelle fiche'); - $f_add_button2->set_attribute('ipopup', 'ipop_newcard'); - $f_add_button2->set_attribute('filter', $this->get_all_fiche_def()); - // $f_add_button2->set_attribute('jrn',$this->id); - $f_add_button2->javascript = " this.jrn=\$('p_jrn').value;select_card_type(this);"; - - $str_add_button = ""; - $str_add_button2 = ""; + + $str_add_button_tiers = ""; + $str_add_button_item = ""; if ($g_user->check_action(FICADD) == 1) { - $str_add_button = $f_add_button->input(); - $str_add_button2 = $f_add_button2->input(); + // Button for adding customer + $js_deb="this.filter='deb';this.jrn=\$('p_jrn').value; select_card_type(this);"; + $str_add_button_tiers = HtmlInput::button_image($js_deb,"xx",'class="smallbutton image_search"',"image/bouton-plus.png"); + + // Button for adding services or items to sale + $js_cred="this.filter='cred';this.jrn=\$('p_jrn').value; select_card_type(this);"; + $str_add_button_item = HtmlInput::button_image($js_cred,"xx",'class="smallbutton image_search"',"image/bouton-plus.png"); } // The first day of the periode $oPeriode = new Periode($this->db); @@ -1207,7 +1198,7 @@ EOF; $W1->name = "e_march" . $i; $W1->value = $march; $W1->table = 1; - $W1->set_attribute('typecard', 'cred'); + $W1->set_attribute('typecard', 'cred'); $W1->set_dblclick("fill_ipopcard(this);"); $W1->set_attribute('ipopup', 'ipopcard'); @@ -1248,7 +1239,7 @@ EOF; if ($g_parameter->MY_UPDLAB == 'Y') { $Span = new IText("e_march" . $i . "_label"); - $Span->css_size = "100%"; + $Span->size= "40"; } else { $Span = new ISpan("e_march" . $i . "_label"); }