From 8084b6caa15f9bf1d8e8f2d76b0ac472c0b54f99 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 24 Dec 2008 11:18:37 +0000 Subject: [PATCH] =?UTF-8?q?Patch=20level=20=20=20=20=20=20=20=20=20:=2010.?= =?UTF-8?q?0=20Files=20correlati=20=20=20=20=20:=20ve1.exe=20vetbtip.msk?= =?UTF-8?q?=20Ricompilazione=20Demo=20:=20[=20]=20Commento=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20:=200000924:=20profilo=20stampa=20fatture?= =?UTF-8?q?=20il=20cliente=20Felice=20Dania=20richiede=20di=20poter=20usuf?= =?UTF-8?q?ruire=20di=20un=20profilo=20di=20stampa=20fatture=20da=20mandar?= =?UTF-8?q?e=20via=20mail,=20oltre=20a=20quello=20gi=C3=A0=20esistente=20p?= =?UTF-8?q?er=20i=20moduli=20da=20stampare.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.65.10.50/trunk@17979 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ve/ve1300.cpp | 16 +++++++++++----- ve/velib.h | 1 + ve/velib03a.cpp | 15 +++++++++++++++ ve/vetbtip.h | 1 + ve/vetbtip.uml | 25 ++++++++++++++----------- 5 files changed, 42 insertions(+), 16 deletions(-) diff --git a/ve/ve1300.cpp b/ve/ve1300.cpp index ad6a8bc54..3d37cf098 100755 --- a/ve/ve1300.cpp +++ b/ve/ve1300.cpp @@ -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) diff --git a/ve/velib.h b/ve/velib.h index ccac07b2e..94be2c3c4 100755 --- a/ve/velib.h +++ b/ve/velib.h @@ -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; } diff --git a/ve/velib03a.cpp b/ve/velib03a.cpp index 33f22f38d..9a10ca410 100755 --- a/ve/velib03a.cpp +++ b/ve/velib03a.cpp @@ -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'; diff --git a/ve/vetbtip.h b/ve/vetbtip.h index 0f3a5ec78..0298e2d09 100755 --- a/ve/vetbtip.h +++ b/ve/vetbtip.h @@ -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 diff --git a/ve/vetbtip.uml b/ve/vetbtip.uml index 919b78e79..241121b31 100755 --- a/ve/vetbtip.uml +++ b/ve/vetbtip.uml @@ -1,12 +1,10 @@ #include "vetbtip.h" TOOLBAR "Toolbar" 0 0 0 2 - #include - 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