Patch level : 10.0
Files correlati : ve1.exe vetbtip.msk Ricompilazione Demo : [ ] Commento : 0000924: profilo stampa fatture il cliente Felice Dania richiede di poter usufruire di un profilo di stampa fatture da mandare via mail, oltre a quello già esistente per i moduli da stampare. git-svn-id: svn://10.65.10.50/trunk@17979 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
67023a8208
commit
8084b6caa1
@ -971,9 +971,9 @@ bool TReport_doc_app::print_loop(const TString& query, bool send_by_mail)
|
||||
is_definitive = k == K_YES;
|
||||
}
|
||||
|
||||
TReports_cache reports; // Cache degli ultimi reports usati
|
||||
TDoc_book book; // Destinazione dell'intera stampa
|
||||
TDoc_book * mail_book = NULL; // Destinazione dell'intera stampa
|
||||
TReports_cache reports; // Cache degli ultimi reports usati
|
||||
TDoc_book book; // Destinazione dell'intera stampa
|
||||
TDoc_book* mail_book = NULL; // Destinazione dell'intera stampa
|
||||
TLog_report log(TR("Invio documenti per email"));
|
||||
TProgind pi(docs, TR("Elaborazione documenti..."), true, true);
|
||||
|
||||
@ -999,8 +999,14 @@ bool TReport_doc_app::print_loop(const TString& query, bool send_by_mail)
|
||||
const TTipo_documento& tipo = cached_tipodoc(tipodoc);
|
||||
const bool send_mail = send_by_mail && get_mail_address().full();
|
||||
|
||||
TFilename profilo;
|
||||
if (tipo.main_print_profile(profilo, 2)) // Tenta di costruirsi il nome del report
|
||||
TFilename profilo; // Tenta di costruirsi il nome del report
|
||||
bool ok = false;
|
||||
if (send_mail)
|
||||
ok = tipo.mail_print_profile(profilo);
|
||||
else
|
||||
ok = tipo.main_print_profile(profilo, 2);
|
||||
|
||||
if (ok)
|
||||
{
|
||||
int copies = _msk->get_int(F_NCOPIE);
|
||||
if (copies <= 0 && is_definitive)
|
||||
|
@ -307,6 +307,7 @@ public:
|
||||
bool printable() const { return get("S5").full(); }
|
||||
bool main_print_profile(TFilename& report, int filter) const;
|
||||
bool additional_print_profile(TFilename& report, int filter) const;
|
||||
bool mail_print_profile(TFilename& report) const;
|
||||
bool is_costo() const ;
|
||||
bool is_ricavo() const ;
|
||||
const TString & module() const { return _module; }
|
||||
|
@ -110,6 +110,21 @@ bool TTipo_documento::additional_print_profile(TFilename& report, int filter) co
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TTipo_documento::mail_print_profile(TFilename& report) const
|
||||
{
|
||||
report = get("S5").mid(16, 8);
|
||||
bool ok = report.full();
|
||||
if (ok)
|
||||
{
|
||||
report.trim();
|
||||
report.ext("rep");
|
||||
ok = report.custom_path();
|
||||
}
|
||||
if (!ok)
|
||||
ok = main_print_profile(report, 2); // Solo rep
|
||||
return ok;
|
||||
}
|
||||
|
||||
bool TTipo_documento::is_costo() const
|
||||
{
|
||||
return _tipocr == 'C' || tipocf() == 'F';
|
||||
|
@ -25,6 +25,7 @@
|
||||
#define F_NOTACREDDEB 125
|
||||
#define F_LORDO 126
|
||||
#define F_FATCOM 127
|
||||
#define F_PMAIL 129
|
||||
#define F_PSTAMPA2 130
|
||||
#define F_NCOPIE2 131
|
||||
#define F_SCONTRINO 132
|
||||
|
@ -1,12 +1,10 @@
|
||||
#include "vetbtip.h"
|
||||
|
||||
TOOLBAR "Toolbar" 0 0 0 2
|
||||
|
||||
#include <relapbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Tipi documento" 0 0 0 0
|
||||
PAGE "Tipi documento" 0 2 0 0
|
||||
|
||||
GROUPBOX DLG_NULL 78 3
|
||||
BEGIN
|
||||
@ -45,14 +43,14 @@ END
|
||||
|
||||
STRING F_RIFERIMENTO 50
|
||||
BEGIN
|
||||
PROMPT 2 3 "Riferimento "
|
||||
PROMPT 2 3 "Riferimento "
|
||||
FIELD S1
|
||||
CHECKTYPE NORMAL
|
||||
END
|
||||
|
||||
LIST F_TIPO 24
|
||||
BEGIN
|
||||
PROMPT 2 4 "Tipo documento "
|
||||
PROMPT 2 4 "Tipo documento "
|
||||
FIELD I1
|
||||
ITEM "0|Altro" MESSAGE ENABLE,2@|ENABLE,F_LORDO
|
||||
ITEM "1|Bolla" MESSAGE CLEAR,2@|ENABLE,F_LORDO
|
||||
@ -65,19 +63,19 @@ END
|
||||
|
||||
STRING F_PROFILO 8
|
||||
BEGIN
|
||||
PROMPT 2 5 "Profilo documento "
|
||||
PROMPT 45 4 "Profilo d'inserimento "
|
||||
FIELD S4[1,8]
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
GROUPBOX DLG_NULL 78 4
|
||||
GROUPBOX DLG_NULL 78 5
|
||||
BEGIN
|
||||
PROMPT 1 6 "@bProfili di stampa"
|
||||
PROMPT 1 5 "@bProfili di stampa"
|
||||
END
|
||||
|
||||
STRING F_PSTAMPA 8
|
||||
BEGIN
|
||||
PROMPT 2 7 "Profilo stampa principale "
|
||||
PROMPT 2 6 "Profilo stampa principale "
|
||||
FIELD S5[1,8]
|
||||
MESSAGE EMPTY CLEAR,4@
|
||||
MESSAGE ENABLE,4@
|
||||
@ -85,10 +83,15 @@ END
|
||||
|
||||
NUMBER F_NCOPIE 3
|
||||
BEGIN
|
||||
PROMPT 42 7 "Numero di copie "
|
||||
PROMPT 42 6 "Numero di copie "
|
||||
FIELD I0
|
||||
FLAGS "U"
|
||||
WARNING "Il numero di copie deve essere positivo"
|
||||
END
|
||||
|
||||
STRING F_PMAIL 8
|
||||
BEGIN
|
||||
PROMPT 2 7 "Profilo per invio e-mail "
|
||||
FIELD S5[17,24]
|
||||
END
|
||||
|
||||
STRING F_PSTAMPA2 8
|
||||
|
Loading…
x
Reference in New Issue
Block a user