From ad35c4e4dc6aaf313b771146f5f20a66b3c3e691 Mon Sep 17 00:00:00 2001 From: ale Date: Wed, 19 Jun 1996 14:04:56 +0000 Subject: [PATCH] Modifica ai programmi di stampa bilancio e stampa bilancio IV cee, riguardo la modifica richiesta da PATRIZIA sul bilancio di verifica per data limite che deve includere se richiesto la quadratura con il libro giornale (cioe' se richiesta quadratura sono considerati anche i movimenti con causale di chiusura), e sul bilancio di verifica all'ultima immissione che deve considerare il saldo finale dei movimenti di chiusura anziche' i progressivi e basta come faceva prima. Inoltre sono state apportate alcune modifiche anche alle maschere dell' invio in base all'errore segnalato da Vladimiro (mancava la possibilita' di scaricare il trasfer su disco fisso). git-svn-id: svn://10.65.10.50/trunk@3027 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg1500.cpp | 38 +++++++++++++++--- cg/cg1500.h | 3 +- cg/cg1500a.uml | 9 ++++- cg/cg1600.cpp | 66 ++++++++++++++++++++++++------ cg/cg1600.h | 1 + cg/cg1600a.uml | 9 ++++- cg/cg6500.cpp | 4 +- cg/cg6900.cpp | 34 +++++++++++----- cg/cg6900.h | 9 +++-- cg/cg6900a.h | 3 +- cg/cg6900b.uml | 27 +++++++++++-- cg/cg6902.cpp | 107 +++++++++++++++++++++++++++++++------------------ cg/cglib01.cpp | 17 +++++--- 13 files changed, 241 insertions(+), 86 deletions(-) diff --git a/cg/cg1500.cpp b/cg/cg1500.cpp index 70cd36a09..9d4c9e655 100755 --- a/cg/cg1500.cpp +++ b/cg/cg1500.cpp @@ -119,7 +119,7 @@ class CG1500_application : public TPrintapp bool _add_file_dare, _prima_volta, _seconda_volta, _totali, _codici, _saldo; bool _add_dare, _add_avere, _controlla, _salto_pagina, _flag, _stampato; bool _sottoc_dare, _sottoc_avere, _salto_pagina1, _livello_conto; - bool _mov_ap; + bool _mov_ap,_quadratura; int _stampa_mov_prov; //TString _causale_ap, _causale_chi; TArray _clienti, _fornitori; @@ -392,6 +392,31 @@ bool mask_datalim (TMask_field& f, KEY k) bool mask_date(TMask_field& f, KEY k) { + if (k == K_TAB) + { + const short id = f.dlg(); + + if (id == F_DATAA) + { + TDate data (f.get()); + int bil = f.mask().get_int(F_BILANCIO); + int anno = date2esc(data); + TTable esc ("ESC"); + + TString dep (format("%04d", anno)); + esc.zero(); + esc.put("CODTAB", dep); + if (esc.read() == NOERR) + { + TDate dataini (esc.get_date("D1")); + if (data == dataini && bil == 2) + f.mask().show(F_QUADRATURA); + else + f.mask().hide(F_QUADRATURA); + } + } + } + if (k == K_ENTER) { const short id = f.dlg(); @@ -1694,9 +1719,10 @@ bool CG1500_application::calcola(int g, int c, long s) TCaus cau (codcaus); if (codcaus.not_empty()) - if (cau.chiusura()) //Si tratta di causale di chiusura - continue; - + if (cau.chiusura()) // Si tratta di causale di chiusura + if (!_quadratura) // Non e' richiesta la quadratura con il Libro Giornale (Modifica + continue; // del 18-06-96 richiesta da Patrizia in seguito alla modifica dei SALDI) + //la causale e' uguale a quella di chiusura //break; @@ -3735,7 +3761,9 @@ bool CG1500_application::set_print(int) _annoes = atoi(m.get(F_ANNO)); _bilancio = atoi(m.get(F_BILANCIO)); _data = m.get(F_DATASTAMPA); - _stampa_mov_prov = m.get_int(F_STAMPAMPROV); + _stampa_mov_prov = m.get_int(F_STAMPAMPROV); + _quadratura = m.get_bool(F_QUADRATURA); + if (_bilancio == 1) { _prog = new TProgind(_pcn->items(),"Elaborazione in corso... prego attendere",FALSE); diff --git a/cg/cg1500.h b/cg/cg1500.h index 42b221dd6..4d8f49821 100755 --- a/cg/cg1500.h +++ b/cg/cg1500.h @@ -20,7 +20,8 @@ #define F_STAMPAC 119 #define F_ORDINAMENTO 120 #define F_MODULO 121 -#define F_STAMPAMPROV 122 +#define F_STAMPAMPROV 122 +#define F_QUADRATURA 123 #endif // __CG1500_H diff --git a/cg/cg1500a.uml b/cg/cg1500a.uml index c0b580866..585ea6689 100755 --- a/cg/cg1500a.uml +++ b/cg/cg1500a.uml @@ -53,7 +53,8 @@ BEGIN MESSAGE HIDE,F_STAMPAV|RESET,F_STAMPAV|HIDE,F_DATADA|RESET,F_DATADA MESSAGE HIDE,F_DATAA|RESET,F_DATAA|HIDE,F_SITUAZIONE|RESET,F_SITUAZIONE MESSAGE HIDE,F_ORDINAMENTO|RESET,F_ORDINAMENTO|HIDE,F_STAMPAC|RESET,F_STAMPAC - MESSAGE HIDE,96|HIDE,97|HIDE,98|HIDE,99 + MESSAGE HIDE,96|HIDE,97|HIDE,98|HIDE,99 + MESSAGE HIDE,F_QUADRATURA //MESSAGE HIDE,F_MODULO|RESET,F_MODULO MESSAGE SHOW,F_STAMPA|K_SPACE,F_STAMPA ITEM "2|Bilancio di verifica" @@ -62,6 +63,7 @@ BEGIN MESSAGE HIDE,F_CODICI|RESET,F_CODICI|HIDE,F_SALDO|RESET,F_SALDO MESSAGE HIDE,F_STAMPAV|RESET,F_STAMPAV MESSAGE SHOW,F_VERIFICA|K_SPACE,F_VERIFICA|SHOW,F_STAMPA1|K_SPACE,F_STAMPA1 + MESSAGE SHOW,F_QUADRATURA //MESSAGE SHOW,F_MODULO|K_SPACE,F_MODULO MESSAGE SHOW,96|SHOW,97|SHOW,98|SHOW,99 END @@ -168,6 +170,11 @@ BEGIN ITEM "2|198 crt." END +BOOLEAN F_QUADRATURA +BEGIN + PROMPT 2 13 "Quadratura con Libro Giornale" +END + BUTTON DLG_OK 9 2 BEGIN PROMPT -12 -1 "" diff --git a/cg/cg1600.cpp b/cg/cg1600.cpp index b5e01f178..12622b6b0 100755 --- a/cg/cg1600.cpp +++ b/cg/cg1600.cpp @@ -309,13 +309,15 @@ class CG1600_application : public TPrintapp real _nuovo_tot_saldo_d, _nuovo_tot_saldo_a; int _i; bool _reset_righe_stampa,_totale_attivita_gia_stampato,_totale_passivita_gia_stampato,_statopatr_no_stamp; - bool _sbilancio_ordine; + bool _sbilancio_ordine, _quadratura; //TString _causale_ap, _causale_chi; public: - TDate _inizioEs, _fineEs; - + TDate _inizioEs, _fineEs; + + int date2esc(const TDate& d, int* prevesc = NULL); + bool menu (MENU_TAG m) { return TPrintapp::menu(m) ; } virtual bool user_create() ; virtual bool user_destroy(); @@ -381,6 +383,24 @@ void CG1600_application::postclose_print() delete _sort; } +int CG1600_application::date2esc(const TDate& d, int* prevesc) +{ + if (prevesc) *prevesc = 0; + TTable esc("ESC"); + for (int err = esc.first(); err == NOERR; err = esc.next()) + { + const TDate ia(esc.get("D0")); // Data inizio esercizio + const TDate fa(esc.get("D1")); // Data fine esercizio + a()._inizioEs = ia; + a()._fineEs = fa; + const anno = esc.get_int("CODTAB"); + if (d >= ia && d <= fa) + return anno; + if (prevesc) *prevesc = anno; + } + return 0; +} + void CG1600_application::set_bil_key(bil_ivd* b, char sezione, char lettera, const char* numero_romano, int numero, bool conti_ordine, int gruppo, int conto, @@ -481,7 +501,7 @@ bool data_limite (TMask_field& f, KEY key) return FALSE; } - int anno = date2esc(datalim); + int anno = a().date2esc(datalim); if (anno == 0) { @@ -530,7 +550,7 @@ bool data_bil_raff (TMask_field& f, KEY key) if (datalim != botime) { - date2esc(datalim); + a().date2esc(datalim); in = a()._inizioEs; } else @@ -539,7 +559,7 @@ bool data_bil_raff (TMask_field& f, KEY key) TString instr = in.string(); if (dataraf != botime) { - anno = date2esc(dataraf); + anno = a().date2esc(dataraf); in_raf = a()._inizioEs; fin_raf = a()._fineEs; a()._anno_esercizio_raf = anno; @@ -630,7 +650,7 @@ bool anno_ese_raff (TMask_field& f, KEY key) if (datalim != botime) { - anno = date2esc(datalim); + anno = a().date2esc(datalim); if (annoraf >= anno) { @@ -780,7 +800,7 @@ bool data_inizio(TMask_field& f, KEY k) return FALSE; } - int anno = date2esc(data); + int anno = a().date2esc(data); if (anno == 0) { @@ -810,7 +830,27 @@ bool data_fine(TMask_field& f, KEY k) data = f.mask().get (F_DATAFINE); data_ini = f.mask().get (F_DATAINI); //a()._anno_esercizio = annoes; - + + if (k == K_TAB) + { + TDate data (f.get()); + int bil = f.mask().get_int(F_TIPOBIL); + int anno = date2esc(data); + TTable esc ("ESC"); + + TString dep (format("%04d", anno)); + esc.zero(); + esc.put("CODTAB", dep); + if (esc.read() == NOERR) + { + TDate dataini (esc.get_date("D1")); + if (data == dataini && bil == 2) + f.mask().show(F_QUADRATURA); + else + f.mask().hide(F_QUADRATURA); + } + } + if (k == K_ENTER) { if (annoes != 0) @@ -839,7 +879,7 @@ bool data_fine(TMask_field& f, KEY k) return FALSE; } - date2esc(data_ini); + a().date2esc(data_ini); TString data3 = a()._inizioEs.string(); TString data4 = a()._fineEs.string(); @@ -1979,7 +2019,8 @@ bool CG1600_application::calcola(int g, int c, long s, if (codcaus.not_empty()) if (cau.chiusura()) //la causale e' uguale a quella di chiusura - continue; + if (!_quadratura) // Non e' richiesta la quadratura con il Libro Giornale (Modifica + continue; // del 18-06-96 richiesta da Patrizia in seguito alla modifica dei SALDI if (_annoese == 0) data = datareg; @@ -2072,7 +2113,8 @@ if (tasto == K_ENTER) _stampacod = (bool)(_msk->get(F_STAMPACOD) == "X"); _stampa_modulo = (bool)(_msk->get(F_STAMPAMODULO) == "X"); _tipo_bilancio = atoi(_msk->get(F_TIPOBIL)); - _stampa_mov_prov = _msk->get_int(F_STAMPAMOVPROV); + _stampa_mov_prov = _msk->get_int(F_STAMPAMOVPROV); + _quadratura = _msk->get_bool(F_QUADRATURA); if (_tipo_bilancio == 1) { _tipo_stampa = atoi(_msk->get(F_TIPOSTAMPA)); diff --git a/cg/cg1600.h b/cg/cg1600.h index 7374e465b..ab20bc045 100755 --- a/cg/cg1600.h +++ b/cg/cg1600.h @@ -22,6 +22,7 @@ #define F_ANNOESE 116 #define F_ANNORAFFR 117 #define F_STAMPAMOVPROV 118 +#define F_QUADRATURA 119 #endif // __CG1600_H diff --git a/cg/cg1600a.uml b/cg/cg1600a.uml index f0e9c22cf..91e677970 100755 --- a/cg/cg1600a.uml +++ b/cg/cg1600a.uml @@ -60,10 +60,12 @@ BEGIN HELP "Indicare il tipo di bilancio da stampare" ITEM "1|Bilancio scalare" MESSAGE HIDE,F_TIPOSTAMPA1|RESET,F_TIPOSTAMPA1|SHOW,F_TIPOSTAMPA|K_SPACE,F_TIPOSTAMPA - MESSAGE SHOW,F_ANNORAFFR|SHOW,F_DATABILRAF + MESSAGE SHOW,F_ANNORAFFR|SHOW,F_DATABILRAF + MESSAGE HIDE,F_QUADRATURA ITEM "2|Bilancio di verifica" MESSAGE HIDE,F_TIPOSTAMPA|RESET,F_TIPOSTAMPA|SHOW,F_TIPOSTAMPA1|K_SPACE,F_TIPOSTAMPA1 MESSAGE HIDE,F_ANNORAFFR|HIDE,F_DATABILRAF + MESSAGE SHOW,F_QUADRATURA END LIST F_TIPOSTAMPA 23 @@ -182,6 +184,11 @@ BEGIN HELP "Indicare se si stampa su modulo stretto (80 colonne)" END +BOOLEAN F_QUADRATURA +BEGIN + PROMPT 4 14 "Quadratura con Libro Giornale" +END + BUTTON DLG_OK 9 2 BEGIN PROMPT -12 -1 "" diff --git a/cg/cg6500.cpp b/cg/cg6500.cpp index 37c76287e..87f5e1c83 100755 --- a/cg/cg6500.cpp +++ b/cg/cg6500.cpp @@ -589,7 +589,7 @@ void Tabinv_application::init_modify_mode(TMask& m) m.enable(F_PCON); m.enable(F_MOV); m.enable(F_IVA); - //m.enable(F_FATT); + m.enable(F_FATT); m.enable(F_BOLLATO); } else @@ -599,7 +599,7 @@ void Tabinv_application::init_modify_mode(TMask& m) m.disable(F_PCON); m.disable(F_MOV); m.disable(F_IVA); - //m.disable(F_FATT); + m.disable(F_FATT); m.disable(F_BOLLATO); } } diff --git a/cg/cg6900.cpp b/cg/cg6900.cpp index fbb2651e7..ea4a69ef1 100755 --- a/cg/cg6900.cpp +++ b/cg/cg6900.cpp @@ -182,17 +182,23 @@ bool TInv_cont::main_loop() k = mask.run(); if (k == K_ENTER) - { - int num_disk = calcola_numero_dischi(mask); - char floppy = mask.get(F_FLOPPY)[0]; - + { + TString floppy = mask.get(F_FLOPPY); + int num_disk = calcola_numero_dischi(mask,floppy); + TString percorso = mask.get(F_PATH); + if (percorso.not_empty()) + floppy << ":/" << percorso; + str.format("%02d", num_disk); aggiorna_marker(str,29); const TFilename from(_trasf); // File da splittare - TFilename work; - work << floppy << ":/" << from.name(); // File su dischetto + TFilename work; + if (percorso.not_empty()) + work << floppy << "/" << from.name(); + else + work << floppy << ":/" << from.name(); // File su dischetto FILE* i = fopen(from, "rb"); @@ -239,17 +245,23 @@ bool TInv_cont::main_loop() k = mask.run(); if (k == K_ENTER) - { - int num_disk = calcola_numero_dischi(mask); - char floppy = mask.get(F_FLOPPY)[0]; + { + TString floppy = mask.get(F_FLOPPY); + int num_disk = calcola_numero_dischi(mask,floppy); + TString percorso = mask.get(F_PATH); + if (percorso.not_empty()) + floppy << ":/" << percorso; str.format("%02d", num_disk); aggiorna_marker(str,32); const TFilename from(_trasf); // File da splittare - TFilename work; - work << floppy << ":/" << from.name(); // File su dischetto + TFilename work; + if (percorso.not_empty()) + work << floppy << "/" << from.name(); // File su dischetto + else + work << floppy << ":/" << from.name(); // File su dischetto FILE* i = fopen(from, "rb"); diff --git a/cg/cg6900.h b/cg/cg6900.h index 81660c3f0..5ae767dbd 100755 --- a/cg/cg6900.h +++ b/cg/cg6900.h @@ -6,7 +6,8 @@ #include #include -#include +#include +#include #include #include @@ -161,9 +162,9 @@ public: static bool setta_maschera_hnd(TMask_field& f, KEY k); static bool messaggio_hnd (TMask_field& f, KEY k); - int calcola_numero_dischi(TMask& m); - FILE* chiedi_disco(const char* name, int disk, char floppy, bool lettura); - bool scrivi_disco(char floppy, int disk, const char* work, FILE* i, TProgind& w); + int calcola_numero_dischi(TMask& m,TString& floppy); + FILE* chiedi_disco(const char* name, int disk, TString& floppy, bool lettura); + bool scrivi_disco(TString& floppy, int disk, const char* work, FILE* i, TProgind& w); bool invio_contabilita_PC(); void invio_testata_causali(); diff --git a/cg/cg6900a.h b/cg/cg6900a.h index 3ab9a0e4f..bfd773287 100755 --- a/cg/cg6900a.h +++ b/cg/cg6900a.h @@ -13,7 +13,8 @@ // Campi maschera cg6900b.uml #define F_FLOPPY 201 -#define F_DIM 202 +#define F_DIM 202 +#define F_PATH 203 // Campi maschera cg6903a.uml diff --git a/cg/cg6900b.uml b/cg/cg6900b.uml index cea0bc560..e917792a1 100755 --- a/cg/cg6900b.uml +++ b/cg/cg6900b.uml @@ -1,12 +1,28 @@ #include "cg6900a.h" -PAGE "" -1 -1 40 7 +PAGE "" -1 -1 52 8 LIST F_FLOPPY 1 5 BEGIN PROMPT 1 1 "Disco " - ITEM "A|A:" - ITEM "B|B:" + ITEM "A|A:" + MESSAGE HIDE,F_PATH + MESSAGE ENABLE,F_DIM + ITEM "B|B:" + MESSAGE HIDE,F_PATH + MESSAGE ENABLE,F_DIM + ITEM "C|C:" + MESSAGE SHOW,F_PATH + MESSAGE DISABLE,F_DIM + ITEM "D|D:" + MESSAGE SHOW,F_PATH + MESSAGE DISABLE,F_DIM + ITEM "E|E:" + MESSAGE SHOW,F_PATH + MESSAGE DISABLE,F_DIM + ITEM "F|F:" + MESSAGE SHOW,F_PATH + MESSAGE DISABLE,F_DIM END LIST F_DIM 7 @@ -19,6 +35,11 @@ BEGIN HELP "Indicare la dimensione dei dischi che si vogliono usare" END +STRING F_PATH 30 +BEGIN + PROMPT 1 5 "Percorso " +END + BUTTON DLG_OK 9 2 BEGIN PROMPT -12 -1 "" diff --git a/cg/cg6902.cpp b/cg/cg6902.cpp index b34ada51f..77512da6b 100755 --- a/cg/cg6902.cpp +++ b/cg/cg6902.cpp @@ -2,13 +2,17 @@ #include "cg6900a.h" #include -FILE* TInv_cont::chiedi_disco(const char* name, int disk, char floppy, bool lettura) +FILE* TInv_cont::chiedi_disco(const char* name, int disk, TString& floppy, bool lettura) { - message_box("Inserire il disco %d nel drive %c:", disk, floppy); + FILE* f = NULL; + + char flop = floppy[0]; + if (flop != 'A' && flop != 'B') return f; + + message_box("Inserire il disco %d nel drive %c:", disk, flop); // name.ext(format("%03d", disk)); - FILE* f = NULL; bool retry = TRUE; while (retry) { @@ -25,11 +29,18 @@ FILE* TInv_cont::chiedi_disco(const char* name, int disk, char floppy, bool lett return f; } -bool TInv_cont::scrivi_disco(char floppy, int disk, const char* work, +bool TInv_cont::scrivi_disco(TString& floppy, int disk, const char* work, FILE* i, TProgind& w) { chiedi_disco(work, disk, floppy, FALSE); + if (floppy[0] != 'A' && floppy[0] != 'B') + if (_dim_disk < _dim_tot) + { + warning_box("Lo spazio su disco non e' sufficiente"); + return FALSE; + } + TString str; str.format("%02d", disk); if (_scelta == 'S') @@ -38,17 +49,20 @@ bool TInv_cont::scrivi_disco(char floppy, int disk, const char* work, aggiorna_marker(str,34); TString path_m; - path_m << floppy << ":\\marker"; - -// TString path_h; -// path_h << floppy << ":\\header"; - TString path_t; - path_t << floppy << ":\\trasfer"; + + if (floppy[0] == 'A' || floppy[0] == 'B') + { + path_m << floppy << ":\\marker"; + path_t << floppy << ":\\trasfer"; + } + else + { + path_m << floppy << "\\marker"; + path_t << floppy << "\\trasfer"; + } fcopy(_marker,path_m); // Copia il marker su disco -// if (disk == 1) -// fcopy(_header,path_h); // Copia il record di controllo solo sul primo disco FILE* o = fopen(path_t, "wb"); @@ -74,9 +88,9 @@ bool TInv_cont::scrivi_disco(char floppy, int disk, const char* work, return TRUE; } -int TInv_cont::calcola_numero_dischi(TMask& msk) +int TInv_cont::calcola_numero_dischi(TMask& msk,TString& floppy) { - int numdisc = 0; + int numdisc = 1; FILE* t = fopen(_trasf, "rb"); if (t == NULL) return error_box("Impossibile aprire il file '%s'", _trasf); @@ -97,34 +111,49 @@ int TInv_cont::calcola_numero_dischi(TMask& msk) fclose(m); _dim_tot = dim_t + dim_m; //+dim_h; // Determina la dimensione totale - - int item = msk.get_int(F_DIM); - - switch (item) + + if (floppy[0] == 'A' || floppy[0] == 'B') { - case 1 : - _dim_disk = 1400000L; - break; - case 2 : - _dim_disk = 1200000L; - break; - case 3 : - _dim_disk = 720000L; - break; - case 4 : - _dim_disk = 360000L; - break; - default : - break; - }; + int item = msk.get_int(F_DIM); - if (_dim_tot < _dim_disk) - numdisc = 1; + switch (item) + { + case 1 : + _dim_disk = 1400000L; + break; + case 2 : + _dim_disk = 1200000L; + break; + case 3 : + _dim_disk = 720000L; + break; + case 4 : + _dim_disk = 360000L; + break; + default : + break; + }; + + if (_dim_tot < _dim_disk) + numdisc = 1; + else + { + numdisc = int(_dim_tot / _dim_disk); + if ( (_dim_tot % _dim_disk) != 0) + numdisc += 1; + } + } else - { - numdisc = int(_dim_tot / _dim_disk); - if ( (_dim_tot % _dim_disk) != 0) - numdisc += 1; + { + struct _diskfree_t drive; + + _dos_getdiskfree(0,&drive); + + long bytes = drive.bytes_per_sector; + long settori = drive.sectors_per_cluster; + long cluster = drive.avail_clusters; + + _dim_disk = bytes * settori * cluster; } return numdisc; diff --git a/cg/cglib01.cpp b/cg/cglib01.cpp index 7f045a2db..12dfd72c1 100755 --- a/cg/cglib01.cpp +++ b/cg/cglib01.cpp @@ -300,17 +300,18 @@ bool TSaldo::data_limite_bilancio(int bilancio, int g, int c, long s, const TDat bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil,int stp_prov) { //Si considerano i saldi e non piu' i movimenti - char sezione; + char sezione,sezsf; int gruppo, conto, annoe; long sottoconto; - real pdarepro, paverepro; + real pdarepro, paverepro,saldofin; bool esito = FALSE; _saldo_iniziale = ZERO; _saldoiniziale = ZERO; _prg_dare = ZERO; _prg_avere = ZERO; - _saldo = ZERO; + _saldo = ZERO; + saldofin = ZERO; _saldi.zero(); _saldi.put(SLD_ANNOES,annoes); @@ -331,6 +332,8 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil pdarepro = _saldi.get_real(SLD_PDAREPRO); paverepro = _saldi.get_real(SLD_PAVEREPRO); sezione = _saldi.get_char(SLD_FLAGSALINI); + sezsf = _saldi.get_char(SLD_FLAGSALFIN); // W96SALDI del 19-06-96 modifica richiesta + saldofin = _saldi.get_real(SLD_SALDOFIN); // da PATRIZIA if (stp_prov == 1) //bilancio normale (senza provvisori) if (_saldo_iniziale == ZERO && _prg_dare == ZERO && _prg_avere == ZERO) @@ -339,7 +342,9 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil if (stp_prov == 0 && paverepro == ZERO) return esito; - if (sezione == 'A') _saldo_iniziale = -_saldo_iniziale; + if (sezione == 'A') _saldo_iniziale = -_saldo_iniziale; + + if (sezsf == 'A') saldofin = -saldofin; // W96SALDI del 19-06-96 _saldoiniziale = _saldo_iniziale; //saldo iniziale presente sul record saldi //non comprensivo del saldo finale es.precedente @@ -354,10 +359,10 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil switch (stp_prov) { case 1: - _saldo = _saldo_iniziale + _prg_dare - _prg_avere; + _saldo = _saldo_iniziale + _prg_dare - _prg_avere + saldofin; // W96SALDI del 19-06-96 break; case 2: - _saldo = _saldo_iniziale + _prg_dare - _prg_avere + pdarepro - paverepro; + _saldo = _saldo_iniziale + _prg_dare - _prg_avere + pdarepro - paverepro + saldofin; // W96SALDI del 19-06-96 break; case 3: _saldo = pdarepro - paverepro;