Patch level : 10.0
Files correlati : cg2100a.msk Ricompilazione Demo : [ ] Commento : cg2100a.msk Rese simmetriche ricerche per codice e descrizione delle causali in maschera di query di prima nota. cg6400b.msk cg6900b.msk Rimodernato aspetto maschere trasferimento PC cg6.exe 0001575: 002240 - casa primaria di Brescia Ordine Canossiane - invio contabilità Il numeratore degli invii, una volta arrivato a 999 riparte da 0, in fase di ripristino viene quindi segnalato errore, bisognerebbe che dopo 999 si rifaccesse l'invio n. 1 git-svn-id: svn://10.65.10.50/trunk@20221 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
64cbcd1804
commit
4f1759b6d7
@ -94,6 +94,10 @@ BEGIN
|
||||
DISPLAY "Codice" CODCAUS
|
||||
DISPLAY "Tipo" TIPODOC
|
||||
DISPLAY "Registro" REG
|
||||
DISPLAY "SC" TIPOMOV
|
||||
DISPLAY "CA" MOVIND
|
||||
DISPLAY "CE" COLLCESP
|
||||
DISPLAY "770" M770
|
||||
COPY OUTPUT F_CODCAUS
|
||||
ADD RUN cg0 -4
|
||||
END
|
||||
|
27
cg/cg6.cpp
27
cg/cg6.cpp
@ -8,24 +8,15 @@ int main(int argc,char** argv)
|
||||
|
||||
switch(n)
|
||||
{
|
||||
case 0:
|
||||
cg6100(argc, argv); break; // Ricezione automatica
|
||||
case 2:
|
||||
cg6300(argc, argv); break; // Tabelle
|
||||
case 3:
|
||||
cg6400(argc, argv); break; // Ricezione archivi
|
||||
case 4:
|
||||
cg6500(argc, argv); break; // Tabelle
|
||||
case 5:
|
||||
cg6600(argc, argv); break; // Ricezione <T>abelle e <M>ovimenti
|
||||
case 6:
|
||||
cg6700(argc, argv); break; // Lista controllo movimenti
|
||||
case 7:
|
||||
cg6800(argc, argv); break;
|
||||
case 8:
|
||||
cg6900(argc, argv); break; // Invio archivi
|
||||
default:
|
||||
break;
|
||||
case 0: cg6100(argc, argv); break; // Ricezione automatica
|
||||
case 2: cg6300(argc, argv); break; // Tabelle
|
||||
case 3: cg6400(argc, argv); break; // Ricezione archivi
|
||||
case 4: cg6500(argc, argv); break; // Tabelle
|
||||
case 5: cg6600(argc, argv); break; // Ricezione <T>abelle e <M>ovimenti
|
||||
case 6: cg6700(argc, argv); break; // Lista controllo movimenti
|
||||
case 7: cg6800(argc, argv); break;
|
||||
case 8: cg6900(argc, argv); break; // Invio archivi
|
||||
default: break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ bool TRic_archivi::create()
|
||||
_pagsca = new TLocalisamfile (LF_PAGSCA);
|
||||
|
||||
_numdisk = 1;
|
||||
_prima_volta = TRUE;
|
||||
_prima_volta = true;
|
||||
_nultras = 0;
|
||||
_nultras_tab = 0;
|
||||
_baipassa = false;
|
||||
@ -196,10 +196,10 @@ bool TRic_archivi::leggi_marker()
|
||||
{
|
||||
message_box(FR("Il dischetto inserito (%d) non rispecchia la giusta sequenza (%d)"), _numdisk, _progdisk);
|
||||
_sequenza = false;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
_sequenza = TRUE;
|
||||
_sequenza = true;
|
||||
|
||||
_nomeid = buffer.sub(0,10);
|
||||
_dittainv = atol(buffer.sub(10,14));
|
||||
@ -235,7 +235,7 @@ bool TRic_archivi::leggi_marker()
|
||||
(const char*)_nomeid, _dittainv);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -267,10 +267,10 @@ bool TRic_archivi::leggi_marker_rep()
|
||||
{
|
||||
message_box(FR("Il dischetto inserito (%d) non rispecchia la giusta sequenza (%d)"), _numdisk, _progdisk);
|
||||
_sequenza = false;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
_sequenza = TRUE;
|
||||
_sequenza = true;
|
||||
|
||||
if (letti == 0)
|
||||
return error_box(TR("Impossibile leggere il file MARKER: %s"), (const char*)_marker);
|
||||
@ -280,7 +280,7 @@ bool TRic_archivi::leggi_marker_rep()
|
||||
_totrectras = atol(buffer.sub(26,32));
|
||||
_numinv = atoi(buffer.sub(15,18));
|
||||
TString16 tmp = buffer.sub(18,26);
|
||||
_datatras = converti(tmp,TRUE);
|
||||
_datatras = converti(tmp,true);
|
||||
|
||||
if (_numdisk > 1) //Va fatto solo dal disco 2 in poi
|
||||
if (_nomeid != _nomeidp || _dittainv != _dittainvp || _totrectras != _totrectrasp
|
||||
@ -307,7 +307,7 @@ bool TRic_archivi::leggi_marker_rep()
|
||||
(const char*)_nomeid, _dittainv);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return error_box(FR("Impossibile accedere al file %s"), (const char*)_marker);
|
||||
@ -507,32 +507,24 @@ void TRic_archivi::leggi_trasfer(const char* nome)
|
||||
|
||||
int TRic_archivi::controllo_ripartenza()
|
||||
{
|
||||
TString std;
|
||||
bool flag = false;
|
||||
int var = 0;
|
||||
|
||||
set_firm(_dittaric);
|
||||
|
||||
TString trasfer;
|
||||
trasfer = _tras_file->path(_dittaric);
|
||||
TFilename trasfer = _tras_file->path(_dittaric);
|
||||
trasfer << HEADER;
|
||||
|
||||
_tras_file->open(trasfer);
|
||||
|
||||
TConfig conf(CONFIG_DITTA);
|
||||
std = conf.get("FlStTra");
|
||||
const TString4 std = ini_get_string(CONFIG_DITTA, "cg", "FlStTra");
|
||||
const bool flag = _tras_file->read_control_rec();
|
||||
|
||||
if (_tras_file->read_control_rec())
|
||||
flag = TRUE;
|
||||
|
||||
if (std == "" && flag)
|
||||
int var = 0;
|
||||
if (std.empty() && flag)
|
||||
var = 1;
|
||||
|
||||
if (std == "*" && flag)
|
||||
{
|
||||
TString ult_file = _tras_file->ult_file();
|
||||
TString key = _tras_file->key();
|
||||
if (ult_file != "" || key != "")
|
||||
const TString16 ult_file = _tras_file->ult_file();
|
||||
const TString16 key = _tras_file->key();
|
||||
if (ult_file.full() || key.full())
|
||||
var = 1;
|
||||
}
|
||||
|
||||
@ -547,12 +539,13 @@ int TRic_archivi::controllo_ripartenza()
|
||||
bool TRic_archivi::ripartenza()
|
||||
{
|
||||
if (_stato_ripartenza == 1)
|
||||
return error_box(TR("Rilevato stato di RIPARTENZA CON DATI CONTRADDITORI: procedura interrotta"));
|
||||
return error_box(TR("Rilevato stato di RIPARTENZA CON DATI CONTRADDITORI:\n"
|
||||
"presente file HEADER nei dati ditta e FlgStTra=* o nullo"));
|
||||
|
||||
if (_stato_ripartenza == 2)
|
||||
return error_box(TR("Trasferimento precedente NON COMPLETATO: completarlo prima di questo"));
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TRic_archivi::video_ripartenza()
|
||||
@ -611,7 +604,7 @@ bool TRic_archivi::video_ripartenza()
|
||||
return false;
|
||||
|
||||
if (_baipassa)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (!ripartenza())
|
||||
return false;
|
||||
@ -624,21 +617,21 @@ bool TRic_archivi::video_ripartenza()
|
||||
warning_box(FR("I dischetti risultano GIA' TRASFERITI.\n"
|
||||
"Numero invio n. %d, ultimo trasferimento n. %d."), _numinv, _nultras_tab);
|
||||
else
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
while (tasto == K_ENTER);
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TRic_archivi::baipassa(TMask& m,KEY k)
|
||||
{
|
||||
if ( (k == K_SHIFT+K_F7) && (app()._stato_ripartenza == 0) )
|
||||
app()._baipassa = TRUE;
|
||||
app()._baipassa = true;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TRic_archivi::ripristina_trasfer()
|
||||
@ -672,7 +665,7 @@ long TRic_archivi::leggi_tabella_tras()
|
||||
{
|
||||
long ditta = 0;
|
||||
|
||||
TTable tab_tra ("%TRA");
|
||||
TTable tab_tra("%TRA");
|
||||
TString16 dep; dep.format("%10s%05ld", (const char*)_nomeid, _dittainv);
|
||||
tab_tra.put("CODTAB", dep);
|
||||
if (tab_tra.read() == NOERR)
|
||||
@ -812,7 +805,7 @@ bool TRic_archivi::set_flag()
|
||||
|
||||
conf.set("FlStTra", flag);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void TRic_archivi::aggiorna_tabella()
|
||||
@ -823,7 +816,7 @@ void TRic_archivi::aggiorna_tabella()
|
||||
tab_tra.put("CODTAB", dep);
|
||||
if (tab_tra.read() == NOERR)
|
||||
{
|
||||
tab_tra.put("I1", (long)_nultras);
|
||||
tab_tra.put("I1", _nultras);
|
||||
tab_tra.put("D0", _dataultras);
|
||||
tab_tra.rewrite();
|
||||
}
|
||||
|
@ -1,16 +1,10 @@
|
||||
#include "cg6400.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
#include <stdbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "" 0 2 0 0
|
||||
PAGE "Ricezione" -1 -1 65 4
|
||||
|
||||
LIST F_DRIVE 2
|
||||
BEGIN
|
||||
PROMPT 2 2 "Disco "
|
||||
PROMPT 1 1 "Disco "
|
||||
ITEM "A:|A:"
|
||||
ITEM "B:|B:"
|
||||
ITEM "C:|C:"
|
||||
@ -19,11 +13,15 @@ BEGIN
|
||||
ITEM "F:|F:"
|
||||
END
|
||||
|
||||
STRING F_PATHNAME 30
|
||||
STRING F_PATHNAME 260 50
|
||||
BEGIN
|
||||
PROMPT 2 4 "Indirizzario "
|
||||
PROMPT 1 2 "Cartella "
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
#include <stdbar.h>
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
138
cg/cg6600.cpp
138
cg/cg6600.cpp
@ -1,29 +1,19 @@
|
||||
// Ricezione dati da sistema
|
||||
|
||||
#include <applicat.h>
|
||||
#include <config.h>
|
||||
#include <mask.h>
|
||||
#include <tabutil.h>
|
||||
#include <prefix.h>
|
||||
#include <progind.h>
|
||||
|
||||
#include "cglib01.h"
|
||||
#include "cglib02.h"
|
||||
#include "cglib04.h"
|
||||
#include "cgsaldac.h"
|
||||
|
||||
#include "cg6600.h"
|
||||
|
||||
#include <applicat.h>
|
||||
#include <mask.h>
|
||||
#include <tabutil.h>
|
||||
#include <progind.h>
|
||||
|
||||
#include <comuni.h>
|
||||
#include <causali.h>
|
||||
#include <clifo.h>
|
||||
#include <mov.h>
|
||||
#include <nditte.h>
|
||||
#include <rcausali.h>
|
||||
#include <rmov.h>
|
||||
#include <rmoviva.h>
|
||||
#include <occas.h>
|
||||
#include <pconti.h>
|
||||
|
||||
class TRic_tab : public TSkeleton_application
|
||||
{
|
||||
@ -53,6 +43,7 @@ class TRic_tab : public TSkeleton_application
|
||||
|
||||
protected:
|
||||
void genera_codice_occasionale(TString& ocfpi);
|
||||
bool tmp_test_box(const char* fname) const;
|
||||
|
||||
public:
|
||||
TString _titolo;
|
||||
@ -296,6 +287,17 @@ void TRic_tab::main_loop()
|
||||
}
|
||||
}
|
||||
|
||||
bool TRic_tab::tmp_test_box(const char* fname) const
|
||||
{
|
||||
TFilename tmp = get_firm_dir();
|
||||
tmp.add(fname);
|
||||
tmp.ext("dbf");
|
||||
const bool ok = tmp.exist();
|
||||
if (!ok)
|
||||
cantread_box(tmp);
|
||||
return ok;
|
||||
}
|
||||
|
||||
void TRic_tab::trasferimento()
|
||||
{
|
||||
int last_tab = 0;
|
||||
@ -317,7 +319,7 @@ void TRic_tab::trasferimento()
|
||||
for (int i = posiz; i < last_tab;i++)
|
||||
{
|
||||
const long numero = atol(_record.mid( ((i * 6) + 95),6));
|
||||
if (numero == 0) // Numero di records totali del tipo atteso
|
||||
if (numero <= 0) // Numero di records totali del tipo atteso
|
||||
continue;
|
||||
const long nrec = _tras_file.nrec(i)+1; // Numero di records presenti (< numero)
|
||||
sigla = _tras_file.name(i)[0];
|
||||
@ -326,64 +328,84 @@ void TRic_tab::trasferimento()
|
||||
switch (sigla)
|
||||
{
|
||||
case 'W':
|
||||
message = TR("Ricezione tabella causali in corso... Prego attendere.");
|
||||
cicli = _tcaus->items();
|
||||
if (_tcaus != NULL)
|
||||
{
|
||||
message = TR("Ricezione tabella causali");
|
||||
cicli = _tcaus->items();
|
||||
}
|
||||
else
|
||||
{
|
||||
error_box(FR("Sono presenti %ld record causali non dichiarati nel record di controllo."), numero);
|
||||
tmp_test_box(TEMP_CAUS);
|
||||
}
|
||||
break;
|
||||
case 'A':
|
||||
if (_tclifo != NULL)
|
||||
{
|
||||
message = TR("Ricezione anagrafica Clienti / Fornitori in corso... Prego attendere.");
|
||||
message = TR("Ricezione anagrafica Clienti / Fornitori");
|
||||
cicli = _tclifo->items();
|
||||
}
|
||||
else
|
||||
{
|
||||
error_box("Sono presenti %ld record clienti/fornitori non dichirati nel record di controllo", numero);
|
||||
cicli = 0;
|
||||
error_box(FR("Sono presenti %ld record clienti/fornitori non dichiarati nel record di controllo"), numero);
|
||||
tmp_test_box(TEMP_CLIFO);
|
||||
}
|
||||
break;
|
||||
case 'P':
|
||||
message = TR("Ricezione anagrafica Piano dei Conti in corso... Prego attendere.");
|
||||
cicli = _tpcon->items();
|
||||
if (_tpcon != NULL)
|
||||
{
|
||||
message = TR("Ricezione anagrafica Piano dei Conti");
|
||||
cicli = _tpcon->items();
|
||||
}
|
||||
else
|
||||
{
|
||||
error_box("Sono presenti %ld record piano dei conti non dichiarati nel record di controllo", numero);
|
||||
tmp_test_box(TEMP_PCON);
|
||||
}
|
||||
break;
|
||||
case 'Z':
|
||||
message = TR("Ricezione Movimenti di primanota in corso... Prego attendere.");
|
||||
message = TR("Ricezione Movimenti di primanota");
|
||||
cicli = _tmov->items();
|
||||
break;
|
||||
case 'U':
|
||||
message = TR("Ricezione Movimenti iva in corso... Prego attendere.");
|
||||
message = TR("Ricezione Movimenti iva");
|
||||
cicli = _tmov->items();
|
||||
break;
|
||||
case 'B':
|
||||
message = TR("Ricezione Movimenti saldaconto in corso... Prego attendere.");
|
||||
message = TR("Ricezione Movimenti saldaconto");
|
||||
cicli = _tpart->items();
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
_prog = new TProgind(cicli,message,FALSE);
|
||||
|
||||
if (_scelta == 'T')
|
||||
{
|
||||
switch(sigla)
|
||||
{
|
||||
case 'W': ricevi_causali(key,sigla); break;
|
||||
case 'A': ricevi_clifo(key,sigla); break;
|
||||
case 'P': ricevi_pcon(key,sigla); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (_scelta == 'M')
|
||||
{
|
||||
|
||||
if (cicli > 0)
|
||||
{
|
||||
_prog = new TProgind(cicli,message,FALSE);
|
||||
|
||||
if (_scelta == 'T')
|
||||
{
|
||||
switch(sigla)
|
||||
{
|
||||
case 'Z': ricevi_movPN(key,sigla); _sld.registra(); break;
|
||||
case 'U': ricevi_movIVA(key,sigla); break;
|
||||
case 'B': ricevi_movSC(key,sigla); break;
|
||||
case 'W': ricevi_causali(key,sigla); break;
|
||||
case 'A': ricevi_clifo(key,sigla); break;
|
||||
case 'P': ricevi_pcon(key,sigla); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
delete _prog;
|
||||
key = ""; //Altrimenti in caso di ripartenza mi ripristina sempre la situazione
|
||||
}
|
||||
else
|
||||
if (_scelta == 'M')
|
||||
{
|
||||
switch(sigla)
|
||||
{
|
||||
case 'Z': ricevi_movPN(key,sigla); _sld.registra(); break;
|
||||
case 'U': ricevi_movIVA(key,sigla); break;
|
||||
case 'B': ricevi_movSC(key,sigla); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
delete _prog;
|
||||
key = ""; //Altrimenti in caso di ripartenza mi ripristina sempre la situazione
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1844,28 +1866,28 @@ void TRic_tab::apri_file_temp()
|
||||
{
|
||||
if (_scelta == 'T')
|
||||
{
|
||||
TString80 tmpcaus = "%";
|
||||
TFilename tmpcaus = "%";
|
||||
tmpcaus << get_firm_dir();
|
||||
tmpcaus << "\\" << TEMP_CAUS;
|
||||
_tmpcaus = tmpcaus.mid(1);
|
||||
_tmpcaus << ".dbf";
|
||||
if(_tmpcaus.exist())
|
||||
_tcaus = new TIsamtempfile(LF_CAUSALI, tmpcaus, 0);
|
||||
TString80 tmprcaus = "%";
|
||||
TFilename tmprcaus = "%";
|
||||
tmprcaus << get_firm_dir();
|
||||
tmprcaus << "\\" << TEMP_RCAUS;
|
||||
_tmprcaus = tmprcaus.mid(1);
|
||||
_tmprcaus << ".dbf";
|
||||
if (_tmprcaus.exist())
|
||||
_trcaus = new TIsamtempfile(LF_RCAUSALI, tmprcaus, 0);
|
||||
TString80 tmpclifo = "%";
|
||||
TFilename tmpclifo = "%";
|
||||
tmpclifo << get_firm_dir();
|
||||
tmpclifo << "\\" << TEMP_CLIFO;
|
||||
_tmpclifo = tmpclifo.mid(1);
|
||||
_tmpclifo << ".dbf";
|
||||
if (_tmpclifo.exist())
|
||||
_tclifo = new TIsamtempfile(LF_CLIFO, tmpclifo, 0);
|
||||
TString80 tmppcon = "%";
|
||||
TFilename tmppcon = "%";
|
||||
tmppcon << get_firm_dir();
|
||||
tmppcon << "\\" << TEMP_PCON;
|
||||
_tmpcon = tmppcon.mid(1);
|
||||
@ -1875,49 +1897,49 @@ void TRic_tab::apri_file_temp()
|
||||
}
|
||||
else
|
||||
{
|
||||
TString80 tmpmov = "%";
|
||||
TFilename tmpmov = "%";
|
||||
tmpmov << get_firm_dir();
|
||||
tmpmov << "\\" << TEMP_MOV;
|
||||
_tmpmov = tmpmov.mid(1);
|
||||
_tmpmov << ".dbf";
|
||||
if (_tmpmov.exist())
|
||||
_tmov = new TIsamtempfile(LF_MOV, tmpmov, 0);
|
||||
TString80 tmprmov = "%";
|
||||
TFilename tmprmov = "%";
|
||||
tmprmov << get_firm_dir();
|
||||
tmprmov << "\\" << TEMP_RMOV;
|
||||
_tmprmov = tmprmov.mid(1);
|
||||
_tmprmov << ".dbf";
|
||||
if (_tmprmov.exist())
|
||||
_trmov = new TIsamtempfile(LF_RMOV, tmprmov, 0);
|
||||
TString80 tmpriva = "%";
|
||||
TFilename tmpriva = "%";
|
||||
tmpriva << get_firm_dir();
|
||||
tmpriva << "\\" << TEMP_RMOVIVA;
|
||||
_tmpriva = tmpriva.mid(1);
|
||||
_tmpriva << ".dbf";
|
||||
if (_tmpriva.exist())
|
||||
_triva = new TIsamtempfile(LF_RMOVIVA, tmpriva, 0);
|
||||
TString80 tmpoccas = "%";
|
||||
TFilename tmpoccas = "%";
|
||||
tmpoccas << get_firm_dir();
|
||||
tmpoccas << "\\" << TEMP_OCC;
|
||||
_tmpoccas = tmpoccas.mid(1);
|
||||
_tmpoccas << ".dbf";
|
||||
if (_tmpoccas.exist())
|
||||
_toccas = new TIsamtempfile(LF_OCCAS, tmpoccas, 0);
|
||||
TString80 tmppart = "%";
|
||||
TFilename tmppart = "%";
|
||||
tmppart << get_firm_dir();
|
||||
tmppart << "\\" << TEMP_PART;
|
||||
_tmppart = tmppart.mid(1);
|
||||
_tmppart << ".dbf";
|
||||
if (_tmppart.exist())
|
||||
_tpart = new TIsamtempfile(LF_PARTITE, tmppart, 0);
|
||||
TString80 tmpscad = "%";
|
||||
TFilename tmpscad = "%";
|
||||
tmpscad << get_firm_dir();
|
||||
tmpscad << "\\" << TEMP_SCAD;
|
||||
_tmpscad = tmpscad.mid(1);
|
||||
_tmpscad << ".dbf";
|
||||
if (_tmpscad.exist())
|
||||
_tscad = new TIsamtempfile(LF_SCADENZE, tmpscad, 0);
|
||||
TString80 tmppagsca = "%";
|
||||
TFilename tmppagsca = "%";
|
||||
tmppagsca << get_firm_dir();
|
||||
tmppagsca << "\\" << TEMP_PAGSCA;
|
||||
_tmppagsca = tmppagsca.mid(1);
|
||||
|
112
cg/cg6900.cpp
112
cg/cg6900.cpp
@ -141,7 +141,7 @@ void TInv_cont::main_loop()
|
||||
if (!ripartenza)
|
||||
{
|
||||
crea_marker(*msk); //Crea il record con le informazioni sul marker
|
||||
setta_parametri_record(*msk,"F"); //Aggiorna parametri contabili ditta
|
||||
setta_parametri_record("F"); //Aggiorna parametri contabili ditta
|
||||
setta_tabella_studio(*msk); //Aggiorna la tabella studio per invio
|
||||
setta_tabella_ditta(*msk,"F"); //Aggiorna la tabella ditta per invio
|
||||
crea_record_controllo(*msk); //Crea il record di controllo sul file header
|
||||
@ -258,7 +258,7 @@ void TInv_cont::main_loop()
|
||||
|
||||
setta_tabella_studio(*msk,FALSE); //Aggiorna la tabella studio per invio
|
||||
setta_tabella_ditta(*msk," ",FALSE); //Aggiorna la tabella ditta per invio
|
||||
setta_parametri_record(*msk," "); //Aggiorna parametri contabili ditta
|
||||
setta_parametri_record(" "); //Aggiorna parametri contabili ditta
|
||||
|
||||
_tras_file.open(_header);
|
||||
leggi_record_controllo();
|
||||
@ -354,7 +354,7 @@ void TInv_cont::main_loop()
|
||||
|
||||
setta_tabella_studio(*msk,FALSE); //Aggiorna la tabella studio per invio
|
||||
setta_tabella_ditta(*msk," ",FALSE); //Aggiorna la tabella ditta per invio
|
||||
setta_parametri_record(*msk," "); //Aggiorna parametri contabili ditta
|
||||
setta_parametri_record(" "); //Aggiorna parametri contabili ditta
|
||||
|
||||
_tras_file.open(_header);
|
||||
leggi_record_controllo();
|
||||
@ -559,7 +559,7 @@ void TInv_cont::leggi_record_controllo()
|
||||
|
||||
bool TInv_cont::esiste_tabella_studio()
|
||||
{
|
||||
TTable ins ("%INS");
|
||||
TTable ins("%INS");
|
||||
if (ins.first() == NOERR)
|
||||
{
|
||||
_nome_simbolico = ins.get("S0");
|
||||
@ -569,7 +569,7 @@ bool TInv_cont::esiste_tabella_studio()
|
||||
else
|
||||
return error_box("Codice STUDIO NON ATTIVATO in tabella invii");
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -615,30 +615,31 @@ bool TInv_cont::esegui_controlli()
|
||||
return controlli();
|
||||
}
|
||||
|
||||
void TInv_cont::setta_parametri_record(TMask& m,const TString& flag)
|
||||
void TInv_cont::setta_parametri_record(const TString& flag) const
|
||||
{
|
||||
TConfig conf (CONFIG_DITTA);
|
||||
conf.set("FlStInv", flag);
|
||||
ini_set_string(CONFIG_DITTA, "cg", "FlStInv", flag);
|
||||
}
|
||||
|
||||
bool TInv_cont::controlli()
|
||||
{
|
||||
if (!_esiste_ditta && !_esiste_record)
|
||||
return TRUE; //Mi trovo in una condizione normale
|
||||
|
||||
if (_esiste_ditta && !_esiste_record)
|
||||
return error_box("Rilevato stato di ripartenza con dati contradditori: programma interrotto");
|
||||
return error_box(FR("Rilevato stato di ripartenza con dati contradditori:\n"
|
||||
"Ditta %ld in tabella studio per invio senza record."), _ditta);
|
||||
|
||||
if (!_esiste_ditta && _esiste_record)
|
||||
return error_box("Rilevato stato di ripartenza con dati contradditori: programma interrotto");
|
||||
{
|
||||
return error_box("Rilevato stato di ripartenza con dati contradditori:\n"
|
||||
"esiste un record senza nessuna ditta in %%INS.");
|
||||
}
|
||||
|
||||
if (_esiste_ditta && _esiste_record)
|
||||
{
|
||||
if (!sub_controlli())
|
||||
return error_box("Rilevato stato di ripartenza con dati contradditori: programma interrotto");
|
||||
return error_box(FR("Rilevato stato di ripartenza con dati contradditori:\n"
|
||||
"Ditta %ld in tabella studio per invio con record errato."), _ditta);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true; //Mi trovo in una condizione normale
|
||||
}
|
||||
|
||||
bool TInv_cont::sub_controlli()
|
||||
@ -830,10 +831,12 @@ void TInv_cont::crea_marker(TMask& m)
|
||||
buffer.overwrite(str,10);
|
||||
int num = m.get_int(F_NUMULINV);
|
||||
num++;
|
||||
if (num >= 1000)
|
||||
num = 1;
|
||||
str.format("%03d", num);
|
||||
buffer.overwrite(str,14);
|
||||
TString data (m.get(F_DATALIM));
|
||||
str = riconverti(data,FALSE);
|
||||
TString16 data = m.get(F_DATALIM);
|
||||
str = riconverti(data, false);
|
||||
buffer.overwrite(str,17);
|
||||
}
|
||||
else
|
||||
@ -846,6 +849,8 @@ void TInv_cont::crea_marker(TMask& m)
|
||||
buffer.overwrite(str,10);
|
||||
int num = m.get_int(F_NUMULINV);
|
||||
num++;
|
||||
if (num >= 1000)
|
||||
num = 1;
|
||||
str.format("%03d", num);
|
||||
buffer.overwrite(str,15);
|
||||
TString data (m.get(F_DATALIM));
|
||||
@ -954,14 +959,14 @@ void TInv_cont::setta_tabella_ditta(TMask& m,const char* flag, bool comp)
|
||||
void TInv_cont::crea_record_controllo(TMask& m)
|
||||
{
|
||||
int size = 1024;
|
||||
TString buffer(1024);
|
||||
TString buffer(size);
|
||||
TString str;
|
||||
|
||||
if (_tras_file.exist())
|
||||
_tras_file.open(_header);
|
||||
else
|
||||
{
|
||||
_tras_file.open(_header,TRUE); //Metto il parametro TRUE (che di default e' FALSE), perche' voglio creare un file che non e' ancore esistente
|
||||
_tras_file.open(_header, true); //Metto il parametro TRUE (che di default e' FALSE), perche' voglio creare un file che non e' ancore esistente
|
||||
|
||||
buffer.spaces();
|
||||
buffer.overwrite(" 1",0); //Tipo record
|
||||
@ -974,34 +979,30 @@ void TInv_cont::crea_record_controllo(TMask& m)
|
||||
buffer.overwrite(str,70); //Ditta inviante
|
||||
|
||||
int num = m.get_int(F_NUMULINV);
|
||||
num++;
|
||||
num++;
|
||||
if (num >= 1000)
|
||||
num = 1;
|
||||
str.format("%03d", num);
|
||||
buffer.overwrite(str,75); //Numero progr. invio
|
||||
buffer.overwrite(str,75); // Numero progr. invio
|
||||
|
||||
TString data (m.get(F_DATALIM));
|
||||
str = riconverti(data,TRUE);
|
||||
buffer.overwrite(str,78); //Data limite invio
|
||||
TString16 data (m.get(F_DATALIM));
|
||||
str = riconverti(data, true);
|
||||
buffer.overwrite(str,78); // Data limite invio
|
||||
|
||||
str.format("%-9s", (const char*) _files);
|
||||
str.format("%-9s", (const char*)_files);
|
||||
buffer.overwrite(str,86);
|
||||
|
||||
str = _files.sub(0,1);
|
||||
buffer.overwrite(str,240);
|
||||
|
||||
str = "";
|
||||
str.format("%054d", 0);
|
||||
buffer.overwrite(str,95);
|
||||
|
||||
if (_scelta == 'S')
|
||||
{
|
||||
str.format("%04ld", _dittaAS);
|
||||
buffer.overwrite(str,301);
|
||||
}
|
||||
else
|
||||
{
|
||||
str.format("%05ld", _dittaAS);
|
||||
buffer.overwrite(str,301);
|
||||
}
|
||||
buffer.overwrite(str, 301);
|
||||
|
||||
if (!_tras_file.write_control_rec(buffer, size))
|
||||
warning_box("Il record di controllo del file trasfer non e' stato aggiornato correttamente");
|
||||
@ -1040,36 +1041,16 @@ bool TInv_cont::invio_tempfile(TMask& m)
|
||||
{
|
||||
sigla = _files[i];
|
||||
_numrec = atol(nrec.mid(i * 6,6));
|
||||
|
||||
switch (sigla)
|
||||
{
|
||||
case 'W':
|
||||
causali2tempfile(key,m);
|
||||
break;
|
||||
|
||||
case 'A':
|
||||
clifo2tempfile(key,m);
|
||||
break;
|
||||
|
||||
case 'P':
|
||||
pcon2tempfile(key,m);
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
movPN2tempfile(key,m);
|
||||
break;
|
||||
|
||||
case 'U':
|
||||
movIVA2tempfile(key,m);
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
movSC2tempfile(key,m);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
};
|
||||
case 'W': causali2tempfile(key,m); break;
|
||||
case 'A': clifo2tempfile(key,m); break;
|
||||
case 'P': pcon2tempfile(key,m); break;
|
||||
case 'Z': movPN2tempfile(key,m); break;
|
||||
case 'U': movIVA2tempfile(key,m); break;
|
||||
case 'B': movSC2tempfile(key,m); break;
|
||||
default : break;
|
||||
}
|
||||
key = "";
|
||||
}
|
||||
|
||||
@ -1081,19 +1062,19 @@ bool TInv_cont::invio_tempfile(TMask& m)
|
||||
_tras_file.close();
|
||||
|
||||
setta_tabella_ditta(m,"D",FALSE);
|
||||
setta_parametri_record(m,"D");
|
||||
setta_parametri_record("D");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void TInv_cont::causali2tempfile(TString& key, TMask& m)
|
||||
{
|
||||
int size = 1024;
|
||||
int size = 1024;
|
||||
|
||||
_tras_file.open(_header);
|
||||
|
||||
long items = _caus->items();
|
||||
_prog = new TProgind(items,"Invio tabella causali in corso... Prego attendere.",FALSE);
|
||||
_prog = new TProgind(items, TR("Invio tabella causali in corso"), false);
|
||||
|
||||
_caus->setkey(1);
|
||||
|
||||
@ -1162,7 +1143,7 @@ void TInv_cont::causali2tempfile(TString& key, TMask& m)
|
||||
_tras_file.close();
|
||||
|
||||
// setta_tabella_ditta(m,"D",FALSE);
|
||||
// setta_parametri_record(m,"D");
|
||||
// setta_parametri_record("D");
|
||||
}
|
||||
|
||||
void TInv_cont::cancella_righe_causali(const TString& codcaus)
|
||||
@ -1902,10 +1883,9 @@ int cg6900 (int argc, char* argv[])
|
||||
a.run(argc, argv,TR("Eliminazione file invio"));
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return 0;
|
||||
}
|
@ -86,9 +86,9 @@ public:
|
||||
void chiudi_file_temp();
|
||||
|
||||
void crea_marker(TMask& m);
|
||||
void setta_parametri_record(TMask& m,const TString& flag);
|
||||
void setta_tabella_studio(TMask& m, bool flag_ditta = TRUE);
|
||||
void setta_tabella_ditta(TMask& m, const char* flag, bool comp = TRUE);
|
||||
void setta_parametri_record(const TString& flag) const;
|
||||
void setta_tabella_studio(TMask& m, bool flag_ditta = true);
|
||||
void setta_tabella_ditta(TMask& m, const char* flag, bool comp = true);
|
||||
void crea_record_controllo(TMask& m);
|
||||
|
||||
bool invio_tempfile(TMask& m);
|
||||
|
@ -1,16 +1,10 @@
|
||||
#include "cg6900a.h"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
|
||||
#include <stdbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "" 0 2 0 0
|
||||
PAGE "" -1 -1 62 4
|
||||
|
||||
LIST F_FLOPPY 1 5
|
||||
BEGIN
|
||||
PROMPT 1 1 "Disco "
|
||||
PROMPT 1 1 "Disco "
|
||||
ITEM "A|A:"
|
||||
MESSAGE HIDE,F_PATH
|
||||
MESSAGE ENABLE,F_DIM
|
||||
@ -35,7 +29,7 @@ END
|
||||
|
||||
LIST F_DIM 7
|
||||
BEGIN
|
||||
PROMPT 1 3 "Dimensione dischi "
|
||||
PROMPT 21 1 "Dimensione dischi "
|
||||
ITEM "1|1,4 Mb"
|
||||
ITEM "2|1,2 Mb"
|
||||
ITEM "3|720 Kb"
|
||||
@ -43,11 +37,15 @@ BEGIN
|
||||
HELP "Indicare la dimensione dei dischi che si vogliono usare"
|
||||
END
|
||||
|
||||
STRING F_PATH 30
|
||||
STRING F_PATH 260 50
|
||||
BEGIN
|
||||
PROMPT 1 5 "Indirizzario "
|
||||
PROMPT 1 2 "Cartella "
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
#include <stdbar.h>
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
||||
|
@ -3036,7 +3036,7 @@ bool TTransfer_file::ordina_trasfer(const char* orig)
|
||||
_ttab = new TIsamtempfile(LF_TAB, tmptab, true);
|
||||
|
||||
long cicli = dim_t / sizeT;
|
||||
TProgind prog (cicli,TR("Ordinamento file TRASFER in corso\nPrego attendere"),false, true);
|
||||
TProgind prog (cicli,TR("Ordinamento file TRASFER"),false, true);
|
||||
|
||||
bool ok = true;
|
||||
|
||||
@ -3340,7 +3340,7 @@ void TTransfer_file::scrivi_causali(long nrec)
|
||||
TString buffer(sizeT);
|
||||
bool create = true;
|
||||
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Tabella Causali in corso\nPrego attendere"),false, true, 1);
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Tabella Causali"),false, true, 1);
|
||||
|
||||
TRic_recfield recf (_ttab->curr(), "S0", 0, sizeT);
|
||||
|
||||
@ -3364,7 +3364,7 @@ void TTransfer_file::scrivi_clifo(long nrec)
|
||||
TString buffer(sizeT);
|
||||
bool create = true;
|
||||
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Anagrafica Clienti/Fornitori in corso\nPrego attendere"),false, true, 1);
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Anagrafica Clienti/Fornitori"),false, true, 1);
|
||||
|
||||
TRic_recfield recf (_ttab->curr(), "S0", 0, sizeT);
|
||||
|
||||
@ -3389,7 +3389,7 @@ void TTransfer_file::scrivi_pcon(long nrec)
|
||||
TString buffer(sizeT);
|
||||
bool create = true;
|
||||
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Anagrafica Piano dei Conti in corso\nPrego attendere"),false, true, 1);
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Anagrafica Piano dei Conti"),false, true, 1);
|
||||
|
||||
TRic_recfield recf (_ttab->curr(), "S0", 0, sizeT);
|
||||
|
||||
@ -3412,7 +3412,7 @@ void TTransfer_file::scrivi_PN(long nrec)
|
||||
{
|
||||
TString buffer(sizeT);
|
||||
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Movimenti di Prima nota in corso\nPrego attendere"),false, true, 1);
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Movimenti di Prima nota"),false, true, 1);
|
||||
|
||||
TRic_recfield recf (_ttab->curr(), "S0", 0, sizeT);
|
||||
|
||||
@ -3435,7 +3435,7 @@ void TTransfer_file::scrivi_IVA(long nrec)
|
||||
{
|
||||
TString buffer(sizeT);
|
||||
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Movimenti Iva in corso\nPrego attendere"),false, true, 1);
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Movimenti Iva"),false, true, 1);
|
||||
|
||||
const TRic_recfield recf(_ttab->curr(), "S0", 0, sizeT);
|
||||
|
||||
@ -3462,7 +3462,7 @@ void TTransfer_file::scrivi_SC(long nrec)
|
||||
_annoSC_p = -1;
|
||||
_numpartSC_p = "-1";
|
||||
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Movimenti saldaconto in corso\nPrego attendere"),false, true, 1);
|
||||
_prog = new TProgind (nrec,TR("Trasferimento Movimenti saldaconto"),false, true, 1);
|
||||
|
||||
TRic_recfield recf (_ttab->curr(), "S0", 0, sizeT);
|
||||
|
||||
@ -3605,7 +3605,7 @@ bool TTransfer_file::fcopytemp_PC(const char* orig, const char* dest)
|
||||
|
||||
long dim_t = determina_dimensione(i); //Determina la dimensione del trasfer
|
||||
long cicli = dim_t / size;
|
||||
_prog = new TProgind (cicli,"Elaborazione file TRASFER in corso\nPrego attendere",false, true);
|
||||
_prog = new TProgind (cicli,"Elaborazione file TRASFER",false, true);
|
||||
|
||||
while (ok)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user