Many little Bugs fixed
This commit is contained in:
parent
b659b1a9a6
commit
0a57ed13d4
20 changed files with 539 additions and 239 deletions
|
|
@ -338,6 +338,7 @@ Op
|
|||
</sect>
|
||||
|
||||
<sect>Sécurité
|
||||
<sect1> Remarques
|
||||
<p>
|
||||
PhpCompta a sa propre sécurité, cependant si vous voulez vraiment
|
||||
sécuriser votre comptabilité, vous devez prendre en compte qu'il ne
|
||||
|
|
@ -349,8 +350,63 @@ trop facile
|
|||
mesures qui déterminera la sécurité de vos données, il suffit d'une
|
||||
seule faiblesse pour que la sécurité soit insuffisante. Le sujet
|
||||
est très vaste, il englobe trop de choses. C'est pourquoi nous ne
|
||||
traiterons que de PhpCompta uniquement.
|
||||
traiterons que de PhpCompta uniquement et un tout petit peu de PostgreSql.
|
||||
</sect1>
|
||||
<sect1> Base de données
|
||||
<p>
|
||||
En tout premier lieu, si vous avez réussi à tout installer, vous
|
||||
devez ajouter une sécurité à l'accès de vos database. Donc n'essayez
|
||||
pas d'utiliser install.sh quand la sécurité par mot de passe est
|
||||
activée !!! Ou alors mettez le mot de passe dans ~/.pgpass de
|
||||
l'utilisateur phpcompta
|
||||
|
||||
Dans include/constant.php changer le mot de passe (ligne
|
||||
phpcompta_password), il contient dany par défaut par votre mot de
|
||||
passe
|
||||
|
||||
En tant
|
||||
qu'utilisateur postgres, ajoutez un mot de passe à votre utilisateur
|
||||
phpcompta avec la commande //
|
||||
psql -c "alter user phpcompta password 'votre_mot_de_passe'"
|
||||
Ce mot de passe est évidemment celui dont on a parlé au paragraphe
|
||||
précédent.
|
||||
|
||||
|
||||
Ensuite changez le pg_hba.conf, et mettez les lignes suivantes
|
||||
<verb>
|
||||
host all all 172.16.31.0 255.255.255.0 md5
|
||||
local all all md5
|
||||
host all all 127.0.0.1 255.255.255.255 md5
|
||||
</verb>
|
||||
La première ligne corresponde à mon réseau privé.
|
||||
|
||||
Relancez postgres, voilà maintenant un mot de passe sera toujours
|
||||
requis, n'oubliez pas de mettre un mot de passe à vos
|
||||
superutilisateurs PostgreSql avant de changer, sinon vous ne pourrez
|
||||
plus vous connecter.
|
||||
|
||||
Ensuite, changer les droits sur le répertoire où sont vos fichiers
|
||||
avec chmod 700, attention : le propriétaire des fichiers doit être le
|
||||
même que du propriétaire du process httpd, pour vérifier faite ps -ef|grep
|
||||
httpd, le propriétaire du processus ttpd se trouve dans la première
|
||||
colonne.
|
||||
Exemple chez moi, le propriétaire est apache
|
||||
<verb>
|
||||
root@july data]# ps -ef|grep httpd
|
||||
root 24540 1 0 22:47 ? 00:00:00 /opt/http2//bin/httpd -k start
|
||||
apache 24541 24540 0 22:47 ? 00:00:00 [httpd]
|
||||
apache 24542 24540 0 22:47 ? 00:00:00 [httpd]
|
||||
apache 24543 24540 0 22:47 ? 00:00:00 [httpd]
|
||||
apache 24544 24540 0 22:47 ? 00:00:00 [httpd]
|
||||
apache 24545 24540 0 22:47 ? 00:00:00 [httpd]
|
||||
root 24555 23968 0 22:56 pts/0 00:00:00 grep httpd
|
||||
|
||||
</verb>
|
||||
</sect1>
|
||||
|
||||
|
||||
<sect1> PhpCompta
|
||||
<p>
|
||||
Dans PhpCompta, le module de sécurité permet d'établir quel
|
||||
utilisateur peut accéder à quel dossier, ce qu'il peut y faire,
|
||||
les journaux qu'il peut accéder. Chaque fois qu'une page est chargée,
|
||||
|
|
@ -379,12 +435,78 @@ permis. Si son droit par d
|
|||
pourra écrire partout sauf là ou est explicitement il ne peut
|
||||
qu'écrire. Le sens d'écrire dans ce contexte-ci doit se comprendre
|
||||
comme la capacité à pouvoir ajouter ou modifier des informations
|
||||
|
||||
</sect1>
|
||||
</sect>
|
||||
<sect> Gestion de stock
|
||||
<p> Pour toutes les marchandises dont vous voulez gérer le stock, il
|
||||
faut ajouter l'attribut gestion de stock, vous devez y mettre un code,
|
||||
et exactement le même code dans sa contrepartie. Les mêmes
|
||||
marchandises ont toujours deux fiches : l'une pour la vente et l'autre
|
||||
pour l'achat, la seule façon de lier ces fiches est de leur donner le
|
||||
même code de stock.
|
||||
|
||||
Bien faire attention à ce code, il doit être le même pour les fiches
|
||||
achats et ventes de la même marchandise, si vous utilisez ce code
|
||||
stock pour deux différentes marchandise, vous ne serez plus en mesure
|
||||
de faire la différence entre ces 2 marchandises dans le stock.
|
||||
|
||||
Dans le mode utilisateur, les achats et les ventes vont
|
||||
automatiquement mettre le stock à jour. Dans le mode comptable ce
|
||||
n'est pas le cas !
|
||||
|
||||
<sect1> Gestion de stock
|
||||
<p> Dans le menu avancé vous verrez l'item stock, dans le mode
|
||||
comptable, il n'est pas possible de gérer le stock. Il faut rechanger
|
||||
son mode par défaut à User.
|
||||
|
||||
</sect1>
|
||||
</sect>
|
||||
<sect> Rapprochement
|
||||
</sect>
|
||||
<sect> Centralisation
|
||||
</sect>
|
||||
<sect> Exemple
|
||||
<sect1>Ouverture de compte
|
||||
<p>
|
||||
En débit d'année, il faut réouvrir les comptes ou les ouvrir en
|
||||
commençant une activité.
|
||||
|
||||
1 janvier
|
||||
Pierre lance une société dont le capital est de 18200 euros, dont
|
||||
seulement 6100 euro sont libérés et mis sur un compte en banque
|
||||
|
||||
Opération diverse ->
|
||||
débit banque 6100 euros
|
||||
débit capital non appelé 12100
|
||||
à crédit capital souscrit 18200
|
||||
</sect1>
|
||||
<sect1> Quelques factures
|
||||
<p>5 janvier
|
||||
Pierre paie le loyer (400 euro) à son propriétaire par banque, prendre
|
||||
le journal achat
|
||||
|
||||
7 janvier
|
||||
Pierre paie l'eau et le gaz (250 euros + 21%tva), cliquez sur le
|
||||
bouton new pour créer les fiches manquantes
|
||||
|
||||
15 janvier
|
||||
Extrait de compte banquaire: on voit le paiement du loyer du 5 janvier
|
||||
|
||||
17 janvier
|
||||
Banque : on voit les paiements du 7 janvier
|
||||
encoder dans le journal financier, ne pas oublier le rapprochement
|
||||
|
||||
21 janvier
|
||||
Vente : vend 15 pièces de l'article A, paiement par banque
|
||||
|
||||
26 janvier
|
||||
Banque : on voit les paiements du 15 janvier
|
||||
encoder dans le journal financier, ne pas oublier le rapprochement
|
||||
|
||||
31 janvier
|
||||
Banque : le client nous a payé pour la facture du 21
|
||||
encoder dans le journal financier, ne pas oublier le rapprochement
|
||||
</sect1>
|
||||
|
||||
</sect>
|
||||
</article>
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ if ( $count == 0 ) {
|
|||
<TABLE>
|
||||
<TR>
|
||||
<TD> Name <INPUT TYPE="TEXT" NAME="DATABASE"> </TD>
|
||||
</TR><TR>
|
||||
<TD> Description <INPUT TYPE="TEXT" NAME="DESCRIPTION" SIZE="30"> </TD>
|
||||
</TR>
|
||||
<TR> <TD><? echo $template; ?> </TD></TR>
|
||||
|
|
@ -205,14 +206,18 @@ if ( $count == 0 ) {
|
|||
$Res=ExecSql($cn,"truncate table jrn");
|
||||
$Res=ExecSql($cn,"truncate table jrnx");
|
||||
$Res=ExecSql($cn,"truncate table centralized");
|
||||
$Res=ExecSql($cn,"truncate table stock_goods");
|
||||
|
||||
// Reset Sequence
|
||||
$Res=ExecSql($cn,"drop sequence s_jrn");
|
||||
$Res=ExecSql($cn,"drop sequence s_jrn_op");
|
||||
$Res=ExecSql($cn,"drop sequence s_centralized");
|
||||
$Res=ExecSql($cn,"drop sequence s_stock_goods");
|
||||
|
||||
$Res=ExecSql($cn,"create sequence s_jrn");
|
||||
$Res=ExecSql($cn,"create sequence s_jrn_op");
|
||||
$Res=ExecSql($cn,"create sequence s_centralized");
|
||||
$Res=ExecSql($cn,"create sequence s_stock_goods");
|
||||
}
|
||||
// Show all available templates
|
||||
|
||||
|
|
|
|||
|
|
@ -72,19 +72,20 @@ if ( isset ($annul) ) {
|
|||
j_text,j_internal,'$g_user',$period
|
||||
from jrnx where j_grpt=".$_POST['p_id'];
|
||||
$Res=ExecSql($cn,$sql);
|
||||
// Get the internal code
|
||||
$internalcode=SetInternalCode($cn,$seq,$g_jrn);
|
||||
|
||||
|
||||
// build the sql stmt for jrn
|
||||
$sql= "insert into jrn (
|
||||
jr_def_id,jr_montant,jr_comment, jr_date,jr_grpt_id,jr_internal ,jr_tech_per
|
||||
) select
|
||||
jr_def_id,jr_montant,'Annulation '||jr_comment,jr_date,$seq ,'$internalcode', $period
|
||||
jr_def_id,jr_montant,'Annulation '||jr_comment,jr_date,$seq ,'ANNUL', $period
|
||||
from
|
||||
jrn
|
||||
where jr_grpt_id=".$_POST['p_id'];
|
||||
$Res=ExecSql($cn,$sql);
|
||||
|
||||
// Get the internal code
|
||||
$internalcode=SetInternalCode($cn,$seq,$g_jrn);
|
||||
// also in the stock table
|
||||
$sql="insert into stock_goods (
|
||||
j_id,f_id,sg_quantity,sg_type
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ $cn=DbConnect($l_Db);
|
|||
foreach ($HTTP_GET_VARS as $key=>$element) {
|
||||
// The value are e_name e_type e_PHPSESSID
|
||||
${"e_$key"}=$element;
|
||||
echo("e_$key =$element<br>");
|
||||
echo_debug("e_$key =$element<br>");
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ $r="";
|
|||
foreach ($HTTP_GET_VARS as $key=>$element) {
|
||||
// The value are e_name e_type e_PHPSESSID
|
||||
${"e_$key"}=$element;
|
||||
echo("e_$key =$element<br>");
|
||||
echo_debug("e_$key =$element<br>");
|
||||
|
||||
}
|
||||
$e_fic_search=(isset ($_POST['fic_search']))?$_POST['fic_search']:"";
|
||||
|
|
|
|||
|
|
@ -85,8 +85,9 @@ if ( $g_UserProperty['use_admin'] != 1 ) {
|
|||
} else {
|
||||
$condition.=" uj_login='$g_user' ";
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<div style="font-size:11px;">
|
||||
<?
|
||||
echo '<FORM ACTION="jrn_search.php" METHOD="POST">';
|
||||
echo '<TABLE>';
|
||||
echo '<TR>';
|
||||
|
|
@ -117,7 +118,7 @@ if ( isset ($_POST["search"]) ) {
|
|||
j_montant,j_poste,j_debit,j_tech_per,jr_id,jr_comment,j_grpt,pcm_lib,jr_internal from jrnx inner join
|
||||
jrn on jr_grpt_id=j_grpt inner join tmp_pcmn on j_poste=pcm_val ".
|
||||
" inner join user_sec_jrn on uj_jrn_id=j_jrn_def".
|
||||
$condition." order by j_id");
|
||||
$condition." order by jr_id,j_debit desc");
|
||||
|
||||
$MaxLine=pg_NumRows($Res);
|
||||
if ( $MaxLine==0) {
|
||||
|
|
@ -152,10 +153,10 @@ if ( isset ($_POST["search"]) ) {
|
|||
echo '<TD COLSPAN="4">'.$l_line['jr_comment'].'</TD></TR>';
|
||||
}
|
||||
if ( $l_line['j_debit'] == 't' ) {
|
||||
echo '<TR style="background-color:lightblue;">';
|
||||
echo '<TR style="background-color:#E7FBFF;">';
|
||||
}
|
||||
else {
|
||||
echo '<TR style="background-color:lightgreen;">';
|
||||
echo '<TR style="background-color:#E7FFEB;">';
|
||||
}
|
||||
echo $col_vide;
|
||||
if ( $l_line['j_debit']=='f')
|
||||
|
|
@ -185,5 +186,8 @@ if ( isset ($_POST["search"]) ) {
|
|||
|
||||
echo '</TABLE>';
|
||||
}// if $_POST [search]
|
||||
?>
|
||||
</div>
|
||||
<?
|
||||
html_page_stop();
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ if ( isset ($_POST["p_user"] ) ) {
|
|||
$g_pass=$_POST["p_pass"];
|
||||
session_register("g_user");
|
||||
session_register("g_pass");
|
||||
$cn=pg_connect("dbname=account_repository user='phpcompta' ");
|
||||
|
||||
//$cn=pg_connect("dbname=account_repository user='phpcompta' ");
|
||||
$cn=DbConnect("account_repository");
|
||||
// Verif if User and Pass match DB
|
||||
// if no, then redirect to the login page
|
||||
CheckUser();
|
||||
|
|
|
|||
|
|
@ -67,6 +67,11 @@ if ( ( $M=pg_NumRows($Res)) == 0 ) {
|
|||
exit();
|
||||
|
||||
}
|
||||
$tot_cred= 0.0;
|
||||
$tot_deb= 0.0;
|
||||
$tot_deb_saldo=0.0;
|
||||
$tot_cred_saldo=0.0;
|
||||
|
||||
// Load the array
|
||||
for ($i=0; $i <$M;$i++) {
|
||||
$r=pg_fetch_array($Res,$i);
|
||||
|
|
@ -77,9 +82,23 @@ for ($i=0; $i <$M;$i++) {
|
|||
$a['solde_deb']=( $a['sum_deb'] >= $a['sum_cred'] )? $a['sum_deb']- $a['sum_cred']:0;
|
||||
$a['solde_cred']=( $a['sum_deb'] <= $a['sum_cred'] )?$a['sum_cred']-$a['sum_deb']:0;
|
||||
$array[$i]=$a;
|
||||
|
||||
$tot_cred+= $r['sum_cred'];
|
||||
$tot_deb+= $r['sum_deb'];
|
||||
$tot_deb_saldo+= $a['solde_deb'];
|
||||
$tot_cred_saldo+= $a['solde_cred'];
|
||||
|
||||
|
||||
}//for i
|
||||
// Add the saldo
|
||||
$i+=1;
|
||||
$a['poste']="";
|
||||
$a['label']="<b> Totaux </b>";
|
||||
$a['sum_deb']=$tot_deb;
|
||||
$a['sum_cred']=$tot_cred;
|
||||
$a['solde_deb']=$tot_deb_saldo;
|
||||
$a['solde_cred']=$tot_cred_saldo;
|
||||
$array[$i]=$a;
|
||||
|
||||
$pdf=& new Cezpdf('a4');
|
||||
$pdf->selectFont('./addon/fonts/Helvetica.afm');
|
||||
$pdf->ezSetCmMargins(2,2,2,2);
|
||||
|
|
|
|||
|
|
@ -18,9 +18,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
// Auteur Dany De Bontridder ddebontridder@yahoo.fr
|
||||
include_once ("ac_common.php");
|
||||
/* $Revision$ */
|
||||
include_once("preference.php");
|
||||
include_once ("ac_common.php");
|
||||
include_once("postgres.php");
|
||||
include_once("stock_inc.php");
|
||||
|
||||
html_page_start($g_UserProperty['use_theme']);
|
||||
|
||||
|
|
@ -62,13 +64,42 @@ $left_menu=ShowMenuAdvanced();
|
|||
echo '<div class="lmenu">';
|
||||
echo $left_menu;
|
||||
echo '</DIV>';
|
||||
include_once("stock_inc.php");
|
||||
|
||||
|
||||
// if year is not set then use the year of the user's periode
|
||||
if ( ! isset ($_GET['p_year']) ) {
|
||||
// get defaut periode
|
||||
$a=GetUserPeriode($cn,$g_user);
|
||||
// get exercice of periode
|
||||
$p_year=GetExercice($cn,$a);
|
||||
} else
|
||||
{
|
||||
$p_year=$_GET['p_year'];
|
||||
}
|
||||
|
||||
// Show the possible years
|
||||
$sql="select distinct (p_exercice) as exercice from parm_periode ";
|
||||
$Res=ExecSql($cn,$sql);
|
||||
$r="";
|
||||
for ( $i = 0; $i < pg_NumRows($Res);$i++) {
|
||||
$l=pg_fetch_array($Res,$i);
|
||||
$r.=sprintf('<A class="one" HREF="stock.php?year=%d">%d</a> - ',
|
||||
$l['exercice'],
|
||||
$l['exercice']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Show the current stock
|
||||
echo '<div class="u_redcontent">';
|
||||
echo $r;
|
||||
echo '<FORM action="stock.php" method="post">';
|
||||
|
||||
|
||||
echo '<input type="submit" name="view" value="ok">';
|
||||
$a=ViewStock($cn,$p_year);
|
||||
if ( $a != null ) {
|
||||
echo '<input type="submit" name="view" value="ok">';
|
||||
echo $a;
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
?>
|
||||
|
|
@ -29,7 +29,7 @@ u_ShowMenu($g_UserProperty['use_admin']);
|
|||
$priv=($g_UserProperty['use_admin']==1)?"Administrator":"User";
|
||||
|
||||
echo '<H2 class="info"> Welcome '.$g_UserProperty['use_first_name'].' '.
|
||||
$g_UserProperty['use_name'].', your are an '. $priv.' Please Select your folder</H2>';
|
||||
$g_UserProperty['use_name'].'<br>, your are an '. $priv.' Please Select your folder</H2>';
|
||||
// Show default menu (preference,...)
|
||||
|
||||
// If admin show everything otherwise only the available dossier
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
// Copyright Author Dany De Bontridder ddebontridder@yahoo.fr
|
||||
// $Revision$
|
||||
define ("phpcompta_password","dany");
|
||||
|
||||
// securite correspond a la table
|
||||
// action
|
||||
|
|
|
|||
|
|
@ -539,7 +539,7 @@ if (strlen($e_ech) != 0 and isNumber($e_ech) == 0 and isDate ($e_ech) == null
|
|||
|
||||
// end table
|
||||
$r.='</TABLE> ';
|
||||
$r.='<DIV style="padding:30px;font-size:14pt">';
|
||||
$r.='<DIV style="padding:30px;font-size:14px">';
|
||||
$r.="Total HTVA = $sum_march <br>";
|
||||
$r.="Total = $sum_with_vat";
|
||||
$r.="</DIV>";
|
||||
|
|
@ -611,11 +611,13 @@ function RecordInvoice($p_cn,$p_array,$p_user,$p_jrn)
|
|||
// store quantity & goods in array
|
||||
$a_good[$i]=${"e_march$i"};
|
||||
$a_quant[$i]=${"e_quant$i"};
|
||||
|
||||
$a_price[$i]=0;
|
||||
// check wether the price is set or no
|
||||
if ( isNumber(${"e_march$i"."_sell"}) == 0 ) {
|
||||
// If the price is not set we have to find it from the database
|
||||
$a_price[$i]=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_PRIX_VENTE);
|
||||
if ( isNumber($a_good[$i]) == 1 ) {
|
||||
// If the price is not set we have to find it from the database
|
||||
$a_price[$i]=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_PRIX_VENTE);
|
||||
}
|
||||
} else {
|
||||
// The price is valid
|
||||
$a_price[$i]=${"e_march$i"."_sell"};
|
||||
|
|
@ -633,45 +635,46 @@ function RecordInvoice($p_cn,$p_array,$p_user,$p_jrn)
|
|||
}
|
||||
// First we add in jrnx
|
||||
|
||||
// Compute the j_grpt
|
||||
$seq=GetNextId($p_cn,'j_grpt')+1;
|
||||
// Compute the j_grpt
|
||||
$seq=GetNextId($p_cn,'j_grpt')+1;
|
||||
|
||||
|
||||
// Debit = client
|
||||
$poste=GetFicheAttribut($p_cn,$e_client,ATTR_DEF_ACCOUNT);
|
||||
|
||||
// Debit = client
|
||||
$poste=GetFicheAttribut($p_cn,$e_client,ATTR_DEF_ACCOUNT);
|
||||
InsertJrnx($p_cn,'d',$p_user,$p_jrn,$poste,$e_date,$amount+$sum_vat,$seq,$periode);
|
||||
|
||||
InsertJrnx($p_cn,'d',$p_user,$p_jrn,$poste,$e_date,$amount+$sum_vat,$seq,$periode);
|
||||
|
||||
// Credit = goods
|
||||
for ( $i = 0; $i < $nb_item;$i++) {
|
||||
$poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT);
|
||||
// Credit = goods
|
||||
for ( $i = 0; $i < $nb_item;$i++) {
|
||||
if ( isNumber($a_good[$i]) == 0 ) continue;
|
||||
$poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT);
|
||||
|
||||
// don't record operation of 0
|
||||
if ( $a_price[$i]*$a_quant[$i] == 0 ) continue;
|
||||
|
||||
// record into jrnx
|
||||
$j_id=InsertJrnx($p_cn,'c',$p_user,$p_jrn,$poste,$e_date,$a_price[$i]*$a_quant[$i],$seq,$periode);
|
||||
|
||||
// always save quantity but in withStock we can find what card need a stock management
|
||||
InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c');
|
||||
}
|
||||
// Insert Vat
|
||||
if (sizeof($a_vat) != 0 ) // no vat
|
||||
{
|
||||
foreach ($a_vat as $tva_id => $tva_amount ) {
|
||||
$poste=GetTvaPoste($p_cn,$tva_id,'c');
|
||||
if ($tva_amount == 0 ) continue;
|
||||
InsertJrnx($p_cn,'c',$p_user,$p_jrn,$poste,$e_date,$tva_amount,$seq,$periode);
|
||||
}
|
||||
}
|
||||
echo_debug("echeance = $e_ech");
|
||||
InsertJrn($p_cn,$e_date,$e_ech,$p_jrn,"Invoice",$amount+$sum_vat,$seq,$periode);
|
||||
// Set Internal code and Comment
|
||||
$comment=SetInternalCode($p_cn,$seq,$p_jrn)." client : ".GetFicheName($p_cn,$e_client);
|
||||
|
||||
// don't record operation of 0
|
||||
if ( $a_price[$i]*$a_quant[$i] == 0 ) continue;
|
||||
|
||||
// record into jrnx
|
||||
$j_id=InsertJrnx($p_cn,'c',$p_user,$p_jrn,$poste,$e_date,$a_price[$i]*$a_quant[$i],$seq,$periode);
|
||||
|
||||
// always save quantity but in withStock we can find what card need a stock management
|
||||
InsertStockGoods($p_cn,$j_id,$a_good[$i],$a_quant[$i],'c');
|
||||
}
|
||||
// Insert Vat
|
||||
if (sizeof($a_vat) != 0 ) // no vat
|
||||
{
|
||||
foreach ($a_vat as $tva_id => $tva_amount ) {
|
||||
$poste=GetTvaPoste($p_cn,$tva_id,'c');
|
||||
if ($tva_amount == 0 ) continue;
|
||||
InsertJrnx($p_cn,'c',$p_user,$p_jrn,$poste,$e_date,$tva_amount,$seq,$periode);
|
||||
}
|
||||
}
|
||||
echo_debug("echeance = $e_ech");
|
||||
InsertJrn($p_cn,$e_date,$e_ech,$p_jrn,"Invoice",$amount+$sum_vat,$seq,$periode);
|
||||
// Set Internal code and Comment
|
||||
$comment=SetInternalCode($p_cn,$seq,$p_jrn)." client : ".GetFicheName($p_cn,$e_client);
|
||||
|
||||
// Update and set the invoice's comment
|
||||
$Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq);
|
||||
return $comment;
|
||||
// Update and set the invoice's comment
|
||||
$Res=ExecSql($p_cn,"update jrn set jr_comment='".$comment."' where jr_grpt_id=".$seq);
|
||||
return $comment;
|
||||
}
|
||||
/* function FormAch($p_cn,$p_jrn,$p_user,$p_array=null,$view_only=true,$p_article=1)
|
||||
* Purpose : Display the form for buying
|
||||
|
|
@ -878,6 +881,7 @@ function RecordAchat($p_cn,$p_array,$p_user,$p_jrn)
|
|||
// Computing total customer
|
||||
for ($i=0;$i<$nb_item;$i++) {
|
||||
// store quantity & goods in array
|
||||
if ( isNumber(${"e_march$i"}) == 0 ) continue;
|
||||
$a_good[$i]=${"e_march$i"};
|
||||
$a_quant[$i]=${"e_quant$i"};
|
||||
|
||||
|
|
@ -913,6 +917,7 @@ function RecordAchat($p_cn,$p_array,$p_user,$p_jrn)
|
|||
|
||||
// Credit = goods
|
||||
for ( $i = 0; $i < $nb_item;$i++) {
|
||||
|
||||
$poste=GetFicheAttribut($p_cn,$a_good[$i],ATTR_DEF_ACCOUNT);
|
||||
if ( $a_price[$i] * $a_quant[$i] == 0 ) continue;
|
||||
$j_id=InsertJrnx($p_cn,'d',$p_user,$p_jrn,$poste,$e_date,$a_price[$i]*$a_quant[$i],$seq,$periode);
|
||||
|
|
@ -1263,12 +1268,12 @@ function FormODS($p_cn,$p_jrn,$p_user,$p_submit,$p_array=null,$view_only=true,$p
|
|||
// If $account has a value
|
||||
if ( isNumber($account) == 1 ) {
|
||||
if ( CountSql($p_cn,"select * from tmp_pcmn where pcm_val=$account") == 0 ) {
|
||||
$msg="Poste comptable inexistant !!! ";
|
||||
echo_error($msg); echo_error($msg);
|
||||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
$account="";
|
||||
$msg="Poste comptable inexistant !!! ";
|
||||
echo_error($msg); echo_error($msg);
|
||||
echo "<SCRIPT>alert('$msg');</SCRIPT>";
|
||||
$account="";
|
||||
} else {
|
||||
// retrieve the tva label and name
|
||||
// retrieve the tva label and name
|
||||
$lib=GetPosteLibelle($p_cn, $account,1);
|
||||
}
|
||||
}
|
||||
|
|
@ -1295,8 +1300,13 @@ function FormODS($p_cn,$p_jrn,$p_user,$p_submit,$p_array=null,$view_only=true,$p
|
|||
$c_check=( ${"e_account$i"."_type"} == 'c')?"CHECKED":"";
|
||||
$d_check=( ${"e_account$i"."_type"} == 'd' )?"CHECKED":"";
|
||||
$r.='<td>';
|
||||
$r.=' <input type="radio" name="'."e_account"."$i"."_type".'" value="d" '.$d_check.'> Débit ou ';
|
||||
$r.=' <input type="radio" name="'."e_account"."$i"."_type".'" value="c" '.$c_check.'> Crédit ';
|
||||
if ( $view_only == false ) {
|
||||
$r.=' <input type="radio" name="'."e_account"."$i"."_type".'" value="d" '.$d_check.'> Débit ou ';
|
||||
$r.=' <input type="radio" name="'."e_account"."$i"."_type".'" value="c" '.$c_check.'> Crédit ';
|
||||
}else {
|
||||
$r.=(${"e_account$i"."_type"} == 'c' )?"Crédit":"Débit";
|
||||
$r.='<input type="hidden" name="e_account'.$i.'_type" value="'.${"e_account$i"."_type"}.'">';
|
||||
}
|
||||
$r.='</td>';
|
||||
$r.='</TR>';
|
||||
$sum_deb+=(${"e_account$i"."_type"}=='d')?${"e_account$i"."_amount"}:0;
|
||||
|
|
@ -1319,7 +1329,7 @@ function FormODS($p_cn,$p_jrn,$p_user,$p_submit,$p_array=null,$view_only=true,$p
|
|||
|
||||
}
|
||||
|
||||
/* function RecordAchat
|
||||
/* function RecordODS
|
||||
**************************************************
|
||||
* Purpose : Record an buy in the table jrn &
|
||||
* jrnx
|
||||
|
|
@ -1358,6 +1368,7 @@ function RecordODS($p_cn,$p_array,$p_user,$p_jrn)
|
|||
|
||||
// store into the database
|
||||
for ( $i = 0; $i < $nb_item;$i++) {
|
||||
if ( isNumber(${"e_account$i"}) == 0 ) continue;
|
||||
$sum_deb+=(${"e_account$i"."_type"}=='d')?${"e_account$i"."_amount"}:0;
|
||||
$sum_cred+=(${"e_account$i"."_type"}=='c')?${"e_account$i"."_amount"}:0;
|
||||
|
||||
|
|
|
|||
|
|
@ -287,11 +287,7 @@ if ( $p_update == 0 ) echo "<TR><TD> <INPUT TYPE=\"SUBMIT\" VALUE=\"+ de line\"
|
|||
echo_error ("Not data found for UpdateJrn p_jr_id = $p_jr_id");
|
||||
return ;
|
||||
}
|
||||
for ( $i =0 ; $i < sizeof($l_array); $i++) {
|
||||
foreach ($l_array[$i] as $value) {
|
||||
echo_debug("update key $i value $value content ".$value['j_id']);
|
||||
}
|
||||
}
|
||||
// Javascript
|
||||
$r=JS_VIEW_JRN_MODIFY;
|
||||
|
||||
// Build the form
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function CheckUser()
|
|||
$res=0;
|
||||
$pass5=md5($g_pass);
|
||||
if ( $IsValid == 1 ) { return; }
|
||||
$cn=pg_connect("dbname=account_repository host=127.0.0.1 user='phpcompta'");
|
||||
$cn=DbConnect("account_repository");
|
||||
if ( $cn != false ) {
|
||||
$sql="select ac_users.use_login,ac_users.use_active, ac_users.use_pass
|
||||
from ac_users
|
||||
|
|
@ -134,7 +134,8 @@ function CheckAdmin() {
|
|||
* constant.php
|
||||
*/
|
||||
function DbConnect($p_db="account_repository") {
|
||||
$a=pg_connect("dbname=$p_db host=127.0.0.1 user='phpcompta'");
|
||||
$password=phpcompta_password;
|
||||
$a=pg_connect("dbname=$p_db host=127.0.0.1 user='phpcompta' password='$password'");
|
||||
echo_debug ("connect to $p_db");
|
||||
return $a;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,26 +64,28 @@ function ComputeVat($p_cn, $a_fiche,$a_quant,$a_price) {
|
|||
echo_debug("ComputeVat $a_fiche $a_quant $a_price");
|
||||
// foreach goods
|
||||
for ( $i=0 ; $i < sizeof($a_fiche);$i++) {
|
||||
// Get the tva_id
|
||||
$tva_id=GetFicheAttribut($p_cn,$a_fiche[$i],ATTR_DEF_TVA);
|
||||
|
||||
// for each fiche find the tva_rate and tva_id
|
||||
$a_vat=GetTvaRate($p_cn,$tva_id);
|
||||
|
||||
// Get the attribut price of the card(fiche)
|
||||
if ( $a_vat != null ) {
|
||||
$a=$a_vat['tva_id'];
|
||||
$vat_amount=$a_price[$i]*$a_vat['tva_rate']*$a_quant[$i];
|
||||
$r[$a]=isset ( $r[$a] )?$r[$a]+$vat_amount:$vat_amount;
|
||||
} else {
|
||||
echo_error("Not vat here in ComputeVat !");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
echo_debug(" return $r");
|
||||
return $r;
|
||||
|
||||
|
||||
// if the card id is null or empty
|
||||
if ( isNumber($a_fiche[$i])==0) continue;
|
||||
// Get the tva_id
|
||||
$tva_id=GetFicheAttribut($p_cn,$a_fiche[$i],ATTR_DEF_TVA);
|
||||
|
||||
// for each fiche find the tva_rate and tva_id
|
||||
$a_vat=GetTvaRate($p_cn,$tva_id);
|
||||
|
||||
// Get the attribut price of the card(fiche)
|
||||
if ( $a_vat != null ) {
|
||||
$a=$a_vat['tva_id'];
|
||||
$vat_amount=$a_price[$i]*$a_vat['tva_rate']*$a_quant[$i];
|
||||
$r[$a]=isset ( $r[$a] )?$r[$a]+$vat_amount:$vat_amount;
|
||||
} else {
|
||||
echo_error("Not vat here in ComputeVat !");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
echo_debug(" return $r");
|
||||
return $r;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -257,7 +259,10 @@ function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null)
|
|||
if ( $l_s_comment != null ) {
|
||||
$sql.=$l_and." upper(jr_comment) like upper('%".$l_s_comment."%') ";
|
||||
}
|
||||
|
||||
$l_s_internal=FormatString($l_s_internal);
|
||||
if ( $l_s_internal != null ) {
|
||||
$sql.=$l_and." jr_internal='$l_s_internal' ";
|
||||
}
|
||||
$sql.=" order by jr_date";
|
||||
|
||||
}// p_array != null
|
||||
|
|
@ -301,8 +306,8 @@ function ListJrn($p_cn,$p_jrn,$p_where="",$p_array=null)
|
|||
$r.="</TD>";
|
||||
// button modify
|
||||
$r.="<TD>";
|
||||
$r.=sprintf('<input TYPE="button" onClick="modifyOperation(\'%s\',\'%s\')" value="Détail">',
|
||||
$row['jr_id'],$l_sessid);
|
||||
$r.=sprintf('<input TYPE="button" onClick="modifyOperation(\'%s\',\'%s\')" value="%s">',
|
||||
$row['jr_id'],$l_sessid,$row['jr_internal']);
|
||||
|
||||
|
||||
$r.="</TD>";
|
||||
|
|
@ -360,14 +365,29 @@ return $r;
|
|||
|
||||
function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type)
|
||||
{
|
||||
|
||||
$Res=ExecSql($p_cn,"insert into stock_goods (
|
||||
// Retrieve the good account for stock
|
||||
$code_marchandise="select av_text from
|
||||
jnt_fic_att_value
|
||||
natural join attr_value
|
||||
where
|
||||
ad_id=".ATTR_DEF_STOCK."
|
||||
and f_id=$p_good";
|
||||
$Res=ExecSql($p_cn,$code_marchandise);
|
||||
if ( pg_NumRows($Res) == 0 ) {
|
||||
$l_code='null';
|
||||
}else {
|
||||
$r=pg_fetch_array($Res,0);
|
||||
$l_code=$r['av_text'];
|
||||
}
|
||||
$Res=ExecSql($p_cn,"insert into stock_goods (
|
||||
j_id,
|
||||
f_id,
|
||||
sg_code,
|
||||
sg_quantity,
|
||||
sg_type ) values (
|
||||
$p_j_id,
|
||||
$p_good,
|
||||
'$l_code',
|
||||
$p_quant, '$p_type')
|
||||
");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -340,6 +340,8 @@ function u_ShowMenuRecherche($p_cn,$p_jrn,$p_sessid,$p_array=null)
|
|||
if ( ! isset ($p_mont_sel))$p_mont_sel="";
|
||||
if ( ! isset ($p_s_comment))$p_s_comment="";
|
||||
if ( ! isset ($p_s_montant)) $p_s_montant="";
|
||||
if ( ! isset ($p_s_internal)) $p_s_internal="";
|
||||
|
||||
|
||||
if ( $p_mont_sel != "" ) $opt.='<OPTION value="'.$p_mont_sel.'" SELECTED> '.$p_mont_sel;
|
||||
$r="";
|
||||
|
|
@ -359,6 +361,9 @@ function u_ShowMenuRecherche($p_cn,$p_jrn,$p_sessid,$p_array=null)
|
|||
$r.= ' <SELECT NAME="mont_sel">'.$opt.' </SELECT></TD><TD>';
|
||||
$r.= ' <INPUT TYPE="TEXT" NAME="s_montant" SIZE="10" VALUE="'.$p_s_montant.'"></TD>';
|
||||
$r.= "</TR><TR>";
|
||||
$r.="<TD> Internal code</td>";
|
||||
$r.='<TD><input type="text" name="s_internal" value="'.$p_s_internal.'"></td>';
|
||||
$r.= "</TR><TR>";
|
||||
$r.= '<TD colspan="3"> Le commentaire contient </TD>';
|
||||
$r.= "</TR><TR>";
|
||||
$r.= '<TD COLSPAN="3"> <INPUT TYPE="TEXT" NAME="s_comment" VALUE="'.$p_s_comment.'"></TD>';
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ CREATE TABLE modeledef (
|
|||
--
|
||||
|
||||
INSERT INTO ac_users VALUES (4, 'demo', 'demo', 'demo', 1, 'fe01ce2a7fbac8fafaed7c982a04e229', 0, 'Light', 'user');
|
||||
INSERT INTO ac_users VALUES (1, NULL, NULL, 'phpcompta', 1, 'b1cc88e1907cde80cb2595fa793b3da9', 1, 'classic', 'user');
|
||||
INSERT INTO ac_users VALUES (1, NULL, NULL, 'phpcompta', 1, 'b1cc88e1907cde80cb2595fa793b3da9', 1, 'Light', 'user');
|
||||
|
||||
|
||||
--
|
||||
|
|
|
|||
237
sql/demo.sql
237
sql/demo.sql
|
|
@ -642,14 +642,15 @@ CREATE SEQUENCE s_stock_goods
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 71 (OID 37966)
|
||||
-- TOC entry 71 (OID 38465)
|
||||
-- Name: stock_goods; Type: TABLE; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
CREATE TABLE stock_goods (
|
||||
sg_id integer DEFAULT nextval('s_stock_goods'::text) NOT NULL,
|
||||
j_id integer NOT NULL,
|
||||
j_id integer,
|
||||
f_id integer NOT NULL,
|
||||
sg_code text,
|
||||
sg_quantity integer DEFAULT 0,
|
||||
sg_type character(1) DEFAULT 'c' NOT NULL,
|
||||
CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar)))
|
||||
|
|
@ -909,7 +910,6 @@ INSERT INTO tmp_pcmn VALUES (532, 'd''un mois au plus', 53, 'BE');
|
|||
INSERT INTO tmp_pcmn VALUES (539, 'Réductions de valeur actées', 53, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (54, 'Valeurs échues à l''encaissement', 5, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (55, 'Etablissement de crédit', 5, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (550, 'Banque 1', 55, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (5500, 'Comptes courants', 550, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (5501, 'Chèques émis (-)', 550, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (5509, 'Réduction de valeur actée', 550, 'BE');
|
||||
|
|
@ -1146,7 +1146,6 @@ INSERT INTO tmp_pcmn VALUES (55000001, 'Banque 1', 5500, 'BE');
|
|||
INSERT INTO tmp_pcmn VALUES (4000003, 'Client fiche', 400, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (4000004, 'Toto', 400, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (4000005, 'NOUVEAU CLIENT', 400, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (610002, 'Loyer', 61, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (4511, 'TVA à payer 21%', 451, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (4512, 'TVA à payer 12%', 451, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (4513, 'TVA à payer 6%', 451, 'BE');
|
||||
|
|
@ -1159,6 +1158,13 @@ INSERT INTO tmp_pcmn VALUES (70004, 'Marchandise D', 700, 'BE');
|
|||
INSERT INTO tmp_pcmn VALUES (70003, 'Marchandise C', 700, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (70001, 'Marchandise A', 700, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (4400003, 'Fournisseur E', 440, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (4400004, 'Propriétaire bureau', 440, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (101, 'Capital non appelé', 10, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (610002, 'Loyer', 61, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (4400005, 'Fournisseur Eau Gaz', 440, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (610003, 'eau, gaz electricité', 61, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (550, 'Banque 1', 55, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (6040001, 'Marchandise A', 604, 'BE');
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -1237,13 +1243,22 @@ INSERT INTO jrn_def VALUES (1, 'Financier', '5* ', '5*', '1,2,4,9', '1,2,4,9', 5
|
|||
-- Name: jrn; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
INSERT INTO jrn VALUES (114, 4, 100, 'Annulation OD-01-00001', '2003-01-01', 2, 'Annulation :OD-01-00001', '2004-03-31 23:53:53.587346', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (113, 4, 100, 'OD-01-00001', '2003-01-01', 1, 'OD-01-00001', '2004-03-31 23:50:06.502246', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (115, 4, 20004, 'OD-01-00003', '2003-01-01', 3, 'OD-01-00003', '2004-04-01 00:18:53.002503', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (116, 4, 20004, 'Annulation OD-01-00003', '2003-01-01', 10, 'OD-01-00003', '2004-04-01 00:31:24.541969', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (117, 1, 100, 'FIN-01-00001 client : Banque 1', '2003-01-01', 11, 'FIN-01-00001', '2004-04-01 02:48:19.63074', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (118, 1, 200, 'FIN-01-00002 client : Banque 1', '2003-01-01', 12, 'FIN-01-00002', '2004-04-01 02:50:34.708511', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (119, 1, 300, 'FIN-01-00003 client : Banque 1', '2003-01-01', 13, 'FIN-01-00003', '2004-04-01 03:00:02.520401', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (122, 4, 18200, 'Ouverture', '2003-01-01', 1, 'OD-01-00001', '2004-04-01 19:24:05.182853', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (123, 3, 400, 'Paiement Loyer', '2003-01-05', 2, 'ACH-01-00001', '2004-04-01 19:31:47.396412', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (124, 3, 250, 'ACH-01-00002 client : Fournisseur Eau Gaz', '2003-01-01', 3, 'ACH-01-00002', '2004-04-01 20:21:38.686975', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (125, 3, 302.5, 'ACH-01-00003 client : Fournisseur Eau Gaz', '2003-01-01', 4, 'ACH-01-00003', '2004-04-01 20:23:32.976316', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (126, 1, 302.5, 'FIN-01-00001 client : Banque 1', '2003-01-01', 5, 'FIN-01-00001', '2004-04-01 20:32:32.736425', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (127, 2, 605, 'VEN-01-00001 client : NOUVEAU CLIENT', '2003-01-21', 6, 'VEN-01-00001', '2004-04-01 20:34:22.386245', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (128, 1, 605, 'FIN-01-00002 client : Banque 1', '2003-01-01', 7, 'FIN-01-00002', '2004-04-01 20:36:49.590673', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (129, 3, 250, 'Mauvais encodage sorry :c Annulation ACH-01-00002 client : Fournisseur Eau Gaz', '2003-01-01', 8, 'ACH-01-00003', '2004-04-01 20:39:54.607677', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (130, 2, 1500, 'VEN-01-00002 client : Client 1', '2003-01-01', 9, 'VEN-01-00002', '2004-04-01 20:55:18.159528', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (131, 2, 1500, 'VEN-01-00003 client : Client 1', '2003-01-01', 10, 'VEN-01-00003', '2004-04-01 20:57:29.700277', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (132, 2, 2350, 'VEN-01-00004 client : NOUVEAU CLIENT', '2003-01-01', 11, 'VEN-01-00004', '2004-04-01 20:58:06.619629', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (133, 2, 2843.5, 'VEN-01-00005 client : NOUVEAU CLIENT', '2003-01-01', 12, 'VEN-01-00005', '2004-04-01 21:01:13.773212', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (134, 2, 2843.5, 'VEN-01-00006 client : NOUVEAU CLIENT', '2003-01-01', 13, 'VEN-01-00006', '2004-04-01 21:05:37.500849', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (135, 2, 2843.5, 'VEN-01-00007 client : NOUVEAU CLIENT', '2003-01-01', 14, 'VEN-01-00007', '2004-04-01 21:06:11.818771', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (136, 2, 2843.5, 'Annulation VEN-01-00007 client : NOUVEAU CLIENT', '2003-01-01', 15, 'VEN-01-00007', '2004-04-01 21:06:33.886083', 1, NULL, NULL);
|
||||
INSERT INTO jrn VALUES (137, 2, 2843.5, 'Annulation VEN-01-00006 client : NOUVEAU CLIENT', '2003-01-01', 16, 'VEN-01-00009', '2004-04-01 21:09:00.242086', 1, NULL, NULL);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -1251,32 +1266,53 @@ INSERT INTO jrn VALUES (119, 1, 300, 'FIN-01-00003 client : Banque 1', '2003-01
|
|||
-- Name: jrnx; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
INSERT INTO jrnx VALUES (377, '2003-01-01', 100, 4111, 1, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-03-31 23:50:06.439088', 1);
|
||||
INSERT INTO jrnx VALUES (378, '2003-01-01', 100, 4512, 1, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-03-31 23:50:06.470302', 1);
|
||||
INSERT INTO jrnx VALUES (379, '2004-03-31', 100, 4111, 2, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-03-31 23:53:52.666875', 1);
|
||||
INSERT INTO jrnx VALUES (380, '2004-03-31', 100, 4512, 2, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-03-31 23:53:52.666875', 1);
|
||||
INSERT INTO jrnx VALUES (381, '2003-01-01', 20004, 10, 3, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 00:18:52.913242', 1);
|
||||
INSERT INTO jrnx VALUES (382, '2003-01-01', 20004, 55000001, 3, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 00:18:52.955688', 1);
|
||||
INSERT INTO jrnx VALUES (383, '2004-04-01', 20004, 10, 4, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 00:24:08.281527', 1);
|
||||
INSERT INTO jrnx VALUES (384, '2004-04-01', 20004, 55000001, 4, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 00:24:08.281527', 1);
|
||||
INSERT INTO jrnx VALUES (385, '2004-04-01', 20004, 10, 5, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 00:25:23.554034', 1);
|
||||
INSERT INTO jrnx VALUES (386, '2004-04-01', 20004, 55000001, 5, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 00:25:23.554034', 1);
|
||||
INSERT INTO jrnx VALUES (387, '2004-04-01', 20004, 10, 6, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 00:26:45.800251', 1);
|
||||
INSERT INTO jrnx VALUES (388, '2004-04-01', 20004, 55000001, 6, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 00:26:45.800251', 1);
|
||||
INSERT INTO jrnx VALUES (389, '2004-04-01', 20004, 10, 7, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 00:29:48.737261', 1);
|
||||
INSERT INTO jrnx VALUES (390, '2004-04-01', 20004, 55000001, 7, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 00:29:48.737261', 1);
|
||||
INSERT INTO jrnx VALUES (391, '2004-04-01', 20004, 10, 8, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 00:30:22.855355', 1);
|
||||
INSERT INTO jrnx VALUES (392, '2004-04-01', 20004, 55000001, 8, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 00:30:22.855355', 1);
|
||||
INSERT INTO jrnx VALUES (393, '2004-04-01', 20004, 10, 9, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 00:30:49.403648', 1);
|
||||
INSERT INTO jrnx VALUES (394, '2004-04-01', 20004, 55000001, 9, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 00:30:49.403648', 1);
|
||||
INSERT INTO jrnx VALUES (395, '2004-04-01', 20004, 10, 10, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 00:31:24.116844', 1);
|
||||
INSERT INTO jrnx VALUES (396, '2004-04-01', 20004, 55000001, 10, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 00:31:24.116844', 1);
|
||||
INSERT INTO jrnx VALUES (397, '2003-01-01', 100, 55000001, 11, NULL, 1, true, NULL, false, NULL, 'phpcompta', '2004-04-01 02:48:19.589364', 1);
|
||||
INSERT INTO jrnx VALUES (398, '2003-01-01', 100, 4400003, 11, NULL, 1, false, NULL, false, NULL, 'phpcompta', '2004-04-01 02:48:19.616592', 1);
|
||||
INSERT INTO jrnx VALUES (399, '2003-01-01', 200, 55000001, 12, NULL, 1, false, NULL, false, NULL, 'phpcompta', '2004-04-01 02:50:34.660866', 1);
|
||||
INSERT INTO jrnx VALUES (400, '2003-01-01', 200, 4400003, 12, NULL, 1, true, NULL, false, NULL, 'phpcompta', '2004-04-01 02:50:34.6831', 1);
|
||||
INSERT INTO jrnx VALUES (401, '2003-01-01', 300, 55000001, 13, NULL, 1, true, NULL, false, NULL, 'phpcompta', '2004-04-01 03:00:02.490325', 1);
|
||||
INSERT INTO jrnx VALUES (402, '2003-01-01', 300, 55000002, 13, NULL, 1, false, NULL, false, NULL, 'phpcompta', '2004-04-01 03:00:02.510827', 1);
|
||||
INSERT INTO jrnx VALUES (409, '2003-01-01', 12100, 101, 1, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 19:24:05.153015', 1);
|
||||
INSERT INTO jrnx VALUES (410, '2003-01-01', 6100, 550, 1, NULL, 4, true, NULL, false, NULL, 'phpcompta', '2004-04-01 19:24:05.173273', 1);
|
||||
INSERT INTO jrnx VALUES (411, '2003-01-01', 18200, 100, 1, NULL, 4, false, NULL, false, NULL, 'phpcompta', '2004-04-01 19:24:05.178179', 1);
|
||||
INSERT INTO jrnx VALUES (412, '2003-01-05', 400, 4400004, 2, NULL, 3, false, NULL, false, NULL, 'phpcompta', '2004-04-01 19:31:47.352752', 1);
|
||||
INSERT INTO jrnx VALUES (413, '2003-01-05', 400, 610002, 2, NULL, 3, true, NULL, false, NULL, 'phpcompta', '2004-04-01 19:31:47.373566', 1);
|
||||
INSERT INTO jrnx VALUES (414, '2003-01-05', 0, 4114, 2, NULL, 3, true, NULL, false, NULL, 'phpcompta', '2004-04-01 19:31:47.391112', 1);
|
||||
INSERT INTO jrnx VALUES (415, '2003-01-01', 250, 4400005, 3, NULL, 3, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:21:38.650392', 1);
|
||||
INSERT INTO jrnx VALUES (416, '2003-01-01', 250, 610003, 3, NULL, 3, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:21:38.671208', 1);
|
||||
INSERT INTO jrnx VALUES (417, '2003-01-01', 302.5, 4400005, 4, NULL, 3, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:23:32.935184', 1);
|
||||
INSERT INTO jrnx VALUES (418, '2003-01-01', 250, 610003, 4, NULL, 3, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:23:32.953885', 1);
|
||||
INSERT INTO jrnx VALUES (419, '2003-01-01', 52.5, 4111, 4, NULL, 3, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:23:32.971118', 1);
|
||||
INSERT INTO jrnx VALUES (420, '2003-01-01', 302.5, 550, 5, NULL, 1, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:32:32.704464', 1);
|
||||
INSERT INTO jrnx VALUES (421, '2003-01-01', 302.5, 4400005, 5, NULL, 1, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:32:32.731236', 1);
|
||||
INSERT INTO jrnx VALUES (422, '2003-01-21', 605, 4000005, 6, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:34:22.344788', 1);
|
||||
INSERT INTO jrnx VALUES (423, '2003-01-21', 500, 70001, 6, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:34:22.36528', 1);
|
||||
INSERT INTO jrnx VALUES (424, '2003-01-21', 105, 4511, 6, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:34:22.381173', 1);
|
||||
INSERT INTO jrnx VALUES (425, '2003-01-01', 605, 550, 7, NULL, 1, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:36:49.568072', 1);
|
||||
INSERT INTO jrnx VALUES (426, '2003-01-01', 605, 4000005, 7, NULL, 1, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:36:49.583721', 1);
|
||||
INSERT INTO jrnx VALUES (427, '2004-04-01', 250, 4400005, 8, NULL, 3, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:39:54.561169', 1);
|
||||
INSERT INTO jrnx VALUES (428, '2004-04-01', 250, 610003, 8, NULL, 3, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:39:54.561169', 1);
|
||||
INSERT INTO jrnx VALUES (429, '2003-01-01', 1500, 4000001, 9, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:55:18.122103', 1);
|
||||
INSERT INTO jrnx VALUES (430, '2003-01-01', 1500, 70001, 9, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:55:18.143117', 1);
|
||||
INSERT INTO jrnx VALUES (431, '2003-01-01', 1500, 4000001, 10, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:57:28.871846', 1);
|
||||
INSERT INTO jrnx VALUES (432, '2003-01-01', 1500, 70001, 10, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:57:29.670521', 1);
|
||||
INSERT INTO jrnx VALUES (433, '2003-01-01', 2350, 4000005, 11, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 20:58:06.574822', 1);
|
||||
INSERT INTO jrnx VALUES (434, '2003-01-01', 2250, 70002, 11, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:58:06.59382', 1);
|
||||
INSERT INTO jrnx VALUES (435, '2003-01-01', 100, 70001, 11, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 20:58:06.609582', 1);
|
||||
INSERT INTO jrnx VALUES (436, '2003-01-01', 2843.5, 4000005, 12, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:01:13.009938', 1);
|
||||
INSERT INTO jrnx VALUES (437, '2003-01-01', 2250, 70002, 12, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:01:13.739575', 1);
|
||||
INSERT INTO jrnx VALUES (438, '2003-01-01', 100, 70001, 12, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:01:13.757474', 1);
|
||||
INSERT INTO jrnx VALUES (439, '2003-01-01', 493.5, 4511, 12, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:01:13.767038', 1);
|
||||
INSERT INTO jrnx VALUES (440, '2003-01-01', 2843.5, 4000005, 13, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:05:36.892031', 1);
|
||||
INSERT INTO jrnx VALUES (441, '2003-01-01', 2250, 70002, 13, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:05:37.45208', 1);
|
||||
INSERT INTO jrnx VALUES (442, '2003-01-01', 100, 70001, 13, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:05:37.472918', 1);
|
||||
INSERT INTO jrnx VALUES (443, '2003-01-01', 493.5, 4511, 13, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:05:37.495236', 1);
|
||||
INSERT INTO jrnx VALUES (444, '2003-01-01', 2843.5, 4000005, 14, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:06:11.343749', 1);
|
||||
INSERT INTO jrnx VALUES (445, '2003-01-01', 2250, 70002, 14, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:06:11.787897', 1);
|
||||
INSERT INTO jrnx VALUES (446, '2003-01-01', 100, 70001, 14, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:06:11.803582', 1);
|
||||
INSERT INTO jrnx VALUES (447, '2003-01-01', 493.5, 4511, 14, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:06:11.813172', 1);
|
||||
INSERT INTO jrnx VALUES (448, '2004-04-01', 2843.5, 4000005, 15, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:06:33.863079', 1);
|
||||
INSERT INTO jrnx VALUES (449, '2004-04-01', 2250, 70002, 15, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:06:33.863079', 1);
|
||||
INSERT INTO jrnx VALUES (450, '2004-04-01', 100, 70001, 15, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:06:33.863079', 1);
|
||||
INSERT INTO jrnx VALUES (451, '2004-04-01', 493.5, 4511, 15, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:06:33.863079', 1);
|
||||
INSERT INTO jrnx VALUES (452, '2004-04-01', 2843.5, 4000005, 16, NULL, 2, false, NULL, false, NULL, 'phpcompta', '2004-04-01 21:09:00.226129', 1);
|
||||
INSERT INTO jrnx VALUES (453, '2004-04-01', 2250, 70002, 16, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:09:00.226129', 1);
|
||||
INSERT INTO jrnx VALUES (454, '2004-04-01', 100, 70001, 16, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:09:00.226129', 1);
|
||||
INSERT INTO jrnx VALUES (455, '2004-04-01', 493.5, 4511, 16, NULL, 2, true, NULL, false, NULL, 'phpcompta', '2004-04-01 21:09:00.226129', 1);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -1535,6 +1571,10 @@ INSERT INTO fiche VALUES (14, 2);
|
|||
INSERT INTO fiche VALUES (15, 2);
|
||||
INSERT INTO fiche VALUES (16, 3);
|
||||
INSERT INTO fiche VALUES (17, 4);
|
||||
INSERT INTO fiche VALUES (18, 4);
|
||||
INSERT INTO fiche VALUES (19, 4);
|
||||
INSERT INTO fiche VALUES (20, 5);
|
||||
INSERT INTO fiche VALUES (21, 6);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -1662,6 +1702,34 @@ INSERT INTO jnt_fic_att_value VALUES (117, 17, 15);
|
|||
INSERT INTO jnt_fic_att_value VALUES (118, 17, 16);
|
||||
INSERT INTO jnt_fic_att_value VALUES (119, 17, 17);
|
||||
INSERT INTO jnt_fic_att_value VALUES (120, 17, 18);
|
||||
INSERT INTO jnt_fic_att_value VALUES (121, 18, 5);
|
||||
INSERT INTO jnt_fic_att_value VALUES (122, 18, 1);
|
||||
INSERT INTO jnt_fic_att_value VALUES (123, 18, 12);
|
||||
INSERT INTO jnt_fic_att_value VALUES (124, 18, 13);
|
||||
INSERT INTO jnt_fic_att_value VALUES (125, 18, 14);
|
||||
INSERT INTO jnt_fic_att_value VALUES (126, 18, 15);
|
||||
INSERT INTO jnt_fic_att_value VALUES (127, 18, 16);
|
||||
INSERT INTO jnt_fic_att_value VALUES (128, 18, 17);
|
||||
INSERT INTO jnt_fic_att_value VALUES (129, 18, 18);
|
||||
INSERT INTO jnt_fic_att_value VALUES (130, 19, 5);
|
||||
INSERT INTO jnt_fic_att_value VALUES (131, 19, 1);
|
||||
INSERT INTO jnt_fic_att_value VALUES (132, 19, 12);
|
||||
INSERT INTO jnt_fic_att_value VALUES (133, 19, 13);
|
||||
INSERT INTO jnt_fic_att_value VALUES (134, 19, 14);
|
||||
INSERT INTO jnt_fic_att_value VALUES (135, 19, 15);
|
||||
INSERT INTO jnt_fic_att_value VALUES (136, 19, 16);
|
||||
INSERT INTO jnt_fic_att_value VALUES (137, 19, 17);
|
||||
INSERT INTO jnt_fic_att_value VALUES (138, 19, 18);
|
||||
INSERT INTO jnt_fic_att_value VALUES (139, 20, 5);
|
||||
INSERT INTO jnt_fic_att_value VALUES (140, 20, 1);
|
||||
INSERT INTO jnt_fic_att_value VALUES (141, 20, 2);
|
||||
INSERT INTO jnt_fic_att_value VALUES (142, 20, 7);
|
||||
INSERT INTO jnt_fic_att_value VALUES (143, 21, 5);
|
||||
INSERT INTO jnt_fic_att_value VALUES (144, 21, 1);
|
||||
INSERT INTO jnt_fic_att_value VALUES (145, 21, 2);
|
||||
INSERT INTO jnt_fic_att_value VALUES (146, 21, 6);
|
||||
INSERT INTO jnt_fic_att_value VALUES (147, 21, 7);
|
||||
INSERT INTO jnt_fic_att_value VALUES (148, 21, 19);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -1725,17 +1793,6 @@ INSERT INTO attr_value VALUES (83, '');
|
|||
INSERT INTO attr_value VALUES (84, '');
|
||||
INSERT INTO attr_value VALUES (85, '');
|
||||
INSERT INTO attr_value VALUES (86, '');
|
||||
INSERT INTO attr_value VALUES (11, '');
|
||||
INSERT INTO attr_value VALUES (10, 'a');
|
||||
INSERT INTO attr_value VALUES (9, '');
|
||||
INSERT INTO attr_value VALUES (8, '');
|
||||
INSERT INTO attr_value VALUES (7, '');
|
||||
INSERT INTO attr_value VALUES (6, '');
|
||||
INSERT INTO attr_value VALUES (5, '');
|
||||
INSERT INTO attr_value VALUES (4, '');
|
||||
INSERT INTO attr_value VALUES (3, '');
|
||||
INSERT INTO attr_value VALUES (2, 'Banque 1');
|
||||
INSERT INTO attr_value VALUES (1, '55000001');
|
||||
INSERT INTO attr_value VALUES (87, '4000003');
|
||||
INSERT INTO attr_value VALUES (88, '4000004');
|
||||
INSERT INTO attr_value VALUES (89, 'Toto');
|
||||
|
|
@ -1755,11 +1812,6 @@ INSERT INTO attr_value VALUES (102, '');
|
|||
INSERT INTO attr_value VALUES (103, '');
|
||||
INSERT INTO attr_value VALUES (104, '');
|
||||
INSERT INTO attr_value VALUES (105, '');
|
||||
INSERT INTO attr_value VALUES (73, 'Loyer');
|
||||
INSERT INTO attr_value VALUES (74, '3');
|
||||
INSERT INTO attr_value VALUES (72, '610002');
|
||||
INSERT INTO attr_value VALUES (75, '380');
|
||||
INSERT INTO attr_value VALUES (106, '');
|
||||
INSERT INTO attr_value VALUES (42, 'Marchandise D');
|
||||
INSERT INTO attr_value VALUES (43, '15');
|
||||
INSERT INTO attr_value VALUES (49, '70004');
|
||||
|
|
@ -1789,6 +1841,50 @@ INSERT INTO attr_value VALUES (117, '');
|
|||
INSERT INTO attr_value VALUES (118, '');
|
||||
INSERT INTO attr_value VALUES (119, '');
|
||||
INSERT INTO attr_value VALUES (120, '');
|
||||
INSERT INTO attr_value VALUES (121, '4400004');
|
||||
INSERT INTO attr_value VALUES (122, 'Propriétaire bureau');
|
||||
INSERT INTO attr_value VALUES (123, '');
|
||||
INSERT INTO attr_value VALUES (124, '');
|
||||
INSERT INTO attr_value VALUES (125, '');
|
||||
INSERT INTO attr_value VALUES (126, '');
|
||||
INSERT INTO attr_value VALUES (127, '');
|
||||
INSERT INTO attr_value VALUES (128, '');
|
||||
INSERT INTO attr_value VALUES (129, '');
|
||||
INSERT INTO attr_value VALUES (73, 'Loyer');
|
||||
INSERT INTO attr_value VALUES (74, '4');
|
||||
INSERT INTO attr_value VALUES (72, '610002');
|
||||
INSERT INTO attr_value VALUES (75, '400');
|
||||
INSERT INTO attr_value VALUES (130, '4400005');
|
||||
INSERT INTO attr_value VALUES (131, 'Fournisseur Eau Gaz');
|
||||
INSERT INTO attr_value VALUES (132, '');
|
||||
INSERT INTO attr_value VALUES (133, '');
|
||||
INSERT INTO attr_value VALUES (134, '');
|
||||
INSERT INTO attr_value VALUES (135, '');
|
||||
INSERT INTO attr_value VALUES (136, '');
|
||||
INSERT INTO attr_value VALUES (137, '');
|
||||
INSERT INTO attr_value VALUES (138, '');
|
||||
INSERT INTO attr_value VALUES (140, 'eau, gaz electricité');
|
||||
INSERT INTO attr_value VALUES (141, '1');
|
||||
INSERT INTO attr_value VALUES (139, '610003');
|
||||
INSERT INTO attr_value VALUES (142, '');
|
||||
INSERT INTO attr_value VALUES (2, 'Banque 1');
|
||||
INSERT INTO attr_value VALUES (3, '');
|
||||
INSERT INTO attr_value VALUES (4, '');
|
||||
INSERT INTO attr_value VALUES (1, '550');
|
||||
INSERT INTO attr_value VALUES (5, '');
|
||||
INSERT INTO attr_value VALUES (6, '');
|
||||
INSERT INTO attr_value VALUES (7, '');
|
||||
INSERT INTO attr_value VALUES (8, '');
|
||||
INSERT INTO attr_value VALUES (9, '');
|
||||
INSERT INTO attr_value VALUES (10, 'a');
|
||||
INSERT INTO attr_value VALUES (11, '');
|
||||
INSERT INTO attr_value VALUES (106, '');
|
||||
INSERT INTO attr_value VALUES (144, 'Achat Marchandise A');
|
||||
INSERT INTO attr_value VALUES (145, '3');
|
||||
INSERT INTO attr_value VALUES (143, '6040001');
|
||||
INSERT INTO attr_value VALUES (146, '350');
|
||||
INSERT INTO attr_value VALUES (147, '');
|
||||
INSERT INTO attr_value VALUES (148, '1');
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -1869,11 +1965,13 @@ INSERT INTO jnt_fic_attr VALUES (9, 16);
|
|||
-- Name: jrn_rapt; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
INSERT INTO jrn_rapt VALUES (10, 114, 113);
|
||||
INSERT INTO jrn_rapt VALUES (11, 126, 125);
|
||||
INSERT INTO jrn_rapt VALUES (12, 128, 127);
|
||||
INSERT INTO jrn_rapt VALUES (13, 129, 124);
|
||||
|
||||
|
||||
--
|
||||
-- Data for TOC entry 142 (OID 37966)
|
||||
-- Data for TOC entry 142 (OID 38465)
|
||||
-- Name: stock_goods; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -2016,7 +2114,7 @@ CREATE UNIQUE INDEX idx_jr_id ON jrn USING btree (jr_id);
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 114 (OID 37982)
|
||||
-- TOC entry 114 (OID 38474)
|
||||
-- Name: fk_stock_goods_j_id; Type: INDEX; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -2024,7 +2122,7 @@ CREATE INDEX fk_stock_goods_j_id ON stock_goods USING btree (j_id);
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 113 (OID 37983)
|
||||
-- TOC entry 113 (OID 38475)
|
||||
-- Name: fk_stock_goods_f_id; Type: INDEX; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -2428,7 +2526,7 @@ ALTER TABLE ONLY jrn_rapt
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 115 (OID 37972)
|
||||
-- TOC entry 115 (OID 38476)
|
||||
-- Name: stock_goods_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -2437,16 +2535,7 @@ ALTER TABLE ONLY stock_goods
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 163 (OID 37974)
|
||||
-- Name: $1; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY stock_goods
|
||||
ADD CONSTRAINT "$1" FOREIGN KEY (j_id) REFERENCES jrnx(j_id) ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 164 (OID 37978)
|
||||
-- TOC entry 163 (OID 38478)
|
||||
-- Name: $2; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -2491,7 +2580,7 @@ SELECT pg_catalog.setval ('s_grpt', 1, false);
|
|||
-- Name: s_jrn_op; Type: SEQUENCE SET; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval ('s_jrn_op', 402, true);
|
||||
SELECT pg_catalog.setval ('s_jrn_op', 455, true);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -2499,7 +2588,7 @@ SELECT pg_catalog.setval ('s_jrn_op', 402, true);
|
|||
-- Name: s_jrn; Type: SEQUENCE SET; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval ('s_jrn', 119, true);
|
||||
SELECT pg_catalog.setval ('s_jrn', 137, true);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -2571,7 +2660,7 @@ SELECT pg_catalog.setval ('s_jrnaction', 7, true);
|
|||
-- Name: s_fiche; Type: SEQUENCE SET; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval ('s_fiche', 17, true);
|
||||
SELECT pg_catalog.setval ('s_fiche', 21, true);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -2603,7 +2692,7 @@ SELECT pg_catalog.setval ('s_attr_def', 19, true);
|
|||
-- Name: s_jnt_fic_att_value; Type: SEQUENCE SET; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval ('s_jnt_fic_att_value', 120, true);
|
||||
SELECT pg_catalog.setval ('s_jnt_fic_att_value', 148, true);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -2611,7 +2700,7 @@ SELECT pg_catalog.setval ('s_jnt_fic_att_value', 120, true);
|
|||
-- Name: s_jrn_rapt; Type: SEQUENCE SET; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval ('s_jrn_rapt', 10, true);
|
||||
SELECT pg_catalog.setval ('s_jrn_rapt', 13, true);
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -2619,6 +2708,6 @@ SELECT pg_catalog.setval ('s_jrn_rapt', 10, true);
|
|||
-- Name: s_stock_goods; Type: SEQUENCE SET; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
SELECT pg_catalog.setval ('s_stock_goods', 3, true);
|
||||
SELECT pg_catalog.setval ('s_stock_goods', 24, true);
|
||||
|
||||
|
||||
|
|
|
|||
123
sql/mod-be.sql
123
sql/mod-be.sql
|
|
@ -642,21 +642,6 @@ CREATE SEQUENCE s_stock_goods
|
|||
CACHE 1;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 73 (OID 38015)
|
||||
-- Name: stock_goods; Type: TABLE; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
CREATE TABLE stock_goods (
|
||||
sg_id integer DEFAULT nextval('s_stock_goods'::text) NOT NULL,
|
||||
j_id integer NOT NULL,
|
||||
f_id integer NOT NULL,
|
||||
sg_quantity integer DEFAULT 0,
|
||||
sg_type character(1) DEFAULT 'c' NOT NULL,
|
||||
CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar)))
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 44 (OID 38046)
|
||||
-- Name: s_jrn_rapt; Type: SEQUENCE; Schema: public; Owner: phpcompta
|
||||
|
|
@ -671,7 +656,7 @@ CREATE SEQUENCE s_jrn_rapt
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 74 (OID 38048)
|
||||
-- TOC entry 73 (OID 38048)
|
||||
-- Name: jrn_rapt; Type: TABLE; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -682,6 +667,22 @@ CREATE TABLE jrn_rapt (
|
|||
);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 74 (OID 38482)
|
||||
-- Name: stock_goods; Type: TABLE; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
CREATE TABLE stock_goods (
|
||||
sg_id integer DEFAULT nextval('s_stock_goods'::text) NOT NULL,
|
||||
j_id integer,
|
||||
f_id integer NOT NULL,
|
||||
sg_code text,
|
||||
sg_quantity integer DEFAULT 0,
|
||||
sg_type character(1) DEFAULT 'c' NOT NULL,
|
||||
CONSTRAINT stock_goods_sg_type CHECK (((sg_type = 'c'::bpchar) OR (sg_type = 'd'::bpchar)))
|
||||
);
|
||||
|
||||
|
||||
--
|
||||
-- Data for TOC entry 104 (OID 36606)
|
||||
-- Name: tmp_pcmn; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
|
|
@ -1189,6 +1190,7 @@ INSERT INTO tmp_pcmn VALUES (610004, 'Mat
|
|||
INSERT INTO tmp_pcmn VALUES (7000002, 'Marchandise A', 700, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (7000001, 'Prestation', 700, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (7000003, 'Déplacement', 700, 'BE');
|
||||
INSERT INTO tmp_pcmn VALUES (101, 'Capital non appelé', 10, 'BE');
|
||||
|
||||
|
||||
--
|
||||
|
|
@ -1385,7 +1387,7 @@ INSERT INTO tva_rate VALUES (4, '0%', 0, 'Tva applicable lors de vente/achat int
|
|||
-- Name: fiche_def_ref; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
INSERT INTO fiche_def_ref VALUES (1, 'Vente Service', 700);
|
||||
INSERT INTO fiche_def_ref VALUES (1, 'Vente Marchandise Service', 700);
|
||||
INSERT INTO fiche_def_ref VALUES (2, 'Achat Marchandises', 604);
|
||||
INSERT INTO fiche_def_ref VALUES (3, 'Achat Service et biens divers', 61);
|
||||
INSERT INTO fiche_def_ref VALUES (4, 'Banque', 5500);
|
||||
|
|
@ -1871,19 +1873,19 @@ INSERT INTO jnt_fic_attr VALUES (6, 19);
|
|||
|
||||
|
||||
--
|
||||
-- Data for TOC entry 130 (OID 38015)
|
||||
-- Name: stock_goods; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Data for TOC entry 131 (OID 38048)
|
||||
-- Data for TOC entry 130 (OID 38048)
|
||||
-- Name: jrn_rapt; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Data for TOC entry 131 (OID 38482)
|
||||
-- Name: stock_goods; Type: TABLE DATA; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 92 (OID 37818)
|
||||
-- Name: x_act; Type: INDEX; Schema: public; Owner: phpcompta
|
||||
|
|
@ -1901,7 +1903,15 @@ CREATE UNIQUE INDEX x_usr_jrn ON user_sec_jrn USING btree (uj_login, uj_jrn_id);
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 101 (OID 38031)
|
||||
-- TOC entry 83 (OID 38053)
|
||||
-- Name: x_jrn_jr_id; Type: INDEX; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
CREATE UNIQUE INDEX x_jrn_jr_id ON jrn USING btree (jr_id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 102 (OID 38491)
|
||||
-- Name: fk_stock_goods_j_id; Type: INDEX; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -1909,21 +1919,13 @@ CREATE INDEX fk_stock_goods_j_id ON stock_goods USING btree (j_id);
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 100 (OID 38032)
|
||||
-- TOC entry 101 (OID 38492)
|
||||
-- Name: fk_stock_goods_f_id; Type: INDEX; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
CREATE INDEX fk_stock_goods_f_id ON stock_goods USING btree (f_id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 83 (OID 38053)
|
||||
-- Name: x_jrn_jr_id; Type: INDEX; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
CREATE UNIQUE INDEX x_jrn_jr_id ON jrn USING btree (jr_id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 75 (OID 37820)
|
||||
-- Name: tmp_pcmn_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
|
|
@ -2294,34 +2296,7 @@ ALTER TABLE ONLY jnt_fic_attr
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 102 (OID 38021)
|
||||
-- Name: stock_goods_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY stock_goods
|
||||
ADD CONSTRAINT stock_goods_pkey PRIMARY KEY (sg_id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 151 (OID 38023)
|
||||
-- Name: $1; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY stock_goods
|
||||
ADD CONSTRAINT "$1" FOREIGN KEY (j_id) REFERENCES jrnx(j_id) ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 152 (OID 38027)
|
||||
-- Name: $2; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY stock_goods
|
||||
ADD CONSTRAINT "$2" FOREIGN KEY (f_id) REFERENCES fiche(f_id) ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 103 (OID 38051)
|
||||
-- TOC entry 100 (OID 38051)
|
||||
-- Name: jrn_rapt_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -2330,7 +2305,7 @@ ALTER TABLE ONLY jrn_rapt
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 153 (OID 38054)
|
||||
-- TOC entry 151 (OID 38054)
|
||||
-- Name: $1; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -2339,7 +2314,7 @@ ALTER TABLE ONLY jrn_rapt
|
|||
|
||||
|
||||
--
|
||||
-- TOC entry 154 (OID 38058)
|
||||
-- TOC entry 152 (OID 38058)
|
||||
-- Name: $2; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
|
|
@ -2347,6 +2322,24 @@ ALTER TABLE ONLY jrn_rapt
|
|||
ADD CONSTRAINT "$2" FOREIGN KEY (jra_concerned) REFERENCES jrn(jr_id) ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 103 (OID 38493)
|
||||
-- Name: stock_goods_pkey; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY stock_goods
|
||||
ADD CONSTRAINT stock_goods_pkey PRIMARY KEY (sg_id);
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 153 (OID 38495)
|
||||
-- Name: $2; Type: CONSTRAINT; Schema: public; Owner: phpcompta
|
||||
--
|
||||
|
||||
ALTER TABLE ONLY stock_goods
|
||||
ADD CONSTRAINT "$2" FOREIGN KEY (f_id) REFERENCES fiche(f_id) ON UPDATE NO ACTION ON DELETE NO ACTION;
|
||||
|
||||
|
||||
--
|
||||
-- TOC entry 3 (OID 36615)
|
||||
-- Name: s_periode; Type: SEQUENCE SET; Schema: public; Owner: phpcompta
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ div.lmenu {
|
|||
top:50px;
|
||||
left:30px;
|
||||
width:100px;
|
||||
font-size:10px;
|
||||
}
|
||||
div.lextmenu {
|
||||
position: absolute;
|
||||
|
|
@ -80,6 +81,7 @@ div.redcontent{
|
|||
top:50px;
|
||||
left:250px;
|
||||
width:600px;
|
||||
font-size:12px;
|
||||
}
|
||||
div.u_redcontent{
|
||||
position: absolute;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue