diff --git a/htdocs/compta/bank/virement.php3 b/htdocs/compta/bank/virement.php3 index 577000d09c5..179e8cb301f 100644 --- a/htdocs/compta/bank/virement.php3 +++ b/htdocs/compta/bank/virement.php3 @@ -16,25 +16,28 @@ $db = new Db(); if ($action == 'add') { $author = $GLOBALS["REMOTE_USER"]; - if ($credit > 0) { - $amount = $credit ; - } else { - $amount = - $debit ; - } - if ($num_chq) { - $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account)"; - $sql .= " VALUES (now(), $dateo, '$label', $amount,'$author',$num_chq,$account)"; - } else { - $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)"; - $sql .= " VALUES (now(), $dateo, '$label', $amount,'$author',$account)"; - } + $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)"; + $sql .= " VALUES (now(), $dateo, '$label', (0 - $amount),'$author',$account_from)"; + $result = $db->query($sql); if (!$result) { print $db->error(); print "

$sql"; } + + $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author,fk_account)"; + $sql .= " VALUES (now(), $dateo, '$label', $amount,'$author',$account_to)"; + + + $result = $db->query($sql); + if (!$result) { + print $db->error(); + print "

$sql"; + } + + } if ($action == 'del') { bank_delete_line($db, $rowid); @@ -56,7 +59,7 @@ print ""; print ""; print ""; print ""; print ""; print ""; -print ""; +print ""; print ""; diff --git a/htdocs/compta/charges/index.php3 b/htdocs/compta/charges/index.php3 index c8204822486..3244969df93 100644 --- a/htdocs/compta/charges/index.php3 +++ b/htdocs/compta/charges/index.php3 @@ -55,10 +55,6 @@ if ($action == 'del_bookmark') { print_titre("Charges"); -print '
DeVersDateLibelleMontant
"; -print ""; $sql = "SELECT rowid, label FROM llx_bank_account"; $result = $db->query($sql); if ($result) { @@ -72,7 +75,7 @@ if ($result) { } print ""; -print ""; $sql = "SELECT rowid, label FROM llx_bank_account"; $result = $db->query($sql); if ($result) { @@ -90,7 +93,7 @@ print ""; print "
Format : YYYYMMDD - 200108260000.00
'; - -print ''; - -print '
'; - print ''; print ""; @@ -78,7 +74,28 @@ if ( $db->query($sql) ) { $obj = $db->fetch_object( $i); $var = !$var; print ""; - print ''; + print ''; + print ''; + $i++; + } +} else { + print ""; +} +/* + * Factures fournisseurs + */ +$sql = "SELECT sum(f.amount) as total"; +$sql .= " FROM llx_facture_fourn as f"; + +if ( $db->query($sql) ) { + $num = $db->num_rows(); + $i = 0; + + while ($i < $num) { + $obj = $db->fetch_object( $i); + $var = !$var; + print ""; + print ''; print ''; $i++; } @@ -86,21 +103,9 @@ if ( $db->query($sql) ) { print ""; } - print "
'.$obj->nom.''.price($obj->total).''.$obj->nom.''.price($obj->total).'
".$db->error()."
Factures founisseurs'.price($obj->total).'
".$db->error()."

"; -/* - * - * - */ - - - -print '
'; - $db->close(); llxFooter("Dernière modification $Date$ révision $Revision$"); diff --git a/htdocs/compta/charges/pre.inc.php3 b/htdocs/compta/charges/pre.inc.php3 index e3cc68b14b0..3cbe607714d 100644 --- a/htdocs/compta/charges/pre.inc.php3 +++ b/htdocs/compta/charges/pre.inc.php3 @@ -37,7 +37,7 @@ function llxHeader($head = "") { $menu->add("index.php3","Charges"); - $menu->add_submenu("/compta/sociales/index.php3","Prestations sociales"); + $menu->add_submenu("/compta/sociales/index.php3","Prest. Sociales"); $menu->add("/compta/ca.php3","Chiffres d'affaires"); diff --git a/htdocs/compta/index.php3 b/htdocs/compta/index.php3 index 884a4db8f65..6cad197ac93 100644 --- a/htdocs/compta/index.php3 +++ b/htdocs/compta/index.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +15,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * $Id$ + * $Source$ + * */ require("./pre.inc.php3"); @@ -58,8 +58,40 @@ print_titre("Espace compta"); print ''; print '
'; +/* + * Charges a payer + * + */ +$sql = "SELECT c.amount, cc.libelle"; +$sql .= " FROM llx_chargesociales as c, c_chargesociales as cc"; +$sql .= " WHERE c.fk_type = cc.id AND c.paye=0"; +if ( $db->query($sql) ) { + $num = $db->num_rows(); + if ($num) { + print ""; + print ""; + print ""; + print "\n"; + $i = 0; + while ($i < $num) { + $obj = $db->fetch_object( $i); + $var = !$var; + print ""; + print ''; + print ''; + print ''; + $i++; + } + print '
Charges à payer
'.$obj->libelle.''.price($obj->amount).'

'; + } +} else { + print $db->error(); +} +/* + * Propales + */ print ''; print ""; print ""; @@ -72,8 +104,9 @@ if (valeur($sql)) { } print "
Propositions commerciales

"; - - +/* + * Factures + */ print ''; print ""; print ""; @@ -86,13 +119,10 @@ if (valeur($sql)) { } print "
Factures

"; - - /* - * + * Bookmark * */ - $sql = "SELECT s.idp, s.nom,b.rowid as bid"; $sql .= " FROM societe as s, llx_bookmark as b"; $sql .= " WHERE b.fk_soc = s.idp AND b.fk_user = ".$user->id; @@ -120,7 +150,7 @@ if ( $db->query($sql) ) { print '
'; } /* - * + * Actions a faire * * */ diff --git a/htdocs/compta/pre.inc.php3 b/htdocs/compta/pre.inc.php3 index 1dafc8e15a1..c1dd5126ce3 100644 --- a/htdocs/compta/pre.inc.php3 +++ b/htdocs/compta/pre.inc.php3 @@ -38,7 +38,7 @@ function llxHeader($head = "") { // $menu->add_submenu("fac.php3","admin fac"); $menu->add("charges/index.php3","Charges"); - $menu->add_submenu("sociales/","Prestations sociales"); + $menu->add_submenu("sociales/","Prest. Sociales"); $menu->add("ca.php3","Chiffres d'affaires"); diff --git a/htdocs/compta/resultat/index.php3 b/htdocs/compta/resultat/index.php3 index 1731abdcf56..cee46082c30 100644 --- a/htdocs/compta/resultat/index.php3 +++ b/htdocs/compta/resultat/index.php3 @@ -44,14 +44,12 @@ print "MontantSolde"; print "\n"; $sql = "SELECT s.nom,sum(f.amount) as amount"; -$sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp"; - +$sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp"; if ($year > 0) { $sql .= " AND date_format(f.datef, '%Y') = $year"; -} - +} $sql .= " GROUP BY s.nom ASC"; - + print 'Factures'; $result = $db->query($sql); @@ -83,6 +81,48 @@ if ($result) { print $db->error(); } print ''.price($total).''; +/* + * + */ +$sql = "SELECT s.nom,sum(f.amount) as amount"; +$sql .= " FROM societe as s,llx_facture_fourn as f WHERE f.fk_soc = s.idp"; +if ($year > 0) { + $sql .= " AND date_format(f.datef, '%Y') = $year"; +} +$sql .= " GROUP BY s.nom ASC"; + +print 'Frais'; + +$result = $db->query($sql); +if ($result) { + $num = $db->num_rows(); + + $i = 0; + + if ($num > 0) { + $var=True; + while ($i < $num) { + $objp = $db->fetch_object( $i); + $var=!$var; + + print " "; + print "Facture facid\">$objp->facnumber $objp->nom\n"; + + print "".price($objp->amount)."\n"; + + $total = $total - $objp->amount; + print "".price($total)."\n"; + + print "\n"; + $i++; + } + } + $db->free(); +} else { + print $db->error(); +} +print ''.price($total).''; + /* * Charges sociales * diff --git a/htdocs/compta/sociales/index.php3 b/htdocs/compta/sociales/index.php3 index 9172b886431..195099b366a 100644 --- a/htdocs/compta/sociales/index.php3 +++ b/htdocs/compta/sociales/index.php3 @@ -66,11 +66,11 @@ print ""; print ""; print ''; +print ''; print "\n"; -$sql = "SELECT c.libelle as nom, s.amount,".$db->pdate("s.date_ech")." as de, s.date_pai, s.libelle, s.paye,".$db->pdate("s.periode")." as dp"; +$sql = "SELECT c.libelle as nom, s.amount,".$db->pdate("s.date_ech")." as de, s.date_pai, s.libelle, s.paye,".$db->pdate("s.periode")." as periode,".$db->pdate("s.date_pai")." as dp"; $sql .= " FROM c_chargesociales as c, llx_chargesociales as s"; $sql .= " WHERE s.fk_type = c.id"; if ($year > 0) { @@ -86,17 +86,17 @@ if ( $db->query($sql) ) { $obj = $db->fetch_object( $i); $var = !$var; print ""; - print ''; - print ''; + print ''; + print ''; print ''; print ''; - print ''; } else { - print ''; + print ''; + print ''; } - print ''; print ''; $i++; } diff --git a/htdocs/compta/sociales/pre.inc.php3 b/htdocs/compta/sociales/pre.inc.php3 index 941083e18f1..a323791737a 100644 --- a/htdocs/compta/sociales/pre.inc.php3 +++ b/htdocs/compta/sociales/pre.inc.php3 @@ -35,12 +35,12 @@ function llxHeader($head = "") { $menu->add("/compta/facture.php3","Factures"); - $menu->add("../charges.php3","Charges"); - $menu->add_submenu("index.php3","Prestations sociales"); + $menu->add("../charges/","Charges"); + $menu->add_submenu("index.php3","Prest. Sociales"); $menu->add("../ca.php3","Chiffres d'affaires"); - $menu->add("resultat/","Résultats"); + $menu->add("/compta/resultat/","Résultats"); $menu->add("/compta/bank/index.php3","Bank"); diff --git a/htdocs/compta/tva/index.php3 b/htdocs/compta/tva/index.php3 index 57801c9f9d5..6ec696c9d54 100644 --- a/htdocs/compta/tva/index.php3 +++ b/htdocs/compta/tva/index.php3 @@ -26,6 +26,34 @@ require("../../tva.class.php3"); * * */ +function tva_coll($db, $y,$m) { + $sql = "SELECT sum(f.tva) as amount"; + $sql .= " FROM llx_facture as f WHERE f.paye = 1"; + $sql .= " AND date_format(f.datef,'%Y') = $y"; + $sql .= " AND date_format(f.datef,'%m') = $m"; + + $result = $db->query($sql); + if ($result) { + $obj = $db->fetch_object ( 0 ); + return $obj->amount; + } +} +/* + * + * + */ +function tva_paye($db, $y,$m) { + $sql = "SELECT sum(f.tva) as amount"; + $sql .= " FROM llx_facture_fourn as f WHERE f.paye = 1"; + $sql .= " AND date_format(f.datef,'%Y') = $y"; + $sql .= " AND date_format(f.datef,'%m') = $m"; + + $result = $db->query($sql); + if ($result) { + $obj = $db->fetch_object ( 0 ); + return $obj->amount; + } +} function pt ($db, $sql, $date) { global $bc; @@ -75,29 +103,52 @@ $tva = new Tva($db); print "Solde :" . price($tva->solde()); -$yearc = strftime("%Y",time()); - - +if ($year == 0 ) { + $year_current = strftime("%Y",time()); + //$year_start = $conf->years; + $year_start = $year_current; +} else { + $year_current = $year; + $year_start = $year; +} echo '
EcheancePériode'; print_liste_field_titre("Charges",$PHP_SELF,"c.libelle"); -print 'Montant Montant 
'.strftime("%d/%m/%y",$obj->de).'dp).'">'.strftime("%Y",$obj->dp).''.strftime("%d %b %y",$obj->de).'periode).'">'.strftime("%Y",$obj->periode).''.$obj->nom.''.$obj->libelle.''.price($obj->amount).''; + if ($obj->paye) { - print " "; + print ''.strftime("%d/%m/%y",$obj->dp).'
'; echo ''; -echo ''; +echo ''; -for ($y = $yearc ; $y >= $conf->years ; $y=$y-1 ) { +for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) { echo '
TVA collectéeTva Payée
Tva Réglée
'; - /* - * Collectée - */ - print ""; - print "
"; - $sql = "SELECT sum(f.tva) as amount , date_format(f.datef,'%Y-%m') as dm"; - $sql .= " FROM llx_facture as f WHERE f.paye = 1 AND f.datef >= '$y-01-01' AND f.datef <= '$y-12-31' "; - $sql .= " GROUP BY dm ASC"; - - pt($db, $sql,"Année $y"); - - print "
"; + print "

"; + print ""; + print ""; + print ""; + print ""; + print "\n"; + print "\n"; + $var=True; + $total = 0; + for ($m = 1 ; $m < 13 ; $m++ ) { + $var=!$var; + print ""; + print ''; + + $x_coll = tva_coll($db, $y, $m); + print ""; + + $x_paye = tva_paye($db, $y, $m); + print ""; + + $diff = $x_coll - $x_paye; + $total = $total + $diff; + + print "\n"; + print "\n"; + + $i++; + } + print ''; + print "
Année $yCollectéePayée 
'.strftime("%b %Y",mktime(0,0,0,$m,1,$y)).'".price($x_coll)."".price($x_paye)."".price($diff)."
Total :'.price($total).'
"; echo '

'; /* diff --git a/htdocs/compta/tva/pre.inc.php3 b/htdocs/compta/tva/pre.inc.php3 index 842eaf1abde..50e2582b6a5 100644 --- a/htdocs/compta/tva/pre.inc.php3 +++ b/htdocs/compta/tva/pre.inc.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +15,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * $Id$ + * $Source$ + * */ require("../../main.inc.php3"); @@ -35,11 +35,15 @@ function llxHeader($head = "") { $menu->add("/compta/facture.php3","Factures"); - $menu->add("../ca.php3","Chiffres d'affaires"); $menu->add("index.php3","TVA"); - + /* + * A automatiser + * + */ + $menu->add_submenu("index.php3?year=2002","2002"); + $menu->add_submenu("index.php3?year=2001","2001"); $menu->add("/compta/bank/index.php3","Bank"); diff --git a/htdocs/fourn/fiche.php3 b/htdocs/fourn/fiche.php3 index eab50268124..1accb44d680 100644 --- a/htdocs/fourn/fiche.php3 +++ b/htdocs/fourn/fiche.php3 @@ -127,25 +127,21 @@ if ($socid > 0) { print "\n"; print ""; - print ""; - print ""; - print ""; - print ""; - print ""; print ""; print "
Fiche fournisseur : $objsoc->nom
idp&action=add\">[Bookmark]idp&action=create\">[Projet]idp&action=create\">[Propal]idp\">Notesidp\">Contacts[idp&action=edit\">Editer]
"; /* * * */ - - print "
"; - print "\n"; - print "
"; - print ""; - - print ""; - print ""; + ?> + + '; + print '
Type $objsoc->typentEffectif$objsoc->effectif
Tel $objsoc->tel fax$objsoc->fax 
'; + print ''; + print ''; print ""; print ""; @@ -179,71 +175,6 @@ if ($socid > 0) { */ print "
Tel'.$objsoc->tel.' fax'.$objsoc->fax.' 
Ville".nl2br($objsoc->address)."
$objsoc->cp $objsoc->ville
sirensiren\">$objsoc->siren 
"; - /* - * Propales - */ - $var=!$var; - print ""; - $sql = "SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref, p.remise, ".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid"; - $sql .= " FROM societe as s, llx_propal as p, c_propalst as c WHERE p.fk_soc = s.idp AND p.fk_statut = c.id"; - $sql .= " AND s.idp = $objsoc->idp ORDER BY p.datep DESC"; - - if ( $db->query($sql) ) { - $num = $db->num_rows(); - if ($num >0 ) { - print ""; - } - $i = 0; $now = time(); $lim = 3600 * 24 * 15 ; - while ($i < $num && $i < 2) { - $objp = $db->fetch_object( $i); - $var=!$var; - print ""; - print "\n"; - print "\n"; - print "\n"; - $i++; - } - $db->free(); - } - /* - * Factures - */ - $sql = "SELECT s.nom, s.idp, f.facnumber, f.amount, ".$db->pdate("f.datef")." as df, f.paye, f.rowid as facid "; - $sql .= " FROM societe as s,llx_facture as f WHERE f.fk_soc = s.idp AND s.idp = $objsoc->idp ORDER BY f.datef DESC"; - if ( $db->query($sql) ) { - $num = $db->num_rows(); $i = 0; - if ($num > 0) { - print ""; - print ""; - } - - while ($i < $num && $i < 2) { - $objp = $db->fetch_object( $i); - $var=!$var; - print ""; - print "\n"; - if ($objp->df > 0 ) { - print "\n"; - } else { - print "\n"; - } - print "\n"; - $paye[1] = "payée"; - $paye[0] = "non payée"; - print "\n"; - print "\n"; - $i++; - } - $db->free(); - } else { - print $db->error(); - } - print "
idp\">liste des propales ($num)
propalid\">$objp->ref\n"; - if ( ($now - $objp->dp) > $lim && $objp->statutid == 1 ) { - print " > 15 jours"; - } - print "".strftime("%d %B %Y",$objp->dp)."".price($objp->price - $objp->remise)."$objp->statut
idp\">liste des factures ($num)
facid\">$objp->facnumber".strftime("%d %B %Y",$objp->df)."!!!".number_format($objp->amount, 2, ',', ' ')."".$paye[$objp->paye]."
"; - print "
"; /* * diff --git a/htdocs/service.class.php3 b/htdocs/service.class.php3 index 5953fe32e25..b0a9d7eaf29 100644 --- a/htdocs/service.class.php3 +++ b/htdocs/service.class.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +15,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * $Id$ + * $Source$ + * */ class Service { diff --git a/mysql/data/data.sql b/mysql/data/data.sql index 550a65886f2..dc0668059e7 100644 --- a/mysql/data/data.sql +++ b/mysql/data/data.sql @@ -22,6 +22,12 @@ -- Valeurs pour les bases de langues francaises -- +delete from c_chargesociales; +insert into c_chargesociales (id,libelle,deductible) values ( 1, 'Allocations familiales',1); +insert into c_chargesociales (id,libelle,deductible) values ( 2, 'GSG Deductible',1); +insert into c_chargesociales (id,libelle,deductible) values ( 3, 'GSG/CRDS NON Deductible',0); + + delete from c_actioncomm; insert into c_actioncomm (id,libelle) values ( 0, '-'); insert into c_actioncomm (id,libelle) values ( 1, 'Appel Téléphonique'); diff --git a/mysql/data/data_dev.sql b/mysql/data/data_dev.sql index efcf3b3cace..e84fd0bda2b 100644 --- a/mysql/data/data_dev.sql +++ b/mysql/data/data_dev.sql @@ -1,10 +1,6 @@ -- =========================================================================== --- -- Copyright (C) 2001-2002 Rodolphe Quiedeville -- --- $Id$ --- $Source$ --- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or @@ -19,10 +15,24 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- +-- $Id$ +-- $Source$ -- --- Valeurs de test pour les devellopements --- +-- Valeurs de test pour les developpements +-- Ne pas hésiter a compléter ce fichier avec de nouvelles valeurs, plus on a +-- de données, mieux on peut tester l'appli. -- =========================================================================== +delete from llx_tva; +insert into llx_tva (datep, datev, amount) values ('2001-11-11','2001-10-1',1960); + +delete from llx_facture_fourn; +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('LOL-509',1,'2001-05-09','2001-05-09',1,1000,0,196,1196,1,NULL,NULL,''); + +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('02-1-YHGT',2,now(),'2002-01-01',1,100,0,19.6,119.6,1,NULL,NULL,''); +insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) +values ('02-5-YHGT',2,now(),'2002-05-01',1,1000,0,196,1196,1,NULL,NULL,''); delete from llx_user; insert into llx_user (name,firstname,code,login,pass,module_comm,module_compta,admin,webcal_login) @@ -77,8 +87,6 @@ values ('Nimbus','29490','Guipavas','01 55 55 03 18','01 55 55 55 55',1); insert into societe (nom,cp,ville,tel,fax,client) values ('Iono','22110','Rostrenen','01 55 55 03 18','01 55 55 55 55',1); - - -- -- Contact -- @@ -228,4 +236,35 @@ delete from llx_paiement; delete from llx_compta_account; insert into llx_compta_account (datec, number, label, fk_user_author) values (now(),'431000','URSSAF',1); -insert into llx_compta_account (datec, number, label, fk_user_author) values (now(),'654000','Clients',1); \ No newline at end of file +insert into llx_compta_account (datec, number, label, fk_user_author) values (now(),'654000','Clients',1); +-- +-- Charges sociales (mais non on n'en paye pas trop ;-) +-- +delete from llx_chargesociales; +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-05-15',NULL,'Acompte 1er Trimestre 2002',1,120,0,'2002-1-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-05-15',NULL,'Acompte 1er Trimestre 2002',2,200,0,'2002-1-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-05-15',NULL,'Acompte 1er Trimestre 2002',3,170,0,'2002-1-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-02-15','2002-02-10','Acompte 4ème Trimestre 2001',1,120,1,'2001-10-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-02-15','2002-02-10','Acompte 4ème Trimestre 2001',2,200,1,'2001-10-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2002-02-15','2002-02-10','Acompte 4ème Trimestre 2001',3,170,1,'2001-10-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2001-11-15','2001-10-10','Acompte 3ème Trimestre 2001',1,70,1,'2001-7-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2001-11-15','2001-10-10','Acompte 3ème Trimestre 2001',2,180,1,'2001-7-1'); + +insert into llx_chargesociales (date_ech,date_pai,libelle,fk_type,amount,paye,periode) values +('2001-11-15','2001-10-10','Acompte 3ème Trimestre 2001',3,150,1,'2001-7-1'); + diff --git a/mysql/data/facture_dev.sql b/mysql/data/facture_dev.sql index 8ca6b9f6a08..4fac9279bde 100644 --- a/mysql/data/facture_dev.sql +++ b/mysql/data/facture_dev.sql @@ -9,7 +9,7 @@ -- -INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (1,1,'2002-05-09 03:05:03','2002-05-09 12:00:00',11960,'rodo',0,'321654654',''); +INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (1,1,'2002-05-09 03:05:03','2001-05-19 12:00:00',11960,'rodo',0,'321654654',''); INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (2,2,'2002-05-09 03:18:10','2002-04-12 12:00:00',500,'rodo',0,'255555',''); INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (3,2,'2002-05-09 03:18:32','2002-05-02 12:00:00',588.36,'rodo',0,'25555',''); INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_paiement, num_paiement, note) VALUES (4,3,'2002-05-09 03:21:43','2002-03-30 12:00:00',11.96,'rodo',0,'',''); @@ -32,7 +32,7 @@ INSERT INTO llx_paiement (rowid, fk_facture, datec, datep, amount, author, fk_pa -- -INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, author, fk_user, fk_user_author, fk_user_valid, note) VALUES (1,'F-BO-020509',1,'2002-05-09 03:04:48','2002-05-09',1,10000,0,1960,11960,1,'rodo',NULL,NULL,NULL,''); +INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, author, fk_user, fk_user_author, fk_user_valid, note) VALUES (1,'F-BO-010509',1,'2001-05-09 03:04:48','2001-05-09',1,10000,0,1960,11960,1,'rodo',NULL,NULL,NULL,''); INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, author, fk_user, fk_user_author, fk_user_valid, note) VALUES (2,'F-DO-020410',3,'2002-05-09 03:17:44','2002-04-10',1,910,100,178.36,1088.36,1,'rodo',NULL,NULL,NULL,''); INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, author, fk_user, fk_user_author, fk_user_valid, note) VALUES (3,'F-BO-020314',1,'2002-05-09 03:21:25','2002-03-14',1,10,0,1.96,11.96,1,'rodo',NULL,NULL,NULL,''); INSERT INTO llx_facture (rowid, facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, author, fk_user, fk_user_author, fk_user_valid, note) VALUES (4,'F-CU-020215',2,'2002-05-09 03:23:31','2002-02-15',1,10000,0,1960,11960,1,'rodo',NULL,NULL,NULL,''); diff --git a/mysql/tables/Makefile b/mysql/tables/Makefile index b7bc538286a..41cb2cd435b 100644 --- a/mysql/tables/Makefile +++ b/mysql/tables/Makefile @@ -26,6 +26,7 @@ all: show create: $(MYSQL) $(BASE) < actioncomm.sql $(MYSQL) $(BASE) < c_actioncomm.sql + $(MYSQL) $(BASE) < c_chargesociales.sql $(MYSQL) $(BASE) < c_effectif.sql $(MYSQL) $(BASE) < c_paiement.sql $(MYSQL) $(BASE) < c_pays.sql @@ -37,6 +38,7 @@ create: $(MYSQL) $(BASE) < llx_bank_categ.sql $(MYSQL) $(BASE) < llx_bank_class.sql $(MYSQL) $(BASE) < llx_bookmark.sql + $(MYSQL) $(BASE) < llx_chargesociales.sql $(MYSQL) $(BASE) < llx_compta.sql $(MYSQL) $(BASE) < llx_compta_account.sql $(MYSQL) $(BASE) < llx_fa_pr.sql @@ -51,6 +53,7 @@ create: $(MYSQL) $(BASE) < llx_propaldet.sql $(MYSQL) $(BASE) < llx_service.sql $(MYSQL) $(BASE) < llx_soc_recontact.sql + $(MYSQL) $(BASE) < llx_tva.sql $(MYSQL) $(BASE) < llx_user.sql $(MYSQL) $(BASE) < llx_ventes.sql $(MYSQL) $(BASE) < llx_voyage.sql diff --git a/mysql/tables/drop.sql b/mysql/tables/drop.sql index 29e848a6ba2..2ad27f8abdc 100644 --- a/mysql/tables/drop.sql +++ b/mysql/tables/drop.sql @@ -27,38 +27,14 @@ drop table if exists c_anexpe; drop table if exists c_actioncomm; -drop table if exists c_categtools; - -drop table if exists c_contrat ; - -drop table if exists c_contrib; - -drop table if exists c_diplome ; - -drop table if exists c_duree; +drop table if exists c_chargesociales; drop table if exists c_effectif; -drop table if exists c_formatdoc; - -drop table if exists c_lang ; - -drop table if exists c_niveau ; - -drop table if exists c_nivlang ; - -drop table if exists c_outil ; - -drop table if exists c_modecontact; - -drop table if exists c_moderech ; - drop table if exists c_paiement ; drop table if exists c_pays ; -drop table if exists c_poste ; - drop table if exists c_prestatype ; drop table if exists c_propalst ; @@ -77,6 +53,8 @@ drop table if exists llx_bank_class; drop table if exists llx_bookmark; +drop table if exists llx_chargesociales; + drop table if exists llx_compta; drop table if exists llx_compta_account; @@ -105,6 +83,8 @@ drop table if exists llx_service; drop table if exists llx_soc_recontact; +drop table if exists llx_tva; + drop table if exists llx_user; drop table if exists llx_ventes; diff --git a/mysql/tables/llx_facture_fourn.sql b/mysql/tables/llx_facture_fourn.sql index 2af2a6c21ea..57484a0ad52 100644 --- a/mysql/tables/llx_facture_fourn.sql +++ b/mysql/tables/llx_facture_fourn.sql @@ -1,9 +1,6 @@ -- =========================================================================== -- Copyright (C) 2001-2002 Rodolphe Quiedeville -- --- $Id$ --- $Source$ --- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation; either version 2 of the License, or @@ -18,6 +15,9 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- +-- $Id$ +-- $Source$ +-- -- =========================================================================== create table llx_facture_fourn diff --git a/mysql/tables/llx_tva.sql b/mysql/tables/llx_tva.sql index e716a8e57e8..0a1a09f3192 100644 --- a/mysql/tables/llx_tva.sql +++ b/mysql/tables/llx_tva.sql @@ -1,8 +1,5 @@ -- =================================================================== --- Copyright (C) 2000-2002 Rodolphe Quiedeville --- --- $Id$ --- $Source$ +-- Copyright (C) 2002 Rodolphe Quiedeville -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -18,9 +15,11 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- +-- $Id$ +-- $Source$ +-- -- =================================================================== - create table llx_tva ( rowid integer AUTO_INCREMENT PRIMARY KEY,