Exact Software Corporate News
 
 

Nové sazby DPH/New VAT percentages (14->15%, 20->21%) - 1.1.2013 - SQL skripty

Podmínky / preconditions:

  • doporučeno vytvořit zálohu před spuštěním / recommended to create a backup before running the scripts
  • nový kód DPH musí existovat / the new VAT code must exist
  • typ a atributy nového kódu DPH musí být stejné jako starý kód / the type and attributes of the new VAT code must be the same as of the old one

SQL Skripty / SQL scripts:

Exact Globe Next:

-- 1) DPH PRODEJ - POLOZKY / SALES VAT - ITEMS:

declare @old char(3)
declare @new char(3
)

set @old = 'P14' -- stary kod DPH / old VAT code
set @new = 'P15'
-- novy kod DPH, musi existovat! / new VAT code, it must exist!

if exists (select btwtrans from btwtrs where btwtrans = @new)
update items set SalesVatCode = @new where SalesVatCode =
@old
else select 'Novy kod DPH prodej neexistuje / New VAT code sales does not exist: ', @new

go

-- 2) DPH NAKUP - POLOZKY PODLE DODAVATELE / PURCHASE VAT - ITEMS BY SUPPLIERS:

declare @old char(3)
declare @new char(3
)

set @old = 'N14' -- stary kod DPH / old VAT code
set @new = 'N15'
-- novy kod DPH, musi existovat! / new VAT code, it must exist!

if exists (select btwtrans from btwtrs where btwtrans = @new)
update itemaccounts set PurchaseVatCode = @new where PurchaseVatCode =
@old
else select 'Novy kod DPH nakup neexistuje / New VAT code purchase does not exist: ', @new

go

-- 3) DODAVATELE + ODBERATELE / CREDITORS + DEBTORS:

declare @old char(3)
declare @new char(3)

set @old = 'P14' -- stary kod DPH / old VAT code
set @new = 'P15' -- novy kod DPH, musi existovat! / new VAT code, it must exist!

if exists (select btwtrans from btwtrs where btwtrans = @new)
update cicmpy set VatCode = @new where VatCode = @old
else select 'Novy kod DPH prodej neexistuje / New VAT code sales does not exist: ', @new

go

 

Exact Globe for Windows:

-- debtors
select btwtrans,* from debitr
update debitr set btwtrans = 'new' where btwtrans = 'old'

-- creditors
select btwtrans,* from credit
update credit set btwtrans = 'new' where btwtrans = 'old'

-- items
select btw_verk,btw_ink,* from artbst
update artbst set btw_verk = 'new' where btw_verk = 'old' -- sales VAT
update artbst set btw_ink = 'new' where btw_ink = 'old'   -- purchase VAT

-- items per supplier
select btw_ink,* from artlev
update artlev set btw_ink = 'new' where btw_ink = 'old'

 

Disclaimer:

 
   
Tags
Tags to useClick to remove all tags from Tags to use

Hint:
To add or remove tags from the desired group, simply click on the word. To view other documents with the same tag, press Ctrl-Click
One moment please...