This commit is contained in:
sparkyx 2007-10-20 14:38:25 +00:00
parent 56d037d9eb
commit 6ac9e49073
18 changed files with 79 additions and 52 deletions

View file

@ -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;

View file

@ -57,8 +57,10 @@ echo ShowItem ( array (
array ("ecrit_ouv.php?import&".$str_dossier,"Import")
),'V');
echo '</div>';
echo '<div class="redcontent">';
//----------------------------------------------------- EXPORT ////////////////////////////////////////////
echo '<div class="u_redcontent">';
//-----------------------------------------------------
//EXPORT
////////////////////////////////////////////
if ( isset ($_GET['export'])) {
// if the year is not set, ask it
// ask the exercice and do the export

View file

@ -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;

View file

@ -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;
}

View file

@ -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;

View file

@ -70,7 +70,7 @@ if ($p_action == "periode" ) {
//--------------------------------------------------
if ($p_action=="preod") {
echo '<div class="u_content">';
echo '<form method="GET">';
$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 '<hr>';
echo widget::submit_button('Accepter','Accepter');
echo '</form>';
// 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 '</table>';
}
echo '</div>';
}

View file

@ -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() {

View file

@ -79,7 +79,7 @@ if ( $sub_action=="blank")
$retour=sprintf('<A class="mtitle" HREF="%s"><input type="button" value="Retour"></A>',
"commercial.php?p_action=client&$str_dossier");
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
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 '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $client->Summary($search);
echo '</div>';
echo '</div>';
@ -146,7 +146,7 @@ if ( $sub_action == "list" )
if ( $sub_action == 'detail' )
{
$f_id=$_REQUEST['f_id'];
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
$client=new Customer($cn,$f_id);
$retour=sprintf('<A class="mtitle" HREF="%s"><input type="button" value="Retour"></A>',
urldecode($_REQUEST['url']));

View file

@ -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 '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $form;
echo '</div>';
exit();
@ -227,7 +227,7 @@ if ( isset ($_POST['add_item']) || isset ($_POST["correct"]) )
<INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Enregistrer" ID="SubmitButton">';
$form=FormAchInput($cn,$p_jrn,$User->GetPeriode(),$_POST,$submit,false,$nb_item);
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
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 '<div class="u_redcontent">';
echo '<div class="u_content">';
echo '<h2 class="info"> Op&eacute;ration '.$internal.' enregistr&eacute;</h2>';
echo $form;
echo '<hr>';
@ -265,7 +265,7 @@ if ( isset($_POST['save']))
$submit.='<input type="button" value="verifie CA" onClick="verify_ca(\'ok\');">';
$submit.='<INPUT TYPE="SUBMIT" name="correct" value="Corriger">';
$form=FormAchView($cn,$p_jrn,$User->GetPeriode(),$_POST,$submit,$nb_number,true);
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $form;
echo '<hr>';
echo '</form>';
@ -296,7 +296,7 @@ if ( isset ($_POST['view_invoice']) )
$form=FormAchInput($cn,$p_jrn,$User->GetPeriode(),$_POST,$submit, false, $nb_number);
}
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $form;
echo '</div>';
exit();
@ -320,7 +320,7 @@ if ( $p_jrn != -1 )
<INPUT TYPE="SUBMIT" NAME="view_invoice" VALUE="Enregistrer" ID="SubmitButton">';
// Show an empty form of invoice
$form=FormAchInput($cn,$p_jrn,$User->GetPeriode(),null,$submit,false,$jrn->getDefLine());
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $form;
echo $msg_tva;
//--------------------

View file

@ -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 '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $form;
echo '</div>';
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 '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $form;
echo '</div>';
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 '<div class="u_redcontent">';
echo '<div class="u_content">';
echo '<h2 class="info"> Op&eacute;ration '.$internal.' enregistr&eacute;</h2>';
echo $form;
echo '<hr>';
@ -285,7 +285,7 @@ if ( isset ($_POST['view_invoice']) )
$form=FormVenInput($cn,$p_jrn,$User->GetPeriode(),$_POST,false,$nb_number);
}
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $form;
echo '</div>';
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 '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $form;
//--------------------

View file

@ -132,6 +132,7 @@ if ( isset ($_REQUEST['fd_id'])) {
echo "</div>";
}
else {
echo '<div class="lmenu">';
// only the menu
$fiche_def=new fiche_def($cn);
@ -144,6 +145,7 @@ if ( isset ($_REQUEST['fd_id'])) {
$i++;
}
echo ShowItem($a,'V');
echo '</div>';
}
?>

View file

@ -23,7 +23,9 @@
* \todo check if obsolete
*/
require_once("preference.php");
echo '<div class="u_content">';
$cn=DbConnect($gDossier);
//-----------------------------------------------------
// Periode
@ -109,5 +111,5 @@ if ( $action== "delete_per" ) {
ShowPeriode($cn);
echo '</div>';
?>

View file

@ -79,6 +79,7 @@ $ledger->with_concerned=true;
// no ledger selected, propose one
if ($id == -1 )
{
echo '<div class="u_content">';
// Vide
echo '<FORM method="get" action="?">';
@ -87,6 +88,7 @@ if ($id == -1 )
echo $ledger->select_ledger()->IOValue();
echo widget::submit_button('show_form','Choix du journal');
echo '</form>';
echo '</div>';
exit();
}
if ( $User->AccessJrn($cn,$id) == false ) {

View file

@ -167,7 +167,7 @@ if ( $action == 'detail' ) {
echo dossier::hidden();
echo '</form>';
}
echo '<A class="mtitle" HREF="?p_action=stock&"'.dossier::get().'><INPUT TYPE="BUTTON" value="Retour"</A>';
echo '<A class="mtitle" HREF="?p_action=stock&'.dossier::get().'"><INPUT TYPE="BUTTON" value="Retour"</A>';
echo '</div>';

View file

@ -67,7 +67,8 @@ $sql=" select distinct sg_code
// sg_code and link to details
$result.="<td>".'<a class="one"
HREF="?p_action=stock&action=detail&sg_code='.$r['sg_code'].'&year='.$p_year.'">'.
HREF="?p_action=stock&action=detail&sg_code='.$r['sg_code'].'&year='.$p_year.
'&'.dossier::get().'">'.
$r['sg_code']."</A></td>";
// name
@ -220,7 +221,7 @@ $sql="select sg_code,
// jr_internal
$r.="<TD>";
if ( $l['jr_id'] != "")
$r.= "<A class=\"detail\" HREF=\"javascript:modifyOperation('".$l['jr_id']."','".$_REQUEST['PHPSESSID']."')\" > ".$l['jr_internal']."</A>";
$r.= "<A class=\"detail\" HREF=\"javascript:modifyOperation('".$l['jr_id']."','".$_REQUEST['PHPSESSID']."',".dossier::id().",0,'S')\" > ".$l['jr_internal']."</A>";
else
$r.=$l['jr_internal'];

View file

@ -77,7 +77,7 @@ if ( $sub_action=="blank")
{
$retour=sprintf('<A class="mtitle" HREF="%s"><input type="button" value="Retour"></A>',
"commercial.php?p_action=fournisseur");
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
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 '<div style="position:absolute;left:15%;width:67%;margin-top:20px;">';
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
echo $sup->Summary($search);
echo '</div>';
echo '</div>';
@ -141,7 +141,7 @@ if ( $sub_action == "list" )
if ( $sub_action == 'detail' )
{
$f_id=$_REQUEST['f_id'];
echo '<div class="u_redcontent">';
echo '<div class="u_content">';
$sup=new Supplier($cn,$f_id);
$retour=sprintf('<A class="mtitle" HREF="%s"><input type="button" value="Retour"></A>',
urldecode($_REQUEST['url']));

View file

@ -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;
}

View file

@ -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="<H2 class=\"info\">Comptabilit&eacute; ".dossier::name()."</h2>";
$r.='<div align="right">
<input type="IMAGE" src="image/search.png" width="36" onclick="openRecherche(\''.$_REQUEST['PHPSESSID'].'\','.dossier::id().',\'E\');">
$r="";
$r.='<div style="float:left";>';
$r.="<H2 class=\"info\">Comptabilit&eacute; ".dossier::name()."</h2>";
$r.='</div>';
$r.='<div style="float:right;">';
$r.='<input type="IMAGE" src="image/search.png" width="36" onclick="openRecherche(\''.$_REQUEST['PHPSESSID'].'\','.dossier::id().',\'E\');">
<A HREF="user_pref.php?'.$str_dossier.'" title="Pr&eacute;f&eacute;rence"><IMG SRC="image/preference.png" width="36" border="0" ></A>
<A HREF="commercial.php?'.$str_dossier.'" title="Gestion"><IMG SRC="image/compta.png" width="36" border="0" ></A>
<A HREF="comptanalytic.php?'.$str_dossier.'" title="CA"><IMG SRC="image/comptaanal.png" width="36" border="0" ></A>
@ -201,9 +202,10 @@ function ShowMenuCompta($p_high="")
</div></h2> ';
</div> ';
$r.='<div style="float:left;clear:both;">';
$r.=$result;
$r.='</div>';
return $r;