[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 01/01: Bug : After move of ajax_ledger , the
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 01/01: Bug : After move of ajax_ledger , the variable $op override the parameter $op[] , it prevents to save analytic changes |
Date: |
Wed, 28 Oct 2015 12:02:36 +0000 |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 8a80d7e3e8dab2aff5fe1adcb65ab4d977160006
Author: Dany De Bontridder <address@hidden>
Date: Wed Oct 28 12:56:22 2015 +0100
Bug : After move of ajax_ledger , the variable $op override the parameter
$op[] , it prevents to save analytic changes
---
include/class/class_anc_operation.php | 16 ++++++++--------
include/template/ledger_detail_ach.php | 2 +-
include/template/ledger_detail_fin.php | 2 +-
include/template/ledger_detail_misc.php | 2 +-
include/template/ledger_detail_ven.php | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/class/class_anc_operation.php
b/include/class/class_anc_operation.php
index 5efc069..52daf3d 100644
--- a/include/class/class_anc_operation.php
+++ b/include/class/class_anc_operation.php
@@ -799,27 +799,27 @@ class Anc_Operation
function save_update_form($p_array)
{
extract($p_array);
- for ($i = 0; $i < count($op); $i++)
+ for ($i = 0; $i < count($opanc); $i++)
{
/* clean operation_analytique */
- $this->db->exec_sql('delete from operation_analytique where
j_id=$1', array($op[$i]));
+ $this->db->exec_sql('delete from operation_analytique where
j_id=$1', array($opanc[$i]));
/* get missing data for adding */
$a_missing = $this->db->get_array("select
to_char(jr_date,'DD.MM.YYYY')
as mdate,j_montant,j_debit,jr_comment ,j_poste
- from jrnx join jrn on (j_grpt=jr_grpt_id) where j_id=$1",
array($op[$i]));
+ from jrnx join jrn on (j_grpt=jr_grpt_id) where j_id=$1",
array($opanc[$i]));
$missing = $a_missing[0];
$this->oa_description = $missing['jr_comment'];
- $this->j_id = $op[$i];
+ $this->j_id = $opanc[$i];
$group = $this->db->get_next_seq("s_oa_group"); /* for analytic */
$this->oa_group = $group;
$this->oa_date = $missing['mdate'];
- $this->save_form_plan($p_array, $i, $op[$i]);
+ $this->save_form_plan($p_array, $i, $opanc[$i]);
// There is ND VAT amount
$a_nd = $this->db->get_array('select j_id from operation_analytique
- where oa_jrnx_id_source=$1', array($op[$i]));
+ where oa_jrnx_id_source=$1', array($opanc[$i]));
if (count($a_nd) > 0)
{
// for each ND VAT amount
@@ -831,11 +831,11 @@ class Anc_Operation
$missing_vat = $a_missing_vat[0];
$this->oa_debit = 't';
$this->oa_description = $missing_vat['jr_comment'];
- $this->j_id = $op[$i];
+ $this->j_id = $opanc[$i];
$group = $this->db->get_next_seq("s_oa_group"); /* for
analytic */
$this->oa_group = $group;
$this->oa_date = $missing_vat['mdate'];
- $this->oa_jrnx_id_source=$op[$i];
+ $this->oa_jrnx_id_source=$opanc[$i];
$p_array['amount_t'.$i]=$missing['j_montant'];
$this->save_form_plan_vat_nd($p_array, $i,
$a_nd[$e]['j_id'],$missing_vat['j_montant']);
}
diff --git a/include/template/ledger_detail_ach.php
b/include/template/ledger_detail_ach.php
index 59e8d33..248d74a 100644
--- a/include/template/ledger_detail_ach.php
+++ b/include/template/ledger_detail_ach.php
@@ -232,7 +232,7 @@ $str_anc="";
$anc_op->in_div=$div;
$side=($q['j_debit'] == 'f')?'C':'D';
- echo HtmlInput::hidden('op[]', $anc_op->j_id);
+ echo HtmlInput::hidden('opanc[]', $anc_op->j_id);
/* compute total price */
bcscale(2);
$str_anc.='<tr>';
diff --git a/include/template/ledger_detail_fin.php
b/include/template/ledger_detail_fin.php
index 51b4187..045f4d0 100644
--- a/include/template/ledger_detail_fin.php
+++ b/include/template/ledger_detail_fin.php
@@ -129,7 +129,7 @@ echo td(_('Pièce')).td($itext->input());
$str_anc.=td($qcode);
$str_anc.=td(nbm($q[$e]['j_montant']));
$str_anc.='<td>';
- $str_anc.= HtmlInput::hidden('op[]',$anc_op->j_id);
+ $str_anc.= HtmlInput::hidden('opanc[]',$anc_op->j_id);
$montant=($q[$e]['j_debit'] ==
"t")?$q[$e]['j_montant']:bcmul($q[$e]['j_montant'], -1);
$str_anc.=$anc_op->display_table(1,$montant,$div);
$str_anc.='</td>';
diff --git a/include/template/ledger_detail_misc.php
b/include/template/ledger_detail_misc.php
index dbf5091..50476b7 100644
--- a/include/template/ledger_detail_misc.php
+++ b/include/template/ledger_detail_misc.php
@@ -169,7 +169,7 @@ $amount_idx=0;
$side=($q[$e]['j_debit'] == 'f')?'C':'D';
$str_anc.='<tr>';
- $str_anc.=HtmlInput::hidden('op[]',$anc_op->j_id);
+ $str_anc.=HtmlInput::hidden('opanc[]',$anc_op->j_id);
$str_anc.=td($q[$e]['j_qcode']);
$str_anc.=td($q[$e]['j_poste']);
$str_anc.=td(nbm($q[$e]['j_montant'])." {$side}");
diff --git a/include/template/ledger_detail_ven.php
b/include/template/ledger_detail_ven.php
index 6317324..5e3739e 100644
--- a/include/template/ledger_detail_ven.php
+++ b/include/template/ledger_detail_ven.php
@@ -229,7 +229,7 @@ echo $ipaid->input();
$anc_op->in_div=$div;
$anc_op->j_id = $q['j_id'];
$side=($q['j_debit'] == 'f')?'C':'D';
- echo HtmlInput::hidden('op[]', $anc_op->j_id);
+ echo HtmlInput::hidden('opanc[]', $anc_op->j_id);
/* compute total price */
bcscale(2);
$str_anc.='<tr>';