Patch level :10.0

Files correlati     :lv0.exe, lv0400a.msk
Ricompilazione Demo : [ ]
Commento            :
modifiche concordate con Tassan


git-svn-id: svn://10.65.10.50/trunk@18198 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
rajitgill 2009-02-03 16:34:50 +00:00
parent 34d958daf8
commit 467ab3128d
4 changed files with 46 additions and 18 deletions

Binary file not shown.

View File

@ -48,6 +48,7 @@ long lv_new_contract(long cliente, int indsped)
class TContratti_msk: public TAutomask class TContratti_msk: public TAutomask
{ {
long _post_contr; long _post_contr;
TString80 _artrig;
protected: protected:
bool on_art_select(); bool on_art_select();
@ -99,7 +100,7 @@ bool TContratti_msk::on_art_select()
rowmask.set(S_CALCCONS,"0"); rowmask.set(S_CALCCONS,"0");
row.add("0",ss.cid2index(S_CALCCONS)); row.add("0",ss.cid2index(S_CALCCONS));
for (short id=F_PRZDTTMP; id<=F_PRZDTTMP+35; id++) for (short id=F_CODART; id<=F_CODART+35; id++)
{ {
const int pos=id2pos(id); const int pos=id2pos(id);
if (pos>0) if (pos>0)
@ -153,18 +154,31 @@ bool TContratti_msk::on_field_event(TOperable_field& o,TField_event e,long jolly
{ {
if (e==fe_modify) if (e==fe_modify)
{ {
TArticolo art(o.get()); const TString& codart=o.get();
TSheet_field& ss=sfield(F_RIGHE);
TMask& m = o.mask(); // maschera di riga!
if (_artrig.full() && codart!=_artrig)
{
if (!yesno_box("Si desidera veramente modificare l'articolo %s",(const char*) _artrig))
{
m.set(S_CODART,_artrig);
TToken_string& row=ss.row(ss.selected());
row.add(_artrig, 0);
ss.force_update(ss.selected());
}
else
_artrig = codart;
}
TArticolo art(codart);
if (art.um().rows() > 0) if (art.um().rows() > 0)
{ {
TSheet_field& ss=sfield(F_RIGHE);
TMask& m = o.mask(); // maschera di riga!
const TString& um = art.um()[1].get(UMART_UM); const TString& um = art.um()[1].get(UMART_UM);
m.set(S_UM,um); m.set(S_UM,um);
TToken_string& row=ss.row(ss.selected()); TToken_string& row=ss.row(ss.selected());
row.add(o.get(),ss.cid2index(S_CODART)); row.add(o.get(),ss.cid2index(S_CODART));
row.add(um,S_UM); row.add(um,S_UM);
on_art_select(); on_art_select();
} }
} }
else else
@ -183,6 +197,7 @@ bool TContratti_msk::on_field_event(TOperable_field& o,TField_event e,long jolly
if (pos>0) if (pos>0)
fld(pos).set(row.get(ss.cid2index(id-400))); fld(pos).set(row.get(ss.cid2index(id-400)));
} }
_artrig=row.get(0);
} }
if (e==se_query_del) if (e==se_query_del)
{ {
@ -468,9 +483,9 @@ void TContratti_app::init_modify_mode(TMask& m)
FOR_EACH_SHEET_ROW(righe,r,row) FOR_EACH_SHEET_ROW(righe,r,row)
{ {
const TString80 codart=row->get(colart); const TString80 codart=row->get(colart);
righe.disable_cell(r,colart); // righe.disable_cell(r,colart);
righe.disable_cell(r,coldes); // righe.disable_cell(r,coldes);
righe.disable_cell(r,colum); // righe.disable_cell(r,colum);
for (int y = year + oggi.month() == 12; y >= year; y--) for (int y = year + oggi.month() == 12; y >= year; y--)
{ {

View File

@ -46,6 +46,8 @@
// Campi del dettalio sotto lo spreadsheet // Campi del dettalio sotto lo spreadsheet
#define F_CODART 501
#define F_DESART 502
#define F_CAUSLAVDESCRIG 512 #define F_CAUSLAVDESCRIG 512
#define F_PRZDTTMP 513 #define F_PRZDTTMP 513
#define F_INDTTEMP 514 #define F_INDTTEMP 514
@ -75,9 +77,9 @@
#define S_SCONTO 107 #define S_SCONTO 107
#define S_DOTIN 108 #define S_DOTIN 108
#define S_DOTOD 109 #define S_DOTOD 109
#define S_CONSMESE 110 #define S_DOTTMP 110
#define S_CONSANNO 111 #define S_CONSMESE 111
#define S_DOTTMP 112 #define S_CONSANNO 112
#define S_PRZDTTMP 113 #define S_PRZDTTMP 113
#define S_INDTTEMP 114 #define S_INDTTEMP 114
#define S_FIDTTEMP 115 #define S_FIDTTEMP 115

View File

@ -46,7 +46,7 @@ END
STRING F_RAGSOC 50 30 STRING F_RAGSOC 50 30
BEGIN BEGIN
PROMPT 19 1 "" PROMPT 2 2 "Ragione sociale"
KEY 1 KEY 1
USE LF_CLIFO KEY 2 USE LF_CLIFO KEY 2
INPUT TIPOCF "C" INPUT TIPOCF "C"
@ -95,10 +95,9 @@ BEGIN
CHECKTYPE NORMAL CHECKTYPE NORMAL
END END
STRING F_RICALT 30 STRING F_RICALT 30 15
BEGIN BEGIN
PROMPT 2 2 "Ricerca Alt. " PROMPT 19 1 "Ricerca Alt."
FIELD RICALT
KEY 6 KEY 6
USE LF_CLIFO KEY 6 USE LF_CLIFO KEY 6
INPUT TIPOCF F_TIPOCF SELECT INPUT TIPOCF F_TIPOCF SELECT
@ -122,9 +121,9 @@ BEGIN
ITEM "Sconto %@5" ITEM "Sconto %@5"
ITEM "Dot.\nIniz.@5" ITEM "Dot.\nIniz.@5"
ITEM "Dot.\nOd.@5" ITEM "Dot.\nOd.@5"
ITEM "Dot.\nTemp.@5"
ITEM "Cons.\nmese@6" ITEM "Cons.\nmese@6"
ITEM "Cons.\nanno@6" ITEM "Cons.\nanno@6"
ITEM "Dot.\nTemp.@5"
ITEM "Prezzo\nDot.Temp." ITEM "Prezzo\nDot.Temp."
ITEM "Inizio\nDot.Temp." ITEM "Inizio\nDot.Temp."
ITEM "Fine\nDot.Temp." ITEM "Fine\nDot.Temp."
@ -144,6 +143,18 @@ BEGIN
ITEM "Arrotond." ITEM "Arrotond."
END END
STRING F_CODART 20
BEGIN
PROMPT 1 12 "Articolo"
FLAGS "D"
END
STRING F_DESART 50 40
BEGIN
PROMPT 35 12 ""
FLAGS "D"
END
LISTBOX F_ARTBLOC 1 25 LISTBOX F_ARTBLOC 1 25
BEGIN BEGIN
PROMPT 1 13 "Bloccato " PROMPT 1 13 "Bloccato "