Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento : aggiunti i campi datacomp e datafcomp all'analitica sui documenti; aggiunti gli stessi campi nel file delle testate; aggiunta la loro trattazione nella elaborazione analitica git-svn-id: svn://10.65.10.50/trunk@20338 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
3a674681a7
commit
144b559cd7
@ -1,3 +1,3 @@
|
|||||||
33
|
33
|
||||||
0
|
0
|
||||||
$doc|891|912|543|0|Documenti di vendita|NDOC||
|
$doc|||559|0|Documenti di vendita|NDOC||
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
33
|
33
|
||||||
85
|
87
|
||||||
CODNUM|1|4|0|Codice della numerazione
|
CODNUM|1|4|0|Codice della numerazione
|
||||||
ANNO|2|4|0|Anno
|
ANNO|2|4|0|Anno
|
||||||
PROVV|1|1|0|Tipo numerazione <P>rovvisorio <D>efinitivo
|
PROVV|1|1|0|Tipo numerazione <P>rovvisorio <D>efinitivo
|
||||||
@ -85,6 +85,8 @@ DATASCIMP|5|8|0|Data fine impegno
|
|||||||
SIGNATURE|2|2|0|Livello firma di autorizzazione a procedere
|
SIGNATURE|2|2|0|Livello firma di autorizzazione a procedere
|
||||||
TIPOCFFATT|1|1|0|Tipo <C>liente <F>ornitore cui fatturare
|
TIPOCFFATT|1|1|0|Tipo <C>liente <F>ornitore cui fatturare
|
||||||
CODCFFATT|3|6|0|Codice cliente (fornitore) cui fatturare
|
CODCFFATT|3|6|0|Codice cliente (fornitore) cui fatturare
|
||||||
|
DATACOMP|5|8|0|Data inizio competenza in analitica
|
||||||
|
DATAFCOMP|5|8|0|Data fine competenza in analitica
|
||||||
4
|
4
|
||||||
PROVV+ANNO+CODNUM+NDOC|
|
PROVV+ANNO+CODNUM+NDOC|
|
||||||
TIPOCF+CODCF+PROVV+ANNO+DATADOC+CODNUM+NDOC|X
|
TIPOCF+CODCF+PROVV+ANNO+DATADOC+CODNUM+NDOC|X
|
||||||
|
@ -481,7 +481,7 @@ void TContabilizzazione_analitica::init_distrib(TString_array& conti, TGeneric_d
|
|||||||
|
|
||||||
bool TContabilizzazione_analitica::elabora(TDocumento& doc, long numreg_cg, TViswin* viswin, bool can_write, TAnal_mov& mov, bool riclassifica_fdr_fde)
|
bool TContabilizzazione_analitica::elabora(TDocumento& doc, long numreg_cg, TViswin* viswin, bool can_write, TAnal_mov& mov, bool riclassifica_fdr_fde)
|
||||||
{
|
{
|
||||||
TDate datareg, datacomp, datadoc;
|
TDate datareg, datacomp, datafcomp, datadoc;
|
||||||
int annoes = 0;
|
int annoes = 0;
|
||||||
TString descr, msg, codcaus;
|
TString descr, msg, codcaus;
|
||||||
bool dare = false;
|
bool dare = false;
|
||||||
@ -498,9 +498,15 @@ bool TContabilizzazione_analitica::elabora(TDocumento& doc, long numreg_cg, TVis
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
datadoc = doc.get(DOC_DATADOC);
|
datadoc = doc.get_date(DOC_DATADOC);
|
||||||
datareg = datacomp = datadoc;
|
datacomp = doc.get_date(DOC_DATACOMP);
|
||||||
annoes = esercizi().date2esc(datareg);
|
if (!datacomp.ok())
|
||||||
|
datacomp = datadoc;
|
||||||
|
datafcomp = doc.get_date(DOC_DATAFCOMP);
|
||||||
|
if (!datafcomp.ok())
|
||||||
|
datafcomp = datacomp;
|
||||||
|
datareg = datadoc;
|
||||||
|
annoes = esercizi().date2esc(datareg); //ci potrebbe andare datacomp?Allì'analisi l'ardua sentenza
|
||||||
doc.riferimento(descr);
|
doc.riferimento(descr);
|
||||||
if (descr.empty())
|
if (descr.empty())
|
||||||
descr = doc.tipo().descrizione();
|
descr = doc.tipo().descrizione();
|
||||||
@ -545,6 +551,7 @@ bool TContabilizzazione_analitica::elabora(TDocumento& doc, long numreg_cg, TVis
|
|||||||
}
|
}
|
||||||
mov.put(MOVANA_DATAREG, datareg);
|
mov.put(MOVANA_DATAREG, datareg);
|
||||||
mov.put(MOVANA_DATACOMP, datacomp);
|
mov.put(MOVANA_DATACOMP, datacomp);
|
||||||
|
mov.put(MOVANA_DATAFCOMP, datafcomp);
|
||||||
mov.put(MOVANA_DATADOC, datadoc);
|
mov.put(MOVANA_DATADOC, datadoc);
|
||||||
mov.put(MOVANA_ANNOES, annoes);
|
mov.put(MOVANA_ANNOES, annoes);
|
||||||
mov.put(MOVANA_DESCR, descr);
|
mov.put(MOVANA_DESCR, descr);
|
||||||
|
@ -138,9 +138,9 @@ TDocumento_mask::TDocumento_mask(const char* td)
|
|||||||
{
|
{
|
||||||
TConfig& caini = ca_config();
|
TConfig& caini = ca_config();
|
||||||
_ges_ca = caini.get("Level", NULL, 1).full();
|
_ges_ca = caini.get("Level", NULL, 1).full();
|
||||||
|
if (_ges_ca)
|
||||||
|
insert_anal_page();
|
||||||
}
|
}
|
||||||
if (_ges_ca)
|
|
||||||
insert_anal_page();
|
|
||||||
|
|
||||||
configura_sheet(*_sheet);
|
configura_sheet(*_sheet);
|
||||||
|
|
||||||
@ -483,6 +483,15 @@ void TDocumento_mask::insert_anal_page()
|
|||||||
|
|
||||||
if (use_fsc && fasinfo.parent() <= 0)
|
if (use_fsc && fasinfo.parent() <= 0)
|
||||||
insert_anal_fields(*this, newpage, LF_FASI, y, dlg, dlgd, fsc_req);
|
insert_anal_fields(*this, newpage, LF_FASI, y, dlg, dlgd, fsc_req);
|
||||||
|
|
||||||
|
//aggiunge campi per date di competenza (inizio e fine)
|
||||||
|
add_groupbox(DLG_NULL, newpage, TR("Date di competenza"), 1, 20, 78, 3);
|
||||||
|
TString16 f_datacomp = DOC_DATACOMP;
|
||||||
|
add_date(F_DATACOMP, newpage, "Inizio ", 2, 21).set_field(f_datacomp);
|
||||||
|
TString16 f_datafcomp = DOC_DATAFCOMP;
|
||||||
|
add_date(F_DATAFCOMP, newpage, "Fine ", 25, 21).set_field(f_datafcomp);
|
||||||
|
set_field_handler(F_DATACOMP, datacomp_handler); //gestore del campo inizio competenza..
|
||||||
|
set_field_handler(F_DATAFCOMP, datafcomp_handler); //..e della fine competenza
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDocumento_mask::configura_sheet(TSheet_field& sheet)
|
void TDocumento_mask::configura_sheet(TSheet_field& sheet)
|
||||||
|
@ -2905,4 +2905,37 @@ bool peso_conai_handler(TMask_field& f, KEY key )
|
|||||||
f.set(articolo.get(conai_peso_name(type, LF_ANAMAG)));
|
f.set(articolo.get(conai_peso_name(type, LF_ANAMAG)));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool datacomp_handler(TMask_field& f, KEY key)
|
||||||
|
{
|
||||||
|
if (key == K_F8)
|
||||||
|
f.set(f.mask().get(F_DATADOC));
|
||||||
|
|
||||||
|
if (f.to_check(key, false))
|
||||||
|
{
|
||||||
|
const TDate datadoc = f.mask().get_date(F_DATADOC);
|
||||||
|
const TEsercizi_contabili es_doc;
|
||||||
|
int anno_doc = es_doc.date2esc(datadoc);
|
||||||
|
|
||||||
|
const TDate datacomp = f.get();
|
||||||
|
const TEsercizi_contabili es_comp;
|
||||||
|
int anno_comp = es_comp.date2esc(datacomp);
|
||||||
|
|
||||||
|
if (anno_doc != anno_comp)
|
||||||
|
return error_box("La data inizio competenza deve appartenere all'esercizio del documento!");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool datafcomp_handler(TMask_field& f, KEY key)
|
||||||
|
{
|
||||||
|
if (f.to_check(key, false))
|
||||||
|
{
|
||||||
|
const TDate datacomp = f.mask().get_date(F_DATACOMP);
|
||||||
|
const TDate datafcomp = f.get();
|
||||||
|
if (datafcomp < datacomp)
|
||||||
|
return error_box("La data fine competenza non puo' essere antecedente alla data inizio competenza!");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
@ -37,6 +37,8 @@ bool distinta_link_handler(TMask_field& f, KEY key );
|
|||||||
bool gen_livelli_handler(TMask_field& f, KEY key );
|
bool gen_livelli_handler(TMask_field& f, KEY key );
|
||||||
bool peso_conai_handler(TMask_field& f, KEY key );
|
bool peso_conai_handler(TMask_field& f, KEY key );
|
||||||
bool sottocat_conai_handler(TMask_field& f, KEY key );
|
bool sottocat_conai_handler(TMask_field& f, KEY key );
|
||||||
|
bool datacomp_handler(TMask_field& f, KEY key);
|
||||||
|
bool datafcomp_handler(TMask_field& f, KEY key);
|
||||||
|
|
||||||
bool codcms_handler(TMask_field &f, KEY key);
|
bool codcms_handler(TMask_field &f, KEY key);
|
||||||
bool numdocrif_hndl(TMask_field& field, KEY key);
|
bool numdocrif_hndl(TMask_field& field, KEY key);
|
||||||
|
@ -115,6 +115,8 @@
|
|||||||
#define F_CDC12 262
|
#define F_CDC12 262
|
||||||
#define F_DESCDC1 271
|
#define F_DESCDC1 271
|
||||||
#define F_DESCDC12 282
|
#define F_DESCDC12 282
|
||||||
|
#define F_DATACOMP 291
|
||||||
|
#define F_DATAFCOMP 292
|
||||||
//#define F_SELECT 101
|
//#define F_SELECT 101
|
||||||
|
|
||||||
//scontrini
|
//scontrini
|
||||||
|
Loading…
x
Reference in New Issue
Block a user