Patch level : 10.0 426 (no eudora)
Files correlati : sc2.exe sc3.exe Ricompilazione Demo : [ ] Commento Stampa dei codici di analitica sugli estratti conto e solleciti git-svn-id: svn://10.65.10.50/trunk@19349 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b59ecc6196
commit
a37b2d1c70
@ -4079,7 +4079,7 @@ TRecfield::TRecfield(TRectype& rec, const char* name, int from, int to)
|
||||
_p += from;
|
||||
if (to >= 0)
|
||||
{
|
||||
CHECKS(from <= to && to <= rd.Fd[nf].Len, "Invalid Range on field ", _name);
|
||||
CHECKS(from <= to && to <= rd.Fd[nf].Len, "Invalid Range on field ", (const char *)_name);
|
||||
_len = to - from + 1;
|
||||
}
|
||||
else
|
||||
|
11
sc/pec.frm
11
sc/pec.frm
@ -191,7 +191,7 @@ PROMPT 2 1 "*** Riporto"
|
||||
FLAGS "DH"
|
||||
END
|
||||
END
|
||||
SECTION BODY ODD 1 COLUMNWISE
|
||||
SECTION BODY ODD 5 COLUMNWISE
|
||||
STRINGA 201 4
|
||||
BEGIN
|
||||
KEY "Codice causale"
|
||||
@ -337,6 +337,15 @@ SPECIAL STRINGA INTESTAZIONE "Blocc." "Rata bloccata"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
END
|
||||
STRINGA 221 30 25
|
||||
BEGIN
|
||||
KEY "Analitica"
|
||||
PROMPT 16 1 ""
|
||||
FLAGS "H"
|
||||
SPECIAL STRINGA INTESTAZIONE "Analitica" "Analitica"
|
||||
SPECIAL NUMERO OFFSET "0" "Offset iniziale campo"
|
||||
SPECIAL STRINGA FINCATURA "XX" "Fincatura sinistra e destra"
|
||||
END
|
||||
END
|
||||
SECTION FOOTER ODD 9
|
||||
STRINGA 203
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <applicat.h>
|
||||
#include <form.h>
|
||||
#include <modaut.h>
|
||||
#include <printer.h>
|
||||
#include <progind.h>
|
||||
#include <textset.h>
|
||||
@ -12,6 +13,7 @@
|
||||
#include "sc21pec.h"
|
||||
|
||||
#include "../cg/cgsaldac.h"
|
||||
#include "../ca/calib01.h"
|
||||
#include "../pr/agenti.h"
|
||||
|
||||
#include <cfven.h>
|
||||
@ -149,6 +151,7 @@ class TEC_row : public TSortable
|
||||
real _totale; // Totale documento
|
||||
TValuta _valuta; // Codice valuta, data cambio e cambio
|
||||
bool _bloccata; // Rata bloccata
|
||||
TString _codici_analitica; // codici analitica corrispondenti alle fatture
|
||||
|
||||
protected: // TSortable
|
||||
virtual int compare(const TSortable& s) const;
|
||||
@ -168,6 +171,7 @@ public:
|
||||
void esposto(const real& e) { _esposto = e; }
|
||||
void salvo_buon_fine(bool sbf) { _salvo_buon_fine = sbf; }
|
||||
void rata_bloccata(bool rb) { _bloccata = rb; }
|
||||
void codici_analitica(const char * s) { _codici_analitica = s; }
|
||||
|
||||
const TString& causale() const { return _causale; }
|
||||
const TString& descrizione() const { return _descrizione; }
|
||||
@ -337,7 +341,18 @@ void TEC_row::print_on(TPrint_section& body)
|
||||
TForm_item& bloccata = body.find_field(PEC_BLOCCATA);
|
||||
bloccata.set(_bloccata ? "X" : "");
|
||||
|
||||
const TString80 old_prompt(descr.prompt());
|
||||
TForm_item& analitica = body.find_field(PEC_ANALITICA);
|
||||
analitica.set(_codici_analitica);
|
||||
TParagraph_string p(_codici_analitica, analitica.width());
|
||||
const int h = analitica.height();
|
||||
int i;
|
||||
|
||||
for (i = 0; p.get() != NULL && i < h; i++);
|
||||
analitica.section().set_height(p.empty() ? 1 : i);
|
||||
|
||||
|
||||
|
||||
const TString80 old_prompt(descr.prompt());
|
||||
descr.set_prompt(""); // Nasconde temporaneamente il prompt per non stampare i <magic>
|
||||
|
||||
body.update(); // Crea vera riga di stampa
|
||||
@ -556,6 +571,31 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
const TDate data_op(row.get(PART_DATAREG));
|
||||
if (data_op <= form().data_limite_operazione())
|
||||
{
|
||||
TString codanal;
|
||||
|
||||
if (main_app().has_module(CAAUT))
|
||||
{
|
||||
const long numreg = row.get_long(PART_NREG);
|
||||
if (numreg > 0)
|
||||
{
|
||||
TAnal_mov anal_mov(numreg);
|
||||
TRecord_array & rows = anal_mov.body();
|
||||
const int nrows = rows.rows();
|
||||
|
||||
for (int i = 1; i <= nrows; i++)
|
||||
{
|
||||
const TString80 s(anal_mov.row_code(i));
|
||||
|
||||
if (s.full() && codanal.find(s) < 0)
|
||||
{
|
||||
if (codanal.full())
|
||||
codanal << '\n';
|
||||
if (s.full())
|
||||
codanal << s;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (row.is_fattura())
|
||||
{
|
||||
for (int r = 1; r <= row.rate(); r++)
|
||||
@ -563,7 +603,8 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
const TRiga_scadenze& rata = row.rata(r);
|
||||
const TDate data_scad(rata.get(SCAD_DATASCAD));
|
||||
TEC_row& rec = new_row(row, data_scad, rata.importo(in_valuta), r);
|
||||
if (data_scad <= form().data_limite_scaduto())
|
||||
|
||||
if (data_scad <= form().data_limite_scaduto())
|
||||
{
|
||||
const real s = calcola_scaduto(rata, in_valuta);
|
||||
rec.scaduto(s);
|
||||
@ -575,6 +616,7 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
rec.importo_euro(il.valore());
|
||||
}
|
||||
rec.rata_bloccata(rata.get_bool(SCAD_BLOCCATA));
|
||||
rec.codici_analitica(codanal);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -605,6 +647,7 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
riga.esposto(esposto.valore());
|
||||
}
|
||||
}
|
||||
riga.codici_analitica(codanal);
|
||||
|
||||
const TImporto abbuoni(row.importo(in_valuta, 0x2));
|
||||
if (!abbuoni.is_zero())
|
||||
@ -617,6 +660,7 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
il.normalize(sezione);
|
||||
rec.importo_euro(il.valore());
|
||||
}
|
||||
rec.codici_analitica(codanal);
|
||||
}
|
||||
|
||||
TImporto diffcam(row.importo(false, 0x4));
|
||||
@ -625,6 +669,7 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
TEC_row& rec = new_row(row, data_pag, TImporto('D', ZERO), RIGA_DIFFCAM);
|
||||
rec.descrizione(form().describe(PEC_DIFFCAM));
|
||||
rec.importo(diffcam);
|
||||
rec.codici_analitica(codanal);
|
||||
}
|
||||
|
||||
TImporto ritenute(row.importo(false, 0x8));
|
||||
@ -639,6 +684,7 @@ void TEC_array::add_row(const TRiga_partite& row)
|
||||
}
|
||||
else
|
||||
rec.importo(ritenute);
|
||||
rec.codici_analitica(codanal);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1089,7 +1135,12 @@ bool TEC_form::print_game(const TPartita& game)
|
||||
if (printing())
|
||||
{
|
||||
riga.print_on(body);
|
||||
printer().print(body.row(0));
|
||||
body.update();
|
||||
|
||||
const int h = body.height();
|
||||
|
||||
for (int i = 0; i < h; i++)
|
||||
printer().print(body.row(i));
|
||||
}
|
||||
else
|
||||
riga.export_to(*_recordset);
|
||||
@ -1219,6 +1270,15 @@ TEC_form::TEC_form(const TEC_mask& m, bool gesval, bool excel)
|
||||
_in_valuta = gesval && f.get_char(0) == 'X'; // Il profilo e' in valuta se c'e' il flag di valuta
|
||||
_fincatura = f.get_int(1);
|
||||
|
||||
const int oem = ini_get_int(CONFIG_OEM, "MAIN", "OEM", -1);
|
||||
|
||||
if (oem == 0 && main_app().has_module(CAAUT))
|
||||
{
|
||||
TForm_item& codanal = _form->find_field('B', odd_page, PEC_ANALITICA);
|
||||
|
||||
codanal.show();
|
||||
}
|
||||
|
||||
if (!excel)
|
||||
{
|
||||
TPrinter& pr = printer();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define PEC_PAGINA 218
|
||||
#define PEC_UNASSIGNED 219
|
||||
#define PEC_BLOCCATA 220
|
||||
#define PEC_ANALITICA 221
|
||||
|
||||
#define PEC_SALDO 301
|
||||
#define PEC_ABBUONI 302
|
||||
|
Loading…
x
Reference in New Issue
Block a user