PANTHEON™ Help

 Toc
 PANTHEON Help - Welcome
[Collapse]PANTHEON
 [Collapse]Guides for PANTHEON
  [Expand]Guide for PANTHEON
  [Expand]Guide for PANTHEON Retail
  [Expand]Guide for PANTHEON Vet
  [Expand]Guide for PANTHEON Farming
 [Collapse]User Manuals for PANTHEON
  [Expand]User Manual for PANTHEON
  [Expand]User Manual for PANTHEON Retail
  [Expand]User manual for PANTHEON Vet
  [Expand]User Manual for PANTHEON Farming
[Collapse]PANTHEON Web
 [Collapse]Guides for PANTHEON Web
  [Expand]Guide for PANTHEON Web Light
  [Expand]Guide for PANTHEON Web Terminal
  [Expand]Guide for PANTHEON Web Legal
  [Expand]Old products Archive
 [Collapse]User Manuals for PANTHEON Web
  [Expand]Getting started PANTHEON Web
  [Expand]User Manual for PANTHEON Web Light
  [Expand]User Manual for PANTHEON Web Terminal
  [Expand]User Manual for PANTHEON Web Legal
  [Expand]Old products Archive
[Collapse]PANTHEON Granules
 [Collapse]Guides for PANTHEON Granules
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]Dashboard Granule
  [Expand]B2B Orders Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
 [Collapse]User Manuals for PANTHEON Granules
  [Expand]Getting started
  [Expand]Personnel Granule
  [Expand]Travel Orders Granule
  [Expand]Documents and Tasks Granule
  [Expand]B2B Orders Granule
  [Expand]Dashboard Granule
  [Expand]Field Service Granule
  [Expand]Fixed Assets Inventory Granule
  [Expand]Warehouse Inventory Granule
  [Expand]Archive
[Expand]User Site

Load Time: 343.7579 ms
"
  6613 | 1 | |
Label


Preračun knjiženja u stranu valutu

Preračun knjiženja u stranu valutu

Preračun knjiženja u stranu valutu

Često moramo preračunati određene naloge za kljuiženje, koji su knjiženi u primarnoj valuti u stranu valutu (npr. za bilans u stranoj valuti). Najlakše to odradimo sledećim skriptom, koji koristi stored proceduru za traženje kurseva:

declare
  @cKljuc char(11),
  @iPoz int,
  @fDebet money,
  @fKredit money,
  @fTecaj money,
  @cValuta char(3),
  @dDatum datetime

set nocount on
set @cValuta = 'EUR'    -- valuta, u koju preračunavamo

declare crKurzor cursor local fast_forward for
  select KLJUC,POZ,DEBET,KREDIT,DATUMDOK
  from TEMEPOZ 
  where VALUTA <> @cValuta
    and -- OVDE UNESITE DODATNI USLOV,..


open crKurzor
fetch next from crKurzor into @cKljuc, @iPoz, @fDebet, @fKredit, @dDatum
  while @@fetch_status = 0
    begin
      -- u ovom slučaju po srednjem kursu. NBS, promenite ako koristite drugi kurs
      exec dl_PoisciTecaj 'BS - Srednji','EUR',@dDatum,@fTecaj output
      update TEMEPOZ 
        set VALUTA = @cValuta,
            DEVTEC = @fTecaj,
            VALDEBET = @fDebet / @fTecaj,
            VALKREDIT = @fKredit / @fTecaj
        where KLJUC = @cKljuc 
          and POZ = @iPoz
      fetch next from crKurzor into @cKljuc, @iPoz, @fDebet, @fKredit, @dDatum
    end
close crKurzor
deallocate crKurzor

  

     


Rate this topic
Was this topic usefull?
Comments
Comment will also bo visible in forum!