From 486e2998647b0de71cbf7c55c2b1876663ab57f5 Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Sat, 13 Dec 2025 19:56:52 +0100 Subject: [PATCH] Patch level : 12.00 1400 Files correlati : ca3.exe ca3A00.msk ca3A00a.rep ca3A00b.rep ca3A00c.rep ca0500a.msk Commento : Stampa prospetto enti di ricerca --- src/ca/ca0500a.h | 1 + src/ca/ca0500a.uml | 29 ++- src/ca/ca3.cpp | 1 + src/ca/ca3.h | 1 + src/ca/ca3A00.cpp | 522 +++++++++++++++++++++++++++++++++++++++++++++ src/ca/ca3A00.h | 15 ++ src/ca/ca3A00.uml | 84 ++++++++ src/ca/ca3A00a.rep | 209 ++++++++++++++++++ src/ca/ca3A00b.rep | 196 +++++++++++++++++ src/ca/ca3A00c.rep | 145 +++++++++++++ src/ca/cdc.h | 1 + 11 files changed, 1197 insertions(+), 7 deletions(-) create mode 100644 src/ca/ca3A00.cpp create mode 100644 src/ca/ca3A00.h create mode 100644 src/ca/ca3A00.uml create mode 100644 src/ca/ca3A00a.rep create mode 100644 src/ca/ca3A00b.rep create mode 100644 src/ca/ca3A00c.rep diff --git a/src/ca/ca0500a.h b/src/ca/ca0500a.h index 0a8824fe1..6d0864531 100755 --- a/src/ca/ca0500a.h +++ b/src/ca/ca0500a.h @@ -9,6 +9,7 @@ #define H_CDC_MAG 207 #define F_CDC_DEP 208 #define F_CDC_DESCDEP 209 +#define F_CDC_TIPCOS 210 #define F_CDCPDA1 601 #define F_CDCPDA4 605 diff --git a/src/ca/ca0500a.uml b/src/ca/ca0500a.uml index 233d45fdf..9a405a805 100755 --- a/src/ca/ca0500a.uml +++ b/src/ca/ca0500a.uml @@ -37,10 +37,25 @@ BEGIN FIELD APPOGGIO END +LIST F_CDC_TIPCOS 2 54 +BEGIN + PROMPT 2 18 "Tipo di costo " + ITEM " |Escluso" + ITEM "1|Attività non economiche" + ITEM "2|Locazione attrezzature a imprese" + ITEM "3|Fornitura di servizi a imprese e prestazioni tariffate" + ITEM "4|Contratti di ricerca commissionata" + ITEM "5|Trasferimento delle conoscenze" + ITEM "6|Altre attività economiche" + ITEM "7|Servizi e funzioni comuni" + ITEM "8|Valori non attribuibili" + FIELD TIPCOS +END + STRING F_CDC_MAG 3 BEGIN FLAGS "U" - PROMPT 2 18 "Magazzino " + PROMPT 2 19 "Magazzino " FIELD CODMAG[1,3] USE MAG SELECT CODTAB[4,5]=="" INPUT CODTAB F_CDC_MAG @@ -52,19 +67,19 @@ BEGIN MESSAGE EMPTY CLEAR,F_CDC_DEP MESSAGE ENABLE,F_CDC_DEP CHECKTYPE NORMAL - GROUP 1 + GROUP 1 END STRING F_CDC_DESCMAG 70 45 BEGIN FLAGS "D" - PROMPT 32 18 "" + PROMPT 32 19 "" END BOOL H_CDC_MAG BEGIN FLAGS "HG" - PROMPT 2 18 "divisione in dep" + PROMPT 2 19 "divisione in dep" MESSAGE FALSE CLEAR,F_CDC_DEP MESSAGE TRUE ENABLE,F_CDC_DEP END @@ -72,7 +87,7 @@ END STRING F_CDC_DEP 2 BEGIN FLAGS "U" - PROMPT 2 19 "Deposito " + PROMPT 2 20 "Deposito " FIELD CODMAG[4,5] USE MAG SELECT CODTAB[4,5]!="" INPUT CODTAB[1,3] F_CDC_MAG SELECT @@ -82,14 +97,14 @@ BEGIN OUTPUT F_CDC_MAG CODTAB[1,3] OUTPUT F_CDC_DEP CODTAB[4,5] OUTPUT F_CDC_DESCDEP S0 - GROUP 1 + GROUP 1 CHECKTYPE NORMAL END STRING F_CDC_DESCDEP 70 45 BEGIN FLAGS "D" - PROMPT 32 19 "" + PROMPT 32 20 "" END ENDPAGE diff --git a/src/ca/ca3.cpp b/src/ca/ca3.cpp index 4254d470d..dbd0abf6e 100755 --- a/src/ca/ca3.cpp +++ b/src/ca/ca3.cpp @@ -15,6 +15,7 @@ int main(int argc, char** argv) case 6: ca3700(argc, argv); break; // stampa rendiconto case 7: ca3800(argc, argv); break; // stampa bilancio di commessa per esercizio case 8: ca3900(argc, argv); break; // stampa stima ricavi + case 9: ca3A00(argc, argv); break; // stampa default:ca3100(argc, argv); break; // stampa movimenti } return 0; diff --git a/src/ca/ca3.h b/src/ca/ca3.h index fc243217b..19a782df7 100755 --- a/src/ca/ca3.h +++ b/src/ca/ca3.h @@ -10,5 +10,6 @@ int ca3600(int argc, char* argv[]); int ca3700(int argc, char* argv[]); int ca3800(int argc, char* argv[]); int ca3900(int argc, char* argv[]); +int ca3A00(int argc, char* argv[]); #endif // __CA3_H diff --git a/src/ca/ca3A00.cpp b/src/ca/ca3A00.cpp new file mode 100644 index 000000000..deea1de71 --- /dev/null +++ b/src/ca/ca3A00.cpp @@ -0,0 +1,522 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../cg/cglib.h" +#include "../ve/velib04.h" +#include "..\cg\cgsaldac.h" + +#include "cdc.h" +#include "commesse.h" +#include "fasi.h" +#include "panapdc.h" +#include "pconana.h" +#include "pconti.h" +#include "movana.h" +#include "rmovana.h" +#include "saldana.h" + +#include "ca3.h" +#include "ca3A00.h" +#include "calib01.h" +#include "calib02.h" + +#define PROSP_LETTERA "LETTIVD" +#define PROSP_NUM "NUMIVD" +#define PROSP_SUB "SUBIVD" +#define PROSP_DESCR "DESCR" +#define PROSP_NONECON "NONECON" +#define PROSP_ATTREZZ "ATTREZZ" +#define PROSP_SERVIZI "SERVIZI" +#define PROSP_CONTR "CONTR" +#define PROSP_TRACON "TRACON" +#define PROSP_ALTRE "ALTRE" +#define PROSP_SERVCOM "SERVCOM" +#define PROSP_NONATTR "NONATTR" +#define PROSP_TOTALE "TOTALE" +#define PROSP_MOVIM "MOVIM" + +//////////////////////////////////////////////////////// +// MASCHERA +//////////////////////////////////////////////////////// +class TPrint_prosp_ricerca_ca_mask : public TAnal_report_mask +{ + +protected: + virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly); + +public: + const TString& get_report_class() const; + + TPrint_prosp_ricerca_ca_mask() : TAnal_report_mask("ca3A00") {} + virtual ~TPrint_prosp_ricerca_ca_mask() = default; +}; + +bool TPrint_prosp_ricerca_ca_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) +{ + switch (o.dlg()) + { + case F_TIPOSTAMPA: + if (e == fe_init || e == fe_modify) + set_report_class(); + break; + case DLG_REPORT: + if (e == fe_init) + set_report_class(); + break; + case F_DATAINI: + case F_DATAFIN: + if (e == fe_close) + { + const int anno = get_int(F_ANNO); + + if (anno > 0) //se viene selezionato un esercizio.. + { + TEsercizi_contabili esc; //..le date devono essere incluse nell'esercizio selezionato! + const TDate data = o.get(); + if (!data.empty() && esc.date2esc(data) != anno) + return error_box(TR("La data deve appartenere all'anno selezionato")); + } + } + break; + default: + break; + } + return TAnal_report_mask::on_field_event(o, e, jolly); +} + +const TString& TPrint_prosp_ricerca_ca_mask::get_report_class() const +{ + TString& classe = get_tmp_string(); + const int tipostampa = get_int(F_TIPOSTAMPA); + + switch (tipostampa) + { + case 2: classe = "ca3A00c"; break; + case 1: classe = "ca3A00a"; break; + case 0: + default: classe = "ca3A00b"; break; + } + return classe; +} + +/////////////////////////////////////////////////////////////// +// RECORDSET +/////////////////////////////////////////////////////////////// + +class TPrint_prosp_ricerca_ca_recordset : public TISAM_recordset +{ + int _anno; + TDate _dadata, _adata; + TTrec * _prosptrec; + TAssoc_array _ratrisc; + TPrint_prosp_ricerca_ca_mask * _mask; + TLog_report * _log; + +protected: + void crea_filtro_rmovana(TRectype& da_rmovana, TRectype& a_rmovana, TString& filtro); + void crea_trr(const TFilename& trr); + bool is_causale_rateo_risconto(const char* codcaus) const; + virtual void requery(); + +public: //da libreria + virtual const TVariant& get(const char* column_name) const; + +public: + TTrec * prosptrec() const { return _prosptrec; } + TPrint_prosp_ricerca_ca_recordset(TPrint_prosp_ricerca_ca_mask * mask, TLog_report * log, const char * sql = "USE PROSP.DBF") + : TISAM_recordset(sql), _mask(mask), _log(log), _prosptrec(nullptr) { } + ~TPrint_prosp_ricerca_ca_recordset() { safe_delete(_prosptrec); } +}; + +const TVariant& TPrint_prosp_ricerca_ca_recordset::get(const char* column_name) const +{ + return TISAM_recordset::get(column_name); +} + +//controlla se la causale passata e' di tipo rateo/risconto +bool TPrint_prosp_ricerca_ca_recordset::is_causale_rateo_risconto(const char* codcaus) const +{ + return _ratrisc.objptr(codcaus) != nullptr; +} + +//nuovo modo di costruire il filtro e darec arec, da quando esistono le chiavi per codcm e codcdc su lf_rmovana +void TPrint_prosp_ricerca_ca_recordset::crea_filtro_rmovana(TRectype& da_rmovana, TRectype& a_rmovana, TString& filtro) +{ + TDate dal, al; + //intanto sistema darec arec + //se siamo fortunati l'anno si può trovare così.. + int anno = _mask->get_int(F_ANNO); + + if (anno > 0) + { + TEsercizi_contabili esc; + esc.code2range(anno, dal, al); + } + if (_dadata.ok()) + dal = _dadata; + if (_adata.ok()) + al = _adata; + if (dal.ok() || al.ok()) + filtro << "(BETWEEN(DATACOMP," << dal.date2ansi() << ',' << al.date2ansi() << "))"; +} + +void TPrint_prosp_ricerca_ca_recordset::crea_trr(const TFilename& trr) +{ + ofstream of(trr); + + of << 1000 << endl; + of << 14 << endl; + of << PROSP_LETTERA << "|1|1|0|Lettera IV direttiva" << endl; + of << PROSP_NUM << "|2|2|0|Numero arabo IV direttiva" << endl; + of << PROSP_SUB << "|2|6|0|Sub IV direttiva" << endl; + of << PROSP_DESCR << "|1|70|0|Descrizione" << endl; + of << PROSP_NONECON << "|4|18|2|Attività non economiche" << endl; + of << PROSP_ATTREZZ << "|4|18|2|Locazione attrezzature a imprese" << endl; + of << PROSP_SERVIZI << "|4|18|2|Fornitura di servizi a imprese e prestazioni tariffate" << endl; + of << PROSP_CONTR << "|4|18|2|Contratti di ricerca commissionata" << endl; + of << PROSP_TRACON << "|4|18|2|Trasferimento delle conoscenze" << endl; + of << PROSP_ALTRE << "|4|18|2|Altre attività economiche" << endl; + of << PROSP_SERVCOM << "|4|18|2|Servizi e funzioni comuni" << endl; + of << PROSP_NONATTR << "|4|18|2|Valori non attribuibili" << endl; + of << PROSP_TOTALE << "|4|18|2|Totale riga" << endl; + of << PROSP_MOVIM << "|8|1||Movimentato" << endl; + of << 1 << endl; + of << PROSP_LETTERA << "+" << PROSP_NUM << "+" << PROSP_SUB << endl; + of.close(); + + ifstream ifile (trr); + + safe_delete(_prosptrec); + _prosptrec = new TTrec(); + _prosptrec->read_from(ifile); +} + +void TPrint_prosp_ricerca_ca_recordset::requery() +{ + //se esiste il file temporano con tracciato persomalizzato lo cancella e lo ricrea vuoto + TFilename trr; //file tracciato record + trr.tempdir(); + trr.add("prosp"); + TFilename dbf(trr); //file dati + + trr.ext("trr"); + dbf.ext("dbf"); + + //crea il file .trr in base ai parametri del metodo + crea_trr(trr); + + //crea in memoria il nuovo file temporaneo e lo azzera (non si sa mai..) + TExternisamfile tmp(dbf, trr, true); + TRectype& tmp_rec = tmp.curr(); + + tmp.zap(); + + // popola il file con la IVa direttiva + TCursor cur_ivd(new TRelation("%IVD")); + const TRecnotype ivd_items = cur_ivd.items(); + const TRectype & curr_ivd = cur_ivd.curr(); + + cur_ivd.freeze(); + for (cur_ivd = 0L; !cur_ivd.eoc(); ++cur_ivd) + { + const TString& codtab = curr_ivd.get("CODTAB"); + + if (codtab.sleft(1) == "9" && codtab.smid(1, 1) != "9" && atoi(codtab.smid(6, 2)) != 0) + { + tmp_rec.zero(); + + tmp_rec.put(PROSP_LETTERA, codtab.smid(1, 1)); + tmp_rec.put(PROSP_NUM, codtab.smid(6, 2)); + tmp_rec.put(PROSP_SUB, codtab.smid(8, 6)); + tmp_rec.put(PROSP_DESCR, curr_ivd.get("S0")); + + int err = tmp_rec.write(tmp); + + if (err != NOERR && err != _isreinsert) + _log->log(2, format(FR("Errore %d nella creazione della tabella"), err)); + } + } + + //prende un po' di dati dalla maschera... + const bool movimentati = _mask->get_bool(F_SKIPNULL); + + TRelation rel_rmovana(LF_RMOVANA); + TRectype da_rmovana(LF_RMOVANA); + TRectype a_rmovana(LF_RMOVANA); + TString filtro; + + crea_filtro_rmovana(da_rmovana, a_rmovana, filtro); + + TCursor cur_rmovana(&rel_rmovana, filtro, 3, &da_rmovana, &a_rmovana); + const TRecnotype rmovana_items = cur_rmovana.items(); + + //scorre le righe movimenti di analitica che soddisfano il filtro + //il join a movana serve nel caso necessitino dati di testata per la riga in questione + cur_rmovana.freeze(); + + if (rmovana_items > 0) + { + const TRectype& rmovana = cur_rmovana.curr(); + TProgress_monitor pi((long)rmovana_items, "Scansione righe movimenti...", true); + TConfig& cfg = ca_config(); + const bool use_pdcc = cfg.get_bool("UsePdcc"); + const int tipostampa = _mask->get_int(F_TIPOSTAMPA); + + for (cur_rmovana = 0; pi.addstatus(1) && cur_rmovana.pos() < rmovana_items; ++cur_rmovana) + { + TString conto = rmovana.get(RMOVANA_CODCONTO); + TImporto importo(rmovana.get_char(RMOVANA_SEZIONE), rmovana.get_real(RMOVANA_IMPORTO)); + const TString codivd; + TToken_string key; + + importo.normalize('A'); + tmp_rec.zero(); + if (!use_pdcc) + { + key = conto; + key.add(1); + + const TRectype & panapdc_rec = cache().get(LF_PANAPDC, key); + + if (panapdc_rec.full()) + conto = format("%03d%03d", panapdc_rec.get(PANAPDC_GRUPPO), + panapdc_rec.get(PANAPDC_CONTO), + panapdc_rec.get(PANAPDC_SOTTOCONTO)); + else + conto = ""; + } + key = conto.sleft(3); + key.add(conto.smid(3, 3)); + key.add(conto.smid(6)); + + const TRectype & pcon_rec = cache().get(LF_PCON, key); + const bool opposto = importo.valore() < ZERO && pcon_rec.get_int(PCN_SEZIVDOPP) > 0; + + tmp_rec.put(PROSP_LETTERA, opposto ? pcon_rec.get(PCN_LETTIVDOPP) : pcon_rec.get(PCN_LETTIVD)); + tmp_rec.put(PROSP_NUM, opposto ? pcon_rec.get(PCN_NUMIVDOPP).sleft(2) : pcon_rec.get(PCN_NUMIVD).sleft(2)); + tmp_rec.put(PROSP_SUB, opposto ? pcon_rec.get(PCN_NUMIVDOPP).smid(2) : pcon_rec.get(PCN_NUMIVD).smid(2)); + if (tmp_rec.read(tmp, _isequal) == NOERR) + { + const TString cdc = rmovana.get(RMOVANA_CODCCOSTO); + const TRectype & cdc_rec = cache().get(LF_CDC, cdc); + const int tipocosto = cdc_rec.get_int(CDC_TIPCOS); + + if (tipocosto > 0 && !importo.is_zero()) + { + tmp_rec.put(PROSP_MOVIM, true); + if ( tipostampa != 0 || tipocosto != 6) + tmp_rec.add(PROSP_TOTALE, importo.valore()); + switch (tipocosto) + { + case 1: + tmp_rec.add(PROSP_NONECON, importo.valore()); + break; + case 2: + tmp_rec.add(PROSP_SERVIZI, importo.valore()); + break; + case 3: + tmp_rec.add(PROSP_CONTR, importo.valore()); + break; + case 4: + tmp_rec.add(PROSP_TRACON, importo.valore()); + break; + case 5: + tmp_rec.add(PROSP_ALTRE, importo.valore()); + break; + case 6: + tmp_rec.add(PROSP_SERVCOM, importo.valore()); + break; + case 7: + tmp_rec.add(PROSP_NONATTR, importo.valore()); + break; + case 8: + tmp_rec.add(PROSP_MOVIM, importo.valore()); + break; + default: + break; + } + int err = tmp_rec.rewrite(tmp); + + if (err != NOERR) + _log->log(2, format(FR("Errore %d nell'aggiornamento della tabella"), err)); + } + } + } + + if (movimentati) + { + TCursor temp(new TRelation(&tmp)); + const int tmp_items = temp.items(); + TRectype & temp_rec = temp.curr(); + + for (temp = 0L; !temp.eoc(); ++temp) + { + if (!temp_rec.get_bool(PROSP_MOVIM)) + temp_rec.remove(); + } + } + } +} + + +//////////////////////////////////////////////////////// +// REPORT +//////////////////////////////////////////////////////// +class TPrint_prosp_ricerca_ca_rep : public TAnal_report +{ + TLog_report *_log; + TPrint_prosp_ricerca_ca_mask * _mask; + +protected: + virtual bool get_usr_val(const TString& name, TVariant& var) const override; + virtual void set_dbase_fixed_fields(bool on = true) override; + +public: + virtual bool set_recordset(const TString& sql = "USE PROSP.DBF") override; + virtual const char * get_excel_disabled_field() override { return "H0.201|H0.202|H0.203|H0.204|H0.205|H0.206|H0.207"; } + TLog_report& log() { return *_log; } + TPrint_prosp_ricerca_ca_rep(TPrint_prosp_ricerca_ca_mask * _mask); + ~TPrint_prosp_ricerca_ca_rep(); +}; + +bool TPrint_prosp_ricerca_ca_rep::get_usr_val(const TString& name, TVariant& var) const +{ + return TAnal_report::get_usr_val(name, var); +} + +void TPrint_prosp_ricerca_ca_rep::set_dbase_fixed_fields(bool on) +{ +/* field("B1.201")->show(on); + field("B1.202")->show(on); + field("B1.203")->show(on); + field("B1.204")->show(on); + field("B1.100")->show(!on); + field("B1.102")->show(!on); // perchè non va ' + field("B1.104")->show(!on);*/ +} + +bool TPrint_prosp_ricerca_ca_rep::set_recordset(const TString& sql) +{ + TPrint_prosp_ricerca_ca_recordset* rs = new TPrint_prosp_ricerca_ca_recordset(_mask, _log, sql); + + return TAnal_report::set_recordset(rs); +} + +TPrint_prosp_ricerca_ca_rep::TPrint_prosp_ricerca_ca_rep(TPrint_prosp_ricerca_ca_mask * mask) : _mask(mask) +{ + //log report con segnalazioni su errori (tipo conti inesistenti o robaccia simile..) + _log = new TLog_report(TR("Errori rilevati")); + + _log->kill_duplicates(); +} + +TPrint_prosp_ricerca_ca_rep::~TPrint_prosp_ricerca_ca_rep() +{ + safe_delete(_log); +} + +//////////////////////////////////////////////////////// +// APPLICAZIONE +//////////////////////////////////////////////////////// +class TPrint_prosp_ricerca_ca : public TReport_application +{ + TPrint_prosp_ricerca_ca_mask* _msk; + TPrint_prosp_ricerca_ca_rep * _rep; + +protected: + virtual TReport & get_report(const TAutomask & m); + virtual TTrec * get_dbase_recdesc(TReport & rep, const TAutomask & mask); + virtual TAutomask & get_mask(); + virtual void execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type & type); + virtual const char * output_name(const TAutomask & mask, const TReport & rep) const { return "rend"; } + // @cmember Distruzione dei dati dell'utente + virtual bool user_destroy(); + +public: + + TPrint_prosp_ricerca_ca() : _msk(nullptr), _rep(nullptr) {} + ~TPrint_prosp_ricerca_ca() {} +}; + +TReport & TPrint_prosp_ricerca_ca::get_report(const TAutomask & m) +{ + if (_rep == nullptr) + _rep = new TPrint_prosp_ricerca_ca_rep(((TPrint_prosp_ricerca_ca_mask *)&m)); + _rep->load(_msk->get(DLG_REPORT)); + return *_rep; +} + +TAutomask & TPrint_prosp_ricerca_ca::get_mask() +{ + if (_msk == nullptr) + _msk = new TPrint_prosp_ricerca_ca_mask; + return *_msk; +} + +TTrec * TPrint_prosp_ricerca_ca::get_dbase_recdesc(TReport & rep, const TAutomask & mask) +{ + TXmltrec * desc = new TXmltrec; + + desc->add_fielddef(PROSP_LETTERA, _alfafld, 1, 0, "Lettera IV direttiva"); + desc->add_fielddef(PROSP_NUM, _intfld, 2, 0, "Numero arabo IV direttiva"); + desc->add_fielddef(PROSP_SUB, _intfld, 6, 0, "Sub IV direttiva"); + desc->add_fielddef(PROSP_DESCR, _alfafld, 70, 0, "Descrizione"); + desc->add_fielddef(PROSP_NONECON, _realfld, 18, 2, "Attività non economiche"); + desc->add_fielddef(PROSP_ATTREZZ, _realfld, 18, 2, "Locazione attrezzature a imprese"); + desc->add_fielddef(PROSP_SERVIZI, _realfld, 18, 2, "Fornitura di servizi a imprese e prestazioni tariffate"); + desc->add_fielddef(PROSP_CONTR, _realfld, 18, 2, "Contratti di ricerca commissionata"); + desc->add_fielddef(PROSP_TRACON, _realfld, 18, 2, "Trasferimento delle conoscenze"); + desc->add_fielddef(PROSP_ALTRE, _realfld, 18, 2, "Altre attività economiche"); + desc->add_fielddef(PROSP_SERVCOM, _realfld, 18, 2, "Servizi e funzioni comuni"); + desc->add_fielddef(PROSP_NONATTR, _realfld, 18, 2, "Valori non attribuibili"); + desc->add_fielddef(PROSP_TOTALE, _realfld, 18, 2, "Totale riga"); + desc->add_fielddef(PROSP_MOVIM, _boolfld, 1, 0, "Movimentato"); + + TToken_string keydef(PROSP_LETTERA, '+'); + + keydef.add(PROSP_NUM); + keydef.add(PROSP_SUB); + desc->add_keydef(keydef, true); + return desc; +} + +void TPrint_prosp_ricerca_ca::execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type & type) +{ + TPrint_prosp_ricerca_ca_rep & ca_rep = (TPrint_prosp_ricerca_ca_rep &)rep; + TPrint_prosp_ricerca_ca_mask & ca_mask = (TPrint_prosp_ricerca_ca_mask &)mask; + + ca_rep.set_recordset(); + + TString video_string; //stringa che compare nella progind + TDate dataini, datafin; + const int anno = mask.get_int(F_ANNO); + + rep.set_export_sections(type); + book.add(rep); //aggiunge il report relativo alla cdc/cms corrente al book + rep.reset_export_sections(); + //anteprima report degli errori rilevati + if (ca_rep.log().recordset()->items() > 0) + ca_rep.log().preview(); + } + + bool TPrint_prosp_ricerca_ca::user_destroy() + { + safe_delete(_msk); + safe_delete(_rep); + return TReport_application::user_destroy(); + } + +int ca3A00(int argc, char* argv[]) +{ + TPrint_prosp_ricerca_ca a; + a.run(argc, argv, TR("Stampa prospetto enti di ricerca")); + return 0; +} diff --git a/src/ca/ca3A00.h b/src/ca/ca3A00.h new file mode 100644 index 000000000..d625a3926 --- /dev/null +++ b/src/ca/ca3A00.h @@ -0,0 +1,15 @@ +#ifndef __CA3A00_H +#define __CA3A00_H + +//pagina 1 +#define F_CODDITTA 101 +#define F_RAGSOC 102 +#define F_DATASTAMPA 103 +#define F_ANNO 104 +#define F_DATAINI 105 +#define F_DATAFIN 106 +#define F_TIPOSTAMPA 107 +#define F_SKIPNULL 108 + +#endif // __CA3A00_H + diff --git a/src/ca/ca3A00.uml b/src/ca/ca3A00.uml new file mode 100644 index 000000000..db8f8b3b9 --- /dev/null +++ b/src/ca/ca3A00.uml @@ -0,0 +1,84 @@ +#include "ca3A00.h" +#include "camask.h" + +#define ALL_EXPORT +#define REPORT +#define CLASS_NAME "ca3A00" + +TOOLBAR "topbar" 0 0 0 2 + +#include + +ENDPAGE + +TOOLBAR "bottombar" 0 -3 0 1 +#include +ENDPAGE + +PAGE "Prospetto enti di ricerca" 0 2 0 0 + +NUMBER F_CODDITTA 5 +BEGIN + PROMPT 1 1 "Ditta " + FLAGS "FRD" + USE LF_NDITTE KEY 1 + CHECKTYPE REQUIRED + INPUT CODDITTA F_CODDITTA + DISPLAY "Codice" CODDITTA + DISPLAY "Ragione sociale @50" RAGSOC + OUTPUT F_CODDITTA CODDITTA + OUTPUT F_RAGSOC RAGSOC +END + +STRING F_RAGSOC 50 +BEGIN + PROMPT 15 1 "" + FLAGS "D" +END + +DATE F_DATASTAMPA +BEGIN + PROMPT 1 3 "Data stampa " + FLAGS "A" +END + +NUMBER F_ANNO 4 +BEGIN + PROMPT 35 3 "Esercizio " + USE ESC + INPUT CODTAB F_ANNO + DISPLAY "Codice Esercizio" CODTAB + DISPLAY "Data inizio esercizio" D0 + DISPLAY "Data fine esercizio " D1 + OUTPUT F_ANNO CODTAB + CHECKTYPE REQUIRED + FLAGS "RZ" + ADD NONE +END + +DATE F_DATAINI +BEGIN + PROMPT 1 6 "Dalla data " +END + +DATE F_DATAFIN +BEGIN + PROMPT 35 6 "Alla data " +END + +LIST F_TIPOSTAMPA 1 37 +BEGIN + PROMPT 1 9 "Tipo di stampa " + ITEM " |Stampa per attività senza allocazione" + ITEM "1|Stampa per attività con allocazione" + ITEM "2|Stampa riepologativa" +END + +BOOLEAN F_SKIPNULL +BEGIN + PROMPT 1 12 "Non stampare conti a zero" +END + +ENDPAGE + +ENDMASK \ No newline at end of file diff --git a/src/ca/ca3A00a.rep b/src/ca/ca3A00a.rep new file mode 100644 index 000000000..b6ea2bb38 --- /dev/null +++ b/src/ca/ca3A00a.rep @@ -0,0 +1,209 @@ + + + Prospetto enti di ricerca con allocazione + + +