Correzioni.
MI3568 : aggiunto controllo sulla sezione nella stampa conti normali git-svn-id: svn://10.65.10.50/trunk@4373 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3817090cce
commit
61dde1b3ac
@ -83,7 +83,7 @@ public:
|
||||
void update_totals(bool what,real& res,real& non,real& buo,
|
||||
real& s1,real& s2,real& s3,real& s4,real& s5, real& s6, real& s7);
|
||||
void compute_unassigned(TPartita& p);
|
||||
void compute_all(TPartita& p);
|
||||
void compute_all(TPartita& p, TBill& bill);
|
||||
TStampaScaduto();
|
||||
};
|
||||
|
||||
@ -145,7 +145,7 @@ void TStampaScaduto::compute_unassigned(TPartita& p)
|
||||
}
|
||||
}
|
||||
|
||||
void TStampaScaduto::compute_all(TPartita& p)
|
||||
void TStampaScaduto::compute_all(TPartita& p, TBill& bill)
|
||||
{
|
||||
real residuo,nonscad,buonf,s1,s2,s3,s4,s5,s6,s7,res_pagati;
|
||||
residuo = 0.0; nonscad = 0.0; buonf = 0.0; s1 = 0.0;
|
||||
@ -218,7 +218,11 @@ void TStampaScaduto::compute_all(TPartita& p)
|
||||
}
|
||||
}
|
||||
char norm='D';
|
||||
if (_tipost == fornitori) norm = 'A';
|
||||
if (_tipost == fornitori)
|
||||
norm = 'A';
|
||||
else
|
||||
if (_tipost == altri && bill.find())
|
||||
norm = bill.sezione();
|
||||
pag.normalize((norm=='D') ? 'A' : 'D'); scd.normalize(norm); bf.normalize((norm=='D') ? 'A' : 'D');
|
||||
real res,a,b; a = pag.valore(); b = scd.valore(); buonf += bf.valore();
|
||||
res = b - a;
|
||||
@ -342,7 +346,7 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
||||
{
|
||||
const TRectype& curr = current_cursor()->curr(file);
|
||||
|
||||
const TBill bill(curr);
|
||||
TBill bill(curr);
|
||||
const bool checked = _m->selected(bill);
|
||||
|
||||
if (!checked && !_end_printed) // Se non e' stato selezionato salta al prossimo record
|
||||
@ -419,7 +423,7 @@ bool TStampaScaduto::preprocess_page(int file, int counter)
|
||||
_codval = (_stvaluta ? rp.get(PART_CODVAL): "");
|
||||
if (_codval.empty()) _codval = " ";
|
||||
// Now performing fulkrum...
|
||||
compute_all(p);
|
||||
compute_all(p, bill);
|
||||
}
|
||||
|
||||
current_cursor()->repos(); // Very, very necessary...
|
||||
@ -589,9 +593,9 @@ bool TStampaScaduto::set_print(int)
|
||||
default: break;
|
||||
} // End of inner switch
|
||||
|
||||
long inc = 15l;
|
||||
if (_tipost == clienti)
|
||||
inc = 30l;
|
||||
long inc = 30l;
|
||||
if (_tipost == fornitori)
|
||||
inc = 15l;
|
||||
long nday = inc;
|
||||
for (int j = 0; j < 6; j++)
|
||||
{
|
||||
@ -685,6 +689,7 @@ void TStampaScaduto::print_header()
|
||||
{
|
||||
int soh = 1;
|
||||
const long firm = get_firm();
|
||||
TString rw(230);
|
||||
|
||||
reset_header ();
|
||||
TLocalisamfile ditte(LF_NDITTE);
|
||||
@ -699,16 +704,16 @@ void TStampaScaduto::print_header()
|
||||
TString limop = _limop.string();
|
||||
TString limscad = _limscad.string();
|
||||
|
||||
set_header (soh++, "Ditta : %ld %s@158gData@163g%s @190gPag. @#",
|
||||
firm, (const char *)s, (const char *)datas);
|
||||
|
||||
switch (_tipost)
|
||||
{
|
||||
case fornitori:
|
||||
case clienti:
|
||||
{
|
||||
TString rw(230);
|
||||
TString s1,s2, s3;
|
||||
int o = 0; // Offset per scaglioni.
|
||||
set_header (soh++, "Ditta : %ld %s@158gData@163g%s @190gPag. @#",
|
||||
firm, (const char *)s, (const char *)datas);
|
||||
if (_tipost==fornitori)
|
||||
{
|
||||
set_header(soh++,"@72g** SCADUTO FORNITORI **");
|
||||
@ -737,9 +742,6 @@ void TStampaScaduto::print_header()
|
||||
}
|
||||
case altri: // Piano dei conti
|
||||
{
|
||||
TString rw(183);
|
||||
set_header (soh++, "Ditta : %ld %s@152gData@157g%s @170gPag. @#",
|
||||
firm, (const char *)s, (const char *)datas);
|
||||
set_header(soh++,"@79g** SCADUTO **");
|
||||
set_header (soh++,"@73gAl %s Operazioni al %s",(const char*)limscad, (const char*)limop);
|
||||
// set_header (soh++,"@79gAl %s",(const char*)limop);
|
||||
|
Loading…
x
Reference in New Issue
Block a user