diff --git a/contrib/document_test/facture.html b/contrib/document_test/facture.html index f1639fa5d..addb2c08e 100644 --- a/contrib/document_test/facture.html +++ b/contrib/document_test/facture.html @@ -12,6 +12,7 @@ Adresse <>
<> <>

+

FACTURE

Détail

diff --git a/dev/extract_text.sh b/dev/extract_text.sh index 0ae02084c..08cce71f7 100644 --- a/dev/extract_text.sh +++ b/dev/extract_text.sh @@ -8,3 +8,4 @@ echo "Extract" cd .. xgettext -L PHP -j --from-code=UTF-8 -p html/lang/en_US/LC_MESSAGES/ html/*.php include/*.php include/template/*.php +xgettext -L PHP -j --from-code=UTF-8 -p html/lang/nl_NL/LC_MESSAGES/ html/*.php include/*.php include/template/*.php diff --git a/doc/manuel-fr.odt b/doc/manuel-fr.odt index ae507e4c1..2e7d53634 100644 Binary files a/doc/manuel-fr.odt and b/doc/manuel-fr.odt differ diff --git a/html/access.php b/html/access.php index 1e8b311d0..d97ae8cae 100644 --- a/html/access.php +++ b/html/access.php @@ -20,7 +20,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file +/*!\file * \brief first page */ require_once("class_idate.php"); @@ -40,7 +40,9 @@ require_once('class_acc_ledger.php'); $cn=new Database(dossier::id()); $user=new User($cn); $user->Check(); -$user->check_dossier(dossier::id()); +if ( $user->check_dossier(dossier::id()) == 'P') { + redirect("extension.php?".dossier::get(),0); +} html_page_start($_SESSION['g_theme']); /* Check Browser version if < IE6 then unsupported */ @@ -80,7 +82,7 @@ echo '
'; echo menu_tool('access.php'); echo '
'; echo '
'; -/* +/* * Mini Report */ $report=$user->get_mini_report(); @@ -101,7 +103,7 @@ if ( $report != 0 ) { } else { $periode=new Periode($cn); $limit=$periode->limit_year($exercice); - + $result=$rapport->get_row($limit['start'],$limit['end'],'periode'); $ix=0; echo '
'; @@ -125,7 +127,7 @@ if ( $report != 0 ) { echo ''; echo ''; } -/* +/* * Todo list */ echo JS_TODO; diff --git a/html/admin/sql/patch/upgrade63.sql b/html/admin/sql/patch/upgrade63.sql new file mode 100644 index 000000000..afaf0b8bd --- /dev/null +++ b/html/admin/sql/patch/upgrade63.sql @@ -0,0 +1,62 @@ +begin; + +DROP FUNCTION insert_jrnx(character varying, numeric, poste_comptable, integer, integer, boolean, text, integer, text); + +CREATE OR REPLACE FUNCTION insert_jrnx(p_date character varying, p_montant numeric, p_poste poste_comptable, p_grpt integer, p_jrn_def integer, p_debit boolean, p_tech_user text, p_tech_per integer, p_qcode text,p_comment text) + RETURNS void AS +$BODY$ +declare + sCode varchar; + nCount_qcode integer; +begin + sCode=trim(p_qcode); + + -- if p_qcode is empty try to find one + if length(sCode) = 0 or p_qcode is null then + select count(*) into nCount_qcode + from vw_poste_qcode where j_poste=p_poste::text; + -- if we find only one q_code for a accountancy account + -- then retrieve it + if nCount_qcode = 1 then + select j_qcode::text into sCode + from vw_poste_qcode where j_poste=p_poste::text; + else + sCode=NULL; + end if; + + end if; + + insert into jrnx + ( + j_date, + j_montant, + j_poste, + j_grpt, + j_jrn_def, + j_debit, + j_text, + j_tech_user, + j_tech_per, + j_qcode + ) values + ( + to_date(p_date,'DD.MM.YYYY'), + p_montant, + p_poste, + p_grpt, + p_jrn_def, + p_debit, + p_comment, + p_tech_user, + p_tech_per, + sCode + ); + +return; +end; +$BODY$ +LANGUAGE plpgsql; + +update version set val=64; + +commit; diff --git a/html/admin/sql/patch/upgrade64.sql b/html/admin/sql/patch/upgrade64.sql new file mode 100644 index 000000000..a580f8402 --- /dev/null +++ b/html/admin/sql/patch/upgrade64.sql @@ -0,0 +1,67 @@ +begin; + +DROP VIEW vw_fiche_attr; + +CREATE OR REPLACE VIEW vw_fiche_attr AS + SELECT a.f_id, a.fd_id, a.av_text AS vw_name, b.av_text AS vw_sell, c.av_text AS vw_buy, d.av_text AS tva_code, tva_rate.tva_id, tva_rate.tva_rate, tva_rate.tva_label, e.av_text AS vw_addr, f.av_text AS vw_cp, j.av_text AS quick_code, h.av_text AS vw_description, i.av_text AS tva_num, fiche_def.frd_id + FROM ( SELECT fiche.f_id, fiche.fd_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 1) a + LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 6) b ON a.f_id = b.f_id + LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 7) c ON a.f_id = c.f_id + LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 2) d ON a.f_id = d.f_id + LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 14) e ON a.f_id = e.f_id + LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 15) f ON a.f_id = f.f_id + LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 23) j ON a.f_id = j.f_id + LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 9) h ON a.f_id = h.f_id + LEFT JOIN ( SELECT fiche.f_id, attr_value.av_text + FROM fiche + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + JOIN attr_def USING (ad_id) + WHERE jnt_fic_att_value.ad_id = 13) i ON a.f_id = i.f_id + LEFT JOIN tva_rate ON d.av_text = tva_rate.tva_id::text + JOIN fiche_def USING (fd_id); + +update version set val=65; + +commit; + diff --git a/html/admin/sql/patch/upgrade65.sql b/html/admin/sql/patch/upgrade65.sql new file mode 100644 index 000000000..b1d1ce290 --- /dev/null +++ b/html/admin/sql/patch/upgrade65.sql @@ -0,0 +1,4 @@ +begin; +SELECT setval('public.mod_payment_mp_id_seq', 10, true); +update version set val=66; +commit; \ No newline at end of file diff --git a/html/admin/sql/patch/upgrade66.sql b/html/admin/sql/patch/upgrade66.sql new file mode 100644 index 000000000..219a1d7b2 --- /dev/null +++ b/html/admin/sql/patch/upgrade66.sql @@ -0,0 +1,134 @@ +begin; + +drop function account_insert(p_f_id integer, p_account poste_comptable); + +CREATE OR REPLACE FUNCTION account_insert(p_f_id integer, p_account text) + RETURNS integer AS +$BODY$ +declare +nParent tmp_pcmn.pcm_val_parent%type; +sName varchar; +nNew tmp_pcmn.pcm_val%type; +bAuto bool; +nFd_id integer; +nCount integer; +first text; +second text; +begin + + if length(trim(p_account)) != 0 then + -- if there is coma in p_account, treat normally + if position (',' in p_account) = 0 then + raise info 'p_account is not empty'; + select count(*) into nCount from tmp_pcmn where pcm_val=p_account; + raise notice 'found in tmp_pcm %',nCount; + if nCount !=0 then + raise info 'this account exists in tmp_pcmn '; + perform attribut_insert(p_f_id,5,p_account); + else + -- account doesn't exist, create it + select av_text into sName from + attr_value join jnt_fic_att_value using (jft_id) + where + ad_id=1 and f_id=p_f_id; + + nParent:=account_parent(p_account::poste_comptable); + insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::poste_comptable,sName,nParent); + perform attribut_insert(p_f_id,5,p_account); + + end if; + else + raise info 'presence of a comma'; + -- there is 2 accounts separated by a comma + first := split_part(p_account,',',1); + second := split_part(p_account,',',2); + -- check there is no other coma + raise info 'first value % second value %', first, second; + + if position (',' in first) != 0 or position (',' in second) != 0 then + raise exception 'Too many comas, invalid account'; + end if; + perform attribut_insert(p_f_id,5,p_account); + end if; + else + raise info 'p_account is empty'; + select fd_id into nFd_id from fiche where f_id=p_f_id; + bAuto:= account_auto(nFd_id); + if bAuto = true then + raise notice 'account generated automatically'; + nNew:=account_compute(p_f_id); + raise notice 'nNew %', nNew; + select av_text into sName from + attr_value join jnt_fic_att_value using (jft_id) + where + ad_id=1 and f_id=p_f_id; + nParent:=account_parent(nNew); + perform account_add (nNew,sName); + perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); + + else + -- if there is an account_base then it is the default + select fd_class_base::text into nNew from fiche_def join fiche using (fd_id) where f_id=p_f_id; + if nNew is null or length(trim(nNew)) = 0 then + raise notice 'count is null'; + perform attribut_insert(p_f_id,5,null); + else + perform attribut_insert(p_f_id,5,to_char(nNew,'999999999999999999999999')); + end if; + end if; + end if; + +return 0; +end; +$BODY$ +LANGUAGE 'plpgsql'; + +drop function account_update(p_f_id integer, p_account poste_comptable); + +CREATE OR REPLACE FUNCTION account_update(p_f_id integer, p_account text) + RETURNS integer AS +$BODY$ +declare +nMax fiche.f_id%type; +nCount integer; +nParent tmp_pcmn.pcm_val_parent%type; +sName varchar; +nJft_id attr_value.jft_id%type; +first text; +second text; +begin + + if length(trim(p_account)) != 0 then + if position (',' in p_account) = 0 then + select count(*) into nCount from tmp_pcmn where pcm_val=p_account; + if nCount = 0 then + select av_text into sName from + attr_value join jnt_fic_att_value using (jft_id) + where + ad_id=1 and f_id=p_f_id; + nParent:=account_parent(p_account::poste_comptable); + insert into tmp_pcmn(pcm_val,pcm_lib,pcm_val_parent) values (p_account::poste_comptable,sName,nParent); + end if; + else + raise info 'presence of a comma'; + -- there is 2 accounts separated by a comma + first := split_part(p_account,',',1); + second := split_part(p_account,',',2); + -- check there is no other coma + raise info 'first value % second value %', first, second; + + if position (',' in first) != 0 or position (',' in second) != 0 then + raise exception 'Too many comas, invalid account'; + end if; + end if; + end if; + select jft_id into njft_id from jnt_fic_att_value where f_id=p_f_id and ad_id=5; + update attr_value set av_text=p_account where jft_id=njft_id; + +return njft_id; +end; +$BODY$ +LANGUAGE 'plpgsql'; + +update version set val=67; +commit; \ No newline at end of file diff --git a/html/admin/sql/patch/upgrade67.sql b/html/admin/sql/patch/upgrade67.sql new file mode 100644 index 000000000..203b1b516 --- /dev/null +++ b/html/admin/sql/patch/upgrade67.sql @@ -0,0 +1,177 @@ +begin; + +DROP VIEW vw_fiche_def; +DROP VIEW vw_supplier; +DROP VIEW vw_client; + +alter table fiche_def alter fd_class_base type text; +CREATE OR REPLACE VIEW vw_fiche_def AS + SELECT jnt_fic_attr.fd_id, jnt_fic_attr.ad_id, attr_def.ad_text, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def.frd_id + FROM fiche_def + JOIN jnt_fic_attr USING (fd_id) + JOIN attr_def ON attr_def.ad_id = jnt_fic_attr.ad_id; + +COMMENT ON VIEW vw_fiche_def IS 'all the attributs for card family'; + +CREATE OR REPLACE VIEW vw_supplier AS + SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email + FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 1) a + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) + LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) + WHERE a.frd_id = 8; +CREATE OR REPLACE VIEW vw_client AS + SELECT a.f_id, a.av_text AS name, a1.av_text AS quick_code, b.av_text AS tva_num, c.av_text AS poste_comptable, d.av_text AS rue, e.av_text AS code_postal, f.av_text AS pays, g.av_text AS telephone, h.av_text AS email + FROM ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 1) a + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 13) b USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 23) a1 USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 5) c USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 14) d USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 15) e USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 16) f USING (f_id) + JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 17) g USING (f_id) + LEFT JOIN ( SELECT jnt_fic_att_value.jft_id, fiche.f_id, fiche_def.frd_id, fiche.fd_id, fiche_def.fd_class_base, fiche_def.fd_label, fiche_def.fd_create_account, fiche_def_ref.frd_text, fiche_def_ref.frd_class_base, jnt_fic_att_value.ad_id, attr_value.av_text + FROM fiche + JOIN fiche_def USING (fd_id) + JOIN fiche_def_ref USING (frd_id) + JOIN jnt_fic_att_value USING (f_id) + JOIN attr_value USING (jft_id) + WHERE jnt_fic_att_value.ad_id = 18) h USING (f_id) + WHERE a.frd_id = 9; + + +CREATE OR REPLACE FUNCTION fiche_def_ins_upd() + RETURNS "trigger" AS +$BODY$ +begin + +if position (',' in NEW.fd_class_base) != 0 then + NEW.fd_create_account='f'; + +end if; +return NEW; +end;$BODY$ +LANGUAGE 'plpgsql'; + +CREATE TRIGGER fiche_def_ins_upd + BEFORE INSERT OR UPDATE + ON fiche_def + FOR EACH ROW + EXECUTE PROCEDURE fiche_def_ins_upd(); + +ALTER TABLE stock_goods DROP CONSTRAINT fk_stock_good_f_id; + +ALTER TABLE stock_goods + ADD CONSTRAINT fk_stock_good_f_id FOREIGN KEY (f_id) + REFERENCES fiche (f_id) MATCH SIMPLE + ON UPDATE cascade ON DELETE cascade; + +update version set val=68; +commit; diff --git a/html/ajax.php b/html/ajax.php new file mode 100644 index 000000000..4f1702488 --- /dev/null +++ b/html/ajax.php @@ -0,0 +1,38 @@ +check(true); + +/* if a code has been asked */ +if (isset($_REQUEST['code']) ) { + + $ext=new Extension($cn); + $ext->search('code',$_REQUEST['code']); + if ( $ext->get_parameter('id') != 0 ) { + /* security */ + if ( !isset ($_SESSION['g_user']) || $ext->can_request($_SESSION['g_user']) == 0 ) { + exit(); + } + /* call the ajax script */ + require_once('ext'.DIRECTORY_SEPARATOR.dirname(trim($ext->get_parameter('filepath'))).DIRECTORY_SEPARATOR.'ajax.php'); + } else { + alert(j(_("Cette extension n'existe pas "))); + exit(); + } + +} +?> \ No newline at end of file diff --git a/html/ajax_extension.php b/html/ajax_extension.php index 4f8f4b699..fdea35465 100644 --- a/html/ajax_extension.php +++ b/html/ajax_extension.php @@ -85,7 +85,7 @@ switch($action) { $enable->selected=$ext->get_parameter('enable'); $str_enable=$enable->input(); $r.='
'; - $r.='
'; + $r.=''; $r.=dossier::hidden().HtmlInput::phpsessid(); /* property of the extension */ ob_start(); @@ -142,7 +142,7 @@ switch($action) { $enable->selected='Y'; $str_enable=$enable->input(); $r.='
'; - $r.=''; + $r.=''; $r.=dossier::hidden().HtmlInput::phpsessid(); ob_start(); require_once('template/extension-detail.php'); diff --git a/html/commercial.php b/html/commercial.php index 2bc3b7221..7fba13b00 100644 --- a/html/commercial.php +++ b/html/commercial.php @@ -22,7 +22,7 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*! \file * \brief Base of the module "Gestion", the p_action indicates what - * file must included and this file will manage the request + * file must included and this file will manage the request * (customer, supplier, contact,...) */ include_once ("ac_common.php"); @@ -41,7 +41,7 @@ $rep=new Database($gDossier); require_once ("class_user.php"); $User=new User($rep); $User->Check(); -$User->check_dossier($gDossier); +if ($User->check_dossier($gDossier)=='P')exit(); //----------------------------------------------------- // update preference @@ -132,14 +132,14 @@ echo JS_AJAX_FICHE; //----------------------------------------------------- // p_action == pref //----------------------------------------------------- -if ( $p_action == "pref" ) +if ( $p_action == "pref" ) { require_once("pref.inc.php"); } //----------------------------------------------------- // p_action == impression //----------------------------------------------------- -if ( $p_action == "impress" ) +if ( $p_action == "impress" ) { require_once("impress.inc.php"); } @@ -148,7 +148,7 @@ if ( $p_action == "impress" ) //----------------------------------------------------- // p_action == adm //----------------------------------------------------- -if ( $p_action == "adm" ) +if ( $p_action == "adm" ) { $User->can_request(GEADM,1); require_once("adm.inc.php"); @@ -156,7 +156,7 @@ if ( $p_action == "adm" ) //----------------------------------------------------- // p_action == client //----------------------------------------------------- -if ( $p_action == "client" ) +if ( $p_action == "client" ) { $User->can_request(GECUST,1); require_once("client.inc.php"); @@ -164,7 +164,7 @@ if ( $p_action == "client" ) // $p_action == fournisseur //----------------------------------------------------- // Fournisseur -if ( $p_action == 'supplier') +if ( $p_action == 'supplier') { $User->can_request(GESUPPL,1); require_once("supplier.inc.php"); @@ -172,20 +172,20 @@ if ( $p_action == 'supplier') //----------------------------------------------------- // action -if ( $p_action == 'suivi_courrier') +if ( $p_action == 'suivi_courrier') { $User->can_request(GECOUR,1); require_once("action.inc.php"); } //----------------------------------------------------- // Contact -if ( $p_action == 'fiche') +if ( $p_action == 'fiche') { require_once("fiche.inc.php"); } //----------------------------------------------------- // Impression -if ( $p_action == 'impress') +if ( $p_action == 'impress') { if ( $User->check_action(IMPRAP)==1 || $User->check_action(IMPJRN)==1 || @@ -215,7 +215,7 @@ if ( $p_action=='central') { } //----------------------------------------------------- // Expense -if ( $p_action == 'defreport') +if ( $p_action == 'defreport') { $User->can_request(PARPREDE,1); require_once("report.inc.php"); diff --git a/html/compta.php b/html/compta.php index d64eeec92..5a65f766f 100644 --- a/html/compta.php +++ b/html/compta.php @@ -45,7 +45,7 @@ $cn=new Database($gDossier); require_once ('class_user.php'); $User=new User($cn); $User->Check(); -$User->check_dossier($gDossier); +if ($User->check_dossier($gDossier)=='P') exit(); html_page_start($_SESSION['g_theme']); diff --git a/html/comptanalytic.php b/html/comptanalytic.php index 70fe243f8..9ddfb2fcf 100644 --- a/html/comptanalytic.php +++ b/html/comptanalytic.php @@ -38,7 +38,7 @@ require_once ("class_user.php"); require_once ('user_menu.php'); $User=new User($cn); $User->Check(); -$User->check_dossier($gDossier); +if ($User->check_dossier($gDossier) == 'P') exit(); html_page_start($_SESSION['g_theme']); diff --git a/html/extension.php b/html/extension.php index bd1d933ba..55012d8b1 100644 --- a/html/extension.php +++ b/html/extension.php @@ -35,11 +35,11 @@ require_once('class_iselect.php'); require_once ('constant.security.php'); require_once ('class_user.php'); -html_page_start($_SESSION['g_theme']); +@html_page_start($_SESSION['g_theme']); $cn=new Database(dossier::id()); $user=new User($cn); $user->check(); -$user->check_dossier(dossier::id()); +$only_plugin=$user->check_dossier(dossier::id()); /* javascript file */ @@ -58,16 +58,20 @@ echo JS_INFOBULLE; /* show button to return to access */ echo "

".dossier::name()."

"; +if ( $only_plugin != 'P' ) { + // user with only plugin cannot go back to the dashboard /* return button */ $msg=_('Retour au tableau de bord'); $hidden=dossier::hidden().HtmlInput::phpsessid(); echo << +
+ $hidden +
EOF; - +} /* show all the extension we can access */ $a=new ISelect('code'); $a->value=Extension::make_array($cn); diff --git a/html/js/extension.js b/html/js/extension.js index 2158dfa29..d6b792c08 100644 --- a/html/js/extension.js +++ b/html/js/extension.js @@ -90,25 +90,32 @@ function extDetail(req){ /** *@brief save the extension (add or update) */ -function extension_save(p_obj){ +function extension_save(p_obj_form){ + try{ var dossier=$("gDossier").value; var phpsessid=$('phpsessid').value; var queryString='?gDossier='+dossier; queryString+='&PHPSESSID='+phpsessid; queryString+='&action=se'; // se save extension - // Data must be taken here - var data=p_obj.serialize(false); + // Data must be taken here + try{ + var data=$(p_obj_form).serialize(false); + } catch(f){ + var sType=p_obj_form.tagName; + var sName=p_obj_form.id; + var nbElement=p_obj_form.elements.length; + alert("Message"+sName+" "+sType+" Nb Element"+nbElement+" "+f.message+"\n"); + throw (f); + } queryString+='&'+data; - $(content).innerHTML=''; - var action=new Ajax.Request ( 'ajax_extension.php', - { - method:'POST', - parameters:queryString, - onFailure:errorExtension, - onSuccess:successSave - } - ); - hideIPopup('dtext'); + $("dtext_content").innerHTML=''; + var action=new Ajax.Request ( 'ajax_extension.php', { method:'POST', parameters:queryString,onFailure:errorExtension, + onSuccess:successSave } ); + + hideIPopup('dtext'); + } catch(e) { + alert("Probleme extension_save "+e._message+"\n"+e.description); + } } function errorExtension(){ alert('Ajax extension failed'); diff --git a/html/js/scripts.js b/html/js/scripts.js index 379e35c79..b634d58d9 100644 --- a/html/js/scripts.js +++ b/html/js/scripts.js @@ -74,10 +74,11 @@ function refresh_window() { } /** + *@fn encodeJSON(obj) *@brief we receive a json object as parameter and the function returns the string * with the format variable=value&var2=val2... */ -var encodeJSON=function(obj) { +function encodeJSON(obj) { if (typeof obj != 'object') {alert('encodeParameter obj n\'est pas un objet');} try{ var str='';var e=0; @@ -89,10 +90,10 @@ var encodeJSON=function(obj) { return str; } catch(e){alert('encodeParameter '+e.message);} } -var hide=function(p_param){ +function hide(p_param){ g(p_param).style.display='none'; } -var show=function(p_param){ +function show(p_param){ g(p_param).style.display='block'; } @@ -215,8 +216,9 @@ function unescape_xml(code_html) { function getNodeText(xmlNode) { if(!xmlNode) return ''; - if(typeof(xmlNode.textContent) != "undefined") return xmlNode.textContent; - return xmlNode.firstChild.nodeValue; + if(typeof(xmlNode.textContent) != "undefined") { return xmlNode.textContent; } + if ( xmlNode.firstChild && xmlNode.firstChild.nodeValue ) return xmlNode.firstChild.nodeValue; + return ""; } /** *@brief change the periode in the calendar of the dashboard @@ -248,7 +250,8 @@ function change_month_success(req) { } +function loading() { return '';} function ajax_misc_failure() { alert('Ajax Misc failed'); -} \ No newline at end of file +} diff --git a/html/js/todo_list.js b/html/js/todo_list.js index 13241bb6f..d79dff51a 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; var phpsessid=$('phpsessid').value; - + try { var action=new Ajax.Request( 'todo_list.php', { @@ -38,6 +38,9 @@ function todo_list_show(p_id) { onSuccess:todo_list_show_success } ); + } catch (e) { + alert(" Envoi ajax non possible" + e.message); + } return false; } function todo_list_show_success(req) { diff --git a/html/lang/en_US/LC_MESSAGES/messages.po b/html/lang/en_US/LC_MESSAGES/messages.po index 9e63ca435..ead3ea115 100644 --- a/html/lang/en_US/LC_MESSAGES/messages.po +++ b/html/lang/en_US/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-01-21 16:16+0100\n" +"POT-Creation-Date: 2010-02-08 22:29+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -76,6 +76,8 @@ msgstr "Dashboard" #: include/class_acc_ledger_sold.php:1033 #: include/class_acc_ledger_sold.php:494 #: include/class_acc_ledger_sold.php:1035 +#: include/class_acc_ledger_sold.php:547 +#: include/class_acc_ledger_sold.php:1088 msgid "Client" msgstr "Customer" @@ -90,6 +92,8 @@ msgstr "Customer" #: include/class_acc_ledger_purchase.php:934 #: include/class_acc_ledger_purchase.php:865 #: include/class_acc_ledger_purchase.php:938 +#: include/class_acc_ledger_purchase.php:943 +#: include/class_acc_ledger_purchase.php:1016 msgid "Fournisseur" msgstr "Supplier" @@ -114,6 +118,7 @@ msgstr "Stock" #: include/template/security_list_action.php:59 include/impress.inc.php:34 #: include/action.common.inc.php:265 include/user_menu.php:185 #: include/template/detail-action.php:160 +#: include/template/detail-action.php:178 include/user_menu.php:195 msgid "Fiche" msgstr "Card" @@ -142,7 +147,7 @@ msgid "Aucune période trouvéee !!!" msgstr "No period found" #: include/class_user.php:631 include/class_user.php:660 -#: include/class_user.php:664 +#: include/class_user.php:664 include/class_user.php:668 msgid "Dossier non accessible" msgstr "Folder not accessible" @@ -220,43 +225,53 @@ msgid "Retour" msgstr "Return" #: include/user_menu.php:186 include/user_menu.php:178 +#: include/user_menu.php:188 msgid "Grand Livre" msgstr "Ledger" #: include/user_menu.php:186 include/user_menu.php:178 +#: include/user_menu.php:188 msgid "Grand livre : toutes les opérations" msgstr "Ledger : all entries" #: include/user_menu.php:187 include/user_menu.php:179 +#: include/class_acc_payment.php:343 include/user_menu.php:189 msgid "Vente" msgstr "Sale" #: include/user_menu.php:187 include/user_menu.php:179 +#: include/user_menu.php:189 msgid "Journal de vente / produit" msgstr "Ledger of sales" #: include/user_menu.php:188 include/class_anticipation.php:198 #: include/class_anticipation.php:192 include/user_menu.php:180 +#: include/user_menu.php:190 msgid "Dépense" msgstr "Purchase" #: include/user_menu.php:188 include/user_menu.php:180 +#: include/user_menu.php:190 msgid "Journaux de dépense, d'achat" msgstr "Ledger of purchase" #: include/user_menu.php:189 include/user_menu.php:181 +#: include/user_menu.php:191 msgid "Financier" msgstr "Financial" #: include/user_menu.php:189 include/user_menu.php:181 +#: include/user_menu.php:191 msgid "Journaux financiers: les banques, la caisse" msgstr "Financial ledger : bank,.." #: include/user_menu.php:190 include/user_menu.php:182 +#: include/user_menu.php:192 msgid "Ecriture directe" msgstr "Direct Writing" #: include/user_menu.php:190 include/user_menu.php:182 +#: include/user_menu.php:192 msgid "Ecriture directe dans les journaux" msgstr "Write directly in a ledger" @@ -268,144 +283,151 @@ msgstr "Write directly in a ledger" #: include/template/security_list_action.php:65 #: include/template/security_list_action.php:73 include/compta_ach.inc.php:60 #: include/compta_ven.inc.php:59 include/user_menu.php:184 +#: include/user_menu.php:194 msgid "Impression" msgstr "Print" #: include/user_menu.php:193 include/user_menu.php:185 +#: include/user_menu.php:195 msgid "Ajouter, modifier ou effacer des fiches" msgstr "Add,modifier or remove card" #: include/user_menu.php:194 include/user_menu.php:186 +#: include/user_menu.php:196 msgid "Avancé" msgstr "Advanced" #: include/user_menu.php:194 include/user_menu.php:186 +#: include/user_menu.php:196 msgid "Opérations délicates" msgstr "Advanced operation" #: include/user_menu.php:355 include/user_menu.php:223 -#: include/user_menu.php:215 +#: include/user_menu.php:215 include/user_menu.php:225 msgid "Ecritures definies" msgstr "Defined entries" #: include/user_menu.php:356 include/user_menu.php:224 -#: include/user_menu.php:216 +#: include/user_menu.php:216 include/user_menu.php:226 msgid "Periode" msgstr "Period" #: include/user_menu.php:356 include/user_menu.php:224 -#: include/user_menu.php:216 +#: include/user_menu.php:216 include/user_menu.php:226 msgid "Gestion des periodes" msgstr "Period management" #: include/user_menu.php:357 include/user_menu.php:225 -#: include/user_menu.php:217 +#: include/user_menu.php:217 include/user_menu.php:227 msgid "Centralise" msgstr "Centralize" #: include/user_menu.php:357 include/user_menu.php:225 -#: include/user_menu.php:217 +#: include/user_menu.php:217 include/user_menu.php:227 msgid "Centralisation" msgstr "Centralization" #: include/user_menu.php:359 include/user_menu.php:227 -#: include/user_menu.php:219 +#: include/user_menu.php:219 include/user_menu.php:229 msgid "Gestion des stocks" msgstr "Stock control" #: include/user_menu.php:360 include/user_menu.php:228 #: include/impress.inc.php:35 include/user_menu.php:220 +#: include/user_menu.php:230 msgid "Rapport" msgstr "Report" #: include/user_menu.php:361 include/user_menu.php:229 -#: include/user_menu.php:221 +#: include/user_menu.php:221 include/user_menu.php:231 msgid "Import Banque" msgstr "Bank import" #: include/user_menu.php:361 include/template/form_ledger_fin.php:6 #: include/user_menu.php:229 include/class_anticipation.php:198 #: include/class_anticipation.php:192 include/user_menu.php:221 +#: include/user_menu.php:231 msgid "Banque" msgstr "Bank" #: include/user_menu.php:362 include/user_menu.php:230 -#: include/user_menu.php:222 +#: include/user_menu.php:222 include/user_menu.php:232 msgid "Ecriture ouverture" msgstr "Opening entries" #: include/user_menu.php:363 include/user_menu.php:231 -#: include/user_menu.php:223 +#: include/user_menu.php:223 include/user_menu.php:233 msgid "Vérification" msgstr "Check in" #: include/user_menu.php:437 include/user_menu.php:305 -#: include/user_menu.php:297 +#: include/user_menu.php:297 include/user_menu.php:307 msgid "Utilisateurs" msgstr "Users" #: include/user_menu.php:437 include/user_menu.php:305 -#: include/user_menu.php:297 +#: include/user_menu.php:297 include/user_menu.php:307 msgid "Gestion des utilisateurs" msgstr "Users managements" #: include/user_menu.php:438 include/user_menu.php:306 -#: include/user_menu.php:298 +#: include/user_menu.php:298 include/user_menu.php:308 msgid "Dossiers" msgstr "Folders" #: include/user_menu.php:438 include/user_menu.php:306 -#: include/user_menu.php:298 +#: include/user_menu.php:298 include/user_menu.php:308 msgid "Gestion des dossiers" msgstr "Folders managements" #: include/user_menu.php:439 include/user_menu.php:307 -#: include/user_menu.php:299 +#: include/user_menu.php:299 include/user_menu.php:309 msgid "Modèles" msgstr "Template" #: include/user_menu.php:439 include/user_menu.php:307 -#: include/user_menu.php:299 +#: include/user_menu.php:299 include/user_menu.php:309 msgid "Gestion des modèles" msgstr "Template management" #: include/user_menu.php:440 include/user_menu.php:308 -#: include/user_menu.php:300 +#: include/user_menu.php:300 include/user_menu.php:310 msgid "Restaure" msgstr "Restore" #: include/user_menu.php:440 include/user_menu.php:308 -#: include/user_menu.php:300 +#: include/user_menu.php:300 include/user_menu.php:310 msgid "Restaure une base de données" msgstr "Restore a folder" #: include/user_menu.php:441 include/user_menu.php:575 #: include/user_menu.php:309 include/user_menu.php:301 +#: include/user_menu.php:311 msgid "Accueil" msgstr "Homepage" #: include/user_menu.php:442 include/user_menu.php:310 -#: include/user_menu.php:302 +#: include/user_menu.php:302 include/user_menu.php:312 msgid "Sortie" msgstr "Logout" #: include/user_menu.php:466 include/user_menu.php:334 -#: include/user_menu.php:326 +#: include/user_menu.php:326 include/user_menu.php:336 msgid "Sociétés" msgstr "Company" #: include/user_menu.php:466 include/user_menu.php:334 -#: include/user_menu.php:326 +#: include/user_menu.php:326 include/user_menu.php:336 msgid "Parametre societe" msgstr "Company parametes" #: include/user_menu.php:467 include/user_menu.php:335 -#: include/user_menu.php:327 +#: include/user_menu.php:327 include/user_menu.php:337 msgid "Divers" msgstr "Miscelleanous" #: include/user_menu.php:467 include/user_menu.php:335 -#: include/user_menu.php:327 +#: include/user_menu.php:327 include/user_menu.php:337 msgid "Devise, moyen de paiement" msgstr "Currency, " @@ -492,7 +514,7 @@ msgstr "Creation and modification of ledger" #: include/user_menu.php:494 include/user_menu.php:362 #: include/user_menu.php:361 include/user_menu.php:254 #: include/user_menu.php:360 include/user_menu.php:246 -#: include/user_menu.php:352 +#: include/user_menu.php:352 include/user_menu.php:256 msgid "Création" msgstr "Creation" @@ -536,7 +558,7 @@ msgstr "Other folder" #: include/user_menu.php:579 html/user_login.php:73 html/user_login.php:74 #: include/user_menu.php:447 html/user_login.php:82 include/user_menu.php:446 -#: include/user_menu.php:445 include/user_menu.php:437 +#: include/user_menu.php:445 include/user_menu.php:437 html/user_login.php:81 msgid "Deconnexion" msgstr "Disconnect" @@ -564,6 +586,8 @@ msgstr "Management" #: include/class_acc_ledger_sold.php:507 include/class_acc_ledger_sold.php:509 #: include/user_menu.php:449 include/class_acc_ledger_purchase.php:958 #: include/class_acc_ledger_sold.php:511 include/user_menu.php:441 +#: include/class_acc_ledger_purchase.php:1036 +#: include/class_acc_ledger_sold.php:564 msgid "Compt. Analytique" msgstr "Cost Accounting" @@ -575,11 +599,11 @@ msgstr "Budget" msgid " Cette action ne vous est pas autorisée Contactez votre responsable" msgstr "This action is not authorized contact your administrator" -#: html/access.php:71 html/access.php:72 html/access.php:73 +#: html/access.php:71 html/access.php:72 html/access.php:73 html/access.php:75 msgid "Votre base de données n'est pas à jour" msgstr "Your database is not updated" -#: html/access.php:72 html/access.php:73 html/access.php:74 +#: html/access.php:72 html/access.php:73 html/access.php:74 html/access.php:76 msgid "cliquez ici pour appliquer le patch" msgstr "Click here to apply the patch" @@ -603,13 +627,16 @@ msgstr "Todo list" #: include/class_acc_ledger_purchase.php:924 #: include/class_acc_ledger_sold.php:480 include/class_acc_ledger_sold.php:482 #: include/class_acc_ledger_purchase.php:928 -#: include/class_acc_ledger_sold.php:484 +#: include/class_acc_ledger_sold.php:484 html/access.php:158 +#: include/class_acc_ledger_purchase.php:1006 +#: include/class_acc_ledger_sold.php:537 msgid "Date" msgstr "Date" #: html/access.php:110 include/template/detail-action.php:132 #: html/access.php:111 html/access.php:157 #: include/template/detail-action.php:136 +#: include/template/detail-action.php:150 html/access.php:159 msgid "Titre" msgstr "Title" @@ -633,6 +660,9 @@ msgstr "Title" #: include/class_acc_ledger_sold.php:491 #: include/template/detail-action.php:133 #: include/template/detail-action.php:161 +#: include/template/detail-action.php:179 html/access.php:160 +#: include/class_acc_ledger_purchase.php:1013 +#: include/class_acc_ledger_sold.php:544 msgid "Description" msgstr "Description" @@ -642,48 +672,59 @@ msgstr "Description" #: html/access.php:162 html/ajax_extension.php:117 html/ajax_extension.php:174 #: html/parametre.php:283 include/payment_middle.inc.php:57 #: html/ajax_extension.php:111 html/ajax_extension.php:168 -#: html/parametre.php:289 +#: html/parametre.php:289 html/access.php:164 +#: include/payment_middle.inc.php:58 msgid "Sauve" msgstr "Save" #: html/access.php:116 html/access.php:117 html/access.php:163 #: include/detail_adm.inc.php:68 include/detail_client.inc.php:68 #: include/detail_supplier.inc.php:68 include/fiche.inc.php:292 -#: include/fiche.inc.php:380 +#: include/fiche.inc.php:380 html/access.php:165 include/fiche.inc.php:290 +#: include/fiche.inc.php:378 msgid "Annuler" msgstr "Cancel" #: html/access.php:120 html/access.php:121 html/access.php:167 +#: html/access.php:169 include/payment_middle.inc.php:164 msgid "Ajout" msgstr "Add" #: html/access.php:161 html/access.php:162 html/access.php:100 +#: html/access.php:102 msgid "Aucune periode par defaut" msgstr "There is no default period" #: html/access.php:184 html/access.php:185 html/access.php:123 +#: html/access.php:125 msgid "Aucun rapport défini" msgstr "No report defined" #: html/access.php:185 html/access.php:186 html/access.php:124 +#: html/access.php:126 msgid "Cliquez ici pour mettre à jour vos préférences" msgstr "Click here to update your preference" #: html/user_login.php:77 html/user_login.php:78 html/user_login.php:86 +#: html/user_login.php:85 msgid "Bienvenue" msgstr "Welcome" #: html/user_login.php:77 html/user_login.php:78 html/user_login.php:86 +#: html/user_login.php:85 msgid "dans PhpCompta" msgstr "in PhpCompta" #: html/user_login.php:83 html/user_login.php:84 html/user_login.php:92 #: include/class_acc_ledger_fin.php:763 include/class_acc_ledger.php:2176 #: include/fiche.inc.php:74 include/class_acc_ledger_fin.php:764 +#: html/user_login.php:91 include/class_acc_ledger_fin.php:819 +#: include/class_acc_ledger.php:2195 include/fiche.inc.php:72 msgid "Rechercher" msgstr "Search" #: html/user_login.php:92 html/user_login.php:93 html/user_login.php:101 +#: html/user_login.php:100 msgid "Donnez une partie du nom du dossier à rechercher" msgstr "Give the a part of the folder name " @@ -739,6 +780,7 @@ msgid "Aide" msgstr "Help" #: html/user_login.php:72 html/user_login.php:73 html/user_login.php:81 +#: html/user_login.php:80 msgid "Préférence" msgstr "Preference" @@ -839,6 +881,7 @@ msgid "Nom" msgstr "Name" #: include/dossier.inc.php:267 include/payment_middle.inc.php:93 +#: include/payment_middle.inc.php:128 msgid "Modifie" msgstr "Modify" @@ -872,7 +915,7 @@ msgid "" "navigateur à jour" msgstr "For a better web experience, take the time to update your brower" -#: html/user_login.php:79 html/user_login.php:87 +#: html/user_login.php:79 html/user_login.php:87 html/user_login.php:86 msgid "Choississez votre dossier" msgstr "Select your folder" @@ -941,6 +984,10 @@ msgstr "You have to create first a category of card in the card menu" #: include/class_acc_ledger_fin.php:172 include/class_acc_ledger.php:1240 #: include/class_acc_ledger_purchase.php:592 #: include/class_acc_ledger_sold.php:773 include/class_action.php:260 +#: include/class_action.php:261 include/class_acc_ledger_fin.php:192 +#: include/class_acc_ledger_purchase.php:663 +#: include/class_acc_ledger_purchase.php:670 +#: include/class_acc_ledger_sold.php:819 include/class_acc_ledger_sold.php:826 msgid "Créer une nouvelle fiche" msgstr "Add a new card" @@ -1004,6 +1051,7 @@ msgstr "Account. Item" #: include/class_acc_ledger.php:1151 include/class_acc_ledger.php:1310 #: include/class_acc_ledger.php:1150 include/class_acc_ledger.php:1309 #: include/class_anticipation.php:304 include/class_anticipation.php:298 +#: html/annulation.php:414 msgid "Débit" msgstr "Debit" @@ -1014,7 +1062,8 @@ msgstr "Receipt" #: include/class_acc_ledger.php:1382 include/class_acc_ledger.php:1308 #: include/class_acc_ledger.php:1307 include/payment_middle.inc.php:87 -#: include/template/forecast-detail.php:10 +#: include/template/forecast-detail.php:10 include/payment_middle.inc.php:122 +#: include/template/new_mod_payment.php:7 msgid "Libellé" msgstr "Label" @@ -1059,7 +1108,7 @@ msgid "Balance incorrecte " msgstr "wrong balance" #: include/class_acc_ledger.php:2254 include/class_acc_ledger.php:2180 -#: include/class_acc_ledger.php:2187 +#: include/class_acc_ledger.php:2187 include/class_acc_ledger.php:2206 msgid "Afficher recherche" msgstr "Display search" @@ -1147,7 +1196,8 @@ msgstr "Caution, the receipt number already exists and has been changed" #: include/class_acc_ledger_purchase.php:1223 #: include/class_acc_ledger_sold.php:750 include/compta_ach.inc.php:308 #: include/compta_ach.inc.php:364 include/compta_ven.inc.php:321 -#: include/compta_ven.inc.php:380 +#: include/compta_ven.inc.php:380 include/class_acc_ledger_purchase.php:1278 +#: include/class_acc_ledger_sold.php:803 msgid "Mise à jour paiement" msgstr "Update payment" @@ -1196,6 +1246,8 @@ msgstr "Entry saved" #: include/class_acc_ledger_sold.php:1044 #: include/class_acc_ledger_purchase.php:874 #: include/class_acc_ledger_sold.php:1046 +#: include/class_acc_ledger_purchase.php:952 +#: include/class_acc_ledger_sold.php:1099 msgid "Ajout article" msgstr "Add item" @@ -1267,12 +1319,13 @@ msgid "Ajout d'une ligne" msgstr "Add a row" #: include/quick_writing.inc.php:110 include/fiche.inc.php:114 -#: include/quick_writing.inc.php:114 +#: include/quick_writing.inc.php:114 include/fiche.inc.php:112 msgid "Sauvez" msgstr "Save" #: include/quick_writing.inc.php:113 include/quick_writing.inc.php:117 #: include/class_anticipation.php:305 include/class_anticipation.php:299 +#: html/annulation.php:429 msgid "Crédit" msgstr "Credit" @@ -1304,6 +1357,8 @@ msgstr "" #: include/class_acc_ledger_sold.php:484 include/class_acc_ledger_sold.php:486 #: include/class_acc_ledger_purchase.php:932 #: include/class_acc_ledger_sold.php:488 +#: include/class_acc_ledger_purchase.php:1010 +#: include/class_acc_ledger_sold.php:541 msgid "Journal" msgstr "Ledger" @@ -1330,6 +1385,8 @@ msgstr "Card containing" #: html/ajax_poste.php:75 html/search_ca.php:48 html/search_ca.php:56 #: include/class_anc_balance_double.php:280 include/quick_writing.inc.php:177 #: include/user_menu.php:247 include/user_menu.php:467 +#: include/class_acc_payment.php:263 include/user_menu.php:257 +#: include/user_menu.php:477 msgid "Recherche" msgstr "Search" @@ -1338,14 +1395,17 @@ msgid "Vous devez choisir une catgorie" msgstr "You must use a category" #: include/class_fiche_def.php:409 include/class_fiche_def.php:413 +#: include/class_fiche_def.php:407 msgid "Label" msgstr "Label" #: include/class_fiche_def.php:418 include/class_fiche_def.php:422 +#: include/class_fiche_def.php:416 msgid "Poste Comptable de base" msgstr "Accounting item of base" #: include/class_fiche_def.php:424 include/class_fiche_def.php:428 +#: include/class_fiche_def.php:422 msgid "Chaque fiche aura automatiquement son propre poste comptable : " msgstr "Each card will automatically have his own accounting item" @@ -1378,33 +1438,34 @@ msgstr "Otherwise the programm may have misfunctions" #: include/fiche.inc.php:106 include/forecast.inc.php:239 #: include/forecast.inc.php:254 include/forecast.inc.php:274 -#: include/forecast.inc.php:312 +#: include/forecast.inc.php:312 include/fiche.inc.php:104 msgid "Sauver" msgstr "Save" -#: include/fiche.inc.php:113 +#: include/fiche.inc.php:113 include/fiche.inc.php:111 msgid "Ajoutez cet élément" msgstr "Add this item" -#: include/fiche.inc.php:115 +#: include/fiche.inc.php:115 include/fiche.inc.php:113 msgid "Effacer cette catégorie" msgstr "Remove this categorie" -#: include/fiche.inc.php:115 +#: include/fiche.inc.php:115 include/fiche.inc.php:113 msgid "Vous confirmez ?" msgstr "Do you confirm ?" -#: include/fiche.inc.php:118 +#: include/fiche.inc.php:118 include/fiche.inc.php:116 msgid "Enleve les éléments cochés" msgstr "Remove the checked items" -#: include/fiche.inc.php:121 +#: include/fiche.inc.php:121 include/fiche.inc.php:119 msgid "" "Attention : il n'y aura pas de demande de confirmation pour enlever les \n" "attributs sélectionnés. Il ne sera pas possible de revenir en arrière" msgstr "" #: include/fiche.inc.php:215 include/template/security_list_action.php:4 +#: include/fiche.inc.php:213 msgid "Pas d'accès" msgstr "No access" @@ -1485,7 +1546,7 @@ msgid "Fiches Crédit" msgstr "Card at the credit" #: include/class_fiche_def.php:190 include/class_fiche_def.php:191 -#: include/class_fiche_def.php:187 +#: include/class_fiche_def.php:187 include/class_fiche_def.php:184 msgid "Vous devez choisir une categorie" msgstr "You must select a category" @@ -1552,10 +1613,12 @@ msgid "Ajout Action" msgstr "Add action" #: include/class_fiche.php:305 include/class_fiche.php:345 +#: include/class_fiche.php:356 msgid "Rappel: Poste créé automatiquement à partir de " msgstr "Warning : accounting item create automatically from " #: include/class_fiche.php:312 include/class_fiche.php:352 +#: include/class_fiche.php:363 msgid "Rappel: Poste par défaut sera " msgstr "Warning : by default, the accounting item will be " @@ -1661,16 +1724,19 @@ msgstr "Responsible" #: include/template/detail-action.php:137 #: include/template/form_ledger_fin.php:21 #: include/template/detail-action.php:141 +#: include/template/detail-action.php:155 msgid "Commentaire" msgstr "Comment" #: include/template/detail-action.php:145 #: include/template/detail-action.php:149 +#: include/template/detail-action.php:167 msgid "Détail des articles" msgstr "Item details" #: include/template/detail-action.php:158 #: include/template/detail-action.php:162 +#: include/template/detail-action.php:180 msgid "prix unitaire" msgstr "Price unit" @@ -1691,11 +1757,16 @@ msgstr "Price unit" #: include/class_acc_ledger_purchase.php:955 #: include/class_acc_ledger_sold.php:505 #: include/template/detail-action.php:163 +#: include/template/detail-action.php:181 +#: include/class_acc_ledger_purchase.php:1029 +#: include/class_acc_ledger_purchase.php:1033 +#: include/class_acc_ledger_sold.php:558 msgid "quantité" msgstr "quantity" #: include/template/detail-action.php:160 #: include/template/detail-action.php:164 +#: include/template/detail-action.php:182 msgid "Code TVA" msgstr "VAT Code" @@ -1711,21 +1782,27 @@ msgstr "VAT Code" #: include/class_acc_ledger_purchase.php:952 #: include/class_acc_ledger_sold.php:508 #: include/template/detail-action.php:165 +#: include/template/detail-action.php:183 +#: include/class_acc_ledger_purchase.php:1030 +#: include/class_acc_ledger_sold.php:561 msgid "Montant TVA" msgstr "Amount VAT " #: include/template/detail-action.php:162 #: include/template/detail-action.php:166 +#: include/template/detail-action.php:184 msgid "Montant TVAC" msgstr "Amount VAT included" #: include/template/detail-action.php:188 #: include/template/detail-action.php:192 +#: include/template/detail-action.php:210 msgid "Montrer les détails" msgstr "Show details" #: include/template/detail-action.php:189 #: include/template/detail-action.php:193 +#: include/template/detail-action.php:211 msgid "Cacher les détails" msgstr "Hide details" @@ -1737,12 +1814,14 @@ msgstr "Hide details" #: include/template/form_ledger_detail.php:63 #: include/class_acc_ledger_purchase.php:865 include/compta_ach.inc.php:229 #: include/compta_ven.inc.php:239 include/template/detail-action.php:199 +#: include/template/detail-action.php:217 msgid "Actualiser" msgstr "Refresh" #: include/template/detail-action.php:228 #: include/template/detail-action.php:229 #: include/template/detail-action.php:233 +#: include/template/detail-action.php:251 #, php-format msgid "Voulez-vous effacer le document" msgstr "Would you remove this document" @@ -1750,6 +1829,7 @@ msgstr "Would you remove this document" #: include/template/detail-action.php:247 #: include/template/detail-action.php:248 #: include/template/detail-action.php:252 +#: include/template/detail-action.php:270 msgid "Je ne peux pas ajouter de fichier" msgstr "I can't add this file" @@ -1764,6 +1844,8 @@ msgstr "I can't add this file" #: include/class_acc_ledger_sold.php:481 include/class_acc_ledger_sold.php:483 #: include/class_acc_ledger_purchase.php:929 #: include/class_acc_ledger_sold.php:485 +#: include/class_acc_ledger_purchase.php:1007 +#: include/class_acc_ledger_sold.php:538 msgid "Echeance" msgstr "Limit date" @@ -1782,6 +1864,8 @@ msgstr "Receipt #" #: include/class_acc_ledger_sold.php:498 include/class_acc_ledger_sold.php:500 #: include/class_acc_ledger_purchase.php:946 #: include/class_acc_ledger_sold.php:502 +#: include/class_acc_ledger_purchase.php:1024 +#: include/class_acc_ledger_sold.php:555 msgid "Dénomination" msgstr "Name" @@ -1793,6 +1877,7 @@ msgstr "price/unit without vat" #: include/class_acc_ledger_sold.php:565 include/class_acc_ledger_sold.php:497 #: include/class_acc_ledger_sold.php:499 include/class_acc_ledger_sold.php:500 #: include/class_acc_ledger_sold.php:502 include/class_acc_ledger_sold.php:504 +#: include/class_acc_ledger_sold.php:557 msgid "tva" msgstr "vat" @@ -1808,6 +1893,7 @@ msgstr "tot. vat" #: include/template/form_ledger_detail.php:80 #: include/class_acc_ledger_purchase.php:1049 #: include/class_acc_ledger_purchase.php:1053 +#: include/class_acc_ledger_purchase.php:1131 msgid "Total HTVA" msgstr "Total VAT excluded" @@ -1818,6 +1904,7 @@ msgstr "Total VAT excluded" #: include/template/form_ledger_detail.php:81 #: include/class_acc_ledger_purchase.php:1056 #: include/class_acc_ledger_purchase.php:1060 +#: include/class_acc_ledger_purchase.php:1138 msgid "Total TVA" msgstr "Total VAT" @@ -1828,6 +1915,7 @@ msgstr "Total VAT" #: include/template/form_ledger_detail.php:82 #: include/class_acc_ledger_purchase.php:1059 #: include/class_acc_ledger_purchase.php:1063 +#: include/class_acc_ledger_purchase.php:1141 msgid "Total TVAC" msgstr "Total VAT included" @@ -1837,6 +1925,7 @@ msgstr "Total VAT included" #: include/template/form_ledger_detail.php:84 #: include/class_acc_ledger_purchase.php:952 #: include/class_acc_ledger_purchase.php:956 +#: include/class_acc_ledger_purchase.php:1034 msgid "Total" msgstr "Total" @@ -1909,6 +1998,7 @@ msgid "Comptabilité Analytique" msgstr "Cost Accounting" #: html/access.php:102 html/access.php:103 html/access.php:149 +#: html/access.php:151 msgid "Pense-Bête" msgstr "Todo List" @@ -1918,6 +2008,7 @@ msgstr "Todo List" #: include/class_acc_ledger_sold.php:477 include/class_acc_ledger_sold.php:789 #: include/class_acc_ledger_sold.php:479 include/class_acc_ledger_sold.php:791 #: include/class_acc_ledger_sold.php:481 include/class_acc_ledger_sold.php:793 +#: include/class_acc_ledger_sold.php:534 include/class_acc_ledger_sold.php:846 msgid "En-tête facture client" msgstr "Header invoice customer" @@ -1931,6 +2022,8 @@ msgstr "Header invoice customer" #: include/class_acc_ledger_sold.php:482 include/class_acc_ledger_sold.php:484 #: include/class_acc_ledger_purchase.php:930 #: include/class_acc_ledger_sold.php:486 +#: include/class_acc_ledger_purchase.php:1008 +#: include/class_acc_ledger_sold.php:539 msgid "Période Comptable" msgstr "Accounting Periode" @@ -1940,6 +2033,7 @@ msgstr "Accounting Periode" #: include/class_acc_ledger_sold.php:494 include/class_acc_ledger_sold.php:919 #: include/class_acc_ledger_sold.php:496 include/class_acc_ledger_sold.php:921 #: include/class_acc_ledger_sold.php:498 include/class_acc_ledger_sold.php:923 +#: include/class_acc_ledger_sold.php:551 include/class_acc_ledger_sold.php:976 msgid "Détail articles vendus" msgstr "Detail sold items" @@ -1947,7 +2041,7 @@ msgstr "Detail sold items" #: include/class_acc_ledger_sold.php:496 #: include/template/extension-detail.php:16 #: include/class_acc_ledger_sold.php:497 include/class_acc_ledger_sold.php:499 -#: include/class_acc_ledger_sold.php:501 +#: include/class_acc_ledger_sold.php:501 include/class_acc_ledger_sold.php:554 msgid "Code" msgstr "Code" @@ -1961,6 +2055,8 @@ msgstr "Code" #: include/class_acc_ledger_sold.php:499 include/class_acc_ledger_sold.php:501 #: include/class_acc_ledger_purchase.php:947 #: include/class_acc_ledger_sold.php:503 +#: include/class_acc_ledger_purchase.php:1025 +#: include/class_acc_ledger_sold.php:556 msgid "prix" msgstr "price" @@ -1974,12 +2070,15 @@ msgstr "price" #: include/class_acc_ledger_sold.php:505 include/class_acc_ledger_sold.php:507 #: include/class_acc_ledger_purchase.php:953 #: include/class_acc_ledger_sold.php:509 +#: include/class_acc_ledger_purchase.php:1031 +#: include/class_acc_ledger_sold.php:562 msgid "Montant HTVA" msgstr "Amount without VAT" #: include/class_acc_ledger_sold.php:627 include/class_acc_ledger_sold.php:559 #: include/class_acc_ledger_sold.php:561 include/class_acc_ledger_sold.php:562 #: include/class_acc_ledger_sold.php:564 include/class_acc_ledger_sold.php:566 +#: include/class_acc_ledger_sold.php:619 msgid "Attention Différence" msgstr "Warning difference" @@ -1993,6 +2092,8 @@ msgstr "Warning difference" #: include/class_acc_ledger_sold.php:589 include/class_acc_ledger_sold.php:591 #: include/class_acc_ledger_purchase.php:1046 #: include/class_acc_ledger_sold.php:593 +#: include/class_acc_ledger_purchase.php:1124 +#: include/class_acc_ledger_sold.php:646 msgid "verifie CA" msgstr "Check CA" @@ -2004,6 +2105,8 @@ msgstr "Check CA" #: include/class_acc_ledger_sold.php:818 include/class_acc_ledger_sold.php:820 #: include/class_acc_ledger_purchase.php:645 #: include/class_acc_ledger_sold.php:822 +#: include/class_acc_ledger_purchase.php:723 +#: include/class_acc_ledger_sold.php:875 msgid "Aucune période ouverte" msgstr "No periode opened" @@ -2015,6 +2118,8 @@ msgstr "No periode opened" #: include/class_acc_ledger_sold.php:823 include/class_acc_ledger_sold.php:825 #: include/class_acc_ledger_purchase.php:652 #: include/class_acc_ledger_sold.php:827 +#: include/class_acc_ledger_purchase.php:730 +#: include/class_acc_ledger_sold.php:880 msgid "Période comptable" msgstr "Accounting periode" @@ -2028,7 +2133,9 @@ msgstr "Accounting periode" #: include/class_acc_ledger_sold.php:833 include/class_acc_ledger_sold.php:835 #: include/class_acc_ledger_fin.php:732 #: include/class_acc_ledger_purchase.php:662 -#: include/class_acc_ledger_sold.php:837 +#: include/class_acc_ledger_sold.php:837 include/class_acc_ledger_fin.php:787 +#: include/class_acc_ledger_purchase.php:740 +#: include/class_acc_ledger_sold.php:890 msgid "Pas de journal disponible" msgstr "No available ledger" @@ -2055,6 +2162,8 @@ msgstr "Remove" #: include/class_acc_ledger_sold.php:1052 #: include/class_acc_ledger_sold.php:1054 #: include/class_acc_ledger_purchase.php:887 +#: include/class_acc_ledger_purchase.php:965 +#: include/class_acc_ledger_sold.php:1107 msgid "Payé par" msgstr "Paid by" @@ -2068,6 +2177,7 @@ msgid "Fiche contenant" msgstr "Card containing" #: include/class_ipopup.php:94 include/class_ipopup.php:96 +#: include/class_ipopup.php:100 #, php-format msgid "Fermer" msgstr "close" @@ -2082,7 +2192,7 @@ msgid "Vous n'avez pas donné de fournisseur" msgstr "You haven't give any supplier" #: include/class_acc_ledger_purchase.php:68 -#: include/class_acc_ledger_sold.php:68 +#: include/class_acc_ledger_sold.php:68 html/annulation.php:134 msgid "Date invalide" msgstr "Invalid date" @@ -2127,6 +2237,12 @@ msgstr "You cannot enter an accounting entry" #: include/class_acc_ledger_sold.php:106 include/class_acc_ledger_sold.php:118 #: include/class_acc_ledger_sold.php:129 include/class_acc_ledger_sold.php:131 #: include/class_acc_ledger_sold.php:137 include/class_acc_ledger_sold.php:147 +#: include/class_acc_ledger_purchase.php:127 +#: include/class_acc_ledger_purchase.php:143 +#: include/class_acc_ledger_purchase.php:145 +#: include/class_acc_ledger_purchase.php:172 +#: include/class_acc_ledger_sold.php:140 include/class_acc_ledger_sold.php:142 +#: include/class_acc_ledger_sold.php:148 include/class_acc_ledger_sold.php:167 msgid "La fiche " msgstr "The card" @@ -2136,6 +2252,8 @@ msgstr "The card" #: include/class_acc_ledger_purchase.php:105 #: include/class_acc_ledger_purchase.php:141 #: include/class_acc_ledger_sold.php:106 include/class_acc_ledger_sold.php:137 +#: include/class_acc_ledger_purchase.php:151 +#: include/class_acc_ledger_sold.php:148 msgid "n'a pas de poste comptable" msgstr "has no accounting entry" @@ -2145,6 +2263,9 @@ msgstr "has no accounting entry" #: include/class_acc_ledger_purchase.php:110 #: include/class_acc_ledger_purchase.php:145 #: include/class_acc_ledger_sold.php:111 include/class_acc_ledger_sold.php:141 +#: include/class_acc_ledger_purchase.php:120 +#: include/class_acc_ledger_purchase.php:166 +#: include/class_acc_ledger_sold.php:122 include/class_acc_ledger_sold.php:161 msgid "Pour la fiche " msgstr "For the card" @@ -2152,6 +2273,8 @@ msgstr "For the card" #: include/class_acc_ledger_sold.php:110 include/class_acc_ledger_sold.php:140 #: include/class_acc_ledger_purchase.php:110 #: include/class_acc_ledger_sold.php:111 include/class_acc_ledger_sold.php:141 +#: include/class_acc_ledger_purchase.php:120 +#: include/class_acc_ledger_sold.php:122 include/class_acc_ledger_sold.php:161 msgid " le poste comptable [" msgstr " The accounting item [" @@ -2161,6 +2284,9 @@ msgstr " The accounting item [" #: include/class_acc_ledger_purchase.php:110 #: include/class_acc_ledger_purchase.php:145 #: include/class_acc_ledger_sold.php:141 +#: include/class_acc_ledger_purchase.php:120 +#: include/class_acc_ledger_purchase.php:166 +#: include/class_acc_ledger_sold.php:161 msgid "n'existe pas" msgstr "does not exist" @@ -2170,21 +2296,27 @@ msgstr "does not exist" #: include/class_acc_ledger_purchase.php:117 #: include/class_acc_ledger_purchase.php:151 #: include/class_acc_ledger_sold.php:118 include/class_acc_ledger_sold.php:147 +#: include/class_acc_ledger_purchase.php:127 +#: include/class_acc_ledger_purchase.php:172 +#: include/class_acc_ledger_sold.php:129 include/class_acc_ledger_sold.php:167 msgid "n'est pas accessible à ce journal" msgstr "is not allowed for this ledger" #: include/class_acc_ledger_purchase.php:136 #: include/class_acc_ledger_purchase.php:133 +#: include/class_acc_ledger_purchase.php:143 msgid "a un montant invalide" msgstr "has an invalid amount" #: include/class_acc_ledger_purchase.php:138 #: include/class_acc_ledger_purchase.php:135 +#: include/class_acc_ledger_purchase.php:145 msgid "a une quantité invalide" msgstr "has an invalid quantity" #: include/class_acc_ledger_purchase.php:148 #: include/class_acc_ledger_purchase.php:145 +#: include/class_acc_ledger_purchase.php:166 msgid " le poste comptable" msgstr " the accounting item" @@ -2192,6 +2324,8 @@ msgstr " the accounting item" #: include/class_acc_ledger_sold.php:150 #: include/class_acc_ledger_purchase.php:155 #: include/class_acc_ledger_sold.php:151 +#: include/class_acc_ledger_purchase.php:176 +#: include/class_acc_ledger_sold.php:171 msgid "Il n'y a aucune marchandise" msgstr "There is no item" @@ -2208,6 +2342,8 @@ msgstr "All the purchase ledgers" #: include/class_acc_ledger_purchase.php:921 #: include/class_acc_ledger_purchase.php:612 #: include/class_acc_ledger_purchase.php:925 +#: include/class_acc_ledger_purchase.php:690 +#: include/class_acc_ledger_purchase.php:1003 msgid "En-tête facture fournisseur" msgstr "Header invoice supplier" @@ -2215,6 +2351,7 @@ msgstr "Header invoice supplier" #: include/class_acc_ledger_purchase.php:609 #: include/class_acc_ledger_purchase.php:606 #: include/class_acc_ledger_purchase.php:613 +#: include/class_acc_ledger_purchase.php:691 msgid "Détail articles acheté" msgstr "Details item" @@ -2222,6 +2359,7 @@ msgstr "Details item" #: include/class_acc_ledger_purchase.php:717 #: include/class_acc_ledger_purchase.php:714 #: include/class_acc_ledger_purchase.php:721 +#: include/class_acc_ledger_purchase.php:799 msgid "Fournisseur " msgstr "Supplier" @@ -2230,6 +2368,7 @@ msgstr "Supplier" #: include/class_acc_ledger_purchase.php:941 #: include/class_acc_ledger_purchase.php:938 #: include/class_acc_ledger_purchase.php:942 +#: include/class_acc_ledger_purchase.php:1020 msgid "Détail articles achetés" msgstr "Detail items" @@ -2238,6 +2377,7 @@ msgstr "Detail items" #: include/class_acc_ledger_purchase.php:1058 #: include/class_acc_ledger_purchase.php:1055 #: include/class_acc_ledger_purchase.php:1059 +#: include/class_acc_ledger_purchase.php:1137 msgid "TVA à " msgstr "VAT " @@ -2251,6 +2391,8 @@ msgstr "VAT " #: include/class_acc_ledger_sold.php:687 include/class_acc_ledger_sold.php:689 #: include/class_acc_ledger_purchase.php:1164 #: include/class_acc_ledger_sold.php:691 +#: include/class_acc_ledger_purchase.php:1219 +#: include/class_acc_ledger_sold.php:744 msgid "Ajoutez une pièce justificative " msgstr "Add a receipt" @@ -2272,6 +2414,8 @@ msgstr "or generate an expense report" #: include/class_acc_ledger_sold.php:735 include/class_acc_ledger_sold.php:737 #: include/class_acc_ledger_purchase.php:1212 #: include/class_acc_ledger_sold.php:739 +#: include/class_acc_ledger_purchase.php:1267 +#: include/class_acc_ledger_sold.php:792 msgid "Echeance dépassée" msgstr "Missed deadline" @@ -2285,6 +2429,8 @@ msgstr "Missed deadline" #: include/class_acc_ledger_sold.php:737 include/class_acc_ledger_sold.php:739 #: include/class_acc_ledger_purchase.php:1214 #: include/class_acc_ledger_sold.php:741 +#: include/class_acc_ledger_purchase.php:1269 +#: include/class_acc_ledger_sold.php:794 msgid "Non Payée" msgstr "Not paid" @@ -2302,20 +2448,24 @@ msgid " vous ne pouvez pas encoder à une date antérieure" msgstr " You can not enter an entry before the last operation" #: include/class_acc_ledger_sold.php:110 include/class_acc_ledger_sold.php:111 +#: include/class_acc_ledger_sold.php:122 msgid "] n'existe pas" msgstr "] doesn't exist" #: include/class_acc_ledger_sold.php:128 include/class_acc_ledger_sold.php:129 +#: include/class_acc_ledger_sold.php:140 msgid "a un montant invalide [" msgstr "has an invalid amount" #: include/class_acc_ledger_sold.php:130 include/class_acc_ledger_sold.php:131 +#: include/class_acc_ledger_sold.php:142 msgid "a une quantité invalide [" msgstr " has an invalid quantity" #: include/class_acc_ledger_sold.php:759 include/class_acc_ledger_sold.php:691 #: include/class_acc_ledger_sold.php:693 include/class_acc_ledger_sold.php:694 #: include/class_acc_ledger_sold.php:696 include/class_acc_ledger_sold.php:698 +#: include/class_acc_ledger_sold.php:751 msgid "ou générer une facture" msgstr "or generate an invoice" @@ -2324,6 +2474,8 @@ msgstr "or generate an invoice" #: include/class_acc_ledger_sold.php:707 #: include/class_acc_ledger_purchase.php:1182 #: include/class_acc_ledger_sold.php:709 +#: include/class_acc_ledger_purchase.php:1237 +#: include/class_acc_ledger_sold.php:762 msgid "Numero de bon de commande : " msgstr "Number of ordering" @@ -2332,12 +2484,15 @@ msgstr "Number of ordering" #: include/class_acc_ledger_sold.php:708 #: include/class_acc_ledger_purchase.php:1183 #: include/class_acc_ledger_sold.php:710 +#: include/class_acc_ledger_purchase.php:1238 +#: include/class_acc_ledger_sold.php:763 msgid "Autre information : " msgstr "Other info" #: include/class_acc_ledger_sold.php:861 include/class_acc_ledger_sold.php:793 #: include/class_acc_ledger_sold.php:795 include/class_acc_ledger_sold.php:796 #: include/class_acc_ledger_sold.php:798 include/class_acc_ledger_sold.php:800 +#: include/class_acc_ledger_sold.php:853 msgid "Echéance" msgstr "Date Limit" @@ -2390,7 +2545,7 @@ msgid "" " la cause la plus probable est deux fois le même nom de dossier" msgstr "" -#: include/fiche_def.inc.php:67 +#: include/fiche_def.inc.php:67 include/fiche_def.inc.php:68 msgid "" "sinon le programme fonctionnera mal, utiliser uniquement des chiffres pour " "la classe de base ou rien" @@ -2464,12 +2619,15 @@ msgstr "Except if you give another accounting item when you create the card" #: include/template/detail-action.php:213 #: include/class_acc_ledger_purchase.php:1160 #: include/template/detail-action.php:217 +#: include/template/detail-action.php:235 +#: include/class_acc_ledger_purchase.php:1215 msgid "Document à générer" msgstr "Document to generate" #: include/template/detail-action.php:220 #: include/template/detail-action.php:221 #: include/template/detail-action.php:225 +#: include/template/detail-action.php:243 msgid "Pièces attachées" msgstr "Attachment" @@ -2477,7 +2635,7 @@ msgstr "Attachment" msgid "Aucune periode trouvée" msgstr "No period found" -#: html/ajax_card.php:131 +#: html/ajax_card.php:131 html/ajax_card.php:125 msgid "Aucune catégorie de fiche ne correspondant à votre demande" msgstr "" @@ -2510,7 +2668,7 @@ msgstr "You are disconnected" msgid "Retour au tableau de bord" msgstr "return to the dashboard" -#: html/extension.php:78 html/extension.php:76 +#: html/extension.php:78 html/extension.php:76 html/extension.php:80 msgid "Aucune extension disponible" msgstr "No available plugin" @@ -2518,11 +2676,12 @@ msgstr "No available plugin" #: include/template/security_list_action.php:110 #: include/template/security_list_action.php:92 include/user_menu.php:337 #: include/user_menu.php:450 html/extension.php:84 include/user_menu.php:329 -#: include/user_menu.php:442 +#: include/user_menu.php:442 html/extension.php:88 include/user_menu.php:339 +#: include/user_menu.php:452 msgid "Extension" msgstr "Plugin" -#: html/extension.php:86 html/extension.php:84 +#: html/extension.php:86 html/extension.php:84 html/extension.php:88 msgid "Choix de l'extension" msgstr "Choice of the plugin" @@ -2531,7 +2690,8 @@ msgid "" "Vous ne pouvez pas utiliser cette extension. Contactez votre responsable" msgstr "You cannot use this plugin, contact your administrator" -#: html/extension.php:107 include/ext_inc.php:18 +#: html/extension.php:107 include/ext_inc.php:18 html/ajax.php:33 +#: include/ext_inc.php:20 msgid "Cette extension n'existe pas " msgstr "This plugin do not exist" @@ -2679,7 +2839,7 @@ msgid "Liste opérations" msgstr "Operation list" #: include/class_action.php:372 include/class_action.php:376 -#: include/class_action.php:386 +#: include/class_action.php:386 include/class_action.php:387 msgid "Génére le document" msgstr "Generate the document" @@ -2755,7 +2915,7 @@ msgstr "Saterday" msgid "Dimanche" msgstr "Sunday" -#: include/class_fiche.php:304 +#: include/class_fiche.php:304 include/class_fiche.php:315 msgid "Cette categorie de card n'existe pas" msgstr "This category do not exist" @@ -2765,11 +2925,12 @@ msgstr "the name cannot be empty" #: include/extension.inc.php:52 include/template/extension-detail.php:4 #: include/extension.inc.php:51 include/extension.inc.php:50 +#: include/extension.inc.php:45 msgid "Détail extension" msgstr "Plugin detail" #: include/extension.inc.php:60 include/extension.inc.php:59 -#: include/extension.inc.php:58 +#: include/extension.inc.php:58 include/extension.inc.php:53 msgid "Nouvelle extension" msgstr "New plugin" @@ -2793,19 +2954,21 @@ msgstr "Modify items" msgid "Vous confirmez l\\' effacement ?" msgstr "Do you confirm the removal ?" -#: include/payment_middle.inc.php:58 +#: include/payment_middle.inc.php:58 include/payment_middle.inc.php:60 +#: include/payment_middle.inc.php:95 msgid "Retour sans sauvez" msgstr "Return without saving" -#: include/payment_middle.inc.php:87 +#: include/payment_middle.inc.php:87 include/payment_middle.inc.php:122 +#: include/template/new_mod_payment.php:16 msgid "Type de fiche" msgstr "Type of card" -#: include/payment_middle.inc.php:88 +#: include/payment_middle.inc.php:88 include/payment_middle.inc.php:123 msgid "enregistré dans le journal" msgstr "recorded in the ledger" -#: include/payment_middle.inc.php:89 +#: include/payment_middle.inc.php:89 include/payment_middle.inc.php:124 msgid " Avec la fiche" msgstr " With the card" @@ -2837,7 +3000,7 @@ msgstr "description" msgid "chemin et nom de fichier" msgstr "Path and name of the file" -#: include/template/extension.php:18 +#: include/template/extension.php:18 include/template/extension-detail.php:39 msgid "Activé" msgstr "Activated" @@ -2924,6 +3087,7 @@ msgid "Vous n'avez pas donné de banque" msgstr "You didn't give any bank" #: include/class_acc_ledger_fin.php:734 include/class_acc_ledger_fin.php:735 +#: include/class_acc_ledger_fin.php:790 msgid "Tous les journaux financiers" msgstr "All the financial ledgers" @@ -2961,11 +3125,14 @@ msgstr "Modify the account base, attributes...." #: include/class_acc_ledger_sold.php:355 #: include/class_acc_ledger_purchase.php:478 #: include/class_acc_ledger_sold.php:357 +#: include/class_acc_ledger_purchase.php:546 +#: include/class_acc_ledger_sold.php:400 msgid "Document généré" msgstr "Generated document" #: include/class_acc_ledger_purchase.php:475 #: include/class_acc_ledger_purchase.php:479 +#: include/class_acc_ledger_purchase.php:547 msgid "Note de frais" msgstr "Note of free" @@ -3011,9 +3178,56 @@ msgid "les actions fermées aussi:" msgstr "The closed items" #: include/class_acc_ledger_purchase.php:1171 +#: include/class_acc_ledger_purchase.php:1226 msgid "ou générer un document" msgstr "or generate a document" #: include/compta_ach.inc.php:59 msgid "Fournisseurs" msgstr "Suppliers" + +#: html/annulation.php:143 +msgid "Période ou date incorrecte" +msgstr "" + +#: html/annulation.php:149 +msgid "Cette période est fermée" +msgstr "" + +#: include/class_acc_payment.php:342 +msgid "Achat" +msgstr "" + +#: include/payment_middle.inc.php:47 +msgid "Vous confirmez" +msgstr "" + +#: include/payment_middle.inc.php:59 +msgid "Efface" +msgstr "" + +#: include/payment_middle.inc.php:93 +msgid "Enregistre" +msgstr "" + +#: include/template/fiche_def_input.php:12 +msgid "" +"Création automatique du poste comptable uniquement s'il n\\y a qu'un seul " +"poste" +msgstr "" + +#: include/template/new_mod_payment.php:2 +msgid "Nouveau moyen de paiement" +msgstr "" + +#: include/template/new_mod_payment.php:25 +msgid "Pour le type de journal" +msgstr "" + +#: include/template/new_mod_payment.php:34 +msgid "Paiement enregistré dans " +msgstr "" + +#: include/template/new_mod_payment.php:43 +msgid "Avec la fiche" +msgstr "" diff --git a/html/lang/nl_NL/LC_MESSAGES/messages.po b/html/lang/nl_NL/LC_MESSAGES/messages.po index f506d3b96..316528b4c 100644 --- a/html/lang/nl_NL/LC_MESSAGES/messages.po +++ b/html/lang/nl_NL/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-11-10 15:17+0100\n" +"POT-Creation-Date: 2010-02-08 22:29+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,30 +16,2384 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: test.php:228 +#: test.php:228 html/test.php:195 msgid "Bienvenu sur mon site" msgstr "Welkom op my website" -#: test.php:229 +#: test.php:229 html/test.php:196 msgid "Essayer de vous y amuser" msgstr "Probeer het" -#: test.php:233 +#: test.php:233 html/test.php:200 msgid "Choississez votre langue" msgstr "kies uw taal" -#: test.php:234 +#: test.php:234 html/test.php:201 include/pref.inc.php:201 msgid "Français" msgstr "Frans" -#: test.php:235 +#: test.php:235 html/test.php:202 include/pref.inc.php:202 msgid "Anglais" msgstr "Engels" -#: test.php:236 +#: test.php:236 html/test.php:203 include/pref.inc.php:203 msgid "Néerlandais" msgstr "Nederlands" -#: test.php:245 +#: test.php:245 html/test.php:212 msgid "Change de langue" msgstr "Verander het taal" + +#: html/access.php:75 +msgid "Votre base de données n'est pas à jour" +msgstr "" + +#: html/access.php:76 +msgid "cliquez ici pour appliquer le patch" +msgstr "" + +#: html/access.php:102 +msgid "Aucune periode par defaut" +msgstr "" + +#: html/access.php:125 +msgid "Aucun rapport défini" +msgstr "" + +#: html/access.php:126 +msgid "Cliquez ici pour mettre à jour vos préférences" +msgstr "" + +#: html/access.php:151 +msgid "Pense-Bête" +msgstr "" + +#: html/access.php:158 include/class_acc_ledger.php:497 +#: include/class_acc_ledger.php:1141 include/class_acc_ledger.php:1263 +#: include/class_acc_ledger_purchase.php:1006 +#: include/class_acc_ledger_sold.php:537 include/class_anc_listing.php:73 +#: include/template/detail-action.php:15 +#: include/template/form_ledger_detail.php:13 +#: include/template/form_ledger_fin.php:3 +msgid "Date" +msgstr "" + +#: html/access.php:159 include/template/detail-action.php:150 +msgid "Titre" +msgstr "" + +#: html/access.php:160 include/class_acc_ledger.php:498 +#: include/class_acc_ledger.php:1142 include/class_acc_ledger.php:1266 +#: include/class_acc_ledger_purchase.php:1013 +#: include/class_acc_ledger_sold.php:544 include/class_anc_account.php:266 +#: include/class_anc_listing.php:75 include/class_anc_plan.php:125 +#: include/dossier.inc.php:235 include/dossier.inc.php:264 +#: include/template/detail-action.php:133 +#: include/template/detail-action.php:179 +#: include/template/form_ledger_detail.php:17 +msgid "Description" +msgstr "" + +#: html/access.php:164 html/ajax_card.php:271 html/ajax_extension.php:111 +#: html/ajax_extension.php:168 html/parametre.php:289 +#: include/compta_fin.inc.php:165 include/payment_middle.inc.php:58 +#: include/report.inc.php:123 include/report.inc.php:138 +msgid "Sauve" +msgstr "" + +#: html/access.php:165 include/detail_adm.inc.php:68 +#: include/detail_client.inc.php:68 include/detail_supplier.inc.php:68 +#: include/fiche.inc.php:290 include/fiche.inc.php:378 +msgid "Annuler" +msgstr "" + +#: html/access.php:169 include/payment_middle.inc.php:164 +msgid "Ajout" +msgstr "" + +#: html/ajax_card.php:107 html/ajax_card.php:158 html/ajax_card.php:278 +#: html/ajax_card.php:309 +msgid "Action interdite" +msgstr "" + +#: html/ajax_card.php:125 +msgid "Aucune catégorie de fiche ne correspondant à votre demande" +msgstr "" + +#: html/ajax_card.php:171 +msgid "Fiche contenant" +msgstr "" + +#: html/ajax_card.php:173 html/ajax_poste.php:75 html/search_ca.php:48 +#: html/search_ca.php:56 include/class_acc_payment.php:263 +#: include/class_anc_balance_double.php:280 include/quick_writing.inc.php:177 +#: include/user_menu.php:257 include/user_menu.php:477 +msgid "Recherche" +msgstr "" + +#: html/ajax_card.php:237 +msgid " de clients" +msgstr "" + +#: html/ajax_card.php:241 +msgid " de fournisseurs" +msgstr "" + +#: html/ajax_card.php:245 +msgid " d'administration" +msgstr "" + +#: html/ajax_card.php:251 include/adm.inc.php:45 include/adm.inc.php:129 +#: include/client.inc.php:44 include/client.inc.php:128 +#: include/supplier.inc.php:44 include/supplier.inc.php:128 +msgid "Ajout d'une catégorie" +msgstr "" + +#: html/ajax_card.php:261 include/class_acc_report.php:142 +msgid "Recherche poste" +msgstr "" + +#: html/ajax_card.php:296 +msgid "Catégorie existe déjà" +msgstr "" + +#: html/ajax_card.php:298 +msgid "Catégorie sauvée" +msgstr "" + +#: html/ajax_card.php:301 +msgid "Le nom et la classe base ne peuvent être vide" +msgstr "" + +#: html/ajax_extension.php:81 html/ajax_extension.php:138 +#: html/parametre.php:242 +msgid "Oui" +msgstr "" + +#: html/ajax_extension.php:82 html/ajax_extension.php:139 +#: html/parametre.php:241 +msgid "Non" +msgstr "" + +#: html/ajax_extension.php:96 html/ajax_extension.php:153 +#: include/template/extension-sec.php:9 +#: include/template/security_list_action.php:5 +msgid "Accès" +msgstr "" + +#: html/ajax_extension.php:97 html/ajax_extension.php:154 +msgid "Interdit" +msgstr "" + +#: html/ajax.php:33 include/ext_inc.php:20 +msgid "Cette extension n'existe pas " +msgstr "" + +#: html/annulation.php:134 include/class_acc_ledger_purchase.php:68 +#: include/class_acc_ledger_sold.php:68 +msgid "Date invalide" +msgstr "" + +#: html/annulation.php:143 +msgid "Période ou date incorrecte" +msgstr "" + +#: html/annulation.php:149 +msgid "Cette période est fermée" +msgstr "" + +#: html/annulation.php:414 include/class_acc_ledger.php:1150 +#: include/class_acc_ledger.php:1309 include/class_anticipation.php:298 +#: include/quick_writing.inc.php:116 +msgid "Débit" +msgstr "" + +#: html/annulation.php:429 include/class_anticipation.php:299 +#: include/quick_writing.inc.php:117 +msgid "Crédit" +msgstr "" + +#: html/commercial.php:65 +msgid "Vous devez choisir un dossier " +msgstr "" + +#: html/commercial.php:113 include/class_acc_ledger_sold.php:547 +#: include/class_acc_ledger_sold.php:1088 +msgid "Client" +msgstr "" + +#: html/commercial.php:114 include/class_acc_ledger_purchase.php:943 +#: include/class_acc_ledger_purchase.php:1016 +msgid "Fournisseur" +msgstr "" + +#: html/commercial.php:115 +msgid "Administration" +msgstr "" + +#: html/commercial.php:116 include/compta_ach.inc.php:60 +#: include/compta_fin.inc.php:58 include/compta_ven.inc.php:59 +#: include/user_menu.php:194 include/template/security_list_action.php:73 +msgid "Impression" +msgstr "" + +#: html/commercial.php:117 include/template/security_list_action.php:81 +msgid "Stock" +msgstr "" + +#: html/commercial.php:118 include/action.common.inc.php:265 +#: include/adm_card.inc.php:70 include/client_card.inc.php:70 +#: include/impress.inc.php:34 include/supplier_card.inc.php:70 +#: include/user_menu.php:195 include/template/detail-action.php:178 +#: include/template/security_list_action.php:59 +msgid "Fiche" +msgstr "" + +#: html/commercial.php:119 +msgid "Prevision" +msgstr "" + +#: html/commercial.php:120 include/adm_card.inc.php:71 +#: include/client_card.inc.php:71 include/supplier_card.inc.php:71 +msgid "Suivi" +msgstr "" + +#: html/compta.php:34 +msgid " Vous êtes déconnecté" +msgstr "" + +#: html/extension.php:64 +msgid "Retour au tableau de bord" +msgstr "" + +#: html/extension.php:80 +msgid "Aucune extension disponible" +msgstr "" + +#: html/extension.php:88 include/user_menu.php:339 include/user_menu.php:452 +#: include/template/security_list_action.php:92 +msgid "Extension" +msgstr "" + +#: html/extension.php:88 +msgid "Choix de l'extension" +msgstr "" + +#: html/import.php:103 +msgid "Choississez la période à transfèrer" +msgstr "" + +#: html/parametre.php:135 +msgid "Moyen de paiement" +msgstr "" + +#: html/parametre.php:136 +msgid "Tva" +msgstr "" + +#: html/parametre.php:136 +msgid "Taux et poste comptable tva" +msgstr "" + +#: html/parametre.php:137 include/template/forecast-detail.php:8 +msgid "Poste Comptable" +msgstr "" + +#: html/parametre.php:137 +msgid "Poste comptable constant" +msgstr "" + +#: html/parametre.php:138 +msgid "Catégorie de fiche" +msgstr "" + +#: html/parametre.php:138 +msgid "Modifie les classe de base, les attribut,..." +msgstr "" + +#: html/parametre.php:236 +msgid "obligatoire" +msgstr "" + +#: html/parametre.php:237 +msgid "optionnel" +msgstr "" + +#: html/parametre.php:238 +msgid "non utilisé" +msgstr "" + +#: html/parametre.php:271 +msgid "Nom société" +msgstr "" + +#: html/parametre.php:272 +msgid "Téléphone" +msgstr "" + +#: html/parametre.php:273 +msgid "Fax" +msgstr "" + +#: html/parametre.php:274 +msgid "Rue " +msgstr "" + +#: html/parametre.php:275 +msgid "Numéro" +msgstr "" + +#: html/parametre.php:276 +msgid "Code Postal" +msgstr "" + +#: html/parametre.php:277 +msgid "Commune" +msgstr "" + +#: html/parametre.php:278 +msgid "Pays" +msgstr "" + +#: html/parametre.php:279 +msgid "Numéro de Tva" +msgstr "" + +#: html/parametre.php:281 +msgid "Utilisation de la compta. analytique" +msgstr "" + +#: html/parametre.php:283 +msgid "Utilisation du mode strict " +msgstr "" + +#: html/parametre.php:285 +msgid "Assujetti à la tva" +msgstr "" + +#: html/parametre.php:286 +msgid "Suggérer le numéro de pièce justificative" +msgstr "" + +#: html/parametre.php:287 +msgid "Afficher la période comptable pour éviter les erreurs de date" +msgstr "" + +#: html/recherche.php:45 html/user_advanced.php:57 include/action.inc.php:38 +#: include/adm.inc.php:50 include/client.inc.php:49 +#: include/compta_ach.inc.php:45 include/compta_fin.inc.php:47 +#: include/compta_ven.inc.php:45 include/forecast.inc.php:229 +#: include/forecast.inc.php:302 include/import_inc.php:48 +#: include/impress_poste.inc.php:51 include/quick_writing.inc.php:54 +#: include/report.inc.php:53 include/supplier.inc.php:49 +#: include/user_action_gl.php:44 +msgid "Recherche de fiche" +msgstr "" + +#: html/test.php:220 +msgid "Fin de programme" +msgstr "" + +#: html/user_login.php:46 +msgid "Vous utilisez un navigateur dépassé depuis près de 8 ans!" +msgstr "" + +#: html/user_login.php:47 +msgid "" +"Pour une meilleure expérience web, prenez le temps de mettre votre " +"navigateur à jour" +msgstr "" + +#: html/user_login.php:80 +msgid "Préférence" +msgstr "" + +#: html/user_login.php:81 include/user_menu.php:447 +msgid "Deconnexion" +msgstr "" + +#: html/user_login.php:85 +msgid "Bienvenue" +msgstr "" + +#: html/user_login.php:85 +msgid "dans PhpCompta" +msgstr "" + +#: html/user_login.php:86 +msgid "Choississez votre dossier" +msgstr "" + +#: html/user_login.php:91 include/class_acc_ledger_fin.php:819 +#: include/class_acc_ledger.php:2195 include/fiche.inc.php:72 +msgid "Rechercher" +msgstr "" + +#: html/user_login.php:100 +msgid "Donnez une partie du nom du dossier à rechercher" +msgstr "" + +#: include/ac_common.php:272 +msgid "Cette action ne vous est pas autorisée Contactez votre responsable" +msgstr "" + +#: include/ac_common.php:278 +msgid " Cette action ne vous est pas autorisée Contactez votre responsable" +msgstr "" + +#: include/action.common.inc.php:90 +msgid "Action sauvée" +msgstr "" + +#: include/action.common.inc.php:121 include/action.common.inc.php:204 +#: include/compta_ach.inc.php:230 include/compta_ven.inc.php:240 +msgid "Enregistrer" +msgstr "" + +#: include/action.common.inc.php:122 +msgid "Génère le document" +msgstr "" + +#: include/action.common.inc.php:150 +msgid "Ajoute une action à celle-ci" +msgstr "" + +#: include/action.common.inc.php:151 +msgid "Efface cette action" +msgstr "" + +#: include/action.common.inc.php:151 +msgid "Vous confirmez l'effacement" +msgstr "" + +#: include/action.common.inc.php:170 +msgid "Action " +msgstr "" + +#: include/action.common.inc.php:170 +msgid " effacée" +msgstr "" + +#: include/action.common.inc.php:235 +msgid "Recherche avancée" +msgstr "" + +#: include/action.common.inc.php:266 +#, php-format +msgid "Titre ou référence" +msgstr "" + +#: include/action.common.inc.php:273 +msgid "Tous les types" +msgstr "" + +#: include/action.common.inc.php:282 +msgid "les actions fermées aussi:" +msgstr "" + +#: include/action.common.inc.php:285 +msgid "affecté à d'autre:" +msgstr "" + +#: include/action.common.inc.php:287 +msgid "recherche" +msgstr "" + +#: include/action.common.inc.php:300 +msgid "Ajout Action" +msgstr "" + +#: include/action.common.inc.php:304 include/action.common.inc.php:318 +msgid "Afficher Recherche" +msgstr "" + +#: include/action.common.inc.php:304 include/action.common.inc.php:318 +msgid "Cache Recherche" +msgstr "" + +#: include/action.inc.php:44 include/dossier.inc.php:242 +#: include/dossier.inc.php:268 include/dossier.inc.php:286 +#: include/pref.inc.php:225 +msgid "Retour" +msgstr "" + +#: include/adm_card.inc.php:70 include/client_card.inc.php:70 +#: include/supplier_card.inc.php:70 +msgid "Détail de la fiche" +msgstr "" + +#: include/adm_card.inc.php:71 +msgid "Suivi adm, devis, bon de commande, courrier" +msgstr "" + +#: include/adm_card.inc.php:72 include/client_card.inc.php:72 +#: include/supplier_card.inc.php:72 include/template/detail-action.php:51 +msgid "Contact" +msgstr "" + +#: include/adm_card.inc.php:72 +msgid "Liste de contacts de cette administration" +msgstr "" + +#: include/adm_card.inc.php:73 include/client_card.inc.php:73 +#: include/supplier_card.inc.php:73 include/template/form_ledger_fin.php:17 +msgid "Opérations" +msgstr "" + +#: include/adm_card.inc.php:73 include/client_card.inc.php:73 +#: include/supplier_card.inc.php:73 +msgid "Toutes les opérations" +msgstr "" + +#: include/adm_card.inc.php:74 include/client_card.inc.php:74 +#: include/supplier_card.inc.php:74 +msgid "Retour liste" +msgstr "" + +#: include/adm_card.inc.php:74 +msgid "Retour à la liste des administration" +msgstr "" + +#: include/adm_card.inc.php:116 include/client_card.inc.php:116 +#: include/supplier_card.inc.php:116 +msgid "Vous devez aller dans fiche et créer une catégorie pour les contacts" +msgstr "" + +#: include/adm_card.inc.php:122 include/adm.inc.php:118 +#: include/class_acc_ledger_fin.php:192 include/class_acc_ledger.php:1240 +#: include/class_acc_ledger_purchase.php:663 +#: include/class_acc_ledger_purchase.php:670 +#: include/class_acc_ledger_sold.php:819 include/class_acc_ledger_sold.php:826 +#: include/class_action.php:261 include/client_card.inc.php:122 +#: include/client.inc.php:117 include/supplier_card.inc.php:122 +#: include/supplier.inc.php:117 +msgid "Créer une nouvelle fiche" +msgstr "" + +#: include/anc_imp.inc.php:36 +msgid "Listing" +msgstr "" + +#: include/anc_imp.inc.php:36 +msgid "Listing des opérations" +msgstr "" + +#: include/anc_imp.inc.php:37 +msgid "Balance simple" +msgstr "" + +#: include/anc_imp.inc.php:37 +msgid "Balance simple d'un plan analytique" +msgstr "" + +#: include/anc_imp.inc.php:38 +msgid "Balance croisée" +msgstr "" + +#: include/anc_imp.inc.php:38 +msgid "Balance croisée de 2 plans analytiques" +msgstr "" + +#: include/anc_od.inc.php:39 +msgid "Aucun plan analytique défini" +msgstr "" + +#: include/anc_od.inc.php:52 include/class_anticipation.php:187 +msgid "Nouveau" +msgstr "" + +#: include/anc_od.inc.php:55 +msgid "Liste opérations" +msgstr "" + +#: include/anc_od.inc.php:114 include/compta_ach.inc.php:160 +#: include/compta_ven.inc.php:169 +msgid "Opération sauvée" +msgstr "" + +#: include/class_acc_ledger_fin.php:54 +#: include/class_acc_ledger_purchase.php:60 +#: include/class_acc_ledger_sold.php:60 +msgid "Double Encodage" +msgstr "" + +#: include/class_acc_ledger_fin.php:58 +msgid "Vous n'avez pas donné de banque" +msgstr "" + +#: include/class_acc_ledger_fin.php:72 +#: include/class_acc_ledger_purchase.php:80 +#: include/class_acc_ledger_sold.php:80 +msgid "Date et periode ne correspondent pas" +msgstr "" + +#: include/class_acc_ledger_fin.php:78 +#: include/class_acc_ledger_purchase.php:85 +#: include/class_acc_ledger_sold.php:89 +msgid "Periode fermee" +msgstr "" + +#: include/class_acc_ledger_fin.php:86 +#: include/class_acc_ledger_purchase.php:94 +msgid "Vous utilisez le mode strict la dernière operation est à la date du " +msgstr "" + +#: include/class_acc_ledger_fin.php:87 include/class_acc_ledger_sold.php:98 +msgid " vous ne pouvez pas encoder à une date antérieure" +msgstr "" + +#: include/class_acc_ledger_fin.php:787 +#: include/class_acc_ledger_purchase.php:740 +#: include/class_acc_ledger_sold.php:890 +msgid "Pas de journal disponible" +msgstr "" + +#: include/class_acc_ledger_fin.php:790 +msgid "Tous les journaux financiers" +msgstr "" + +#: include/class_acc_ledger.php:499 include/class_acc_ledger.php:1149 +#: include/class_acc_ledger.php:1308 include/class_anc_account.php:260 +#: include/class_anc_listing.php:76 include/template/forecast-detail.php:11 +#: include/template/form_ledger_fin.php:22 +msgid "Montant" +msgstr "" + +#: include/class_acc_ledger.php:500 +msgid "PJ" +msgstr "" + +#: include/class_acc_ledger.php:501 +msgid "Ech" +msgstr "" + +#: include/class_acc_ledger.php:594 +msgid "Aucun enregistrement trouvé" +msgstr "" + +#: include/class_acc_ledger.php:612 +msgid "Payé" +msgstr "" + +#: include/class_acc_ledger.php:614 +msgid "Op. Concernée" +msgstr "" + +#: include/class_acc_ledger.php:616 +msgid "Action" +msgstr "" + +#: include/class_acc_ledger.php:617 include/user_menu.php:342 +msgid "Document" +msgstr "" + +#: include/class_acc_ledger.php:744 include/compta_fin.inc.php:166 +#: include/dossier.inc.php:183 include/dossier.inc.php:285 +#: include/forecast.inc.php:333 +msgid "Effacer" +msgstr "" + +#: include/class_acc_ledger.php:999 +msgid "Parametres journaux non trouves" +msgstr "" + +#: include/class_acc_ledger.php:1143 +msgid "PJ Num" +msgstr "" + +#: include/class_acc_ledger.php:1147 +msgid "Quick Code ou" +msgstr "" + +#: include/class_acc_ledger.php:1148 include/class_acc_ledger.php:1306 +#: include/impress.inc.php:33 +msgid "Poste" +msgstr "" + +#: include/class_acc_ledger.php:1286 +msgid "Pièce" +msgstr "" + +#: include/class_acc_ledger.php:1307 include/payment_middle.inc.php:122 +#: include/template/forecast-detail.php:10 +#: include/template/new_mod_payment.php:7 +msgid "Libellé" +msgstr "" + +#: include/class_acc_ledger.php:1451 +msgid "Pas dans la periode active" +msgstr "" + +#: include/class_acc_ledger.php:1470 +msgid "Vous utilisez le mode strict la dernière operation est la date du " +msgstr "" + +#: include/class_acc_ledger.php:1471 +msgid "vous ne pouvez pas encoder à une date antérieure" +msgstr "" + +#: include/class_acc_ledger.php:1503 +msgid "Le poste" +msgstr "" + +#: include/class_acc_ledger.php:1503 +msgid "n'est pas dans ce journal" +msgstr "" + +#: include/class_acc_ledger.php:1505 +msgid "Poste invalide" +msgstr "" + +#: include/class_acc_ledger.php:1507 +msgid "Poste Inexistant" +msgstr "" + +#: include/class_acc_ledger.php:1515 +msgid "Balance incorrecte " +msgstr "" + +#: include/class_acc_ledger.php:2206 +msgid "Afficher recherche" +msgstr "" + +#: include/class_acc_ledger_purchase.php:64 +msgid "Vous n'avez pas donné de fournisseur" +msgstr "" + +#: include/class_acc_ledger_purchase.php:95 +msgid " vous ne pouvez pas encoder à une date antérieure dans ce journal" +msgstr "" + +#: include/class_acc_ledger_purchase.php:105 +#: include/class_acc_ledger_purchase.php:127 +#: include/class_acc_ledger_purchase.php:143 +#: include/class_acc_ledger_purchase.php:145 +#: include/class_acc_ledger_purchase.php:151 +#: include/class_acc_ledger_purchase.php:172 +#: include/class_acc_ledger_sold.php:106 include/class_acc_ledger_sold.php:129 +#: include/class_acc_ledger_sold.php:140 include/class_acc_ledger_sold.php:142 +#: include/class_acc_ledger_sold.php:148 include/class_acc_ledger_sold.php:167 +msgid "La fiche " +msgstr "" + +#: include/class_acc_ledger_purchase.php:105 +#: include/class_acc_ledger_purchase.php:151 +#: include/class_acc_ledger_sold.php:106 include/class_acc_ledger_sold.php:148 +msgid "n'a pas de poste comptable" +msgstr "" + +#: include/class_acc_ledger_purchase.php:120 +#: include/class_acc_ledger_purchase.php:166 +#: include/class_acc_ledger_sold.php:122 include/class_acc_ledger_sold.php:161 +msgid "Pour la fiche " +msgstr "" + +#: include/class_acc_ledger_purchase.php:120 +#: include/class_acc_ledger_sold.php:122 include/class_acc_ledger_sold.php:161 +msgid " le poste comptable [" +msgstr "" + +#: include/class_acc_ledger_purchase.php:120 +#: include/class_acc_ledger_purchase.php:166 +#: include/class_acc_ledger_sold.php:161 +msgid "n'existe pas" +msgstr "" + +#: include/class_acc_ledger_purchase.php:127 +#: include/class_acc_ledger_purchase.php:172 +#: include/class_acc_ledger_sold.php:129 include/class_acc_ledger_sold.php:167 +msgid "n'est pas accessible à ce journal" +msgstr "" + +#: include/class_acc_ledger_purchase.php:143 +msgid "a un montant invalide" +msgstr "" + +#: include/class_acc_ledger_purchase.php:145 +msgid "a une quantité invalide" +msgstr "" + +#: include/class_acc_ledger_purchase.php:166 +msgid " le poste comptable" +msgstr "" + +#: include/class_acc_ledger_purchase.php:176 +#: include/class_acc_ledger_sold.php:171 +msgid "Il n'y a aucune marchandise" +msgstr "" + +#: include/class_acc_ledger_purchase.php:546 +#: include/class_acc_ledger_sold.php:400 +msgid "Document généré" +msgstr "" + +#: include/class_acc_ledger_purchase.php:547 +msgid "Note de frais" +msgstr "" + +#: include/class_acc_ledger_purchase.php:690 +#: include/class_acc_ledger_purchase.php:1003 +msgid "En-tête facture fournisseur" +msgstr "" + +#: include/class_acc_ledger_purchase.php:691 +msgid "Détail articles acheté" +msgstr "" + +#: include/class_acc_ledger_purchase.php:723 +#: include/class_acc_ledger_sold.php:875 +msgid "Aucune période ouverte" +msgstr "" + +#: include/class_acc_ledger_purchase.php:730 +#: include/class_acc_ledger_sold.php:880 +msgid "Période comptable" +msgstr "" + +#: include/class_acc_ledger_purchase.php:799 +msgid "Fournisseur " +msgstr "" + +#: include/class_acc_ledger_purchase.php:952 +#: include/class_acc_ledger_sold.php:1099 include/compta_fin.inc.php:164 +msgid "Ajout article" +msgstr "" + +#: include/class_acc_ledger_purchase.php:965 +#: include/class_acc_ledger_sold.php:1107 +msgid "Payé par" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1007 +#: include/class_acc_ledger_sold.php:538 +#: include/template/form_ledger_detail.php:13 +msgid "Echeance" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1008 +#: include/class_acc_ledger_sold.php:539 +msgid "Période Comptable" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1010 +#: include/class_acc_ledger_sold.php:541 include/import_inc.php:139 +#: include/import_inc.php:402 include/quick_writing.inc.php:154 +#: include/template/form_ledger_detail.php:15 +msgid "Journal" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1020 +msgid "Détail articles achetés" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1024 +#: include/class_acc_ledger_sold.php:555 +#: include/template/form_ledger_detail.php:27 +msgid "Dénomination" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1025 +#: include/class_acc_ledger_sold.php:556 +msgid "prix" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1029 +#: include/class_acc_ledger_purchase.php:1033 +#: include/class_acc_ledger_sold.php:558 +#: include/template/detail-action.php:181 +#: include/template/form_ledger_detail.php:29 +msgid "quantité" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1030 +#: include/class_acc_ledger_sold.php:561 +#: include/template/detail-action.php:183 +msgid "Montant TVA" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1031 +#: include/class_acc_ledger_sold.php:562 +msgid "Montant HTVA" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1034 +#: include/template/form_ledger_detail.php:84 +msgid "Total" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1036 +#: include/class_acc_ledger_sold.php:564 include/user_menu.php:451 +msgid "Compt. Analytique" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1124 +#: include/class_acc_ledger_sold.php:646 +msgid "verifie CA" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1131 +#: include/template/form_ledger_detail.php:30 +#: include/template/form_ledger_detail.php:80 +msgid "Total HTVA" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1137 +msgid "TVA à " +msgstr "" + +#: include/class_acc_ledger_purchase.php:1138 +#: include/template/form_ledger_detail.php:81 +msgid "Total TVA" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1141 +#: include/template/form_ledger_detail.php:82 +msgid "Total TVAC" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1215 +#: include/template/detail-action.php:235 +msgid "Document à générer" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1219 +#: include/class_acc_ledger_sold.php:744 +msgid "Ajoutez une pièce justificative " +msgstr "" + +#: include/class_acc_ledger_purchase.php:1226 +msgid "ou générer un document" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1237 +#: include/class_acc_ledger_sold.php:762 +msgid "Numero de bon de commande : " +msgstr "" + +#: include/class_acc_ledger_purchase.php:1238 +#: include/class_acc_ledger_sold.php:763 +msgid "Autre information : " +msgstr "" + +#: include/class_acc_ledger_purchase.php:1267 +#: include/class_acc_ledger_sold.php:792 +msgid "Echeance dépassée" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1269 +#: include/class_acc_ledger_sold.php:794 +msgid "Non Payée" +msgstr "" + +#: include/class_acc_ledger_purchase.php:1278 +#: include/class_acc_ledger_sold.php:803 include/compta_ach.inc.php:308 +#: include/compta_ach.inc.php:364 include/compta_ven.inc.php:321 +#: include/compta_ven.inc.php:380 +msgid "Mise à jour paiement" +msgstr "" + +#: include/class_acc_ledger_sold.php:64 +msgid "Vous n'avez pas donné de client" +msgstr "" + +#: include/class_acc_ledger_sold.php:97 +msgid "Vous utilisez le mode strict la dernière operation est date du " +msgstr "" + +#: include/class_acc_ledger_sold.php:122 +msgid "] n'existe pas" +msgstr "" + +#: include/class_acc_ledger_sold.php:140 +msgid "a un montant invalide [" +msgstr "" + +#: include/class_acc_ledger_sold.php:142 +msgid "a une quantité invalide [" +msgstr "" + +#: include/class_acc_ledger_sold.php:534 include/class_acc_ledger_sold.php:846 +msgid "En-tête facture client" +msgstr "" + +#: include/class_acc_ledger_sold.php:551 include/class_acc_ledger_sold.php:976 +msgid "Détail articles vendus" +msgstr "" + +#: include/class_acc_ledger_sold.php:554 +#: include/template/extension-detail.php:16 +msgid "Code" +msgstr "" + +#: include/class_acc_ledger_sold.php:557 +#: include/template/form_ledger_detail.php:32 +msgid "tva" +msgstr "" + +#: include/class_acc_ledger_sold.php:619 +msgid "Attention Différence" +msgstr "" + +#: include/class_acc_ledger_sold.php:751 +msgid "ou générer une facture" +msgstr "" + +#: include/class_acc_ledger_sold.php:853 +msgid "Echéance" +msgstr "" + +#: include/class_acc_payment.php:342 +msgid "Achat" +msgstr "" + +#: include/class_acc_payment.php:343 include/user_menu.php:189 +msgid "Vente" +msgstr "" + +#: include/class_action.php:387 +msgid "Génére le document" +msgstr "" + +#: include/class_anc_account.php:255 include/class_anc_listing.php:74 +#: include/class_anc_plan.php:124 include/dossier.inc.php:259 +#: include/template/extension-detail.php:8 +#: include/template/extension-sec.php:8 include/template/forecast_cat.php:9 +msgid "Nom" +msgstr "" + +#: include/class_anc_account.php:271 +msgid "Plan Analytique" +msgstr "" + +#: include/class_anc_account.php:276 +msgid "Groupe" +msgstr "" + +#: include/class_anc_balance_double.php:288 +msgid "" +"Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche" +msgstr "" + +#: include/class_anc_group_operation.php:71 +msgid "Operation non equilibrée" +msgstr "" + +#: include/class_anc_listing.php:70 +msgid "aucune donnée" +msgstr "" + +#: include/class_anc_listing.php:77 +msgid "D/C" +msgstr "" + +#: include/class_anc_print.php:89 +msgid "Aucun plan défini" +msgstr "" + +#: include/class_anc_print.php:114 +msgid "Les dates sont en format DD.MM.YYYY" +msgstr "" + +#: include/class_anc_print.php:136 +msgid "Selectionnez le plan qui vous intéresse avant de cliquer sur Recherche" +msgstr "" + +#: include/class_anticipation.php:155 +msgid "Modification" +msgstr "" + +#: include/class_anticipation.php:192 +msgid "Ventes" +msgstr "" + +#: include/class_anticipation.php:192 include/user_menu.php:190 +msgid "Dépense" +msgstr "" + +#: include/class_anticipation.php:192 include/user_menu.php:231 +#: include/template/form_ledger_fin.php:6 +msgid "Banque" +msgstr "" + +#: include/class_anticipation.php:234 +msgid "Elements" +msgstr "" + +#: include/class_calendar.php:87 +msgid "Dimanche" +msgstr "" + +#: include/class_calendar.php:87 +msgid "Lundi" +msgstr "" + +#: include/class_calendar.php:87 +msgid "Mardi" +msgstr "" + +#: include/class_calendar.php:87 +msgid "Mercredi" +msgstr "" + +#: include/class_calendar.php:87 +msgid "Jeudi" +msgstr "" + +#: include/class_calendar.php:87 +msgid "Vendredi" +msgstr "" + +#: include/class_calendar.php:87 +msgid "Samedi" +msgstr "" + +#: include/class_document.php:258 +msgid "Ne peut pas sauver " +msgstr "" + +#: include/class_fiche_def.php:184 +msgid "Vous devez choisir une categorie" +msgstr "" + +#: include/class_fiche_def.php:407 +msgid "Label" +msgstr "" + +#: include/class_fiche_def.php:416 +msgid "Poste Comptable de base" +msgstr "" + +#: include/class_fiche_def.php:422 +msgid "Chaque fiche aura automatiquement son propre poste comptable : " +msgstr "" + +#: include/class_fiche.php:315 +msgid "Cette categorie de card n'existe pas" +msgstr "" + +#: include/class_fiche.php:356 +msgid "Rappel: Poste créé automatiquement à partir de " +msgstr "" + +#: include/class_fiche.php:363 +msgid "Rappel: Poste par défaut sera " +msgstr "" + +#: include/class_forecast.php:62 +msgid "Le nom ne peut pas être vide" +msgstr "" + +#: include/class_iperiod.php:106 +msgid "Aucune periode trouvée" +msgstr "" + +#: include/class_ipopup.php:100 +#, php-format +msgid "Fermer" +msgstr "" + +#: include/class_user.php:45 +msgid "Session expirée
Utilisateur déconnecté" +msgstr "" + +#: include/class_user.php:156 +msgid "Utilisateur ou mot de passe incorrect" +msgstr "" + +#: include/class_user.php:339 +msgid "Aucune période trouvéee !!!" +msgstr "" + +#: include/class_user.php:668 +msgid "Dossier non accessible" +msgstr "" + +#: include/client_card.inc.php:71 +msgid "Suivi client, devis, bon de commande, courrier" +msgstr "" + +#: include/client_card.inc.php:72 +msgid "Liste de contacts de ce client" +msgstr "" + +#: include/client_card.inc.php:74 +msgid "Retour à la liste des clients" +msgstr "" + +#: include/compta_ach.inc.php:56 include/compta_ach.inc.php:173 +msgid "Nouvelle dépense" +msgstr "" + +#: include/compta_ach.inc.php:56 +msgid "Nouvel achat ou dépense" +msgstr "" + +#: include/compta_ach.inc.php:57 +msgid "Liste achat" +msgstr "" + +#: include/compta_ach.inc.php:57 +msgid "Liste des achats" +msgstr "" + +#: include/compta_ach.inc.php:58 +msgid "Liste dépenses non payées" +msgstr "" + +#: include/compta_ach.inc.php:58 include/compta_ven.inc.php:57 +msgid "Liste des ventes non payées" +msgstr "" + +#: include/compta_ach.inc.php:59 +msgid "Fournisseurs" +msgstr "" + +#: include/compta_ach.inc.php:124 include/compta_ven.inc.php:127 +msgid "Enregistrement" +msgstr "" + +#: include/compta_ach.inc.php:125 include/compta_fin.inc.php:118 +#: include/compta_ven.inc.php:128 +msgid "Corriger" +msgstr "" + +#: include/compta_ach.inc.php:164 include/compta_ven.inc.php:173 +#: include/quick_writing.inc.php:276 +msgid "Attention numéro pièce existante, elle a du être adaptée" +msgstr "" + +#: include/compta_ach.inc.php:229 include/compta_ven.inc.php:239 +#: include/template/detail-action.php:217 +#: include/template/form_ledger_detail.php:63 +msgid "Actualiser" +msgstr "" + +#: include/compta_ach.inc.php:231 include/compta_ven.inc.php:241 +msgid "Effacer " +msgstr "" + +#: include/compta_fin.inc.php:55 include/compta_fin.inc.php:140 +msgid "Nouvel extrait" +msgstr "" + +#: include/compta_fin.inc.php:55 +msgid "Encodage d'un nouvel extrait" +msgstr "" + +#: include/compta_fin.inc.php:56 +msgid "Liste" +msgstr "" + +#: include/compta_fin.inc.php:56 +msgid "Liste opération bancaire" +msgstr "" + +#: include/compta_fin.inc.php:57 +msgid "Solde" +msgstr "" + +#: include/compta_fin.inc.php:57 +msgid "Solde des comptes" +msgstr "" + +#: include/compta_fin.inc.php:117 +msgid "Confirmer" +msgstr "" + +#: include/compta_fin.inc.php:139 +msgid "Opération sauvée" +msgstr "" + +#: include/compta_ven.inc.php:55 include/compta_ven.inc.php:183 +msgid "Nouvelle vente" +msgstr "" + +#: include/compta_ven.inc.php:56 +msgid "Liste ventes" +msgstr "" + +#: include/compta_ven.inc.php:56 +msgid "Liste des ventes" +msgstr "" + +#: include/compta_ven.inc.php:57 +msgid "Liste vente non payées" +msgstr "" + +#: include/compta_ven.inc.php:58 +msgid "Clients" +msgstr "" + +#: include/compta_ven.inc.php:124 +msgid "Sauvez cette opération comme modèle ?" +msgstr "" + +#: include/detail_adm.inc.php:67 include/detail_client.inc.php:67 +#: include/detail_supplier.inc.php:67 +msgid "Sauver les modifications" +msgstr "" + +#: include/detail_client.inc.php:50 include/detail_supplier.inc.php:50 +msgid "Information sauvée" +msgstr "" + +#: include/detail_client.inc.php:69 include/detail_supplier.inc.php:69 +msgid "Effacer cette fiche" +msgstr "" + +#: include/dossier.inc.php:47 +msgid "Le nom du dossier est vide" +msgstr "" + +#: include/dossier.inc.php:53 +msgid "Désolé vous devez migrer ce modèle en unicode" +msgstr "" + +#: include/dossier.inc.php:55 +msgid "le modele " +msgstr "" + +#: include/dossier.inc.php:55 +msgid " doit être migré en unicode." +msgstr "" + +#: include/dossier.inc.php:56 +msgid "" +"Pour le passer en unicode, faites-en un backup puis restaurez le fichier reçu" +msgstr "" + +#: include/dossier.inc.php:69 +msgid "" +"Desole la creation de ce dossier a echoue,\n" +" la cause la plus probable est deux fois le même nom de dossier" +msgstr "" + +#: include/dossier.inc.php:87 +msgid " est une année invalide" +msgstr "" + +#: include/dossier.inc.php:104 +msgid " Base de donnée " +msgstr "" + +#: include/dossier.inc.php:105 include/dossier.inc.php:310 +msgid "est accèdée, déconnectez-vous d'abord" +msgstr "" + +#: include/dossier.inc.php:153 +msgid "Rafraîchir" +msgstr "" + +#: include/dossier.inc.php:154 +msgid "Ajouter" +msgstr "" + +#: include/dossier.inc.php:185 +msgid "Modifier" +msgstr "" + +#: include/dossier.inc.php:188 +msgid "Backup" +msgstr "" + +#: include/dossier.inc.php:215 +msgid "pas de modèle disponible" +msgstr "" + +#: include/dossier.inc.php:233 +msgid "Nom du dossier" +msgstr "" + +#: include/dossier.inc.php:237 +msgid "Modèle" +msgstr "" + +#: include/dossier.inc.php:240 +msgid "Creation Dossier" +msgstr "" + +#: include/dossier.inc.php:267 include/payment_middle.inc.php:128 +msgid "Modifie" +msgstr "" + +#: include/dossier.inc.php:280 +msgid "Etes vous sûr et certain de vouloir effacer " +msgstr "" + +#: include/dossier.inc.php:283 +msgid "Cochez la case si vous êtes sûr de vouloir effacer ce dossier" +msgstr "" + +#: include/dossier.inc.php:293 +msgid "Désolé, vous n'avez pas coché la case" +msgstr "" + +#: include/dossier.inc.php:300 +msgid "inexistant" +msgstr "" + +#: include/dossier.inc.php:309 +msgid "Base de donnée " +msgstr "" + +#: include/extension.inc.php:45 include/template/extension-detail.php:4 +msgid "Détail extension" +msgstr "" + +#: include/extension.inc.php:53 +msgid "Nouvelle extension" +msgstr "" + +#: include/ext_inc.php:11 +msgid "" +"Vous ne pouvez pas utiliser cette extension. Contactez votre responsable" +msgstr "" + +#: include/fiche_def.inc.php:64 +msgid "Voulez-vous modifier ?" +msgstr "" + +#: include/fiche_def.inc.php:66 +msgid "Attention, ne changer pas la signification de ce poste." +msgstr "" + +#: include/fiche_def.inc.php:67 +msgid "par exemple ne pas changer Client par fournisseur" +msgstr "" + +#: include/fiche_def.inc.php:68 +msgid "" +"sinon le programme fonctionnera mal, utiliser uniquement des chiffres pour " +"la classe de base ou rien" +msgstr "" + +#: include/fiche.inc.php:104 include/forecast.inc.php:239 +#: include/forecast.inc.php:254 include/forecast.inc.php:274 +#: include/forecast.inc.php:312 +msgid "Sauver" +msgstr "" + +#: include/fiche.inc.php:111 +msgid "Ajoutez cet élément" +msgstr "" + +#: include/fiche.inc.php:112 include/quick_writing.inc.php:114 +msgid "Sauvez" +msgstr "" + +#: include/fiche.inc.php:113 +msgid "Effacer cette catégorie" +msgstr "" + +#: include/fiche.inc.php:113 +msgid "Vous confirmez ?" +msgstr "" + +#: include/fiche.inc.php:116 +msgid "Enleve les éléments cochés" +msgstr "" + +#: include/fiche.inc.php:119 +msgid "" +"Attention : il n'y aura pas de demande de confirmation pour enlever les \n" +"attributs sélectionnés. Il ne sera pas possible de revenir en arrière" +msgstr "" + +#: include/fiche.inc.php:213 include/template/security_list_action.php:4 +msgid "Pas d'accès" +msgstr "" + +#: include/forecast.inc.php:197 +msgid "Ajout prévision" +msgstr "" + +#: include/forecast.inc.php:197 +msgid "Ajout d'une prévision" +msgstr "" + +#: include/forecast.inc.php:330 +msgid "Modifier nom ou catégories" +msgstr "" + +#: include/forecast.inc.php:331 +msgid "Modifier éléments" +msgstr "" + +#: include/forecast.inc.php:333 +msgid "Vous confirmez l\\' effacement" +msgstr "" + +#: include/import_inc.php:79 +msgid "Importation terminée" +msgstr "" + +#: include/import_inc.php:115 +msgid "op. concernée" +msgstr "" + +#: include/import_inc.php:139 +msgid "poste comptable Destination" +msgstr "" + +#: include/import_inc.php:167 +msgid "Enlever" +msgstr "" + +#: include/import_inc.php:183 +msgid " opérations à complèter" +msgstr "" + +#: include/import_inc.php:212 include/import_inc.php:271 +msgid "Vous devez selectionner votre période dans vos préférences" +msgstr "" + +#: include/import_inc.php:227 +msgid "opérations à transfèrer" +msgstr "" + +#: include/import_inc.php:245 +msgid "Commencer le transfert" +msgstr "" + +#: include/import_inc.php:323 +msgid "Poste comptable erronné pour l'opération " +msgstr "" + +#: include/import_inc.php:373 +msgid "Tranfert de l'opération " +msgstr "" + +#: include/import_inc.php:373 +msgid " effectué" +msgstr "" + +#: include/import_inc.php:412 +msgid "Import fiche" +msgstr "" + +#: include/impress.inc.php:32 include/user_menu.php:343 +msgid "Journaux" +msgstr "" + +#: include/impress.inc.php:35 include/user_menu.php:230 +msgid "Rapport" +msgstr "" + +#: include/impress.inc.php:36 +msgid "Balance des comptes" +msgstr "" + +#: include/impress.inc.php:37 +msgid "Bilan" +msgstr "" + +#: include/impress.inc.php:38 +msgid "Liste Clients Assujettis" +msgstr "" + +#: include/impress_poste.inc.php:114 +msgid "Depuis" +msgstr "" + +#: include/impress_poste.inc.php:115 +msgid "Jusque " +msgstr "" + +#: include/param_jrn_add.inc.php:61 include/param_jrn_detail.inc.php:77 +msgid "Un paramètre manque" +msgstr "" + +#: include/param_jrn_add.inc.php:67 +msgid "Un journal de ce nom existe déjà" +msgstr "" + +#: include/param_jrn_detail.inc.php:57 +msgid "Journal inexistant" +msgstr "" + +#: include/param_jrn_detail.inc.php:68 +msgid "" +"Impossible d\\'effacer ce journal.\n" +" Il est utilisé\n" +msgstr "" + +#: include/payment_middle.inc.php:47 +msgid "Vous confirmez" +msgstr "" + +#: include/payment_middle.inc.php:59 +msgid "Efface" +msgstr "" + +#: include/payment_middle.inc.php:60 include/payment_middle.inc.php:95 +msgid "Retour sans sauvez" +msgstr "" + +#: include/payment_middle.inc.php:93 +msgid "Enregistre" +msgstr "" + +#: include/payment_middle.inc.php:122 include/template/new_mod_payment.php:16 +msgid "Type de fiche" +msgstr "" + +#: include/payment_middle.inc.php:123 +msgid "enregistré dans le journal" +msgstr "" + +#: include/payment_middle.inc.php:124 +msgid " Avec la fiche" +msgstr "" + +#: include/pref.inc.php:52 +msgid "Mot de passe est modifiée" +msgstr "" + +#: include/pref.inc.php:61 +msgid "Changez vos préférences" +msgstr "" + +#: include/pref.inc.php:69 +msgid "Options Générales" +msgstr "" + +#: include/pref.inc.php:100 +msgid "Thème" +msgstr "" + +#: include/pref.inc.php:134 +msgid "" +"Attention cette période est fermée, vous ne pourrez rien modifier dans le " +"module comptable" +msgstr "" + +#: include/pref.inc.php:149 include/template/forecast_result.php:21 +msgid "Période" +msgstr "" + +#: include/pref.inc.php:160 +msgid "Taille des pages" +msgstr "" + +#: include/pref.inc.php:169 include/pref.inc.php:171 +msgid "Illimité" +msgstr "" + +#: include/pref.inc.php:184 +msgid "Options pour la page d'accueil" +msgstr "" + +#: include/pref.inc.php:185 +msgid "Mini-Rapport : " +msgstr "" + +#: include/pref.inc.php:188 +msgid "Aucun mini rapport" +msgstr "" + +#: include/pref.inc.php:194 +msgid "Le mini rapport est un rapport qui s'affiche sur votre page d'accueil" +msgstr "" + +#: include/pref.inc.php:199 +msgid "Langue" +msgstr "" + +#: include/pref.inc.php:200 +msgid "Selectionnez votre langue" +msgstr "" + +#: include/pref.inc.php:217 +msgid "Valider" +msgstr "" + +#: include/quick_writing.inc.php:66 +msgid "Encoder une Operation" +msgstr "" + +#: include/quick_writing.inc.php:67 +msgid "Encoder une operation dans ce journal" +msgstr "" + +#: include/quick_writing.inc.php:68 +msgid "Voir Operation" +msgstr "" + +#: include/quick_writing.inc.php:69 +msgid "Voir les operations de ce journal" +msgstr "" + +#: include/quick_writing.inc.php:71 +msgid "Autre journal" +msgstr "" + +#: include/quick_writing.inc.php:72 +msgid "Choisir un autre journal" +msgstr "" + +#: include/quick_writing.inc.php:97 +msgid "Utilisez une operation " +msgstr "" + +#: include/quick_writing.inc.php:99 +msgid "Utilisez une operation" +msgstr "" + +#: include/quick_writing.inc.php:112 +msgid "Ajout d'une ligne" +msgstr "" + +#: include/quick_writing.inc.php:118 +msgid "Difference" +msgstr "" + +#: include/quick_writing.inc.php:144 +msgid "Choix du journal" +msgstr "" + +#: include/quick_writing.inc.php:150 +msgid "" +"L'acces a ce journal est interdit, \n" +" contactez votre responsable" +msgstr "" + +#: include/quick_writing.inc.php:205 +msgid "Vous ne pouvez pas accèder à ce journal, contactez votre responsable" +msgstr "" + +#: include/quick_writing.inc.php:215 +msgid "Désolé mais cette periode est fermee pour ce journal" +msgstr "" + +#: include/quick_writing.inc.php:279 +msgid "Autre opération dans ce journal" +msgstr "" + +#: include/report.inc.php:117 +msgid "Définition" +msgstr "" + +#: include/report.inc.php:125 include/report.inc.php:140 +#: include/report.inc.php:162 +msgid "Les lignes vides seront effacées" +msgstr "" + +#: include/report.inc.php:136 +msgid "Importer ce rapport" +msgstr "" + +#: include/report.inc.php:153 +msgid "Mise a jour" +msgstr "" + +#: include/report.inc.php:154 +msgid "Effacement" +msgstr "" + +#: include/supplier_card.inc.php:71 +msgid "Suivi Fournisseur, devis, bon de commande, courrier" +msgstr "" + +#: include/supplier_card.inc.php:72 +msgid "Liste de contacts de ce fournisseur" +msgstr "" + +#: include/supplier_card.inc.php:74 +msgid "Retour à la liste des fournisseurs" +msgstr "" + +#: include/user.inc.php:81 +msgid "Ajout d'utilisateur" +msgstr "" + +#: include/user_menu.php:188 +msgid "Grand Livre" +msgstr "" + +#: include/user_menu.php:188 +msgid "Grand livre : toutes les opérations" +msgstr "" + +#: include/user_menu.php:189 +msgid "Journal de vente / produit" +msgstr "" + +#: include/user_menu.php:190 +msgid "Journaux de dépense, d'achat" +msgstr "" + +#: include/user_menu.php:191 +msgid "Financier" +msgstr "" + +#: include/user_menu.php:191 +msgid "Journaux financiers: les banques, la caisse" +msgstr "" + +#: include/user_menu.php:192 +msgid "Ecriture directe" +msgstr "" + +#: include/user_menu.php:192 +msgid "Ecriture directe dans les journaux" +msgstr "" + +#: include/user_menu.php:195 +msgid "Ajouter, modifier ou effacer des fiches" +msgstr "" + +#: include/user_menu.php:196 +msgid "Avancé" +msgstr "" + +#: include/user_menu.php:196 +msgid "Opérations délicates" +msgstr "" + +#: include/user_menu.php:225 +msgid "Ecritures definies" +msgstr "" + +#: include/user_menu.php:226 +msgid "Periode" +msgstr "" + +#: include/user_menu.php:226 +msgid "Gestion des periodes" +msgstr "" + +#: include/user_menu.php:227 +msgid "Centralise" +msgstr "" + +#: include/user_menu.php:227 +msgid "Centralisation" +msgstr "" + +#: include/user_menu.php:229 +msgid "Gestion des stocks" +msgstr "" + +#: include/user_menu.php:231 +msgid "Import Banque" +msgstr "" + +#: include/user_menu.php:232 +msgid "Ecriture ouverture" +msgstr "" + +#: include/user_menu.php:233 +msgid "Vérification" +msgstr "" + +#: include/user_menu.php:256 include/user_menu.php:362 +msgid "Création" +msgstr "" + +#: include/user_menu.php:307 +msgid "Utilisateurs" +msgstr "" + +#: include/user_menu.php:307 +msgid "Gestion des utilisateurs" +msgstr "" + +#: include/user_menu.php:308 +msgid "Dossiers" +msgstr "" + +#: include/user_menu.php:308 +msgid "Gestion des dossiers" +msgstr "" + +#: include/user_menu.php:309 +msgid "Modèles" +msgstr "" + +#: include/user_menu.php:309 +msgid "Gestion des modèles" +msgstr "" + +#: include/user_menu.php:310 +msgid "Restaure" +msgstr "" + +#: include/user_menu.php:310 +msgid "Restaure une base de données" +msgstr "" + +#: include/user_menu.php:311 +msgid "Accueil" +msgstr "" + +#: include/user_menu.php:312 +msgid "Sortie" +msgstr "" + +#: include/user_menu.php:336 +msgid "Sociétés" +msgstr "" + +#: include/user_menu.php:336 +msgid "Parametre societe" +msgstr "" + +#: include/user_menu.php:337 +msgid "Divers" +msgstr "" + +#: include/user_menu.php:337 +msgid "Devise, moyen de paiement" +msgstr "" + +#: include/user_menu.php:338 +msgid "Plan Comptable" +msgstr "" + +#: include/user_menu.php:338 +msgid "Modification du plan comptable" +msgstr "" + +#: include/user_menu.php:340 include/template/extension-sec.php:3 +msgid "Sécurité" +msgstr "" + +#: include/user_menu.php:340 +msgid "securite" +msgstr "" + +#: include/user_menu.php:341 +msgid "Ecritures définies" +msgstr "" + +#: include/user_menu.php:342 +msgid "Facture, lettre de rappel, proposition..." +msgstr "" + +#: include/user_menu.php:343 +msgid "Creation et modification de journaux" +msgstr "" + +#: include/user_menu.php:394 +msgid " Immobilisé" +msgstr "" + +#: include/user_menu.php:395 +msgid "Actif a un an au plus" +msgstr "" + +#: include/user_menu.php:396 +msgid "Stock et commande" +msgstr "" + +#: include/user_menu.php:397 +msgid "Compte tiers" +msgstr "" + +#: include/user_menu.php:398 +msgid "Actif" +msgstr "" + +#: include/user_menu.php:399 +msgid "Charges" +msgstr "" + +#: include/user_menu.php:400 +msgid "Produits" +msgstr "" + +#: include/user_menu.php:401 include/user_menu.php:402 +msgid "Hors Comptabilité" +msgstr "" + +#: include/user_menu.php:416 +msgid "Importer CSV" +msgstr "" + +#: include/user_menu.php:417 +msgid "Verif CSV" +msgstr "" + +#: include/user_menu.php:418 +msgid "Transfert CSV" +msgstr "" + +#: include/user_menu.php:443 +msgid "Tableau de bord" +msgstr "" + +#: include/user_menu.php:444 +msgid "Preference" +msgstr "" + +#: include/user_menu.php:445 include/template/security_list_action.php:51 +msgid "Paramètre" +msgstr "" + +#: include/user_menu.php:446 +msgid "Autre Dossier" +msgstr "" + +#: include/user_menu.php:449 +msgid "Compta Générale" +msgstr "" + +#: include/user_menu.php:450 include/template/security_list_action.php:98 +msgid "Gestion" +msgstr "" + +#: include/template/account_result.php:2 include/template/card_result.php:2 +msgid "Résultats" +msgstr "" + +#: include/template/account_result.php:21 +msgid "Nombre d'enregistrements" +msgstr "" + +#: include/template/account_search.php:1 +msgid "Partie du poste comptable ou du libellé" +msgstr "" + +#: include/template/category_of_card.php:3 +msgid "Nom de la catégorie de fiche" +msgstr "" + +#: include/template/category_of_card.php:7 +#: include/template/fiche_def_input.php:7 +msgid "Classe de base" +msgstr "" + +#: include/template/category_of_card.php:14 +msgid "Création automatique du poste comptable" +msgstr "" + +#: include/template/category_of_card.php:18 +msgid "" +"Si vous utilisez la création automatique de poste, chaque nouvelle fiche de " +"cette catégorie aura son propre poste comptable. Ce poste comptable sera la " +"classe de base augmenté de 1." +msgstr "" + +#: include/template/category_of_card.php:21 +msgid "" +"Si vous n'utilisez pas la création automatique, toutes les nouvelles fiches " +"auront par défaut le même poste comptable. Ce poste comptable par défaut est " +"la classe de base." +msgstr "" + +#: include/template/category_of_card.php:24 +msgid " A moins qu'en créant la fiche, vous forcez un autre poste comptable" +msgstr "" + +#: include/template/dashboard.php:3 include/template/detail-action.php:90 +msgid "Calendrier" +msgstr "" + +#: include/template/dashboard.php:10 +msgid "Dernières opérations" +msgstr "" + +#: include/template/dashboard.php:40 +msgid "Dernières actions" +msgstr "" + +#: include/template/detail-action.php:3 +msgid "Informations générales" +msgstr "" + +#: include/template/detail-action.php:24 +msgid "Heure" +msgstr "" + +#: include/template/detail-action.php:33 +msgid "Reference" +msgstr "" + +#: include/template/detail-action.php:42 +msgid "Destinataire" +msgstr "" + +#: include/template/detail-action.php:71 +msgid "Concerne" +msgstr "" + +#: include/template/detail-action.php:80 +msgid "Type" +msgstr "" + +#: include/template/detail-action.php:99 +msgid "Etat" +msgstr "" + +#: include/template/detail-action.php:109 +msgid "Priorité" +msgstr "" + +#: include/template/detail-action.php:119 +msgid "Affecté" +msgstr "" + +#: include/template/detail-action.php:155 +#: include/template/form_ledger_fin.php:21 +msgid "Commentaire" +msgstr "" + +#: include/template/detail-action.php:167 +msgid "Détail des articles" +msgstr "" + +#: include/template/detail-action.php:180 +msgid "prix unitaire" +msgstr "" + +#: include/template/detail-action.php:182 +msgid "Code TVA" +msgstr "" + +#: include/template/detail-action.php:184 +msgid "Montant TVAC" +msgstr "" + +#: include/template/detail-action.php:210 +msgid "Montrer les détails" +msgstr "" + +#: include/template/detail-action.php:211 +msgid "Cacher les détails" +msgstr "" + +#: include/template/detail-action.php:243 +msgid "Pièces attachées" +msgstr "" + +#: include/template/detail-action.php:251 +#, php-format +msgid "Voulez-vous effacer le document" +msgstr "" + +#: include/template/detail-action.php:270 +msgid "Je ne peux pas ajouter de fichier" +msgstr "" + +#: include/template/extension-detail.php:23 +msgid "description" +msgstr "" + +#: include/template/extension-detail.php:31 +msgid "chemin et nom de fichier" +msgstr "" + +#: include/template/extension-detail.php:39 include/template/extension.php:18 +msgid "Activé" +msgstr "" + +#: include/template/extension.php:18 +msgid "Désactivé" +msgstr "" + +#: include/template/extension.php:23 +msgid "Effacer extension" +msgstr "" + +#: include/template/extension.php:24 +msgid "Confirmez effacement de l'extension ??" +msgstr "" + +#: include/template/extension-sec.php:6 +msgid "login" +msgstr "" + +#: include/template/extension-sec.php:7 +msgid "Prénom" +msgstr "" + +#: include/template/fiche_def_input.php:12 +msgid "" +"Création automatique du poste comptable uniquement s'il n\\y a qu'un seul " +"poste" +msgstr "" + +#: include/template/forecast_cat.php:5 +msgid "Catégories" +msgstr "" + +#: include/template/forecast_cat.php:8 +msgid "Ordre" +msgstr "" + +#: include/template/forecast-detail.php:7 +msgid "Catégorie" +msgstr "" + +#: include/template/forecast-detail.php:9 +msgid "QuickCode" +msgstr "" + +#: include/template/forecast-detail.php:12 +msgid "Débit ou Crédit" +msgstr "" + +#: include/template/forecast_result.php:27 +msgid "Totaux" +msgstr "" + +#: include/template/forecast_result.php:32 +msgid "Estimé" +msgstr "" + +#: include/template/forecast_result.php:67 +msgid "Réel" +msgstr "" + +#: include/template/forecast_result.php:81 +#: include/template/forecast_result.php:125 +msgid "Différence" +msgstr "" + +#: include/template/forecast_result.php:93 +msgid "Diff. cumul." +msgstr "" + +#: include/template/forecast_result.php:119 +msgid "Total Catégorie estimé" +msgstr "" + +#: include/template/forecast_result.php:122 +msgid "Total Catégorie réel" +msgstr "" + +#: include/template/form_ledger_detail.php:18 +msgid "Num Pj" +msgstr "" + +#: include/template/form_ledger_detail.php:28 +msgid "prix/unité htva" +msgstr "" + +#: include/template/form_ledger_detail.php:33 +msgid "tot.tva" +msgstr "" + +#: include/template/form_ledger_detail.php:34 +msgid "tvac" +msgstr "" + +#: include/template/form_ledger_fin.php:11 +msgid "Extrait de compte" +msgstr "" + +#: include/template/form_ledger_fin.php:12 +msgid "Numéro extrait" +msgstr "" + +#: include/template/form_ledger_fin.php:13 +msgid "Solde début" +msgstr "" + +#: include/template/form_ledger_fin.php:14 +msgid "Solde Fin" +msgstr "" + +#: include/template/form_ledger_fin.php:23 +msgid "Op. Concernée(s)" +msgstr "" + +#: include/template/ledger_search.php:1 +msgid "Critères de Recherche" +msgstr "" + +#: include/template/ledger_search.php:5 +msgid "Dans le journal" +msgstr "" + +#: include/template/ledger_search.php:14 +msgid "Et Compris entre les date" +msgstr "" + +#: include/template/ledger_search.php:17 include/template/ledger_search.php:35 +msgid "et" +msgstr "" + +#: include/template/ledger_search.php:23 +msgid "Et contenant dans la description, pièce justificative ou n° interne" +msgstr "" + +#: include/template/ledger_search.php:32 +msgid "Et compris entre les montants" +msgstr "" + +#: include/template/ledger_search.php:40 +msgid "Et utilisant la fiche (quick code)" +msgstr "" + +#: include/template/ledger_search.php:48 +msgid "Et utilisant le poste comptable" +msgstr "" + +#: include/template/ledger_search.php:58 +msgid "Et uniquement non payées" +msgstr "" + +#: include/template/new_mod_payment.php:2 +msgid "Nouveau moyen de paiement" +msgstr "" + +#: include/template/new_mod_payment.php:25 +msgid "Pour le type de journal" +msgstr "" + +#: include/template/new_mod_payment.php:34 +msgid "Paiement enregistré dans " +msgstr "" + +#: include/template/new_mod_payment.php:43 +msgid "Avec la fiche" +msgstr "" + +#: include/template/param_jrn.php:4 +msgid "Nom journal" +msgstr "" + +#: include/template/param_jrn.php:8 +msgid "Postes utilisables journal (débit/crédit)" +msgstr "" + +#: include/template/param_jrn.php:22 +msgid "Type de journal" +msgstr "" + +#: include/template/param_jrn.php:28 +msgid "Préfixe code interne" +msgstr "" + +#: include/template/param_jrn.php:32 +msgid "Préfixe pièce justificative" +msgstr "" + +#: include/template/param_jrn.php:36 +msgid "Le préfixe des pièces peut être différent pour chaque journal" +msgstr "" + +#: include/template/param_jrn.php:40 +msgid "N° pièce justificative" +msgstr "" + +#: include/template/param_jrn.php:44 +msgid "La numérotation est propre à chaque journal" +msgstr "" + +#: include/template/param_jrn.php:53 +msgid "Fiches Débit" +msgstr "" + +#: include/template/param_jrn.php:54 +msgid "Fiches Crédit" +msgstr "" + +#: include/template/security_list_action.php:65 +msgid "Comptabilité Analytique" +msgstr "" + +#: include/template/security_list_action.php:87 +msgid "Prévision" +msgstr "" diff --git a/html/modify_op.php b/html/modify_op.php index 6a87f6a31..29969000c 100644 --- a/html/modify_op.php +++ b/html/modify_op.php @@ -215,7 +215,7 @@ if ( isset($_POST['update_record']) ) { if ( strpos($_POST['rapt'],',') != 0 ) { - $aRapt=split(',',$_POST['rapt']); + $aRapt=explode(',',$_POST['rapt']); /* reconcialition */ foreach ($aRapt as $rRapt) { diff --git a/html/priv_user.php b/html/priv_user.php index 89a4648d4..00e41aec6 100644 --- a/html/priv_user.php +++ b/html/priv_user.php @@ -18,7 +18,7 @@ */ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr /*! \file - * \brief Users Security + * \brief Users Security */ include_once("ac_common.php"); require_once('class_database.php'); @@ -57,7 +57,7 @@ echo '
'; echo '

Gestion Utilisateurs

'; -// User is valid and you're an admin +// User is valid and you're an admin ?> @@ -76,23 +76,23 @@ if ( isset ( $_GET['reset_passwd']) ){ if ( isset ($_POST['SAVE']) ){ $uid = $_POST['UID']; - // Update User + // Update User $cn=new Database(); $last_name=$_POST['fname']; $first_name=$_POST['lname']; $UserChange=new User($cn,$uid); - if ( $UserChange->load()==-1) { - alert("Cet utilisateur n'existe pas");} + if ( $UserChange->load()==-1) { + alert("Cet utilisateur n'existe pas");} else { $UserChange->first_name=$first_name; $UserChange->last_name=$last_name; $UserChange->active=$_POST['Actif']; $UserChange->admin=$_POST['Admin']; $UserChange->save(); - + // Update Priv on Folder foreach ($_POST as $name=>$elem) - { + { echo_debug('priv_user.php',__LINE__,"_POST $name $elem"); if ( substr_count($name,'PRIV')!=0 ) { @@ -100,7 +100,7 @@ if ( isset ($_POST['SAVE']) ){ $db_id=substr($name,4); $cn=new Database(); $UserChange->set_folder_access($db_id,$elem); - + } } @@ -132,7 +132,7 @@ $UserChange->load();
-prénom @@ -146,9 +146,9 @@ if ( $UserChange->active == 1 ) { $ACT="UNCHECKED";$NACT="CHECKED"; } echo ""; ?>
',$UserChange->name); ?>
+prénom ',$UserChange->first_name); ?>
"; -printf(' Actif',$ACT); +printf(' Actif',$ACT); echo ""; -printf(' Non Actif',$NACT); +printf(' Non Actif',$NACT); echo "
@@ -162,9 +162,9 @@ if ( $UserChange->admin == 1 ) { $ACT="UNCHECKED";$NACT="CHECKED"; } echo ""; -printf(' Administrateur global',$ACT); +printf(' Administrateur global',$ACT); echo ""; -printf(' Pas administrateur global ',$NACT); +printf(' Pas administrateur global ',$NACT); echo ""; ?> @@ -178,10 +178,11 @@ echo ""; Les autres droits doivent être réglés dans les dossiers (paramètre->sécurité)

-'X','label'=>'Aucun Accès'), array('value'=>'R','label'=>'Utilisateur normal'), + array('value'=>'P','label'=>'Utilisateur uniquement extension'), array('value'=>'L','label'=>'Administrateur local(Tous les droits)') ); $repo=new Dossier(0); @@ -198,7 +199,7 @@ foreach ( $Dossier as $rDossier) { $priv=$mod_user->get_folder_access($rDossier['dos_id']); printf("",h($rDossier['dos_name'])); - + $select=new ISelect(); $select->table=1; $select->name=sprintf('PRIV%s',$rDossier['dos_id']); @@ -212,7 +213,7 @@ foreach ( $Dossier as $rDossier) {
Dossier : %s
diff --git a/html/style-color.css b/html/style-color.css index f4e8de981..f54fa042f 100644 --- a/html/style-color.css +++ b/html/style-color.css @@ -616,12 +616,12 @@ div.popup_border_notitle { div.popup_content { position:absolute; - top:10%; + top:5%; bottom:0; left:0; right:0; width:100%; - height:90%; + height:95%; overflow: auto; background-color:lightblue; font-size:10px ; diff --git a/html/style-light.css b/html/style-light.css index f4e8de981..c21ae7ba1 100644 --- a/html/style-light.css +++ b/html/style-light.css @@ -4,6 +4,8 @@ BODY { background-color:#EDF3FF; font-size:12px; font-family:arial,sans-serif; + padding:0; + margin:0; } .notice { color:red; @@ -616,12 +618,12 @@ div.popup_border_notitle { div.popup_content { position:absolute; - top:10%; + top:5%; bottom:0; left:0; right:0; width:100%; - height:90%; + height:95%; overflow: auto; background-color:lightblue; font-size:10px ; diff --git a/html/style.css b/html/style.css index 424895d5b..c9a7d2e21 100644 --- a/html/style.css +++ b/html/style.css @@ -4,6 +4,8 @@ BODY { background-color:#C2D4D7; font-size:0.7em; font-family:Arial, Helvetica, sans-serif; + padding:0; + margin:0; } .notice { color:red; @@ -600,12 +602,12 @@ div.popup_border_notitle { div.popup_content { position:absolute; - top:10%; + top:5%; bottom:0; left:0; right:0; width:100%; - height:90%; + height:95%; overflow: auto; background-color:lightblue; font-size:12px ; diff --git a/html/user_compta.php b/html/user_compta.php index bc5cfc5ed..4fdc7743a 100644 --- a/html/user_compta.php +++ b/html/user_compta.php @@ -39,9 +39,9 @@ echo_debug('user_compta.php',__LINE__,"user is ".$_SESSION['g_user']); // Get The priv on the selected folder if ( $User->admin == 0 && $User->is_local_admin(dossier::id()) == 0 ) { - + $r=$User->get_folder_access($gDossier); - if ($r == 'X' ){ + if ($r == 'X' ||$r=='P'){ /* Cannot Access */ NoAccess(1); } diff --git a/html/user_login.php b/html/user_login.php index 11c95018a..0dd34e177 100644 --- a/html/user_login.php +++ b/html/user_login.php @@ -77,7 +77,6 @@ $result.=''; if ( $User->Admin() == 1 ) { $result.=" Administration "; } -$result.=''._('Aide').' '; $result.=''._('Préférence').''; $result.=''._('Deconnexion').''; $result.=""; diff --git a/include/ac_common.php b/include/ac_common.php index 2f6249a9a..e63a56d08 100644 --- a/include/ac_common.php +++ b/include/ac_common.php @@ -1,4 +1,4 @@ -'.htmlspecialchars($p_string).'';} function hb($p_string) { return ''.htmlspecialchars($p_string).'';} function th($p_string) { return ''.htmlspecialchars($p_string).'';} -/*!\brief surrond the string with td +/*!\brief surrond the string with td *\param string *\param class to use * \return string surrounded by td @@ -43,15 +43,15 @@ function th($p_string) { return ''.htmlspecialchars($p_string).'';} function td($p_string,$p_class=''){ return ''.$p_string.'';} /*!\brief escape correctly php string to javascript */ function j($p_string) { $a=preg_replace("/\r?\n/", "\\n", addslashes($p_string)); return $a;} -/*! +/*! * \brief log error into the /tmp/phpcompta_error.log it doesn't work on windows * * \param p_log message * \param p_line line number * \param p_message is the message - * + * * \return nothing - * + * */ function echo_error ($p_log, $p_line="", $p_message="") { echo "ERREUR :".$p_log." ".$p_line." ".$p_message; @@ -62,15 +62,15 @@ function echo_error ($p_log, $p_line="", $p_message="") { echo_debug($p_log,$p_line,$p_message); } } - -/*! + +/*! * \brief Compare 2 dates - * \param p_date + * \param p_date * \param p_date_oth - * - * \return + * + * \return * - == 0 les dates sont identiques - * - > 0 date1 > date2 + * - > 0 date1 > date2 * - < 0 date1 < date2 */ function cmpDate ($p_date,$p_date_oth) { @@ -88,12 +88,12 @@ function cmpDate ($p_date,$p_date_oth) { // si $p_date > $p_date_oth return > 0 return $l_mkdate-$l2_mkdate; } -/*! +/*! * \brief check if the argument is a number * * \param $p_int number to test * - * \return + * \return * - 1 it's a number * - 0 it is not */ @@ -107,16 +107,16 @@ function isNumber(&$p_int) { } -/*! +/*! * \brief Verifie qu'une date est bien formaté * en d.m.y et est valable * \param $p_date - * + * * \return * - null si la date est invalide ou malformaté * - $p_date si tout est bon * - */ + */ function isDate ( $p_date) { if ( strlen (trim($p_date)) == 0 ) return null; @@ -141,9 +141,9 @@ function isDate ( $p_date) { }// !ereg return $p_date; } -/*! +/*! * \brief Default page header for each page - * + * * \param p_theme default theme * \param $p_script * \param $p_script2 another js script @@ -151,13 +151,13 @@ function isDate ( $p_date) { * \return none */ function html_page_start($p_theme="",$p_script="",$p_script2="") -{ +{ $cn=new Database(); if ( $p_theme != "") { $Res=$cn->exec_sql("select the_filestyle from theme where the_name='".$p_theme."'"); - if (Database::num_row($Res)==0) + if (Database::num_row($Res)==0) $style="style.css"; else { $s=Database::fetch_array($Res,0); @@ -172,7 +172,7 @@ function html_page_start($p_theme="",$p_script="",$p_script2="") if ( $p_script2 != "" ) $p_script2=''; - echo " + echo " PhpCompta @@ -198,9 +198,9 @@ function html_page_start($p_theme="",$p_script="",$p_script2="") } } -/*! +/*! * \brief Minimal page header for each page, used for small popup window - * + * * \param p_theme default theme * \param $p_script * \param $p_script2 another js script @@ -208,13 +208,13 @@ function html_page_start($p_theme="",$p_script="",$p_script2="") * \return none */ function html_min_page_start($p_theme="",$p_script="",$p_script2="") -{ +{ $cn=new Database(); if ( $p_theme != "") { $Res=$cn->exec_sql("select the_filestyle from theme where the_name='".$p_theme."'"); - if (Database::num_row($Res)==0) + if (Database::num_row($Res)==0) $style="style.css"; else { $s=Database::fetch_array($Res,0); @@ -230,7 +230,7 @@ function html_min_page_start($p_theme="",$p_script="",$p_script2="") if ( $p_script2 != "" ) $p_script2=''; - echo " + echo " PhpCompta @@ -248,31 +248,31 @@ function html_min_page_start($p_theme="",$p_script="",$p_script2="") } -/*! - * \brief end tag - * +/*! + * \brief end tag + * */ function html_page_stop() { echo ""; echo ""; } -/*! - * \brief Echo no access and stop - * +/*! + * \brief Echo no access and stop + * * \return nothing */ -function NoAccess($js=1) +function NoAccess($js=1) { - if ( $js == 1 ) + if ( $js == 1 ) { echo ""; } - else + else { echo '
'; echo '

'._(' Cette action ne vous est pas autorisée Contactez votre responsable').'

'; @@ -280,13 +280,13 @@ function NoAccess($js=1) } exit -1; } -/*! +/*! * \brief Fix the problem with the quote char for the database - * - * \param $p_string + * + * \param $p_string * \return a string which won't let strange char for the database */ -function FormatString($p_string) +function FormatString($p_string) { $p_string=trim($p_string); if (strlen($p_string) == 0 ) return null; @@ -296,10 +296,10 @@ function FormatString($p_string) return $p_string; } -/*! -/* \brief store the string which print - * the content of p_array in a table - * used to display the menu +/*! +/* \brief store the string which print + * the content of p_array in a table + * used to display the menu * \param $p_array array like ( HREF reference, visible item (name),Help(opt), * selected (opt) * \param $p_dir direction of the menu (H Horizontal V vertical) @@ -317,9 +317,9 @@ function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$defau foreach ($p_array as $all=>$href){ $title=""; $set="XX"; - if ( isset ($href[2] )) + if ( isset ($href[2] )) $title=$href[2]; - if ( isset($href[3] )) + if ( isset($href[3] )) $set=$href[3]; if ( $set == $default ) @@ -336,7 +336,7 @@ function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$defau $title=""; $set="A"; - if ( isset ($href[2] )) + if ( isset ($href[2] )) $title=$href[2]; if ( isset($href[3])) @@ -356,31 +356,31 @@ function ShowItem($p_array,$p_dir='V',$class="mtitle",$class_ref="mtitle",$defau $ret.=""; return $ret; } -/*! +/*! * \brief warns - * + * * \param p_string error message * gen : * - none * \return: * - none */ -function echo_warning($p_string) +function echo_warning($p_string) { echo '

'.$p_string."

"; } -/*! +/*! * \brief Show the periode which found thanks its id - * - * - * \param $p_cn database connection + * + * + * \param $p_cn database connection * \param p_id * \param pos Start or end * * \return: string */ function getPeriodeName($p_cn,$p_id,$pos='p_start') { - if ( $pos != 'p_start' and + if ( $pos != 'p_start' and $pos != 'p_end') echo_error('ac_common.php'."-".__LINE__.' UNDEFINED PERIODE'); $ret=$p_cn->get_value("select to_char($pos,'Mon YYYY') as t from parm_periode where p_id=$p_id"); @@ -388,10 +388,10 @@ function getPeriodeName($p_cn,$p_id,$pos='p_start') { } -/*! - * \brief Return the period corresponding to the +/*! + * \brief Return the period corresponding to the * date - * + * * \param p_cn database connection * \param p_date the month + year 'MM.YYYY' * @@ -401,7 +401,7 @@ function getPeriodeName($p_cn,$p_id,$pos='p_start') { function getPeriodeFromMonth($p_cn,$p_date) { $R=$p_cn->get_value("select p_id from parm_periode where to_char(p_start,'DD.MM.YYYY') = '01.$p_date'"); - if ( $R == "" ) + if ( $R == "" ) return -1; return $R; } @@ -422,13 +422,13 @@ function Decode($p_html){ * \param $p_from start date (date) * \param $p_to end date (date) * \param $p_form if the p_from and p_to are date or p_id - * \param $p_field column name + * \param $p_field column name * \return a string containg the query */ function sql_filter_per($p_cn,$p_from,$p_to,$p_form='p_id',$p_field='jr_tech_per') { - if ( $p_form != 'p_id' && + if ( $p_form != 'p_id' && $p_form != 'date' ) { echo_error (__FILE__,__LINE__,'Mauvais parametres '); @@ -444,22 +444,22 @@ function sql_filter_per($p_cn,$p_from,$p_to,$p_form='p_id',$p_field='jr_tech_per throw new Exception(__FILE__.__LINE__.'Attention periode '. ' non trouvee periode p_from='.$p_from. 'p_to_periode = '.$p_to); - + $p_from=$a_start['p_start']; $p_to=$a_end['p_end']; - } - if ( $p_from == $p_to ) + } + if ( $p_from == $p_to ) $periode=" $p_field = (select p_id from parm_periode ". " where ". - " p_start = to_date('$p_from','DD.MM.YYYY')) "; + " p_start = to_date('$p_from','DD.MM.YYYY')) "; else $periode = "$p_field in (select p_id from parm_periode ". " where p_start >= to_date('$p_from','DD.MM.YYYY') and p_end <= to_date('$p_to','DD.MM.YYYY')) "; return $periode; } -/*!\brief alert in javascript +/*!\brief alert in javascript *\param $p_msg is the message *\param $buffer if false, echo directly and execute the javascript, if $buffer is true, the alert javascript * is in the return string @@ -482,7 +482,7 @@ function alert($p_msg,$buffer=false) function set_language() { $dir=""; $dir=setlocale(LC_MESSAGES,$_SESSION['g_lang']); - + if ( $dir == "") { $dir=setlocale(LC_MESSAGES,"fr_FR.utf8"); echo ''.$_SESSION['g_lang'].'domaine non supporté'; diff --git a/include/argenta_be.inc.php b/include/argenta_be.inc.php index a2ff3c4a4..a23fb0320 100644 --- a/include/argenta_be.inc.php +++ b/include/argenta_be.inc.php @@ -34,7 +34,7 @@ while (($data = fgetcsv($handle, 2000,"!")) !== FALSE) { $num = count($data); for ($c=0; $c < $num; $c++) { if ( $line==1) { - $row=split(';',$data[$c]); + $row=explode(';',$data[$c]); $num_compte=$row[1]; } if ( $line < 2 ) @@ -42,7 +42,7 @@ while (($data = fgetcsv($handle, 2000,"!")) !== FALSE) { //----------------------------------------------------- // Parsing CSV comes here //----------------------------------------------------- - $row=split(';',$data[$c]); + $row=explode(';',$data[$c]); echo 'ici sizeof $row = '.sizeof($row); echo_debug('argenta',__LINE__,'$row = '.var_export($row,true)); echo_debug('argenta',__LINE__,'sizeof($row)'.sizeof($row)); diff --git a/include/cbc_be.inc.php b/include/cbc_be.inc.php index 8594e1b3c..1fa1d052e 100644 --- a/include/cbc_be.inc.php +++ b/include/cbc_be.inc.php @@ -36,7 +36,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { //----------------------------------------------------- // Parsing CSV comes here //----------------------------------------------------- - $row=split(';',$data[$c]); + $row=explode(';',$data[$c]); echo_debug('cbc_be',__LINE__,'$row = '.var_export($row,true)); echo_debug('cbc_be',__LINE__,'sizeof($row)'.sizeof($row)); if ( sizeof ($row) < 13 ) diff --git a/include/class_acc_account_ledger.php b/include/class_acc_account_ledger.php index b5b8d5846..1596ad779 100644 --- a/include/class_acc_account_ledger.php +++ b/include/class_acc_account_ledger.php @@ -243,7 +243,7 @@ function get_solde_detail($p_cond="") { { if ( $line_tva['tva_poste'] == '' ) continue; - list($tva_deb,$tva_cred)=split(',',$line_tva['tva_poste']); + list($tva_deb,$tva_cred)=explode(',',$line_tva['tva_poste']); if ( $this->id == $tva_deb || $this->id == $tva_cred ) { @@ -368,7 +368,7 @@ function get_solde_detail($p_cond="") { if ( trim ($filter) == '') return 0; - $valid_cred=split(" ",$filter); + $valid_cred=explode(" ",$filter); $sql="select count(*) as poste from tmp_pcmn where "; // Creation query $or=""; @@ -403,7 +403,7 @@ function get_solde_detail($p_cond="") { $l=new Acc_Ledger($this->db,$p_jrn); $row=$l->get_propertie(); if ( strlen(trim($row['jrn_def_class_deb'])) == 0 ) return array(); - $valid_account=split(" ",$row['jrn_def_class_deb']); + $valid_account=explode(" ",$row['jrn_def_class_deb']); return $valid_account; } /*!\brief build a sql statement thanks a array found with get_account_ledger diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index b0d109f4e..8d23e7464 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -910,7 +910,7 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ { echo_debug('class_acc_ledger',__LINE__,'ICI'); echo_debug('class_acc_ledger',__LINE__,'Montant TVA = '.$p_array['AMOUNT_TVA']); - list($tva_deb,$tva_cred)=split(',',$line_tva['tva_poste']); + list($tva_deb,$tva_cred)=explode(',',$line_tva['tva_poste']); if ( $code['j_poste'] == $tva_deb || $code['j_poste'] == $tva_cred ) { @@ -1578,7 +1578,14 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ if ( isset(${'qc_'.$i})) { $qc=new fiche($this->db); $qc->get_by_qcode(${'qc_'.$i},false); - $poste=$qc->strAttribut(ATTR_DEF_ACCOUNT); + $sposte=$qc->strAttribut(ATTR_DEF_ACCOUNT); + /* if there are 2 accounts take following the deb or cred */ + if (strpos($sposte,',') != 0 ){ + $array=explode(",",$sposte); + $poste=(isset(${'ck'.$i}))?$array[0]:$array[1]; + } else { + $poste=$sposte; + } $quick_code=${'qc_'.$i}; } else { @@ -1588,6 +1595,8 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ // compute the periode is do not check it if ($check_periode == false ) $acc_op->periode=$oPeriode->p_id; $acc_op->desc=$desc; + if ( strlen(trim(${'ld'.$i})) != 0 ) + $acc_op->desc=${'ld'.$i}; $acc_op->amount=round(${'amount'.$i},2); $acc_op->grpt=$seq; $acc_op->poste=$poste; @@ -1595,8 +1604,6 @@ jr_comment||' ('||c_internal||')'||case when jr_pj_number is not null and jr_pj_ $acc_op->type=(isset (${'ck'.$i}))?'d':'c'; $acc_op->qcode=$quick_code; $j_id=$acc_op->insert_jrnx(); - if ( strlen(trim(${'ld'.$i})) != 0 ) - $acc_op->update_comment(${'ld'.$i}); $tot_amount+=round($acc_op->amount,2); $tot_deb+=($acc_op->type=='d')?$acc_op->amount:0; $tot_cred+=($acc_op->type=='c')?$acc_op->amount:0; @@ -1851,9 +1858,11 @@ function get_last_date() $str_file=$doc->Generate(); // Move the document to the jrn $doc->MoveDocumentPj($internal); - // Update the comment with invoice number - $sql="update jrn set jr_comment=' document ".$doc->d_number."' where jr_internal='$internal'"; - $this->db->exec_sql($sql); + // Update the comment with invoice number, if the comment is empty + if ( ! isset ($e_comm) || strlen(trim($e_comm))== 0 ) { + $sql="update jrn set jr_comment=' document ".$doc->d_number."' where jr_internal='$internal'"; + $this->db->exec_sql($sql); + } return '

'.$str_file.'

'; } @@ -1870,7 +1879,16 @@ function get_last_date() if ( $empl->empty_attribute(ATTR_DEF_ACCOUNT)== true) { throw new Exception('Celui qui paie n\' a pas de poste comptable',20); } - $poste=new Acc_Account_Ledger($this->db,$empl->strAttribut(ATTR_DEF_ACCOUNT)); + /* get the account and explode if necessary */ + $sposte=$empl->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit one for customer + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[0]; + } else { + $poste_val=$sposte; + } + $poste=new Acc_Account_Ledger($this->db,$poste_val); if ( $poste->load() == false ){ throw new Exception('Pour la fiche'.$empl->quick_code.' le poste comptable ['.$poste->id.'n\'existe pas',9); @@ -2075,9 +2093,10 @@ function get_last_date() if ( $p_action == 'client') $p_action='ALL'; if ( $p_action == 'fournisseur') $p_action='ALL'; if ( $p_action == 'adm') $p_action='ALL'; + if ( $p_action == 'quick_writing') $p_action='ALL'; - $fil_ledger=$user->get_ledger_sql($p_action,2); + $fil_ledger=$user->get_ledger_sql($p_action,3); $and=' and '; } else if ( $p_jrn != 0 ){ $fil_ledger = ' jrn_def_id = '.$p_jrn; @@ -2300,10 +2319,10 @@ function get_last_date() $array=$this->db->get_array($sql); return $array; } - /** + /** *@brief retreive the jr_grpt_id from a ledger *@param $p_what the column to seek - * possible values are + * possible values are * - internal *@param $p_value the value of the col. */ @@ -2312,7 +2331,7 @@ function get_last_date() case 'internal': return $this->db->get_value('select jr_grpt_id from jrn where jr_internal=$1', array($p_value)); - + } } } diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index b9899fa28..d27ef810f 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -95,8 +95,19 @@ class Acc_Ledger_Fin extends Acc_Ledger { if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception('La fiche '.$e_bank_account.'n\'a pas de poste comptable',8); + /* get the account and explode if necessary */ + $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit one for customer + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[0]; + } else { + $poste_val=$sposte; + } + + $acc_pay=new Acc_Operation($this->db); /* The account exists */ - $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); + $poste=new Acc_Account_Ledger($this->db,$poste_val); if ( $poste->load() == false ){ throw new Exception('Pour la fiche '.$e_bank_account.' le poste comptable ['.$poste->id.'] n\'existe pas',9); } @@ -126,8 +137,17 @@ class Acc_Ledger_Fin extends Acc_Ledger { $fiche->get_by_qcode(${'e_other'.$i}); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception('La fiche '.${'e_other'.$i}.'n\'a pas de poste comptable',8); + + $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit one for customer + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[1]; + } else { + $poste_val=$sposte; + } /* The account exists */ - $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); + $poste=new Acc_Account_Ledger($this->db,$poste_val); if ( $poste->load() == false ){ throw new Exception('Pour la fiche '.${'e_other'.$i}.' le poste comptable ['.$poste->id.'n\'existe pas',9); } @@ -554,7 +574,16 @@ class Acc_Ledger_Fin extends Acc_Ledger { $exercice=$pPeriode->get_exercice(); $filter_year=" j_tech_per in (select p_id from parm_periode where p_exercice='".$exercice."')"; - $acc_account=new Acc_Account_Ledger($this->db,$fBank->strAttribut(ATTR_DEF_ACCOUNT)); + $sposte=$fBank->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit one for customer + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[0]; + } else { + $poste_val=$sposte; + } + + $acc_account=new Acc_Account_Ledger($this->db,$poste_val); $solde=$acc_account->get_solde($filter_year); $new_solde=$solde; @@ -580,7 +609,20 @@ class Acc_Ledger_Fin extends Acc_Ledger { $acc_operation=new Acc_Operation($this->db); $acc_operation->date=$e_date; - $acc_operation->poste=$fPoste->strAttribut(ATTR_DEF_ACCOUNT); + $sposte=$fPoste->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + if ( ${"e_other$i"."_amount"} < 0 ) + $poste_val=$array[0]; + else + $poste_val=$array[1]; + } else { + $poste_val=$sposte; + } + + + $acc_operation->poste=$poste_val; $acc_operation->amount=${"e_other$i"."_amount"}*(-1); $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; @@ -600,7 +642,20 @@ class Acc_Ledger_Fin extends Acc_Ledger { $acc_operation=new Acc_Operation($this->db); $acc_operation->date=$e_date; - $acc_operation->poste=$fBank->strAttribut(ATTR_DEF_ACCOUNT); + $sposte=$fBank->strAttribut(ATTR_DEF_ACCOUNT); + + // if 2 accounts + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + if ( ${"e_other$i"."_amount"} < 0 ) + $poste_val=$array[1]; + else + $poste_val=$array[0]; + } else { + $poste_val=$sposte; + } + + $acc_operation->poste=$poste_val; $acc_operation->amount=${"e_other$i"."_amount"}; $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; @@ -635,7 +690,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { if ( trim(${"e_concerned".$i}) != "" ) { if ( strpos(${"e_concerned".$i},',') != 0 ) { - $aRapt=split(',',${"e_concerned".$i}); + $aRapt=explode(',',${"e_concerned".$i}); foreach ($aRapt as $rRapt) { // Add a "concerned operation to bound these op.together // diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index 52725bafe..dc4358c4a 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -104,8 +104,18 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception(_('La fiche ').$e_client._('n\'a pas de poste comptable'),8); + /* get the account and explode if necessary */ + $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the credit one for supplier + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[1]; + } else { + $poste_val=$sposte; + } + /* The account exists */ - $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); + $poste=new Acc_Account_Ledger($this->db,$poste_val); if ( $poste->load() == false ){ throw new Exception(_('Pour la fiche ').$e_client._(' le poste comptable [').$poste->id.'] '._('n\'existe pas'),9); } @@ -139,8 +149,19 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $fiche->get_by_qcode(${'e_march'.$i}); if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'a pas de poste comptable'),8); + + /* get the account and explode if necessary */ + $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[0]; + } else { + $poste_val=$sposte; + } + /* The account exists */ - $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); + $poste=new Acc_Account_Ledger($this->db,$poste_val); if ( $poste->load() == false ){ throw new Exception(_('Pour la fiche ').${'e_march'.$i}._(' le poste comptable').' ['.$poste->id._('n\'existe pas'),9); } @@ -160,8 +181,37 @@ class Acc_Ledger_Purchase extends Acc_Ledger { } /*!\brief insert into the database, it calls first the verify function - * change the value of this->jr_id and this->jr_internal + * change the value of this->jr_id and this->jr_internal. + * It generates the document and save the middle of payment, if 'gen_invoice is set + * and e_mp *\param $p_array is usually $_POST or a predefined operation +\verbatim + Array +( + + [e_client] =>BELGACOM + [nb_item] =>9 + [p_jrn] =>3 + [period] =>117 + [e_comm] =>Frais de téléphone + [e_date] =>01.09.2009 + [e_ech] => + [jrn_type] =>ACH + [e_pj] =>ACH53 + [e_pj_suggest] =>ACH53 + [mt] =>1265318941.39 + [e_mp] =>0 + [e_march0] =>TEL + [e_march0_price] =>63.6700 + [e_march0_tva_id] =>1 + [e_march0_tva_amount] =>13.3700 + [e_quant0] =>1.000 + ... + [bon_comm] => + [other_info] => + [record] =>Enregistrement +) +\endverbatim *\return string *\note throw an Exception */ @@ -179,7 +229,15 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $cust=new fiche($this->db); $cust->get_by_qcode($e_client); - $poste=$cust->strAttribut(ATTR_DEF_ACCOUNT); + $sposte=$cust->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the credit Supplier + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste=$array[1]; + } else { + $poste=$sposte; + } + $oPeriode=new Periode($this->db); $check_periode=$this->check_periode(); @@ -276,7 +334,17 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $acc_amount->correct(); $tot_amount+=$amount; - $acc_operation->poste=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + /* get the account and explode if necessary */ + $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit one for customer + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[0]; + } else { + $poste_val=$sposte; + } + + $acc_operation->poste=$poste_val; $acc_operation->amount=$acc_amount->amount; $acc_operation->qcode=${"e_march".$i}; if( $acc_amount->amount > 0 ) $tot_debit=bcadd($tot_debit,$acc_amount->amount); @@ -504,7 +572,17 @@ class Acc_Ledger_Purchase extends Acc_Ledger { /* Insert paid by */ $acc_pay=new Acc_Operation($this->db); $acc_pay->date=$e_date; - $acc_pay->poste=$acfiche->strAttribut(ATTR_DEF_ACCOUNT); + + /* get the account and explode if necessary */ + $sposte=$acfiche->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit one for customer + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[1]; + } else { + $poste_val=$sposte; + } + $acc_pay->poste=$poste_val; $acc_pay->qcode=$fqcode; $acc_pay->amount=abs(round($tot_debit,2)); $acc_pay->desc=$e_comm; @@ -872,7 +950,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { // Set correctly the REQUEST param for jrn_type $r.= HtmlInput::hidden('jrn_type','ACH'); $r.= HtmlInput::button('add_item',_('Ajout article'), ' onClick="ledger_add_row()"'); - + /* if we suggest the pj n# the run the script */ @@ -1119,32 +1197,9 @@ class Acc_Ledger_Purchase extends Acc_Ledger { } // check for upload piece -/** -*@todo clean dead code -*/ - /* $file=new IFile(); - $file->table=0; - $r.=_("Ajoutez une pièce justificative "); - $r.=$file->input("pj",""); - */ $r.=HtmlInput::warnbulle(12); $r.=$this->extra_info(); - /* Propose to generate a note of fee */ - if ( $this->db->count_sql("select md_id,md_name from document_modele where md_type=10") > 0 && - $e_mp != 0) - { - - - $r.=_('ou générer une note de frais').' '; - // We propose to generate the invoice and some template - $doc_gen=new ISelect(); - $doc_gen->name="gen_doc"; - $doc_gen->value=$this->db->make_array( - "select md_id,md_name from document_modele where md_type=10"); - $r.=$doc_gen->input().'
'; - } - return $r; } @@ -1152,7 +1207,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { * - add a attachment * - generate an invoice * - insert extra info - *\return string + *\return html string */ public function extra_info() { $r=""; @@ -1164,17 +1219,17 @@ class Acc_Ledger_Purchase extends Acc_Ledger { $r.=_("Ajoutez une pièce justificative "); $r.=$file->input("pj",""); - if ( $this->db->count_sql("select md_id,md_name from document_modele where md_type=4") > 0 ) + if ( $this->db->count_sql("select md_id,md_name from document_modele where md_type=10") > 0 ) { - + $r.='
'; $r.=_('ou générer un document').' '; // We propose to generate the note of fee $doc_gen=new ISelect(); $doc_gen->name="gen_doc"; $doc_gen->value=$this->db->make_array( "select md_id,md_name ". - " from document_modele where md_type=4"); + " from document_modele where md_type=10"); $r.=$doc_gen->input().'
'; } $r.='
'; diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index f70143387..1e674e4a7 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -105,8 +105,19 @@ class Acc_Ledger_Sold extends Acc_Ledger { if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception(_('La fiche ').$e_client._('n\'a pas de poste comptable'),8); + /* get the account and explode if necessary */ + $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit one for customer + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[0]; + } else { + $poste_val=$sposte; + } /* The account exists */ - $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); + + $poste=new Acc_Account_Ledger($this->db,$poste_val); + if ( $poste->load() == false ){ throw new Exception(_('Pour la fiche ').$e_client._(' le poste comptable [').$poste->id._('] n\'existe pas'),9); } @@ -136,7 +147,16 @@ class Acc_Ledger_Sold extends Acc_Ledger { if ( $fiche->empty_attribute(ATTR_DEF_ACCOUNT) == true) throw new Exception(_('La fiche ').${'e_march'.$i}._('n\'a pas de poste comptable'),8); /* The account exists */ - $poste=new Acc_Account_Ledger($this->db,$fiche->strAttribut(ATTR_DEF_ACCOUNT)); + $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + + // if 2 accounts, take only the credit one + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[1]; + } else { + $poste_val=$sposte; + } + $poste=new Acc_Account_Ledger($this->db,$poste_val); if ( $poste->load() == false ){ throw new Exception(_('Pour la fiche ').${'e_march'.$i}._(' le poste comptable [').$poste->id._('n\'existe pas'),9); } @@ -162,11 +182,14 @@ class Acc_Ledger_Sold extends Acc_Ledger { /*!\brief insert into the database, it calls first the verify function, * change the value of this->jr_id and this->jr_internal + * * It generates the document if gen_invoice is set and save the middle of payment if any ($e_mp) + * *\param $p_array is usually $_POST or a predefined operation *\return string *\note throw an Exception */ public function insert($p_array) { + extract ($p_array); $this->verify($p_array) ; @@ -187,7 +210,17 @@ class Acc_Ledger_Sold extends Acc_Ledger { $cust=new fiche($this->db); $cust->get_by_qcode($e_client); - $poste=$cust->strAttribut(ATTR_DEF_ACCOUNT); + $sposte=$cust->strAttribut(ATTR_DEF_ACCOUNT); + + // if 2 accounts, take only the debit one for the customer + // + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste=$array[0]; + } else { + $poste=$sposte; + } + bcscale(4); try { $tot_amount=0; @@ -207,7 +240,17 @@ class Acc_Ledger_Sold extends Acc_Ledger { $tot_amount+=$amount; $acc_operation=new Acc_Operation($this->db); $acc_operation->date=$e_date; - $acc_operation->poste=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + $sposte=$fiche->strAttribut(ATTR_DEF_ACCOUNT); + + // if 2 accounts, take only the credit one + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[1]; + } else { + $poste_val=$sposte; + } + + $acc_operation->poste=$poste_val; $acc_operation->amount=$amount; $acc_operation->grpt=$seq; $acc_operation->jrn=$p_jrn; @@ -347,7 +390,7 @@ class Acc_Ledger_Sold extends Acc_Ledger { " jr_grpt_id = ".$seq); /* Save the attachment or generate doc*/ - if ( isset ($_FILES)) { + if ( isset ($_FILES['pj'])) { if ( strlen(trim($_FILES['pj']['name'])) != 0 ) $this->db->save_upload_document($seq); else @@ -379,7 +422,17 @@ class Acc_Ledger_Sold extends Acc_Ledger { /* Insert paid by */ $acc_pay=new Acc_Operation($this->db); $acc_pay->date=$e_date; - $acc_pay->poste=$acfiche->strAttribut(ATTR_DEF_ACCOUNT); + /* get the account and explode if necessary */ + $sposte=$acfiche->strAttribut(ATTR_DEF_ACCOUNT); + // if 2 accounts, take only the debit one for customer + if ( strpos($sposte,',') != 0 ) { + $array=explode(',',$sposte); + $poste_val=$array[0]; + } else { + $poste_val=$sposte; + } + + $acc_pay->poste=$poste_val; $acc_pay->qcode=$fqcode; $acc_pay->amount=abs(round($tot_debit,2)); $acc_pay->desc=$e_comm; diff --git a/include/class_acc_operation.php b/include/class_acc_operation.php index d991eb4e0..c495c4ce9 100644 --- a/include/class_acc_operation.php +++ b/include/class_acc_operation.php @@ -22,14 +22,14 @@ /*!\file * \brief this file match the tables jrn & jrnx the purpose is to - * remove or save accountant writing to these table. + * remove or save accountant writing to these table. */ require_once ('class_user.php'); /*! \brief this file match the tables jrn & jrnx the purpose is to - * remove or save accountant writing to these table. + * remove or save accountant writing to these table. * */ -class Acc_Operation +class Acc_Operation { var $db; /*!< database connx */ var $jr_id; /*!< pk of jrn */ @@ -42,7 +42,7 @@ var $jr_id; /*!< pk of jrn */ var $periode; /*!< periode to use */ var $amount; /*!< amount of the operatoin */ var $grpt; /*!< the group id */ -/*! +/*! * \brief constructor set automatically the attributes user and periode * \param $p_cn the databse connection */ @@ -54,12 +54,21 @@ var $jr_id; /*!< pk of jrn */ $this->periode=$user->get_periode(); $this->jr_id=0; } - /* ************************************************** - *\brief Insert into the table Jrn - * - * - * \return nothing - * + /** + *@brief Insert into the table Jrn + *The needed data are : + * - this->date + * - this->amount + * - this->poste + * - this->grpt + * - this->jrn + * - this->type ( debit or credit) + * - this->user + * - this->periode + * - this->qcode + * - this->desc optional + *@note if the amount is less than 0 then side changes, for example debit becomes + *a credit and vice versa */ function insert_jrnx() @@ -71,23 +80,24 @@ var $jr_id; /*!< pk of jrn */ } $this->amount=abs($this->amount); $debit=($this->type=='c')?'false':'true'; - + $this->desc=(isset($this->desc))?$this->desc:''; $Res=$this->db->exec_sql("select insert_jrnx - ($1::text,abs($2)::numeric,$3::poste_comptable,$4::integer,$5::integer,$6::bool,$7::text,$8::integer,upper($9))", + ($1::text,abs($2)::numeric,$3::poste_comptable,$4::integer,$5::integer,$6::bool,$7::text,$8::integer,upper($9),$10::text)", array( - $this->date, - round($this->amount,2), - $this->poste, - $this->grpt, - $this->jrn, - $debit, - $this->user, - $this->periode, - $this->qcode)); + $this->date, //$1 + round($this->amount,2), //$2 + $this->poste, //$3 + $this->grpt, //$4 + $this->jrn, //$5 + $debit, //$6 + $this->user, //$7 + $this->periode, //$8 + $this->qcode, // $9 + $this->desc)); //$10 if ( $Res==false) return $Res; $this->jrnx_id=$this->db->get_current_seq('s_jrn_op'); return $this->jrnx_id; - + } /*!\brief set the pj of a operation in jrn. the jr_id must be set *\note if the jr_id it fails @@ -120,10 +130,10 @@ var $jr_id; /*!< pk of jrn */ /* check if the new pj numb exist */ $c=$this->db->count_sql("select jr_id from jrn where jr_pj_number=$1 and jr_def_id=$2", array($this->pj,$this->jrn) - ); + ); if ( $c == 0 ) { $flag=1; break;} $limit--; - } + } /* a pj numb is found */ if ( $flag == 1 ) { $sql="update jrn set jr_pj_number=$1 where jr_id=$2"; @@ -134,12 +144,11 @@ var $jr_id; /*!< pk of jrn */ } /*! - ************************************************** - *\brief Insert into the table Jrn, the amount is computed from jrnx thanks the + *\brief Insert into the table Jrn, the amount is computed from jrnx thanks the * group id ($p_grpt) - * - * \return sequence - * + * + * \return sequence of jr_id + * */ function insert_jrn() @@ -148,7 +157,7 @@ var $jr_id; /*!< pk of jrn */ $diff=$this->db->get_value("select check_balance ($1)",array($this->grpt)); if ( $diff != 0 ) { - + echo "Erreur : balance incorrecte :diff = $diff"; return false; } @@ -158,7 +167,7 @@ var $jr_id; /*!< pk of jrn */ $this->mt=microtime(true); } // if amount == -1then the triggers will throw an error - // + // $Res=$this->db->exec_sql("insert into jrn (jr_def_id,jr_montant,jr_comment,". "jr_date,jr_ech,jr_grpt_id,jr_tech_per,jr_mt) values (". "$1,$2,$3,". @@ -177,7 +186,7 @@ var $jr_id; /*!< pk of jrn */ * */ function get_internal() { - if ( ! isset($this->jr_id) ) + if ( ! isset($this->jr_id) ) throw new Exception('jr_id is not set',1); $Res=$this->db->exec_sql("select jr_internal from jrn where jr_id=".$this->jr_id); if ( Database::num_row($Res) == 0 ) return null; @@ -196,7 +205,7 @@ function get_internal() { $this->jr_id=Database::fetch_result($Res,0,0); return 0; } - /*!\brief retrieve data from jrnx + /*!\brief retrieve data from jrnx * \return an array */ function get_jrnx_detail() { @@ -231,7 +240,7 @@ function get_internal() { return $row; } /*!\brief display_jrnx_detail : get the data from get_jrnx_data and - return a string with HTML code + return a string with HTML code * \param table(=0 no code for table,1 code for table,2 code for CSV) */ @@ -253,7 +262,7 @@ function get_internal() { $r.=$a; $csv.='"'.$a.'";'; $r.=''; - + $r.=''; $a=$l['j_poste']; $r_notable.=$a; @@ -268,14 +277,14 @@ function get_internal() { $r.=h($a); $csv.='"'.$a.'";'; $r.=''; - + $r.=''; $a=$l['j_montant']; $r_notable.=$a; $r.=$a; $csv.=$a.';'; $r.=''; - + $r.=''; $a=$l['debit']; $r_notable.=$a; @@ -284,7 +293,7 @@ function get_internal() { $csv.="\r\n"; $r.=''; - + $r.=''; } switch ($p_table) { @@ -299,9 +308,9 @@ function get_internal() { } return "ERROR PARAMETRE"; } -/*! +/*! * @brief Get data from jrnx where p_grpt=jrnx(j_grpt) - * + * * @param connection * @return array of 3 elements * - First Element is an array @@ -312,27 +321,27 @@ Array [class_cred0] => 7000008 [mont_cred0] => 8880.0000 [op_cred0] => 754 - [text_cred0] => + [text_cred0] => [jr_internal] => 23VEN-01-302 - [comment] => - [ech] => + [comment] => + [ech] => [jr_id] => 302 [jr_def_id] => 2 [class_deb0] => 4000005 [mont_deb0] => 10744.8000 - [text_deb0] => + [text_deb0] => [op_deb0] => 755 [class_cred1] => 4511 [mont_cred1] => 1864.8000 [op_cred1] => 756 - [text_cred1] => + [text_cred1] => ) @endverbatim - * - Second : number of line with debit + * - Second : number of line with debit * - Third : number of line with credit - */ + */ function get_data ($p_grpt) { - $Res=$this->db->exec_sql("select + $Res=$this->db->exec_sql("select to_char(j_date,'DD.MM.YYYY') as j_date, j_text, j_debit, @@ -349,7 +358,7 @@ Array if ( $MaxLine == 0 ) return null; $deb=0;$cred=0; for ( $i=0; $i < $MaxLine; $i++) { - + $l_line=Database::fetch_array($Res,$i); $l_array['op_date']=$l_line['j_date']; if ( $l_line['j_debit'] == 't' ) { diff --git a/include/class_acc_payment.php b/include/class_acc_payment.php index 36a3c28e0..fcf994d5b 100644 --- a/include/class_acc_payment.php +++ b/include/class_acc_payment.php @@ -94,6 +94,15 @@ class Acc_Payment public function insert() { if ( $this->verify() != 0 ) return; + $sql='INSERT INTO mod_payment( + mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) + VALUES ($1, $2, $3, $4, upper($5)) returning mp_id'; + $this->mp_id=$this->cn->exec_sql($sql,array( + $this->mp_lib, + $this->mp_jrn_def_id, + $this->mp_type, + $this->mp_fd_id, + $this->mp_qcode)); } public function update() { @@ -140,8 +149,12 @@ class Acc_Payment $row=Database::fetch_array($res,0); foreach ($row as $idx=>$value) { $this->$idx=$value; } } + /** + *@brief remove a middle of payment + */ public function delete() { - + $sql="delete from mod_payment where mp_id=$1"; + $this->cn->exec_sql($sql,array($this->mp_id)); } /*!\brief retrieve all the data for a certain type *\param non @@ -314,9 +327,45 @@ class Acc_Payment */ public function from_array($p_array) { $idx=array('mp_id','mp_lib','mp_fd_id','mp_jrn_def_id','mp_qcode','mp_type'); - foreach ($idx as $l) + foreach ($idx as $l) if (isset($p_array[$l])) $this->$l=$p_array[$l]; } + /** + *@brief return an html with a form to add a new middle of payment + */ + public function blank() { + //label + $lib=new IText('mp_lib'); + $f_lib=$lib->input(); + // Type of ledger + $tledger=new ISelect('mp_type'); + $tledger->value=array(array ('value'=>'ACH','label'=>_('Achat')), + array ('value'=>'VEN','label'=>_('Vente'))); + $f_type=$tledger->input(); + + // type of card + $tcard=new ISelect('mp_fd_id'); + $tcard->value=$this->cn->make_array('select fd_id,fd_label from fiche_def join fiche_def_ref '. + ' using (frd_id) where frd_id in (25,4) order by fd_label'); + $f_type_fiche=$tcard->input(); + $ledger_record=new ISelect('mp_jrn_def_id'); + $ledger_record->value=$this->cn->make_array("select jrn_def_id,jrn_Def_name from + jrn_def where jrn_def_type in ('ODS','FIN')"); + $f_ledger_record=$ledger_record->input(); + + // the card + $qcode=new ICard(); + $qcode->noadd=true; + $qcode->name='mp_qcode'; + $list=$this->cn->make_list('select fd_id from fiche_def where frd_id in (25,4)'); + $qcode->extra=$list; + $f_qcode=$qcode->input(); + ob_start(); + require_once('template/new_mod_payment.php'); + $r=ob_get_contents(); + ob_end_clean(); + return $r; + } /*!\brief test function */ static function test_me() { diff --git a/include/class_acc_reconciliation.php b/include/class_acc_reconciliation.php index 454a28d82..581519cb8 100644 --- a/include/class_acc_reconciliation.php +++ b/include/class_acc_reconciliation.php @@ -68,7 +68,7 @@ class Acc_Reconciliation { return; if ( strpos($jr_id2,',') !== 0 ) { - $aRapt=split(',',$jr_id2); + $aRapt=explode(',',$jr_id2); foreach ($aRapt as $rRapt) { if ( isNumber($rRapt) == 1 ) { diff --git a/include/class_acc_tva.php b/include/class_acc_tva.php index 124d099e0..6d8a82821 100644 --- a/include/class_acc_tva.php +++ b/include/class_acc_tva.php @@ -131,7 +131,7 @@ class Acc_Tva */ public function get_side($p_side) { if ( strlen($this->tva_poste) == 0 ) $this->load(); - list($deb,$cred)=split(",",$this->tva_poste); + list($deb,$cred)=explode(",",$this->tva_poste); switch ($p_side) { case 'd': return $deb; diff --git a/include/class_fiche.php b/include/class_fiche.php index d8ce4b893..7e49a788d 100644 --- a/include/class_fiche.php +++ b/include/class_fiche.php @@ -1,4 +1,4 @@ -quick_code; $p_qcode=trim($p_qcode); - $sql="select f_id from jnt_fic_att_value join attr_value + $sql="select f_id from jnt_fic_att_value join attr_value using (jft_id) where ad_id=23 and av_text=upper($1)"; $this->id=$this->cn->get_value($sql,array($p_qcode)); if ( $this->cn->count()==0) { @@ -93,9 +93,9 @@ class fiche { if ( $this->id == 0){ return; } - $sql="select * - from jnt_fic_att_value - natural join fiche + $sql="select * + from jnt_fic_att_value + natural join fiche natural join attr_value join jnt_fic_attr on (jnt_fic_attr.fd_id=fiche.fd_id and jnt_fic_attr.ad_id=jnt_fic_att_value.ad_id) join attr_def on (attr_def.ad_id=jnt_fic_att_value.ad_id) where f_id=".$this->id. @@ -122,10 +122,10 @@ class fiche { foreach ($e->attribut as $f ) { $flag=0; foreach ($this->attribut as $g ) { - if ( $g->ad_id == $f->ad_id ) + if ( $g->ad_id == $f->ad_id ) $flag=1; } - if ( $flag == 0 ) { + if ( $flag == 0 ) { // there's a missing one, we insert it $t=new Attribut ($f->ad_id); $t->av_text=""; @@ -135,15 +135,26 @@ class fiche { $Max++; } // if flag == 0 - }// foreach + }// foreach $this->attribut=SortAttributeById($this->attribut); }//missing attribut } + /** + * @brief find the card with the p_attribut equal to p_value, it is not case sensitive + * @param $p_attribut attribute to find see table attr_def + * @param $p_value value in attr_value.av_text + * @return return ARRAY OF jft_id,f_id,fd_id,ad_id,av_text + */ + function seek($p_attribut,$p_value){ + $sql="select jft_id,f_id,fd_id,ad_id,av_text from fiche join jnt_fic_att_value using (f_id) join attr_value + using (jft_id) where ad_id=$1 and upper(av_text)=upper($2)"; + $res=$this->cn->get_array($sql,array($p_attribut,$p_value)); + return $res; + } - -/*! +/*! * \brief give the size of a card object * * \return size @@ -156,10 +167,10 @@ class fiche { } -/*! +/*! ************************************************** * \brief Return array of card from the frd family - * + * * \param $p_frd_id the fiche_def_ref.frd_id * \param $p_search p_search is a filter on the name * \param $p_sql extra sql condition @@ -167,11 +178,11 @@ class fiche { * \return array of fiche object */ function CountByDef($p_frd_id,$p_search="",$p_sql="") { - $sql="select * + $sql="select * from fiche join fiche_Def using (fd_id) where frd_id=".$p_frd_id; - if ( $p_search != "" ) + if ( $p_search != "" ) { $a=FormatString($p_search); $sql="select * from vw_fiche_attr where frd_id=".$p_frd_id. @@ -179,14 +190,14 @@ class fiche { } $Ret=$this->cn->exec_sql($sql.$p_sql); - + return Database::num_row($Ret) ; } -/*! +/*! ************************************************** * \brief Return array of card from the frd family - * - * + * + * * \param $p_frd_id the fiche_def_ref.frd_id * \param $p_offset * \param $p_search is an optional filter @@ -194,17 +205,17 @@ class fiche { * \return array of fiche object */ function GetByDef($p_frd_id,$p_offset=-1,$p_search="") { - if ( $p_offset == -1 ) + if ( $p_offset == -1 ) { - $sql="select * + $sql="select * from fiche join fiche_Def using (fd_id) where frd_id=".$p_frd_id." $p_search order by f_id"; - } - else + } + else { $limit=($_SESSION['g_pagesize']!=-1)?"limit ".$_SESSION['g_pagesize']:""; - $sql="select * + $sql="select * from fiche join fiche_Def using (fd_id) where frd_id=".$p_frd_id." $p_search order by f_id " @@ -235,17 +246,17 @@ class fiche { " ". $this->attribut_def.""; } -/*! +/*! ************************************************** * \brief return the string of the given attribute - * (attr_def.ad_id) + * (attr_def.ad_id) * \param $p_ad_id the AD_ID from attr_def.ad_id * \see constant.php * \return string */ - function strAttribut($p_ad_id) + function strAttribut($p_ad_id) { - if ( sizeof ($this->attribut) == 0 ) + if ( sizeof ($this->attribut) == 0 ) { if ($this->id==0) return '- ERROR -'; @@ -255,15 +266,15 @@ class fiche { $Res=$this->cn->exec_sql($sql); $row=Database::fetch_all($Res); // if not found return error - if ( $row == false ) + if ( $row == false ) return ' - ERROR -'; - + return $row[0]['av_text']; } foreach ($this->attribut as $e) { - if ( $e->ad_id == $p_ad_id ) + if ( $e->ad_id == $p_ad_id ) return $e->av_text; } return '- ERROR -'; @@ -276,15 +287,15 @@ Example Array ( [av_text1] => Nom - [av_text12] => Personne de contact + [av_text12] => Personne de contact [av_text5] => Poste Comptable - [av_text13] => numéro de tva - [av_text14] => Adresse + [av_text13] => numéro de tva + [av_text14] => Adresse [av_text15] => code postal [av_text24] => Ville - [av_text16] => pays - [av_text17] => téléphone - [av_text18] => email + [av_text16] => pays + [av_text17] => téléphone + [av_text18] => email [av_text23] => Quick Code ) @@ -310,15 +321,15 @@ Array return $array; } -/*! +/*! * \brief insert a new record * show a blank card to be filled - * + * * \param $p_fiche_def is the fiche_def.fd_id - * + * * \return HTML Code */ - function blank($p_fiche_def) + function blank($p_fiche_def) { // array = array of attribute object sorted on ad_id $f=new fiche_def($this->cn,$p_fiche_def); @@ -328,7 +339,7 @@ Array foreach ($array as $attr) { $msg=""; - if ( $attr->ad_id == ATTR_DEF_ACCOUNT) + if ( $attr->ad_id == ATTR_DEF_ACCOUNT) { $w=new IPoste("av_text".$attr->ad_id); $w->set_attribute('ipopup','ipop_account'); @@ -340,26 +351,26 @@ Array $a=Database::fetch_array($ret_sql,0); $label=new ISpan(); $label->name="av_text".$attr->ad_id."_label"; - + if ( $a['account_auto'] == 't' ) $msg.="".$label->input()."
"._("Rappel: Poste créé automatiquement à partir de ").$f->class_base." "; - else + else { // if there is a class base in fiche_def_ref, this account will be the // the default one - if ( strlen(trim($f->class_base)) != 0 ) + if ( strlen(trim($f->class_base)) != 0 ) { $msg.="".$label->input()."
"._("Rappel: Poste par défaut sera "). $f->class_base. " ! "; $w->value=$f->class_base; } - + } $r.="".td("Poste Comptable","input_text").td($w->input())."$msg "; continue; } - elseif ( $attr->ad_id == ATTR_DEF_TVA) + elseif ( $attr->ad_id == ATTR_DEF_TVA) { $r.=JS_SHOW_TVA; $w=new ITva(); @@ -370,7 +381,7 @@ Array $r.=JS_LEDGER; $w=new ICard(); // filter on frd_id - $sql=' select fd_id from fiche_def where frd_id in ('.FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX.')'; + $sql=' select fd_id from fiche_def where frd_id in ('.FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX.')'; $filter=$this->cn->make_list($sql); $w->extra=$filter; $w->extra2=0; @@ -393,16 +404,16 @@ Array return $r; } - -/*! + +/*! * \brief Display object instance, getAttribute * sort the attribute and add missing ones * \param $p_readonly true= if can not modify, otherwise false - * + * * * \return string to display */ - function Display($p_readonly) + function Display($p_readonly) { $this->GetAttribut(); $attr=$this->attribut; @@ -411,21 +422,21 @@ Array if ( empty ($attr) ) { return "Fiche non trouvée"; } - foreach ( $attr as $r) + foreach ( $attr as $r) { $msg=""; $bulle=""; - if ( $p_readonly) + if ( $p_readonly) { $w=new IText(); $w->table=1; $w->readOnly=true; - + } if ($p_readonly==false) { - if ( $r->ad_id == ATTR_DEF_ACCOUNT) + if ( $r->ad_id == ATTR_DEF_ACCOUNT) { $w=new IPoste("av_text".$r->ad_id); $w->set_attribute('ipopup','ipop_account'); @@ -443,7 +454,7 @@ Array $bulle.=HtmlInput::warnbulle(11); } - elseif ( $r->ad_id == ATTR_DEF_TVA) + elseif ( $r->ad_id == ATTR_DEF_TVA) { $ret.=JS_SHOW_TVA; $w=new ITva(); @@ -455,16 +466,16 @@ Array $ret.=JS_LEDGER; $w=new ISearch(); // filter on frd_id - $w->extra=FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX; + $w->extra=FICHE_TYPE_CLIENT.','.FICHE_TYPE_FOURNISSEUR.','.FICHE_TYPE_ADM_TAX; $w->extra2=0; // jrn = 0 $w->table=1; - + $label=new ISpan(); $label->name="av_text".$r->ad_id."_label"; $msg=$label->input(); } - - else + + else { $w=new IText(); $w->table=1; @@ -480,42 +491,42 @@ Array $ret.=""; return $ret; } - /*! + /*! * \brief Save a card, call insert or update - * + * * \param p_fiche_def (default 0) */ - function Save($p_fiche_def=0) + function Save($p_fiche_def=0) { // new card or only a update ? - if ( $this->id == 0 ) + if ( $this->id == 0 ) $this->insert($p_fiche_def); else $this->update(); } -/*! +/*! * \brief insert a new record - * + * * \param p_fiche_def fiche_def.fd_id * \param p_array is the array containing the data */ - function insert($p_fiche_def,$p_array=null) + function insert($p_fiche_def,$p_array=null) { if ( $p_array == null) $p_array=$_POST; - + $fiche_id=$this->cn->get_next_seq('s_fiche'); $this->id=$fiche_id; // first we create the card $this->cn->start(); - try + try { - $sql=sprintf("insert into fiche(f_id,fd_id)". + $sql=sprintf("insert into fiche(f_id,fd_id)". " values (%d,%d)", $fiche_id,$p_fiche_def); $Ret=$this->cn->exec_sql($sql); // parse the $p_array array - foreach ($p_array as $name=>$value ) + foreach ($p_array as $name=>$value ) { echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ; /* avoid the button for searching an accounting item */ @@ -523,10 +534,10 @@ Array list ($id) = sscanf ($name,"av_text%d"); if ( $id == null ) continue; echo_debug("class_fiche",__LINE__,"add $id"); - + // Special traitement // quickcode - if ( $id == ATTR_DEF_QUICKCODE) + if ( $id == ATTR_DEF_QUICKCODE) { echo_debug("Modify ATTR_DEF_QUICKCODE"); $sql=sprintf("select insert_quick_code(%d,'%s')", @@ -534,7 +545,7 @@ Array $this->cn->exec_sql($sql); continue; } - // stock + // stock if ( $id == ATTR_DEF_STOCK ) { $st=$this->cn->count_sql('select * from stock_goods where '. " upper(sg_code)=upper('$value')"); @@ -548,32 +559,30 @@ Array 'initial', FormatString($value), $exercice); - + $this->cn->exec_sql($str_stock); } } // name - if ( $id == ATTR_DEF_NAME ) + if ( $id == ATTR_DEF_NAME ) { echo_debug("Modify ATTR_DEF_NAME"); if ( strlen(trim($value)) == 0 ) $value="pas de nom"; - + } // account - if ( $id == ATTR_DEF_ACCOUNT ) + if ( $id == ATTR_DEF_ACCOUNT ) { echo_debug("insert ATTR_DEF_ACCOUNT"); $v=FormatString($value); try { - if ( - isNumber($v) == 1 - ) + if (isNumber($v) == 1 || strpos($v,',') != 0) { - $sql=sprintf("select account_insert(%d,%f)", + $sql=sprintf("select account_insert(%d,'%s')", $this->id,$v); } - else + else { $sql=sprintf("select account_insert(%d,null)", $this->id); @@ -588,13 +597,13 @@ Array continue; } // TVA - if ( $id == ATTR_DEF_TVA ) + if ( $id == ATTR_DEF_TVA ) { echo_debug("Modify ATTR_DEF_TVA"); // Verify if the rate exists, if not then do not update - if ( strlen(trim($value)) != 0 ) + if ( strlen(trim($value)) != 0 ) { - if ( $this->cn->count_sql("select * from tva_rate where tva_id=".$value) == 0) + if ( $this->cn->count_sql("select * from tva_rate where tva_id=".$value) == 0) { echo_debug("class_fiche",__LINE__,"Tva invalide $value"); continue; @@ -602,25 +611,25 @@ Array } } // The contact has a company attribut - if ( $id == ATTR_DEF_COMPANY ) + if ( $id == ATTR_DEF_COMPANY ) { $exist=$this->cn->count_sql("select f_id from fiche join fiche_def using (fd_id) ". " join jnt_fic_att_value using (f_id) join attr_value using (jft_id) ". " where frd_id in (8,9,14) and ad_id=".ATTR_DEF_QUICKCODE. " and av_text='".FormatString($value)."'"); - if ( $exist == 0 && FormatString($value) != null ) + if ( $exist == 0 && FormatString($value) != null ) { $value=""; } } // Normal traitement $value2=FormatString($value); - + $sql=sprintf("select attribut_insert(%d,%d,'%s')", $fiche_id,$id,trim($value2)); $this->cn->exec_sql($sql); } - } catch (Exception $e) + } catch (Exception $e) { $this->cn->rollback(); throw ($e); @@ -630,11 +639,11 @@ Array return; } - + /*!\brief update a card */ - function update($p_array=null) + function update($p_array=null) { if ( $p_array == null) $p_array=$_POST; @@ -642,13 +651,13 @@ Array try { $this->cn->start(); // parse the $p_array array - foreach ($p_array as $name=>$value ) + foreach ($p_array as $name=>$value ) { echo_debug ("class_fiche",__LINE__,"Name = $name value $value") ; list ($id) = sscanf ($name,"av_text%d"); if ( $id == null ) continue; echo_debug("class_fiche",__LINE__,"modify $id"); - + // retrieve jft_id to update table attr_value $sql=" select jft_id from jnt_fic_att_value where ad_id=$id and f_id=$this->id"; $Ret=$this->cn->exec_sql($sql); @@ -656,23 +665,23 @@ Array // we need to insert this new attribut echo_debug ("class_fiche ".__LINE__." adding id !!! "); $jft_id=$this->cn->get_next_seq('s_jnt_fic_att_value'); - + $sql2=sprintf("insert into jnt_fic_att_value(jft_id,ad_id,f_id) values (%s,%s,%s)", $jft_id,$id,$this->id); - + $ret2=$this->cn->exec_sql($sql2); // insert a null value for this attribut $sql3=sprintf("insert into attr_value(jft_id,av_text) values (%s,null)", $jft_id); $ret3=$this->cn->exec_sql($sql3); - } else + } else { $tmp=Database::fetch_array($Ret,0); $jft_id=$tmp['jft_id']; } // Special traitement // quickcode - if ( $id == ATTR_DEF_QUICKCODE) + if ( $id == ATTR_DEF_QUICKCODE) { echo_debug("Modify ATTR_DEF_QUICKCODE"); $sql=sprintf("select update_quick_code(%d,'%s')", @@ -681,13 +690,13 @@ Array continue; } // name - if ( $id == ATTR_DEF_NAME ) + if ( $id == ATTR_DEF_NAME ) { echo_debug("Modify ATTR_DEF_NAME"); if ( strlen(trim($value)) == 0 ) continue; - - + + } if ( $id == ATTR_DEF_STOCK ) { $st=$this->cn->count_sql('select * from stock_goods where '. @@ -714,30 +723,24 @@ Array } // account - if ( $id == ATTR_DEF_ACCOUNT ) + if ( $id == ATTR_DEF_ACCOUNT ) { echo_debug("Modify ATTR_DEF_ACCOUNT"); $v=FormatString($value); echo_debug("Value = $v"); - if ( isNumber($v) == 1 ) + if ( isNumber($v) == 1 || strpos($v,',') != 0 ) { - $sql=sprintf("select account_update(%d,%d)", + $sql=sprintf("select account_update(%d,'%s')", $this->id,$v); try { $this->cn->exec_sql($sql); - /* update also the jrnx */ - $sql='update jrnx set j_poste=$1 where j_qcode in (select quick_code from vw_fiche_attr where f_id=$2)'; - $this->cn->exec_sql( - $sql, - array($v,$this->id)); - } catch (Exception $e) { throw new Exception(__LINE__."Erreur : ce compte [$v] n'a pas de compte parent.". "L'opération est annulée"); } - continue; + continue; } - if ( strlen (trim($v)) == 0 ) + if ( strlen (trim($v)) == 0 ) { $sql=sprintf("select account_update(%d,null)", @@ -760,33 +763,33 @@ Array } } // TVA - if ( $id == ATTR_DEF_TVA ) + if ( $id == ATTR_DEF_TVA ) { echo_debug("Modify ATTR_DEF_TVA"); // Verify if the rate exists, if not then do not update - if ( strlen(trim($value)) != 0 ) + if ( strlen(trim($value)) != 0 ) { - if ( $this->cn->count_sql("select * from tva_rate where tva_id=".$value) == 0) + if ( $this->cn->count_sql("select * from tva_rate where tva_id=".$value) == 0) { echo_debug("class_fiche",__LINE__,"Tva invalide $value"); continue; } } } - if ( $id == ATTR_DEF_COMPANY ) + if ( $id == ATTR_DEF_COMPANY ) { $exist=$this->cn->count_sql("select f_id from fiche join fiche_def using (fd_id) ". " join jnt_fic_att_value using (f_id) join attr_value using (jft_id) ". " where frd_id in (8,9,14) and ad_id=".ATTR_DEF_QUICKCODE. " and av_text='".FormatString($value)."'"); - - - if ( $exist == 0 && FormatString($value) != null ) + + + if ( $exist == 0 && FormatString($value) != null ) { $value="Attention : pas de société "; } } - + // Normal traitement $value2=FormatString($value); $sql=sprintf("update attr_value set av_text='%s' where jft_id=%d", @@ -802,11 +805,11 @@ Array } $this->cn->commit(); return; - + } /*!\brief remove a card */ - function remove() + function remove() { if ( $this->id==0 ) return; // verify if that card has not been used is a ledger @@ -821,7 +824,7 @@ Array if ( $this->cn->count_sql("select * from jrnx where j_qcode='".Database::escape_string($qcode)."'") != 0) { - alert('Impossible cette fiche est utilisée dans un journal'); + alert('Impossible cette fiche est utilisée dans un journal'); return; } @@ -832,9 +835,9 @@ Array if ( trim(strlen($class)) != 0 && isNumber($class) == 1 ) $is_used_jrnx= $this->cn->count_sql("select * from jrnx where j_poste=$class"); // if class is not NULL and if we use it before, we can't remove it - if (FormatString($class) != null && $is_used_jrnx != 0 ) + if (FormatString($class) != null && $is_used_jrnx != 0 ) { - alert('Impossible ce poste est utilisée dans un journal'); + alert('Impossible ce poste est utilisée dans un journal'); return; } else @@ -843,22 +846,22 @@ Array { $this->cn->exec_sql("delete from tmp_pcmn where pcm_val=$class"); } - + } $this->delete(); } /*!\brief return the name of a card - * + * */ - function getName() + function getName() { - $sql="select av_text from jnt_fic_att_value join attr_value + $sql="select av_text from jnt_fic_att_value join attr_value using (jft_id) where ad_id=1 and f_id=".$this->id; $Res=$this->cn->exec_sql($sql); $r=Database::fetch_all($Res); - if ( sizeof($r) == 0 ) + if ( sizeof($r) == 0 ) return 1; return $r[0]['av_text']; } @@ -866,20 +869,20 @@ Array /*!\brief return the quick_code of a card * \return null if not quick_code is found */ - function get_quick_code() + function get_quick_code() { - $sql="select av_text from jnt_fic_att_value join attr_value + $sql="select av_text from jnt_fic_att_value join attr_value using (jft_id) where ad_id=23 and f_id=".$this->id; $Res=$this->cn->exec_sql($sql); $r=Database::fetch_all($Res); - if ( sizeof($r) == 0 ) + if ( sizeof($r) == 0 ) return null; return $r[0]['av_text']; } /*!\brief Synonum of fiche::getAttribut */ - function Get() + function Get() { echo_debug('class_client',__LINE__,'Get'); fiche::getAttribut(); @@ -887,9 +890,9 @@ Array /*!\brief get all the card thanks the fiche_def_ref * \param $p_offset (default =-1) * \param $p_search sql condition - * \return array of fiche object + * \return array of fiche object */ - function GetAll($p_offset=-1,$p_search="") + function GetAll($p_offset=-1,$p_search="") { return fiche::GetByDef($this->fiche_def_ref,$p_offset,$p_search); } @@ -897,12 +900,12 @@ Array * card (bank, purchase...) * (fiche_def_ref primary key) */ - function get_fiche_def_ref_id() + function get_fiche_def_ref_id() { $result=$this->cn->get_array("select frd_id from fiche join fiche_Def using (fd_id) where f_id=".$this->id); if ( $result == null ) return null; - + return $result[0]['frd_id']; } /** @@ -926,18 +929,18 @@ Array $this->row=$array; return array($array,$tot_deb,$tot_cred); } - /*! - * \brief Get data for poste - * + /*! + * \brief Get data for poste + * * \param $p_from periode from * \param $p_to end periode * \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) * (tot_deb,tot_credit * - */ + */ function get_row_date($p_from,$p_to) { - if ( $this->id == 0 ) + if ( $this->id == 0 ) { echo_error("class_fiche",__LINE__,"id is 0"); return; @@ -959,18 +962,18 @@ Array return $this->get_row_result($Res); } - /*! - * \brief Get data for poste - * + /*! + * \brief Get data for poste + * * \param $p_from periode from * \param $p_to end periode * \return double array (j_date,deb_montant,cred_montant,description,jrn_name,j_debit,jr_internal) * (tot_deb,tot_credit * - */ + */ function get_row($p_from,$p_to) { - if ( $this->id == 0 ) + if ( $this->id == 0 ) { echo_error("class_fiche",__LINE__,"id is 0"); return; @@ -988,28 +991,28 @@ Array " where j_qcode='".$qcode."' and ".$periode. " order by j_date::date"); return $this->get_row_result($Res); - + } - /*! + /*! * \brief HtmlTable, display a HTML of a card for the asked period * \return none */ function HtmlTableDetail($p_array=null) - { + { if ( $p_array == null) $p_array=$_REQUEST; $name=$this->getName(); - + list($array,$tot_deb,$tot_cred)=$this->get_row_date( $p_array['from_periode'], $p_array['to_periode'] ); - - if ( count($this->row ) == 0 ) + + if ( count($this->row ) == 0 ) return; - + $rep=""; - + echo '

'.$this->id." ".$name.'

'; echo ""; echo "". @@ -1019,8 +1022,8 @@ Array "". "". ""; - - foreach ( $this->row as $op ) { + + foreach ( $this->row as $op ) { echo "". "". "". @@ -1031,7 +1034,7 @@ Array $ac=new Acc_Operation($this->cn); $ac->jr_id=$op['jr_id']; echo $ac->display_jrnx_detail(1); - + } $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; $diff=round(abs($tot_deb-$tot_cred),2); @@ -1042,31 +1045,31 @@ Array "". "". ""; - + echo "
Montant Débit/Crédit
".$op['jr_internal']."".$op['j_date']."$tot_deb$tot_cred
"; - + return; } - /*! + /*! * \brief HtmlTable, display a HTML of a card for the asked period - * \param $p_array default = null keys = from_periode, to_periode + * \param $p_array default = null keys = from_periode, to_periode */ function HtmlTable($p_array=null) - { + { if ( $p_array == null) $p_array=$_REQUEST; $name=h($this->getName()); - + list($array,$tot_deb,$tot_cred)=$this->get_row_date( $p_array['from_periode'], $p_array['to_periode'] ); - - if ( count($this->row ) == 0 ) + + if ( count($this->row ) == 0 ) return; - + $rep=""; - + echo '

'.$this->id." ".$name.'

'; echo ""; echo "". @@ -1076,8 +1079,8 @@ Array "". "". ""; - - foreach ( $this->row as $op ) { + + foreach ( $this->row as $op ) { echo "". "". "". @@ -1085,7 +1088,7 @@ Array "". "". ""; - + } $solde_type=($tot_deb>$tot_cred)?"solde débiteur":"solde créditeur"; $diff=round(abs($tot_deb-$tot_cred),2); @@ -1096,12 +1099,12 @@ Array "". "". ""; - + echo "
Débit Crédit
".$op['jr_internal']."".$op['j_date_fmt']."".$op['deb_montant']."".$op['cred_montant']."
$tot_deb$tot_cred
"; - + return; } - /*! + /*! * \brief Display HTML Table Header (button) * * \return none @@ -1115,12 +1118,12 @@ Array echo '
'; echo ""; echo ''; - + echo '"; - + echo '"; - + echo '"; echo "
'. HtmlInput::submit('bt_other',"Autre poste"). dossier::hidden(). $hid->input("type","poste").$hid->input('p_action','impress')."
'. HtmlInput::submit('bt_pdf',"Export PDF"). dossier::hidden(). @@ -1134,7 +1137,7 @@ Array echo $hid->input('oper_detail','on'); echo "
'. HtmlInput::submit('bt_csv',"Export CSV"). dossier::hidden(). @@ -1145,36 +1148,36 @@ Array $hid->input("to_periode",$p_array['to_periode']); if (isset($p_array['oper_detail'])) echo $hid->input('oper_detail','on'); - + echo "
"; echo '
'; - + } - /*! + /*! * \brief give the balance of an card * \return * balance of the card * - */ + */ function get_solde_detail($p_cond="") { if ( $this->id == 0 ) exit('fiche->id est nul'); $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); if ( $p_cond != "") $p_cond=" and ".$p_cond; - $Res=$this->cn->exec_sql("select sum(deb) as sum_deb, sum(cred) as sum_cred from - ( select j_poste, - case when j_debit='t' then j_montant else 0 end as deb, - case when j_debit='f' then j_montant else 0 end as cred - from jrnx - where + $Res=$this->cn->exec_sql("select sum(deb) as sum_deb, sum(cred) as sum_cred from + ( select j_poste, + case when j_debit='t' then j_montant else 0 end as deb, + case when j_debit='f' then j_montant else 0 end as cred + from jrnx + where j_qcode = ('$qcode'::text) $p_cond ) as m "); $Max=Database::num_row($Res); if ($Max==0) return 0; $r=Database::fetch_array($Res,0); - + return array('debit'=>$r['sum_deb'], 'credit'=>$r['sum_cred'], 'solde'=>abs($r['sum_deb']-$r['sum_cred'])); @@ -1185,8 +1188,8 @@ function get_solde_detail($p_cond="") { */ function empty_attribute($p_attr) { $sql="select av_text - from jnt_fic_att_value - natural join fiche + from jnt_fic_att_value + natural join fiche natural join attr_value left join attr_def using (ad_id) where f_id=".$this->id. " and ad_id = ".$p_attr. @@ -1196,24 +1199,24 @@ function empty_attribute($p_attr) { $text=Database::fetch_result($res,0,0); return (strlen(trim($text)) > 0)?false:true; - + } /*! Summary * \brief show the default screen - * - * \param p_search (filter) + * + * \param p_search (filter) * \param p_action show the action column - * + * * \return: string to display */ - function Summary($p_search="",$p_action="") + function Summary($p_search="",$p_action="") { $str_dossier=dossier::get(); $p_search=FormatString($p_search); $script=$_SERVER['PHP_SELF']; // Creation of the nav bar // Get the max numberRow - $all_tiers=$this->CountByDef($this->fiche_def_ref,$p_search); + $all_tiers=$this->CountByDef($this->fiche_def_ref,$p_search); // Get offset and page variable $offset=( isset ($_REQUEST['offset'] )) ?$_REQUEST['offset']:0; $page=(isset($_REQUEST['page']))?$_REQUEST['page']:1; @@ -1230,8 +1233,8 @@ function empty_attribute($p_attr) { if ( trim($p_search) != "" ) { $search=" and f_id in -(select f_id from jnt_fic_att_value - join fiche using (f_id) +(select f_id from jnt_fic_att_value + join fiche using (f_id) join attr_value using (jft_id) where ad_id=1 and av_text ~* '$p_search')"; @@ -1275,7 +1278,7 @@ $r.=''; $r.=sprintf(' %15.2f€',$a['credit']); $r.=sprintf(' %15.2f€',$a['solde']); - + $r.=""; } @@ -1283,10 +1286,10 @@ $r.=''; $r.=$bar; return $r; } -/*! +/*! * \brief get the fd_id of the card : fd_id, it set the attribute fd_id */ - function get_categorie() + function get_categorie() { if ( $this->id == 0 ) exit('class_fiche : f_id = 0 '); $sql='select fd_id from fiche where f_id='.$this->id; @@ -1296,39 +1299,39 @@ $r.=''; else $this->fd_id=$R; } -/*! +/*! *************************************************** * \brief Check if a fiche is used by a jrn * return 1 if the fiche is in the range otherwise 0, the quick_code * or the id must be set - * - * + * + * * \param $p_jrn journal_id * \param $p_type : deb or cred default empty - * + * * \return 1 if the fiche is in the range otherwise < 1 * -1 the card doesn't exist * -2 the ledger has no card to check - * + * */ function belong_ledger($p_jrn,$p_type="") { // check if we have a quick_code or a f_id - if (($this->quick_code==null || $this->quick_code == "" ) + if (($this->quick_code==null || $this->quick_code == "" ) && $this->id == 0 ) { echo 'erreur ni quick_code ni f_id ne sont donnes'; exit(); } //retrieve the quick_code - if ( $this->quick_code=="") + if ( $this->quick_code=="") $this->quick_code=$this->get_quick_code(); - if ( $this->quick_code==null) + if ( $this->quick_code==null) return -1; - if ( $this->id == 0 ) + if ( $this->id == 0 ) if ( $this->get_by_qcode(null,false) == 1) return -1; @@ -1343,10 +1346,10 @@ function belong_ledger($p_jrn,$p_type="") $Res=$this->cn->exec_sql("select $get as fiche from jrn_def where jrn_def_id=$p_jrn"); } else { // Get all the fiche type (deb and cred) - $Res=$this->cn->exec_sql(" select jrn_def_fiche_cred as fiche + $Res=$this->cn->exec_sql(" select jrn_def_fiche_cred as fiche from jrn_def where jrn_def_id=$p_jrn union - select jrn_def_fiche_deb + select jrn_def_fiche_deb from jrn_def where jrn_def_id=$p_jrn" ); } @@ -1372,12 +1375,12 @@ function belong_ledger($p_jrn,$p_type="") $sql="select * from fiche - where + where fd_id in (".$str_list.") and f_id= ".$this->id; $Res=$this->cn->exec_sql($sql); $Max=Database::num_row($Res); - if ($Max==0 ) + if ($Max==0 ) return 0; else return 1; @@ -1404,22 +1407,22 @@ function is_used() { $qcode=$this->strAttribut(ATTR_DEF_QUICKCODE); $sql='select count(*) as c from jrnx where j_qcode=$1'; $count=$this->cn->get_value($sql,array($qcode)); - if ( $count == 0 ) return false; + if ( $count == 0 ) return false; return true; } /*\brief remove a card without verification */ function delete() { // Remove from attr_value - $Res=$this->cn->exec_sql("delete from attr_value - where jft_id in (select jft_id - from jnt_fic_att_value + $Res=$this->cn->exec_sql("delete from attr_value + where jft_id in (select jft_id + from jnt_fic_att_value natural join fiche where f_id=".$this->id.")"); // Remove from jnt_fic_att_value $Res=$this->cn->exec_sql("delete from jnt_fic_att_value where f_id=".$this->id); - + // Remove from fiche $Res=$this->cn->exec_sql("delete from fiche where f_id=".$this->id); - + } /*!\brief create the sql statement for retrieving all * the card @@ -1473,7 +1476,7 @@ function is_used() { $and=" and "; if (isset($query)){ $query=FormatString($query); - $filter_query=$and."(vw_name ilike '%$query%' or quick_code ilike ('%$query%') or vw_description ilike '%$query%')"; + $filter_query=$and."(vw_name ilike '%$query%' or quick_code ilike ('%$query%') or vw_description ilike '%$query%' or tva_num ilike '%$query%')"; } $sql="select * from vw_fiche_attr where ".$filter_fd_id.$filter_query; return $sql; diff --git a/include/class_fiche_def.php b/include/class_fiche_def.php index 6f698f820..ab6ebc511 100644 --- a/include/class_fiche_def.php +++ b/include/class_fiche_def.php @@ -52,17 +52,20 @@ function input () { $ref=$this->cn->get_array("select * from fiche_def_ref order by frd_text"); $iradio=new IRadio(); - $p_js=" SearchPosteFilter('".$_REQUEST['PHPSESSID']."','".dossier::id()."','class_base','all','','class_base_label')"; + /* the accounting item */ + $class_base=new IPoste('class_base'); + $class_base->set_attribute('ipopup','ipop_account'); + $class_base->set_attribute('account','class_base'); + $class_base->set_attribute('label','acc_label'); + $f_class_base=$class_base->input(); require_once ('template/fiche_def_input.php'); return; } /*! - ************************************************** * \brief Get attribut of a fiche_def * * \return string value of the attribute - * none */ function GetAttribut() { $sql="select * from jnt_fic_attr ". @@ -84,7 +87,6 @@ function input () } /*! - ************************************************** * \brief Get attribut of the fiche_def * */ @@ -173,11 +175,6 @@ function input () // Format correctly the name of the cat. of card $p_nom_mod=FormatString($p_nom_mod); - // Format the p_class_base - // must be an integer - if ( isNumber($p_class_base) == 0 && FormatString($p_class_base) != null ) { - echo_error ('p_class_base is NOT a number'); - } // Name can't be empty if ( strlen(trim($p_nom_mod)) == 0 ) return; @@ -212,25 +209,26 @@ function input () $p_create='false'; // Class is valid ? - if ( FormatString($p_class_base) != null) { + if ( FormatString($p_class_base) != null || strpos(',',$p_class_base) != 0 ) { // p_class is a valid number - $sql=sprintf("insert into fiche_def(fd_label,fd_class_base,frd_id,fd_create_account) - values ('%s',%s,%d,'%s')", - $p_nom_mod,$p_class_base,$p_FICHE_REF,$p_create); - $Res=$this->cn->exec_sql($sql); - - // p_class must be added to tmp_pcmn - $sql=sprintf("select account_add(%d,'%s')", - $p_class_base,$p_nom_mod); - - $Res=$this->cn->exec_sql($sql); - + $sql="insert into fiche_def(fd_label,fd_class_base,frd_id,fd_create_account) + values ($1,$2,$3,$4)"; + + $Res=$this->cn->exec_sql($sql,array($p_nom_mod,$p_class_base,$p_FICHE_REF,$p_create)); + + // p_class must be added to tmp_pcmn if it is a single accounting + if ( strpos(',',$p_class_base) ==0) { + $sql=sprintf("select account_add(%d,'%s')", + $p_class_base,$p_nom_mod); + + $Res=$this->cn->exec_sql($sql); + } + // Get the fd_id $fd_id=$this->cn->get_current_seq('s_fdef'); - // Add the class_base if needed - + // update jnt_fic_attr $sql=sprintf("insert into jnt_fic_attr(fd_id,ad_id,jnt_order) values (%d,%d,10)",$fd_id,ATTR_DEF_ACCOUNT); $Res=$this->cn->exec_sql($sql); diff --git a/include/class_icard.php b/include/class_icard.php index 49559c060..71883e8df 100644 --- a/include/class_icard.php +++ b/include/class_icard.php @@ -231,6 +231,17 @@ class ICard extends HtmlInput * - typecard (deb, cred, filter or list of value) * will be set * if ICard is in readOnly, the button disappears, so the return string is empty +\code + // search ipopup +$search_card=new IPopup('ipop_card'); +$search_card->title=_('Recherche de fiche'); +$search_card->value=''; +echo $search_card->input(); + +$a=new ICard('test'); +$a->search(); + +\endcode *\see ajax_card.php *\note the ipopup id is hard coded : ipop_card *@return HTML string with the button diff --git a/include/class_idate.php b/include/class_idate.php index 9dd93de5f..0049af2a0 100644 --- a/include/class_idate.php +++ b/include/class_idate.php @@ -20,8 +20,8 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file - * \brief Html Input +/*!\file + * \brief Html Input */ require_once('class_html_input.php'); class IDate extends HtmlInput @@ -50,14 +50,14 @@ require_once('class_html_input.php'); singleClick : true }); -'; +'; return $r; } /*!\brief print in html the readonly value of the widget*/ public function display() { - $r=" Date : ".$this->value; + $r=" : ".$this->value; $r.=''; diff --git a/include/class_ipopup.php b/include/class_ipopup.php index ecf4c9b76..9312c3dec 100644 --- a/include/class_ipopup.php +++ b/include/class_ipopup.php @@ -31,23 +31,24 @@ require_once('class_html_input.php'); class IPopup extends HtmlInput { var $name; /*!< name name and id of the div */ - function __construct($p_name) + function __construct($p_name) { $this->name=$p_name; $this->parameter=''; $this->attribute=array(); + $this->drag=true; } function set_width($p_val) { $js=sprintf('$("%s'.'_border").style.width="%s";', $this->name,$p_val); $this->parameter.=$js; - + } function set_height($p_val) { $js=sprintf('$("%s'.'_border").style.height="%s";', $this->name,$p_val); $this->parameter.=$js; - + } function set_zindex($p_val) { @@ -55,7 +56,10 @@ class IPopup extends HtmlInput $this->name,$p_val); $js=sprintf('$("%s'.'_content").style.zIndex=%d;', $this->name,$p_val); - $this->parameter.=$js; + $this->parameter.=$js; + } + function set_dragguable($p_value){ + $this->drag=$p_value; } /*!\brief set the attribute thanks javascript as the width, the position ... *\param $p_name attribute name @@ -99,10 +103,10 @@ class IPopup extends HtmlInput $this->name, $this->name, $this->value); - + /* Add properties at the widget */ $attr=$this->parameter; - for ($i=0;$i< count($this->attribute);$i++){ + for ($i=0;$i< count($this->attribute);$i++){ list($name,$value)=$this->attribute[$i]; $tmp1=sprintf("$('%s').%s='%s';", $this->name, @@ -110,12 +114,15 @@ class IPopup extends HtmlInput $value); $attr.=$tmp1; } - + $draggable=''; + if ($this->drag==true){ /* add draggable possibility */ $draggable=sprintf(" new Draggable('%s_border',{starteffect:function(){ new Effect.Highlight('%s_border',{scroll:window,queue:'end'}); } });" ,$this->name ,$this->name); + + } $attr=create_script($attr.$draggable); $r.=$attr; return $r; diff --git a/include/class_itva_select.php b/include/class_itva_select.php index 0ada9acdc..9c9d784d1 100644 --- a/include/class_itva_select.php +++ b/include/class_itva_select.php @@ -20,8 +20,8 @@ // Copyright Author Dany De Bontridder ddebontridder@yahoo.fr -/*!\file - * \brief Html Input +/*!\file + * \brief Html Input */ require_once('class_iselect.php'); class ITva_Select extends ISelect @@ -39,15 +39,18 @@ require_once('class_iselect.php'); $this->value=$select_tva; $r=parent::input(); return $r; - + } /*!\brief print in html the readonly value of the widget*/ public function display() { - throw new Exception ("Pas de function display pour la TVA",1); + $select_tva=$this->db->make_array("select tva_id,tva_label from tva_rate order by tva_label asc",0); + $this->value=$select_tva; + $r=parent::display(); + return $r; } static public function test_me() { - + } } diff --git a/include/class_user.php b/include/class_user.php index 73c6bf5fd..9f0770285 100644 --- a/include/class_user.php +++ b/include/class_user.php @@ -1,4 +1,4 @@ -'._('Session expirée
Utilisateur déconnecté').''; redirect('index.php',1); exit(); @@ -55,21 +55,21 @@ class User { $this->id=-1; if ( isset($_SESSION['g_theme']) ) $this->theme=$_SESSION['g_theme']; - + $this->admin=( isset($_SESSION['use_admin']) )?$_SESSION['use_admin']:0; - + if ( isset($_SESSION['use_name']) ) $this->name=$_SESSION['use_name']; if ( isset($_SESSION['use_first_name']) ) $this->first_name=$_SESSION['use_first_name']; $this->load(); - } + } else // if p_id is set get data of another user { $this->id=$p_id; $this->db=$p_cn; $this->load(); - } + } } /*!\brief load data from database. * if this->id == -1, it is unknown so we have to retrieve it @@ -93,7 +93,7 @@ class User { use_active, use_admin from ac_users "; - $cn=new Database(); + $cn=new Database(); $Res=$cn->exec_sql($sql.$sql_cond,$sql_array); if (($Max=Database::num_row($Res)) == 0 ) return -1; $row=Database::fetch_array($Res,0); @@ -105,30 +105,30 @@ class User { $this->admin=$row['use_admin']; } function save() { - + $Sql="update ac_users set use_first_name=$1, use_name=$2 ,use_active=$3,use_admin=$4 where use_id=$5"; - $cn=new Database(); + $cn=new Database(); $Res=$cn->exec_sql($Sql,array($this->first_name,$this->last_name,$this->active,$this->admin,$this->id)); } /*! * \brief Check if user is active and exists in therepository * Automatically redirect, it doesn't check if a user can access a folder *\param $silent false, echo an error message and exit, true : exit without warning - * default is false - * + * default is false + * ++*/ function Check($silent=false) { - + $res=0; $pass5=md5($this->pass); $cn=new Database(); $sql="select ac_users.use_login,ac_users.use_active, ac_users.use_pass, use_admin,use_first_name,use_name - from ac_users - where ac_users.use_id='$this->id' + from ac_users + where ac_users.use_id='$this->id' and ac_users.use_active=1 and ac_users.use_pass='$pass5'"; echo_debug('class_user.php',__LINE__,"Sql = $sql"); @@ -141,33 +141,33 @@ class User { $_SESSION['use_name']=$r['use_name']; $_SESSION['use_first_name']=$r['use_first_name']; $_SESSION['isValid']=1; - + $this->admin=$_SESSION['use_admin']; $this->name=$_SESSION['use_name']; $this->first_name=$_SESSION['use_first_name']; $this->load_global_pref(); - + } - + if ( $res == 0 ) { if ( ! $silent) { alert(_('Utilisateur ou mot de passe incorrect')); redirect('index.html'); } session_unset(); - exit -1; + exit -1; } else { $this->valid=1; } - + return $ret; - + } - /*!\brief return the access to a folder, + /*!\brief return the access to a folder, * \param $p_dossier id if it is == 0 then we take the value from $_SESSION - *\return the priv_priv + *\return the priv_priv * - X no access * - R has access (normal user) * - L Local Admin @@ -186,8 +186,8 @@ where use_id=$1 and dos_id=$2"; if ( $res=='') return 'X'; return $res; } - /*\brief save the access of a folder - *\param $db_id the dossier id + /*\brief save the access of a folder + *\param $db_id the dossier id *\param $priv the priv. to set */ function set_folder_access($db_id,$priv) { @@ -197,16 +197,16 @@ where use_id=$1 and dos_id=$2"; if ( $cn->size() == 0 ) { - $Res=$cn->exec_sql("insert into jnt_use_dos(dos_id,use_id) values($1,$2)",array($db_id,$this->id)); + $Res=$cn->exec_sql("insert into jnt_use_dos(dos_id,use_id) values($1,$2)",array($db_id,$this->id)); $jnt=$cn->get_value("select jnt_id from jnt_use_dos where dos_id=$1 and use_id=$2",array($db_id,$this->id)); $Res=$cn->exec_sql("insert into priv_user (priv_priv,priv_jnt) values($1,$2)",array($priv,$jnt)); } $Res=$cn->exec_sql("update priv_user set priv_priv=$1 where priv_jnt=$2",array($priv,$jnt)); - + } /*!\brief check that a user is valid and the access to the folder * \param $p_ledger the ledger to check - *\return the priv_priv + *\return the priv_priv * - O only predefined operation * - W write * - R read only @@ -227,7 +227,7 @@ where use_id=$1 and dos_id=$2"; return $res; } - /*! + /*! * \brief get all the available ledgers for the current user * \param $p_type = ALL or the type of the ledger (ACH,VEN,FIN,ODS) * \param $p_access =3 for Read or WRITE, 2 write, 1 for readonly @@ -249,13 +249,13 @@ where use_id=$1 and dos_id=$2"; $sql_access=" and uj_priv = 'R'"; break; - } + } $sql="select jrn_def_id,jrn_def_type, jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, jrn_deb_max_line,jrn_cred_max_line from jrn_def join jrn_type on jrn_def_type=jrn_type_id - join user_sec_jrn on uj_jrn_id=jrn_def_id + join user_sec_jrn on uj_jrn_id=jrn_def_id where uj_login='".$this->login."'". $sql_type.$sql_access. @@ -264,7 +264,7 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, $sql_type=($p_type=='ALL')?'':"where jrn_def_type=upper('".FormatString($p_type)."')"; $sql="select jrn_def_id,jrn_def_type,jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_deb_max_line,jrn_cred_max_line, jrn_type_id,jrn_desc,'W' as uj_priv - from jrn_def join jrn_type on jrn_def_type=jrn_type_id + from jrn_def join jrn_type on jrn_def_type=jrn_type_id $sql_type order by jrn_Def_id"; @@ -291,9 +291,9 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, $sql.='-1)'; return $sql; } - /*! + /*! * \brief Check if an user is an admin - * + * * \return 1 for yes 0 for no */ function Admin() { @@ -301,23 +301,23 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, $pass5=md5($this->pass); $sql="select use_admin from ac_users where use_login=$1 and use_active=1 "; - + $cn=new Database(); $res=$cn->exec_sql($sql,array($this->login)); if ( Database::num_row($res)==0) exit(__FILE__." ".__LINE__." aucun resultat"); $this->admin=Database::fetch_result($res,0); - } + } else $this->admin=1; - + return $this->admin; } - /*! + /*! * \brief Set the selected periode in the user's preferences - * - * \param $p_periode periode + * + * \param $p_periode periode * \param - $p_user * - */ + */ function set_periode($p_periode) { $sql="update user_local_pref set parameter_value='$p_periode' where user_id='$this->id' and parameter_type='PERIODE'"; $Res=$this->db->exec_sql($sql); @@ -343,24 +343,24 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, $pid=Database::fetch_result($Res2,0,0); } - $sql=sprintf("insert into user_local_pref (user_id,parameter_value,parameter_type) + $sql=sprintf("insert into user_local_pref (user_id,parameter_value,parameter_type) values ('%s','%d','PERIODE')", $this->id,$pid); $Res=$this->db->exec_sql($sql); } - /*! + /*! * \brief Get the default periode from the user's preferences - * - * \return the default periode - * * - */ + * \return the default periode + * + * + */ function get_periode() { $array=$this->get_preference(); - if ( ! isset ($array['PERIODE'])) { + if ( ! isset ($array['PERIODE'])) { $this->set_default_periode(); $array=$this->get_preference(); } @@ -373,7 +373,7 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, $array=$this->get_preference(); $fr_id=(isset($array['MINIREPORT']))?$array['MINIREPORT']:0; return $fr_id; - + } /*!\brief set the mini rapport to display on the welcome page @@ -394,10 +394,10 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, } - /*! + /*! * \brief Get the default user's preferences * \return array of (parameter_type => parameter_value) - */ + */ function get_preference () { $sql="select parameter_type,parameter_value from user_local_pref where user_id='".$this->id."'"; @@ -412,20 +412,20 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, return $l_array; } - /*! + /*! * \brief Check if an user is allowed to do an action - * \param p_action_id + * \param p_action_id * \return * - 0 no priv * - 1 priv granted * - */ + */ function check_action ( $p_action_id) { if ( $this->Admin()==1 ) return 1; if ( $this->is_local_admin(dossier::id()) == 1 ) return 1; - + $Res=$this->db->exec_sql( "select * from user_sec_act where ua_login=$1 and ua_act_id=$2", array($this->login,$p_action_id)); @@ -435,18 +435,18 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, echo "

Action Invalide !!! $Count select * from user_sec_act where ua_login='$p_login' and ua_act_id=$p_action_id

"; exit(); } - /*! + /*! * \brief Get the global preferences from user_global_pref * in the account_repository db * * \note set $SESSION[g_variable] */ - function load_global_pref() + function load_global_pref() { echo_debug('class_user.php',__LINE__,"function load_global_pref"); $cn=new Database(); // Load everything in an array - $Res=$cn->exec_sql ("select parameter_type,parameter_value from + $Res=$cn->exec_sql ("select parameter_type,parameter_value from user_global_pref where user_id='".$this->login."'"); $Max=Database::num_row($Res); @@ -459,7 +459,7 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, $line=array(); for ($i=0;$i<$Max;$i++) { $row=Database::fetch_array($Res,$i); - $type=$row['parameter_type']; + $type=$row['parameter_type']; $line[$type]=$row['parameter_value'];; } // save array into g_ variable @@ -470,14 +470,14 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, $this->insert_default_global_pref($parameter); $this->load_global_pref(); return; - } + } $_SESSION[$name]=$line[$parameter]; } } - /*! + /*! * \brief insert default pref - * if no parameter are given insert all the existing + * if no parameter are given insert all the existing * parameter otherwise only the requested * \param $p_type parameter's type or nothing * \param $p_value parameter value @@ -492,7 +492,7 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, 'TOPMENU'=>'TEXT', 'LANG'=>'fr_FR.utf8'); $cn=new Database(); - $Sql="insert into user_global_pref(user_id,parameter_type,parameter_value) + $Sql="insert into user_global_pref(user_id,parameter_type,parameter_value) values ('%s','%s','%s')"; if ( $p_type == "" ) { foreach ( $default_parameter as $name=>$value) { @@ -509,11 +509,11 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, } - /*! + /*! * \brief update default pref * if value is not given then use the default value * - * \param $p_type parameter's type + * \param $p_type parameter's type * \param $p_value parameter's value value of the type */ function update_global_pref($p_type,$p_value="") { @@ -522,8 +522,8 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, "LANG"=>'fr_FR.utf8', 'TOPMENU'=>'SELECT'); $cn=new Database(); - $Sql="update user_global_pref set parameter_value=$1 - where parameter_type=$2 and + $Sql="update user_global_pref set parameter_value=$1 + where parameter_type=$2 and user_id=$3"; $value=($p_value=="")?$default_parameter[$p_type]:$p_value; $cn->exec_sql($Sql,array($value,$p_type,$this->login)); @@ -537,17 +537,17 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, { $sql="select p_exercice from parm_periode where p_id=".$this->get_periode(); $Ret=$this->db->exec_sql($sql); - if (Database::num_row($Ret) == 1) + if (Database::num_row($Ret) == 1) { $r=Database::fetch_array($Ret,0); return $r['p_exercice']; } - else + else return 0; } - /*!\brief Check if the user can access + /*!\brief Check if the user can access * otherwise warn and exit * \param $p_action requested action * \param $p_js = 1 javascript, or 0 just a text @@ -562,7 +562,7 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, echo ""; - + } else { @@ -575,19 +575,19 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, } } - - /*! + + /*! * \brief Check if an user is an local administrator - * - * + * + * * \param $p_dossier : dossier_id - * + * * \return * - 0 if no * - 1 if yes * - */ - function is_local_admin($p_dossier=-1) + */ + function is_local_admin($p_dossier=-1) { if ($p_dossier==-1) { $p_dossier=dossier::id(); @@ -599,7 +599,7 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, " where priv_priv='L' and use_login='".$this->login."' and dos_id=$p_dossier"; $cn=new Database(); - + $isAdmin=$cn->count_sql($sql); @@ -615,24 +615,24 @@ jrn_def_name,jrn_def_class_deb,jrn_def_class_cred,jrn_type_id,jrn_desc,uj_priv, * array indices * - use_id (id ) * - use_login (login of the user) - * - use_name + * - use_name * - use_first_name * *\exception throw an exception if nobody can access */ static function get_list($p_dossier) { - $sql="select distinct use_id,use_login,use_first_name,use_name from ac_users - left outer join jnt_use_dos using (use_id) -where + $sql="select distinct use_id,use_login,use_first_name,use_name from ac_users + left outer join jnt_use_dos using (use_id) +where (dos_id=$1 or use_admin=1) and use_active=1"; $repo=new Database(); $array=$repo->get_array($sql,array($p_dossier)); if ( $repo->size() == 0 ) throw new Exception ('Error inaccessible folder'); return $array; } - /*! + /*! * \brief check the access of an user on a ledger - * + * * \param $p_jrn the ledger id * \return * - O only predefined operation @@ -640,9 +640,9 @@ where * - R read only * - X no access * - */ + */ - function check_jrn($p_jrn) + function check_jrn($p_jrn) { return $this->get_ledger_access($p_jrn); } @@ -650,9 +650,13 @@ where * and exit *\param the folder if *\param $silent false, echo an error message and exit, true : exit without warning - * default is false + * default is false + * \return + * - L for administrator (local and global) + * - P for extension only + * - R regular user */ - function check_dossier($p_dossier_id,$silent=false) + function check_dossier($p_dossier_id,$silent=false) { $this->Admin(); if ( $this->admin==1 || $this->is_local_admin($p_dossier_id)==1) return 'L'; @@ -664,7 +668,9 @@ where if ( ! $silent) alert(_('Dossier non accessible')); exit(); } + return $dossier; } - + + } ?> diff --git a/include/constant.php b/include/constant.php index 4b3c3519b..bcf1c1760 100644 --- a/include/constant.php +++ b/include/constant.php @@ -26,7 +26,7 @@ require_once ('config.inc.php'); require_once('constant.security.php'); -define ("DBVERSION",63); +define ("DBVERSION",68); define ("MAX_COMPTE",4); define ('MAX_ARTICLE',9); diff --git a/include/contact.inc.php b/include/contact.inc.php index cc4d37ce8..dce8ad9e3 100644 --- a/include/contact.inc.php +++ b/include/contact.inc.php @@ -1,4 +1,4 @@ -',urldecode($_REQUEST['url'])); } -else -{ +else +{ $retour=""; $h_url=""; } // Menu // Remove a card -if ( isset ($_POST['delete']) ) +if ( isset ($_POST['delete']) ) { $f_id=$_REQUEST['f_id']; $fiche=new contact($cn,$f_id); $fiche->remove(); - $sub_action="list"; + $sub_action="list"; } //----------------------------------------------------- // Add card @@ -75,7 +75,7 @@ if ( $sub_action=="insert" ) //----------------------------------------------------- // Save modification -if ( isset ($_POST['mod'])) +if ( isset ($_POST['mod'])) { // modification is asked $f_id=$_REQUEST['f_id']; @@ -85,11 +85,11 @@ if ( isset ($_POST['mod'])) $sub_action="list"; } // by default open liste -if ( $sub_action == "" ) +if ( $sub_action == "" ) $sub_action="list"; //----------------------------------------------------- -//Display a blank card -if ( $sub_action=="blank") +//Display a blank card +if ( $sub_action=="blank") { $retour_action=HtmlInput::button_anchor('Retour', "commercial.php?p_action=contact&$str_dossier"); @@ -118,7 +118,7 @@ if ( $sub_action == "list" )
', $a); @@ -130,7 +130,7 @@ if ( $sub_action == "list" ) - +> -name="fd_id"; $w->value= $cn->make_array("select fd_id,fd_label from fiche_def where ". @@ -178,7 +178,7 @@ if ( $sub_action == "list" )
-'; $contact=new contact($cn,$f_id); echo $retour; - echo '
'; + echo ''; echo dossier::hidden(); echo $contact->Display(false); $w=new IHidden(); diff --git a/include/dexia.inc.php b/include/dexia.inc.php index 8ec811ae7..457820d37 100644 --- a/include/dexia.inc.php +++ b/include/dexia.inc.php @@ -45,7 +45,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) echo_debug('dexia_be',__LINE__,'$row = '.var_export($row,true)); echo_debug('dexia_be',__LINE__,'sizeof($row)'.sizeof($row)); - $row=split(';',$data[0]); + $row=explode(';',$data[0]); //to avoid a level of if if (!(isset($row[2]))) $row[2]=''; diff --git a/include/dexia_be.inc.php b/include/dexia_be.inc.php index 216007fdb..b0caea766 100644 --- a/include/dexia_be.inc.php +++ b/include/dexia_be.inc.php @@ -1,4 +1,4 @@ -count_sql(utf8_encode($Sql)) > 0) { /* Skip it it already encoded */ echo "Double skipped : $ref_extrait $detail
"; $LinesDup++; continue; - } - - + } + + //-------------------------------------------------------------------- -// SQL request to insert into import_tmp +// SQL request to insert into import_tmp // Adapt the format of the import's date in the ** to_date ** function //-------------------------------------------------------------------- $Sql="insert into import_tmp (code, @@ -99,11 +99,11 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { jrn, status) values ( '$ref_extrait', - to_date('$date_exec','DD/MM/YYYY'), - to_date('$date_val' ,'DD/MM/YYYY'), + to_date('$date_exec','DD/MM/YYYY'), + to_date('$date_val' ,'DD/MM/YYYY'), $montant, '$devise', - '" . addslashes($compte_ordre). "', + '" . addslashes($compte_ordre). "', '".addslashes($detail)."','" .$num_compte." ', '$p_bq_account', $p_jrn, @@ -123,14 +123,12 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { //----------------------------------------------------- // The import is OK //----------------------------------------------------- + $LinesImported++; + $row++; + echo "Record imported: $ref_extrait $detail
"; - else { - $LinesImported++; - $row++; - echo "Record imported: $ref_extrait $detail
"; - } -} +} //----------------------------------------------------- // Close and summary //----------------------------------------------------- diff --git a/include/dossier.inc.php b/include/dossier.inc.php index b3efacdf7..efa547382 100644 --- a/include/dossier.inc.php +++ b/include/dossier.inc.php @@ -1,4 +1,4 @@ -rollback(); - + } // If the id is not null, name successfully inserted // Database created - + if ( $l_id != 0) { //-- // setting the year @@ -87,7 +87,7 @@ if ( isset ($_POST["DATABASE"]) ) { echo "$year"._(" est une année invalide"); $Res=$cn->exec_sql("delete from ac_dossier where dos_id=$l_id"); } - else + else { $Sql=sprintf("CREATE DATABASE %sDOSSIER%d encoding='UTF8' TEMPLATE %sMOD%d", domaine, @@ -111,7 +111,7 @@ if ( isset ($_POST["DATABASE"]) ) { $cn=new Database($l_id); //--year -- $Res=$cn->exec_sql("delete from parm_periode"); - if ( ($year % 4 == 0 && $year % 100 != 0) || $year % 400 == 0 ) + if ( ($year % 4 == 0 && $year % 100 != 0) || $year % 400 == 0 ) $fev=29; else $fev=28; @@ -119,7 +119,7 @@ if ( isset ($_POST["DATABASE"]) ) { $Res=$cn->exec_sql("delete from user_local_pref where parameter_type='PERIODE'"); $nb_day=array(31,$fev,31,30,31,30,31,31,30,31,30,30); $m=1; - foreach ($nb_day as $day) + foreach ($nb_day as $day) { $p_start=sprintf("01-%d-%s",$m,$year); $p_end=sprintf("%d-%d-%s",$day,$m,$year); @@ -137,7 +137,7 @@ if ( isset ($_POST["DATABASE"]) ) { "select p_id,jrn_def_id, 'OP'". " from parm_periode cross join jrn_def"; $Res=$cn->exec_sql($sql); - + } } // if $l_id != 0 @@ -145,7 +145,7 @@ if ( isset ($_POST["DATABASE"]) ) { ?>

Dossier Management

-get_value("select count(*) from ac_dossier"); - $size=10; + $size=10; - echo jrn_navigation_bar($offset,$count,$size,$page); + echo jrn_navigation_bar($offset,$count,$size,$page); $repo=new Dossier(0); $Res=$repo->show_dossier('all',$offset,$size); $compteur=1; @@ -169,8 +169,8 @@ if ( $sa == 'list' ) { // show all dossiers if ( $Res != null ) { foreach ( $Res as $Dossier) { - - if ( $compteur%2 == 0 ) + + if ( $compteur%2 == 0 ) $cl='class="odd"'; else $cl='class="even"'; @@ -188,18 +188,18 @@ if ( $sa == 'list' ) { echo ''.HtmlInput::button_anchor(_('Backup'),'backup.php?action=backup&sa=b&t=d&d=' .$Dossier['dos_id']). ''; - + echo ''; - $compteur++; - + $compteur++; + } echo ""; - + } echo ''; - - echo jrn_navigation_bar($offset,$count,$size,$page); + + echo jrn_navigation_bar($offset,$count,$size,$page); } @@ -207,10 +207,10 @@ if ( $sa == 'list' ) { // Add a new folder if ( $sa == 'add' ) { // Load the available Templates - $Res=$cn->exec_sql("select mod_id,mod_name,mod_desc from + $Res=$cn->exec_sql("select mod_id,mod_name,mod_desc from modeledef order by mod_name"); $count=Database::num_row($Res); - + if ( $count == 0 ) { echo _("pas de modèle disponible"); } else { @@ -222,7 +222,7 @@ if ( $sa == 'list' ) { $template.=""; }// if count = 0 $m_date=date('Y'); - + ?> @@ -237,7 +237,7 @@ if ( $sa == 'list' ) { Année > - + @@ -304,7 +304,7 @@ if ( $sa == 'remove' ) { ob_start(); if ( $cn->exec_sql($sql)==false) { ob_end_clean(); - + echo "

"; echo _('Base de donnée ').domaine."dossier".$_REQUEST['d']. _("est accèdée, déconnectez-vous d'abord")."

"; diff --git a/include/eub_be.inc.php b/include/eub_be.inc.php index e8a41b24c..0a9ac7a78 100644 --- a/include/eub_be.inc.php +++ b/include/eub_be.inc.php @@ -35,7 +35,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { // first line is skipped if ( $row > 1) { $code=""; $date_exec=""; $detail=""; $montant=""; - list($code, $date_exec, $detail, $montant) = split(";", $data[$c]); + list($code, $date_exec, $detail, $montant) = explode(";", $data[$c]); $date_exec = str_replace("\t", "", $date_exec); $date_exec = str_replace(" ", "", $date_exec); diff --git a/include/ext_inc.php b/include/ext_inc.php index 2aa4af7e6..3c6298c9a 100644 --- a/include/ext_inc.php +++ b/include/ext_inc.php @@ -12,7 +12,9 @@ if (isset($_REQUEST['code']) ) { exit(); } /* show name of extension */ - echo "

".$ext->get_parameter('name').'

'; + echo '
'; + echo '

'.$ext->get_parameter('name').'

'; + echo '
'; require_once('ext'.DIRECTORY_SEPARATOR.trim($ext->get_parameter('filepath'))); } else { alert(j(_("Cette extension n'existe pas "))); diff --git a/include/extension.inc.php b/include/extension.inc.php index d7db0d12d..2756fe39a 100644 --- a/include/extension.inc.php +++ b/include/extension.inc.php @@ -38,11 +38,6 @@ require_once('class_extension.php'); require_once('class_html_input.php'); require_once('class_ibutton.php'); require_once('class_ipopup.php'); -echo js_include('scriptaculous.js'); -echo js_include('prototype.js'); -echo js_include('effects.js'); -echo js_include('controls.js'); -echo js_include('dragdrop.js'); echo js_include('extension.js'); $ipopup=new IPopup('dtext'); diff --git a/include/fiche.inc.php b/include/fiche.inc.php index cc45a2878..9a5604336 100644 --- a/include/fiche.inc.php +++ b/include/fiche.inc.php @@ -48,8 +48,6 @@ if ( !isset($sessid)) { $sessid=$_REQUEST["PHPSESSID"]; } -$search='"; - $cn=new Database($gDossier); @@ -304,7 +302,7 @@ if ( isset ( $_GET["action"]) ) { $oFiche_Def=new fiche_def($cn); echo HtmlInput::hidden("p_action","fiche"); echo dossier::hidden().HtmlInput::phpsessid(); - echo $oFiche_Def->input($search); // CreateCategory($cn,$search); + echo $oFiche_Def->input(); // CreateCategory($cn,$search); echo HtmlInput::submit("add_modele" ,"Sauve"); echo '
'; diff --git a/include/fortis_be.inc.php b/include/fortis_be.inc.php index 6506b3c16..494404178 100644 --- a/include/fortis_be.inc.php +++ b/include/fortis_be.inc.php @@ -41,7 +41,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { - list($code, $date_exec, $date_valeur, $montant, $devise, $compte_ordre, $detail, $num_compte) = split(";", $data[$c]); + list($code, $date_exec, $date_valeur, $montant, $devise, $compte_ordre, $detail, $num_compte) = explode(";", $data[$c]); echo "line : $row > ".$data[$c]."
"; //corrige un bug de date diff --git a/include/impress_inc.php b/include/impress_inc.php index 38afe393d..27019a9c1 100644 --- a/include/impress_inc.php +++ b/include/impress_inc.php @@ -59,7 +59,7 @@ function get_rappel_simple ($p_cn,$p_jrn_id,$p_jrn_type,$p_from,&$arap) // Compute VAT foreach ($a_Tva as $line_tva) { - list ($deb,$cred)=split(',',$line_tva['tva_poste']); + list ($deb,$cred)=explode(',',$line_tva['tva_poste']); if ( $p_jrn_type == 'ACH' ) $ctva=$deb; else diff --git a/include/ing_be.inc.php b/include/ing_be.inc.php index 268f74526..536b0db66 100644 --- a/include/ing_be.inc.php +++ b/include/ing_be.inc.php @@ -36,7 +36,7 @@ while (($data = fgetcsv($handle, 2000,'@')) !== FALSE) { if ( $row > 1 ) { $code=""; $date_exec=""; $date_valeur=""; $montant=""; $devise=""; $compte_ordre=""; $detail=""; $num_compte=""; $iduser=""; - list($num_compte, $code, $date_exec, $date_valeur, $montant, $devise, $montant2, $devise2, $rubriques, $detail, $zzz, $zzz, $date_comptable) = split(";", $data[$c]); + list($num_compte, $code, $date_exec, $date_valeur, $montant, $devise, $montant2, $devise2, $rubriques, $detail, $zzz, $zzz, $date_comptable) = explode(";", $data[$c]); # Bug CSV ING : "424 au lieu de 424 #" diff --git a/include/keytrade_be.inc.php b/include/keytrade_be.inc.php index 9166056b6..303cfed14 100644 --- a/include/keytrade_be.inc.php +++ b/include/keytrade_be.inc.php @@ -39,7 +39,7 @@ while (($data = fgetcsv($handle, 2000,"!")) !== FALSE) { //----------------------------------------------------- // Parsing CSV comes here //----------------------------------------------------- - $row=split(';',$data[$c]); + $row=explode(';',$data[$c]); echo_debug('keytrade',__LINE__,'$row = '.var_export($row,true)); echo_debug('keytrade',__LINE__,'sizeof($row)'.sizeof($row)); if ( sizeof ($row) < 7 ) diff --git a/include/param_jrn_detail.inc.php b/include/param_jrn_detail.inc.php index 0994062eb..4c51cfaf2 100644 --- a/include/param_jrn_detail.inc.php +++ b/include/param_jrn_detail.inc.php @@ -186,8 +186,8 @@ $hidden.=HtmlInput::phpsessid(); /* Load the card */ $card=$Ledger->get_fiche_def(); -$rdeb=split(',',$card['deb']); -$rcred=split(',',$card['cred']); +$rdeb=explode(',',$card['deb']); +$rcred=explode(',',$card['cred']); echo '
'; diff --git a/include/payment_middle.inc.php b/include/payment_middle.inc.php index e61aa849d..90ddd07d7 100644 --- a/include/payment_middle.inc.php +++ b/include/payment_middle.inc.php @@ -44,7 +44,8 @@ if ( $sb=='change') { if ( !isset($_GET['id'])) exit; $row=new Acc_Payment($cn,$_GET['id']); $row->load(); - echo '
'; + $javascript="return confirm('"._('Vous confirmez')."')"; + echo ''; echo dossier::hidden(); echo HtmlInput::hidden('p_jrn',0); echo HtmlInput::hidden('p_action','divers'); @@ -55,6 +56,7 @@ if ( $sb=='change') { echo $row->form(); echo HtmlInput::submit('save',_('Sauve')); + echo HtmlInput::submit('delete',_('Efface')); echo HtmlInput::button_anchor(_('Retour sans sauvez'), '?p_action=divers&sa=mp&'.dossier::get() ); @@ -70,7 +72,40 @@ if ( $sb=='save'){ $row->update(); } +//--------------------------------------------------------------------------- +// Delete a card +//--------------------------------------------------------------------------- +if (isset($_POST['delete'])) { + $row=new Acc_Payment($cn,$_POST['id']); + $row->from_array($_POST); + $row->delete(); +} +//--------------------------------------------------------------------------- +// Show form to enter a new one +//--------------------------------------------------------------------------- +if ($sb=='ins') { + $mp=new Acc_Payment($cn); + $r=$mp->blank(); + echo ''; + echo dossier::hidden().HtmlInput::hidden('sa',$_REQUEST['sa']). + HtmlInput::hidden('p_action',$_REQUEST['p_action']).HtmlInput::hidden('sb','insert'); + echo $r; + echo HtmlInput::submit('insert',_('Enregistre')); + echo '
'; + echo HtmlInput::button_anchor(_('Retour sans sauvez'), + '?p_action=divers&sa=mp&'.dossier::get() + ); + exit(); +} +//--------------------------------------------------------------------------- +// Insert a new mod of payment +//--------------------------------------------------------------------------- +if ( $sb=='insert') { + $row=new Acc_Payment($cn); + $row->from_array($_POST); + $row->insert(); +} //---------------------------------------------------------------------- // LEDGER PURCHASE //---------------------------------------------------------------------- @@ -124,7 +159,9 @@ if ( ! empty ($array)) { } echo ''; } - echo ''; +// Button to insert new one +echo HtmlInput::button_anchor(_('Ajout'),'?p_action=divers&sa=mp&sb=ins&'.dossier::get()); + echo '
'; ?> \ No newline at end of file diff --git a/include/template/extension-detail.php b/include/template/extension-detail.php index 89a9a4f75..a28ea533e 100644 --- a/include/template/extension-detail.php +++ b/include/template/extension-detail.php @@ -36,7 +36,7 @@ - + @@ -44,4 +44,4 @@ -
\ No newline at end of file +
diff --git a/include/template/fiche_def_input.php b/include/template/fiche_def_input.php index f0d894c2d..75426d9bd 100644 --- a/include/template/fiche_def_input.php +++ b/include/template/fiche_def_input.php @@ -5,11 +5,11 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + \ No newline at end of file diff --git a/include/user_common.php b/include/user_common.php index 85e6bd153..e33f4c249 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -1,4 +1,4 @@ -get_by_qcode($p_good); @@ -69,23 +69,22 @@ function InsertStockGoods($p_cn,$p_j_id,$p_good,$p_quant,$p_type) $Res=$p_cn->exec_sql("insert into stock_goods ( j_id, f_id, - sg_code, + sg_code, sg_quantity, sg_type,sg_exercice ) values ( $p_j_id, $f_id, '$code_marchandise', - $p_quant, '$p_type',$exercice) + $p_quant, '$p_type',$exercice) "); return $Res; } -/*! isValid ($p_cn, $p_grpt_id - ************************************************** +/*! *\brief test if a jrn op is valid - * - * \param $p_cn db + * + * \param $p_cn db * \param $p_grpt_id * \return: * - 1 is valid @@ -106,17 +105,17 @@ function isValid ($p_cn,$p_grpt_id) { } -/*! +/*! ************************************************** - *\brief + *\brief * Create a navigation_bar (pagesize) - * - * \param $p_offset first record number + * + * \param $p_offset first record number * \param $p_line total of returned row * \param $p_size current g_pagesize user's preference - * \param $p_page number of the page where the user is + * \param $p_page number of the page where the user is * \param $p_javascript javascript code to add - * \note example : + * \note example : \verbatim $step=$_SESSION['g_pagesize']; $page=(isset($_GET['offset']))?$_GET['page']:1; @@ -170,8 +169,8 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1,$p_javascript= $r.="  "; } //---------------------------------------------------------------------- - // Create a partial bar - // if current page < 11 show 1 to 20 + // Create a partial bar + // if current page < 11 show 1 to 20 // otherwise show $p_page -10 to $p_page + 10 //---------------------------------------------------------------------- $start_bar=($p_page < 11 )?1:$p_page-10; @@ -193,7 +192,7 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1,$p_javascript= } //else } //for // next - + if ($p_page !=$nb_page) { // If we are not at the last page show the button next $e=$p_page+1; @@ -210,7 +209,7 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1,$p_javascript= return $r; } -/*! +/*! * \brief Clean the url, remove the $_GET offset,step, page and size * \param none * @@ -238,12 +237,12 @@ function redirect($p_string,$p_time=0) { echo ' Connecting... '; } /*!\brief remove the useless space, change comma by period and try to return - * a number + * a number *\param $p_num number to format *\return the formatted number */ -function toNumber($p_num) { - $p_num=trim($p_num); +function toNumber($p_num) { + $p_num=trim($p_num); if ($p_num=='') return 0; $p_num=str_replace(',','.',$p_num); return $p_num; diff --git a/include/user_menu.php b/include/user_menu.php index cb41705e1..64417ca9f 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -32,7 +32,8 @@ require_once("class_ispan.php"); /*! * \brief Show all the available folder for the users - * at the login page + * at the login page. For the special case 'E' + * go directly to extension and bypasse the dashboard * \param $p_user user * \param $p_admin 1 if admin * @@ -45,25 +46,34 @@ function u_ShowDossier($p_user,$p_admin,$p_filtre="") $result=""; if ( $p_array == 0 ) return $result." * Aucun dossier *"; + $cn=new Database(); + $user=new User($cn); + + $result.=""; for ($i=0;$icheck_dossier($id)!='P') { + $target="access.php?gDossier=$id"; + } else { + $target="extension.php?gDossier=$id"; + } $result.=""; $result.=""; $desc=($desc=="")?"Aucune description":h($desc); - $desc="".$desc.""; + $desc="$desc"; $result.=""; $result.=""; diff --git a/sql/upgrade.sql b/sql/upgrade.sql index ef6b85558..8b1378917 100644 --- a/sql/upgrade.sql +++ b/sql/upgrade.sql @@ -1,112 +1 @@ -begin; - insert into parameter(pr_id,pr_value) values ('MY_CHECK_PERIODE','Y'); - alter table jrn add jr_mt text ; - update jrn set jr_mt= extract (microseconds from jr_tech_date); - create index x_mt on jrn(jr_mt); - DROP FUNCTION insert_quant_purchase(text, numeric, character varying, numeric, numeric,numeric, integer, numeric, numeric, numeric, character varying); - DROP FUNCTION insert_quant_sold(text, character varying, numeric, numeric, numeric, integer, character varying); -alter table groupe_analytique add constraint fk_pa_id foreign key(pa_id) references plan_analytique(pa_id) on delete cascade; -alter table stock_goods add constraint fk_stock_good_f_id foreign key(f_id) references fiche(f_id) ; --- for belgium -insert into parm_code values ('SUPPLIER',440,'Poste par défaut pour les fournisseurs'); --- for french --- insert into parm_code values ('SUPPLIER',400,'Poste par défaut pour les fournisseurs'); -drop table invoice; --- Function: account_parent(poste_comptable) - -DROP FUNCTION account_parent(poste_comptable); - -CREATE FUNCTION account_parent(p_account poste_comptable) - RETURNS poste_comptable AS -$BODY$ -declare - nParent tmp_pcmn.pcm_val_parent%type; - sParent varchar; - nCount integer; -begin - sParent:=to_char(p_account,'9999999999999999'); - sParent:=trim(sParent::text); - nParent:=0; - while nParent = 0 loop - select count(*) into nCount - from tmp_pcmn - where - pcm_val = to_number(sParent,'9999999999999999'); - if nCount != 0 then - nParent:=to_number(sParent,'9999999999999999'); - exit; - end if; - sParent:= substr(sParent,1,length(sParent)-1); - if length(sParent) <= 0 then - raise exception 'Impossible de trouver le compte parent pour %',p_account; - end if; - end loop; - raise notice 'account_parent : Parent is %',nParent; - return nParent; -end; -$BODY$ -LANGUAGE 'plpgsql' VOLATILE; - -alter table document drop column d_state; -alter table action_gestion drop column f_id_exp; -alter table action_gestion set ag_title type text; -ALTER TABLE action_gestion ADD COLUMN ag_hour time with time zone; -ALTER TABLE action_gestion ADD COLUMN ag_priority integer; -ALTER TABLE action_gestion ALTER COLUMN ag_priority SET DEFAULT 2; -ALTER TABLE action_gestion ADD COLUMN ag_dest text; -ALTER TABLE action_gestion ADD COLUMN ag_owner text; -ALTER TABLE action_gestion ADD COLUMN ag_contact int8; - - - - -CREATE OR REPLACE FUNCTION action_gestion_ins_upd() - RETURNS trigger AS -$BODY$ -begin -NEW.ag_title := substr(NEW.ag_title,1,70); -NEW.ag_hour := substr(NEW.ag_hour,1,10); -return NEW; -end; -$BODY$ -LANGUAGE 'plpgsql' VOLATILE; - -CREATE TRIGGER action_gestion_t_insert_update - BEFORE INSERT OR UPDATE - ON action_gestion - FOR EACH ROW - EXECUTE PROCEDURE action_gestion_ins_upd(); - -COMMENT ON TRIGGER action_gestion_t_insert_update ON action_gestion IS 'Truncate the column ag_title to 70 char'; - -ALTER TABLE action_gestion ADD COLUMN ag_state integer; -update action_gestion set f_id_dest = f_id_exp where f_id_exp != 0; - -alter table action drop column f_id_dest; -UPDATE document_state SET s_value= 'Clôturé' WHERE s_id=1; -UPDATE document_state SET s_value= 'A suivre' WHERE s_id=2; -UPDATE document_state SET s_value= 'A faire' WHERE s_id=3; -UPDATE document_state SET s_value= 'Abandonné' WHERE s_id=4; - - -CREATE TABLE action_detail -( - ad_id serial, - f_id int8, - ad_text text, - ad_pu numeric(20,4) DEFAULT 0, - ad_quant numeric(20,4) DEFAULT 0, - ad_tva_id integer DEFAULT 0, - ad_tva_amount numeric(20,4) DEFAULT 0, - ad_total_amount numeric(20,4) DEFAULT 0, - ag_id integer NOT NULL DEFAULT 0, - CONSTRAINT action_detail_pkey PRIMARY KEY (ad_id), - CONSTRAINT action_detail_ag_id_fkey FOREIGN KEY (ag_id) - REFERENCES action_gestion (ag_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE -); - -COMMENT ON TABLE action_detail IS 'Detail of action_gestion, see class Action_Detail'; - -commit;
"; - $result.=""; + $result.=""; $result.=$id." ".h($name).""; $result.=""; $result.="".$desc; $result.="