Integrate modifiche a pareggio partite e aggiunta voce di menu

git-svn-id: svn://10.65.10.50/branches/R_10_00@22646 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2012-04-24 10:23:55 +00:00
parent 12fe75b20a
commit e9b0bd5311
3 changed files with 59 additions and 48 deletions

@ -35,7 +35,7 @@ const TRectype* TPareggio_tree::node2rec(const TString& id)
if (id.blank() || goto_node(id))
{
const TObject* obj = curr_node();
if (obj->is_kind_of(CLASS_RECTYPE))
if (obj != NULL && obj->is_kind_of(CLASS_RECTYPE))
rec = (const TRectype*)obj;
}
return rec;
@ -514,14 +514,17 @@ bool TPareggio_mask::on_field_event(TOperable_field& o, TField_event e, long jol
break;
case F_NC_TREE:
case F_FT_TREE:
if (e == fe_button || e == fe_modify)
if (e == fe_button || e == fe_modify || e == fe_init)
{
_numreg = 0L;
TTree_field& tf = (TTree_field&)o;
TVariant var;
if (tf.tree()->get_var("PART.NREG", var))
_numreg = var.as_int();
else
_numreg = 0L;
if (tf.tree() != NULL)
{
TVariant var;
if (tf.tree()->get_var("PART.NREG", var))
_numreg = var.as_int();
}
enable(DLG_LINK, _numreg > 0);
bool can_conv = false;
@ -532,6 +535,9 @@ bool TPareggio_mask::on_field_event(TOperable_field& o, TField_event e, long jol
can_conv = mov.read() == NOERR && mov.get_int(MOV_TIPOMOV) == tm_fattura;
}
enable(DLG_RECALC, can_conv);
const bool can_work = _nc.has_root() && _ft.has_root();
enable(DLG_ELABORA, can_work);
}
break;
case DLG_LINK:
@ -546,9 +552,7 @@ bool TPareggio_mask::on_field_event(TOperable_field& o, TField_event e, long jol
case DLG_RECALC:
if (e == fe_button)
{
TTree_field& nc = tfield(F_NC_TREE);
TPareggio_tree* nct = (TPareggio_tree*)nc.tree();
const TRectype* nota = nct->node2rec(EMPTY_STRING);
const TRectype* nota = _nc.node2rec(EMPTY_STRING);
if (nota != NULL && ft2nc(*nota))
refill();
}
@ -594,9 +598,11 @@ TPareggio_mask::TPareggio_mask() : TAutomask("sc0300a"), _numreg(0L)
RCT rct_nc; nc.get_rect(rct_nc);
RCT rct_ft; ft.get_rect(rct_ft);
RCT rct_ms; xvt_vobj_get_client_rect(nc.parent(), &rct_ms);
const int b = rct_nc.left;
rct_nc.right = rct_ft.left-8;
rct_ft.right = rct_ft.left + rct_nc.right - rct_nc.left;
rct_nc.right = rct_ft.left-b;
rct_ft.right = rct_ms.right - b;
nc.set_rect(rct_nc);
ft.set_rect(rct_ft);

@ -6,18 +6,21 @@ BUTTON DLG_ELABORA 2 2
BEGIN
PROMPT 1 1 "Elabora"
PICTURE TOOL_ELABORA
FLAGS "D"
END
BUTTON DLG_RECALC 2 2
BEGIN
PROMPT 2 1 "Converti"
PICTURE TOOL_CONVERT
FLAGS "D"
END
BUTTON DLG_LINK 2 2
BEGIN
PROMPT 3 1 "Collega"
PICTURE TOOL_LINK
FLAGS "D"
END
#include <helpbar.h>
@ -206,26 +209,26 @@ END
TLIST F_NC_TREE 35 -1
BEGIN
PROMPT 0 5 ""
DISPLAY "Partita@12" NUMPART
DISPLAY "Riga@4R" NRIGA
DISPLAY "Data@8" DATADOC
DISPLAY "Importo@10R" IMPORTO
DISPLAY "Residuo@10R" RESIDUO
DISPLAY "Partita@11" NUMPART
//DISPLAY "N.@3R" NRIGA
DISPLAY "Data@7" DATADOC
DISPLAY "Importo@8R" IMPORTO
DISPLAY "Residuo@8R" RESIDUO
DISPLAY "Descrizione Nota di Credito@35" PART.DESCR
DISPLAY "P.N.@6R" NREG
DISPLAY "P.N.@5R" NREG
END
TLIST F_FT_TREE 35 -1
BEGIN
PROMPT 40 5 ""
DISPLAY "Partita@12" NUMPART
DISPLAY "Riga@4R" NRIGA
PROMPT 35 5 ""
DISPLAY "Partita@11" NUMPART
//DISPLAY "N.@3R" NRIGA
DISPLAY "Rata@4R" NRATA
DISPLAY "Scadenza@8" DATASCAD
DISPLAY "Residuo@10R" RESIDUO
DISPLAY "Importo@10R" IMPORTO
DISPLAY "Scadenza@7" DATASCAD
DISPLAY "Residuo@8R" RESIDUO
DISPLAY "Importo@8R" IMPORTO
DISPLAY "Descrizione Fattura@35" PART.DESCR
DISPLAY "P.N.@6R" PART.NREG
DISPLAY "P.N.@5R" PART.NREG
FLAGS "M"
END

@ -1,23 +1,25 @@
[SCMENU_001]
Caption = "Saldaconto"
Picture = <sc01>
Module = 13
Flags = ""
Item_01 = "Saldaconto extracontabile", "sc0 -0", ""
Item_02 = "Stampa scadenzario", "sc2 -1", ""
Item_03 = "Stampa scaduto", "sc2 -2", ""
Item_04 = "Stampa estratti conto", "sc2 -0", ""
Item_05 = "Stampa solleciti", "sc2 -3", ""
Item_06 = "Stampa Previsione Incassi/Pagamenti", "sc2 -5", ""
Item_07 = "Servizio", [SCMENU_002]
[SCMENU_002]
Caption = "Servizio"
Picture = <sc01>
Module = 13
Flags = ""
Item_01 = "Stampa controllo saldi", "sc2 -4", ""
Item_02 = "Creazione saldaconto da saldi", "sc1 -1", ""
Item_03 = "Allineamento Partite", "sc1 -2", "F"
Item_04 = "Abbuoni automatici", "sc1 -3", "F"
[SCMENU_001]
Caption = "Saldaconto"
Picture = <sc01>
Module = 13
Flags = ""
Item_01 = "Visualizzazione partite", "sc0 -1", ""
Item_02 = "Pareggio partite", "sc0 -2", ""
Item_03 = "Stampa scadenzario", "sc2 -1", ""
Item_04 = "Stampa scaduto", "sc2 -2", ""
Item_05 = "Stampa estratti conto", "sc2 -0", ""
Item_06 = "Stampa solleciti", "sc2 -3", ""
Item_07 = "Stampa Previsione Incassi/Pagamenti", "sc2 -5", ""
Item_08 = "Saldaconto extracontabile", "sc0 -0", ""
Item_09 = "Servizio", [SCMENU_002]
[SCMENU_002]
Caption = "Servizio"
Picture = <sc01>
Module = 13
Flags = ""
Item_01 = "Stampa controllo saldi", "sc2 -4", ""
Item_02 = "Creazione saldaconto da saldi", "sc1 -1", ""
Item_03 = "Allineamento Partite", "sc1 -2", "F"
Item_04 = "Abbuoni automatici", "sc1 -3", "F"