[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 08/21: Convert upgrade.sql to upgrade202.sql
From: |
dwm |
Subject: |
[Noalyss-commit] [noalyss] 08/21: Convert upgrade.sql to upgrade202.sql |
Date: |
Sun, 15 Dec 2024 09:51:38 -0500 (EST) |
sparkyx pushed a commit to branch unstable
in repository noalyss.
commit 4e7033b3d1ec8585f6c436f8ebf94f9c1d5176f7
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Fri Dec 6 17:43:23 2024 +0100
Convert upgrade.sql to upgrade202.sql
---
include/constant.php | 2 +-
.../sql/patch/upgrade202.sql | 8 +++++---
sql/upgrade.sql | 24 ++--------------------
3 files changed, 8 insertions(+), 26 deletions(-)
diff --git a/include/constant.php b/include/constant.php
index e81d73934..806867ebb 100644
--- a/include/constant.php
+++ b/include/constant.php
@@ -28,7 +28,7 @@ global $version_noalyss;
define('NOALYSS_VERSION', 9300 );
// Database schema version
-define("DBVERSION", 202);
+define("DBVERSION", 203);
// version for MONO_DATABASE
define("MONO_DATABASE", 25);
diff --git a/sql/upgrade.sql b/include/sql/patch/upgrade202.sql
similarity index 83%
copy from sql/upgrade.sql
copy to include/sql/patch/upgrade202.sql
index 59784c8b5..d183afa61 100644
--- a/sql/upgrade.sql
+++ b/include/sql/patch/upgrade202.sql
@@ -1,5 +1,4 @@
--- change color selected menu
-update parm_appearance set a_value='#000074' where a_code='MENU1-SELECTED' and
a_value='#7191ea';
+begin;
alter table tva_rate add column tva_reverse_account account_type;
alter table tva_rate add constraint fk_tva_reverse_account foreign key
(tva_reverse_account) references tmp_pcmn(pcm_val) on delete set null on
update cascade ;
@@ -20,4 +19,7 @@ AS SELECT tva_id,
tva_both_side,
tva_payment_purchase,
tva_payment_sale
- FROM tva_rate;
\ No newline at end of file
+FROM tva_rate;
+
+insert into version (val,v_description) values (203,'C0TVA force accounting
for autoreverse VAT');
+commit;
diff --git a/sql/upgrade.sql b/sql/upgrade.sql
index 59784c8b5..bfacd4c4d 100644
--- a/sql/upgrade.sql
+++ b/sql/upgrade.sql
@@ -1,23 +1,3 @@
--- change color selected menu
-update parm_appearance set a_value='#000074' where a_code='MENU1-SELECTED' and
a_value='#7191ea';
-
-alter table tva_rate add column tva_reverse_account account_type;
-alter table tva_rate add constraint fk_tva_reverse_account foreign key
(tva_reverse_account) references tmp_pcmn(pcm_val) on delete set null on
update cascade ;
-
-comment on column tva_rate.tva_reverse_account is 'Accouting for reversed VAT';
-drop VIEW public.v_tva_rate;
-
-CREATE OR REPLACE VIEW public.v_tva_rate
-AS SELECT tva_id,
- tva_rate,
- tva_code,
- tva_label,
- tva_comment,
- tva_reverse_account,
- split_part(tva_poste, ','::text, 1) AS tva_purchase,
- split_part(tva_poste, ','::text, 2) AS tva_sale,
- tva_both_side,
- tva_payment_purchase,
- tva_payment_sale
- FROM tva_rate;
\ No newline at end of file
+-- change color selected menu
+update parm_appearance set a_value='#000074' where a_code='MENU1-SELECTED' and
a_value='#7191ea';
\ No newline at end of file
- [Noalyss-commit] [noalyss] 02/21: Merge branch '241104-correct' into unstable, (continued)
- [Noalyss-commit] [noalyss] 02/21: Merge branch '241104-correct' into unstable, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 15/21: improve Operation detail : show Analytic imputation for VAT Not Deductible, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 04/21: css : font size rem or % , remove all fixed font-size in px, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 20/21: VAT ND Analytic : fix bug, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 07/21: NEW #0002395: C0TVA : pouvoir choisir la contrepartie pour l'autoliquidation, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 06/21: FIX : some doc in comment, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 21/21: Esthetic, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 11/21: FIX : javascript id$ function, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 09/21: FIX : Tax_Summary->check fails when there is no data, check was not correct, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 05/21: WIP : CSS : use variables, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 08/21: Convert upgrade.sql to upgrade202.sql,
dwm <=
- [Noalyss-commit] [noalyss] 16/21: Operation Analytic : save_form_plan_vat_nd , check that the total is the same as the VAT ND amount, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 14/21: improve doc, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 19/21: Integrate stash, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 10/21: FIX : Tax_Summary->check fails when there is no data, check was not correct, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 17/21: Documentation, dwm, 2024/12/15
- [Noalyss-commit] [noalyss] 18/21: Code improve Todo List to finish , allow a empty date, dwm, 2024/12/15