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;
|
is_definitive = k == K_YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
TReports_cache reports; // Cache degli ultimi reports usati
|
TReports_cache reports; // Cache degli ultimi reports usati
|
||||||
TDoc_book book; // Destinazione dell'intera stampa
|
TDoc_book book; // Destinazione dell'intera stampa
|
||||||
TDoc_book * mail_book = NULL; // Destinazione dell'intera stampa
|
TDoc_book* mail_book = NULL; // Destinazione dell'intera stampa
|
||||||
TLog_report log(TR("Invio documenti per email"));
|
TLog_report log(TR("Invio documenti per email"));
|
||||||
TProgind pi(docs, TR("Elaborazione documenti..."), true, true);
|
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 TTipo_documento& tipo = cached_tipodoc(tipodoc);
|
||||||
const bool send_mail = send_by_mail && get_mail_address().full();
|
const bool send_mail = send_by_mail && get_mail_address().full();
|
||||||
|
|
||||||
TFilename profilo;
|
TFilename profilo; // Tenta di costruirsi il nome del report
|
||||||
if (tipo.main_print_profile(profilo, 2)) // 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);
|
int copies = _msk->get_int(F_NCOPIE);
|
||||||
if (copies <= 0 && is_definitive)
|
if (copies <= 0 && is_definitive)
|
||||||
|
@ -307,6 +307,7 @@ public:
|
|||||||
bool printable() const { return get("S5").full(); }
|
bool printable() const { return get("S5").full(); }
|
||||||
bool main_print_profile(TFilename& report, int filter) const;
|
bool main_print_profile(TFilename& report, int filter) const;
|
||||||
bool additional_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_costo() const ;
|
||||||
bool is_ricavo() const ;
|
bool is_ricavo() const ;
|
||||||
const TString & module() const { return _module; }
|
const TString & module() const { return _module; }
|
||||||
|
@ -110,6 +110,21 @@ bool TTipo_documento::additional_print_profile(TFilename& report, int filter) co
|
|||||||
return ok;
|
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
|
bool TTipo_documento::is_costo() const
|
||||||
{
|
{
|
||||||
return _tipocr == 'C' || tipocf() == 'F';
|
return _tipocr == 'C' || tipocf() == 'F';
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#define F_NOTACREDDEB 125
|
#define F_NOTACREDDEB 125
|
||||||
#define F_LORDO 126
|
#define F_LORDO 126
|
||||||
#define F_FATCOM 127
|
#define F_FATCOM 127
|
||||||
|
#define F_PMAIL 129
|
||||||
#define F_PSTAMPA2 130
|
#define F_PSTAMPA2 130
|
||||||
#define F_NCOPIE2 131
|
#define F_NCOPIE2 131
|
||||||
#define F_SCONTRINO 132
|
#define F_SCONTRINO 132
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
#include "vetbtip.h"
|
#include "vetbtip.h"
|
||||||
|
|
||||||
TOOLBAR "Toolbar" 0 0 0 2
|
TOOLBAR "Toolbar" 0 0 0 2
|
||||||
|
|
||||||
#include <relapbar.h>
|
#include <relapbar.h>
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Tipi documento" 0 0 0 0
|
PAGE "Tipi documento" 0 2 0 0
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 3
|
GROUPBOX DLG_NULL 78 3
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -45,14 +43,14 @@ END
|
|||||||
|
|
||||||
STRING F_RIFERIMENTO 50
|
STRING F_RIFERIMENTO 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 3 "Riferimento "
|
PROMPT 2 3 "Riferimento "
|
||||||
FIELD S1
|
FIELD S1
|
||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
END
|
END
|
||||||
|
|
||||||
LIST F_TIPO 24
|
LIST F_TIPO 24
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 4 "Tipo documento "
|
PROMPT 2 4 "Tipo documento "
|
||||||
FIELD I1
|
FIELD I1
|
||||||
ITEM "0|Altro" MESSAGE ENABLE,2@|ENABLE,F_LORDO
|
ITEM "0|Altro" MESSAGE ENABLE,2@|ENABLE,F_LORDO
|
||||||
ITEM "1|Bolla" MESSAGE CLEAR,2@|ENABLE,F_LORDO
|
ITEM "1|Bolla" MESSAGE CLEAR,2@|ENABLE,F_LORDO
|
||||||
@ -65,19 +63,19 @@ END
|
|||||||
|
|
||||||
STRING F_PROFILO 8
|
STRING F_PROFILO 8
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 5 "Profilo documento "
|
PROMPT 45 4 "Profilo d'inserimento "
|
||||||
FIELD S4[1,8]
|
FIELD S4[1,8]
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 4
|
GROUPBOX DLG_NULL 78 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 6 "@bProfili di stampa"
|
PROMPT 1 5 "@bProfili di stampa"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_PSTAMPA 8
|
STRING F_PSTAMPA 8
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 7 "Profilo stampa principale "
|
PROMPT 2 6 "Profilo stampa principale "
|
||||||
FIELD S5[1,8]
|
FIELD S5[1,8]
|
||||||
MESSAGE EMPTY CLEAR,4@
|
MESSAGE EMPTY CLEAR,4@
|
||||||
MESSAGE ENABLE,4@
|
MESSAGE ENABLE,4@
|
||||||
@ -85,10 +83,15 @@ END
|
|||||||
|
|
||||||
NUMBER F_NCOPIE 3
|
NUMBER F_NCOPIE 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 42 7 "Numero di copie "
|
PROMPT 42 6 "Numero di copie "
|
||||||
FIELD I0
|
FIELD I0
|
||||||
FLAGS "U"
|
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
|
END
|
||||||
|
|
||||||
STRING F_PSTAMPA2 8
|
STRING F_PSTAMPA2 8
|
||||||
|
Loading…
x
Reference in New Issue
Block a user