"localhost:/firebird/data/ILICHEVSK2.FDB". ��������� Previous topic Chapter index Next topic

FORM37AWASTE

 

������� ���������

��������

���

��������

BEGDATE

DATE

 

ENDDATE

DATE

 

REGDATE

DATE

 

NET

INTEGER

 

CROPID

INTEGER

 

CLASSID

INTEGER

 

 

�������� ���������

��������

���

��������

RESTNET

INTEGER

 

COMNET

INTEGER

 

EXPNET

INTEGER

 

 

��������

(��� �������� ��� ��������� FORM37AWASTE)

 

�����������

CREATE PROCEDURE FORM37AWASTE(
    BEGDATE DATE,
    ENDDATE DATE,
    REGDATE DATE,
    NET INTEGER,
    CROPID INTEGER,
    CLASSID INTEGER)
RETURNS (
    RESTNET INTEGER,
    COMNET INTEGER,
    EXPNET INTEGER)
AS
begin
  if (:cropid = 9 and :classid in(40,41)) then
  BEGIN
    if (:regdate < :begdate) then RestNet = :net*(-1);
    if (:regdate between :begdate and :enddate) then expNet = :net;
  END
/*
  if (regdate < begdate) then
  begin
    if (:cropid = 9 and :classid in(40,41)) then restnet = :net;
    else if (:operationid in (5,22,46) )  then restnet = :net*(-1);
    else if (:operationid = 17) then restnet = :net;
    else if (:operationid = 70) then restnet = :net*(-1);
  end
  if (regdate between :begdate and :enddate) then
  begin
    if (:operationid in (1,4)) then comnet = :net;
    else if (:operationid in (5, 22, 70)) then expnet = :net;
  end*/

  /* Procedure Text */
  suspend;
end

 

     Previous topic Chapter index Next topic