diff --git a/html/do.php b/html/do.php index fda7e03e3..56223d7ee 100644 --- a/html/do.php +++ b/html/do.php @@ -20,7 +20,7 @@ // Copyright Author Dany De Bontridder danydb@aevalys.eu define('ALLOWED',1); - +var_dump($_POST); /**\file * \brief Main file */ diff --git a/html/js/anc_script.js b/html/js/anc_script.js index 87433f1b3..723697a9e 100644 --- a/html/js/anc_script.js +++ b/html/js/anc_script.js @@ -480,4 +480,56 @@ function anc_key_choice(p_dossier, p_table, p_amount) } catch (e) { error_message(e.message); } +} +function add_row_key(p_table, p_seq) +{ + var mytable = g(p_table).tBodies[0]; + // var max = parseFloat(g('amount_t' + p_seq).value); + if (!mytable) + { + return; + } + var new_value = mytable.rows.length + 1; + + + if (mytable.rows.length > 15) + { + alert("Maximum 15 lignes "); + return; + } + /* var amount = compute_total_table(p_table, p_seq); + if (max < amount) + { + alert('Montant incorrect : max = ' + max + " calculé=" + amount); + return; + } + */ + // For the detail view (modify_op) there is several form and then several time the + // element + var rowToCopy = mytable.rows[1]; + var row = mytable.insertRow(mytable.rows.length); + + for (var i = 0; i < rowToCopy.cells.length; i++) + { + var cell = row.insertCell(i); + cell.className=rowToCopy.cells[i].className; + var txt = rowToCopy.cells[i].innerHTML; +// txt=txt.replace(/row_1/g,"row_"+new_value); + if ( i == 0 ) + { + cell.innerHTML =mytable.rows.length-1 ; + } + else + { + if (i == rowToCopy.cells.length -1 ) { + txt=txt.replace(/value="[0-9]*.{1}[0-9]*"/,'value="0"') + } + cell.innerHTML = txt; + } + } + $('total_key').innerHTML="?"; + /* var col = document.getElementsByName("val[" + p_seq + "][]"); + col[col.length - 1].value = max - amount; + anc_refresh_remain(p_table, p_seq); + */ } \ No newline at end of file diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php index 69dc8c5cf..6299580ef 100644 --- a/include/compta_ach.inc.php +++ b/include/compta_ach.inc.php @@ -25,6 +25,7 @@ * \brief file included to manage all the sold operation */ if ( ! defined ('ALLOWED') ) die('Appel direct ne sont pas permis'); +var_dump($_POST); require_once("class_icheckbox.php"); require_once("class_acc_ledger_purchase.php"); require_once ('class_pre_op_ach.php'); diff --git a/include/template/anc_key_input.php b/include/template/anc_key_input.php index 279dd2f27..f34811229 100644 --- a/include/template/anc_key_input.php +++ b/include/template/anc_key_input.php @@ -47,7 +47,7 @@

- +
- @@ -73,6 +73,7 @@ $a_row [0]['ke_id']=-1; } + $tot_key=0; for ($j=0; $j @@ -82,6 +83,7 @@ - - - + + + + + +
+
+ value=$percent; @@ -131,11 +133,18 @@ -
+ + + +
- +
diff --git a/sql/upgrade.sql b/sql/upgrade.sql index 688ae8d2e..ed45527a9 100644 --- a/sql/upgrade.sql +++ b/sql/upgrade.sql @@ -18,3 +18,8 @@ $function$ -- bug alter table action_gestion alter ag_title type text; + +INSERT INTO menu_ref(me_code, me_menu, me_file, me_type,me_description_etendue)VALUES ('ANCKEY', 'Clef de répartition', 'anc_key.inc.php','ME','Permet de gèrer les clefs de répartition en comptabilité analytique'); + +insert into profile_menu(me_code,p_id,p_type_display,pm_default,me_code_dep,p_order) values ('ANCKEY',1,'E',0,'ANC',15); +insert into profile_menu(me_code,p_id,p_type_display,pm_default,me_code_dep,p_order) values ('ANCKEY',2,'E',0,'ANC',15);