diff --git a/include/class/class_acc_operation.php b/include/class/class_acc_operation.php index 02b6d1165..bd2d711fd 100644 --- a/include/class/class_acc_operation.php +++ b/include/class/class_acc_operation.php @@ -662,7 +662,7 @@ class Acc_Sold extends Acc_Detail { parent::get(); $sql="SELECT qs_id, qs_internal, qs_fiche, qs_quantite, qs_price, qs_vat, - qs_vat_code, qs_client, qs_valid, j_id,j_text,qs_vat_sided , qs_unit + qs_vat_code, qs_client, qs_valid, j_id,j_text,qs_vat_sided , qs_unit , j_debit FROM quant_sold join jrnx using(j_id) where j_grpt=$1"; $this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id)); } @@ -688,7 +688,7 @@ class Acc_Purchase extends Acc_Detail parent::get(); $sql="SELECT qp_id, qp_internal, j_id, qp_fiche, qp_quantite, qp_price, qp_vat, qp_vat_code, qp_nd_amount, qp_nd_tva, qp_nd_tva_recup, qp_supplier, - qp_valid, qp_dep_priv,j_text,qp_vat_sided,qp_unit + qp_valid, qp_dep_priv,j_text,qp_vat_sided,qp_unit , j_debit FROM quant_purchase join jrnx using(j_id) where j_grpt=$1"; $this->det->array=$this->db->get_array($sql,array($this->det->jr_grpt_id)); } diff --git a/include/template/ledger_detail_ach.php b/include/template/ledger_detail_ach.php index cda665843..ab3a72d55 100644 --- a/include/template/ledger_detail_ach.php +++ b/include/template/ledger_detail_ach.php @@ -217,12 +217,14 @@ $str_anc=""; $anc_op = new Anc_Operation($cn); $anc_op->j_id = $q['j_id']; $anc_op->in_div=$div; + $side=($q['j_debit'] == 'f')?'C':'D'; + echo HtmlInput::hidden('op[]', $anc_op->j_id); /* compute total price */ bcscale(2); $str_anc.='