Trasferimento campo MESELIQ ed eliminazione fremove

git-svn-id: svn://10.65.10.50/trunk@6219 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1998-02-18 09:44:55 +00:00
parent 4d88f8c9d8
commit c2eaad0601
16 changed files with 126 additions and 56 deletions

View File

@ -53,8 +53,9 @@
#define F_CAMBIOINTRA 142
#define F_STAMPATO 143
#define F_REGST 144
#define F_ADJUST_PRORATA 145
#define F_EASYDOC 146
#define F_DIFFERITA 145
#define F_ADJUST_PRORATA 146
#define F_EASYDOC 147
#define F_SHEETCG 190
#define F_SHEETIVA 191

View File

@ -36,7 +36,7 @@ class TMovimentoPN : public TRelation
// @DPRIV
TRecord_array _cg, _iva;
TDate _olddate;
TDate _olddataliq;
// @END
protected:

View File

@ -1,2 +1,54 @@
#include <default.url>
MENU TASK_MENUBAR
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(1)
MENU MENU_BAR(1)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(2)
MENU MENU_BAR(2)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(3)
MENU MENU_BAR(3)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(4)
MENU MENU_BAR(4)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(5)
MENU MENU_BAR(5)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(6)
MENU MENU_BAR(6)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(7)
MENU MENU_BAR(7)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(8)
MENU MENU_BAR(8)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(9)
MENU MENU_BAR(9)
SUBMENU MENU_FILE "~File"
MENUBAR MENU_BAR(10)
MENU MENU_BAR(10)
SUBMENU MENU_FILE "~File"

View File

@ -91,7 +91,7 @@ bool TRic_auto::main_loop()
TFilename dirtemp;
dirtemp.tempdir();
dirtemp << "cg6700.mbx";
fremove(dirtemp);
::remove(dirtemp);
if (!subj)
return FALSE;
@ -117,7 +117,7 @@ bool TRic_auto::main_loop()
TString trasf;
trasf = _tras_file->path(_ditta);
trasf << "\\trasfer";
fremove(trasf);
::remove(trasf);
TConfig conf (CONFIG_DITTA); // Inizializzo stato trasferimento
conf.set("FlStTra"," "); // dei parametri ditta
message_box("Il trasferimento e' stato INTERAMENTE COMPLETATO");
@ -165,7 +165,7 @@ bool TRic_auto::controlli_preliminari()
TString trasf;
trasf = _tras_file->path(_ditta);
trasf << "\\trasfer";
fremove(trasf);
::remove(trasf);
TConfig conf (CONFIG_DITTA); // Inizializzo stato trasferimento
conf.set("FlStTra"," "); // dei parametri ditta
}
@ -377,7 +377,7 @@ bool TRic_auto::destroy()
header = _tras_file->path(_ditta);
header << HEADER;
fremove(header);
::remove(header);
}
return TApplication::destroy();

View File

@ -344,21 +344,21 @@ bool TRic_archivi::main_loop()
{
trasfer2tempfile();
_tras_file->close(); // Chiude il trasfer letto dalla directory della ditta
fremove(_trasf);
::remove(_trasf);
TString80 tab = _tras_file->path(_dittaric);
TString tabcdx = tab;
TString tabdbf = tab;
tabcdx << "\\ttab.cdx";
tabdbf << "\\ttab.dbf";
fremove(tabcdx);
fremove(tabdbf);
::remove(tabcdx);
::remove(tabdbf);
}
else
if (_scelta == 'P')
{
trasfer2tempfile();
_tras_file->close(); // Chiude il trasfer letto dalla directory della ditta
fremove(_trasf);
::remove(_trasf);
}
}
else
@ -439,14 +439,14 @@ bool TRic_archivi::main_loop()
set_flag();
aggiorna_tabella();
_tras_file->close(); // Chiude il trasfer letto dalla directory della ditta
fremove(_trasf);
::remove(_trasf);
TString80 tab = _tras_file->path(_dittaric);
TString tabcdx = tab;
TString tabdbf = tab;
tabcdx << "\\ttab.cdx";
tabdbf << "\\ttab.dbf";
fremove(tabcdx);
fremove(tabdbf);
::remove(tabcdx);
::remove(tabdbf);
}
delete msk;
}
@ -527,7 +527,7 @@ bool TRic_archivi::main_loop()
set_flag();
aggiorna_tabella();
_tras_file->close(); // Chiude il trasfer letto dalla directory della ditta
fremove(_trasf);
::remove(_trasf);
}
delete msk;
}

View File

@ -1652,7 +1652,7 @@ bool TRic_tab::controllo_pre_ricezione()
{
flag = "*";
setta_parametri_record(sigla,flag);
fremove(_trasf);
::remove(_trasf);
return FALSE;
}

View File

@ -3238,7 +3238,7 @@ bool TRic_ListaMov::set_print(int m)
}
if (_sdt == '*')
fremove(_pathfile);
::remove(_pathfile);
setta_parametri(" ", "C");

View File

@ -193,7 +193,7 @@ bool TDitta_ric::controlli()
TString str;
str.spaces(60);
_control_rec.overwrite(str,241);
fremove(_trasf);
::remove(_trasf);
setta_parametri_record(""," ",FALSE);
}
}

View File

@ -180,7 +180,7 @@ bool TInv_cont::main_loop()
_trasf = "";
_trasf = firm2dir(0);
_trasf << "\\trasfer";
fremove(_trasf);
::remove(_trasf);
_tras_file.open(_trasf,TRUE);
// if (std != "D")
@ -279,7 +279,7 @@ bool TInv_cont::main_loop()
_trasf = "";
_trasf = firm2dir(0);
_trasf << "\\trasfer";
fremove(_trasf);
::remove(_trasf);
_tras_file.open(_trasf,TRUE);
invio_contabilita_PC(); //Costruisce il trasfer nella directory comune
@ -373,11 +373,11 @@ bool TInv_cont::main_loop()
}
_tras_file.remove_all(FALSE);
fremove(_marker);
::remove(_marker);
_trasf = "";
_trasf = firm2dir(0);
_trasf << "\\trasfer";
fremove(_trasf);
::remove(_trasf);
delete msk;
return FALSE;

View File

@ -1422,6 +1422,18 @@ bool TInv_cont::invio_mov_IVA()
negPC2negAS(corrval);
str.format("%014s", (const char*) corrval);
record.overwrite(str,160); //Corrispettivo in valuta
_tmov->setkey(1);
_tmov->put(MOV_NUMREG, nreg);
if (_tmov->read() == NOERR)
{
int meseliq = _tmov->get_int(MOV_MESELIQ);
if (meseliq > 0)
{
str.format("%02d", meseliq);
record.overwrite(str, 174);
}
}
_numrec_iva++;

View File

@ -1088,6 +1088,18 @@ void TInv_cont::invio_righe_IVA()
str.format("%03d", rigaiva);
record.overwrite(str,113);
_tmov->setkey(1);
_tmov->put(MOV_NUMREG, nreg);
if (_tmov->read() == NOERR)
{
const int meseliq = _tmov->get_int(MOV_MESELIQ);
if (meseliq > 0)
{
str.format("%02d", meseliq);
record.overwrite(str, 116);
}
}
_numrec_iva++;
_tras_file.write_control_rec(record,size);

View File

@ -24,8 +24,7 @@ bool TCanc_file_invio::set()
marker = firm2dir(0);
marker << "\\marker";
fremove(marker);
::remove(marker);
message_box("Eliminazione file di lavoro dell' invio terminata");

View File

@ -1,5 +1,4 @@
// cglib04.cpp
#include <stdlib.h>
#include <codeb.h>
@ -24,12 +23,6 @@ const int RIC_SIZE = 512;
HIDDEN char _isam_string[RIC_SIZE];
HIDDEN char __dep[LEN_REC_HEAD];
#if XVT_OS == XVT_OS_WIN
#include <io.h>
int fremove(const char* path)
{ return _unlink(path); }
#endif
//ritorna falso se la causale non e' significativa
bool look_causale (const char* codcaus)
{
@ -391,14 +384,14 @@ void TTransfer_file::remove_all(bool file_ditta)
}
if (fexist(trasfer))
fremove(trasfer);
::remove(trasfer);
open(dir,FALSE);
read_control_rec();
sigle = sigle_file();
sigle.trim();
close();
fremove(dir); // Rimuove l'header
::remove(dir); // Rimuove l'header
dir = "";
if (file_ditta)
{
@ -417,85 +410,85 @@ void TTransfer_file::remove_all(bool file_ditta)
{
TString80 path;
path << dir << "\\tcaus.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tcaus.cdx";
fremove(path);
::remove(path);
path = "";
path << dir << "\\trcaus.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\trcaus.cdx";
fremove(path);
::remove(path);
}
if (sigla == 'A')
{
TString80 path;
path << dir << "\\tclifo.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tclifo.cdx";
fremove(path);
::remove(path);
}
if (sigla == 'P')
{
TString80 path;
path << dir << "\\tpcon.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tpcon.cdx";
fremove(path);
::remove(path);
}
if (sigla == 'Z')
{
TString80 path;
path << dir << "\\tmov.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tmov.cdx";
fremove(path);
::remove(path);
path = "";
path << dir << "\\trmov.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\trmov.cdx";
fremove(path);
::remove(path);
}
if (sigla == 'U')
{
TString80 path;
path << dir << "\\trmoviva.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\trmoviva.cdx";
fremove(path);
::remove(path);
path = "";
path << dir << "\\toccas.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\toccas.cdx";
fremove(path);
::remove(path);
}
if (sigla == 'B')
{
TString80 path;
path << dir << "\\tpart.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tpart.cdx";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tscad.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tscad.cdx";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tpagsca.dbf";
fremove(path);
::remove(path);
path = "";
path << dir << "\\tpagsca.cdx";
fremove(path);
::remove(path);
}
}
}

View File

@ -60,7 +60,6 @@ int pack(bool vis, int num, TString& name);
int packfile(bool vis, int num, TString& name);
//const char* converti(TString& data);
int fremove(const char* path);
bool look_causale(const char* codcaus);
bool format_if_zero(TString&, int);

View File

@ -229,6 +229,7 @@ U1|52|109|126|||||
U1|53|127|131|||||
U1|54|132|133|||||
U1|56|87|108|||||
U1|57|175|176|23|MESELIQ|||
#
# Tracciato Partite in caso di Fattura
#

View File

@ -195,6 +195,7 @@ U1|11|102|104|25|CONTO|||
U1|12|105|110|25|SOTTOCONTO|||
U1|13|111|113|25|RIGAIMP|||
U1|14|114|116|25|RIGAIVA|||
U1|15|117|118|23|MESELIQ|||
B1|1|3|3|28|TIPOC|||
B1|2|4|6|28|GRUPPO|||
B1|3|7|9|28|CONTO|||