Входные параметры
Параметр | Тип | Описание |
---|---|---|
DATE2 |
DATE |
|
PASTYEAR |
INTEGER |
|
PASTYEAR1 |
INTEGER |
|
PASTYEAR2 |
INTEGER |
|
PASTYEAR3 |
INTEGER |
|
ST |
INTEGER |
|
PARTYID |
INTEGER |
|
PARTYDATE |
DATE |
|
FORMTYPE |
INTEGER |
|
Выходные параметры
Параметр | Тип | Описание |
---|---|---|
GR |
INTEGER |
|
K |
INTEGER |
|
K11 |
INTEGER |
|
K12 |
INTEGER |
|
K13 |
INTEGER |
|
K14 |
INTEGER |
|
K21 |
INTEGER |
|
K22 |
INTEGER |
|
K23 |
INTEGER |
|
K24 |
INTEGER |
|
K31 |
INTEGER |
|
K32 |
INTEGER |
|
K33 |
INTEGER |
|
K34 |
INTEGER |
|
Y11 |
INTEGER |
|
Y12 |
INTEGER |
|
Y13 |
INTEGER |
|
Y14 |
INTEGER |
|
Y21 |
INTEGER |
|
Y22 |
INTEGER |
|
Y23 |
INTEGER |
|
Y24 |
INTEGER |
|
Y31 |
INTEGER |
|
Y32 |
INTEGER |
|
Y33 |
INTEGER |
|
Y34 |
INTEGER |
|
YP11 |
INTEGER |
|
YP12 |
INTEGER |
|
YP13 |
INTEGER |
|
YP21 |
INTEGER |
|
YP22 |
INTEGER |
|
YP23 |
INTEGER |
|
Y |
INTEGER |
|
Описание
Бухгалтерия - формы №РН3 и №2 (часть 2)
Определение
CREATE PROCEDURE ACC_FORMRN3_PART2_2005(
DATE2 DATE,
PASTYEAR INTEGER,
PASTYEAR1 INTEGER,
PASTYEAR2 INTEGER,
PASTYEAR3 INTEGER,
ST INTEGER,
PARTYID INTEGER,
PARTYDATE DATE,
FORMTYPE INTEGER)
RETURNS (
GR INTEGER,
K INTEGER,
K11 INTEGER,
K12 INTEGER,
K13 INTEGER,
K14 INTEGER,
K21 INTEGER,
K22 INTEGER,
K23 INTEGER,
K24 INTEGER,
K31 INTEGER,
K32 INTEGER,
K33 INTEGER,
K34 INTEGER,
Y11 INTEGER,
Y12 INTEGER,
Y13 INTEGER,
Y14 INTEGER,
Y21 INTEGER,
Y22 INTEGER,
Y23 INTEGER,
Y24 INTEGER,
Y31 INTEGER,
Y32 INTEGER,
Y33 INTEGER,
Y34 INTEGER,
YP11 INTEGER,
YP12 INTEGER,
YP13 INTEGER,
YP21 INTEGER,
YP22 INTEGER,
YP23 INTEGER,
Y INTEGER)
AS
begin
if (:st <> 0) then
begin
select rem from acc_formrn3_details(:date2, 73, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:gr;
select rem from acc_formrn3_details(:date2, 4, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:k;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 4, 37, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :k11, :k12, :k13, :k14;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 4, 38, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :k21, :k22, :k23, :k24;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 4, 38, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :k21, :k22, :k23, :k24;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 4, 12, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :k31, :k32, :k33, :k34;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 2, 7, -23, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :y11, :y12, :y13, :y14;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 2, 8, -23, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :y21, :y22, :y23, :y24;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 2, 9, -23, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :y31, :y32, :y33, :y34;
select rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 2, 7, 23, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :yp11, :yp12, :yp13;
select rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 2, 8, 23, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :yp21, :yp22, :yp23;
select rem
from acc_formrn3_details(:date2, 2, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into :y;
end
suspend;
end