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:
parent
f3c7cb1e11
commit
929a349a3c
295
cg/cg4300.cpp
295
cg/cg4300.cpp
@ -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"));
|
||||
|
||||
if (good)
|
||||
{
|
||||
// check no parametri liquidazione
|
||||
TApplication::set_firm(dt.get_long("CODDITTA"));
|
||||
|
||||
// no parametri liquidazione
|
||||
if (!look_lia())
|
||||
continue;
|
||||
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)
|
||||
{
|
||||
if (key == K_TAB && f.focusdirty() || key == K_ENTER)
|
||||
bool TLiquidazione_app::to_ditt_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
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)
|
||||
if (key == K_F9)
|
||||
{
|
||||
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().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();
|
||||
|
||||
sh->disable_check();
|
||||
if (sh->run() == K_ENTER)
|
||||
{
|
||||
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::set_liquidazione()
|
||||
bool TLiquidazione_app::fr_butt_handler(TMask_field& f, KEY key)
|
||||
{
|
||||
TMask m("cg4300a.msk");
|
||||
m.set_handler(CG43_FLD_DTO, to_ditta_handler);
|
||||
|
||||
m.field(CG43_FLD_SELECTED).set("0");
|
||||
_selected.reset();
|
||||
|
||||
KEY k;
|
||||
// stampa abilitata per default
|
||||
m.set(CG43_CHK_STAMPA,"X");
|
||||
|
||||
do
|
||||
if (key == K_SPACE)
|
||||
{
|
||||
k = m.run();
|
||||
TMask& m = f.mask();
|
||||
TArray_sheet* sh = ((TLiquidazione_app&)main_app()).get_ditte_sheet();
|
||||
|
||||
if (k == K_ESC) break;
|
||||
|
||||
|
||||
_what = (wht)m.get_int(CG43_RDB_VERS);
|
||||
_month = m.get_int(CG43_LST_MESE);
|
||||
|
||||
if (_what == all)
|
||||
sh->disable_check();
|
||||
if (sh->run() == K_ENTER)
|
||||
{
|
||||
if (_month != 3 && _month != 6 && _month != 9 &&
|
||||
_month != 12 && _month != 13)
|
||||
_what = mnt;
|
||||
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;
|
||||
}
|
||||
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);
|
||||
|
||||
if (_isprint) printer().setdate(_date);
|
||||
|
||||
// ------------------------------------------------
|
||||
m.first_focus(k);
|
||||
|
||||
int i;
|
||||
|
||||
|
||||
switch(k)
|
||||
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)
|
||||
{
|
||||
case DLG_SELECT:
|
||||
// build sheet
|
||||
_ditte->destroy();
|
||||
for (i = 0; i < _nomiditte.items(); i++)
|
||||
_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);
|
||||
|
||||
if ((_what == mnt && vers == 'T') || (_what == quarter && vers == 'M'))
|
||||
bool selectable = vers == '?';
|
||||
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);
|
||||
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_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");
|
||||
|
||||
KEY k;
|
||||
// stampa abilitata per default
|
||||
m.set(CG43_CHK_STAMPA,"X");
|
||||
|
||||
_month = m.get_int(CG43_LST_MESE);
|
||||
build_ditte_sheet(all);
|
||||
|
||||
do
|
||||
{
|
||||
if ((k = m.run()) == K_ESC) break;
|
||||
|
||||
// handlers have set everything
|
||||
|
||||
_month = _what == quarter ? m.get_int(CG43_LST_TRIM) :
|
||||
m.get_int(CG43_LST_MESE);
|
||||
|
||||
_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);
|
||||
|
||||
switch(k)
|
||||
{
|
||||
case DLG_SELECT:
|
||||
_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
|
||||
}
|
||||
}
|
||||
m.set(CG43_FLD_SELECTED, _selected.ones());
|
||||
_selected.set(j, _ditte->checked(j));
|
||||
set_choice_limits(m);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
21
cg/cg4300.h
21
cg/cg4300.h
@ -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);
|
||||
|
@ -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
|
@ -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
|
||||
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
|
||||
END
|
||||
|
||||
BUTTON CG43_BUT_DTO 2 1
|
||||
BEGIN
|
||||
PROMPT 40 3 "*"
|
||||
PICTURE 109
|
||||
END
|
||||
|
||||
STRING CG43_FLD_SELECTED 5
|
||||
@ -60,23 +60,14 @@ BEGIN
|
||||
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"
|
||||
@ -84,7 +75,7 @@ BEGIN
|
||||
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"
|
||||
@ -123,7 +114,7 @@ END
|
||||
|
||||
DATE CG43_FLD_DATA
|
||||
BEGIN
|
||||
PROMPT 16 11 "con data "
|
||||
PROMPT 15 11 "con data "
|
||||
HELP "Data di stampa del prospetto delle liquidazioni"
|
||||
FLAGS "A"
|
||||
END
|
||||
@ -131,8 +122,10 @@ 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
|
||||
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user