diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index d6b288252..f236bf34b 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -344,6 +344,22 @@ function ledger_fin_add_row() nb.value++; } +/** + * Add multiple row + * @param p_numrow + */ +function ledger_add_multiple(p_elid) +{ + var nbrow=$(p_elid).value; + if (nbrow == NaN) {nbrow=1;} + var type_ledger=$(p_elid+"_ledger").value; + var i=0; + for (i=0;iid . "').focus()"); return $r; } diff --git a/include/class/pre_op_advanced.class.php b/include/class/pre_op_advanced.class.php index ec78536a7..2c110fe45 100644 --- a/include/class/pre_op_advanced.class.php +++ b/include/class/pre_op_advanced.class.php @@ -284,6 +284,7 @@ class Pre_Op_Advanced extends Pre_operation_detail // If readonly == 1 then show CA } $ret.=''; + $ret.=Html_Input_Noalyss::ledger_add_item("M"); return $ret; } } diff --git a/include/class/pre_op_ven.class.php b/include/class/pre_op_ven.class.php index 0a2c79dae..c76252c1b 100644 --- a/include/class/pre_op_ven.class.php +++ b/include/class/pre_op_ven.class.php @@ -406,8 +406,8 @@ class Pre_op_ven extends Pre_operation_detail // Set correctly the REQUEST param for jrn_type $r.=HtmlInput::hidden('jrn_type','VEN'); + $r.= Html_Input_Noalyss::ledger_add_item("O"); - $r.=HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_add_row()"'); return $r; } } diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index 7627696a1..b15f39d6d 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -145,7 +145,7 @@ try { echo $Ledger->input($array); - echo HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_fin_add_row()"'); + echo Html_Input_Noalyss::ledger_add_item("F"); echo HtmlInput::submit('save',_('Sauve')); echo HtmlInput::reset(_('Effacer')); diff --git a/include/operation_ods_new.inc.php b/include/operation_ods_new.inc.php index 9396314ad..bad4da0bc 100644 --- a/include/operation_ods_new.inc.php +++ b/include/operation_ods_new.inc.php @@ -94,7 +94,7 @@ $iconcerned->amount_id="totalDeb"; printf (_("Opération rapprochée : %s"),$iconcerned->input()); echo '

'; -echo HtmlInput::button('add', _('Ajout d\'une ligne'), 'onClick="quick_writing_add_row()"'); +echo Html_Input_Noalyss::ledger_add_item("M"); echo HtmlInput::submit('summary', _('Sauvez')); echo '

';