diff --git a/contrib/csv-tools/analyze.sh b/contrib/csv-tools/analyze.sh deleted file mode 100644 index ec1c4dc82..000000000 --- a/contrib/csv-tools/analyze.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Utility for analysing CSV files -# -# GNU Gpl Author: Dany De Bontridder -######################################################################### -Help () { - echo "Usage is $0 start end " - echo "or" - echo "Usage is $0 line " -} - -Help - -FILE=file.csv - -if [ $# -eq 2 ]; then - START=$1 - END=$2 - sed -ne "${START},${END}p" $FILE | -awk 'BEGIN {FS=";"} { for ( i=1; i"$i;}}' -fi -if [ $# -eq 1 ]; then - START=$1 - sed -ne "${START}p" $FILE | -awk 'BEGIN {FS=";"} { for ( i=1; i"$i;}}' -fi diff --git a/contrib/csv-tools/verif.py b/contrib/csv-tools/verif.py deleted file mode 100644 index 0c4d53a96..000000000 --- a/contrib/csv-tools/verif.py +++ /dev/null @@ -1,110 +0,0 @@ -# -*- coding: latin-1 -*- -#simple python script to check bank vs. accounts. - -import sys -import csv -import time -from datetime import date - -#bank account input file sample line: -#"Code interne";"Date";"Description";"Débit";"Crédit" -#"OD-01-00001";"18.12.2003";"versement initial capital";6200.0000; 0.0000 - -DATE_OUT_FORMAT = "%d/%m/%Y" - -def toDateString(date): - return time.strftime(DATE_OUT_FORMAT, date) - -class Extract: - def __repr__(self): - return "[%s]: %s %s" % (self.code, toDateString(self.date), self.amount) - -class Operation: - def __repr__(self): - return "[%s]: %s D: %s C: %s" % (self.code, toDateString(self.date), self.debit, self.credit) - -accountFile = sys.argv[1] -reader = csv.reader(open(accountFile, "rb"), delimiter=";") -operations = [] -reader.next() -for row in reader: - op = Operation() - #print row - if len(row) == 5: - op.code, op.date, op.desc, op.debit, op.credit = row - op.date = time.strptime(op.date, "%d.%m.%Y") - op.debit = float(op.debit) - op.credit = float(op.credit) - operations.append(op) - -print "loaded %s bank operations from %s" % (len(operations), accountFile) - -bankExtractsFile = sys.argv[2] -reader = csv.reader(open(bankExtractsFile, "rb"), delimiter=";") -extracts = [] -reader.next() -for row in reader: - ex = Extract() - #print row - ex.code, ex.date, ex.desc, ex.amount, ex.currency, ex.val_date, ex.from_account, ex.from_name, ex.com1, ex.com2, ex.ref = row - ex.com = "%s %s" % (ex.com1, ex.com2) - #transform 6.200,00 EUR in 6200.00 EUR - ex.amount = float(ex.amount.replace(".", "").replace(",", ".")) - ex.date = time.strptime(ex.date, "%d/%m/%Y") - extracts.append(ex) - -print "loaded %s bank extracts from %s" % (len(extracts), bankExtractsFile) - -#now match the two sets: -#1: we want to find one operation in financial ledger per bank extract. Amount must match. - -verbose = False - -if len(sys.argv) > 3: - operationToCheck = int(sys.argv[3]) - extracts = extracts[operationToCheck:operationToCheck+1] - verbose = True - -def matchAmount(extract, operation): - if extract.amount > 0: - return operation.debit == extract.amount - else: - return operation.credit == -extract.amount - -def checkExtract(extract, operations, verbose): - #1: get all fin. ledger operations at that date. - if verbose: - print "extract: %s" % extract - candidates = filter(lambda x: x.date == extract.date, operations) - errorMessage = None - if candidates == []: - #it may have been posted later on in the accounting. - candidates = filter(lambda x: x.date > extract.date and matchAmount(extract,x), operations) - if verbose: - print "candidates: %s " % candidates - if candidates == []: - errorMessage = "Found no ledger operations for extract: %s" % extract - else: - #2: find the one. - matches = filter(lambda x: matchAmount(extract, x) and x.code != "ANNULE", candidates) - if len(matches) != 1: - if len(matches) == 0: - errorMessage = "Problem: no candidates for extract %s" % extract - else: - errorMessage = "Problem. Multiple candidates: %s for extract %s" % (matches, extract) - else: - #remove the matched from the operations list. - operations.remove(matches[0]) - return errorMessage - - -errorCount = 0 - -for extract in extracts: - error = checkExtract(extract, operations, verbose) - if error: - errorCount = errorCount + 1 - print "%s \n" % error - - -print "Error count: %s" % errorCount diff --git a/contrib/test-size/readme b/contrib/test-size/readme deleted file mode 100644 index f904ac2a7..000000000 --- a/contrib/test-size/readme +++ /dev/null @@ -1,15 +0,0 @@ -to use it ---------------- -a. in phpcompta 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) - you must use -l -x or -s (see -h for help) - - -for reusing the same database ------------------------------- -* drop the database = dropdb database_name -* recreate it - createdb -T mod1 -E latin1 -O phpcompta database_name - diff --git a/contrib/test-size/simul.py b/contrib/test-size/simul.py deleted file mode 100755 index 050daf340..000000000 --- a/contrib/test-size/simul.py +++ /dev/null @@ -1,243 +0,0 @@ -#!/usr/bin/python -# -# -# This file is part of PhpCompta. -# -# PhpCompta 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. -# -# PhpCompta 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 PhpCompta; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -#/ -# $Revision$ -# Copyright Author Dany De Bontridder ddebontridder@yahoo.fr - -import random -import getopt -import sys - - - - -def usage(): - print """ - For use with the demo database, this utility helps - you to create differente kind of databases for tuning - and improve the performance - parameters are : - -h help - -s generate a sql file for a small database test - -l generate a sql file for a large database test - -x generate a extra large sql for a huge database test - """ - sys.exit(-1) - -def Add_Attribut_Fiche(p_jft,p_f,p_ad_id,p_value): - # Ajout du nom - #print "insert into jnt_fic_att_value(jft_id,f_id,ad_id) values (%d,%d,%d);" % (p_jft,p_f,p_ad_id) - jnt="%d\t%d\t%d" % (p_jft,p_f,p_ad_id) - #print "insert into attr_value(jft_id,av_text) values (%d,'%s');" % (p_jft,p_value) - attr="%d\t%s" % (p_jft,p_value) - return (jnt,attr) - -def Creation_fiche (p_seq_f_id,p_seq_jft_id,p_fd_id,p_type,p_base_poste,p_nbfiche): - fiche=[] - poste_comptable=[] - Attribut=[] - jnt=[] - for i in range (0,p_nbfiche): - #def Creation fiche : - #print "insert into fiche(f_id,fd_id)values (%d,%d);" % (p_seq_f_id,p_fd_id) - fiche.append("%d\t%d" % (p_seq_f_id,p_fd_id)) - # ajout nom - nom="%s numero %08d" % (p_type,i+100) - (t1,t2)=Add_Attribut_Fiche(p_seq_jft_id,p_seq_f_id,1,nom) - jnt.append(t1) - Attribut.append(t2) - #poste comptable - str_poste_comptable='%s%04d'% (p_base_poste,i+100) - # print "insert into tmp_pcmn (pcm_val,pcm_lib,pcm_val_parent) values (%s,'%s',%s); " % (poste_comptable,nom,p_base_poste) - poste_comptable.append("%s\t%s\t%s" % (str_poste_comptable,nom,p_base_poste)) - p_seq_jft_id+=1 - (t1,t2)=Add_Attribut_Fiche(p_seq_jft_id,p_seq_f_id,5,str_poste_comptable) - jnt.append(t1) - Attribut.append(t2) - p_seq_jft_id+=1 - str_quick_code="FID%06d" % (p_seq_f_id) - (t1,t2)=Add_Attribut_Fiche(p_seq_jft_id,p_seq_f_id,23,str_quick_code) - jnt.append(t1) - Attribut.append(t2) - - p_seq_f_id+=1 - p_seq_jft_id+=1 - print "copy fiche(f_id,fd_id) from stdin;" - for e in fiche: print e - print "\." - print "copy tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) from stdin;" - for e in poste_comptable: print e - print "\." - print "copy jnt_fic_att_value(jft_id,f_id,ad_id) from stdin;" - for e in jnt: print e - print "\." - print "copy attr_value(jft_id,av_text) from stdin;" - for e in Attribut: print e - print "\." - - - - -def Creation_operation(p_base,p_type): - #jrn="insert into jrn (jr_def_id,jr_montant,jr_comment,jr_date,jr_grpt_id,jr_internal,jr_tech_per)" - jrn="%d\t%.2f\t%s\t%d.%d.2005\t%d\t%s\t%d" - #jrnx="insert into jrnx (j_date,j_montant,j_poste,j_grpt,j_jrn_def,j_debit,j_tech_user,j_tech_per)" - jrnx="%d.%d.2005\t%.2f\t%s\t%d\t%d\t%s\tSIMULATION\t%d" - array_jrnx=[] - array_jrn=[] - for loop_periode in range (53,64): - for loop_day in range (1,28): - for loop_op in range (0,nb_per_day): - j_montant=round(random.randrange(100,5000)/100.0,2) - j_tva=round(j_montant*0.21,2) - month=loop_periode-52 - if p_type == 'V': - j_internal='1VEN-01-%d' % (p_base) - j_client='400%04d' % (random.randrange(1,nb_fiche)+100) - #jrnx1=jrnx % (loop_day,loop_periode-39,j_montant,j_client,p_base,2,'true',loop_periode) - array_jrnx.append(jrnx % (loop_day,month,j_montant,j_client,p_base,2,'true',loop_periode)) - #print jrnx1 - array_jrnx.append(jrnx % (loop_day,month,j_tva,'4511',p_base,2,'false',loop_periode)) - #print jrnx1 - total=j_montant+j_tva - array_jrnx.append( jrnx % (loop_day,month,total,'700',p_base,2,'false',loop_periode)) - #print jrnx1 - array_jrn.append(jrn%(2,total,j_internal,loop_day,month,p_base,j_internal,loop_periode)) - #print jrn1 - p_base+=1 - if p_type== 'A': - j_internal='1ACH-01-%d' % (p_base) - j_fournisseur='440%04d' % (random.randrange(0,nb_fiche)+100) - j_charge='61%04d' % (random.randrange(0,nb_charge)+100) - array_jrnx.append(jrnx%(loop_day,month,j_montant,j_fournisseur,p_base,3,'false',loop_periode)) - #print jrnx1 - array_jrnx.append(jrnx % (loop_day,month,j_tva,'4111',p_base,3,'true',loop_periode)) - #print jrnx1 - total=j_montant+j_tva - array_jrnx.append(jrnx % (loop_day,month,total,j_charge,p_base,3,'true',loop_periode)) - #print jrnx1 - array_jrn.append(jrn%(3,total,j_internal,loop_day,month,p_base,j_internal,loop_periode)) - ##print jrn1 - p_base+=1 - if p_type== 'O': - j_internal='4ODS-01-%d' % (p_base) - j_banque='400' - j_charge='440' - array_jrnx.append(jrnx%(loop_day,month,j_montant,j_banque,p_base,4,'false',loop_periode)) - array_jrnx.append(jrnx % (loop_day,month,j_montant,j_charge,p_base,4,'true',loop_periode)) - #print jrnx1 - array_jrn.append(jrn%(4,j_montant,j_internal,loop_day,month,p_base,j_internal,loop_periode)) - ##print jrn1 - p_base+=1 - if p_type== 'F': - j_internal='1FIN-01-%d' % (p_base) - j_banque='550' - j_charge='400' - array_jrnx.append(jrnx%(loop_day,month,j_montant,j_banque,p_base,1,'false',loop_periode)) - array_jrnx.append(jrnx % (loop_day,month,j_montant,j_charge,p_base,1,'true',loop_periode)) - #print jrnx1 - array_jrn.append(jrn%(1,j_montant,j_internal,loop_day,month,p_base,j_internal,loop_periode)) - ##print jrn1 - p_base+=1 - print """copy -jrn (jr_def_id,jr_montant,jr_comment,jr_date,jr_grpt_id,jr_internal,jr_tech_per) -from stdin;""" - for e in array_jrn: print e - print "\." - print "copy jrnx (j_date,j_montant,j_poste,j_grpt,j_jrn_def,j_debit,j_tech_user,j_tech_per) from stdin;" - for e in array_jrnx: print e - print "\." - -################################################################################ -# MAIN -################################################################################ -if len(sys.argv) == 1 : - usage() - -cmd_line=sys.argv[1:] - -try : - a1,a2=getopt.getopt(cmd_line,"slxh",['small','large','extra-large','help']) -except getopt.GetoptError,msg: - print "ERROR " - print msg.msg - usage() -for option,value in a1: - if option in ('-h','--help'): - usage() - if option in ('-s','--small'): - nb_fiche=100 - nb_charge=50 - nb_per_day=5 - break - if option in ('-l','--large'): - nb_fiche=5000 - nb_charge=350 - nb_per_day=50 - if option in ('-x','--extra-large'): - nb_fiche=10000 - nb_charge=1500 - nb_per_day=500 - -print '\\timing' -print "begin;" -print "set DateStyle=European;" -# fd_id => client -fd_id=2 -# type fiche -type='Client' - -# numero de sequence fiche -f_id=1000 -# numero de sequence jnt_fic_att_value -jft_id=1000 -# poste comptable -base_poste='400' - -Creation_fiche(f_id,jft_id,fd_id,type,'400',nb_fiche) - -# fournisseur -fd_id=4 -type='Fournisseur' -f_id+=nb_fiche+100 -jft_id+=2*nb_fiche+100 -base_poste='440' - -Creation_fiche(f_id,jft_id,fd_id,type,base_poste,nb_fiche) - -# Creation Service et bien divers -fd_id=5 -type='Charge ' -f_id+=nb_fiche+100 -jft_id+=2*nb_fiche+100 -base_poste='61' - -Creation_fiche(f_id,jft_id,fd_id,type,base_poste,nb_charge) - -#Creation_operation Vente -Creation_operation(1000,'V') - -#Creation_operation Achat -Creation_operation(17000,'A') -#Creation_operation FIN -Creation_operation(34000,'F') -#Creation_operation ODS -Creation_operation(51000,'O') - -print "commit;" diff --git a/dev/test-size/readme b/dev/test-size/readme index f904ac2a7..2652c63a1 100644 --- a/dev/test-size/readme +++ b/dev/test-size/readme @@ -11,5 +11,5 @@ for reusing the same database ------------------------------ * drop the database = dropdb database_name * recreate it - createdb -T mod1 -E latin1 -O phpcompta database_name + createdb -T mod1 -E UTF8 -O phpcompta database_name diff --git a/html/admin_repo.php b/html/admin_repo.php index 15ba8ace0..a20992ec6 100644 --- a/html/admin_repo.php +++ b/html/admin_repo.php @@ -40,7 +40,7 @@ if ($User->admin != 1) { } echo '

Administration Globale

'; -echo '
'; +echo '
'; echo MenuAdmin()."
"; diff --git a/html/category_pdf.php b/html/category_pdf.php index be717e7fb..3c4be1399 100644 --- a/html/category_pdf.php +++ b/html/category_pdf.php @@ -84,10 +84,11 @@ foreach($array as $row) { } /* skip if nothing to display */ if (count($letter->content) == 0 ) continue; - $pdf->SetFont('DejaVu','',10); + $pdf->SetFont('DejaVuCond','',10); $pdf->Cell(0,7,$row->strAttribut(ATTR_DEF_NAME),1,1,'C'); + $pdf->SetFont('DejaVuCond','',7); $pdf->Cell($tab[0],7,'Date'); $pdf->Cell($tab[1],7,'ref'); @@ -107,7 +108,7 @@ foreach($array as $row) { $pdf->SetFillColor(0,0,0); $fill=0; } - $pdf->SetFont('DejaVuCond','',8); + $pdf->SetFont('DejaVuCond','',7); $row=$letter->content[$i]; $str_date=shrink_date($row['j_date_fmt']); diff --git a/html/gl_comptes_pdf.php b/html/gl_comptes_pdf.php index ff2b2ad2a..dfac4a273 100644 --- a/html/gl_comptes_pdf.php +++ b/html/gl_comptes_pdf.php @@ -61,7 +61,7 @@ $header = array( "Date", "Référence", "Libellé", "Pièce","Let", "Débit", "C // Left or Right aligned $lor = array( "L" , "L" , "L" , "L" , "R", "R" , "R" , "R" ); // Column widths (in mm) -$width = array( 13 , 20 , 70 , 10 , 7 , 20 , 20 , 20 ); +$width = array( 13 , 20 , 60 , 15 , 12 , 20 , 20 , 20 ); foreach ($a_poste as $poste) { @@ -82,7 +82,7 @@ foreach ($a_poste as $poste) { $pdf->Cell($width[$i], 4, $header[$i], 0, 0, $lor[$i]); $pdf->Ln(); - $pdf->SetFont('DejaVuCond','',8); + $pdf->SetFont('DejaVuCond','',7); $solde = 0.0; @@ -118,7 +118,7 @@ foreach ($a_poste as $poste) { $pdf->Cell($width[$i], 6, shrink_date($detail['j_date_fmt']), 0, 0, $lor[$i]); $i++; $pdf->Cell($width[$i], 6, $detail['jr_internal'], 0, 0, $lor[$i]); $i++; /* limit set to 20 for the substring */ - $pdf->Cell($width[$i], 6, substr($detail['description'],0,54), 0, 0, $lor[$i]); $i++; + $pdf->Cell($width[$i], 6, substr($detail['description'],0,42), 0, 0, $lor[$i]); $i++; $pdf->Cell($width[$i], 6, $detail['jr_pj_number'], 0, 0, $lor[$i]); $i++; $pdf->Cell($width[$i], 6, ($detail['letter']!=-1)?$detail['letter']:'', 0, 0, $lor[$i]); $i++; $pdf->Cell($width[$i], 6, ($detail['deb_montant'] > 0 ? sprintf("%.2f", $detail['deb_montant']) : ''), 0, 0, $lor[$i]); $i++; diff --git a/html/js/acc_ledger.js b/html/js/acc_ledger.js index 88e05ab2c..8e9d7e4fe 100644 --- a/html/js/acc_ledger.js +++ b/html/js/acc_ledger.js @@ -179,8 +179,8 @@ function compute_ledger(p_ctl_nb) { var qcode=g("e_march"+p_ctl_nb).value; if ( qcode.length == 0 ) { clean_ledger(p_ctl_nb);refresh_ledger();return;} - /** - *@todo if tva_id is empty send a value of -1 + /* + * if tva_id is empty send a value of -1 */ var tva_id=-1; if ( g('e_march'+p_ctl_nb+'_tva_id') ) { diff --git a/html/js/infobulle.js b/html/js/infobulle.js index 6bb783db6..8f02dcd09 100644 --- a/html/js/infobulle.js +++ b/html/js/infobulle.js @@ -37,7 +37,7 @@ content[6]="Indiquez ici le prix hors tva si vous êtes affilié à la tva et qu content[7]="(optionnel) Ces champs servent à contrôler que les montants correspondent à l'extrait"; content[8]="(optionnel) Ce montant correspond au total tva, si vous le laissez à vide, il sera calculé automatiquement en fonction du taux"; content[9]="Tapez le numéro de poste ou une partie du poste ou du libellé puis sur recherche, Si vous avez donné un quickcode, le poste comptable ne sera pas utilisé"; -content[10]="ATTENTION changer le poste comptable d'une fiche modifiera toutes les opérations où cette fiche est utilisée"; +content[10]="ATTENTION changer le poste comptable d'une fiche ne modifiera pas toutes les opérations où cette fiche est utilisée"; content[11]="ATTENTION si le poste comptable est vide, il sera créé automatiquement"; content[12]="Document généré uniquement si le mode de paiement est utilisé"; content[13]="Vous pouvez utiliser le % pour indiquer le poste parent"; diff --git a/html/js/todo_list.js b/html/js/todo_list.js index 1b2762a3f..fafce3cc4 100644 --- a/html/js/todo_list.js +++ b/html/js/todo_list.js @@ -28,7 +28,7 @@ function todo_list_show(p_id) { var gDossier=$('gDossier').value; $('add_todo_list').style.top=posY+offsetY; - $('add_todo_list').style.left=posX+offsetX; + $('add_todo_list').style.left=posX+offsetX-200; try { var action=new Ajax.Request( @@ -59,7 +59,7 @@ function todo_list_show_success(req) { $('p_date').value=getNodeText(tl_date[0]); $('p_desc').value=getNodeText(tl_desc[0]); $('tl_id').value=getNodeText(tl_id[0]); - $('add_todo_list').show(); + $('add_todo_list').style.display='block'; } catch (e) { alert(e.message);} } function todo_list_show_error(request_json) { @@ -69,7 +69,7 @@ function add_todo() { $('add_todo_list').style.top=posY+offsetY; $('add_todo_list').style.left=posX+offsetX; - $('add_todo_list').show() + $('add_todo_list').style.display='block'; $('p_title').value=''; $('p_date').value=''; diff --git a/html/style-color.css b/html/style-color.css index 42607865a..b95e945e8 100644 --- a/html/style-color.css +++ b/html/style-color.css @@ -12,17 +12,25 @@ BODY { font-style: italic; } -table.result { +table.result,table.document { color:blue; - border:blue solid 1px; + border:1px solid blue ; width:100%; + border-spacing: 0px; + border-collapse:collapse; } -table.result th { +table.result th, table.document th { font-weight:bold; font-family:helvetica,arial,sans-serif; border-bottom:1px solid blue; padding-left:10px; padding-right:10px; + padding-top:0;padding-bottom:0; + margin:0 0 0 0; +text-align: left; + background-color:lightgrey; + color:darkblue; + } h2 { @@ -195,19 +203,6 @@ div.no span{ } -table.document { - border:solid blue 2px ; - width:100%; - border-style:outset; -} -table.document th{ - background-color:lightgrey; - color:darkblue; -} -table.result th{ - background-color:lightgrey; - color:darkblue; -} span.error { color:black; background-color:red; @@ -814,3 +809,27 @@ a#anchorbutton :hover { margin:1 2 1 2; } /* */ +div.add_todo_list { + border:1px solid blue; + display:none; + background-color:#CFCDFF; + padding:3; + position:absolute; + text-align:left; + line-height:3em; + z-index:1} +div.gest_name { + float:right; + margin-right:150; + margin-top:15 +} +h2.gest_name { + border-left: 1px solid #403a8d; + border-bottom:1px solid #403a8d; + border-top:1px solid #403a8d; + border-right:1px solid #403a8d; + padding: 5px; + font-size:140%; + color:#403a8d; + +} diff --git a/html/style-light.css b/html/style-light.css index 1e3a4649b..af602419b 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -14,15 +14,24 @@ BODY { table.result { color:blue; - border:blue solid 1px; + /* border:blue solid 1px; */ width:100%; + border-spacing: 0px; + border-collapse:collapse; + } table.result th { font-weight:bold; font-family:helvetica,arial,sans-serif; - border-bottom:1px solid blue; - padding-left:10px; - padding-right:10px; + border-bottom:2px solid blue; + border-top:0; + + color:#25238F; + text-align: left; + background-color:#EDF3FF; + + font-style: italic; + } h2 { @@ -60,6 +69,9 @@ h2.info { text-align:center; padding:0px; margin:0px; + display:compact; + border:1px solid grey; + } h3.info { @@ -110,7 +122,7 @@ div.u_tmenu div.u_tool { div.u_tool { float:left; width: 100%; - + background-color: } div.u_tool div.name { @@ -195,18 +207,23 @@ div.no span{ } table.document { - border:solid blue 2px ; - width:100%; - border-style:outset; + color:blue; + width:100%; + border-spacing: 0px; + border-collapse:collapse; + } table.document th{ - background-color:lightgrey; - color:darkblue; -} -table.result th{ - background-color:lightgrey; - color:darkblue; + font-weight:bold; + font-family:helvetica,arial,sans-serif; + border-bottom:2px solid blue; + border-top:0; + color:#25238F; + text-align: left; + background-color:#EDF3FF; + font-style: italic; } + span.error { color:black; background-color:red; @@ -230,6 +247,7 @@ td.mtitle { height :30px; font-size:10px; background-color:#DDE6FF; + border:1px solid #99B1DF; } td.msubtitle { text-align:center; @@ -791,7 +809,7 @@ h2.dossier { color:darkblue; font-style: italic; -font-size:14px; +font-size:20px; margin:0; padding:0; text-align:center; @@ -824,3 +842,27 @@ a#anchorbutton:hover { margin:1 2 1 2; } /* */ +div.add_todo_list { + border:1px solid blue; + display:none; + background-color:#BFD0FF; + padding:3; + position:absolute; + text-align:left; + line-height:3em; + z-index:1} +div.welcome { + +} +div.gest_name { + float:right; + margin-right:150; + margin-top:15 +} +h2.gest_name { + border-left: 5px solid #403a8d; + border-bottom:1px solid #b4bbc2; + border-top:1px solid #b4bbc2; + border-right:1px solid #b4bbc2; + padding: 5px; +} diff --git a/html/style.css b/html/style.css index d8db757ed..b00ecba16 100644 --- a/html/style.css +++ b/html/style.css @@ -1,7 +1,7 @@ /* */ +div.add_todo_list { + border:1px solid blue; + display:none; + background-color:lightgrey; + padding:3; + position:absolute; + text-align:left; + line-height:3em; + z-index:1} +div.welcome { + background-color:#25238F; + color:white; + + } + div.gest_name { + float:right; + margin-right:150; + margin-top:15 +} +h2.gest_name { + border-left: 1px solid #403a8d; + border-bottom:1px solid #403a8d; + border-top:1px solid #403a8d; + border-right:1px solid #403a8d; + padding: 5px; + font-size:160%; + color:black; + + +} diff --git a/html/user_advanced.php b/html/user_advanced.php index 6c485dce3..ffcd1c9d0 100644 --- a/html/user_advanced.php +++ b/html/user_advanced.php @@ -49,6 +49,7 @@ echo js_include('controls.js'); echo js_include('dragdrop.js'); echo js_include('acc_ledger.js'); echo js_include('ajax_fiche.js'); +echo JS_INFOBULLE; echo JS_CARD; echo ICard::ipopup('ipopcard'); echo IPoste::ipopup('ipop_account'); diff --git a/html/user_login.php b/html/user_login.php index 29f246896..3522de9b2 100644 --- a/html/user_login.php +++ b/html/user_login.php @@ -61,7 +61,7 @@ html_page_start($_SESSION['g_theme']); include_once("user_menu.php"); $priv=($User->admin==1)?"Administrateur":"Utilisateur"; -echo '
'; +echo '
'; /** * * If the user is NOT admin and can access only ONE folder, @@ -82,10 +82,10 @@ if ( $User->admin == 0 ) { $result=""; $result.=''; if ( $User->Admin() == 1 ) { - $result.=""; + $result.=""; } -$result.=''; -$result.=''; +$result.=''; +$result.=''; $result.=""; $result.="
Administration Administration '._('Préférence').''._('Deconnexion').''._('Préférence').''._('Deconnexion').'
"; diff --git a/include/adm_card.inc.php b/include/adm_card.inc.php index fdd03d108..3e328f89f 100644 --- a/include/adm_card.inc.php +++ b/include/adm_card.inc.php @@ -67,8 +67,8 @@ echo ShowItem(array( ), 'H',"mtitle","mtitle",$def,' '); echo '
'; -echo '
'; -echo '

'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'

'; +echo '
'; +echo '

'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'

'; echo '
'; echo '
'; diff --git a/include/cbc_be_ol.inc.php b/include/cbc_be_ol.inc.php index 8359486ba..5d584ed3b 100644 --- a/include/cbc_be_ol.inc.php +++ b/include/cbc_be_ol.inc.php @@ -32,7 +32,7 @@ while (($row = fgetcsv($handle, 2000,';')) !== FALSE) { $num = count($row); if ( $num != 10 ) continue; - if ( $row[2] != 'MC' || $row[3] != 'EUR') continue; + if ( $row[3] != 'EUR') continue; $line++; //----------------------------------------------------- // Parsing CSV comes here @@ -45,7 +45,7 @@ while (($row = fgetcsv($handle, 2000,';')) !== FALSE) { // replace the coma by a period $montant=str_replace(',','.',$montant); // remove the sign - $montant=str_replace('-','',$montant); + $montant=str_replace('+','',$montant); $devise=$row[3]; $ref_extrait=$row[4].'-'.$line; $detail=$line.'/'.$row[4].' '.$row[6]; diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index d5e4b2988..fc032bd7a 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -52,7 +52,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { /* check for a double reload */ if ( isset($mt) && $this->db->count_sql('select jr_mt from jrn where jr_mt=$1',array($mt)) != 0 ) throw new Exception (_('Double Encodage'),5); - + /* check if we can write into this ledger */ $user=new User($this->db); if ( $user->check_jrn($p_jrn) != 'W' ) @@ -580,7 +580,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { $internal_code=""; $oid=0; extract ($p_array); - + $ret=''; // Debit = banque $fBank=new fiche($this->db); @@ -613,17 +613,24 @@ class Acc_Ledger_Fin extends Acc_Ledger { $this->db->start(); $amount=0.0; $idx_operation=0; + $ret=''; + $ret.=tr(th('Quick Code').th('Nom').th('Libellé').th('Montant')); // Credit = goods for ( $i = 0; $i < $nb_item;$i++) { // if tiers is set and amount != 0 insert it into the database // and quit the loop ? if ( strlen(trim(${"e_other$i"}))==0 ) continue; - $fPoste=new fiche($this->db); $fPoste->get_by_qcode(${"e_other$i"}); + // round it ${"e_other$i"."_amount"}=round( ${"e_other$i"."_amount"},2); + // Compute display + $row=td(${"e_other$i"}).td($fPoste->strAttribut(ATTR_DEF_NAME)).td(${"e_other".$i."_comment"}).td(${"e_other$i"."_amount"},'class="num"'); + + $ret.=tr($row); + $amount+=${"e_other$i"."_amount"}; // Record a line for the bank // Compute the j_grpt @@ -776,7 +783,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { if ( strlen(trim($e_pj)) !=0 ) { $this->inc_seq_pj(); } - + $ret.='
'; } catch (Exception $e) { @@ -793,7 +800,8 @@ class Acc_Ledger_Fin extends Acc_Ledger { $r.="
Ancien solde ".$solde; $new_solde+=$amount; $r.="
Nouveau solde ".$new_solde; - return $r; + $ret.=$r; + return $ret; } /*!\brief display operation of a FIN ledger *\return html code into a string diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index a6b6455b8..9a643dab5 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -1098,8 +1098,8 @@ array $r.=""._('prix').""; /* vat use */ if ( $owner->MY_TVA_USE=='Y') { - $r.="tva"; $r.=""._('quantité').""; + $r.="tva"; $r.=' '._('Montant TVA').''; $r.=''._('Montant HTVA').''; } else { diff --git a/include/class_fiche.php b/include/class_fiche.php index e667f3444..18451fe11 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1187,19 +1187,22 @@ function empty_attribute($p_attr) { $step_tiers=$this->GetAll($offset,$search); if ( $all_tiers == 0 ) return ""; $r=$bar; - $r.=' - + $r.='
+ - - -'; + + +'; $r.=''; if ( sizeof ($step_tiers ) == 0 ) return $r; + $i=0; foreach ($step_tiers as $tiers ) { - $r.=""; + $i++;$odd=""; + if ($i % 2 == 0 ) $odd='class="odd"'; + $r.=""; $e=sprintf(' ', $script,$p_action,$tiers->id,$str_dossier); diff --git a/include/client_card.inc.php b/include/client_card.inc.php index ebd73d62d..d48f240ba 100644 --- a/include/client_card.inc.php +++ b/include/client_card.inc.php @@ -72,8 +72,8 @@ echo ShowItem(array( 'H',"mtitle","mtitle",$def,''); echo ''; echo '
'; -echo '
'; -echo '

'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'

'; +echo '
'; +echo '

'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'

'; echo '
'; echo '
'; diff --git a/include/compta_fin.inc.php b/include/compta_fin.inc.php index d3e3e4654..9023cef33 100644 --- a/include/compta_fin.inc.php +++ b/include/compta_fin.inc.php @@ -149,9 +149,11 @@ if ( $def == 1 ) { echo '
'; $a= $Ledger->insert($_POST); echo '

'._('Opération sauvée').'

'; - echo HtmlInput::button_anchor(_('Nouvel extrait'),$href.'?p_action=fin&sa=n&'.dossier::get()); echo $a; echo '
'; + echo '
'; + echo HtmlInput::button_anchor(_('Nouvel extrait'),$href.'?p_action=fin&sa=n&'.dossier::get()); + echo '
'; exit(); } } diff --git a/include/supplier_card.inc.php b/include/supplier_card.inc.php index 2e9a72688..f80d82597 100644 --- a/include/supplier_card.inc.php +++ b/include/supplier_card.inc.php @@ -73,8 +73,8 @@ echo ShowItem(array( 'H',"mtitle","mtitle",$def,' '); echo '
'; echo '
'; -echo '
'; -echo '

'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'

'; +echo '
'; +echo '

'.$f->get_quick_code()." ".$f->strAttribut(ATTR_DEF_NAME).'

'; echo '
'; echo '
'; diff --git a/include/template/dashboard.php b/include/template/dashboard.php index ea1711682..e2dc74b95 100644 --- a/include/template/dashboard.php +++ b/include/template/dashboard.php @@ -21,7 +21,7 @@ if ( isset($_REQUEST['save_todo_list'])) { } $todo=new Todo_List($cn); $array=$todo->load_all(); -echo '
'._('Quick Code').' '._('Nom').' '._('Adresse').''._('Total débit').''._('Total crédit').''._('Solde').''._('Total débit').''._('Total crédit').''._('Solde').'
"; + $result.="
"; for ($i=0;$iAucune description":h($desc); $desc="$desc"; - $result.=""; $result.="";
".$desc; + $result.="".$desc; $result.="