Patch level : 12.0 528

Files correlati     : sv
Commento            : Aggiunto ricalcolo automatico alle statistiche di vendita prima della stampa

git-svn-id: svn://10.65.10.50/branches/R_10_00@24345 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
mtollari 2018-02-08 10:54:26 +00:00
parent 068ad0e91a
commit 8b10062a51
4 changed files with 41 additions and 18 deletions

View File

@ -1,22 +1,23 @@
#ifndef __ST0400A_H #ifndef __ST0400A_H
#define __ST0400A_H #define __ST0400A_H
#define F_FREQUENZA 100 #define F_FREQUENZA 100
#define F_NO_CODICE 101 #define F_AUTOUPDATE 101
#define F_NO_MAGAZZINO 102 #define F_NO_CODICE 102
#define F_NO_RAGGRUPPA 103 #define F_NO_MAGAZZINO 103
#define F_MERCE 111 #define F_NO_RAGGRUPPA 104
#define F_PRESTAZIONI 112 #define F_MERCE 115
#define F_OMAGGI 113 #define F_PRESTAZIONI 116
#define F_RAGGRUPPA_OMAGGI 114 #define F_OMAGGI 117
#define F_OMAGGI_VALORE 115 #define F_RAGGRUPPA_OMAGGI 118
#define F_AGENTE 121 #define F_OMAGGI_VALORE 119
#define F_CLIENTE 122 #define F_AGENTE 120
#define F_ZONA 123 #define F_CLIENTE 121
#define F_GIACENZA 124 #define F_ZONA 122
#define F_MAGAZZINO 125 #define F_GIACENZA 123
#define F_CATVEND 126 #define F_MAGAZZINO 124
#define F_SPESEDOC 127 #define F_CATVEND 125
#define F_VALFLD 128 #define F_SPESEDOC 126
#define F_VALFLD 127
#endif #endif

View File

@ -35,6 +35,13 @@ BEGIN
FIELD Frequenza FIELD Frequenza
END END
BOOLEAN F_AUTOUPDATE
BEGIN
PROMPT 40 2 "Aggiornamento automatico statistiche definitive"
HELP "Aggiorna le statistiche prima della stampa in definitivo"
FIELD AutoUpdate
END
GROUPBOX DLG_NULL 76 5 GROUPBOX DLG_NULL 76 5
BEGIN BEGIN
PROMPT 1 4 "@bTipi riga da includere" PROMPT 1 4 "@bTipi riga da includere"

View File

@ -5,6 +5,7 @@
#include <printapp.h> #include <printapp.h>
#include <progind.h> #include <progind.h>
#include <tabutil.h> #include <tabutil.h>
#include <execp.h>
#include "sv1.h" #include "sv1.h"
#include "sv1200a.h" #include "sv1200a.h"
@ -1319,6 +1320,13 @@ void TStampa_stat::reset_grplevels()
bool TStampa_stat::user_create() bool TStampa_stat::user_create()
{ {
if (ini_get_bool(CONFIG_DITTA, "sv", "AutoUpdate", false))
{
TExternal_app app("sv2 -0 -A -D");
app.run();
}
// ************ // ************
// files: documenti e statistiche // files: documenti e statistiche
open_files(LF_RIGHEDOC, LF_CONDV, LF_RCONDV, LF_ANAMAG, LF_SCONTI, LF_UMART, LF_TAB, LF_TABCOM, LF_CLIFO, open_files(LF_RIGHEDOC, LF_CONDV, LF_RCONDV, LF_ANAMAG, LF_SCONTI, LF_UMART, LF_TAB, LF_TABCOM, LF_CLIFO,

View File

@ -240,7 +240,10 @@ bool TRicalcolo_stats::datefin_handler(TMask_field& f, KEY k)
return true; return true;
} }
/* Parameters:
* -A: Automatic
* -D: Definitive (if -A was specified)
*/
void TRicalcolo_stats::main_loop() void TRicalcolo_stats::main_loop()
{ {
if (argc() >= 3 && xvt_str_same(argv(2), "-A")) if (argc() >= 3 && xvt_str_same(argv(2), "-A"))
@ -255,6 +258,10 @@ void TRicalcolo_stats::main_loop()
} }
if (kill_stats(dfr, dto)) if (kill_stats(dfr, dto))
calc_stats(dfr, dto); calc_stats(dfr, dto);
if (xvt_str_same(argv(3), "-D"))
{
ini_set_string(CONFIG_DITTA, "sv", "UltimoCalcolo", dto);
}
} }
else else
{ {