diff --git a/include/constant.php b/include/constant.php index cc27a552d..81911ffb5 100644 --- a/include/constant.php +++ b/include/constant.php @@ -108,7 +108,7 @@ if ( !defined ("NOALYSS_PACKAGE_REPOSITORY")) { if ( ! defined ("SYSINFO_DISPLAY")) { define ("SYSINFO_DISPLAY",TRUE); } -define ("DBVERSION",135); +define ("DBVERSION",136); define ("MONO_DATABASE",25); define ("DBVERSIONREPO",18); define ('NOTFOUND','--not found--'); diff --git a/include/sql/patch/upgrade135.sql b/include/sql/patch/upgrade135.sql new file mode 100644 index 000000000..e45fa03c6 --- /dev/null +++ b/include/sql/patch/upgrade135.sql @@ -0,0 +1,23 @@ +begin; + +insert into menu_ref (me_code,me_menu,me_file,me_description,me_type,me_description_etendue) +values('PRINTTVA','Résumé TVA','tax_summary.inc.php','totaux par TVA et par journal','ME','Calcul des totaux par TVA et par journal'); + +insert into profile_menu (me_code,me_code_dep,p_id,p_order,p_type_display,pm_default,pm_id_dep) +select me_code,'PRINT',1,250,'E',0,6 from menu_ref where me_code='PRINTTVA' +union +select me_code,'PRINT',1,250,'E',0,35 from menu_ref where me_code='PRINTTVA' +union +select me_code,'PRINT',2,250,'E',0,719 from menu_ref where me_code='PRINTTVA' +union +select me_code,'PRINT',2,250,'E',0,716 from menu_ref where me_code='PRINTTVA' +; +insert into menu_ref (me_code,me_menu,me_file,me_type) +values ('CSV:printtva','Export Résumé TVA','export_printtva_csv.php','PR'), + ('PDF:printtva','Export Résumé TVA','export_printtva_pdf.php','PR') +; + +insert into profile_menu(me_code,p_id,p_type_display) values ('CSV:printtva',1,'P'),('PDF:printtva',1,'P'),('CSV:printtva',2,'P'),('PDF:printtva',2,'P'); + +insert into version (val,v_description) values (136,'new feature PRINTTVA'); +commit ; \ No newline at end of file diff --git a/sql/upgrade.sql b/sql/upgrade.sql index 20feb0af1..e69de29bb 100644 --- a/sql/upgrade.sql +++ b/sql/upgrade.sql @@ -1,18 +0,0 @@ -insert into menu_ref (me_code,me_menu,me_file,me_description,me_type,me_description_etendue) -values('PRINTTVA','Résumé TVA','tax_summary.inc.php','totaux par TVA et par journal','ME','Calcul des totaux par TVA et par journal'); - -insert into profile_menu (me_code,me_code_dep,p_id,p_order,p_type_display,pm_default,pm_id_dep) -select me_code,'PRINT',1,250,'E',0,6 from menu_ref where me_code='PRINTTVA' -union -select me_code,'PRINT',1,250,'E',0,35 from menu_ref where me_code='PRINTTVA' -union -select me_code,'PRINT',2,250,'E',0,719 from menu_ref where me_code='PRINTTVA' -union -select me_code,'PRINT',2,250,'E',0,716 from menu_ref where me_code='PRINTTVA' -; -insert into menu_ref (me_code,me_menu,me_file,me_type) -values ('CSV:printtva','Export Résumé TVA','export_printtva_csv.php','PR'), - ('PDF:printtva','Export Résumé TVA','export_printtva_pdf.php','PR') -; - -insert into profile_menu(me_code,p_id,p_type_display) values ('CSV:printtva',1,'P'),('PDF:printtva',1,'P'),('CSV:printtva',2,'P'),('PDF:printtva',2,'P');