Patch level : 10.0
Files correlati : ve1.exe Ricompilazione Demo : [ ] Commento : Corretta stampa documenti in presenza di un documento gia' stampato in definitivo git-svn-id: svn://10.65.10.50/trunk@19808 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
02dd834c59
commit
66ab37838a
@ -153,19 +153,19 @@ TDoc_recordset::TDoc_recordset(const TRecordset& doc, const TString& old_query)
|
||||
{
|
||||
new_query.add(line);
|
||||
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
const char* key[] = { DOC_PROVV, DOC_ANNO, DOC_CODNUM, DOC_NDOC };
|
||||
line = (i == 0) ? "FROM " : "TO ";
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
const TString& val = doc.get(key[k]).as_string();
|
||||
line << key[k] << "='" << val << "' ";
|
||||
if (i == 0)
|
||||
curr.put(key[k], val);
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
const char* key[4] = { DOC_PROVV, DOC_ANNO, DOC_CODNUM, DOC_NDOC };
|
||||
line = (i == 0) ? "FROM " : "TO ";
|
||||
for (int k = 0; k < 4; k++)
|
||||
{
|
||||
const TString& val = doc.get(key[k]).as_string();
|
||||
line << key[k] << '=' << val << ' ';
|
||||
if (i == 0)
|
||||
curr.put(key[k], val);
|
||||
}
|
||||
new_query.add(line);
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
new_query.add(line);
|
||||
@ -262,7 +262,7 @@ TTrans_recordset::TTrans_recordset(const char* ininame) : TAS400_recordset(inina
|
||||
create_field(DOC_PROVV, -1, 1, _alfafld, true);
|
||||
create_field(DOC_ANNO, -1, 4, _intfld, true);
|
||||
create_field(DOC_CODNUM, -1, 4, _alfafld, true);
|
||||
create_field(DOC_NDOC, -1, 4, _longfld, true);
|
||||
create_field(DOC_NDOC, -1, 7, _longfld, true);
|
||||
create_field(DOC_TIPODOC, -1, 4, _alfafld);
|
||||
create_field(DOC_TIPOCF, -1, 1, _alfafld);
|
||||
create_field(DOC_CODCF, -1, 6, _longfld);
|
||||
@ -359,7 +359,7 @@ int TReport_doc::set_printed_status(TDocumento& doc) const
|
||||
|
||||
bool TReport_doc::print(const TRecordset& doc, TReport_book& book, bool definitive, word copie, bool can_allegate, bool arc, bool signature)
|
||||
{
|
||||
bool printed = false;
|
||||
bool printed = true;
|
||||
|
||||
const TString old_query = recordset()->query_text();
|
||||
TDoc_recordset* rs = new TDoc_recordset(doc, old_query);
|
||||
@ -436,15 +436,14 @@ bool TReport_doc::print(const TRecordset& doc, TReport_book& book, bool definiti
|
||||
if (!printed)
|
||||
break;
|
||||
}
|
||||
if (printed)
|
||||
{
|
||||
if (definitive)
|
||||
set_printed_status(d);
|
||||
if (arc)
|
||||
archive(signature);
|
||||
}
|
||||
}
|
||||
|
||||
if (printed)
|
||||
{
|
||||
if (definitive)
|
||||
set_printed_status(d);
|
||||
if (arc)
|
||||
archive(signature);
|
||||
}
|
||||
|
||||
set_recordset(old_query);
|
||||
return printed;
|
||||
@ -1097,7 +1096,7 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
bool arc = false;
|
||||
if (is_definitive)
|
||||
{
|
||||
const TString& codnum = doc.get(DOC_CODNUM).as_string();
|
||||
const TString4 codnum = doc.get(DOC_CODNUM).as_string();
|
||||
const TCodice_numerazione& cn = cached_numerazione(codnum);
|
||||
arc = cn.auto_archive();
|
||||
}
|
||||
@ -1105,7 +1104,7 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
doc.get(DOC_NDOC).as_int(), doc.get(DOC_TIPOCF).as_string()[0],
|
||||
doc.get(DOC_CODCF).as_int());
|
||||
|
||||
const TString& tipodoc = doc.get(DOC_TIPODOC).as_string();
|
||||
const TString4 tipodoc = doc.get(DOC_TIPODOC).as_string();
|
||||
const TTipo_documento& tipo = cached_tipodoc(tipodoc);
|
||||
const bool send_mail = ( mode == out_mail || mode == out_signed_mail) && get_mail_address().full();
|
||||
const bool paperless = send_mail || mode == out_pdf || mode == out_signed_pdf;
|
||||
@ -1289,6 +1288,8 @@ void TReport_doc_app::print_trans(const char* ininame)
|
||||
const bool is_definitive = m[0] == 'D';
|
||||
print_loop(doc, mode, is_definitive);
|
||||
}
|
||||
else
|
||||
cantread_box(ininame);
|
||||
}
|
||||
|
||||
//Allah!!
|
||||
@ -1325,7 +1326,9 @@ void TReport_doc_app::main_loop()
|
||||
// Gestione transazioni di stampa
|
||||
if (arg.starts_with("-i"))
|
||||
{
|
||||
print_trans(arg.mid(2));
|
||||
const TFilename ini = arg.mid(2);
|
||||
if (ini.exist())
|
||||
print_trans(ini);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user