diff --git a/html/style-classic.css b/html/style-classic.css index e591e65ee..baf4a2c37 100644 --- a/html/style-classic.css +++ b/html/style-classic.css @@ -1159,10 +1159,6 @@ span.remain { } #predef_form { - margin-left:35%; - width:60%; - position:absolute; - z-index:2 } @media only screen and (min-width: 1155px) { div#jrn_name_div @@ -1171,10 +1167,6 @@ span.remain { } #predef_form { - margin-left:35%; - width:60%; - position:absolute; - z-index:2 } } @media only screen and (max-width: 1155px) { diff --git a/html/style-light.css b/html/style-light.css index da4954d7b..44cf3036c 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -1151,10 +1151,6 @@ span.remain { } #predef_form { - margin-left:35%; - width:60%; - position:absolute; - z-index:2 } @media only screen and (min-width: 955px) { div#jrn_name_div @@ -1165,10 +1161,6 @@ span.remain { } #predef_form { - margin-left:35%; - width:60%; - position:absolute; - z-index:2 } } @media only screen and (max-width: 955px) { diff --git a/html/style-mobile.css b/html/style-mobile.css index a3fba80bc..d1d9e0243 100644 --- a/html/style-mobile.css +++ b/html/style-mobile.css @@ -1184,10 +1184,6 @@ div#jrn_name_div { margin-right: 150px; } #predef_form { - margin-left: 20%; - width: 60%; - position: absolute; - z-index: 2; } @media only screen and (min-width: 955px) { div#jrn_name_div { @@ -1195,10 +1191,6 @@ div#jrn_name_div { margin-right: 150px; } #predef_form { - margin-left: 20%; - width: 60%; - position: absolute; - z-index: 2; } } @media only screen and (max-width: 955px) { diff --git a/html/style-r692.css b/html/style-r692.css index 98a914e5b..91d8cccf3 100644 --- a/html/style-r692.css +++ b/html/style-r692.css @@ -972,10 +972,11 @@ span.remain { } #predef_form { - margin-left:35%; + /* margin-left:35%; width:60%; position:absolute; z-index:2 + */ } @media only screen and (min-width: 1155px) { div#jrn_name_div @@ -984,10 +985,11 @@ span.remain { } #predef_form { - margin-left:35%; + /*margin-left:35%; width:60%; position:absolute; z-index:2 + */ } } @media only screen and (max-width: 1155px) { @@ -1003,7 +1005,7 @@ span.remain { } @media only screen and (max-width: 900px) { #predef_form { - display: none; + /* display: none;*/ } } #direct diff --git a/include/class/acc_ledger.class.php b/include/class/acc_ledger.class.php index 55db55044..8e50a87a7 100644 --- a/include/class/acc_ledger.class.php +++ b/include/class/acc_ledger.class.php @@ -1620,8 +1620,27 @@ class Acc_Ledger extends jrn_def_sql $ret.=""; $ret.=tr(td($label ).td( $wLedger->input())); + + // + // Button for template operation + // + ob_start(); + echo '
'; + 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.=""; + $ret.=""; + $ret.=""; + $ret.=""; // Load the javascript // //$ret.= ' + + + +
"._("Modèle d'opération")."".$str_op_template."
'; 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 '
'; +/* echo '
'; echo HtmlInput::hidden('p_jrn_predef', $Ledger->id); $op=new Pre_op_ven($cn); $op->set('ledger',$Ledger->id); @@ -265,7 +265,7 @@ $op->set('direct','f'); $url=http_build_query(array('p_jrn_predef'=>$Ledger->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id())); echo $op->form_get('do.php?'.$url); echo '
'; - +*/ echo '
'; echo '

'.$p_msg.'

'; try diff --git a/include/operation_ods_new.inc.php b/include/operation_ods_new.inc.php index a30594517..abded40d5 100644 --- a/include/operation_ods_new.inc.php +++ b/include/operation_ods_new.inc.php @@ -40,20 +40,12 @@ $ledger->id = ($ledger->id == -1) ? $first_ledger['jrn_def_id'] : $id_ledger; // check if we can write in the ledger if ( $g_user->check_jrn($ledger->id)=='X') { - alert(_("Vous ne pouvez pas écrire dans ce journal, contacter votre administrateur")); + alert(_("Vous ne pouvez pas écrire dans ce journal, contactez votre administrateur")); return; -} +} echo '
'; -echo '
'; -echo HtmlInput::hidden('p_jrn_predef', $ledger->id); -$op = new Pre_op_ods($cn); -$op->set('ledger', $ledger->id); -$op->set('ledger_type', "ODS"); -$op->set('direct', 't'); -$url=http_build_query(array('action'=>'use_opd','p_jrn_predef'=>$ledger->id,'ac'=>$_REQUEST['ac'],'gDossier'=>dossier::id())); -echo $op->form_get('do.php?'.$url); -echo '
'; + echo '
'; echo '

' . $ledger->get_name() . '

'; echo '
'; diff --git a/include/template/form_ledger_detail.php b/include/template/form_ledger_detail.php index 862970079..4fa25b38f 100644 --- a/include/template/form_ledger_detail.php +++ b/include/template/form_ledger_detail.php @@ -11,6 +11,12 @@
+ +
diff --git a/scenario/ajax_acc_plan_mtable.php b/scenario/ajax_acc_plan_mtable.php index 03413f257..935bde297 100644 --- a/scenario/ajax_acc_plan_mtable.php +++ b/scenario/ajax_acc_plan_mtable.php @@ -36,7 +36,6 @@ $action=$http->request('action'); $p_id=$http->request('p_id', "number"); $ctl_id=$http->request('ctl'); } catch(Exception $e) { - echo $e->getMessage(); } require_once NOALYSS_INCLUDE."/lib/manage_table_sql.class.php";