phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4481 - phpcompta/trunk/sql


From: phpcompta-dev
Subject: [Phpcompta-dev] r4481 - phpcompta/trunk/sql
Date: Sun, 27 Nov 2011 03:23:07 +0100 (CET)

Author: danydb
Date: 2011-11-27 03:23:06 +0100 (Sun, 27 Nov 2011)
New Revision: 4481

Removed:
   phpcompta/trunk/sql/style-epad.sql
   phpcompta/trunk/sql/tmp_pcmn_alphanum_ins_upd.sql
   phpcompta/trunk/sql/tmp_pcmn_ins.sql
   phpcompta/trunk/sql/trigger.tmp_pcmn.sql
   phpcompta/trunk/sql/tva.sql
   phpcompta/trunk/sql/upgrade.sql
Log:

remove temp file 



Deleted: phpcompta/trunk/sql/style-epad.sql
===================================================================
--- phpcompta/trunk/sql/style-epad.sql  2011-11-27 02:22:33 UTC (rev 4480)
+++ phpcompta/trunk/sql/style-epad.sql  2011-11-27 02:23:06 UTC (rev 4481)
@@ -1,3 +0,0 @@
--- run to the account_repository
-insert into theme values ('EPad','style-epad.css',null);
-

Deleted: phpcompta/trunk/sql/tmp_pcmn_alphanum_ins_upd.sql
===================================================================
--- phpcompta/trunk/sql/tmp_pcmn_alphanum_ins_upd.sql   2011-11-27 02:22:33 UTC 
(rev 4480)
+++ phpcompta/trunk/sql/tmp_pcmn_alphanum_ins_upd.sql   2011-11-27 02:23:06 UTC 
(rev 4481)
@@ -1,14 +0,0 @@
-
-CREATE OR REPLACE FUNCTION comptaproc.tmp_pcmn_alphanum_ins_upd()
-  RETURNS trigger AS
-$BODY$
-declare
-   r_record tmp_pcmn%ROWTYPE;
-begin
-r_record := NEW;
-r_record.pcm_val:=format_account(NEW.pcm_val);
-
-return r_record;
-end;
-$BODY$
-LANGUAGE plpgsql;

Deleted: phpcompta/trunk/sql/tmp_pcmn_ins.sql
===================================================================
--- phpcompta/trunk/sql/tmp_pcmn_ins.sql        2011-11-27 02:22:33 UTC (rev 
4480)
+++ phpcompta/trunk/sql/tmp_pcmn_ins.sql        2011-11-27 02:23:06 UTC (rev 
4481)
@@ -1,16 +0,0 @@
-CREATE OR REPLACE FUNCTION comptaproc.tmp_pcmn_ins()
-  RETURNS trigger AS
-$BODY$
-declare
-   r_record tmp_pcmn%ROWTYPE;
-begin
-r_record := NEW;
-if  length(trim(r_record.pcm_type))=0 or r_record.pcm_type is NULL then 
-   r_record.pcm_type:=find_pcm_type(NEW.pcm_val);
-   return r_record;
-end if;
-return NEW;
-end;
-$BODY$
-LANGUAGE plpgsql;
-

Deleted: phpcompta/trunk/sql/trigger.tmp_pcmn.sql
===================================================================
--- phpcompta/trunk/sql/trigger.tmp_pcmn.sql    2011-11-27 02:22:33 UTC (rev 
4480)
+++ phpcompta/trunk/sql/trigger.tmp_pcmn.sql    2011-11-27 02:23:06 UTC (rev 
4481)
@@ -1,5 +0,0 @@
-CREATE TRIGGER t_tmp_pcm_alphanum_ins_upd
-  BEFORE INSERT OR UPDATE
-  ON tmp_pcmn
-  FOR EACH ROW
-  EXECUTE PROCEDURE comptaproc.tmp_pcmn_alphanum_ins_upd();

Deleted: phpcompta/trunk/sql/tva.sql
===================================================================
--- phpcompta/trunk/sql/tva.sql 2011-11-27 02:22:33 UTC (rev 4480)
+++ phpcompta/trunk/sql/tva.sql 2011-11-27 02:23:06 UTC (rev 4481)
@@ -1,171 +0,0 @@
-alter table tva_rate add tva_both_side integer ;
-alter table tva_rate alter tva_both_side set default 0;
-update tva_rate set tva_both_side=0;
-
-----------------------------------------------------------------------
--- TVA MODIFY
-----------------------------------------------------------------------
-drop FUNCTION comptaproc.tva_modify(integer, text, numeric, text, text);
-
-
-
-alter table quant_purchase add qp_vat_sided numeric (20,4);
-alter table quant_sold add qs_vat_sided numeric (20,4);
-
-alter table quant_purchase alter qp_vat_sided set default 0.0;
-alter table quant_sold alter qs_vat_sided set default 0.0;
-
-update quant_purchase set qp_vat_sided=0.0;
-update quant_sold set qs_vat_sided=0.0;
-
-comment on column quant_purchase.qp_vat_sided is 'amount of the VAT which 
avoid VAT, case of the VAT which add the same amount at the deb and cred';
-comment on column quant_purchase.qp_vat_sided is 'amount of the VAT which 
avoid VAT, case of the VAT which add the same amount at the deb and cred';
-
-CREATE OR REPLACE FUNCTION comptaproc.tva_modify(integer, text, numeric, text, 
text,integer)
- RETURNS integer
-AS $function$
-declare
-       p_tva_id alias for $1;
-       p_tva_label alias for $2;
-       p_tva_rate alias for $3;
-       p_tva_comment alias for $4;
-       p_tva_poste alias for $5;
-       p_tva_both_side alias for $6;
-       debit text;
-       credit text;
-       nCount integer;
-begin
-if length(trim(p_tva_label)) = 0 then
-       return 3;
-end if;
-
-if length(trim(p_tva_poste)) != 0 then
-       if position (',' in p_tva_poste) = 0 then return 4; end if;
-       debit  = split_part(p_tva_poste,',',1);
-       credit  = split_part(p_tva_poste,',',2);
-       select count(*) into nCount from tmp_pcmn where 
pcm_val=debit::account_type;
-       if nCount = 0 then return 4; end if;
-       select count(*) into nCount from tmp_pcmn where 
pcm_val=credit::account_type;
-       if nCount = 0 then return 4; end if;
-
-end if;
-update tva_rate set 
tva_label=p_tva_label,tva_rate=p_tva_rate,tva_comment=p_tva_comment,tva_poste=p_tva_poste,tva_both_side=p_tva_both_side
-       where tva_id=p_tva_id;
-return 0;
-end;
-$function$
-LANGUAGE plpgsql;
-
-----------------------------------------------------------------------
--- TVA INSERT
-----------------------------------------------------------------------
-
-drop FUNCTION comptaproc.tva_insert(text, numeric, text, text);
-
-CREATE OR REPLACE FUNCTION comptaproc.tva_insert(text, numeric, text, 
text,integer)
- RETURNS integer
-AS $function$
-declare
-       l_tva_id integer;
-       p_tva_label alias for $1;
-       p_tva_rate alias for $2;
-       p_tva_comment alias for $3;
-       p_tva_poste alias for $4;
-       p_tva_both_side alias for $5;
-       debit text;
-       credit text;
-       nCount integer;
-begin
-if length(trim(p_tva_label)) = 0 then
-       return 3;
-end if;
-
-if length(trim(p_tva_poste)) != 0 then
-       if position (',' in p_tva_poste) = 0 then return 4; end if;
-       debit  = split_part(p_tva_poste,',',1);
-       credit  = split_part(p_tva_poste,',',2);
-       select count(*) into nCount from tmp_pcmn where 
pcm_val=debit::account_type;
-       if nCount = 0 then return 4; end if;
-       select count(*) into nCount from tmp_pcmn where 
pcm_val=credit::account_type;
-       if nCount = 0 then return 4; end if;
-
-end if;
-select into l_tva_id nextval('s_tva') ;
-insert into 
tva_rate(tva_id,tva_label,tva_rate,tva_comment,tva_poste,tva_both_side)
-       values 
(l_tva_id,p_tva_label,p_tva_rate,p_tva_comment,p_tva_poste,p_tva_both_side);
-return 0;
-end;
-$function$
-LANGUAGE plpgsql;
-
-
-
-DROP FUNCTION comptaproc.insert_quant_purchase(text,numeric, character 
varying,numeric,numeric,numeric,integer,numeric,numeric,numeric,numeric,character
 varying);
--- procedure insert_quant_purchase
-CREATE OR REPLACE FUNCTION comptaproc.insert_quant_purchase(p_internal text, 
p_j_id numeric, p_fiche character varying, p_quant numeric, p_price numeric, 
p_vat numeric, p_vat_code integer, p_nd_amount numeric, p_nd_tva numeric, 
p_nd_tva_recup numeric, p_dep_priv numeric, p_client character 
varying,p_tva_sided numeric)
- RETURNS void
-AS $function$
-declare
-        fid_client integer;
-        fid_good   integer;
-begin
-        select f_id into fid_client from
-                fiche_detail where ad_id=23 and ad_value=upper(trim(p_client));
-        select f_id into fid_good from
-                 fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche));
-        insert into quant_purchase
-                (qp_internal,
-                j_id,
-                qp_fiche,
-                qp_quantite,
-                qp_price,
-                qp_vat,
-                qp_vat_code,
-                qp_nd_amount,
-                qp_nd_tva,
-                qp_nd_tva_recup,
-                qp_supplier,
-                qp_dep_priv,
-                qp_vat_sided)
-        values
-                (p_internal,
-                p_j_id,
-                fid_good,
-                p_quant,
-                p_price,
-                p_vat,
-                p_vat_code,
-                p_nd_amount,
-                p_nd_tva,
-                p_nd_tva_recup,
-                fid_client,
-                p_dep_priv,
-                p_tva_sided);
-        return;
-end;
- $function$ 
- LANGUAGE plpgsql;
-
-DROP FUNCTION comptaproc.insert_quant_sold(text, numeric, character varying, 
numeric, numeric, numeric, integer, character varying);
-
--- procedure insert_quant_sold
-CREATE OR REPLACE FUNCTION comptaproc.insert_quant_sold(p_internal text, p_jid 
numeric, p_fiche character varying, p_quant numeric, p_price numeric, p_vat 
numeric, p_vat_code integer, p_client character varying,p_tva_sided numeric)
- RETURNS void
-AS $function$
-declare
-        fid_client integer;
-        fid_good   integer;
-begin
-
-        select f_id into fid_client from
-                fiche_detail where ad_id=23 and ad_value=upper(trim(p_client));
-        select f_id into fid_good from
-                fiche_detail where ad_id=23 and ad_value=upper(trim(p_fiche));
-        insert into quant_sold
-                
(qs_internal,j_id,qs_fiche,qs_quantite,qs_price,qs_vat,qs_vat_code,qs_client,qs_valid,qs_vat_sided)
-        values
-                
(p_internal,p_jid,fid_good,p_quant,p_price,p_vat,p_vat_code,fid_client,'Y',p_tva_sided);
-        return;
-end;
- $function$ 
- LANGUAGE plpgsql;

Deleted: phpcompta/trunk/sql/upgrade.sql
===================================================================
--- phpcompta/trunk/sql/upgrade.sql     2011-11-27 02:22:33 UTC (rev 4480)
+++ phpcompta/trunk/sql/upgrade.sql     2011-11-27 02:23:06 UTC (rev 4481)
@@ -1,39 +0,0 @@
-\set ECHO all
-\set ON_ERROR_ROLLBACK
-\set ON_ERROR_STOP
-begin;
-drop table public.import_tmp;
-drop table public.format_csv_banque;
-insert into parameter values ('MY_ALPHANUM','N');
-update PARAMETER set pr_value='N' where pr_id='MY_CHECK_PERIODE';
-delete from action where ac_id not in (800,805,910);
-insert into action (ac_id,ac_description, ac_module, ac_code) 
values(1020,'Effacer les documents du suivi','followup','RMDOC');
-insert into action (ac_id,ac_description, ac_module, ac_code) 
values(1010,'Voir les documents du suivi','followup','VIEWDOC');
-insert into action (ac_id,ac_description, ac_module, ac_code) 
values(1050,'Modifier le type de document','followup','PARCATDOC');
-/*
-script SQL to run
-*/
-\i account_alphanum.sql
-\i account_compute.sql
-\i account_insert.sql
-\i account-update.sql
-\i format_account.sql
-\i tmp_pcmn_alphanum_ins_upd.sql
-\i tmp_pcmn_ins.sql
-\i trigger.tmp_pcmn.sql
-\i account_add.sql
-\i object-6.0.sql
-\i extension.sql
-\i ajax-direct-form.sql
-
-\i mode_paiement.sql
-\i tva.sql
-create unique index qcode_idx on fiche_detail (ad_value) where ad_id=23;
-
-
----------------------------------------------------
--- for account repository
----------------------------------------------------
--- \i change_account_repo.sql
--- \i style-epad.sql
-commit;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]