Главная
Новый форум
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Функции ДТС, ДТС0, ДТ, КТ ..

 
Post new topic   Reply to topic   printer-friendly view     Forum Index -> Программирование в БЭСТ-4
View previous topic :: View next topic  
Author Message
itman



Joined: 05 Apr 2002
Posts: 1247
Location: Ильин Е.Ю.
Occupation: Cio
Interests: Кинель

PostPosted: 06 Dec 2005 14:35    Post subject: Функции ДТС, ДТС0, ДТ, КТ .. Reply with quote

Какие функции для получения остатков, оборотов по счетам?
Для использования в спецфункциях.
Back to top
View user's profile Send private message Send e-mail
nordk



Joined: 27 Jun 2005
Posts: 1000
Location: Горбунов Константин
Occupation: БЭСТ-Партнер
Interests: СПб

PostPosted: 06 Dec 2005 15:42    Post subject: Reply with quote

// ДТС0 КТС0 ДТС КТС
CASE nFunc == 1 .OR. ;
nFunc == 2 .OR. ;
nFunc == 4 .OR. ;
nFunc == 5
nLen := MyLen( aPar, 1 )
aType := MyType( aPar, { 'C', 'CD' } )
IF nLen > 1
IF ValType(aPar[2])=='C' .AND. SUBSTR(aPar[2],5,1) == '.'
// период опеделен ГГГГ.ММ
aPar[2] := EOM(STOD( LEFT(aPar[2],4)+RIGHT(aPar[2],2)+'01'))//ALEX
ELSE
dDate := MyDate( aPar[2], aType[2], .F. )
if nLen>2
dDate1 := MyDate( aPar[3], aType[2], .F. )
endif
IF EMPTY(dDate)
aPar[2] := dSet_Date
ELSE
aPar[2] := dDate
if nLen>2
aPar[3] := dDate1
endif
ENDIF
ENDIF
ENDIF

IF nLen == 1
RBalans()
nRez := Saldo({'00','10','','01','11'}[nFunc], aPar )
ELSE
nRez := DaySaldo({'00','10','','01','11'}[nFunc], aPar, at('*',aPar[1])<>0 )
ENDIF

CASE nFunc == 6 .OR. nFunc == 7 // ДТ КТ
nLen := MyLen( aPar, 1 )
aType := MyType( aPar, { 'C', 'CD', 'CD' } )
IF nLen > 1
IF ValType(aPar[2])=='C' .AND. SUBSTR(aPar[2],5,1) == '.'
// период опеделен ГГГГ.ММ
ASIZE( aPar, 3 )
aPar[2] := STOD( LEFT(aPar[2],4)+RIGHT(aPar[2],2)+'01')//ALEX
aPar[3] := EOM(IF( EMPTY(aPar[3]),aPar[ 2], STOD( LEFT(aPar[3],4)+RIGHT(aPar[3],2)+'01') ))
ELSE
dDate := MyDate( aPar[2], aType[2], .T. )
aPar[2] := dDate
IF nLen > 2
dDate := MyDate( aPar[3], aType[3], .F. )
aPar[3] := dDate
ENDIF
ENDIF
ENDIF
IF nLen == 1
RBalans()
nRez := Oborot({'0','1'}[nFunc-5], aPar )
ELSE
nRez := DayOborot({'0','1'}[nFunc-5], aPar )
ENDIF
Back to top
View user's profile Send private message Send e-mail
itman



Joined: 05 Apr 2002
Posts: 1247
Location: Ильин Е.Ю.
Occupation: Cio
Interests: Кинель

PostPosted: 09 Dec 2005 11:33    Post subject: Reply with quote

Спасибо!
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view     Forum Index -> Программирование в БЭСТ-4 All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group

Rambler
Rambler's Top100 Рейтинг@Mail.ru