.
This commit is contained in:
parent
c8eba7c21f
commit
265c0189e0
@ -113,12 +113,6 @@ if ($action == 'stcomm') {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
/*
|
||||
* Recherche
|
||||
|
||||
95
htdocs/compta/config.php3
Normal file
95
htdocs/compta/config.php3
Normal file
@ -0,0 +1,95 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* $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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php3");
|
||||
|
||||
llxHeader();
|
||||
|
||||
$db = new Db();
|
||||
|
||||
if ($action == 'add') {
|
||||
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Mode creation
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ($action == 'create') {
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
/*
|
||||
*
|
||||
* Liste
|
||||
*
|
||||
*
|
||||
*/
|
||||
print_barre_liste("Comptes comptable",$page,$PHP_SELF);
|
||||
|
||||
$sql = "SELECT number, label";
|
||||
$sql .= " FROM llx_compta_account";
|
||||
$sql .= " ORDER BY number";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows();
|
||||
|
||||
$i = 0;
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\">";
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD>Numéro</TD><td>";
|
||||
print_liste_field_titre("Libellé",$PHP_SELF,"label");
|
||||
print "</td></TR>\n";
|
||||
|
||||
if ($num > 0) {
|
||||
$var=True;
|
||||
while ($i < $num) {
|
||||
$objp = $db->fetch_object( $i);
|
||||
$var=!$var;
|
||||
|
||||
print "<TR $bc[$var]>";
|
||||
print '<td>'.$objp->number.'</td>';
|
||||
print '<td>'.$objp->label.'</td>';
|
||||
|
||||
print "</TR>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
print "</TABLE>";
|
||||
$db->free();
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
@ -25,7 +25,9 @@ llxHeader();
|
||||
|
||||
$db = new Db();
|
||||
|
||||
|
||||
$yn[1] = "oui";
|
||||
$yn[0] = "<b>non</b>";
|
||||
|
||||
if ($action == 'valid') {
|
||||
$sql = "UPDATE llx_facture set fk_statut = 1 WHERE rowid = $facid ;";
|
||||
$result = $db->query( $sql);
|
||||
@ -462,9 +464,6 @@ if ($action == 'create') {
|
||||
|
||||
print "<TD align=\"right\">".price($objp->amount)."</TD>\n";
|
||||
|
||||
$yn[1] = "oui";
|
||||
$yn[0] = "<b>non</b>";
|
||||
|
||||
$total = $total + $objp->amount;
|
||||
$subtotal = $subtotal + $objp->amount;
|
||||
print "<TD align=\"right\">".$yn[$objp->paye]."</TD>\n";
|
||||
|
||||
127
htdocs/compta/ligne.php3
Normal file
127
htdocs/compta/ligne.php3
Normal file
@ -0,0 +1,127 @@
|
||||
<?PHP
|
||||
/* Copyright (C) 2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* $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
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
*/
|
||||
require("./pre.inc.php3");
|
||||
|
||||
llxHeader();
|
||||
|
||||
$db = new Db();
|
||||
|
||||
$sql = "SELECT rowid, number, label FROM llx_compta_account ORDER BY number";
|
||||
if ( $db->query($sql) ) {
|
||||
$num = $db->num_rows();
|
||||
$i = 0;
|
||||
$options = "<option value=\"0\" SELECTED></option>";
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($i);
|
||||
$options .= "<option value=\"$obj->rowid\">$obj->number</option>\n"; $i++;
|
||||
}
|
||||
$db->free();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ($action == 'add') {
|
||||
|
||||
$sql = "INSERT INTO llx_compta (datec, fk_compta_account, label, amount)";
|
||||
$sql .= " VALUES (now(),$number, '$label',$amount)";
|
||||
|
||||
$db->query($sql);
|
||||
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Mode creation
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
if ($action == 'create') {
|
||||
//
|
||||
|
||||
} else {
|
||||
|
||||
/*
|
||||
*
|
||||
* Liste
|
||||
*
|
||||
*
|
||||
*/
|
||||
print_barre_liste("Comptes comptable",$page,$PHP_SELF);
|
||||
|
||||
|
||||
print "<TABLE border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\">";
|
||||
print '<TR class="liste_titre">';
|
||||
print "<TD>Numéro</TD><td>";
|
||||
print_liste_field_titre("Libellé",$PHP_SELF,"label");
|
||||
print "</td><td>Montant</TD>";
|
||||
print "</TR>\n";
|
||||
|
||||
|
||||
print '<form action="'.$PHP_SELF.'" method="post">';
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<tr><td><select name="number">'.$options.'</select></td>';
|
||||
print '<td><input type="text" name="label" size="30"></td>';
|
||||
print '<td><input type="text" name="amount" size="10"></td>';
|
||||
print '<td><input type="submit" value="add"></td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
$sql = "SELECT ca.number, c.label, c.amount";
|
||||
$sql .= " FROM llx_compta_account as ca, llx_compta as c WHERE c.fk_compta_account = ca.rowid";
|
||||
$sql .= " ORDER BY ca.number";
|
||||
|
||||
$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 "<TR $bc[$var]>";
|
||||
print '<td>'.$objp->number.'</td>';
|
||||
print '<td>'.$objp->label.'</td>';
|
||||
print '<td>'.price($objp->amount).'</td>';
|
||||
|
||||
print "</TR>\n";
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$db->free();
|
||||
} else {
|
||||
print $db->error();
|
||||
}
|
||||
print "</TABLE>";
|
||||
}
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
||||
?>
|
||||
@ -35,7 +35,7 @@ function llxHeader($head = "") {
|
||||
|
||||
$menu->add("/compta/facture.php3","Factures");
|
||||
$menu->add_submenu("paiement.php3","Paiements");
|
||||
$menu->add_submenu("fac.php3","admin fac");
|
||||
// $menu->add_submenu("fac.php3","admin fac");
|
||||
|
||||
$menu->add("ca.php3","Chiffres d'affaires");
|
||||
|
||||
@ -50,10 +50,17 @@ function llxHeader($head = "") {
|
||||
|
||||
$menu->add("bank/index.php3","Bank");
|
||||
|
||||
$menu->add("voyage/index.php3","Voyages");
|
||||
if ($conf->voyage) {
|
||||
|
||||
$menu->add_submenu("voyage/index.php3","Voyages");
|
||||
$menu->add_submenu("voyage/reduc.php3","Reduc");
|
||||
$menu->add("voyage/index.php3","Voyages");
|
||||
|
||||
$menu->add_submenu("voyage/index.php3","Voyages");
|
||||
$menu->add_submenu("voyage/reduc.php3","Reduc");
|
||||
}
|
||||
|
||||
$menu->add("ligne.php3","Compta");
|
||||
$menu->add_submenu("ligne.php3","Lignes");
|
||||
$menu->add_submenu("config.php3","Configuration");
|
||||
|
||||
left_menu($menu->liste);
|
||||
|
||||
|
||||
@ -46,6 +46,7 @@ class Conf {
|
||||
|
||||
$this->css = "theme/dolibarr/dolibarr.css";
|
||||
|
||||
$this->voyage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,6 @@
|
||||
*/
|
||||
require("./pre.inc.php3");
|
||||
require("../contact.class.php3");
|
||||
require("../societe.class.php3");
|
||||
|
||||
llxHeader();
|
||||
$db = new Db();
|
||||
@ -31,24 +30,10 @@ if ($sortorder == "") {
|
||||
if ($sortfield == "") {
|
||||
$sortfield="nom";
|
||||
}
|
||||
$bc[0]="bgcolor=\"#c0f0c0\"";
|
||||
$bc[1]="bgcolor=\"#b0e0b0\"";
|
||||
$bc2[0]="bgcolor=\"#c9f000\"";
|
||||
$bc2[1]="bgcolor=\"#b9e000\"";
|
||||
|
||||
|
||||
$yn["t"] = "oui";
|
||||
$yn["f"] = "non";
|
||||
$yn["1"] = "oui";
|
||||
$yn["0"] = "non";
|
||||
|
||||
$deacmeth["b"] = "robots";
|
||||
$deacmeth["m"] = "manuelle";
|
||||
|
||||
if ($action == 'attribute_prefix') {
|
||||
$societe = new Societe($db, $socid);
|
||||
$societe->attribute_prefix($db, $socid);
|
||||
//$prefix_attrib = soc_attribute_prefix($db, $socid);
|
||||
}
|
||||
|
||||
if ($action == 'recontact') {
|
||||
@ -85,12 +70,6 @@ if ($action == 'stcomm') {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
$limit = 26;
|
||||
$offset = $limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
|
||||
/*
|
||||
* Recherche
|
||||
|
||||
@ -223,4 +223,9 @@ insert into llx_service values (14,now(),now(),'RAUDC2','R
|
||||
delete from llx_propal;
|
||||
delete from llx_propaldet;
|
||||
delete from llx_facture;
|
||||
delete from llx_paiement;
|
||||
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);
|
||||
@ -37,6 +37,8 @@ create:
|
||||
$(MYSQL) $(BASE) < llx_bank_categ.sql
|
||||
$(MYSQL) $(BASE) < llx_bank_class.sql
|
||||
$(MYSQL) $(BASE) < llx_bookmark.sql
|
||||
$(MYSQL) $(BASE) < llx_compta.sql
|
||||
$(MYSQL) $(BASE) < llx_compta_account.sql
|
||||
$(MYSQL) $(BASE) < llx_fa_pr.sql
|
||||
$(MYSQL) $(BASE) < llx_facture.sql
|
||||
$(MYSQL) $(BASE) < llx_facture_fourn.sql
|
||||
|
||||
@ -77,6 +77,10 @@ drop table if exists llx_bank_class;
|
||||
|
||||
drop table if exists llx_bookmark;
|
||||
|
||||
drop table if exists llx_compta;
|
||||
|
||||
drop table if exists llx_compta_account;
|
||||
|
||||
drop table if exists llx_fa_pr;
|
||||
|
||||
drop table if exists llx_facture;
|
||||
|
||||
37
mysql/tables/llx_compta.sql
Normal file
37
mysql/tables/llx_compta.sql
Normal file
@ -0,0 +1,37 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- $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
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
create table llx_compta
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
datec datetime,
|
||||
datev date, -- date de valeur
|
||||
amount real NOT NULL default 0,
|
||||
label varchar(255),
|
||||
fk_compta_account integer,
|
||||
fk_user_author integer,
|
||||
fk_user_valid integer,
|
||||
valid tinyint default 0,
|
||||
note text
|
||||
|
||||
);
|
||||
33
mysql/tables/llx_compta_account.sql
Normal file
33
mysql/tables/llx_compta_account.sql
Normal file
@ -0,0 +1,33 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2000-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- $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
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- This program is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with this program; if not, write to the Free Software
|
||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
--
|
||||
-- ===================================================================
|
||||
|
||||
|
||||
create table llx_compta_account
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
datec datetime,
|
||||
number varchar(12),
|
||||
label varchar(255),
|
||||
fk_user_author integer,
|
||||
note text
|
||||
|
||||
);
|
||||
Loading…
Reference in New Issue
Block a user