Patch level : 12.0 no-patch
Files correlati : ve Commento : Aggiunto argomento in chiamata per forzare o disabilitare l'archiviazione interna di Campo
This commit is contained in:
parent
91512d38ef
commit
37c487fb79
@ -1096,6 +1096,8 @@ class TReport_doc_app : public TSkeleton_application
|
||||
char _tipocf;
|
||||
bool _no_print_dlg;
|
||||
|
||||
enum {_disabled, _force, _auto} _arc_type;
|
||||
|
||||
protected:
|
||||
void add_cli_filter(TString& query, bool from) const;
|
||||
void add_data_filter(TString& query, bool from) const;
|
||||
@ -1398,6 +1400,10 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool final_
|
||||
const TCodice_numerazione& cn = cached_numerazione(codnum);
|
||||
arc = cn.auto_archive();
|
||||
}
|
||||
|
||||
// Controllo se devo archiviare in base ai parametri passati
|
||||
arc = _arc_type == _force || _arc_type == _auto && arc;
|
||||
|
||||
set_next_pdf(&doc);
|
||||
|
||||
TToken_string to, cc;
|
||||
@ -1648,6 +1654,11 @@ TReport_doc_app::TOutput_mode TReport_doc_app::key2mode(KEY k) const
|
||||
void TReport_doc_app::main_loop()
|
||||
{
|
||||
_no_print_dlg = false; // Normalmente mostra la GUI di stampa
|
||||
|
||||
_arc_type = _auto;
|
||||
|
||||
// Chiamata: ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA} {NUM_COPIE} {ARCHIVIAZIONE}
|
||||
|
||||
const int a = argc();
|
||||
if (a > 2)
|
||||
{
|
||||
@ -1697,6 +1708,24 @@ void TReport_doc_app::main_loop()
|
||||
_msk->set(F_NCOPIE, argv(8)); // Numero copie
|
||||
|
||||
print_selection(mode);
|
||||
|
||||
if(a > 9)
|
||||
{
|
||||
const TString arc_type = argv(9);
|
||||
if(arc_type == "A")
|
||||
{
|
||||
_arc_type = _auto;
|
||||
}
|
||||
else if(arc_type == "D")
|
||||
{
|
||||
_arc_type = _disabled;
|
||||
}
|
||||
else if(arc_type == "F")
|
||||
{
|
||||
_arc_type = _force;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user