Patch level : 10.0 patch ???
Files correlati : lv2 lv2400a.msk Ricompilazione Demo : [ ] Commento : Soddisfatta la richiesta dell'analisi "Generazione Buoni di Prelievo / Consegna" git-svn-id: svn://10.65.10.50/branches/R_10_00@21849 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f5e5b91245
commit
b96988446a
@ -33,7 +33,22 @@ public:
|
|||||||
|
|
||||||
//ON_FIELD_EVENT: questo metodo gestisce i vari eventi che si verificano sui campi della maschera
|
//ON_FIELD_EVENT: questo metodo gestisce i vari eventi che si verificano sui campi della maschera
|
||||||
bool TGenera_documenti_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
bool TGenera_documenti_msk::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
{
|
{
|
||||||
|
switch (o.dlg())
|
||||||
|
{
|
||||||
|
case F_DTDOC:
|
||||||
|
if(e == fe_modify)
|
||||||
|
{
|
||||||
|
const TDate oggi(TODAY);
|
||||||
|
if(get_date(F_DTDOC) <= oggi)
|
||||||
|
{
|
||||||
|
warning_box(TR("Attenzione: la data documento non può essere nel passato"));
|
||||||
|
o.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
@ -130,7 +145,7 @@ bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_rep
|
|||||||
const int coditi = plan.get(LVRCONSPLAN_CODITI).as_int();
|
const int coditi = plan.get(LVRCONSPLAN_CODITI).as_int();
|
||||||
TString8 codaut = plan.get(LVRCONSPLAN_CODAUT).as_string().right(5); codaut.trim();
|
TString8 codaut = plan.get(LVRCONSPLAN_CODAUT).as_string().right(5); codaut.trim();
|
||||||
|
|
||||||
const int anno = dtcons.year();
|
const int anno = _msk->get_bool(F_DTEMIS) ? _msk->get_date(F_DTDOC).year() : dtcons.year();
|
||||||
|
|
||||||
//preparo la chiave per la tabella contratti
|
//preparo la chiave per la tabella contratti
|
||||||
TToken_string keycont;
|
TToken_string keycont;
|
||||||
@ -262,7 +277,10 @@ bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_rep
|
|||||||
//creo il documento corretto riempiendo i campi che già conosco
|
//creo il documento corretto riempiendo i campi che già conosco
|
||||||
TDocumento doc('D', anno, codnum, ++_ndoc);
|
TDocumento doc('D', anno, codnum, ++_ndoc);
|
||||||
doc.put(DOC_TIPODOC, tpdoc);
|
doc.put(DOC_TIPODOC, tpdoc);
|
||||||
doc.put(DOC_DATADOC, dtcons);
|
if(_msk->get_bool(F_DTEMIS))
|
||||||
|
doc.put(DOC_DATADOC, _msk->get_date(F_DTDOC));
|
||||||
|
else
|
||||||
|
doc.put(DOC_DATADOC, dtcons);
|
||||||
doc.put(DOC_TIPOCF, 'C');
|
doc.put(DOC_TIPOCF, 'C');
|
||||||
doc.put(DOC_CODCF, codcli);
|
doc.put(DOC_CODCF, codcli);
|
||||||
doc.put(DOC_CODCONT, codcont);
|
doc.put(DOC_CODCONT, codcont);
|
||||||
|
@ -9,4 +9,6 @@
|
|||||||
#define F_DESCRAUT 109
|
#define F_DESCRAUT 109
|
||||||
#define F_CODCF 110
|
#define F_CODCF 110
|
||||||
#define F_RAGSOCCLI 111
|
#define F_RAGSOCCLI 111
|
||||||
#define F_STAMPA 112
|
#define F_DTEMIS 112
|
||||||
|
#define F_DTDOC 113
|
||||||
|
#define F_STAMPA 114
|
@ -17,13 +17,6 @@ BEGIN
|
|||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
END
|
END
|
||||||
|
|
||||||
/*DATE F_DTDOC
|
|
||||||
BEGIN
|
|
||||||
PROMPT 50 2 "Data documento "
|
|
||||||
FLAGS "A"
|
|
||||||
CHECKTYPE REQUIRED
|
|
||||||
END*/
|
|
||||||
|
|
||||||
LISTBOX F_TPGEN 1 37
|
LISTBOX F_TPGEN 1 37
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 3 "Generare i documenti "
|
PROMPT 2 3 "Generare i documenti "
|
||||||
@ -118,14 +111,28 @@ BEGIN
|
|||||||
CHECKTYPE NORMAL
|
CHECKTYPE NORMAL
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 76 3
|
GROUPBOX DLG_NULL 76 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 9 "@bParametri di stampa"
|
PROMPT 1 9 "@bParametri di stampa"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_DTEMIS
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 10 "Imposta la data documento"
|
||||||
|
MESSAGE TRUE SHOW,F_DTDOC
|
||||||
|
MESSAGE FALSE HIDE,F_DTDOC
|
||||||
|
END
|
||||||
|
|
||||||
|
DATE F_DTDOC
|
||||||
|
BEGIN
|
||||||
|
PROMPT 30 10 "Data documento "
|
||||||
|
FLAGS "A"
|
||||||
|
CHECKTYPE REQUIRED
|
||||||
|
END
|
||||||
|
|
||||||
BOOLEAN F_STAMPA
|
BOOLEAN F_STAMPA
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 10 "Stampa automatica buoni"
|
PROMPT 2 11 "Stampa automatica buoni"
|
||||||
END
|
END
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user