diff --git a/ps/pd6292100.cpp b/ps/pd6292100.cpp index a8936c1bb..e55b3a397 100755 --- a/ps/pd6292100.cpp +++ b/ps/pd6292100.cpp @@ -587,7 +587,7 @@ bool TProspettoScadenze::open_print() { _colnames.add(format("Scaduto > %3d gg", _slimiti[_sfasce - 1] * 30)); for (int i = _sfasce - 1; i > 0; i--) - _colnames.add(format("Scaduto <= %3d gg", _slimiti[i - 1] * 30)); + _colnames.add(format("Scaduto <= %3d gg", _slimiti[i] * 30)); } else _colnames.add("Scaduto"); @@ -915,7 +915,7 @@ void TProspettoScadenze::export_totali_rows() if (_sinfasce) { - for (int i = _sfasce; i > 0; i--) + for (int i = _sfasce - 1; i >= 0; i--) { _recset->set(_colnames.row(col++), v._s[i]); tot += v._s[i]; @@ -929,7 +929,7 @@ void TProspettoScadenze::export_totali_rows() if (_nsinfasce) { - for (int i = 0; i <= _nsfasce; i++) + for (int i = 0; i < _nsfasce; i++) { _recset->set(_colnames.row(col++), v._ns[i]); tot += v._ns[i]; diff --git a/ps/pe0001100.cpp b/ps/pe0001100.cpp index 1a082fe84..f4b94ad96 100755 --- a/ps/pe0001100.cpp +++ b/ps/pe0001100.cpp @@ -1,21 +1,23 @@ #include #include #include +#include #include #include +#include #include #include #include #include #include +#include -#include "tabutil.h" +#include "../cg/cglib01.h" #include "pe0001.h" #include "pe0001100a.h" -#include -#include +#include #include #include #include @@ -40,50 +42,67 @@ #define CAUSCM 17 // Causale TB=CA DIZSMAS - CAUS #define DSUPCM 18 // Descrizione Supplementare DIZSMAS - DSUP #define IMPOCM 19 // Importo "-"=Avere DIZSMAS - IMPO - #define CDVACM 19 // Codice Valuta TB=VA DIZSMAS - CDVA - #define CAMBCM 20 // Cambio DIZSMAS - CAMB - #define IMVACM 21 // Importo Valuta DIZSMAS - IMVA - #define CDPGCM 22 // Codice di Pagamento TB=CP DIZSMAS - CDPG - #define DT1SCM 23 // Data I^ scadenza DIZSMAS - DATS - #define DTDOCM 24 // Data documento DIZSMAS - DATS - #define NRDOCM 25 // N° Documento DIZSMAS - NUDO - #define CCTPCM 26 // Centri Costo Tipico TB=CC DIZSMAS - CCTP - #define NCOMCM 27 // Numero Commessa DIZSMAS - NCOM - #define CDSCCM 28 // Codice Sottocommessa DIZSMAS - CDSC - #define INDECM 29 // Indetraibilità % DIZSMAS - INDE - #define CDIVCM 30 // Codice IVA DIZSMAS - CDIV - #define IMPSCM 31 // Imposta DIZSMAS - IMPS - #define CDAGCM 32 // Codice Agente DIZSMAS - CDAG - #define DTVBCM 33 // Data Liquidazione Iva Sospesa DIZSMAS - DATS - #define FLSBCM 34 // Flag *=Stampato Bollato DIZSMAS - FLSB - #define FSBICM 35 // Flag *=Stampato Boll.IVA DIZSMAS - FSBI - #define FLVZCM 36 // V=Var.S=Storno P=Liq.prec. E=Esig.Sosp. DIZSMAS - FLVZ - #define FLIICM 37 // Flag IVA Irrecup. " "=I irr. DIZSMAS - FLII - #define FLTSCM 38 // Flag Tipo Sollecito DIZSMAS - FLTS - #define FLEPCM 39 // *=Est.EP Non è più usato DIZSMAS - FLEP - #define DPERCM 40 // Dati Personalizzabili DIZSMAS - DPER - #define CONSCM 41 // Gr.Co.Sottoc.Sostitutivo DIZSMAS - CONS - #define DTSTCM 42 // Nr.progr. rateo/risconto - - #define USERCM 43 // Utente DIZSMAS - NOMU - #define DTUMCM 44 // Data ultima manutenzione DIZSMAS - DATS - #define TPUMCM 45 // Tipo ultima manutenzione DIZSMAS - FLAG - #define FL01CM 46 // Flag Generico DIZSMAS - FLAG - #define FL02CM 47 // Flag Generico DIZSMAS - FLAG - #define FL03CM 48 // Flag Generico DIZSMAS - FLAG - #define FL04CM 49 // Flag Generico DIZSMAS - FLAG - #define FL05CM 50 // Flag Generico DIZSMAS - FLAG - #define CMBECM 51 // Cambio EURO DIZSMAS - CAME - #define IMVACM2 52 // Importo Val 2 DIZSMAS - IMPO - #define IMPSCM2 53 // Imposta 2 DIZSMAS - IMPS + #define CDVACM 20 // Codice Valuta TB=VA DIZSMAS - CDVA + #define CAMBCM 21 // Cambio DIZSMAS - CAMB + #define IMVACM 22 // Importo Valuta DIZSMAS - IMVA + #define CDPGCM 23 // Codice di Pagamento TB=CP DIZSMAS - CDPG + #define DT1SCM 24 // Data I^ scadenza DIZSMAS - DATS + #define DTDOCM 25 // Data documento DIZSMAS - DATS + #define NRDOCM 26 // N° Documento DIZSMAS - NUDO + #define CCTPCM 27 // Centri Costo Tipico TB=CC DIZSMAS - CCTP + #define NCOMCM 28 // Numero Commessa DIZSMAS - NCOM + #define CDSCCM 29 // Codice Sottocommessa DIZSMAS - CDSC + #define INDECM 30 // Indetraibilità % DIZSMAS - INDE + #define CDIVCM 31 // Codice IVA DIZSMAS - CDIV + #define IMPSCM 32 // Imposta DIZSMAS - IMPS + #define CDAGCM 33 // Codice Agente DIZSMAS - CDAG + #define DTVBCM 34 // Data Liquidazione Iva Sospesa DIZSMAS - DATS + #define FLSBCM 35 // Flag *=Stampato Bollato DIZSMAS - FLSB + #define FSBICM 36 // Flag *=Stampato Boll.IVA DIZSMAS - FSBI + #define FLVZCM 37 // V=Var.S=Storno P=Liq.prec. E=Esig.Sosp. DIZSMAS - FLVZ + #define FLIICM 38 // Flag IVA Irrecup. " "=I irr. DIZSMAS - FLII + #define FLTSCM 39 // Flag Tipo Sollecito DIZSMAS - FLTS + #define FLEPCM 40 // *=Est.EP Non è più usato DIZSMAS - FLEP + #define DPERCM 41 // Dati Personalizzabili DIZSMAS - DPER + #define CONSCM 42 // Gr.Co.Sottoc.Sostitutivo DIZSMAS - CONS + #define DTSTCM 43 // Nr.progr. rateo/risconto - + #define USERCM 44 // Utente DIZSMAS - NOMU + #define DTUMCM 45 // Data ultima manutenzione DIZSMAS - DATS + #define TPUMCM 46 // Tipo ultima manutenzione DIZSMAS - FLAG + #define FL01CM 47 // Flag Generico DIZSMAS - FLAG + #define FL02CM 48 // Flag Generico DIZSMAS - FLAG + #define FL03CM 49 // Flag Generico DIZSMAS - FLAG + #define FL04CM 50 // Flag Generico DIZSMAS - FLAG + #define FL05CM 51 // Flag Generico DIZSMAS - FLAG + #define CMBECM 52 // Cambio EURO DIZSMAS - CAME + #define IMVACM2 53 // Importo Val 2 DIZSMAS - IMPO + #define IMPSCM2 54 // Imposta 2 DIZSMAS - IMPS class TImporta_mov_recset : public TCSV_recordset { public: - TImporta_mov_recset(const char* query = "") : TCSV_recordset(TString("CSV(;)\n") << query) {} + virtual const TVariant& get(unsigned int column) const; + + TImporta_mov_recset(const char* query = "") : TCSV_recordset(TString("CSV(\";)\n") << query) {} virtual ~TImporta_mov_recset() {} }; +const TVariant& TImporta_mov_recset::get(unsigned int column) const +{ + TString str = TCSV_recordset::get(column).as_string(); + TVariant& var = get_tmp_var(); + int len = str.len(); + + if (len == 0) + return NULL_VARIANT; + if (str[len -1] == '"') + str.rtrim(1); + if (str[0] == '"') + str.ltrim(1); + var.set(str); + return var; +} /////////////////////////////////////////////////////////// // TAutomask /////////////////////////////////////////////////////////// @@ -150,110 +169,288 @@ public: virtual bool create(); virtual bool destroy(); virtual void main_loop(); - bool transfer(const TFilename& file); + void build_IVA(TConfig & conf, TArray & rows, TString_array & concg, TArray & impcg); + void transfer(const TFilename& file); TImporta_mov() {}; }; -bool TImporta_mov::transfer(const TFilename& file) +void TImporta_mov::build_IVA(TConfig & conf, TArray & rows, TString_array & concg, TArray & impcg) { - TFilename tempdir; + const int items = rows.items(); + TString paragraph; + + if (items > 0) + { + int nrigai = 1; + int i = 0; + TString *gcs = (TString *)concg.first_item(); + real imptot = *((real *) impcg.first_item()); + TString4 gruppo = gcs->left(2); + TString4 conto = gcs->mid(2, 2); + TString8 sottoconto = gcs->right(6); + + while (i < items) + { + TRectype & rec = (TRectype &)rows[i]; + real imp = rec.get(RMI_IMPONIBILE); + real iva = rec.get(RMI_IMPOSTA); + if (imp <= imptot) + i++; + else + { + TCodiceIVA codiva(rec.get(RMI_CODIVA)); + + imp -= imptot; + rec.put(RMI_IMPONIBILE, imp); + imp = imptot; + real iv = codiva.imposta(imptot); + iva -= iv; + rec.put(RMI_IMPOSTA, iva); + iva = iv; + } + imptot -= imp; + paragraph.format("%d,%d",LF_RMOVIVA,nrigai++); + conf.set_paragraph(paragraph); + conf.set(RMI_CODIVA, rec.get(RMI_CODIVA)); + conf.set(RMI_TIPODET, rec.get(RMI_TIPODET)); + conf.set(RMI_IMPONIBILE, imp.string()); + conf.set(RMI_IMPOSTA, iva.string()); + conf.set(RMI_GRUPPO, gruppo); + conf.set(RMI_CONTO, conto); + conf.set(RMI_SOTTOCONTO, sottoconto); + if (imptot <= 0) + { + gcs = (TString *)concg.succ_item(); + if (gcs == NULL) + break; + imptot = *((real *) impcg.succ_item()); + gruppo = gcs->left(2); + conto = gcs->mid(2, 2); + sottoconto = gcs->right(6); + } + } + } +} + +void TImporta_mov::transfer(const TFilename& file) +{ + TFilename outdir(_msk->get(F_PATHOUT)); TImporta_mov_recset s(file); TProgind pi(s.items(),"Importazione movimenti in corso ...",true,true); - TConfig * _conf = NULL; + TConfig * conf = NULL; long nmov = - 1; - int nrigac = 0; - int nrigai = 0; - - tempdir.tempdir(); + int anno = 0; + TString8 reg; + TDate dataop; + int nrigac = 1; + long ntran = 1L; + bool iva = false; + TString4 gruppo; + TString4 conto; + TString8 sottoconto; + const int codes = _msk->get_int(F_ANNOES); + const long ditta = _msk->get_long(F_CODITTA); + const TEsercizi_contabili esc; + TArray rows; + TArray impcg; + TString_array concg; for (bool ok=s.move_first();ok;ok=s.move_next()) { if (!pi.addstatus(1)) break; - const long n = s.get(NONPCM).as_int(); - if (n != nmov ) - { - nmov = n; - delete _conf; - _conf = NULL; - } - if (_conf = NULL) - { - TFilename temp; - - temp.temp(tempdir,"trn"); - _conf = new TConfig(temp); - _conf->set_paragraph("Transaction"); //setto il paragrafo [Transaction] del file ini - _conf->set("Action","INSERT"); - _conf->set("Mode","AUTO"); - - _conf->set_paragraph("23"); //setto il paragrafo [23] del file ini (testata) - - _conf->set(MOV_TIPO,"F"); // come - _conf->set(MOV_CODCF, _msk->get(F_CODCF)); - _conf->set(MOV_CODCAUS, s.get(CAUSCM).as_string()); - _conf->set(MOV_DATAREG, s.get(DTRGCM).as_string()); - _conf->set(MOV_CODPAG, s.get(CDPGCM).as_string()); - _conf->set(MOV_DATADOC, s.get(DTDOCM).as_string()); - _conf->set(MOV_NUMDOC, s.get(NRDOCM).as_string()); - nrigac = 0; - nrigai = 0; - } - const TString conto = s.get(CONTCM).as_string(); - if (conto.full()) + const long dt = s.get(CDDTCM).as_int(); + + if (ditta != dt) + continue; + const TDate datareg(s.get(DTRGCM).as_int()); + if (datareg.year() == 2009) + int i = 1; + const int es = esc.date2esc(datareg); + + if (codes != es) + continue; + const int a = s.get(AAPRCM).as_int(); + const TString8 r = s.get(TPGICM).as_string(); + const TDate d(s.get(DTOPCM).as_int()); + const long n = s.get(NONPCM).as_int(); + + if (anno != a || reg != r || dataop != d || n != nmov ) + { + if (iva) + build_IVA(*conf, rows, concg, impcg); + anno = a; + reg = r; + dataop = d; + nmov = n; + + if (conf != NULL) + delete conf; + conf = NULL; + } + if (conf == NULL) + { + TFilename temp(outdir); + + temp << '/' << format("%05ld", ntran++); + temp.ext("ini"); + if (fexist(temp)) + remove_file(temp); + conf = new TConfig(temp); + conf->set_paragraph("Transaction"); //setto il paragrafo [Transaction] del file ini + conf->set("Action","INSERT"); + conf->set("Mode","AUTO"); + + conf->set_paragraph("23"); //setto il paragrafo [23] del file ini (testata) + TString8 codcaus = s.get(CAUSCM).as_string(); + if (atoi(codcaus) != 0) + codcaus << '0'; + conf->set(MOV_CODCAUS, codcaus); + conf->set(MOV_DATAREG, datareg.string()); + const int codpag = s.get(CDPGCM).as_int(); + if (codpag != 0) + conf->set(MOV_CODPAG, format("%03d", codpag)); + + TDate datadoc(s.get(DTDOCM).as_int()); + + conf->set(MOV_DATADOC, datadoc.string()); + + TString16 ndoc = s.get(NRDOCM).as_string(); + + if (ndoc == "0") + ndoc.cut(0); + conf->set(MOV_NUMDOC, ndoc); + conf->set(MOV_STAMPATO, "X"); + conf->set(MOV_REGST, "X"); + iva = s.get(TPMVCM).as_string() == "I"; + if (iva) + { + conf->set(MOV_REG, s.get(TPGICM).as_string()); + conf->set(MOV_PROTIVA, n); + } + nrigac = 1; + rows.destroy(); + impcg.destroy(); + concg.destroy(); + } + + const TString gcs = s.get(CONTCM).as_string(); + TString4 sez("D"); + + if (gcs.full()) { TString8 paragraph; - - paragraph.format("%d,%d",LF_RMOV,nrigac++); - _conf->set_paragraph(paragraph); real importo = s.get(IMPOCM).as_real(); - char sez = 'D'; if (importo < ZERO) { importo = -importo; - sez = 'A'; + sez = "A"; + } + gruppo = gcs.left(2); + conto = gcs.mid(2, 2); + sottoconto = gcs.right(6); + if (iva) + { + TToken_string key; + + key.add(gruppo); + key.add(conto); + const TString4 tipocf = cache().get(LF_PCON, key, PCN_TMCF); + + if (tipocf.full()) + { + conf->set_paragraph("23"); //setto il paragrafo [23] del file ini (testata) + conf->set(MOV_TIPO, tipocf); + conf->set(MOV_CODCF, sottoconto); + conf->set(MOV_TOTDOC, importo.string()); + paragraph.format("%d,%d",LF_RMOV,nrigac++); + conf->set_paragraph(paragraph); + conf->set(RMV_SEZIONE, sez); + conf->set(RMV_TIPOC, tipocf); + conf->set(RMV_IMPORTO, importo.string()); + conf->set(RMV_GRUPPO, gruppo); + conf->set(RMV_CONTO, conto); + conf->set(RMV_SOTTOCONTO, sottoconto); + conf->set(RMV_ROWTYPE, "T"); + } + else + { + concg.add(gcs); + impcg.add(importo); + } + } + else + { + paragraph.format("%d,%d",LF_RMOV,nrigac++); + conf->set_paragraph(paragraph); + conf->set(RMV_SEZIONE, sez); + conf->set(RMV_IMPORTO, importo.string()); + conf->set(RMV_GRUPPO, gruppo); + conf->set(RMV_CONTO, conto); + conf->set(RMV_SOTTOCONTO, sottoconto); } - _conf->set(RMV_SEZIONE, sez); - _conf->set(RMV_IMPORTO, importo.string()); } else - { - TString8 paragraph; - real importo = s.get(IMPOCM).as_real(); - char sez = 'D'; - - paragraph.format("%d,%d",LF_RMOVIVA,nrigai++); - _conf->set_paragraph(paragraph); - if (importo < ZERO) + if (iva) { - importo = -importo; - sez = 'A'; + TString8 paragraph; + real importo = s.get(IMPOCM).as_real(); + real imposta = s.get(IMPSCM).as_real(); + + if (importo < ZERO) + { + importo = -importo; + sez = "A"; + } + if (imposta < ZERO) // giusto ? + imposta = -imposta; + + const real ind = s.get(INDECM).as_real(); + const TString4 codiva = s.get(CDIVCM).as_string(); + + if (ind > ZERO && ind < CENTO) + { + TRectype rec(LF_RMOVIVA); + + real impind = importo * ind / 100; + real ivaind = importo * ind / 100; + impind.round(2); + ivaind.round(2); + importo -= impind; + imposta -= ivaind; + rec.put(RMI_CODIVA, codiva); + rec.put(RMI_TIPODET, "9"); + rec.put(RMI_IMPONIBILE, impind.string()); + rec.put(RMI_IMPOSTA, ivaind.string()); + rec.put(RMI_GRUPPO, gruppo); + rec.put(RMI_CONTO, conto); + rec.put(RMI_SOTTOCONTO, sottoconto); + rows.add(rec); + } + TRectype rec(LF_RMOVIVA); + + rec.put(RMI_CODIVA, codiva); + if (ind >= CENTO) + rec.put(RMI_TIPODET, "9"); + rec.put(RMI_IMPONIBILE, importo.string()); + rec.put(RMI_IMPOSTA, imposta.string()); + rec.put(RMI_GRUPPO, gruppo); + rec.put(RMI_CONTO, conto); + rec.put(RMI_SOTTOCONTO, sottoconto); + rows.add(rec); } - _conf->set(RMI_IMPONIBILE, importo.string()); - -// INDECM 29 come si fa ? - _conf->set(RMI_CODIVA, s.get(CDIVCM).as_string()); - real imposta = s.get(IMPSCM).as_real(); - - paragraph.format("%d,%d",LF_RMOVIVA,nrigai++); - _conf->set_paragraph(paragraph); - if (imposta < ZERO) // giusto ? - imposta = -imposta; - _conf->set(RMI_IMPOSTA, imposta.string()); - } - } - delete _conf; + } + delete conf; TString app; - app << "cg2 -0 -i" << tempdir << "/*.trn"; +/* app << "cg2 -0 -i" << outdir; TExternal_app primanota(app); primanota.run(); - message_box(TR("Importazione movimenti completata")); - return true; + message_box(TR("Importazione movimenti completata")); */ } @@ -290,6 +487,6 @@ TImporta_mov& app() { return (TImporta_mov&) main_app(); } int pe0001100 (int argc, char* argv[]) { TImporta_mov main_app; - main_app.run(argc, argv, TR("Importazione movimenti di contab.")); + main_app.run(argc, argv, TR("Importazione contabilità Galileo")); return true; } \ No newline at end of file diff --git a/ps/pe0001100a.h b/ps/pe0001100a.h index f80b166fb..af3fde95a 100755 --- a/ps/pe0001100a.h +++ b/ps/pe0001100a.h @@ -4,10 +4,5 @@ #define F_RAGSOC 102 #define F_PATH 103 #define F_NAME 104 -#define F_CODIVA 105 -#define F_DESIVA 106 -#define F_CODCAU 107 -#define F_DESCAU 108 -#define F_CODCF 109 -#define F_FRAGSOC 110 -#define F_DATAREG 111 +#define F_ANNOES 105 +#define F_PATHOUT 106 diff --git a/ps/pe0001100a.uml b/ps/pe0001100a.uml index 069836466..2ff1d8b36 100755 --- a/ps/pe0001100a.uml +++ b/ps/pe0001100a.uml @@ -1,12 +1,12 @@ #include "pe0001100a.h" -TOOLBAR "" 0 20 0 2 +TOOLBAR "" 0 0 0 2 BUTTON DLG_ELABORA 10 2 BEGIN PICTURE BMP_ELABORA MESSAGE EXIT,K_ENTER - PROMPT -12 -1 "" + PROMPT -12 -1 "E~labora" END BUTTON DLG_QUIT 10 2 @@ -14,16 +14,19 @@ BEGIN PROMPT -22 -1 "" END +ENDPAGE + +TOOLBAR "" 0 21 0 2 + STRING DLG_PROFILE 50 BEGIN - PROMPT 9 0 "Profilo " + PROMPT 9 -1 "Profilo " PSELECT - FLAGS "H" END ENDPAGE -PAGE "Inserimento fatture" 0 0 0 -3 +PAGE "Importazione contabilità Galileo" 0 0 0 -3 GROUPBOX DLG_NULL 90 3 BEGIN @@ -46,14 +49,14 @@ BEGIN FLAGS "D" END -GROUPBOX DLG_NULL 90 4 +GROUPBOX DLG_NULL 90 5 BEGIN PROMPT 2 4 "@bSorgente" END STRING F_PATH 256 39 BEGIN - PROMPT 3 5 "Cartella " + PROMPT 3 5 "Cartella " DSELECT CHECKTYPE REQUIRED FIELD ComInPath @@ -61,99 +64,36 @@ END STRING F_NAME 18 BEGIN - PROMPT 3 6 "File " + PROMPT 3 6 "File " FIELD ComInFile CHECKTYPE REQUIRED END -GROUPBOX DLG_NULL 90 6 +NUMBER F_ANNOES 4 BEGIN - PROMPT 2 8 "@bParametri per l'importazione" -END - -STRING F_CODIVA 4 -BEGIN - PROMPT 3 9 "Codice IVA " - USE %IVA - INPUT CODTAB F_CODIVA - DISPLAY "Codice " CODTAB - DISPLAY "Descrizione@50" S0 - OUTPUT F_CODIVA CODTAB - OUTPUT F_DESIVA S0 + PROMPT 3 7 "Esercizio " + USE ESC + INPUT CODTAB F_ANNOES + DISPLAY "Codice Esercizio" CODTAB + DISPLAY "Data inizio esercizio" D0 + DISPLAY "Data fine esercizio " D1 + OUTPUT F_ANNOES CODTAB + FIELD AnnoEs CHECKTYPE REQUIRED END -STRING F_DESIVA 50 + +GROUPBOX DLG_NULL 90 4 BEGIN - PROMPT 25 9 "Descrizione " - USE %IVA KEY 2 - INPUT S0 F_DESIVA - DISPLAY "Descrizione@50" S0 - DISPLAY "Codice " CODTAB - COPY OUTPUT F_CODIVA - CHECKTYPE NORMAL + PROMPT 2 9 "@bDestinazione" END -STRING F_CODCAU 3 +STRING F_PATHOUT 256 39 BEGIN - PROMPT 3 10 "Causale " - FIELD CODCAU - FLAGS "UZ" - USE LF_CAUSALI - INPUT CODCAUS F_CODCAU - DISPLAY "Cod." CODCAUS - DISPLAY "Descrizione@50" DESCR - DISPLAY "Documento" TIPODOC - DISPLAY "Registro" REG - DISPLAY "Tipo movimento" TIPOMOV - OUTPUT F_CODCAU CODCAUS - OUTPUT F_DESCAU DESCR - CHECKTYPE REQUIRED -END - -STRING F_DESCAU 50 -BEGIN - PROMPT 25 10 "Descrizione " - FIELD DESCR - USE LF_CAUSALI KEY 2 - INPUT DESCR F_DESCAU - DISPLAY "Descrizione @50" DESCR - DISPLAY "Cod." CODCAUS - DISPLAY "Documento" TIPODOC - DISPLAY "Registro" REG - DISPLAY "Movimento" TIPOMOV - COPY OUTPUT F_CODCAU -END - -STRING F_CODCF 4 -BEGIN - PROMPT 3 11 "Fornitore " - FLAG "UR" - USE LF_CLIFO - INPUT TIPOCF "F" - INPUT CODCF F_CODCF - DISPLAY "Codice fornitore," CODCF - DISPLAY "Ragione sociale@50" RAGSOC - OUTPUT F_CODCF CODCF - OUTPUT F_FRAGSOC RAGSOC - CHECKTYPE REQUIRED -END - -STRING F_FRAGSOC 50 24 -BEGIN - PROMPT 25 11 "Ragione Sociale " - USE LF_CLIFO KEY 2 - INPUT TIPOCF "F" - INPUT RAGSOC F_FRAGSOC - DISPLAY "Ragione sociale@50" RAGSOC - DISPLAY "Codice fornitore," CODCF - COPY OUTPUT F_CODCF -END - -DATE F_DATAREG -BEGIN - PROMPT 3 12 "Data registrazione " + PROMPT 3 10 "Cartella " + DSELECT CHECKTYPE REQUIRED + FIELD ComOutPath END ENDPAGE