From 61dde1b3ac31b4d5350ce7ff13bdc62c4966fe08 Mon Sep 17 00:00:00 2001 From: angelo Date: Thu, 22 May 1997 13:19:26 +0000 Subject: [PATCH] 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 --- sc/sc2300.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/sc/sc2300.cpp b/sc/sc2300.cpp index ab34ac0a5..d8a17e135 100755 --- a/sc/sc2300.cpp +++ b/sc/sc2300.cpp @@ -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);