Patch level :4.0 / 10.0
Files correlati : Ricompilazione Demo : [ ] Commento :corretti errori di riporto git-svn-id: svn://10.65.10.50/trunk@16383 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
fafc1c5993
commit
1c5d7fd097
@ -992,19 +992,16 @@ bool TReport_doc_app::print_loop(const TString& query, bool send_by_mail)
|
|||||||
arc = cache().get("%NUM", codnum, "B6").full();
|
arc = cache().get("%NUM", codnum, "B6").full();
|
||||||
}
|
}
|
||||||
set_next_pdf(doc.get(DOC_ANNO).as_int(), doc.get(DOC_CODNUM).as_string(),
|
set_next_pdf(doc.get(DOC_ANNO).as_int(), doc.get(DOC_CODNUM).as_string(),
|
||||||
doc.get(DOC_NDOC).as_int(),
|
doc.get(DOC_NDOC).as_int(), doc.get(DOC_TIPOCF).as_string()[0],
|
||||||
doc.get(DOC_TIPOCF).as_string())[0],
|
|
||||||
doc.get(DOC_CODCF).as_int());
|
doc.get(DOC_CODCF).as_int());
|
||||||
|
|
||||||
const TString& tipodoc = doc.get(DOC_TIPODOC).as_string();
|
const TString& tipodoc = doc.get(DOC_TIPODOC).as_string();
|
||||||
const TTipo_documento& tipo = _tipi_cache.tipo(tipodoc);
|
const TTipo_documento& tipo = _tipi_cache.tipo(tipodoc);
|
||||||
const TString8 codprof(tipo.main_print_profile());
|
TFilename profilo;
|
||||||
|
tipo.main_print_profile(profilo);
|
||||||
const bool send_mail = send_by_mail && get_mail_address().full();
|
const bool send_mail = send_by_mail && get_mail_address().full();
|
||||||
|
|
||||||
if (codprof.full())
|
profilo.ext("rep");
|
||||||
{
|
|
||||||
TFilename profilo(codprof); profilo.ext("rep");
|
|
||||||
|
|
||||||
if (profilo.custom_path()) // Tenta di costruirsi il nome del report
|
if (profilo.custom_path()) // Tenta di costruirsi il nome del report
|
||||||
{
|
{
|
||||||
int copies = _msk->get_int(F_NCOPIE);
|
int copies = _msk->get_int(F_NCOPIE);
|
||||||
@ -1026,12 +1023,14 @@ bool TReport_doc_app::print_loop(const TString& query, bool send_by_mail)
|
|||||||
log.log(0, mesg);
|
log.log(0, mesg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
if (!report.print(doc, book, is_definitive, copies, true, arc))
|
if (!report.print(doc, book, is_definitive, copies, true, arc))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} //if(profilo.custom_path()...
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TString msg; msg << TR("Report inesistente") << " : " << codprof;
|
TString msg; msg << TR("Report inesistente") << " : " << profilo;
|
||||||
|
|
||||||
statbar_set_title(TASK_WIN, msg);
|
statbar_set_title(TASK_WIN, msg);
|
||||||
beep(2);
|
beep(2);
|
||||||
@ -1039,11 +1038,10 @@ bool TReport_doc_app::print_loop(const TString& query, bool send_by_mail)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Stampa eventuali allegati
|
// Stampa eventuali allegati
|
||||||
const TString8 codalleg = tipo.additional_print_profile();
|
tipo.additional_print_profile(profilo);
|
||||||
if (codalleg.full())
|
if (profilo.full())
|
||||||
{
|
{
|
||||||
TFilename profilo(codalleg); profilo.ext("rep");
|
profilo.ext("rep");
|
||||||
|
|
||||||
if (profilo.custom_path())
|
if (profilo.custom_path())
|
||||||
{
|
{
|
||||||
int copies = tipo.additional_ncopie();
|
int copies = tipo.additional_ncopie();
|
||||||
@ -1051,7 +1049,11 @@ bool TReport_doc_app::print_loop(const TString& query, bool send_by_mail)
|
|||||||
|
|
||||||
TReport_doc& allegato = reports.get(profilo);
|
TReport_doc& allegato = reports.get(profilo);
|
||||||
// Cambio _codnum per non sovrascrivere il pdf precedente
|
// Cambio _codnum per non sovrascrivere il pdf precedente
|
||||||
if (arc) _codnum = codalleg;
|
if (arc)
|
||||||
|
{
|
||||||
|
_codnum = profilo.name();
|
||||||
|
_codnum = _codnum.before(".");
|
||||||
|
}
|
||||||
// Il flag di definitvo deve essere false altrimenti riaggiorna lo stato e ristampa i documenti allegati
|
// Il flag di definitvo deve essere false altrimenti riaggiorna lo stato e ristampa i documenti allegati
|
||||||
if (send_mail)
|
if (send_mail)
|
||||||
allegato.print(doc, *mail_book, false, 1, false, arc);
|
allegato.print(doc, *mail_book, false, 1, false, arc);
|
||||||
@ -1060,10 +1062,11 @@ bool TReport_doc_app::print_loop(const TString& query, bool send_by_mail)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TString msg; msg << TR("Report allegato inesistente") << " : " << codalleg;
|
TString msg; msg << TR("Report allegato inesistente") << " : " << profilo;
|
||||||
statbar_set_title(TASK_WIN, msg);
|
statbar_set_title(TASK_WIN, msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mail_book != NULL)
|
if (mail_book != NULL)
|
||||||
{
|
{
|
||||||
if (mail_book->pages() > 0)
|
if (mail_book->pages() > 0)
|
||||||
|
@ -20,7 +20,6 @@ int main( int argc, char** argv )
|
|||||||
ve7300(argc, argv); break; // stampa riepilogo entrate fornitori
|
ve7300(argc, argv); break; // stampa riepilogo entrate fornitori
|
||||||
case 1:
|
case 1:
|
||||||
ve7200(argc, argv); break; // stampa flussi di cassa per white sun
|
ve7200(argc, argv); break; // stampa flussi di cassa per white sun
|
||||||
case 0:
|
|
||||||
default:
|
default:
|
||||||
ve7100(argc, argv); break; // trasferimento documenti Team System
|
ve7100(argc, argv); break; // trasferimento documenti Team System
|
||||||
}
|
}
|
||||||
|
@ -399,23 +399,6 @@ bool TTipo_documento::scarica_residuo() const
|
|||||||
return get_bool("B4");
|
return get_bool("B4");
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString& TTipo_documento::main_print_profile() const
|
|
||||||
{
|
|
||||||
TString& tmp = get_tmp_string();
|
|
||||||
tmp = get("S5");
|
|
||||||
tmp.cut(8); tmp.rtrim();
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
const TString& TTipo_documento::additional_print_profile() const
|
|
||||||
{
|
|
||||||
TString& tmp = get_tmp_string();
|
|
||||||
tmp = get("S5");
|
|
||||||
tmp.ltrim(8); tmp.rtrim();
|
|
||||||
return tmp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// Espressione documento
|
// Espressione documento
|
||||||
|
@ -1121,7 +1121,6 @@ error_type TContabilizzazione::compile_head_mov(TDocumento& doc)
|
|||||||
// reperisce la descrizione dal tipo documento e la completa con la data documento ed il
|
// reperisce la descrizione dal tipo documento e la completa con la data documento ed il
|
||||||
// numero documento
|
// numero documento
|
||||||
TString descr; doc.riferimento(descr);
|
TString descr; doc.riferimento(descr);
|
||||||
const TTipo_documento& tipo = doc.tipo();
|
|
||||||
|
|
||||||
if (descr.empty()) descr = tipo.descrizione();
|
if (descr.empty()) descr = tipo.descrizione();
|
||||||
|
|
||||||
|
@ -261,12 +261,8 @@ TDocumento_mask::TDocumento_mask(const char* td)
|
|||||||
|
|
||||||
FOR_EACH_MASK_FIELD((*this), j, f)
|
FOR_EACH_MASK_FIELD((*this), j, f)
|
||||||
{
|
{
|
||||||
const TMask_field& f = fld(i);
|
if (f->dlg() > BASE_PIEDE)
|
||||||
|
_calculated_pages.set(f->page());
|
||||||
const int p = f.page();
|
|
||||||
|
|
||||||
if (f.dlg() > BASE_PIEDE)
|
|
||||||
_calculated_pages.set(p);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1299,9 +1295,9 @@ bool TDocumento_mask::ss_handler(TMask_field& f, KEY key)
|
|||||||
if (key == K_ENTER && f.mask().insert_mode())
|
if (key == K_ENTER && f.mask().insert_mode())
|
||||||
{
|
{
|
||||||
TSheet_field& ss = (TSheet_field&)f;
|
TSheet_field& ss = (TSheet_field&)f;
|
||||||
if (!app().is_transaction() && ss.empty()
|
if (!app().is_transaction() && ss.empty())
|
||||||
ok = yesno_box("Il documento e' privo di righe:\n"
|
ok = yesno_box(TR("Il documento e' privo di righe:\n"
|
||||||
"Si desidera continuare ugualmente?");
|
"Si desidera continuare ugualmente?"));
|
||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
@ -1398,6 +1394,7 @@ bool TDocumento_mask::ss_notify( TSheet_field& ss, int r, KEY key )
|
|||||||
}
|
}
|
||||||
if (s.full())
|
if (s.full())
|
||||||
riga.put("CODMAG", s);
|
riga.put("CODMAG", s);
|
||||||
|
|
||||||
riga.autoload(ss);
|
riga.autoload(ss);
|
||||||
ss.check_row(r);
|
ss.check_row(r);
|
||||||
t.set_defaults(ss, r + 1);
|
t.set_defaults(ss, r + 1);
|
||||||
@ -1485,9 +1482,6 @@ bool TDocumento_mask::occas_handler( TMask_field& f, KEY key )
|
|||||||
occas_mask.set_handler(O_COFI, occas_cfpi_handler );
|
occas_mask.set_handler(O_COFI, occas_cfpi_handler );
|
||||||
occas_mask.set_handler(O_PAIV, occas_cfpi_handler );
|
occas_mask.set_handler(O_PAIV, occas_cfpi_handler );
|
||||||
|
|
||||||
TMask occas_mask("ve0100o");
|
|
||||||
occas_mask.set_handler( O_CODICE, occas_code_handler );
|
|
||||||
|
|
||||||
for (int i = occas_mask.fields() - 1; i >= 0; i--)
|
for (int i = occas_mask.fields() - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
TMask_field & f = occas_mask.fld(i);
|
TMask_field & f = occas_mask.fld(i);
|
||||||
@ -2495,6 +2489,7 @@ bool TElabora_mask::elabora()
|
|||||||
else
|
else
|
||||||
d.zero(DOC_CAUSMAG);
|
d.zero(DOC_CAUSMAG);
|
||||||
}
|
}
|
||||||
|
|
||||||
in.add(app_doc);
|
in.add(app_doc);
|
||||||
out.add(d);
|
out.add(d);
|
||||||
if (e->elabora(in, out, TDate(TODAY), TRUE))
|
if (e->elabora(in, out, TDate(TODAY), TRUE))
|
||||||
@ -2523,33 +2518,12 @@ bool TElabora_mask::elabora()
|
|||||||
{
|
{
|
||||||
TDocumento* d = new TDocumento(provv, anno, codnum, ndoc);
|
TDocumento* d = new TDocumento(provv, anno, codnum, ndoc);
|
||||||
|
|
||||||
if (numdoc <= 0)
|
|
||||||
{
|
|
||||||
TDocumento::copy_data(d.head(), app_doc.head());
|
|
||||||
d.put(DOC_TIPODOC, get(F_TIPODOC_ELAB));
|
|
||||||
d.put(DOC_STATO, get(F_STATODOC_ELAB));
|
|
||||||
|
|
||||||
const TDate datadoc = d.get_date(DOC_DATADOC);
|
|
||||||
const TDate datainsc = d.get_date(DOC_DATAINSC);
|
|
||||||
const bool equal = !datainsc.ok() || datadoc == datainsc;
|
|
||||||
|
|
||||||
d.put(DOC_DATADOC, get(F_DATADOC_ELAB));
|
|
||||||
if (equal)
|
|
||||||
d.zero(DOC_DATAINSC);
|
|
||||||
|
|
||||||
const TTipo_documento & t = d.tipo();
|
|
||||||
|
|
||||||
if (t.mov_mag())
|
|
||||||
d.put(DOC_CAUSMAG, t.caus_mov());
|
|
||||||
else
|
|
||||||
d.zero(DOC_CAUSMAG);
|
|
||||||
}
|
|
||||||
in.add(d);
|
in.add(d);
|
||||||
}
|
}
|
||||||
if (update_header)
|
if (update_header)
|
||||||
{
|
{
|
||||||
const TString16 tipo_doc(app_doc.get(DOC_TIPODOC));
|
const TString4 tipo_doc(app_doc.get(DOC_TIPODOC));
|
||||||
const TString16 caus_mag(app_doc.get(DOC_CAUSMAG));
|
const TString8 caus_mag(app_doc.get(DOC_CAUSMAG));
|
||||||
const long movmag = app_doc.get_long(DOC_MOVMAG);
|
const long movmag = app_doc.get_long(DOC_MOVMAG);
|
||||||
const TDate datadoc = app_doc.get_date(DOC_DATADOC);
|
const TDate datadoc = app_doc.get_date(DOC_DATADOC);
|
||||||
const TDate datainsc = app_doc.get_date(DOC_DATAINSC);
|
const TDate datainsc = app_doc.get_date(DOC_DATAINSC);
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#include "sconti.h"
|
#include "sconti.h"
|
||||||
#include "veini.h"
|
#include "veini.h"
|
||||||
|
#include "vepriv.h"
|
||||||
#include "verig.h"
|
#include "verig.h"
|
||||||
#include "veuml1.h"
|
#include "veuml1.h"
|
||||||
#include "veini.h"
|
#include "veini.h"
|
||||||
@ -368,14 +369,14 @@ void row_set_handler( TMask& m, const int field, const int index )
|
|||||||
case 3:
|
case 3:
|
||||||
if (field == FR_CODART)
|
if (field == FR_CODART)
|
||||||
m.set_handler( field, search_price_handler );
|
m.set_handler( field, search_price_handler );
|
||||||
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
if (field == FR_CODART)
|
if (field == FR_CODART)
|
||||||
m.set_handler( field, find_price_handler );
|
m.set_handler( field, find_price_handler );
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
yesnofatal_box( false, "Funzione di handler sulla riga non definita( %d ).", index );
|
yesnofatal_box( false, "Funzione di handler sulla riga non definita( %d ).", index );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user