Patch level :10.0
Files correlati :lv0400.msk Ricompilazione Demo : [ ] Commento :modifiche concordate con tassan il 27-01-2009 git-svn-id: svn://10.65.10.50/trunk@18128 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ae221f29da
commit
2194155ee1
@ -56,6 +56,7 @@
|
||||
#define F_ARTCANFIS 238
|
||||
#define F_GESTSACA 239
|
||||
#define F_ALMANAC 240
|
||||
#define F_USEINDSP 241
|
||||
|
||||
#define S_CODNUM_RIT 101
|
||||
#define S_TIPODOC_RIT 102
|
||||
|
@ -540,7 +540,7 @@ END
|
||||
|
||||
BOOLEAN F_ARTCANFIS
|
||||
BEGIN
|
||||
PROMPT 40 18 "Articolo a canone fisso"
|
||||
PROMPT 30 18 "Articolo a canone fisso"
|
||||
FIELD Artcanfis
|
||||
END
|
||||
|
||||
@ -550,6 +550,12 @@ BEGIN
|
||||
FIELD Gestsaca
|
||||
END
|
||||
|
||||
BOOLEAN F_USEINDSP
|
||||
BEGIN
|
||||
PROMPT 30 19 "Utilizza indirizzo di spedizione su contratto"
|
||||
FIELD Useindsp
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
|
||||
|
113
lv/lv0400.cpp
113
lv/lv0400.cpp
@ -10,6 +10,7 @@
|
||||
#include "../cg/cglib01.h"
|
||||
#include "../mg/anamag.h"
|
||||
#include "../mg/mglib.h"
|
||||
#include "../mg/clifogiac.h"
|
||||
|
||||
long lv_new_contract(long cliente, int indsped)
|
||||
{
|
||||
@ -98,7 +99,7 @@ bool TContratti_msk::on_art_select()
|
||||
rowmask.set(S_CALCCONS,"0");
|
||||
row.add("0",ss.cid2index(S_CALCCONS));
|
||||
|
||||
for (short id=F_IMPFISART; id<=F_IMPFISART+30; id++)
|
||||
for (short id=F_PRZDTTMP; id<=F_PRZDTTMP+35; id++)
|
||||
{
|
||||
const int pos=id2pos(id);
|
||||
if (pos>0)
|
||||
@ -183,6 +184,14 @@ bool TContratti_msk::on_field_event(TOperable_field& o,TField_event e,long jolly
|
||||
fld(pos).set(row.get(ss.cid2index(id-400)));
|
||||
}
|
||||
}
|
||||
if (e==se_query_del)
|
||||
{
|
||||
TSheet_field& ss=(TSheet_field&)o;
|
||||
TToken_string& row=ss.row(ss.selected());
|
||||
const TString codart=row.get(ss.cid2index(S_CODART));
|
||||
if (!yesno_box("Si desidera veramente cancellare l'articolo %s",(const char*) codart))
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case DLG_NEWREC:
|
||||
if (e == fe_button)
|
||||
@ -224,11 +233,15 @@ bool TContratti_msk::on_field_event(TOperable_field& o,TField_event e,long jolly
|
||||
|
||||
TContratti_msk::TContratti_msk():TAutomask("lv0400a"), _post_contr(0)
|
||||
{
|
||||
TConfig* configlv = new TConfig(CONFIG_DITTA,"lv");
|
||||
char indir = configlv->get_char("Useindsp");
|
||||
if (indir!='X')
|
||||
field(F_INDSPED).hide();
|
||||
}
|
||||
|
||||
class TContratti_app: public TRelation_application
|
||||
{
|
||||
TContratti_msk* _msk;
|
||||
TContratti_msk * _msk;
|
||||
TRelation* _rel;
|
||||
|
||||
private:
|
||||
@ -251,6 +264,7 @@ protected:
|
||||
virtual bool remove();
|
||||
virtual void init_query_mode(TMask& m);
|
||||
virtual void init_insert_mode(TMask& m);
|
||||
virtual void init_modify_mode(TMask& m);
|
||||
bool elimina_planning(const long& codcont, const long& codcf) const;
|
||||
bool kill_planning (TISAM_recordset& selrighe) const;
|
||||
};
|
||||
@ -365,10 +379,23 @@ void TContratti_app::save_rows(const TMask& m)
|
||||
}
|
||||
|
||||
TMask& msk=righe.sheet_mask();
|
||||
|
||||
const int colart=righe.cid2index(S_CODART);
|
||||
const int coldotin=righe.cid2index(S_DOTIN);
|
||||
const int coldotod=righe.cid2index(S_DOTOD);
|
||||
const int coldottmp=righe.cid2index(S_DOTTMP);
|
||||
|
||||
TLocalisamfile magcli(LF_CLIFOGIAC);
|
||||
|
||||
const TDate oggi(TODAY);
|
||||
const int year=oggi.year();
|
||||
const long clifo=m.get_long(F_CODCF);
|
||||
const int indsp=m.get_int(F_INDSPED);
|
||||
|
||||
FOR_EACH_SHEET_ROW(righe,r,row)
|
||||
{
|
||||
file.zero();
|
||||
file.put("CODCF",m.get(F_CODCF));
|
||||
file.put("CODCF",clifo);
|
||||
file.put("CODCONT",m.get(F_CODCONT));
|
||||
FOR_EACH_MASK_FIELD(msk,i,f)
|
||||
{
|
||||
@ -379,8 +406,37 @@ void TContratti_app::save_rows(const TMask& m)
|
||||
fr->write(row->get(pos),file.curr());
|
||||
}
|
||||
}
|
||||
if (file.get("CODART").full())
|
||||
const TString80 codart=file.get("CODART");
|
||||
if (codart.full())
|
||||
{
|
||||
file.rewrite_write();
|
||||
|
||||
bool found = false;
|
||||
magcli.zero();
|
||||
if (oggi.month() == 12)
|
||||
{
|
||||
magcli.put(CLIFOGIAC_ANNOES, year+1);
|
||||
magcli.put(CLIFOGIAC_TIPOCF, 'C');
|
||||
magcli.put(CLIFOGIAC_CODCF, clifo);
|
||||
magcli.put(CLIFOGIAC_INDSPED, indsp);
|
||||
magcli.put(CLIFOGIAC_CODART, codart);
|
||||
found = magcli.read()==NOERR;
|
||||
}
|
||||
if (!found)
|
||||
{
|
||||
magcli.zero();
|
||||
magcli.put(CLIFOGIAC_ANNOES, year);
|
||||
magcli.put(CLIFOGIAC_TIPOCF, 'C');
|
||||
magcli.put(CLIFOGIAC_CODCF, clifo);
|
||||
magcli.put(CLIFOGIAC_INDSPED, indsp);
|
||||
magcli.put(CLIFOGIAC_CODART, codart);
|
||||
}
|
||||
magcli.put(CLIFOGIAC_DOTIN,row->get(coldotin));
|
||||
magcli.put(CLIFOGIAC_DOTOD,row->get(coldotod));
|
||||
magcli.put(CLIFOGIAC_DOTTM,row->get(coldottmp));
|
||||
magcli.rewrite_write();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -388,11 +444,58 @@ void TContratti_app::save_rows(const TMask& m)
|
||||
void TContratti_app::init_query_mode(TMask& m)
|
||||
{
|
||||
m.field(F_RAGSOC).enable(m.field(F_CODCF).enabled());
|
||||
|
||||
|
||||
}
|
||||
|
||||
void TContratti_app::init_modify_mode(TMask& m)
|
||||
{
|
||||
TSheet_field& righe=m.sfield(F_RIGHE);
|
||||
|
||||
const int colart=righe.cid2index(S_CODART);
|
||||
const int coldes=righe.cid2index(S_DESCR);
|
||||
const int colum=righe.cid2index(S_UM);
|
||||
const int coldotin=righe.cid2index(S_DOTIN);
|
||||
const int coldotod=righe.cid2index(S_DOTOD);
|
||||
const int coldottmp=righe.cid2index(S_DOTTMP);
|
||||
|
||||
TLocalisamfile magcli(LF_CLIFOGIAC);
|
||||
|
||||
const TDate oggi(TODAY);
|
||||
const int year=oggi.year();
|
||||
const long clifo=m.get_long(F_CODCF);
|
||||
const int indsp=m.get_int(F_INDSPED);
|
||||
|
||||
FOR_EACH_SHEET_ROW(righe,r,row)
|
||||
{
|
||||
const TString80 codart=row->get(colart);
|
||||
righe.disable_cell(r,colart);
|
||||
righe.disable_cell(r,coldes);
|
||||
righe.disable_cell(r,colum);
|
||||
|
||||
for (int y = year + oggi.month() == 12; y >= year; y--)
|
||||
{
|
||||
magcli.put(CLIFOGIAC_ANNOES, y);
|
||||
magcli.put(CLIFOGIAC_TIPOCF, 'C');
|
||||
magcli.put(CLIFOGIAC_CODCF, clifo);
|
||||
magcli.put(CLIFOGIAC_INDSPED, indsp);
|
||||
magcli.put(CLIFOGIAC_CODART, codart);
|
||||
if (magcli.read()==NOERR)
|
||||
{
|
||||
row->add(magcli.get("DOTIN"),coldotin);
|
||||
row->add(magcli.get("DOTOD"),coldotod);
|
||||
row->add(magcli.get("DOTTM"),coldottmp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void TContratti_app::init_insert_mode(TMask& m)
|
||||
{
|
||||
|
||||
const long codcf = m.get_long(F_CODCF);
|
||||
const long indsp = m.get_int(F_INDSPED);
|
||||
const TDate oggi(TODAY);
|
||||
|
10
lv/lv0400.h
10
lv/lv0400.h
@ -39,10 +39,9 @@
|
||||
#define DLG_PLANNING 237
|
||||
#define F_INDSPED 238
|
||||
#define F_PROPOSTA 239
|
||||
#define F_PPCONF 240
|
||||
#define F_TIPOLOGIA 241
|
||||
#define F_COLORE 242
|
||||
#define F_BARCODE 243
|
||||
#define F_TIPOLOGIA 240
|
||||
#define F_COLORE 241
|
||||
#define F_BARCODE 242
|
||||
|
||||
|
||||
// Campi del dettalio sotto lo spreadsheet
|
||||
@ -65,6 +64,7 @@
|
||||
#define F_RITAUDTTMPRIG 527
|
||||
#define F_FATTKG 528
|
||||
#define F_ARROT 529
|
||||
#define F_PPCONF 530
|
||||
|
||||
#define S_CODART 101
|
||||
#define S_DESCR 102
|
||||
@ -95,6 +95,7 @@
|
||||
#define S_RITAUDTTMP 127
|
||||
#define S_FATTKG 128
|
||||
#define S_ARROT 129
|
||||
#define S_PPCONF 130
|
||||
|
||||
#define S_CODCF 301
|
||||
#define S_RAGSOC 302
|
||||
@ -103,7 +104,6 @@
|
||||
#define T_CODCF 401
|
||||
#define T_RAGSOC 402
|
||||
#define T_CODCONT 403
|
||||
#define S_PPCONF 404
|
||||
#define S_PREC 405
|
||||
#define S_QTAMAXXS 406
|
||||
#define S_QTAMAXM 407
|
||||
|
@ -122,7 +122,7 @@ BEGIN
|
||||
ITEM "Tipo\n% val.conv.@9"
|
||||
ITEM "Minimo\nciclaggio@9"
|
||||
ITEM "%Forfait\nCliente@7"
|
||||
ITEM "Causale@7"
|
||||
ITEM "Causale\ndefault@7"
|
||||
ITEM "Ritiro\naut.Dot.Temp.@12"
|
||||
ITEM "Fatturazione\na kg"
|
||||
ITEM "Arrotond."
|
||||
@ -131,7 +131,7 @@ END
|
||||
LISTBOX F_ARTBLOC 1 25
|
||||
BEGIN
|
||||
PROMPT 1 13 "Bloccato "
|
||||
ITEM "0|Non bloccato"
|
||||
ITEM "0|"
|
||||
ITEM "1|Articolo in sostituzione"
|
||||
ITEM "2|Cliente in chiusura"
|
||||
ITEM "3|Contratto in rinnovo"
|
||||
@ -203,7 +203,7 @@ END
|
||||
|
||||
STRING F_CAUSLAVRIG 3
|
||||
BEGIN
|
||||
PROMPT 30 16 "Causale "
|
||||
PROMPT 30 16 "Causale di default "
|
||||
USE &CAU
|
||||
INPUT CODTAB F_CAUSLAVRIG
|
||||
DISPLAY "Codice" CODTAB
|
||||
@ -401,7 +401,7 @@ END
|
||||
|
||||
STRING F_CAUSLAV 3
|
||||
BEGIN
|
||||
PROMPT 2 13 "Causale "
|
||||
PROMPT 2 13 "Causale di default"
|
||||
USE &CAU
|
||||
INPUT CODTAB F_CAUSLAV
|
||||
DISPLAY "Codice" CODTAB
|
||||
@ -628,7 +628,7 @@ END
|
||||
LISTBOX S_ARTBLOC 1 25
|
||||
BEGIN
|
||||
PROMPT 2 4 "Bloccato "
|
||||
ITEM "0|Non bloccato"
|
||||
ITEM "0|No"
|
||||
ITEM "1|Articolo in sostituzione"
|
||||
ITEM "2|Cliente in chiusura"
|
||||
ITEM "3|Contratto in rinnovo"
|
||||
@ -824,7 +824,7 @@ END
|
||||
|
||||
STRING S_CAUSLAV 3
|
||||
BEGIN
|
||||
PROMPT 2 20 "Causale "
|
||||
PROMPT 2 20 "Causale di default"
|
||||
USE &CAU
|
||||
INPUT CODTAB S_CAUSLAV
|
||||
DISPLAY "Codice" CODTAB
|
||||
|
Loading…
x
Reference in New Issue
Block a user