Входные параметры
Параметр | Тип | Описание |
---|---|---|
DATE2 |
DATE |
|
PASTYEAR |
INTEGER |
|
PASTYEAR1 |
INTEGER |
|
PASTYEAR2 |
INTEGER |
|
PASTYEAR3 |
INTEGER |
|
ST |
INTEGER |
|
PARTYID |
INTEGER |
|
PARTYDATE |
DATE |
|
FORMTYPE |
INTEGER |
|
Выходные параметры
Параметр | Тип | Описание |
---|---|---|
PM |
INTEGER |
|
P21 |
INTEGER |
|
P22 |
INTEGER |
|
P23 |
INTEGER |
|
P24 |
INTEGER |
|
P31 |
INTEGER |
|
P32 |
INTEGER |
|
P33 |
INTEGER |
|
P34 |
INTEGER |
|
P41 |
INTEGER |
|
P42 |
INTEGER |
|
P43 |
INTEGER |
|
P44 |
INTEGER |
|
P51 |
INTEGER |
|
P52 |
INTEGER |
|
P53 |
INTEGER |
|
P54 |
INTEGER |
|
P61 |
INTEGER |
|
P62 |
INTEGER |
|
P63 |
INTEGER |
|
P64 |
INTEGER |
|
PT |
INTEGER |
|
PNEKL |
INTEGER |
|
Z |
INTEGER |
|
ZA1 |
INTEGER |
|
ZA2 |
INTEGER |
|
ZA3 |
INTEGER |
|
ZA4 |
INTEGER |
|
ZB1 |
INTEGER |
|
ZB2 |
INTEGER |
|
ZB3 |
INTEGER |
|
ZB4 |
INTEGER |
|
PROSO |
INTEGER |
|
Описание
Бухгалтерия - формы №РН3 и №2 (часть 1)
Определение
CREATE PROCEDURE ACC_FORMRN3_2005(
DATE2 DATE,
PASTYEAR INTEGER,
PASTYEAR1 INTEGER,
PASTYEAR2 INTEGER,
PASTYEAR3 INTEGER,
ST INTEGER,
PARTYID INTEGER,
PARTYDATE DATE,
FORMTYPE INTEGER)
RETURNS (
PM INTEGER,
P21 INTEGER,
P22 INTEGER,
P23 INTEGER,
P24 INTEGER,
P31 INTEGER,
P32 INTEGER,
P33 INTEGER,
P34 INTEGER,
P41 INTEGER,
P42 INTEGER,
P43 INTEGER,
P44 INTEGER,
P51 INTEGER,
P52 INTEGER,
P53 INTEGER,
P54 INTEGER,
P61 INTEGER,
P62 INTEGER,
P63 INTEGER,
P64 INTEGER,
PT INTEGER,
PNEKL INTEGER,
Z INTEGER,
ZA1 INTEGER,
ZA2 INTEGER,
ZA3 INTEGER,
ZA4 INTEGER,
ZB1 INTEGER,
ZB2 INTEGER,
ZB3 INTEGER,
ZB4 INTEGER,
PROSO INTEGER)
AS
begin
if (:st <> 0) then
begin
select rem from acc_formrn3_details(:date2, 1, -1, -3, :st, 0, 0, 0, 0, :partyid, :partydate, :formtype)
into :pm;
select rem from acc_formrn3_details(:date2, 1, 0, -3, :st, 0, 0, 0, 0, :partyid, :partydate, :formtype)
into :pnekl;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 1, 2, -3, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :p21, :p22, :p23, :p24;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 1, 3, -3, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :p31, :p32, :p33, :p34;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 1, 4, -3, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :p41, :p42, :p43, :p44;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 1, 5, -3, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :p51, :p52, :p53, :p54;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 1, 6, -3, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :p61, :p62, :p63, :p64;
select rem from acc_formrn3_details(:date2, 1, -1, 3, :st, 0, 0, 0, 0, :partyid, :partydate, :formtype)
into :pt;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 3, 10, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :za1, :za2, :za3, :za4;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 3, 11, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :zb1, :zb2, :zb3, :zb4;
select rem from acc_formrn3_details(:date2, 50, -1, 0, :st, 0, 0, 0, 0, :partyid, :partydate, :formtype)
into :proso;
select rem from acc_formrn3_details(:date2, 3, -1, 0, :st, 0, 0, 0, 0, :partyid, :partydate, :formtype)
into :z;
end
suspend;
end