Patch level : 10.0 850
Files correlati : mr2.exe Ricompilazione Demo : [ ] Commento : Aggiunta funzionwe per spostare una cella o una colonna ad una certa data con F8 sulla cella git-svn-id: svn://10.65.10.50/branches/R_10_00@21214 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
44cb324796
commit
2966682bae
@ -1,6 +1,7 @@
|
||||
#include "mr2200.h"
|
||||
#include "mr2200a.h"
|
||||
#include "mr2200b.h"
|
||||
#include "mr2200g.h"
|
||||
|
||||
#include <defmask.h>
|
||||
#include <progind.h>
|
||||
@ -3403,21 +3404,51 @@ bool TPlanning_mask::on_field_event(TOperable_field& o, TField_event e, long jol
|
||||
case F_BUCKET28:
|
||||
case F_BUCKET29:
|
||||
case F_BUCKET30:
|
||||
if (e == fe_modify)
|
||||
if (e == fe_magic)
|
||||
{
|
||||
const TSheet_field& s = sfield(F_ARTICOLI);
|
||||
TMask & m=s.sheet_mask();
|
||||
TMask_field &fprice=m.field(o.dlg()+1);
|
||||
real qta(o.get());
|
||||
real price(fprice.get());
|
||||
if (!qta.is_zero() && price.is_zero())
|
||||
find_price(get(F_TIPOCV),get(F_CODCONDV),get(F_CATVEN_CV),
|
||||
m.get(F_TIPOCF_SHEET), m.get_long(F_CLIENTE), m.get(F_ARTICOLO),
|
||||
qta , price);
|
||||
fprice.set(price.string());
|
||||
if (qta != ZERO)
|
||||
highlight(s.selected(), o.dlg(), true, false);
|
||||
}
|
||||
TMask m("mr2200g");
|
||||
|
||||
if (m.run() != K_ENTER)
|
||||
return true;
|
||||
|
||||
|
||||
|
||||
TSheet_field& s = sfield(F_ARTICOLI);
|
||||
const bool all = m.get_bool(F_ALL);
|
||||
const short from_bucket = o.dlg();
|
||||
const short to_bucket = (bucket(m.get_date(F_TODATE)) + 1) * 2 + F_BUCKET0;
|
||||
const int from_row = all ? 0 : s.selected();
|
||||
const int to_row = all ? s.items() - 1 : s.selected();
|
||||
|
||||
for (int r = from_row; r <= to_row; r++)
|
||||
{
|
||||
TToken_string & row = s.row(r);
|
||||
const real qtafrom(row.get(s.cid2index(from_bucket)));
|
||||
real qtato(row.get(s.cid2index(to_bucket)));
|
||||
|
||||
qtato += qtafrom;
|
||||
row.add("", s.cid2index(from_bucket));
|
||||
row.add(qtato.string(), s.cid2index(to_bucket));
|
||||
s.update_mask(r);
|
||||
}
|
||||
s.force_update();
|
||||
}
|
||||
else
|
||||
if (e == fe_modify)
|
||||
{
|
||||
const TSheet_field& s = sfield(F_ARTICOLI);
|
||||
TMask & m=s.sheet_mask();
|
||||
TMask_field &fprice=m.field(o.dlg()+1);
|
||||
real qta(o.get());
|
||||
real price(fprice.get());
|
||||
if (!qta.is_zero() && price.is_zero())
|
||||
find_price(get(F_TIPOCV),get(F_CODCONDV),get(F_CATVEN_CV),
|
||||
m.get(F_TIPOCF_SHEET), m.get_long(F_CLIENTE), m.get(F_ARTICOLO),
|
||||
qta , price);
|
||||
fprice.set(price.string());
|
||||
if (qta != ZERO)
|
||||
highlight(s.selected(), o.dlg(), true, false);
|
||||
}
|
||||
break;
|
||||
case DLG_CANCEL:
|
||||
if (e == fe_button)
|
||||
|
8
mr/mr2200g.h
Executable file
8
mr/mr2200g.h
Executable file
@ -0,0 +1,8 @@
|
||||
#ifndef __MR2100G_H
|
||||
#define __MR2100G_H
|
||||
|
||||
#define F_TODATE 201
|
||||
#define F_ALL 202
|
||||
|
||||
#endif
|
||||
|
27
mr/mr2200g.uml
Executable file
27
mr/mr2200g.uml
Executable file
@ -0,0 +1,27 @@
|
||||
#include "mr2200g.h"
|
||||
|
||||
PAGE "Spostamento quantita'" -1 -1 76 8
|
||||
|
||||
DATA F_TODATE
|
||||
BEGIN
|
||||
PROMPT 2 2 "Sposta al "
|
||||
END
|
||||
|
||||
BOOLEAN F_ALL
|
||||
BEGIN
|
||||
PROMPT 2 4 "Sposta tutta la la colonna"
|
||||
END
|
||||
|
||||
BUTTON DLG_OK 10 2
|
||||
BEGIN
|
||||
PROMPT -12 -1 ""
|
||||
END
|
||||
|
||||
BUTTON DLG_QUIT 10 2
|
||||
BEGIN
|
||||
PROMPT -22 -1 ""
|
||||
END
|
||||
|
||||
ENDPAGE
|
||||
|
||||
ENDMASK
|
Loading…
x
Reference in New Issue
Block a user