Ricompilazione e correzione poersonalizzazioni varie
git-svn-id: svn://10.65.10.50/branches/R_10_00@22795 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7457f0f39f
commit
79f6f95cda
@ -272,8 +272,7 @@ void TPaghe2Doc::main_loop()
|
|||||||
FOR_EACH_ARRAY_ROW(transactions, row, name)
|
FOR_EACH_ARRAY_ROW(transactions, row, name)
|
||||||
remove_file(*name);
|
remove_file(*name);
|
||||||
// main
|
// main
|
||||||
KEY tasto;
|
KEY tasto = _m->run();
|
||||||
tasto = _m->run();
|
|
||||||
if (tasto == K_ENTER)
|
if (tasto == K_ENTER)
|
||||||
{
|
{
|
||||||
const char* const title = TR("Importazione documenti da paghe");
|
const char* const title = TR("Importazione documenti da paghe");
|
||||||
@ -296,23 +295,23 @@ void TPaghe2Doc::main_loop()
|
|||||||
TDocumento* doc=NULL;
|
TDocumento* doc=NULL;
|
||||||
|
|
||||||
bool error = false;
|
bool error = false;
|
||||||
int ntransac=0; // numero trasnsazione per creare file .ini
|
int ntransac=0; // numero transazione per creare file .ini
|
||||||
int nriga=0; // numero riga doc.
|
int nriga=0; // numero riga doc.
|
||||||
int oldanno = -1;
|
int oldanno = -1;
|
||||||
int oldmese = -1;
|
int oldmese = -1;
|
||||||
long oldcodcf = -1;
|
long oldcodcf = -1;
|
||||||
for (bool ok = paghe.move_first(); ok; ok = paghe.move_next())
|
for (bool ok = paghe.move_first(); ok; ok = paghe.move_next())
|
||||||
{
|
{
|
||||||
bool esente = false;
|
|
||||||
TString16 codivaes = "";
|
|
||||||
if (!pi.addstatus(1))
|
if (!pi.addstatus(1))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
bool esente = false;
|
||||||
|
TString16 codivaes = "";
|
||||||
// non considerare righe con cedolini e imponibile entrambi a zero
|
// non considerare righe con cedolini e imponibile entrambi a zero
|
||||||
const int nrced = paghe.get("CLNCD").as_int(); // numero cedolini
|
const int nrced = paghe.get("CLNCD").as_int(); // numero cedolini
|
||||||
const real impon = paghe.get("CLILR").as_real() / CENTO; // imponibile
|
const real impon = paghe.get("CLILR").as_real() / CENTO; // imponibile
|
||||||
if ((nrced != 0) || (!impon.is_zero()))
|
if ((nrced != 0) || (!impon.is_zero()))
|
||||||
{
|
{
|
||||||
|
|
||||||
const int annocomp = paghe.get("CLA01").as_int();
|
const int annocomp = paghe.get("CLA01").as_int();
|
||||||
const int mesecomp = paghe.get("CLM01").as_int();
|
const int mesecomp = paghe.get("CLM01").as_int();
|
||||||
const long codcf = paghe.get("CLAZI").as_int();
|
const long codcf = paghe.get("CLAZI").as_int();
|
||||||
@ -343,8 +342,8 @@ void TPaghe2Doc::main_loop()
|
|||||||
// calcolo se cliente esente
|
// calcolo se cliente esente
|
||||||
const long codcli = paghe.get("CLAZI").as_int();
|
const long codcli = paghe.get("CLAZI").as_int();
|
||||||
|
|
||||||
TCli_for& c = TCli_for('C', codcli);
|
const TCli_for c('C', codcli);
|
||||||
TCodiceIVA codes(c.vendite().get(CFV_ASSFIS));
|
const TCodiceIVA codes(c.vendite().get(CFV_ASSFIS));
|
||||||
const TString16 v_esenzione(c.vendite().get(CFV_VSPROT));
|
const TString16 v_esenzione(c.vendite().get(CFV_VSPROT));
|
||||||
const TString16 v_data_esenzione(c.vendite().get(CFV_VSDATAREG));
|
const TString16 v_data_esenzione(c.vendite().get(CFV_VSDATAREG));
|
||||||
const TString16 n_registrazione(c.vendite().get(CFV_NSPROT));
|
const TString16 n_registrazione(c.vendite().get(CFV_NSPROT));
|
||||||
@ -366,7 +365,7 @@ void TPaghe2Doc::main_loop()
|
|||||||
delete docum;
|
delete docum;
|
||||||
docum = NULL;
|
docum = NULL;
|
||||||
}
|
}
|
||||||
if (error) // cancello il file perch'e la transazione non e' andata bene
|
if (error) // cancello il file perché la transazione non e' andata bene
|
||||||
{
|
{
|
||||||
TFilename pgfile; pgfile.tempdir();
|
TFilename pgfile; pgfile.tempdir();
|
||||||
pgfile.add(format("pg000%03d.ini",ntransac));
|
pgfile.add(format("pg000%03d.ini",ntransac));
|
||||||
@ -387,7 +386,7 @@ void TPaghe2Doc::main_loop()
|
|||||||
_log = NULL;
|
_log = NULL;
|
||||||
if (save)
|
if (save)
|
||||||
{
|
{
|
||||||
TString80 applicat;
|
TString applicat;
|
||||||
applicat.format("ve0.exe -1 -i%s", (const char*) pgfiles);
|
applicat.format("ve0.exe -1 -i%s", (const char*) pgfiles);
|
||||||
TExternal_app gestdoc(applicat);
|
TExternal_app gestdoc(applicat);
|
||||||
gestdoc.run();
|
gestdoc.run();
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#include "pg0001100a.h"
|
#include "pg0001100a.h"
|
||||||
|
|
||||||
PAGE "Importazione documenti da paghe" -1 -1 78 20
|
TOOLBAR "" 0 0 0 2
|
||||||
|
#include <elabar.h>
|
||||||
|
ENDPAGE
|
||||||
|
|
||||||
|
PAGE "Importazione documenti da paghe" 0 2 0 0
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 76 3
|
GROUPBOX DLG_NULL 76 3
|
||||||
BEGIN
|
BEGIN
|
||||||
@ -55,6 +59,8 @@ END
|
|||||||
DATA F_DATADOC
|
DATA F_DATADOC
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 3 10 "Data doc. "
|
PROMPT 3 10 "Data doc. "
|
||||||
|
FLAGS "A"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_PERC 3
|
NUMBER F_PERC 3
|
||||||
@ -62,16 +68,6 @@ BEGIN
|
|||||||
PROMPT 3 11 "Percentuale maggiorazione: "
|
PROMPT 3 11 "Percentuale maggiorazione: "
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 9 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT -12 -1 ""
|
|
||||||
END
|
|
||||||
|
|
||||||
BUTTON DLG_QUIT 9 2
|
|
||||||
BEGIN
|
|
||||||
PROMPT -22 -1 ""
|
|
||||||
END
|
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
ENDMASK
|
ENDMASK
|
||||||
|
@ -442,8 +442,8 @@ const TVariant& TIVA_recset::get(const char* column_name) const
|
|||||||
if (fname == RMI_IMPONIBILE || fname == RMI_IMPOSTA)
|
if (fname == RMI_IMPONIBILE || fname == RMI_IMPOSTA)
|
||||||
{
|
{
|
||||||
TVariant& var = get_tmp_var();
|
TVariant& var = get_tmp_var();
|
||||||
|
const real i = TAS400_recordset::get(fname).as_real() / CENTO;
|
||||||
var.set(TAS400_recordset::get(fname).as_real() / CENTO);
|
var.set(i);
|
||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
return TAS400_recordset::get(fname);
|
return TAS400_recordset::get(fname);
|
||||||
@ -610,8 +610,8 @@ const TVariant& TRMov_recset::get(const char* column_name) const
|
|||||||
if (fname == RMV_IMPORTO)
|
if (fname == RMV_IMPORTO)
|
||||||
{
|
{
|
||||||
TVariant& var = get_tmp_var();
|
TVariant& var = get_tmp_var();
|
||||||
|
const real i = TAS400_recordset::get(fname).as_real() / CENTO;
|
||||||
var.set(TAS400_recordset::get(fname).as_real() / CENTO);
|
var.set(i);
|
||||||
return var;
|
return var;
|
||||||
}
|
}
|
||||||
return TAS400_recordset::get(fname);
|
return TAS400_recordset::get(fname);
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include "pg0001500a.h"
|
#include "pg0001500a.h"
|
||||||
#include "../cg/cglib01.h"
|
#include "../cg/cglib01.h"
|
||||||
#include "../mg/mglib.h"
|
#include "../mg/mglib.h"
|
||||||
#include "../mg/movmag.h"
|
|
||||||
#include "../mg/rmovmag.h"
|
|
||||||
|
|
||||||
class TMaskpg00015 : public TAutomask
|
class TMaskpg00015 : public TAutomask
|
||||||
{
|
{
|
||||||
@ -47,7 +45,6 @@ void TCopiaMovMg::main_loop()
|
|||||||
const long amov = m.get_long(F_ANUM);
|
const long amov = m.get_long(F_ANUM);
|
||||||
const TDate newdate = m.get_date(F_DATAMOV);
|
const TDate newdate = m.get_date(F_DATAMOV);
|
||||||
TMov_mag mov;
|
TMov_mag mov;
|
||||||
TRectype rec(LF_MOVMAG);
|
|
||||||
long newnmov = atol(mov.get_next_key());
|
long newnmov = atol(mov.get_next_key());
|
||||||
const real valtot = m.get_real(F_VALTOT);
|
const real valtot = m.get_real(F_VALTOT);
|
||||||
const int qmax = m.get_int(F_QMAX);
|
const int qmax = m.get_int(F_QMAX);
|
||||||
@ -56,7 +53,8 @@ void TCopiaMovMg::main_loop()
|
|||||||
real actval;
|
real actval;
|
||||||
|
|
||||||
{
|
{
|
||||||
TProgind rd(amov - damov + 1, "Lettura");
|
TLocalisamfile rec(LF_MOVMAG);
|
||||||
|
TProgind rd(amov - damov + 1, TR("Lettura"));
|
||||||
|
|
||||||
for (long n = damov; n <= amov; n++)
|
for (long n = damov; n <= amov; n++)
|
||||||
{
|
{
|
||||||
|
@ -104,7 +104,7 @@ public:
|
|||||||
const TString& find_codart(const TString& codart) const;
|
const TString& find_codart(const TString& codart) const;
|
||||||
bool find_or_create_clifo(const TCBA_recset& cli, TLocalisamfile& clifo, TLog_report& log) const;
|
bool find_or_create_clifo(const TCBA_recset& cli, TLocalisamfile& clifo, TLog_report& log) const;
|
||||||
bool importa_clienti(const TFilename& fname, TLog_report& log) const;
|
bool importa_clienti(const TFilename& fname, TLog_report& log) const;
|
||||||
bool importa_fatture(const TFilename& fname, TLog_report& log) const;
|
bool importa_fatture(const TFilename& fname, const TString& codnum, TLog_report& log) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
long TImport_app::find_clifo(const TString& cf_pi, TLocalisamfile& clifo) const
|
long TImport_app::find_clifo(const TString& cf_pi, TLocalisamfile& clifo) const
|
||||||
@ -335,7 +335,7 @@ bool TImport_app::importa_clienti(const TFilename& fname, TLog_report& log) cons
|
|||||||
return done;
|
return done;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TImport_app::importa_fatture(const TFilename& fname, TLog_report& log) const
|
bool TImport_app::importa_fatture(const TFilename& fname, const TString& codnum, TLog_report& log) const
|
||||||
{
|
{
|
||||||
TString str = TR("Importazione documenti");
|
TString str = TR("Importazione documenti");
|
||||||
log.log(0, str);
|
log.log(0, str);
|
||||||
@ -346,6 +346,8 @@ bool TImport_app::importa_fatture(const TFilename& fname, TLog_report& log) cons
|
|||||||
fat.load_file(fname);
|
fat.load_file(fname);
|
||||||
|
|
||||||
long ndocs = 0;
|
long ndocs = 0;
|
||||||
|
long mindoc = 0;
|
||||||
|
long maxdoc = 0;
|
||||||
|
|
||||||
bool done = true;
|
bool done = true;
|
||||||
|
|
||||||
@ -402,12 +404,14 @@ bool TImport_app::importa_fatture(const TFilename& fname, TLog_report& log) cons
|
|||||||
um = cache().get(LF_UMART, str, UMART_UM);
|
um = cache().get(LF_UMART, str, UMART_UM);
|
||||||
}
|
}
|
||||||
|
|
||||||
TDocumento doc('D', datadoc.year(), "F01", ndoc);
|
TDocumento doc('D', datadoc.year(), codnum, 0);
|
||||||
|
|
||||||
doc.put(DOC_TIPOCF, 'C');
|
doc.put(DOC_TIPOCF, 'C');
|
||||||
doc.put(DOC_CODCF, codcf);
|
doc.put(DOC_CODCF, codcf);
|
||||||
doc.put(DOC_DATADOC, datadoc);
|
doc.put(DOC_DATADOC, datadoc);
|
||||||
|
doc.put(DOC_DOC1, ndoc);
|
||||||
doc.put(DOC_CODPAG, codpag);
|
doc.put(DOC_CODPAG, codpag);
|
||||||
|
doc.put(DOC_STATO, 1);
|
||||||
|
|
||||||
str = fat.get(22).as_string();
|
str = fat.get(22).as_string();
|
||||||
str.right_just(20, '0');
|
str.right_just(20, '0');
|
||||||
@ -434,17 +438,22 @@ bool TImport_app::importa_fatture(const TFilename& fname, TLog_report& log) cons
|
|||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
{
|
{
|
||||||
ndocs++;
|
ndocs++;
|
||||||
|
maxdoc = doc.get_long(DOC_NDOC);
|
||||||
|
if (ndocs == 1)
|
||||||
|
mindoc = maxdoc;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
str.format("Impossibile registrare il documento %ld alla riga %ld", ndoc, fat.current_row()+1);
|
str.format("Impossibile registrare il documento %s/%ld alla riga %ld",
|
||||||
|
(const char*)codnum, ndoc, fat.current_row()+1);
|
||||||
log.log(2, str);
|
log.log(2, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
log.log(0, str.cut(0));
|
log.log(0, str.cut(0));
|
||||||
str << TR("Sono stati importati/aggiornati ") << ndocs << TR(" documenti");
|
str << TR("Sono stati importati/aggiornati ") << ndocs << TR(" documenti ") << codnum
|
||||||
|
<< TR(" dal ") << mindoc << TR(" al ") << maxdoc;
|
||||||
log.log(0, str);
|
log.log(0, str);
|
||||||
|
|
||||||
return done;
|
return done;
|
||||||
@ -462,9 +471,10 @@ void TImport_app::main_loop()
|
|||||||
fname.add(mask.get(F_CLI));
|
fname.add(mask.get(F_CLI));
|
||||||
if (importa_clienti(fname, log))
|
if (importa_clienti(fname, log))
|
||||||
{
|
{
|
||||||
|
const TString& codnum = mask.get(F_NUM);
|
||||||
fname = mask.get(F_DIR);
|
fname = mask.get(F_DIR);
|
||||||
fname.add(mask.get(F_FAT));
|
fname.add(mask.get(F_FAT));
|
||||||
importa_fatture(fname, log);
|
importa_fatture(fname, codnum, log);
|
||||||
}
|
}
|
||||||
|
|
||||||
log.preview();
|
log.preview();
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
#define F_DIR 101
|
#define F_DIR 101
|
||||||
#define F_CLI 102
|
#define F_CLI 102
|
||||||
#define F_FAT 103
|
#define F_FAT 103
|
||||||
|
#define F_NUM 104
|
@ -23,6 +23,18 @@ BEGIN
|
|||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRING F_NUM 4
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 4 "Codice numerazione fatture "
|
||||||
|
USE %NUM
|
||||||
|
INPUT CODTAB F_NUM
|
||||||
|
DISPLAY "Codice" CODTAB
|
||||||
|
DISPLAY "Descrizione@50" S0
|
||||||
|
OUTPUT F_NUM CODTAB
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
STRING DLG_PROFILE 256 50
|
STRING DLG_PROFILE 256 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 4 "Profilo "
|
PROMPT 1 4 "Profilo "
|
||||||
|
@ -7,13 +7,10 @@ int main(int argc, char** argv)
|
|||||||
int n = argc > 1 ? atoi(argv[1]+1) : 0;
|
int n = argc > 1 ? atoi(argv[1]+1) : 0;
|
||||||
switch(n)
|
switch(n)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
ps0872100(argc, argv); break; //Stampa Listini RealPlast
|
|
||||||
case 1:
|
case 1:
|
||||||
ps0872200(argc, argv); break; //Stampa Produzione RealPlast
|
ps0872200(argc, argv); break; //Stampa Produzione RealPlast
|
||||||
default:
|
default:
|
||||||
ps0872100(argc, argv); break;
|
ps0872100(argc, argv); break; //Stampa Listini RealPlast
|
||||||
}
|
}
|
||||||
exit(0);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -11,6 +11,5 @@ int main(int argc, char** argv)
|
|||||||
default:
|
default:
|
||||||
ps0925100(argc, argv); break; //Stampa ordini di produzione DBService
|
ps0925100(argc, argv); break; //Stampa ordini di produzione DBService
|
||||||
}
|
}
|
||||||
exit(0);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user