Changement de PhpCompta par NOALYSS

This commit is contained in:
Dany De Bontridder 2014-01-27 21:16:24 +01:00
parent 22f8f19b6e
commit ad5e07fe25
35 changed files with 72 additions and 70 deletions

View file

@ -1,6 +1,6 @@
to use it
---------------
a. in phpcompta create a new "dossier"
a. in NOALYSS create a new "dossier"
b. in the "accueil page" you can see it id
c. ./simul.py (-l|-x|-s) |psql database_name (the database name is the DOMAIN_dossierID, replace the uppercase
by the good values)
@ -11,5 +11,5 @@ for reusing the same database
------------------------------
* drop the database = dropdb database_name
* recreate it
createdb -T mod1 -E UTF8 -O phpcompta database_name
createdb -T mod1 -E UTF8 -O noalyss database_name

View file

@ -25,13 +25,13 @@ DOXYFILE_ENCODING = UTF-8
# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
# by quotes) that should identify the project.
PROJECT_NAME = phpcompta
PROJECT_NAME = noalyss
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = Version-6
PROJECT_NUMBER = Version-6.7.2
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.

View file

@ -12,7 +12,7 @@ content[203]="Utilisateur de la base de donnée postgresql";
content[204]="Mot de passe de l'utilisateur ";
content[205]="Port de postgresql";
content[206]="En version mono dossier, le nom de la base de données doit être mentionné";
content[207]="Vous devez choisir si phpcompta est installé sur l'un de vos servers ou sur un server mutualisé qui ne donne qu'une seule base de données";
content[207]="Vous devez choisir si NOALYSS est installé sur l'un de vos servers ou sur un server mutualisé qui ne donne qu'une seule base de données";
function show_dbname(obj) {

View file

@ -35,7 +35,7 @@
/* $Revision*/
// Copyright Author Dany De Bontridder danydb@aevalys.eu
/*!\file
* \brief This file permit to upgrade a version of phpcompta, it should be
* \brief This file permit to upgrade a version of NOALYSS , it should be
* used and immediately delete after an upgrade.
* This file is included in each release for a new upgrade
*
@ -121,13 +121,13 @@ echo '
exit();
}
if ( is_writable ('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'constant.php') == false ) {
echo '<h2 class="notice"> Ecriture non possible </h2><p class="warning"> On ne peut pas &eacute;crire dans le r&eacute;pertoire de phpcompta, changez-en les droits </p>';
echo '<h2 class="notice"> Ecriture non possible </h2><p class="warning"> On ne peut pas &eacute;crire dans le r&eacute;pertoire de NOALYSS, changez-en les droits </p>';
exit();
}
if ( ! file_exists('..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'include'.DIRECTORY_SEPARATOR.'config.inc.php')) {
echo '<h1 class="info">Entrez les informations n&eacute;cessaires &agrave; phpcompta</h1>';
echo '<h1 class="info">Entrez les informations n&eacute;cessaires &agrave; noalyss</h1>';
echo '<form method="post">';
require_once('../../include/config_file.php');
echo config_file_form();
@ -393,7 +393,7 @@ if (defined("MULTI") && MULTI == 0)
if ($db->exist_table("version") == false)
{
echo '<p class="warning">' . $failed . 'La base de donnée ' . dbname . ' est vide, veuillez y restaurer un modèle de base de données plus le script mono.sql
, ce script se trouve dans phpcompta/contrib/mono.sql</p>';
, ce script se trouve dans noalyss/contrib/mono.sql</p>';
exit();
}
echo "<h3>Patching " . dbname . '</h3>';

View file

@ -56,14 +56,14 @@ if ( isset ($_REQUEST['sa']) )
if ( $sa=='b')
{
$cmd=escapeshellcmd (PG_DUMP);
putenv("PGPASSWORD=".phpcompta_password);
putenv("PGUSER=".phpcompta_user);
putenv("PGHOST=".phpcompta_psql_host);
putenv("PGPORT=".phpcompta_psql_port);
putenv("PGPASSWORD=".noalyss_password);
putenv("PGUSER=".noalyss_user);
putenv("PGHOST=".noalyss_psql_host);
putenv("PGPORT=".noalyss_psql_port);
if ( $_REQUEST['t'] == 'd' )
{
$database=domaine."dossier".$_REQUEST['d'];
$args= " -Fc -Z9 --no-owner -h ".phpcompta_psql_host." -p ".phpcompta_psql_port." ".$database;
$args= " -Fc -Z9 --no-owner -h ".noalyss_psql_host." -p ".noalyss_psql_port." ".$database;
header('Content-type: application/octet');
header('Content-Disposition:attachment;filename="'.$database.'.bin"',FALSE);
@ -74,7 +74,7 @@ if ( isset ($_REQUEST['sa']) )
if ( $_REQUEST['t'] == 'm' )
{
$database=domaine."mod".$_REQUEST['d'];
$args= " -Fc -Z9 --no-owner -h ".phpcompta_psql_host." -p ".phpcompta_psql_port." ".$database;
$args= " -Fc -Z9 --no-owner -h ".noalyss_psql_host." -p ".noalyss_psql_port." ".$database;
header('Content-type: bin/x-application');
header('Content-Disposition: attachment;filename="'.$database.'.bin"',FALSE);
$a=passthru ($cmd.$args);

View file

@ -82,10 +82,10 @@ if ( $User->Admin() == 1)
{
if (SITE_UPDATE !="") {
$update=@file_get_contents(SITE_UPDATE);
if ($update > $version_phpcompta ) {
if ($update > $version_noalyss ) {
echo '<div class="inner_box" style="margin-left:0px;margin-top:3px;left:3px">';
echo '<p class="notice">';
echo "Mise à jour disponible de NOALYSS version actuelle : $update votre version $version_phpcompta";
echo "Mise à jour disponible de NOALYSS version actuelle : $update votre version $version_noalyss";
echo '</p>';
echo '</div>';
}

View file

@ -135,7 +135,7 @@ function nbm($p_number)
}
/**
* \brief log error into the /tmp/phpcompta_error.log it doesn't work on windows
* \brief log error into the /tmp/noalyss_error.log it doesn't work on windows
*
* \param p_log message
* \param p_line line number
@ -148,7 +148,7 @@ function nbm($p_number)
function echo_error($p_log, $p_line="", $p_message="")
{
echo "ERREUR :" . $p_log . " " . $p_line . " " . $p_message;
$fdebug = fopen($_ENV['TMP'] . DIRECTORY_SEPARATOR . "phpcompta_error.log", "a+");
$fdebug = fopen($_ENV['TMP'] . DIRECTORY_SEPARATOR . "noalyss_error.log", "a+");
if ($fdebug != null)
{
fwrite($fdebug, date("Ymd H:i:s") . $p_log . " " . $p_line . " " . $p_message . "\n");

View file

@ -13,7 +13,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PHPCOMPTA; if not, write to the Free Software
* along with NOALYSS; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// Auteur Dany De Bontridder danydb@aevalys.eu

View file

@ -177,7 +177,7 @@ class Anc_Balance_Double extends Anc_Print
$pdf=new PDF($this->db);
$pdf->Setdossierinfo(dossier::name());
$pdf->setTitle("Balance analytique",true);
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
$pdf->AliasNbPages();
$pdf->AddPage();

View file

@ -42,15 +42,15 @@ class Database
function __construct ($p_database_id=0,$p_type='dos')
{
if ( IsNumber($p_database_id) == false || strlen($p_database_id) > 5 ) die ("-->Dossier invalide [$p_database_id]");
$phpcompta_user=phpcompta_user;
$password=phpcompta_password;
$port=phpcompta_psql_port;
$host=( ! defined ("phpcompta_psql_host"))?'127.0.0.1':phpcompta_psql_host;
$noalyss_user=noalyss_user;
$password=noalyss_password;
$port=noalyss_psql_port;
$host=( ! defined ("noalyss_psql_host"))?'127.0.0.1':noalyss_psql_host;
if (defined ("MULTI") && MULTI=="0") {
$phpcompta_user = phpcompta_user;
$password = phpcompta_password;
$port = phpcompta_psql_port;
$host = (!defined("phpcompta_psql_host")) ? '127.0.0.1' : phpcompta_psql_host;
$noalyss_user = noalyss_user;
$password = noalyss_password;
$port = noalyss_psql_port;
$host = (!defined("noalyss_psql_host")) ? '127.0.0.1' : noalyss_psql_host;
$l_dossier= dbname;
}
else
@ -79,7 +79,7 @@ class Database
}
ob_start();
$a=pg_connect("dbname=$l_dossier host='$host' user='$phpcompta_user'
$a=pg_connect("dbname=$l_dossier host='$host' user='$noalyss_user'
password='$password' port=$port");
if ( $a == false )
@ -94,7 +94,7 @@ class Database
echo "base de donn&eacute;e : $l_dossier<br>";
echo "Domaine : ".domaine."<br>";
echo "Port $port <br>";
echo "Utilisateur : $phpcompta_user <br>";
echo "Utilisateur : $noalyss_user <br>";
echo '</p>';
exit ("Connection impossible : v&eacute;rifiez vos param&egrave;tres de base

View file

@ -87,8 +87,8 @@ class Extension extends Menu_Ref_sql
}
static function check_version($i)
{
global $version_phpcompta;
if ( ! isset ($version_phpcompta) || $version_phpcompta < $i )
global $version_noalyss;
if ( ! isset ($version_noalyss) || $version_noalyss < $i )
{
alert('Cette extension ne fonctionne pas sur cette version de NOALYSS'.
' Veuillez mettre votre programme a jour. Version minimum '.$i);

View file

@ -78,7 +78,7 @@ class PDF extends TFPDF
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
$this->Ln(3);
// Created by NOALYSS
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
}
function Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')
{
@ -222,7 +222,7 @@ class PDFLand extends PDF
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
$this->Ln(3);
// Created by NOALYSS
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
}
}

View file

@ -61,7 +61,7 @@ class Print_Ledger_Detail extends PDF
//Page number
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'L');
// Created by NOALYSS
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
}
function Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')

View file

@ -48,7 +48,7 @@ class Print_Ledger_Detail_Item extends PDFLand
//Page number
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'L');
// Created by NOALYSS
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
}
function Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')

View file

@ -59,7 +59,7 @@ class Print_Ledger_Financial extends PDF
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
$this->Ln(3);
// Created by NOALYSS
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
}
/**

View file

@ -59,7 +59,7 @@ class Print_Ledger_Misc extends PDF
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'C');
$this->Ln(3);
// Created by NOALYSS
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'C',false,'http://www.aevalys.eu');
}
/**
*@brief print the pdf

View file

@ -182,7 +182,7 @@ class Print_Ledger_Simple extends PDF
//Page number
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'L');
// Created by NOALYSS
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
}
function Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')

View file

@ -133,7 +133,7 @@ class Print_Ledger_Simple_Without_Vat extends PDF
//Page number
$this->Cell(0,8,'Date '.$this->date." - Page ".$this->PageNo().'/{nb}',0,0,'L');
// Created by NOALYSS
$this->Cell(0,8,'Created by Phpcompta, online on http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
$this->Cell(0,8,'Created by NOALYSS, online on http://www.aevalys.eu',0,0,'R',false,'http://www.aevalys.eu');
}
function Cell ($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='')

View file

@ -17,7 +17,7 @@ require_once 'class_phpcompta_sql.php';
/**
* @brief Manage the table public.profile
*/
class Profile_sql extends phpcompta_sql
class Profile_sql extends Phpcompta_SQL
{
/* example private $variable=array("easy_name"=>column_name,"email"=>"column_name_email","val3"=>0); */

View file

@ -27,7 +27,7 @@
*/
require_once 'class_phpcompta_sql.php';
class Stock_Goods_Sql extends NOALYSS_Sql
class Stock_Goods_Sql extends Phpcompta_SQL
{
function __construct($cn,$p_id = -1)

View file

@ -23,7 +23,7 @@ require_once 'class_phpcompta_sql.php';
/**
* @brief Manage the table public.tag
*/
class Tag_SQL extends phpcompta_sql
class Tag_SQL extends Phpcompta_SQL
{
/* example private $variable=array("easy_name"=>column_name,"email"=>"column_name_email","val3"=>0); */

View file

@ -774,7 +774,7 @@ class User
$p_dossier = dossier::id();
}
if ($this->login == 'phpcompta')
if ($this->login == 'admin')
return 1;
$sql = 'select priv_priv from ac_users join jnt_use_dos using (use_id) join priv_user ' .
' on ( jnt_use_dos.jnt_id = priv_user.priv_jnt) ' .

View file

@ -29,9 +29,9 @@ $_ENV['TMP']="/tmp";
define("PG_RESTORE","/usr/bin/pg_restore ");
define("PG_DUMP","/usr/bin/pg_dump ");
define ("PSQL",'/usr/bin/psql');
define ("phpcompta_user","phpcompta");
define ("phpcompta_password","dany");
define ("phpcompta_psql_port","5432");
define ("noalyss_user","noalyss_sql");
define ("noalyss_password","dany");
define ("noalyss_psql_port","5432");
//
// the domain can't start by a number !!!

View file

@ -60,14 +60,14 @@ function config_file_form($p_array=null)
/* default value */
$ctmp=($os==1)?'/tmp':'c:/tmp';
$cpath=($os==1)?'/usr/bin':'c:/phpcompta/postgresql/bin';
$cuser='phpcompta_sql';
$cpath=($os==1)?'/usr/bin':'c:/noalyss/postgresql/bin';
$cuser='noalyss_sql';
$cpasswd='dany';
$cport=5432;
$cdomain='';
$clocale=1;
$multi=1;
$cdbname="database_phpcompta";
$cdbname="database_noalyss";
}
else extract ($p_array);
@ -130,13 +130,13 @@ function config_file_create($p_array,$from_setup=1,$p_os=1)
fputs($hFile, 'define ("PSQL","psql.exe");');
}
fputs($hFile,"\r\n");
fputs($hFile, 'define ("phpcompta_user","'.$cuser.'");');
fputs($hFile, 'define ("noalyss_user","'.$cuser.'");');
fputs($hFile,"\r\n");
fputs($hFile, 'define ("phpcompta_password","'.$cpasswd.'");');
fputs($hFile, 'define ("noalyss_password","'.$cpasswd.'");');
fputs($hFile,"\r\n");
fputs($hFile, 'define ("phpcompta_psql_port","'.$cport.'");');
fputs($hFile, 'define ("noalyss_psql_port","'.$cport.'");');
fputs($hFile,"\r\n");
fputs($hFile, 'define ("phpcompta_psql_host","127.0.0.1");');
fputs($hFile, 'define ("noalyss_psql_host","127.0.0.1");');
fputs($hFile,"\r\n");
fputs($hFile, 'define ("LOCALE",'.$clocale.');');

View file

@ -98,7 +98,7 @@ if ($previous == 1 ) {
$pdf->setDossierInfo(" Balance ".$per_text);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
$pdf->SetFont('DejaVuCond','',7);
$pdf->setTitle("Balance comptable",true);
$pdf->Cell(30,6,'poste');

View file

@ -45,7 +45,7 @@ $pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetTitle($name,1);
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
/* balance */
$allcard=(isset($_GET['allcard']))?1:0;
/*

View file

@ -42,7 +42,7 @@ $pdf= new PDF($cn);
$pdf->setDossierInfo(" Periode : ".$_GET['from_periode']." - ".$_GET['to_periode']);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Détail fiche",true);

View file

@ -46,7 +46,7 @@ $name=$cn->get_value('select fd_label from fiche_def where fd_id=$1',array($_GET
$pdf->SetFont('DejaVu','BI',14);
$pdf->Cell(0,8,$name,0,1,'C');
$pdf->SetTitle($name,1);
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
/* balance */
if ( $_GET['histo'] == 4 )
{

View file

@ -45,7 +45,7 @@ $pdf= new PDF($cn);
$pdf->setDossierInfo($Libelle);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Rapport ".$Libelle,true);
// Step ??

View file

@ -70,7 +70,7 @@ $pdf->setDossierInfo(" Periode : ".$from_periode." - ".$to_periode);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->setTitle("Grand Livre",true);
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
if ( count($a_poste) == 0 )
{

View file

@ -66,7 +66,7 @@ $pdf = Print_Ledger::factory($cn, $_REQUEST['p_simple'], "PDF", $Jrn);
$pdf->setDossierInfo($Jrn->name);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Journal", true);
$pdf->export();

View file

@ -52,7 +52,7 @@ $pdf=new PDF($cn);
$pdf->setDossierInfo(" Periode : ".$_GET['from_periode']." - ".$_GET['to_periode']);
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Détail poste comptable",true);

View file

@ -74,7 +74,7 @@ $pdf=new PDF($cn);
$pdf->setDossierInfo(dossier::name().' Sécurité');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetAuthor('Phpcompta');
$pdf->SetAuthor('NOALYSS');
$pdf->setTitle("Sécurité",true);
$str_user=sprintf("( %d ) %s %s [ %s ] - %s",

View file

@ -31,10 +31,10 @@ if ( isset ($_REQUEST['sa'] ))
putenv("PATH=".PG_PATH);
$cmd=escapeshellcmd (PG_RESTORE);
putenv("PGPASSWORD=".phpcompta_password);
putenv("PGUSER=".phpcompta_user);
putenv("PGPORT=".phpcompta_psql_port);
putenv("PGHOST=").phpcompta_psql_host;
putenv("PGPASSWORD=".noalyss_password);
putenv("PGUSER=".noalyss_user);
putenv("PGPORT=".noalyss_psql_port);
putenv("PGHOST=").noalyss_psql_host;
$retour='<hr>'.HtmlInput::button_anchor("Retour","?action=restore");
if ( ! isset($_REQUEST['t']))
@ -104,8 +104,8 @@ if ( isset ($_REQUEST['sa'] ))
echo $name;
$cn->exec_sql("create database ".$name." encoding='utf8'");
$args=" --no-owner -d $name ".$_FILES['file']['tmp_name'];
exec(PG_RESTORE.$args);
$cmd= escapeshellcmd(PG_RESTORE);
exec($cmd.$args);
$test=new Database($id);
if ( $test->exist_table('version') )
{

View file

@ -0,0 +1,2 @@
insert into fiche_def_ref(frd_id,frd_text) values (26,'Projet');
insert into attr_min (frd_id,ad_id) values (26,1),(26,9);