git-svn-id: svn://10.65.10.50/branches/R_10_00@23197 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
89ff9d2175
commit
0f8c2ac64f
@ -7,6 +7,7 @@
|
||||
#include <execp.h>
|
||||
#include <progind.h>
|
||||
#include <reprint.h>
|
||||
#include <sheet.h>
|
||||
#include <utility.h>
|
||||
|
||||
#include "orlib.h"
|
||||
@ -266,6 +267,7 @@ void TGenera_ordini_mask::update_sheet()
|
||||
row.add(codart, sf.cid2index(F_CODART));
|
||||
art.read(codart);
|
||||
const real giac = art.giacenza_anno(codmag, "", anno);
|
||||
|
||||
row.add(recset.get(LF_ANAMAG, ANAMAG_DESCR).as_string(), sf.cid2index(F_DESCR));
|
||||
row.add(recset.get("UMART.UM").as_string(), sf.cid2index(F_UM));
|
||||
|
||||
@ -358,7 +360,8 @@ void TGenera_ordini_mask::update_orders()
|
||||
if (fr != NULL)
|
||||
{
|
||||
const int j = sh.cid2index(f->dlg());
|
||||
row.add(fr->read(rel), j);
|
||||
const char* str = fr->read(rel);
|
||||
row.add(str, j);
|
||||
}
|
||||
}
|
||||
const int nrow = sh.items()-1;
|
||||
|
@ -804,6 +804,7 @@ bool TPreventivo_emsk::on_dist_event(TOperable_field& o, TField_event e, long jo
|
||||
switch (o.dlg())
|
||||
{
|
||||
case D_CODDIS:
|
||||
case D_CODART:
|
||||
if (e == fe_modify && !o.empty())
|
||||
{
|
||||
const TString& codart = o.get();
|
||||
@ -837,21 +838,23 @@ bool TPreventivo_emsk::on_dist_event(TOperable_field& o, TField_event e, long jo
|
||||
set_dist(id);
|
||||
}
|
||||
|
||||
TToken_string tok; tok << codart << "|1";
|
||||
const TString& um = cache().get(LF_UMART, tok, "UM");
|
||||
if (um.full())
|
||||
o.mask().set(103, um);
|
||||
TString4 um, iva;
|
||||
const real costo = get_costo(codart, um, iva);
|
||||
TMask& m = o.mask();
|
||||
m.set(D_UM, um);
|
||||
m.set(D_COSTO, costo, 0x3);
|
||||
}
|
||||
break;
|
||||
case D_PREZZO:
|
||||
case D_COSTO:
|
||||
if (e == fe_modify && !o.empty())
|
||||
{
|
||||
const TString& ric = get(F_RICARICO);
|
||||
if (ric.full())
|
||||
{
|
||||
TMask& m = o.mask();
|
||||
const real k = ricarico2perc(ric);
|
||||
const real prezzo = real(o.get()) * k;
|
||||
o.mask().set(o.dlg()+1, prezzo);
|
||||
m.set(o.dlg()+1, prezzo);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1277,9 +1280,13 @@ void TPreventivo_emsk::set_sheet_color(short id, COLOR col)
|
||||
|
||||
TPreventivo_emsk::TPreventivo_emsk() : TPreventivo_msk("pe1400b"), _tree(NULL), _locked(false), _has_db(false)
|
||||
{
|
||||
TMask_field& cdc0 = field(F_CDC0);
|
||||
RCT rct0; cdc0.get_rect(rct0);
|
||||
const int yca = rct0.top / ROWY + 1; // Riga del primo campo di analitica
|
||||
int yca = 21; // Riga del primo campo di analitica
|
||||
TMask_field* grp = find_by_id(F_CDC0);
|
||||
if (grp)
|
||||
{
|
||||
RCT rct0; grp->get_rect(rct0);
|
||||
yca = rct0.top / ROWY + 1;
|
||||
}
|
||||
|
||||
short idcdc = 0, idcms = 0, idfase = 0, idconto = 0;
|
||||
ca_create_fields_ext(*this, 0, 2, yca, F_CDC0+1, idcdc, idcms, idfase, idconto,
|
||||
|
@ -458,7 +458,7 @@ ENDPAGE
|
||||
|
||||
PAGE "Righe" 0 2 0 0
|
||||
|
||||
TLIST F_FASI 60 -1
|
||||
TLIST F_FASI 45 -1
|
||||
BEGIN
|
||||
PROMPT 0 2 ""
|
||||
DISPLAY "Fasi@15" CODART
|
||||
@ -467,56 +467,55 @@ BEGIN
|
||||
DISPLAY "Descrizione@35" DESCR
|
||||
END
|
||||
|
||||
BUTTON F_FASENEW 8 2
|
||||
BUTTON F_FASENEW 3 2
|
||||
BEGIN
|
||||
PROMPT 1 0 "Nuovo"
|
||||
PICTURE BMP_NEWREC
|
||||
PICTURE BMP_NEWRECDN
|
||||
PICTURE 10221
|
||||
END
|
||||
|
||||
BUTTON F_FASEDIT 8 2
|
||||
BUTTON F_FASEDIT 3 2
|
||||
BEGIN
|
||||
PROMPT 12 0 "Modifica"
|
||||
PICTURE BMP_EDIT
|
||||
PROMPT 6 0 "Modifica"
|
||||
PICTURE 10222
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON F_FASEUP 3 2
|
||||
BEGIN
|
||||
PROMPT 23 0 "Su"
|
||||
PROMPT 11 0 "Su"
|
||||
PICTURE BMP_DARROWU
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON F_FASEDN 3 2
|
||||
BEGIN
|
||||
PROMPT 29 0 "Giů"
|
||||
PROMPT 16 0 "Giů"
|
||||
PICTURE BMP_DARROWD
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON F_FASELT 3 2
|
||||
BEGIN
|
||||
PROMPT 35 0 "<<"
|
||||
PROMPT 21 0 "<<"
|
||||
PICTURE BMP_DARROWL
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BUTTON F_FASERT 3 2
|
||||
BEGIN
|
||||
PROMPT 41 0 ">>"
|
||||
PROMPT 26 0 ">>"
|
||||
PICTURE BMP_DARROWR
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
TEXT DLG_NULL
|
||||
BEGIN
|
||||
PROMPT 48 0 "Liv. Fasi "
|
||||
PROMPT 32 0 "Liv. Fasi "
|
||||
END
|
||||
|
||||
LIST F_FASEMAX 1 1
|
||||
BEGIN
|
||||
PROMPT 58 0 ""
|
||||
PROMPT 42 0 ""
|
||||
ITEM "1|1"
|
||||
ITEM "2|2"
|
||||
ITEM "3|3"
|
||||
@ -525,14 +524,14 @@ END
|
||||
|
||||
BOOLEAN F_FASEART
|
||||
BEGIN
|
||||
PROMPT 48 1 "Art.=Ult.liv."
|
||||
PROMPT 32 1 "Art.=Ult.liv."
|
||||
FIELD ADDBOLLI
|
||||
HELP "Usa codice articolo come ultimo livello delle fasi"
|
||||
END
|
||||
|
||||
SPREADSHEET F_DISTINTE 0 11
|
||||
BEGIN
|
||||
PROMPT 65 0 ""
|
||||
PROMPT 50 0 ""
|
||||
IT "Tipo\nVoce@4"
|
||||
IT "Voce Elenco Prezzi@20"
|
||||
IT "Descrizione@50"
|
||||
@ -550,9 +549,9 @@ BEGIN
|
||||
IT "Tot. Costi@16"
|
||||
END
|
||||
|
||||
SPREADSHEET F_ARTICOLI 0 7
|
||||
SPREADSHEET F_ARTICOLI 0 6
|
||||
BEGIN
|
||||
PROMPT 65 11 ""
|
||||
PROMPT 50 12 ""
|
||||
ITEM "Voce Analisi@20"
|
||||
ITEM "Descrizione@50"
|
||||
ITEM "U.M."
|
||||
@ -564,7 +563,7 @@ END
|
||||
|
||||
SPREADSHEET F_MISURE
|
||||
BEGIN
|
||||
PROMPT 65 18 ""
|
||||
PROMPT 50 18 ""
|
||||
ITEM "Descrizione@50"
|
||||
ITEM "Numero@9"
|
||||
ITEM "Lunghezza@9"
|
||||
@ -646,7 +645,7 @@ BEGIN
|
||||
JOIN LF_UMART INTO CODART==CODART NRIGA=1
|
||||
INPUT DESCR D_DESART
|
||||
DISPLAY "Descrizione@50" DESCR
|
||||
DISPLAY "Codice@20" CODDIST
|
||||
DISPLAY "Codice@20" CODART
|
||||
DISPLAY "U.M." LF_UMART->UM
|
||||
DISPLAY "Prezzo@14V" LF_UMART->PREZZO
|
||||
COPY OUTPUT D_CODART
|
||||
|
Loading…
x
Reference in New Issue
Block a user