';
+ echo HtmlInput::hidden('p_jrn_predef', $this->id);
+ $op = new Pre_op_ods($this->db);
+ $op->set('ledger', $this->id);
+ $op->set('ledger_type', "ODS");
+ $op->set('direct', 't');
+ $url=http_build_query(array('action'=>'use_opd','p_jrn_predef'=>$this->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id()));
+ echo $op->form_get('do.php?'.$url);
-
+ echo '
';
+ $str_op_template=ob_get_contents();
+ ob_end_clean();
+ $ret.="| ';
diff --git a/include/class/acc_ledger_purchase.class.php b/include/class/acc_ledger_purchase.class.php
index 88dc8630e..3d9c11d3b 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -1281,7 +1281,22 @@ class Acc_Ledger_Purchase extends Acc_Ledger
}
$f_type=_('Fournisseur');
-
+ //
+ // Button for template operation
+ //
+ ob_start();
+ echo ' ';
+ echo HtmlInput::hidden('p_jrn_predef', $this->id);
+ $op = new Pre_op_ach($this->db);
+ $op->set('ledger', $this->id);
+ $op->set('ledger_type', "ACH");
+ $op->set('direct', 'f');
+ $url=http_build_query(array('p_jrn_predef'=>$this->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id()));
+ echo $op->form_get('do.php?'.$url);
+ echo ' ';
+ $str_op_template=ob_get_contents();
+ ob_end_clean();
+
ob_start();
require_once NOALYSS_TEMPLATE.'/form_ledger_detail.php';
$r.=ob_get_contents();
diff --git a/include/class/acc_ledger_sold.class.php b/include/class/acc_ledger_sold.class.php
index df377c591..32ce41771 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -1311,7 +1311,22 @@ EOF;
$array[$i]['quantity'] = $Quantity->input("e_quant" . $i, $quant);
}// foreach article
$f_type = _('Client');
-
+ //
+ // Button for template operation
+ //
+ ob_start();
+ echo '';
+ echo HtmlInput::hidden('p_jrn_predef', $this->id);
+ $op=new Pre_op_ven($this->db);
+ $op->set('ledger', $this->id);
+ $op->set('ledger_type', "VEN");
+ $op->set('direct', 'f');
+ $url=http_build_query(array('p_jrn_predef'=>$this->id, 'ac'=>$_REQUEST['ac'],
+ 'gDossier'=>dossier::id()));
+ echo $op->form_get('do.php?'.$url);
+ echo ' ';
+ $str_op_template=ob_get_contents();
+ ob_end_clean();
ob_start();
require_once NOALYSS_TEMPLATE.'/form_ledger_detail.php';
diff --git a/include/compta_ach.inc.php b/include/compta_ach.inc.php
index f572e612d..ef6f46f36 100644
--- a/include/compta_ach.inc.php
+++ b/include/compta_ach.inc.php
@@ -242,15 +242,7 @@ if (isset ($_REQUEST['p_jrn_predef'])){
}
// pre defined operation
//
-echo '';
-echo HtmlInput::hidden('p_jrn_predef', $Ledger->id);
-$op = new Pre_op_ach($cn);
-$op->set('ledger', $Ledger->id);
-$op->set('ledger_type', "ACH");
-$op->set('direct', 'f');
-$url=http_build_query(array('p_jrn_predef'=>$Ledger->id,'ac'=>$ac,'gDossier'=>dossier::id()));
-echo $op->form_get('do.php?'.$url);
-echo ' ';
+
echo '';
echo '';
diff --git a/include/compta_ven.inc.php b/include/compta_ven.inc.php
index b6ee2bcc0..eb6872fb2 100644
--- a/include/compta_ven.inc.php
+++ b/include/compta_ven.inc.php
@@ -256,7 +256,7 @@ if (isset($_REQUEST['p_jrn_predef']))
$Ledger->id=$_REQUEST['p_jrn_predef'];
}
-echo ' |
+