Patch level : 2.0 508

Files correlati     : ve0.exe ve1.exe ve1100b.msk
Ricompilazione Demo : [ ]
Commento            :

GF20043
Se lancio una stampa di tutti i documenti a qualsiasi stato non mi esce nulla.

GF20047
Ho provato ad importare dei documenti esportati attraverso il file.ini,
ma per alcuni di questi il prezzo unitario non viene importato (come da file
e situazione che vi ho inviato)


git-svn-id: svn://10.65.10.50/trunk@11282 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-06-24 12:55:12 +00:00
parent 2bc717c739
commit 83f54ee860
3 changed files with 50 additions and 36 deletions

View File

@ -138,7 +138,10 @@ public:
const TString &get_module_code() const { return _module; } // ritorna il codice del modulo di carta
TString_array& exclude_list_t() { return _exclude_array_t; }
TString_array& exclude_list_a() { return _exclude_array_a; }
TDocumentoEsteso& doc() { return *_doc; }
void set_doc_ext(TRectype* doc);
TDocumento_form(TRectype& doc, TRelation& rel, bool definitiva, bool interattivo, bool aggiuntivo);
TDocumento_form(const char* form, TRelation& rel);
virtual ~TDocumento_form();
@ -146,8 +149,27 @@ public:
TDocumento_form* TDocumento_form::_form = NULL;
void TDocumento_form::set_doc_ext(TRectype* doc)
{
CHECK(_doc == NULL, "Doppio documeto esteso");
if (doc != NULL)
_doc = new TDocumentoEsteso(*doc);
else
_doc = new TDocumentoEsteso;
_docfile = new TDocisamfile(_doc);
_rdocfile = new TRDocisamfile(_doc);
_rdocfile->set_normal_next();
relation()->replace(_docfile,0);
relation()->replace(_rdocfile,1);
if (_doc->physical_rows() > 0)
relation()->update();
}
TDocumento_form::TDocumento_form(TRectype& doc, TRelation& rel, bool definitiva, bool interattivo, bool aggiuntivo)
: _firmrel(rel), _valid(FALSE), _sorted_cur(NULL)
: _firmrel(rel), _valid(FALSE), _sorted_cur(NULL), _doc(NULL), _docfile(NULL), _rdocfile(NULL)
{
_form = this;
@ -177,13 +199,9 @@ TDocumento_form::TDocumento_form(TRectype& doc, TRelation& rel, bool definitiva,
read(nomeform);
_cli_loaded= FALSE;
_doc = new TDocumentoEsteso(doc); // istanzia TDocumentoEsteso
_docfile = new TDocisamfile(_doc);
_rdocfile = new TRDocisamfile(_doc);
relation()->replace(_docfile,0);
relation()->replace(_rdocfile,1);
if (_doc->physical_rows() > 0)
relation()->update();
set_doc_ext(&doc); // istanzia TDocumentoEsteso
modify_pictures();
dec_parm p;
const int items = _group_decimals.items();
@ -217,15 +235,10 @@ TDocumento_form::TDocumento_form(TRectype& doc, TRelation& rel, bool definitiva,
}
// costruttore per stampa lista documenti (uso convenzionale dei forms)
TDocumento_form::TDocumento_form(const char* form, TRelation& rel): TForm(form), _firmrel(rel), _valid(FALSE)
TDocumento_form::TDocumento_form(const char* form, TRelation& rel)
: TForm(form), _firmrel(rel), _valid(FALSE), _doc(NULL), _docfile(NULL), _rdocfile(NULL)
{
_cli_loaded= FALSE;
_doc = new TDocumentoEsteso;
_docfile = new TDocisamfile(_doc);
_rdocfile = new TRDocisamfile(_doc);
_rdocfile->set_normal_next();
relation()->replace(_docfile,0);
relation()->replace(_rdocfile,1);
_sorted_cur = new TSorted_cursor(relation(), "PROVV|ANNO|CODNUM|STATO|DATADOC|NDOC");
}
@ -1365,28 +1378,28 @@ void TStampaDoc_application::print_selected()
else // Lista documenti
{
TDocumento_form* mainform = new TDocumento_form(LISTADOC,*_firmrel);
const int hh = 6;
const int fl = printer().formlen();
int rows[4];
rows[0] = hh-2;
rows[1] = hh;
rows[2] = fl;
rows[3] = 0;
mainform->cursor()->setkey(_key);
TCursor& cur = *mainform->cursor();
cur.setkey(_key);
darec.put(DOC_DATADOC, _dadata);
darec.put(DOC_PROVV, _provv);
darec.put(DOC_ANNO, _anno);
arec = darec;
arec.put(DOC_DATADOC, _adata);
mainform->cursor()->setregion(darec,arec);
cur.setregion(darec,arec);
const bool dettaglio = _selection_mask->get_bool(F_DETTAGLIO);
mainform->find_field('B', odd_page, "H_RIGHE").enable(dettaglio); // Visualizza i dettagli righe se richiesto
mainform->find_field('B', odd_page, "RIGHE").enable(dettaglio);
set_filter(*mainform);
if (mainform->cursor()->items())
const TRecnotype items = cur.items();
if (items > 0)
{
cur.freeze();
mainform->set_doc_ext(NULL); // Setta il documento esteso DOPO aver fatto il filtro
mainform->print();
}
delete mainform;
}
@ -1950,7 +1963,7 @@ void TStampaDoc_application::main_loop()
int ve1100(int argc, char* argv[])
{
TStampaDoc_application a;
const bool cond = argc == 4 && argv[2][0] == 'L'; // Lista documenti
a.run(argc, argv, cond ? TR("Lista documenti") : TR("Stampa documenti di vendita"));
return (0);
const bool riep = argc == 4 && argv[2][0] == 'L'; // Lista documenti
a.run(argc, argv, riep ? TR("Lista documenti") : TR("Stampa documenti"));
return 0;
}

View File

@ -5,13 +5,13 @@ PAGE "Lista documenti" -1 -1 60 21
NUMBER F_ANNO 4 0
BEGIN
PROMPT 2 1 "Anno "
FLAG "P"
FLAG "AP"
CHECKTYPE REQUIRED
END
LIST F_PROVV 12
BEGIN
PROMPT 28 1 "Tipo numerazione "
PROMPT 24 1 "Tipo numerazione "
ITEM "D|Definitiva"
ITEM "P|Provvisoria"
FLAG "P"

View File

@ -277,11 +277,12 @@ long TGenerazione_effetti::group_bills(TAssoc_array& group_array)
if (p.iscancelled()) break;
#endif
TToken_string t(group_element->get(j),'$');
char provv = t.get_char(0);
int anno = t.get_int(1);
TString codnum(t.get(2));
long numdoc = t.get_long(3);
if (doc.read(provv,anno,codnum,numdoc) != NOERR) continue; // Legge il documento (giusto saltare e proseguire se non lo trova?)
const char provv = t.get_char(0);
const int anno = t.get_int(1);
const TString4 codnum(t.get(2));
const long numdoc = t.get_long(3);
if (doc.read(provv,anno,codnum,numdoc) != NOERR)
continue; // Legge il documento (giusto saltare e proseguire se non lo trova?)
msg2 = "Documento: ";
msg2 << codnum << "/" << numdoc;