From 002d4ce01a2558259133ec954326f1837b70cca7 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 11 Jun 2010 20:01:43 +0000 Subject: [PATCH] Merged revisions 3280-3284 via svnmerge from svn+ssh://danydb@svn/svn/phpcompta/branches/rel510 ........ r3280 | danydb | 2010-06-11 14:50:28 +0200 (Fri, 11 Jun 2010) | 2 lines Print the accounting in PDF in the right order ........ r3281 | danydb | 2010-06-11 17:37:07 +0200 (Fri, 11 Jun 2010) | 2 lines Improve cosmetic ........ r3282 | danydb | 2010-06-11 17:38:09 +0200 (Fri, 11 Jun 2010) | 1 line Add check for restore of folder or template ........ r3283 | danydb | 2010-06-11 17:46:21 +0200 (Fri, 11 Jun 2010) | 2 lines truncate table quant_* ........ r3284 | danydb | 2010-06-11 17:55:18 +0200 (Fri, 11 Jun 2010) | 1 line Cosmetic : anchorbutton style ........ --- html/image/bg-submit2.gif | Bin 0 -> 1213 bytes html/image/bg-submit3.gif | Bin 0 -> 982 bytes html/poste_pdf.php | 2 +- html/style-color.css | 42 ++++++++++++++++++++ html/style-light.css | 60 +++++++++++++++++++++++++--- html/style.css | 75 +++++++++++++++++++++++++++++++---- include/class_html_input.php | 2 +- include/modele.inc.php | 5 ++- include/pref.inc.php | 4 -- include/restore.inc.php | 28 +++++++++++-- include/user_menu.php | 8 ++-- 11 files changed, 198 insertions(+), 28 deletions(-) create mode 100644 html/image/bg-submit2.gif create mode 100644 html/image/bg-submit3.gif diff --git a/html/image/bg-submit2.gif b/html/image/bg-submit2.gif new file mode 100644 index 0000000000000000000000000000000000000000..74666bcb211e155811058bb21428d06757f6bb31 GIT binary patch literal 1213 zcmb```%}^f003}yx9jX$*Ymm_KQynEX7+TVCFKi65PStbQ3MeI4N?)I$P|<}fuw0^ zrFJW<+b%QV`{n!PAs`TlsaS2Rm4=n(54F{yR4ITgHpLZLqsoS(%fLNl=DieXdnLG^W;#p- zFcct>24<9liS!X1)r_T$B-5cx8l1u~s5ckY*$a749^aAM2$$D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0I z83%g6Rcm^pUlvJeyB~P9R(lOea-&gf)AvbA+fQP2aZBh=P!WU1Z*gqmRY+HLxl?u9 zBbx_0k|+R^*TQE}?O+|Ua4_CpbXtJ1=4TdOfWJnG%WIGs0iMi&fqX`v1+sfNgojt> za2}$9H+h7dw0c*1kS*19H9C~f%yeIHi;+R70DXv#VVoOIp*L%cx?-aa?r~ykkI?XW zB}A|i(1a}Yd>`P0E1{E0V6OnPkvBx4;8L^z@_;pxl#kYgaf6k`Gpx_Xlp}1N-CMIr zX`$0#vpsaMB*B^<|BDfPwE*moHSCT_ZMh^pw%Oy8RCuK8pP`-pk{bDtLVmGlXu|;K zj+&pMtJsx<-;$pDn-_$?64#_Gg1kKbnlDzo&#J6_eZ(O4pGN$gS(~oRX}R@G!t(N? zSKgzV<*g`-xX=5k8?Ujhl*tsDyq>1A;M=O5<*1g2(hmEpPLIq``>b%7&pZCKC3N09 zhT2J_)HLX|s*%X@__uTZza+H6Sk#H{(iH>}oA!^Oe+zG$u2UjNJn`ooTu zGaI`fBWaB z=;rIi|6Szg_R9Wl`{}yy==SgI>h|)Q-_%uEC2ui03rZ2000QP0ByJ-q^F?4g9sBUH2CaUwucZSN}Nbh;%A85Frp=o;bL!m5v!~CWJ4p#0O0=laqezn~ zUCOkn)2C3QN}Wozs@1DlvufSSRp`R6U=^MjOSY`pvuM+*UCXwu+qZDz%AHHMuHCzM z^XlEpx3Ay7fCCF2OjxcIErk>J)dQHZ;=Y6;OP)-*vgOJuQvrpUscan_request(IMPPOSTE,0); extract($_GET); if ( isset ( $poste_fille) ){ //choisit de voir tous les postes - $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$poste_id%'"); + $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text like '$poste_id%' order by pcm_val"); } else $a_poste=$cn->get_array("select pcm_val from tmp_pcmn where pcm_val::text = '$poste_id'"); diff --git a/html/style-color.css b/html/style-color.css index dab9bab9d..42607865a 100644 --- a/html/style-color.css +++ b/html/style-color.css @@ -518,6 +518,7 @@ fieldset fieldset legend { select { border: 1px solid blue; margin:2px; +background-color:white; } @@ -771,4 +772,45 @@ cursor:inherit; font-color:blue; margin:1 2 1 2; } + td.tool { + border: 0; + + } +div.topmenu { + float:left; + width:100%; + +} + +h2.dossier { + color:white; + font-style: oblique; + +font-size:15px; +margin:0; +padding:0; +text-align:center; +} +a#anchorbutton { + font-size:10; + color:black; + text-decoration:none; + font-family: helvetica,arial,sans-serif; + background-color:#DFDFDF; + border-style: outset ; + border-color: blue ; + border-width:1; + padding:2 4 2 4; + cursor:pointer; + margin:1 2 1 2; + -moz-border-radius:2 2; + +} +a#anchorbutton :hover { + cursor:pointer; + background-color:white; + border-style: inset ; + font-color:blue; + margin:1 2 1 2; + } /* */ diff --git a/html/style-light.css b/html/style-light.css index 494b9cf73..1e3a4649b 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -90,9 +90,9 @@ h1.title { div.u_tmenu { position: float; - margin-top:1px; + margin-top:0px; width:100%; - background-color:#879ED4; + /* background-color:#879ED4; */ } @@ -104,7 +104,6 @@ div.u_subtmenu { } div.u_tmenu div.u_tool { - background-color:#879ED4; float:left; } @@ -753,10 +752,15 @@ cursor:inherit; .button { font-size:10; - color:black; + color:white; + font-weight: bold; + text-decoration:none; font-family: helvetica,arial,sans-serif; - background-color:#DFDFDF; + background-image: url("image/bg-submit3.gif"); + background-repeat: repeat-x; + background-position: left; + border-style: outset ; border-color: blue ; border-width:1; @@ -773,4 +777,50 @@ cursor:inherit; font-color:blue; margin:1 2 1 2; } + td.tool { + border: solid 1px gray; + + } +div.topmenu { + float:left; + width:100%; + +} + +h2.dossier { + color:darkblue; + font-style: italic; + +font-size:14px; +margin:0; +padding:0; +text-align:center; +} +a#anchorbutton { + font-size:10; + color:white; + font-weight: bold; + + text-decoration:none; + font-family: helvetica,arial,sans-serif; + background-image: url("image/bg-submit3.gif"); + background-repeat: repeat-x; + background-position: left; + + border-style: outset ; + border-color: blue ; + border-width:1; + padding:2 4 2 4; + cursor:pointer; + margin:1 2 1 2; + -moz-border-radius:2 2; + +} +a#anchorbutton:hover { + cursor:pointer; + background-color:white; + border-style: inset ; + font-color:blue; + margin:1 2 1 2; + } /* */ diff --git a/html/style.css b/html/style.css index 106666209..d8db757ed 100644 --- a/html/style.css +++ b/html/style.css @@ -17,14 +17,17 @@ table.result { color:blue; border:blue solid 1px; width:100%; + + } table.result th { font-weight:bold; font-family:helvetica,arial,sans-serif; - border-bottom:1px solid blue; + border-bottom:0; padding-left:10px; padding-right:10px; - background-color: silver; + background-color: #7CBBFF; + color:darkblue; } h2 { @@ -210,10 +213,7 @@ table.document th{ background-color:lightgrey; color:darkblue; } -table.result th{ - background-color:lightgrey; - color:darkblue; -} + span.error { color:black; background-color:red; @@ -523,6 +523,7 @@ fieldset fieldset legend { select { border: 1px solid blue; margin:2px; +background-color:white; } @@ -751,10 +752,17 @@ cursor:inherit; .button { font-size:10; - color:black; + color:white; + font-weight: bold; + text-decoration:none; font-family: helvetica,arial,sans-serif; - background-color:#DFDFDF; + background-image: url("image/bg-submit2.gif"); + background-repeat: repeat-x; + background-position: left; + text-decoration:none; + font-family: helvetica,arial,sans-serif; + border-style: outset ; border-color: blue ; border-width:1; @@ -771,4 +779,55 @@ cursor:inherit; font-color:blue; margin:1 2 1 2; } + td.tool { + border: 0; + + + } +div.topmenu { + float:left; + width:100%; + +} + +h2.dossier { + color:white; + font-style: italic; + +font-size:14px; +margin:0; +padding:0; +text-align:center; +} +a#anchorbutton { + font-size:10; + color:white; + font-weight: bold; + + text-decoration:none; + font-family: helvetica,arial,sans-serif; + background-image: url("image/bg-submit2.gif"); + background-repeat: repeat-x; + background-position: left; + text-decoration:none; + font-family: helvetica,arial,sans-serif; + + border-style: outset ; + border-color: blue ; + border-width:1; + padding:2 4 2 4; + cursor:pointer; + margin:1 2 1 2; + -moz-border-radius:2 2; + display:inline; + +} +a#anchorbutton:hover{ + cursor:pointer; + background-color:white; + border-style: inset ; + font-color:blue; + margin:1 2 1 2; +} + /* */ diff --git a/include/class_html_input.php b/include/class_html_input.php index 081c1771d..bc6b25c28 100755 --- a/include/class_html_input.php +++ b/include/class_html_input.php @@ -206,7 +206,7 @@ echo $string => {'prop':'1','prop2':'2','prop3':'3'}; *\return string with htmlcode */ static function button_anchor($p_label,$p_value,$p_name="") { - $r=sprintf(' %s', + $r=sprintf(' %s', $p_name, $p_value, $p_label); diff --git a/include/modele.inc.php b/include/modele.inc.php index fe53118cb..c2b23359c 100644 --- a/include/modele.inc.php +++ b/include/modele.inc.php @@ -118,8 +118,11 @@ if ( isset ($_POST["FMOD_NAME"]) ) { $Res=$cn_mod->exec_sql('delete from operation_analytique'); // TODO - // Nettoyage table quant_* + $Res=$cn_mod->exec_sql("truncate table jrn_rapt"); + $Res=$cn_mod->exec_sql("truncate table quant_fin"); + $Res=$cn_mod->exec_sql("truncate table quant_purchase"); + $Res=$cn_mod->exec_sql("truncate table quant_sold"); $Res=$cn_mod->exec_sql("truncate table import_tmp"); // Reset the closed periode $Res=$cn_mod->exec_sql("update parm_periode set p_closed='f'"); diff --git a/include/pref.inc.php b/include/pref.inc.php index 5275b3301..66127a54d 100644 --- a/include/pref.inc.php +++ b/include/pref.inc.php @@ -36,11 +36,7 @@ echo '
'; if ( isset($_POST['pass_1']) && strlen(trim($_POST['pass_1'])) != 0 ) { if ($_POST['pass_1'] != $_POST['pass_2'] ) { - ?> - -exec_sql("create database ".$name." encoding='utf8'"); $args=" --no-owner -d $name ".$_FILES['file']['tmp_name']; - $status=passthru(PG_RESTORE.$args); - echo '

Restauration réussie du dossier '.$lname.'

'; - + exec(PG_RESTORE.$args); + $test=new Database($id); + if ( $test->exist_table('version') ){ + echo '

Restauration réussie du dossier '.$lname.'

'; + $test->close(); + } else { + $test->close(); + echo '

Problème lors de la restauration '.$lname.'

'; + $cn->exec_sql('delete from ac_dossier where dos_id=$1',array($id)); + $cn->exec_sql('drop database '.$name); + exit(); + } $new_cn=new Database($id); $new_cn->apply_patch($name,0); @@ -131,7 +140,18 @@ if ( isset ($_REQUEST['sa'] )) { $args=" -d $name ".$_FILES['file']['tmp_name']; $status=exec(PG_RESTORE.$args); - echo '

Restauration réussie du modèle '.$lname.'

'; + $test=new Database($id,'mod'); + if ( $test->exist_table('version') ){ + echo '

Restauration réussie du dossier '.$lname.'

'; + $test->close(); + } else { + $test->close(); + echo '

Problème lors de la restauration '.$lname.'

'; + $cn->exec_sql('delete from modeledef where mod_id=$1',array($id)); + $cn->exec_sql('drop database '.$name); + exit(); + } + $new_cn=new Database($id,'mod'); $new_cn->apply_patch($name,0); diff --git a/include/user_menu.php b/include/user_menu.php index 70684b867..58754878c 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -202,7 +202,7 @@ function ShowMenuCompta($p_high="") $str_dossier=dossier::get(); $r=""; $r.=menu_tool("compta.php"); - $r.='
'; + $r.='
'; $r.=$result; $r.='
'; @@ -431,7 +431,7 @@ function menu_tool($p_from) { $r.= '
'; $r.= '
'; - $r.= "

Dossier : ".h(dossier::name())."

"; + $r.= "

Dossier : ".h(dossier::name())."

"; $r.= '
'; $r.= '
'; if ( $p_from == 'compta') $view='E'; @@ -465,13 +465,13 @@ function menu_tool($p_from) { $r.=''; continue; } - $r.= ''. + $r.= ''. ''.$col['label'].''. ''; } } - $r.=''; + $r.=''; $r.= ''. _('Recherche').''; $r.='';