Corretto MI0363 liquidiazione piu' altre cose qua e la'

Altri modificati per cause spurie cvs-related


git-svn-id: svn://10.65.10.50/trunk@801 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1994-12-29 14:49:03 +00:00
parent f3c7cb1e11
commit 929a349a3c
18 changed files with 1001 additions and 884 deletions

View File

@ -9,21 +9,21 @@
#define N_CODCF "CODCF"
#define F_ANNO 101
#define F_CODATT 102
#define F_TIPOCF 103
#define F_CODCF 104
#define F_IMMESSO 105
#define F_IMPESC 106
#define F_IVAESC 107
#define F_NIESC 108
#define F_E8ESC 109
#define F_NDOCESC 110
#define F_IMPESP 111
#define F_IVAESP 112
#define F_NIESP 113
#define F_E8ESP 114
#define F_NDOCESP 115
#define F_PROG101102 116
#define F_CODATT 102
#define F_TIPOCF 103
#define F_CODCF 104
#define F_IMMESSO 105
#define F_IMPESC 106
#define F_IVAESC 107
#define F_NIESC 108
#define F_E8ESC 109
#define F_NDOCESC 110
#define F_IMPESP 111
#define F_IVAESP 112
#define F_NIESP 113
#define F_E8ESP 114
#define F_NDOCESP 115
#define F_PROG101102 116
#define F_CODDITTA 117
#define F_RAGSOC 118
#define F_COFI 119
@ -38,7 +38,7 @@
#define F_PROMPT 128
#define F_RAGSOC_D 129
#define F_DENATT 130
#define F_CODATTH 131
#define F_CODCFH 132
#define F_CODATTH 131
#define F_CODCFH 132
#endif // __CG0300_H
#endif // __CG0300_H

View File

@ -1,13 +1,13 @@
#ifndef __CG0400_H
#define __CG0400_H
/****
#define TCLI "C"
#define TCLI "C"
#define N_CODDITTA "CODDITTA"
#define N_CODATTPREV "CODATTPREV"
#define N_CODATT "CODATT"
#define N_CODCF "CODCF"
***/
#define N_CODDITTA "CODDITTA"
#define N_CODATTPREV "CODATTPREV"
#define N_CODATT "CODATT"
#define N_CODCF "CODCF"
***/
#define TAB_REG "REG"
#define TAB_PIM "PIM"
@ -25,16 +25,16 @@
#define F_VUOILORDI 111
#define F_TIPO1 112
/*
#define F_TOTALE1 122
#define F_TOTALE2 123
#define F_TOTALE3 124
#define F_TOTALE4 125
#define F_TOTALE5 126
#define F_TOTALE6 127
#define F_PROMPT 128
*/
#define F_TOTALE1 122
#define F_TOTALE2 123
#define F_TOTALE3 124
#define F_TOTALE4 125
#define F_TOTALE5 126
#define F_TOTALE6 127
#define F_PROMPT 128
*/
#endif // __CG0400_H
#endif // __CG0400_H

View File

@ -6,7 +6,7 @@ enum stampe {
modulo101=3,
modulo102=4,
entrambi=5
};
};
class desc_campo : public TObject
{
@ -27,7 +27,7 @@ public:
const desc_campo& campi(int i) { return (const desc_campo&) _campi[i]; }
int riga (int i) { return ((const desc_campo&)_campi[i])._riga; }
const char * formato (int i)
{ return ((desc_campo&)_campi[i])._formato; }
{ return ((desc_campo&)_campi[i])._formato; }
void add (int, const char*);
void leggi_modulo (const char *, const char *);
@ -55,7 +55,7 @@ public:
real ivaesc_real() { return ivaesc; }
const char * tot_str() { return tot.string("@@@@@@@@@@@"); }
// const char * esc_str() { return esc.string("@@@@@@@@@@@"); }
// const char * esc_str() { return esc.string("@@@@@@@@@@@"); }
const char * impesc_str() { return impesc.string("@@@@@@@@@@@"); }
const char * ivaesc_str() { return ivaesc.string("@@@@@@@@@@@"); }
@ -70,7 +70,7 @@ struct alleg_sort {
char cognome_dic [31];
char nome_dic [21];
char ragsoc_dic[51];
// char datana_dic[11];
// char datana_dic[11];
TDate datana_dic;
char sesso_dic [2];
char comunena_dic [51];
@ -127,7 +127,7 @@ class SortRecord {
TTable * _tpd;
struct alleg_sort * _all;
protected:
protected:
TRectype& look_com(const char *);
long cerca_codice_all(TString tipo, long codcf) ;
const char * decodifica_desc_att (TString & codatt);
@ -153,7 +153,7 @@ public:
struct Totali {
// Totali anno corrente
// Totali anno corrente
real _tot_tot_rigac;
int _tot_esc;
real _tot_impesc;
@ -161,7 +161,7 @@ struct Totali {
real _tot_niesc;
real _tot_e8esc;
// Totali anno precedente
// Totali anno precedente
real _tot_tot_rigap;
int _tot_esp;
real _tot_impesp;
@ -169,7 +169,7 @@ struct Totali {
real _tot_niesp;
real _tot_e8esp;
// Riporti
// Riporti
real _rip_tot_riga;
int _rip_tot_es;
real _rip_tot_impes;
@ -211,7 +211,7 @@ enum modi_stampa {
modulo=1,
controllo=2,
dischetto=3
};
};
enum posizioni {
PAIVA_DIC = 0,
@ -298,5 +298,5 @@ enum posizioni {
TOT_E8ESP,
TOT_SEGNO_TOTALE,
TOT_TOTALE
};
};

View File

@ -8,6 +8,7 @@
#include <progind.h>
#include <sheet.h>
#include <prefix.h>
#include <utility.h>
#include "cg4300.h"
#include "cg4300a.h"
@ -20,11 +21,12 @@ real TLiquidazione_app::CENTO(100.0);
inline TLiquidazione_app& app()
{ return (TLiquidazione_app&)main_app(); }
TLiquidazione_app::TLiquidazione_app()
: _ditte(NULL), _selected(10000), _year(4), _nomiditte(100)
TLiquidazione_app::TLiquidazione_app() :
_ditte(NULL), _selected(10000),
_year(4), _nomiditte(100)
{
_isprint = _is_interactive = TRUE; _recalc = needed;
_isplafond = _isfinal = _is_visliq = FALSE;
_isplafond = _printonly = _is_visliq = FALSE;
_isvent = _isagricolo = _isbenzinaro = _isviaggio = FALSE;
_row = 1; _what = all; _comp_acconto = FALSE;
_isriepilogo = FALSE; _calcall = FALSE;
@ -117,6 +119,7 @@ bool TLiquidazione_app::user_create()
// ACHTUNG: tutti i _codatt (codici attivita') sono
// in realta' composti dal codice attivita' piu' il
// tipo attivita' (1 o 2)
// sarebbe piu' saggio fare 2 campi ma ci vuole 1 vita
_pim_anno = new TRecfield(*_pim_r,"CODTAB",0,3);
_pim_codatt = new TRecfield(*_pim_r,"CODTAB",4,9);
@ -154,15 +157,15 @@ bool TLiquidazione_app::user_create()
for (dt.first(); !dt.eof(); dt.next())
{
// no archivi
if (!prefhndl->exist(dt.get_long("CODDITTA")))
continue;
// check no archivi
bool good = prefhndl->exist(dt.get_long("CODDITTA"));
TApplication::set_firm(dt.get_long("CODDITTA"));
// no parametri liquidazione
if (!look_lia())
continue;
if (good)
{
// check no parametri liquidazione
TApplication::set_firm(dt.get_long("CODDITTA"));
if (!look_lia()) good = FALSE;
}
_n_ditte++;
@ -171,7 +174,8 @@ bool TLiquidazione_app::user_create()
// add record
d->add(dt.get("CODDITTA"));
d->add(dt.get("RAGSOC"));
d->add(_lia->get("S7"));
if (good) d->add(_lia->get("S7"));
else d->add("??");
_nomiditte.add(d);
}
@ -339,141 +343,240 @@ bool TLiquidazione_app::set_print(int n)
long TLiquidazione_app::select_firm_range(long from, long to, wht freq)
{
if (to == 0) to = 99999L;
if (to == 0l) to = 99999L;
for (int i = 0; i < _nomiditte.items(); i++)
for (int i = 0; i < _ditte->items(); i++)
{
TToken_string& d = (TToken_string&)_nomiditte[i];
const char vers = d.get_char(2);
if ((freq == mnt && vers == 'T') || (freq == quarter && vers == 'M'))
if (_ditte->disabled(i))
continue;
const long cod = d.get_long(0);
TToken_string& d = _ditte->row(i);
const char vers = d.get_char(3);
if (vers == '?' || (freq == mnt && vers == 'T') || (freq == quarter && vers == 'M'))
continue;
const long cod = d.get_long(1);
if (cod >= from && cod <= to)
{
_selected.set(i);
_ditte->check(i);
}
else
{
_selected.set(i,FALSE);
_ditte->uncheck(i);
}
}
return _selected.ones();
}
// ----------------------------------------------- handlers
bool TLiquidazione_app::to_ditta_handler(TMask_field& f, KEY key)
bool TLiquidazione_app::to_ditt_handler(TMask_field& f, KEY key)
{
if (key == K_TAB && f.focusdirty() || key == K_ENTER)
TMask& m = f.mask();
if (key == K_F9)
{
app().to_butt_handler(m.field(CG43_BUT_DTO), K_SPACE);
}
if (key == K_TAB && f.focusdirty())
{
const long l = app().select_firm_range(m.get_long(CG43_FLD_DFR),
m.get_long(CG43_FLD_DTO),
(wht)m.get_int(CG43_RDB_VERS));
app().set_choice_limits(m);
m.field(CG43_FLD_SELECTED).set(format("%ld", l));
}
return TRUE;
}
bool TLiquidazione_app::fr_ditt_handler(TMask_field& f, KEY key)
{
TMask& m = f.mask();
if (key == K_F9)
{
app().fr_butt_handler(m.field(CG43_BUT_DFR), K_SPACE);
}
else if (key == K_TAB && f.focusdirty())
{
const long l = app().select_firm_range(m.get_long(CG43_FLD_DFR),
m.get_long(CG43_FLD_DTO),
(wht)m.get_int(CG43_RDB_VERS));
app().set_choice_limits(m);
m.field(CG43_FLD_SELECTED).set(format("%ld", l));
}
return TRUE;
}
bool TLiquidazione_app::to_butt_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE)
{
TArray_sheet* sh = app().get_ditte_sheet();
TMask& m = f.mask();
const long from = m.get_long(CG43_FLD_DFR);
const long to = m.get_long(CG43_FLD_DTO);
const wht freq = (wht)m.get_int(CG43_RDB_VERS);
if (from > 0 || to > 0)
sh->disable_check();
if (sh->run() == K_ENTER)
{
const long sel = app().select_firm_range(from, to, freq);
m.set(CG43_FLD_SELECTED, sel);
// m.reset(CG43_FLD_DFR);
// m.reset(CG43_FLD_DTO);
app().select_firm_range(m.get_long(CG43_FLD_DFR),sh->row(sh->selected()).get_long(1),
(wht)m.get_int(CG43_RDB_VERS));
app().set_choice_limits(m);
}
}
return TRUE;
}
bool TLiquidazione_app::fr_butt_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE)
{
TMask& m = f.mask();
TArray_sheet* sh = ((TLiquidazione_app&)main_app()).get_ditte_sheet();
sh->disable_check();
if (sh->run() == K_ENTER)
{
app().select_firm_range(sh->row(sh->selected()).get_long(1), m.get_long(CG43_FLD_DTO),
(wht)m.get_int(CG43_RDB_VERS));
app().set_choice_limits(m);
}
}
return TRUE;
}
bool TLiquidazione_app::what_freq_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE && f.dirty())
{
if (*(f.get()) == '3') // trimestre intelligente
{
int month = f.mask().get_int(CG43_LST_MESE);
if (month > 3)
while (!is_trim(month)) month--;
else month = 3;
f.mask().field(CG43_LST_TRIM).set(format("%d",month));
}
app().reset_choices(f.mask());
app().build_ditte_sheet((wht)atoi(f.get()));
}
return TRUE;
}
void TLiquidazione_app::reset_choices(TMask& m)
{
_selected.reset();
m.reset(CG43_FLD_SELECTED);
m.reset(CG43_FLD_DFR);
m.reset(CG43_FLD_DTO);
_ditte->check(-1, FALSE);
}
void TLiquidazione_app::set_choice_limits(TMask& m)
{
long first = -1l, last = -1l;
for (int i = 0; i < _ditte->items(); i++)
{
if (_selected[i])
{
long dit = _ditte->row(i).get_long(1);
if (first == -1l) first = dit;
if (last < dit) last = dit;
}
}
if (first != -1) m.field(CG43_FLD_DFR).set(format("%ld",first));
if (last != -1) m.field(CG43_FLD_DTO).set(format("%ld",last));
m.set(CG43_FLD_SELECTED, _selected.ones());
}
void TLiquidazione_app::build_ditte_sheet(wht what)
{
// build sheet
_ditte->destroy();
_what = what;
for (int i = 0; i < _nomiditte.items(); i++)
{
TToken_string* d = new TToken_string(64);
*d = (TToken_string&)_nomiditte[i];
const char vers = d->get_char(2);
bool selectable = vers == '?';
if ((what == mnt && vers == 'T') || (what == quarter && vers == 'M'))
continue;
d->insert(" |", 0);
const long pos = _ditte->add(d);
if (selectable) _ditte->disable(pos);
else if (_selected[i]) _ditte->check(pos);
}
}
// ----------------------------------------------------
bool TLiquidazione_app::set_liquidazione()
{
TMask m("cg4300a.msk");
m.set_handler(CG43_FLD_DTO, to_ditta_handler);
m.set_handler(CG43_FLD_DTO, to_ditt_handler);
m.set_handler(CG43_FLD_DFR, fr_ditt_handler);
m.set_handler(CG43_BUT_DTO, to_butt_handler);
m.set_handler(CG43_BUT_DFR, fr_butt_handler);
m.set_handler(CG43_RDB_VERS, what_freq_handler);
m.field(CG43_FLD_SELECTED).set("0");
_selected.reset();
KEY k;
// stampa abilitata per default
m.set(CG43_CHK_STAMPA,"X");
_month = m.get_int(CG43_LST_MESE);
build_ditte_sheet(all);
do
{
k = m.run();
if ((k = m.run()) == K_ESC) break;
if (k == K_ESC) break;
// handlers have set everything
_month = _what == quarter ? m.get_int(CG43_LST_TRIM) :
m.get_int(CG43_LST_MESE);
_what = (wht)m.get_int(CG43_RDB_VERS);
_month = m.get_int(CG43_LST_MESE);
if (_what == all)
{
if (_month != 3 && _month != 6 && _month != 9 &&
_month != 12 && _month != 13)
_what = mnt;
}
else if (_what == quarter)
_month = m.get_int(CG43_LST_TRIM);
_year = m.get(CG43_FLD_ANNO);
_date = m.get(CG43_FLD_DATA);
_isprint = m.get_bool(CG43_CHK_STAMPA);
_recalc = (recalc)m.get_long(CG43_LST_CALC);
_isfinal = m.get_bool(CG43_CHK_FINAL);
_year = m.get(CG43_FLD_ANNO);
_date = m.get(CG43_FLD_DATA);
_isprint = m.get_bool(CG43_CHK_STAMPA);
_recalc = (recalc)m.get_long(CG43_LST_CALC);
_printonly = m.get_bool(CG43_CHK_FINAL);
if (_isprint) printer().setdate(_date);
if (_printonly) _recalc = never;
// ------------------------------------------------
m.first_focus(k);
int i;
switch(k)
{
case DLG_SELECT:
// build sheet
_ditte->destroy();
for (i = 0; i < _nomiditte.items(); i++)
{
TToken_string* d = new TToken_string(64);
*d = (TToken_string&)_nomiditte[i];
const char vers = d->get_char(2);
if ((_what == mnt && vers == 'T') || (_what == quarter && vers == 'M'))
continue;
d->insert(" |", 0);
const long pos = _ditte->add(d);
if (_selected[i]) _ditte->check(pos);
}
_ditte->enable_check();
// seleziona e aggiungi alle gia' selezionate
if (_ditte->run() == K_ENTER)
{
for (long j = 0l; j < _ditte->items(); j++)
{
const long cod = _ditte->row(j).get_long(1);
for (int d = 0; d < _nomiditte.items(); d++)
{
const long firm = ((TToken_string&)_nomiditte[d]).get_long(0);
if (firm == cod)
{
bool minchia = _ditte->checked(j);
_selected.set(d, _ditte->checked(j));
break;
}
}
#ifdef DBG
if (d >= _nomiditte.items())
yesnofatal_box("Non ritrovo piu' la ditta %ld", cod);
#endif
}
_selected.set(j, _ditte->checked(j));
set_choice_limits(m);
}
m.set(CG43_FLD_SELECTED, _selected.ones());
break;
case CG43_BUT_ANN:
_selected.reset();
m.reset(CG43_FLD_SELECTED);
reset_choices(m);
break;
}
}
while (k != K_ENTER && k != K_ESC);
return k == K_ENTER;
}

View File

@ -160,7 +160,7 @@ class TLiquidazione_app : public TPrint_application
int _month; // mese da calcolare
TDate _date; // data di stampa
bool _isprint; // vuoi stampare o no?
bool _isfinal; // calcolo definitivo
bool _printonly; // calcolo definitivo
recalc _recalc; // tipo ricalcolo scelto
bool _isplafond; // plafond importatori abituali
bool _isvent; // ventilazione
@ -260,8 +260,16 @@ class TLiquidazione_app : public TPrint_application
TRecfield* _lim_mese;
protected:
long select_firm_range(long from, long to, wht freq);
static bool to_ditta_handler(TMask_field& f, KEY key);
static bool to_ditt_handler(TMask_field& f, KEY key);
static bool fr_ditt_handler(TMask_field& f, KEY key);
static bool to_butt_handler(TMask_field& f, KEY key);
static bool fr_butt_handler(TMask_field& f, KEY key);
static bool what_freq_handler(TMask_field& f, KEY key);
static TLiquidazione_app& app() { return (TLiquidazione_app&)main_app(); }
public:
@ -269,6 +277,13 @@ public:
virtual bool user_destroy();
virtual bool set_print(int i);
// cazzatelle per handlers
TArray_sheet* get_ditte_sheet() { return _ditte; }
TBit_array& get_selected() { return _selected; }
void build_ditte_sheet(wht);
void reset_choices(TMask&);
void set_choice_limits(TMask&);
bool set_liquidazione();
bool recalc_all();
@ -362,7 +377,7 @@ public:
_VentItem* look_ventilation(int m, const char* codreg);
// tutti i controlli del mondo sui mesi da calcolare
bool is_trim (int x);
static bool is_trim (int x);
bool is_month_ok (int x, int month = -1);
bool is_date_ok (TDate& d, int month);
bool is_first_month (int m);

View File

@ -13,3 +13,5 @@
#define CG43_FLD_DTO 114
#define CG43_LST_CALC 115
#define CG43_CHK_FINAL 116
#define CG43_BUT_DFR 117
#define CG43_BUT_DTO 118

View File

@ -4,7 +4,7 @@ PAGE "Calcolo Liquidazioni" -1 -1 68 15
RADIOBUTTON CG43_RDB_VERS 15
BEGIN
PROMPT 4 1 "Versamenti"
HELP "Indicare di quali versamenti procedere con la liquidazione"
HELP "Indicare di quali versamenti procedere con la liquidazione"
ITEM "1|Tutti" MESSAGE HIDE,CG43_LST_TRIM|SHOW,CG43_LST_MESE
ITEM "2|Mensili" MESSAGE HIDE,CG43_LST_TRIM|SHOW,CG43_LST_MESE
ITEM "3|Trimestrali" MESSAGE SHOW,CG43_LST_TRIM|HIDE,CG43_LST_MESE
@ -19,25 +19,25 @@ END
NUMBER CG43_FLD_DFR 5
BEGIN
PROMPT 24 2 "Da codice "
FLAGS "UR"
HELP "Codice ditta di partenza per la selezione"
USE LF_NDITTE KEY 1
DISPLAY "Codice" CODDITTA
DISPLAY "Ragione sociale@50" RAGSOC
DISPLAY "Vers" FREQVIVA
OUTPUT CG43_FLD_DFR CODDITTA
HELP "Codice ditta di partenza per la selezione"
END
BUTTON CG43_BUT_DFR 2 1
BEGIN
PROMPT 40 2 "*"
PICTURE 109
END
NUMBER CG43_FLD_DTO 5
BEGIN
PROMPT 24 3 "A codice "
FLAGS "UR"
HELP "Codice ditta di fine selezione"
COPY USE CG43_FLD_DFR
DISPLAY "Codice" CODDITTA
DISPLAY "Ragione sociale@50" RAGSOC
DISPLAY "Vers" FREQVIVA
OUTPUT CG43_FLD_DTO CODDITTA
HELP "Codice ditta di fine selezione"
END
BUTTON CG43_BUT_DTO 2 1
BEGIN
PROMPT 40 3 "*"
PICTURE 109
END
STRING CG43_FLD_SELECTED 5
@ -49,45 +49,36 @@ END
BUTTON DLG_SELECT 10 2
BEGIN
PROMPT 48 2 "~Selezione"
HELP "Selezione ditte di cui fare la liquidazione"
HELP "Selezione ditte di cui fare la liquidazione"
MESSAGE EXIT, DLG_SELECT
END
BUTTON CG43_BUT_ANN 10
BEGIN
PROMPT 48 4 "A~zzera"
HELP "Azzerare la selezione delle ditte da fare la liquidazione"
HELP "Azzerare la selezione delle ditte da fare la liquidazione"
MESSAGE EXIT,CG43_BUT_ANN
END
/*
BUTTON CG43_BUT_CHK 8
BEGIN
PROMPT 50 4 "Verifica"
MESSAGE EXIT,CG43_BUT_CHK
END
*/
NUMBER CG43_FLD_ANNO 4
BEGIN
PROMPT 30 7 "Anno "
PROMPT 31 7 "Anno "
HELP "Anno per cui effettuare il calcolo"
FLAGS "A"
END
LIST CG43_LST_MESE 10
LIST CG43_LST_MESE 13
BEGIN
PROMPT 4 7 "Periodo "
HELP "Mese per cui effettuare il calcolo liquidazione"
HELP "Mese per cui effettuare il calcolo liquidazione"
ITEM "13|Annuale"
FLAGS "AM"
END
LIST CG43_LST_TRIM 12
LIST CG43_LST_TRIM 13
BEGIN
PROMPT 4 7 "Periodo "
HELP "Trimestre di cui effettuare il calcolo liquidazione"
HELP "Trimestre di cui effettuare il calcolo liquidazione"
ITEM "3|1 Trimestre "
ITEM "6|2 Trimestre "
ITEM "9|3 Trimestre "
@ -98,7 +89,7 @@ END
LIST CG43_LST_CALC 13
BEGIN
PROMPT 4 8 "Ricalcola "
HELP "Indicare se rifare il calcolo durante la stampa"
HELP "Indicare se rifare il calcolo durante la stampa"
// ITEM "1|Se necessario"
ITEM "2|Mese corrente"
ITEM "3|Tutti i mesi"
@ -115,7 +106,7 @@ END
BOOLEAN CG43_CHK_STAMPA
BEGIN
PROMPT 5 11 "Esegui "
HELP "Indicare se stampare il prospetto delle liquidazioni"
HELP "Indicare se stampare il prospetto delle liquidazioni"
MESSAGE TRUE ENABLE,CG43_FLD_DATA
MESSAGE FALSE DISABLE,CG43_FLD_DATA
END
@ -123,16 +114,18 @@ END
DATE CG43_FLD_DATA
BEGIN
PROMPT 16 11 "con data "
HELP "Data di stampa del prospetto delle liquidazioni"
PROMPT 15 11 "con data "
HELP "Data di stampa del prospetto delle liquidazioni"
FLAGS "A"
END
BOOLEAN CG43_CHK_FINAL
BEGIN
PROMPT 47 11 "Definitivo"
HELP "Indicare se la liquidazione e' registrata come definitiva"
PROMPT 47 11 "Solo stampa"
HELP "Indicare se si desidera la sola stampa delle liquidazioni calcolate"
MESSAGE TRUE DISABLE,CG43_LST_CALC
MESSAGE FALSE ENABLE,CG43_LST_CALC
END

View File

@ -5,35 +5,40 @@
// ------------------------------------------------------------
#include <progind.h>
#include <sheet.h>
#include "cg4300.h"
// -------------------- QUI comincia l'avventura --------------------------
bool TLiquidazione_app::recalc_all()
{
_prind = new TProgind(_selected.ones()*2,
_prind = new TProgind(_selected.ones()*2, _printonly ?
" Stampa liquidazione... \n"
" Preparazione archivi \n"
" " :
" Calcolo liquidazione... \n"
" Preparazione archivi ",
" Preparazione archivi \n"
" ",
TRUE,TRUE,45);
for (int l = 0; l < _nomiditte.items(); l++)
for (int l = 0; l < _ditte->items(); l++)
{
if (_prind->iscancelled())
break;
if (_selected[(long)l])
{
TToken_string& nomeditta = (TToken_string&)_nomiditte[l];
TToken_string& nomeditta = _ditte->row(l);
_nditte->zero();
_nditte->curr().put("CODDITTA",nomeditta.get_long(0));
_nditte->curr().put("CODDITTA",nomeditta.get_long(1));
_nditte->read();
TApplication::set_firm(nomeditta.get_long(0));
TApplication::set_firm(nomeditta.get_long(1));
_prind->addstatus(1);
// trimestrali impropriamente selezionate per mesi intermedi
_freqviva = nomeditta.get(2);
_freqviva = nomeditta.get(3);
if (!is_month_ok(_month)) continue;
int need_refresh = FALSE;
@ -121,7 +126,8 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
// se diventa TRUE);
_mixed = FALSE;
sprintf (buf,"Calcolo liquidazioni (%d)...\n%s: %s",
sprintf (buf, _printonly ? "Stampa liquidazione (%d)...\n%s: %s\n" :
"Calcolo liquidazione (%d)...\n%s: %s\n",
month,
(const char*)_nditte_r->get("RAGSOC"),
(const char*)desatt);
@ -813,8 +819,6 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
_lim->put("R7",ris_cred);
_lim->put("R8",ris_deb);
_lim->put("B0","X");
if (_isfinal) _lim->put("B1","X");
_lim->rewrite();
if (month == 12)

View File

@ -9,6 +9,6 @@
#define F_DESATT 150
#define F_TIPOATT 102
#define F_PRORATA 103
#define F_P8 104
#define F_P8B 105
#define F_P9 106
#define F_P8 104
#define F_P8B 105
#define F_P9 106