home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.texkom.ru
/
ftp.texkom.ru.tar
/
ftp.texkom.ru
/
IMPORT1C.PRG
< prev
next >
Wrap
Text File
|
2005-01-27
|
2KB
|
47 lines
* ╚∞∩ε≡≥ ±≈σ≥εΓ Φτ ßατ√ ╓╤
* ∩≡ΦφΦ∞ασ∞√σ ∩α≡α∞σ≥≡√ - Φφ≥σ≡Γαδ Σα≥
* ⌠αΩ≥≤≡α
LOCAL llFlad,ldDate
llFlad = .T.
ldDate=m.pdbeg
DO WHILE llFlad
WAIT WINDOW '╬ß≡αßα≥√Γα■ '+DTOC(ldDate) NOWAIT NOCLEAR
IF DOW(ldDate)<>1
SELECT d.data1 DATA,d.DOCUMENT,d.summa1 SUMMA,d.member,d.schet,o.*,;
NVL(l.data,{}) dataopl,NVL(l.document,SPACE(20)) plat;
FROM b_docs d;
LEFT JOIN k_org o ON d.member=o.kod_mb;
LEFT JOIN o_docs l ON d.doczakaz=l.firstdoc;
WHERE !DELETED() AND d.data1=ldDate AND;
('┬100'$UPPER(d.DOCUMENT) OR 'A'$UPPER(d.DOCUMENT) OR;
'└'$UPPER(d.DOCUMENT)) AND !EMPTY(d.summa1);
INTO CURSOR sch_cs READWRITE
CREATE CURSOR gepard (klient c(254),data d,number c(254),naccount c(254),;
inn c(254),totalo n(20,5),id_parenti c(254),dataplat d,plat c(20))
SELECT company as klient,data,;
IIF(ATC('/',document)>0,ALLTRIM(SUBSTR(document,1,ATC('/',document)-1)),document) as number,;
schet as naccount,regnomer as inn,summa as totalo,parentid as id_parenti,dataopl as dataplat,plat;
FROM sch_cs;
INTO CURSOR exp
SELECT gepard
APPEND FROM DBF('exp')
lcFname='h:\buhgalteria\ß≤⌡παδ≥σ≡Φ \obmen\C'+'_'+PADL(DAY(ldDate),2,'0')+'_'+PADL(MONTH(ldDate),2,'0')
IF FILE(lcFname+'.dbf')
DELE FILE (LOCFILE(lcFname+'.dbf'))
ENDIF
COPY TO (lcFname) TYPE FOX2X AS 866
safeclose('exp')
safeclose('gepard')
ENDIF
ldDate=ldDate+1
IF ldDate>m.pdEnd
llFlad = .F.
ENDIF
ENDDO
safeclose('B_docs')
safeclose('k_org')
safeclose('m_opldoc')
safeclose('raschet')
WAIT CLEAR