Patch level : 10.0 286
Files correlati : pe0.exe Ricompilazione Demo : [ ] Commento : Preventivi/incarichi (Dinamica) git-svn-id: svn://10.65.10.50/trunk@18760 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f2abce1129
commit
854ffdf4f6
@ -201,9 +201,10 @@ bool TGestione_preventivo_msk::ss_notify(TSheet_field& ss, int r, KEY key)
|
||||
|
||||
void TGestione_preventivo_msk::highlight_row(int row, COLOR back, COLOR fore, bool dirty, bool update)
|
||||
{
|
||||
TDocumento_mask::highlight_row(row, back, fore, dirty, false);
|
||||
TRiga_documento& rigadoc = doc()[row + 1];
|
||||
TSheet_field& sf = sfield(F_SHEET);
|
||||
COLOR back1 = NORMAL_BACK_COLOR, back2 = COLOR_BLUE;
|
||||
COLOR back1 = back, back2 = COLOR_BLUE;
|
||||
const TColor_rule * c = (TColor_rule *) color_rules().objptr(_rule);
|
||||
|
||||
if (c != NULL)
|
||||
@ -211,7 +212,8 @@ void TGestione_preventivo_msk::highlight_row(int row, COLOR back, COLOR fore, bo
|
||||
back = blend_colors(back1, back2, 1.0 - (((double) rigadoc.get_int(RDOC_LEVEL)) / 10.0));
|
||||
|
||||
sf.set_back_and_fore_color(back, fore, row);
|
||||
TDocumento_mask::highlight_row(row, back, fore, dirty, update);
|
||||
if (update)
|
||||
sf.force_update(row);
|
||||
}
|
||||
|
||||
TVariable_mask * TGestione_preventivo_msk::riga_mask(int numriga)
|
||||
|
@ -146,7 +146,6 @@ void TGenerazione_ordine::post_process_output(TLista_documenti& doc_out)
|
||||
if (scontoexpr2perc(k, false, ge, perc))
|
||||
importo *= (2 - perc);
|
||||
total += importo;
|
||||
doc.destroy_row(r, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -161,6 +160,14 @@ void TGenerazione_ordine::post_process_output(TLista_documenti& doc_out)
|
||||
total = ZERO;
|
||||
}
|
||||
}
|
||||
for (int r = rows; r > 0; r--)
|
||||
{
|
||||
TRiga_documento & row = (TRiga_documento &)doc[r];
|
||||
const int level = row.get_int(RDOC_LEVEL);
|
||||
|
||||
if (level != 0)
|
||||
doc.destroy_row(r, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -258,23 +265,29 @@ void TGenEsecutivo_app::main_loop()
|
||||
|
||||
doc_in.add(srcdoc);
|
||||
e.elabora(doc_in, doc_out, data);
|
||||
// doc_in.rewrite();
|
||||
doc_in.rewrite();
|
||||
doc_out.write();
|
||||
doc_in.destroy(-1);
|
||||
{
|
||||
const TDocumento & esecutivo = doc_out[0];
|
||||
for (int r = esecutivo.physical_rows(); r > 0; r--)
|
||||
{
|
||||
TRiga_documento & outrow = (TRiga_documento &) esecutivo[r];
|
||||
const TRiga_documento & srcrow = srcdoc[r];
|
||||
TDocumento esecutivo((const TRectype &)doc_out[0]);
|
||||
|
||||
outrow.set_original_rdoc_key(srcrow);
|
||||
}
|
||||
doc_in.add(esecutivo);
|
||||
}
|
||||
doc_in.add(esecutivo);
|
||||
doc_out.destroy(-1);
|
||||
o.elabora(doc_in, doc_out, data);
|
||||
doc_in.rewrite();
|
||||
TDocumento & doc_dest = doc_out[0];
|
||||
for (int r = doc_dest.physical_rows(); r > 0; r--)
|
||||
{
|
||||
TRiga_documento & row = (TRiga_documento &) doc_dest[r];
|
||||
const TRiga_documento * r0 = (const TRiga_documento *)row.find_original_rdoc();
|
||||
|
||||
if (r0 != NULL)
|
||||
{
|
||||
const TRiga_documento * r1 = (const TRiga_documento *)r0->find_original_rdoc();
|
||||
|
||||
if (r1 != NULL)
|
||||
row.set_original_rdoc_key(*r1);
|
||||
}
|
||||
}
|
||||
doc_out.write();
|
||||
}
|
||||
}
|
||||
|
@ -30,24 +30,33 @@ void TGenerazione_ordine_produzione::post_process_output(TLista_documenti& doc_o
|
||||
{
|
||||
TDocumento& doc = doc_out[d];
|
||||
const int rows = doc.physical_rows();
|
||||
int max_level = 0;
|
||||
TBit_array to_delete;
|
||||
|
||||
for (int r = 1; r <= rows; r++)
|
||||
for (int r = 1; r <= rows - 1; r++)
|
||||
{
|
||||
TRiga_documento & row = (TRiga_documento &)doc[r];
|
||||
const int level = row.get_int(RDOC_LEVEL);
|
||||
const int next_level = doc[r + 1].get_int(RDOC_LEVEL);
|
||||
|
||||
if (max_level < level)
|
||||
max_level = level;
|
||||
to_delete.set(r, !row.is_merce() || level >= next_level);
|
||||
}
|
||||
to_delete.set(rows, true);
|
||||
for (int r = rows; r >= 1; r--)
|
||||
{
|
||||
TRiga_documento & row = (TRiga_documento &)doc[r];
|
||||
|
||||
if (!row.is_merce() || row.get_int(RDOC_LEVEL) == max_level)
|
||||
if (to_delete[r])
|
||||
doc.destroy_row(r, true);
|
||||
}
|
||||
}
|
||||
for (int d = items - 1; d >= 0; d--)
|
||||
{
|
||||
TDocumento& doc = doc_out[d];
|
||||
const int rows = doc.physical_rows();
|
||||
|
||||
if (rows == 0)
|
||||
doc_out.destroy(d, true);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
@ -72,21 +81,21 @@ void TGenerazione_ordine_acquisto::post_process_output(TLista_documenti& doc_out
|
||||
{
|
||||
TDocumento& doc = doc_out[d];
|
||||
const int rows = doc.physical_rows();
|
||||
int max_level = -883;
|
||||
TBit_array to_delete;
|
||||
|
||||
for (int r = 1; r <= rows; r++)
|
||||
for (int r = 1; r <= rows - 1; r++)
|
||||
{
|
||||
TRiga_documento & row = (TRiga_documento &)doc[r];
|
||||
const int level = row.get_int("LEVEL");
|
||||
const int level = row.get_int(RDOC_LEVEL);
|
||||
const int next_level = doc[r + 1].get_int(RDOC_LEVEL);
|
||||
|
||||
if (max_level < level)
|
||||
max_level = level;
|
||||
to_delete.set(r, !row.is_merce() || level < next_level);
|
||||
}
|
||||
for (int r = rows; r >= 1; r--)
|
||||
{
|
||||
TRiga_documento & row = (TRiga_documento &)doc[r];
|
||||
|
||||
if (!row.is_merce() || row.get_int(RDOC_LEVEL) < max_level)
|
||||
if (to_delete[r])
|
||||
doc.destroy_row(r, true);
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define F_FROM_FRNDOC 206
|
||||
#define F_FROM_TONDOC 207
|
||||
#define F_CODICE_ORP 208
|
||||
#define F_DESCR_ORP 209
|
||||
#define F_DESC_ORP 209
|
||||
#define F_CODICE_ORA 210
|
||||
#define F_DESCR_ORA 211
|
||||
#define F_DESC_ORA 211
|
||||
#define F_DATA 212
|
||||
|
@ -89,7 +89,7 @@ END
|
||||
|
||||
STRING F_CODICE_ORP 8
|
||||
BEGIN
|
||||
PROMPT 2 6 "Ordini di prod. "
|
||||
PROMPT 2 6 "Fabbisogni "
|
||||
FLAG "U"
|
||||
USE %ELD SELECT I0==4
|
||||
INPUT CODTAB F_CODICE_ORP
|
||||
@ -103,7 +103,7 @@ END
|
||||
|
||||
STRING F_DESC_ORP 50 43
|
||||
BEGIN
|
||||
PROMPT 30 6 ""
|
||||
PROMPT 24 6 ""
|
||||
USE %ELD KEY 2 SELECT I0==4
|
||||
INPUT S0 F_DESC_ORP
|
||||
DISPLAY "Descrizione@55" S0
|
||||
@ -113,7 +113,7 @@ END
|
||||
|
||||
STRING F_CODICE_ORA 8
|
||||
BEGIN
|
||||
PROMPT 2 7 "Ordini di acq. "
|
||||
PROMPT 2 7 "Acquisti "
|
||||
FLAG "U"
|
||||
USE %ELD SELECT I0==4
|
||||
INPUT CODTAB F_CODICE_ORA
|
||||
@ -127,7 +127,7 @@ END
|
||||
|
||||
STRING F_DESC_ORA 50 43
|
||||
BEGIN
|
||||
PROMPT 30 7 ""
|
||||
PROMPT 24 7 ""
|
||||
USE %ELD KEY 2 SELECT I0==4
|
||||
INPUT S0 F_DESC_ORA
|
||||
DISPLAY "Descrizione@55" S0
|
||||
@ -137,7 +137,7 @@ END
|
||||
|
||||
DATE F_DATA
|
||||
BEGIN
|
||||
PROMPT 1 9 "Data "
|
||||
PROMPT 2 9 "Data "
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
Loading…
x
Reference in New Issue
Block a user