Входные параметры
Параметр | Тип | Описание |
---|---|---|
DATE2 |
DATE |
|
PASTYEAR |
INTEGER |
|
PASTYEAR1 |
INTEGER |
|
PASTYEAR2 |
INTEGER |
|
PASTYEAR3 |
INTEGER |
|
ST |
INTEGER |
|
PARTYID |
INTEGER |
|
PARTYDATE |
DATE |
|
FORMTYPE |
INTEGER |
|
Выходные параметры
Параметр | Тип | Описание |
---|---|---|
GR |
INTEGER |
|
OV11 |
INTEGER |
|
OV12 |
INTEGER |
|
OV13 |
INTEGER |
|
OV14 |
INTEGER |
|
OV21 |
INTEGER |
|
OV22 |
INTEGER |
|
OV23 |
INTEGER |
|
OV24 |
INTEGER |
|
OV31 |
INTEGER |
|
OV32 |
INTEGER |
|
OV33 |
INTEGER |
|
OV34 |
INTEGER |
|
R |
INTEGER |
|
R1 |
INTEGER |
|
R2 |
INTEGER |
|
R3 |
INTEGER |
|
TRI |
INTEGER |
|
ZRNS |
INTEGER |
|
OV41 |
INTEGER |
|
OV42 |
INTEGER |
|
OV43 |
INTEGER |
|
OV44 |
INTEGER |
|
OV |
INTEGER |
|
AL |
INTEGER |
|
SON |
INTEGER |
|
Описание
Бухгалтерия - формы №РН3 и №2 (часть 3)
Определение
CREATE PROCEDURE ACC_FORMRN3_PART3_2005(
DATE2 DATE,
PASTYEAR INTEGER,
PASTYEAR1 INTEGER,
PASTYEAR2 INTEGER,
PASTYEAR3 INTEGER,
ST INTEGER,
PARTYID INTEGER,
PARTYDATE DATE,
FORMTYPE INTEGER)
RETURNS (
GR INTEGER,
OV11 INTEGER,
OV12 INTEGER,
OV13 INTEGER,
OV14 INTEGER,
OV21 INTEGER,
OV22 INTEGER,
OV23 INTEGER,
OV24 INTEGER,
OV31 INTEGER,
OV32 INTEGER,
OV33 INTEGER,
OV34 INTEGER,
R INTEGER,
R1 INTEGER,
R2 INTEGER,
R3 INTEGER,
TRI INTEGER,
ZRNS INTEGER,
OV41 INTEGER,
OV42 INTEGER,
OV43 INTEGER,
OV44 INTEGER,
OV INTEGER,
AL INTEGER,
SON INTEGER)
AS
begin
if (:st <> 0) then
begin
select rem from acc_formrn3_details(:date2, 51, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:gr;
select rem from acc_formrn3_details(:date2, 48, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:ov;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 48, 61, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :ov11, :ov12, :ov13, :ov14;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 48, 116, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :ov21, :ov22, :ov23, :ov24;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 48, 117, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :ov31, :ov32, :ov33, :ov34;
select rem_h1, rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 48, 118, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :ov41, :ov42, :ov43, :ov44;
select rem from acc_formrn3_details(:date2, 74, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:r;
select rem_h2, rem_h3, rem_h4
from acc_formrn3_details(:date2, 74, -1, 0, :st, :pastyear3, :pastyear2, :pastyear1, :pastyear, :partyid, :partydate, :formtype)
into :r1, :r2, :r3;
select rem from acc_formrn3_details(:date2, 71, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:tri;
select rem from acc_formrn3_details(:date2, 49, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:zrns;
select rem from acc_formrn3_details(:date2, -1, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:al;
select rem from acc_formrn3_details(:date2, 37, -1, 0, :st, 0,0,0,0, :partyid, :partydate, :formtype)
into
:son;
end
suspend;
end