diff --git a/html/admin/sql/patch/upgrade32.sql b/html/admin/sql/patch/upgrade32.sql index fa6b3c44b..55d77a27c 100644 --- a/html/admin/sql/patch/upgrade32.sql +++ b/html/admin/sql/patch/upgrade32.sql @@ -4,7 +4,7 @@ delete from jrnx where j_grpt not in (select jr_grpt_id from jrn); alter table op_predef add od_direct bool; update op_predef set od_direct=false; alter table op_predef alter od_direct set not null; -alter table op_predef_detail add opd_qc bool; +alter table op_predef_detail add od_qc bool; update version set val=33; commit; diff --git a/html/ecrit_ouv.php b/html/ecrit_ouv.php index 28d4655a1..34264c368 100644 --- a/html/ecrit_ouv.php +++ b/html/ecrit_ouv.php @@ -57,8 +57,10 @@ echo ShowItem ( array ( array ("ecrit_ouv.php?import&".$str_dossier,"Import") ),'V'); echo ''; -echo '
'; -//----------------------------------------------------- EXPORT //////////////////////////////////////////// +echo '
'; +//----------------------------------------------------- +//EXPORT +//////////////////////////////////////////// if ( isset ($_GET['export'])) { // if the year is not set, ask it // ask the exercice and do the export diff --git a/html/style-color.css b/html/style-color.css index c19b257de..686887a38 100644 --- a/html/style-color.css +++ b/html/style-color.css @@ -95,16 +95,18 @@ div.u_tmenu { } div.u_subtmenu { - left:10px; + float:left; + clear:both; background-color:pink; + } div.u_subt2menu { left:1%; background-color:orange; } div.lmenu { - position: float; float:left; + clear:left; left:20px; font-size:9px; background-color:grey; diff --git a/html/style-light.css b/html/style-light.css index 5b41c64b8..85e523239 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -89,6 +89,8 @@ background-color:blue; } div.u_subtmenu { background-color:lightblue ; + float:left; +clear:both; left:10px; } @@ -98,9 +100,8 @@ background-color:lightgrey; } div.lmenu { - position: float; float:left; - left:20px; + clear:left; font-size:9px; } diff --git a/html/style.css b/html/style.css index 5b391cd0d..5e53246a0 100644 --- a/html/style.css +++ b/html/style.css @@ -96,7 +96,8 @@ width:100%; background-color:#36559b; } div.u_subtmenu { -left:10px; +float:left; +clear:both; background-color:#C0E6E9; } div.u_subt2menu { @@ -104,8 +105,8 @@ div.u_subt2menu { background-color:#36559b; } div.lmenu { -position: float; float:left; +clear:left; left:20px; font-size:9px; background-color:#EDF3FF; @@ -140,9 +141,9 @@ border-width:1px; div.u_redcontent{ position: float; float:left; -width:80%; padding-top:7px; padding-left:8px; +width:80%; font-size:9px; font-family:sans-serif; background-color:#BBBBEE; diff --git a/html/user_advanced.php b/html/user_advanced.php index dd1ac3d8c..0f307a738 100644 --- a/html/user_advanced.php +++ b/html/user_advanced.php @@ -70,7 +70,7 @@ if ($p_action == "periode" ) { //-------------------------------------------------- if ($p_action=="preod") { - + echo '
'; echo '
'; $sel=new widget('select'); $sel->name="jrn"; @@ -80,12 +80,18 @@ if ($p_action=="preod") { $sa=(isset($_REQUEST['sa']))?$_REQUEST['sa']:""; $sel->selected=$sa; echo 'Choississez un journal '.$sel->IOValue(); - echo widget::submit_button('Accepter','Accepter'); + $wCheck=new widget("checkbox"); + if ( isset($_REQUEST['direct'])) { + $wCheck->selected=true; + } + echo 'Ecriture directe'.$wCheck->IOValue('direct'); + echo dossier::hidden(); $hid=new widget("hidden"); echo $hid->IOValue("sa","jrn"); echo $hid->IOValue("p_action","preod"); - + echo '
'; + echo widget::submit_button('Accepter','Accepter'); echo '
'; // if $_REQUEST[sa] == del delete the predefined operation @@ -101,6 +107,11 @@ if ($p_action=="preod") { if ( $sa == 'jrn' ) { $op=new Pre_operation($cn); $op->set_jrn($_GET['jrn']); + if ( isset($_GET['direct'])) { + $op->od_direct='true'; + } else { + $op->od_direct='false'; + } $array=$op->get_list_ledger(); if ( empty($array) == true ) { echo "Aucun enregistrement"; @@ -136,7 +147,7 @@ if ($p_action=="preod") { } echo ''; } - + echo '
'; } diff --git a/include/class_pre_operation.php b/include/class_pre_operation.php index dcb225536..549c98299 100644 --- a/include/class_pre_operation.php +++ b/include/class_pre_operation.php @@ -38,6 +38,7 @@ class Pre_operation function Pre_operation($cn) { $this->db=$cn; + $this->od_direct='false'; } /*!\brief fill the object with the $_POST variable */ function get_post() { diff --git a/include/client.inc.php b/include/client.inc.php index 0e3f758c1..7dd29563d 100644 --- a/include/client.inc.php +++ b/include/client.inc.php @@ -79,7 +79,7 @@ if ( $sub_action=="blank") $retour=sprintf('', "commercial.php?p_action=client&$str_dossier"); - echo '
'; + echo '
'; echo $retour; $c=new Customer($cn); @@ -135,7 +135,7 @@ if ( $sub_action == "list" ) $client=new Customer($cn); $search=(isset($_GET['query']))?$_GET['query']:""; - echo '
'; + echo '
'; echo $client->Summary($search); echo '
'; echo '
'; @@ -146,7 +146,7 @@ if ( $sub_action == "list" ) if ( $sub_action == 'detail' ) { $f_id=$_REQUEST['f_id']; - echo '
'; + echo '
'; $client=new Customer($cn,$f_id); $retour=sprintf('', urldecode($_REQUEST['url'])); diff --git a/include/depense.inc.php b/include/depense.inc.php index 5d64b1577..f66fe3962 100644 --- a/include/depense.inc.php +++ b/include/depense.inc.php @@ -68,7 +68,7 @@ if ( $sub_action=="use_opd" ) { $form=FormAchInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$p_post,$submit,false,$p_post['nb_item']); // $form=FormAchInput($cn,$p_jrn,$User->GetPeriode(),$_POST,$submit,false,$nb_item); - echo '
'; + echo '
'; echo $form; echo '
'; exit(); @@ -227,7 +227,7 @@ if ( isset ($_POST['add_item']) || isset ($_POST["correct"]) ) '; $form=FormAchInput($cn,$p_jrn,$User->GetPeriode(),$_POST,$submit,false,$nb_item); - echo '
'; + echo '
'; echo $form; echo $msg_tva; echo JS_CALC_LINE; @@ -249,7 +249,7 @@ if ( isset($_POST['save'])) // we save the expense list ($internal,$c)=RecordSell($cn,$_POST,$User,$p_jrn); $form=FormAchView($cn,$p_jrn,$User->GetPeriode(),$_POST,"",$_POST['nb_item'],false); - echo '
'; + echo '
'; echo '

Opération '.$internal.' enregistré

'; echo $form; echo '
'; @@ -265,7 +265,7 @@ if ( isset($_POST['save'])) $submit.=''; $submit.=''; $form=FormAchView($cn,$p_jrn,$User->GetPeriode(),$_POST,$submit,$nb_number,true); - echo '
'; + echo '
'; echo $form; echo '
'; echo ''; @@ -296,7 +296,7 @@ if ( isset ($_POST['view_invoice']) ) $form=FormAchInput($cn,$p_jrn,$User->GetPeriode(),$_POST,$submit, false, $nb_number); } - echo '
'; + echo '
'; echo $form; echo '
'; exit(); @@ -320,7 +320,7 @@ if ( $p_jrn != -1 ) '; // Show an empty form of invoice $form=FormAchInput($cn,$p_jrn,$User->GetPeriode(),null,$submit,false,$jrn->getDefLine()); - echo '
'; + echo '
'; echo $form; echo $msg_tva; //-------------------- diff --git a/include/facture.inc.php b/include/facture.inc.php index 5a4555dab..86194153f 100644 --- a/include/facture.inc.php +++ b/include/facture.inc.php @@ -188,7 +188,7 @@ if ( $sub_action=="use_opd" ) { $p_post=$op->compute_array(); echo_debug(__FILE__.':'.__LINE__.'- ','p_post = ',$p_post); $form=FormVenInput($cn,$_GET['p_jrn'],$User->GetPeriode(),$p_post,false,$p_post['nb_item']); - echo '
'; + echo '
'; echo $form; echo '
'; exit(); @@ -209,7 +209,7 @@ if ( isset ($_POST['add_item']) || isset ($_POST["correct_new_invoice"]) ) if ( isset ($_POST['add_item'])) $nb_item++; $form=FormVenInput($cn,$p_jrn,$User->GetPeriode(),$_POST,false,$nb_item); - echo '
'; + echo '
'; echo $form; echo '
'; exit(); @@ -230,7 +230,7 @@ if ( isset($_POST['record_and_print_invoice'])) list ($internal,$e)=RecordInvoice($cn,$_POST,$User,$p_jrn); $form=FormVenteView($cn,$p_jrn,$User->GetPeriode(),$_POST,$_POST['nb_item'],'noform',''); - echo '
'; + echo '
'; echo '

Opération '.$internal.' enregistré

'; echo $form; echo '
'; @@ -285,7 +285,7 @@ if ( isset ($_POST['view_invoice']) ) $form=FormVenInput($cn,$p_jrn,$User->GetPeriode(),$_POST,false,$nb_number); } - echo '
'; + echo '
'; echo $form; echo '
'; exit(); @@ -306,7 +306,7 @@ if ( $p_jrn != -1 ) echo_debug('facture.inc.php.php',__LINE__,"Blank form"); // Show an empty form of invoice $form=FormVenInput($cn,$p_jrn,$User->GetPeriode(),null,false,$jrn->GetDefLine()); - echo '
'; + echo '
'; echo $form; //-------------------- diff --git a/include/impress_fiche.php b/include/impress_fiche.php index 18ad2552e..709e45b93 100644 --- a/include/impress_fiche.php +++ b/include/impress_fiche.php @@ -132,6 +132,7 @@ if ( isset ($_REQUEST['fd_id'])) { echo "
"; } else { + echo ''; } ?> diff --git a/include/periode.inc.php b/include/periode.inc.php index 5da09434a..6b6829642 100644 --- a/include/periode.inc.php +++ b/include/periode.inc.php @@ -23,7 +23,9 @@ * \todo check if obsolete */ + require_once("preference.php"); +echo '
'; $cn=DbConnect($gDossier); //----------------------------------------------------- // Periode @@ -109,5 +111,5 @@ if ( $action== "delete_per" ) { ShowPeriode($cn); - +echo '
'; ?> diff --git a/include/quick_writing.inc.php b/include/quick_writing.inc.php index 7b208da2a..34cfa4c93 100644 --- a/include/quick_writing.inc.php +++ b/include/quick_writing.inc.php @@ -79,6 +79,7 @@ $ledger->with_concerned=true; // no ledger selected, propose one if ($id == -1 ) { + echo '
'; // Vide echo '
'; @@ -87,6 +88,7 @@ if ($id == -1 ) echo $ledger->select_ledger()->IOValue(); echo widget::submit_button('show_form','Choix du journal'); echo '
'; + echo '
'; exit(); } if ( $User->AccessJrn($cn,$id) == false ) { diff --git a/include/stock.inc.php b/include/stock.inc.php index 1d0e68b05..61b9c7e2b 100644 --- a/include/stock.inc.php +++ b/include/stock.inc.php @@ -167,7 +167,7 @@ if ( $action == 'detail' ) { echo dossier::hidden(); echo ''; } - echo ''; + echo ''; echo '
'; diff --git a/include/stock_inc.php b/include/stock_inc.php index b99a4418b..eb7494c49 100644 --- a/include/stock_inc.php +++ b/include/stock_inc.php @@ -67,7 +67,8 @@ $sql=" select distinct sg_code // sg_code and link to details $result.="".''. + HREF="?p_action=stock&action=detail&sg_code='.$r['sg_code'].'&year='.$p_year. + '&'.dossier::get().'">'. $r['sg_code'].""; // name @@ -220,7 +221,7 @@ $sql="select sg_code, // jr_internal $r.=""; if ( $l['jr_id'] != "") - $r.= " ".$l['jr_internal'].""; + $r.= " ".$l['jr_internal'].""; else $r.=$l['jr_internal']; diff --git a/include/supplier.inc.php b/include/supplier.inc.php index 9f0ccdb2c..ae82ca755 100644 --- a/include/supplier.inc.php +++ b/include/supplier.inc.php @@ -77,7 +77,7 @@ if ( $sub_action=="blank") { $retour=sprintf('', "commercial.php?p_action=fournisseur"); - echo '
'; + echo '
'; echo $retour; $c=new Supplier($cn); @@ -130,7 +130,7 @@ if ( $sub_action == "list" ) $sup=new Supplier($cn); $search=(isset($_GET['query']))?$_GET['query']:""; // echo '
'; - echo '
'; + echo '
'; echo $sup->Summary($search); echo '
'; echo '
'; @@ -141,7 +141,7 @@ if ( $sub_action == "list" ) if ( $sub_action == 'detail' ) { $f_id=$_REQUEST['f_id']; - echo '
'; + echo '
'; $sup=new Supplier($cn,$f_id); $retour=sprintf('', urldecode($_REQUEST['url'])); diff --git a/include/user_action_ods.php b/include/user_action_ods.php index a19d6dc4b..5e01f7d60 100644 --- a/include/user_action_ods.php +++ b/include/user_action_ods.php @@ -201,7 +201,7 @@ if ( $action == 'new' ) { } if ( $action == 'voir_jrn' ) { // Check privilege - if ( CheckJrn($gDossier,$_SESSION['g_user'],$_POST['p_jrn']) < 1 ) { + if ( CheckJrn($gDossier,$_SESSION['g_user'],$_REQUEST['p_jrn']) < 1 ) { NoAccess(); exit -1; } diff --git a/include/user_menu.php b/include/user_menu.php index 9e9bc1d76..577b036ba 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -172,25 +172,26 @@ function ShowMenuCompta($p_high="") } $str_dossier=dossier::get(); $p_array=array( - array("user_jrn.php?jrn_type=NONE&".$str_dossier ,"Grand Livre"), - array("user_jrn.php?jrn_type=VEN&".$str_dossier ,"Entrée"), - array("user_jrn.php?jrn_type=ACH&".$str_dossier,"Dépense"), - array("user_jrn.php?jrn_type=FIN&".$str_dossier,"Financier"), - array("user_jrn.php?jrn_type=ODS&".$str_dossier,"Op. Diverses"), - array('compta.php?p_action=quick_writing&'.$str_dossier,'Ecriture directe','Ecriture directe dans les journaux',4), - - array("compta.php?p_action=impress&".$str_dossier,"Impression","Impression",5), + array("user_jrn.php?jrn_type=NONE&".$str_dossier ,"Grand Livre"), + array("user_jrn.php?jrn_type=VEN&".$str_dossier ,"Entrée"), + array("user_jrn.php?jrn_type=ACH&".$str_dossier,"Dépense"), + array("user_jrn.php?jrn_type=FIN&".$str_dossier,"Financier"), + array("user_jrn.php?jrn_type=ODS&".$str_dossier,"Op. Diverses"), + array('compta.php?p_action=quick_writing&'.$str_dossier,'Ecriture directe','Ecriture directe dans les journaux',4), + + array("compta.php?p_action=impress&".$str_dossier,"Impression","Impression",5), array("compta.php?p_action=fiche&".$str_dossier,"Fiche","Ajouter, modifier ou effacer des fiches",6), - array("user_advanced.php?".$str_dossier,"Avancé","Opérations délicates",7), + array("user_advanced.php?".$str_dossier,"Avancé","Opérations délicates",7), ); $result=ShowItem($p_array,'H',"mtitle","mtitle",$default,' width="100%"'); $str_dossier=dossier::get(); - - $r="

Comptabilité ".dossier::name()."

"; - - $r.='
- + $r=""; + $r.='
'; + $r.="

Comptabilité ".dossier::name()."

"; + $r.='
'; + $r.='
'; + $r.=' @@ -201,9 +202,10 @@ function ShowMenuCompta($p_high="") -
'; - +
'; + $r.='
'; $r.=$result; + $r.='
'; return $r;