diff --git a/contrib/document_test/facture-calc.ods b/contrib/document_test/facture-calc.ods index 5c450090f..97a96b0eb 100644 Binary files a/contrib/document_test/facture-calc.ods and b/contrib/document_test/facture-calc.ods differ diff --git a/contrib/document_test/facture.odt b/contrib/document_test/facture.odt index 460a0f33d..fc80858bf 100644 Binary files a/contrib/document_test/facture.odt and b/contrib/document_test/facture.odt differ diff --git a/contrib/document_test/note-de-frais.odt b/contrib/document_test/note-de-frais.odt new file mode 100644 index 000000000..4f6993459 Binary files /dev/null and b/contrib/document_test/note-de-frais.odt differ diff --git a/doc/manuel-fr.odt b/doc/manuel-fr.odt index 65391f05e..a126baa1a 100644 Binary files a/doc/manuel-fr.odt and b/doc/manuel-fr.odt differ diff --git a/html/admin/sql/patch/upgrade52.sql b/html/admin/sql/patch/upgrade52.sql new file mode 100644 index 000000000..61332e374 --- /dev/null +++ b/html/admin/sql/patch/upgrade52.sql @@ -0,0 +1,37 @@ +begin; +CREATE TABLE mod_payment ( + mp_id serial, + mp_lib text NOT NULL, + mp_jrn_def_id integer NOT NULL, + mp_type character varying(3) NOT NULL, + mp_fd_id bigint , + mp_qcode text +); +COMMENT ON TABLE mod_payment IS 'Contains the different media of payment and the corresponding ledger'; + +INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (2, 'Caisse', 1, 'VEN', NULL, NULL); +INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (4, 'Caisse', 1, 'ACH', NULL, NULL); +INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (1, 'Paiement électronique', 1, 'VEN', NULL, NULL); +INSERT INTO mod_payment (mp_id, mp_lib, mp_jrn_def_id, mp_type, mp_fd_id, mp_qcode) VALUES (3, 'Par gérant ou administrateur', 2, 'ACH', NULL, NULL); + +ALTER TABLE ONLY mod_payment + ADD CONSTRAINT mod_payment_pkey PRIMARY KEY (mp_id); +ALTER TABLE ONLY mod_payment + ADD CONSTRAINT mod_payment_mp_fd_id_fkey FOREIGN KEY (mp_fd_id) REFERENCES fiche_def(fd_id); +ALTER TABLE ONLY mod_payment + ADD CONSTRAINT mod_payment_mp_jrn_def_id_fkey FOREIGN KEY (mp_jrn_def_id) REFERENCES jrn_def(jrn_def_id); +INSERT INTO document_type (dt_id, dt_value) VALUES (10, 'Note de frais'); + +insert into fiche_def_ref (frd_id,frd_text) values (25,'Compte Salarié / Administrateur'); +insert into attr_min values (25,1); +insert into attr_min values(25,4); +insert into attr_min values (25,3); +insert into attr_min values(25,5); +insert into attr_min values (25,15); +insert into attr_min values(25,16); +insert into attr_min values(25,24); +insert into attr_min values(25,23); + + +update version set val=53; +commit; diff --git a/html/fiche_search.php b/html/fiche_search.php index 0981fafd0..03f909a59 100644 --- a/html/fiche_search.php +++ b/html/fiche_search.php @@ -157,11 +157,16 @@ if ( $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; + } elseif( strpos($e_type,'frd_id')===0 ) { + /* $e_type must be something like frd_id in (...) */ + $sql="select * from vw_fiche_attr where $e_type "; + } // if e_type contains a list of value for filtering on fiche_def_ref.frd_id else{ $list_fiche=$e_type; $sql="select * from vw_fiche_attr where fd_id in ( $list_fiche )"; + echo $sql; } // e_fic_search contains the pattern diff --git a/html/parametre.php b/html/parametre.php index 91d7cb9fe..8d0ef1a5c 100644 --- a/html/parametre.php +++ b/html/parametre.php @@ -24,7 +24,6 @@ */ include_once ("ac_common.php"); -html_page_start($_SESSION['g_theme']); include_once ("postgres.php"); require_once("class_widget.php"); require_once('class_dossier.php'); @@ -37,6 +36,7 @@ include_once ("class_user.php"); $User=new User($rep); $User->Check(); +html_page_start($_SESSION['g_theme']); include_once("preference.php"); include_once("user_menu.php"); echo '