Corretto L agg. e filtro in all.G
git-svn-id: svn://10.65.10.50/trunk@3849 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d104d60a02
commit
42036c85e4
@ -1055,7 +1055,9 @@ void TQuadroL::stampa_testata(TPrinter& pr)
|
||||
progind()->addstatus(1);
|
||||
}
|
||||
|
||||
bool TQuadroL::stampa_L(TPrinter& pr,const long lStartRec,const int iRecL)
|
||||
// Stampa fino a iRecL record del quadro L.
|
||||
// Incrementa lStartRec per ogni incremento del cursore
|
||||
bool TQuadroL::stampa_L(TPrinter& pr,long& lStartRec,const int iRecL)
|
||||
{
|
||||
long codit=0L;
|
||||
bool eof=FALSE;
|
||||
@ -1086,6 +1088,7 @@ bool TQuadroL::stampa_L(TPrinter& pr,const long lStartRec,const int iRecL)
|
||||
progind()->addstatus(1);
|
||||
righe++;
|
||||
++cur;
|
||||
lStartRec++;
|
||||
// eof=cur.pos()==cur.items();
|
||||
bFinitaPagina = (righe==iRecL);
|
||||
}
|
||||
@ -1185,7 +1188,7 @@ bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis
|
||||
calcola_totali_precedenti();
|
||||
|
||||
pr.formlen(dic_form_len());
|
||||
int lOffsetL=_START_AGG_L-1;
|
||||
long lOffsetL=_START_AGG_L-1;
|
||||
(*cur)=lOffsetL;
|
||||
bool finito=FALSE;
|
||||
while (!finito)
|
||||
@ -1198,7 +1201,7 @@ bool TQuadroL::print(const long codditta, const long NumFis, const long NumNoFis
|
||||
pr.formlen(dic_form_len());
|
||||
if (!finito)
|
||||
{
|
||||
lOffsetL+=_REC_PRIMA_AGG_L;
|
||||
//lOffsetL+=_REC_PRIMA_AGG_L;
|
||||
jump_to_line(pr, prima_riga(SECONDA));
|
||||
finito=stampa_L(pr,lOffsetL,_REC_SECONDA_AGG_L);
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ class TQuadroL : public TDicForm
|
||||
protected:
|
||||
void stampa_testata(TPrinter& pr);
|
||||
void stampa_totali_L(TPrinter& pr);
|
||||
bool stampa_L(TPrinter& pr,const long lStartRec,const int iRecL);
|
||||
bool stampa_L(TPrinter& pr,long& lStartRec,const int iRecL);
|
||||
virtual void next_page(TPrinter& pr) { fill_page(pr, -1); }
|
||||
virtual void set_body(TPrinter& pr, const char tipo) {}
|
||||
virtual int prima_riga(PaginaQuadro p) const;
|
||||
@ -370,6 +370,7 @@ class TQuadroGAgg : public TDicForm
|
||||
{
|
||||
long _codditta;
|
||||
public:
|
||||
bool EsisteAllegG(const long codditta);
|
||||
virtual bool print(const long codditta, const long NumFis = 0, const long NumNoFis = 0);
|
||||
TQuadroGAgg(const char* sNomeForm, const char* quadro) : TDicForm(sNomeForm, quadro) {}
|
||||
virtual ~TQuadroGAgg() {}
|
||||
|
@ -6,13 +6,44 @@
|
||||
const int PRIMO_IMPORTO = 24;
|
||||
const int PRIMA_ALIQUOTA = 49;
|
||||
|
||||
// determina se codditta necessita dell'all.G
|
||||
bool TQuadroGAgg::EsisteAllegG(const long codditta)
|
||||
{
|
||||
TString filtr(24);
|
||||
_codditta=codditta;
|
||||
TCursor* cur=cursor();
|
||||
filtr.format("CODDITTA==%ld", codditta);
|
||||
cur->setfilter(filtr, TRUE);
|
||||
const long items = cur->items();
|
||||
if (!items)
|
||||
return FALSE;
|
||||
|
||||
(*cur)=0L;
|
||||
TRectype& rec = cur->curr();
|
||||
TToken_string p35a(rec.get("P35A"));
|
||||
|
||||
for (int i=0; i<20; i++)
|
||||
{
|
||||
if (i == 6 || i == 10 || i == 13 || i == 16 || i == 19)
|
||||
{
|
||||
TString aliquota = p35a.get(i);
|
||||
if (!aliquota.blank())
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool TQuadroGAgg::print(const long codditta, const long NumFis, const long NumNoFis)
|
||||
{
|
||||
TCursor* cur = cursor();
|
||||
TPrinter& pr = printer();
|
||||
|
||||
if (!EsisteAllegG(codditta))
|
||||
return FALSE;
|
||||
|
||||
// MA SERVE???
|
||||
(*cur)=0L;
|
||||
// (*cur)=0L;
|
||||
|
||||
TRectype& rec = cur->curr();
|
||||
|
||||
|
@ -99,7 +99,7 @@ BUTTON B_ALLG 1 1
|
||||
BEGIN
|
||||
PROMPT 1 ROW5 ""
|
||||
PICTURE 123
|
||||
// MESSAGE RUN,771MOD,-1
|
||||
MESSAGE RUN,772MOD,-4,J,S
|
||||
GROUP 1
|
||||
END
|
||||
|
||||
|
@ -93,7 +93,7 @@ BUTTON B_ALLG 1 1
|
||||
BEGIN
|
||||
PROMPT 1 ROW5 ""
|
||||
PICTURE 123
|
||||
// MESSAGE RUN,771MOD,-1
|
||||
MESSAGE RUN,772MOD,-4,J,D
|
||||
FLAGS MYFLAGS
|
||||
GROUP GRUPPO
|
||||
END
|
||||
|
Loading…
x
Reference in New Issue
Block a user