|
|
Строка 6: |
Строка 6: |
| | | |
| data - дата | | data - дата |
− | = Текст =
| |
− | parameters r20_kod, data
| |
− | local fro1, fro2, flt, r130_kod, r179_kod
| |
− | r130_kod := SEEKREF( 'R130', r20_kod, 'KOD', 4 )
| |
− | r179_kod := SEEKREF( 'R179', r130_kod, 'KOD', 2 )
| |
− | try
| |
− | fro1 := OPENCHILDDOC( 'FRO', '1', ~ParentForm := "", ~IsCondition := false, ~Month := MONTH( data ), ~Year := YEAR( data ) )
| |
− | flt := [ KINDDOC = 'FRO' and LVLNUM = '1' and DtoS( DATDOC ) = '] + DTOS( data ) + [' and KREFL1 = 'R20 ' and KANAL1 = ] + r20_kod
| |
− | ( fro1 )->( SETFILTER( flt ) )
| |
− | ( fro1 )->( REFRESH() )
| |
− | ( fro1 )->( DBGOTOP() )
| |
− | while !( fro1 )->( EOF() )
| |
− | ( fro1 )->DREFL1 := 'R130'
| |
− | ( fro1 )->DANAL1 := r130_kod
| |
− | ( fro1 )->K1NAME := REALNAME( 'R20 ', r20_kod )
| |
− | ( fro1 )->DREFL2 := 'R179'
| |
− | ( fro1 )->DANAL2 := r179_kod
| |
− | if ( fro1 )->NATTR8 = 1
| |
− | ( fro1 )->CARDPAY := 'Да'
| |
− | endif
| |
− | ( fro1 )->( DBSKIP() )
| |
− | end
| |
− | finally
| |
− | CLOSEFORM( ( fro1 )->( GETFORM( GETAREA() ) ), true )
| |
− | end
| |
− | try
| |
− | fro2 := OPENCHILDDOC( 'FRO', '2', ~ParentForm := "", ~IsCondition := false, ~Month := MONTH( data ), ~Year := YEAR( data ) )
| |
− | flt := [ KINDDOC = 'FRO' and LVLNUM = '2' and DtoS( DATDOC ) = '] + DTOS( data ) + [' and KREFL1 = 'R20 ' and KANAL1 = ] + r20_kod
| |
− | ( fro2 )->( SETFILTER( flt ) )
| |
− | ( fro2 )->( REFRESH() )
| |
− | ( fro2 )->( DBGOTOP() )
| |
− | while !( fro2 )->( EOF() )
| |
− | if ( fro2 )->KANAL2 > 0
| |
− | ( fro2 )->KREFL2 := 'R11 '
| |
− | ( fro2 )->K2NAME := REALNAME( 'R11 ', ( fro2 )->KANAL2 )
| |
− | ( fro2 )->SUM := ROUND( ( fro2 )->AMNT * ( fro2 )->NATTR1, 2 )
| |
− | endif
| |
− | ( fro2 )->( DBSKIP() )
| |
− | end
| |
− | finally
| |
− | [[CLOSEFORM]]( ( fro2 )->( GETFORM( GETAREA() ) ), true )
| |
− | end
| |
| = Смотрите также = | | = Смотрите также = |
| [[Полезные функции]] | | [[Полезные функции]] |
| | | |
| [[Функции Delphi]] | | [[Функции Delphi]] |