diff --git a/ca/ca3883.cpp b/ca/ca3883.cpp index 38765141b..cc2763566 100755 --- a/ca/ca3883.cpp +++ b/ca/ca3883.cpp @@ -141,28 +141,24 @@ void TCRPA_report::analize_pconana_structure (const TString& prefix, const int d } } } - //se c'e' piu' di un campo da stampare per i Ricavi -> ci vuole un campo Totale per i ricavi - if (codici_r.items() >= 1) + + if (codici_r.items() == 1) //se il campo da stampare e' uno solo->e' il totale del livello { - if (codici_r.items() == 1) //se il campo da stampare e' uno solo->e' il totale del livello - { - codici_r.destroy(); - testate_r.destroy(); - } - codici_r.add("#RICAVI"); - testate_r.add(TR("RICAVI")); + codici_r.destroy(); + testate_r.destroy(); } + codici_r.add("#RICAVI"); + testate_r.add(TR("RICAVI")); + //..analogo per i Costi - if (codici_c.items() >= 1) + if (codici_c.items() == 1) { - if (codici_c.items() == 1) - { - codici_c.destroy(); - testate_c.destroy();; - } - codici_c.add("#COSTI"); - testate_c.add(TR("COSTI")); + codici_c.destroy(); + testate_c.destroy();; } + codici_c.add("#COSTI"); + testate_c.add(TR("COSTI")); + //condensa gli array di Costo e Ricavo in un unico array che servira' di base per la stampa merge_array(codici_r, testate_r, codici, testate); merge_array(codici_c, testate_c, codici, testate);