Patch level : 10.0 396

Files correlati     :  ve2.exe mr2.exe
Ricompilazione Demo : [ ]
Commento

Aggiunto cliente/fornitore ai codici corrispondenti


git-svn-id: svn://10.65.10.50/trunk@19158 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2009-07-29 08:50:55 +00:00
parent 98487aec02
commit 5a7c84ac58
5 changed files with 101 additions and 2 deletions

View File

@ -10,5 +10,7 @@
#define CODCORR_LIV2 "LIV2"
#define CODCORR_LIV3 "LIV3"
#define CODCORR_LIV4 "LIV4"
#define CODCORR_TIPOCF "TIPOCF"
#define CODCORR_CODCF "CODCF"
#endif

View File

@ -2,11 +2,13 @@
#include <colmask.h>
#include <printer.h>
#include <progind.h>
#include <sheet.h>
#include <tabutil.h>
#include <urldefid.h>
#include <utility.h>
#include "..\mg\anamag.h"
#include "..\mg\codcorr.h"
#include "..\ve\veconf.h"
#include <anagr.h>
@ -1093,6 +1095,31 @@ int TMatResMask::num_orders()
n++;
return n;
}
class TForn_ext_sheet : public TBrowse_sheet
{
protected:
virtual bool get_ini_paragraph(const TEdit_field& field, TString& parag) const;
public:
TForn_ext_sheet(TCursor& cur, TEdit_field& f);
};
bool TForn_ext_sheet::get_ini_paragraph(const TEdit_field& field, TString& parag) const
{
const bool ok = TSheet::get_ini_paragraph(field, parag);
if (ok)
parag << "_F81";
return ok;
}
TForn_ext_sheet::TForn_ext_sheet(TCursor& cur, TEdit_field& f)
: TBrowse_sheet(&cur, HR("CODCF|20->RAGSOC"),
TR("Ricerca Fornitori alternativi"),
HR("Codice|Ragioen Sociale @50"),
0, f, TToken_string())
{ }
bool TMatResMask::on_field_event(TOperable_field& o, TField_event e, long jolly)
{
const char * confirm_msg=FR("Le attuali %d righe di ordine verranno perse. Confermare?");
@ -1176,10 +1203,38 @@ bool TMatResMask::on_field_event(TOperable_field& o, TField_event e, long jolly)
"F", codfor, codart, qta, price);
row.add(price.string(), F_PREZZO - FIRST_FIELD);
}
break;
}
case fe_magic:
{
TRelation rel(LF_CODCORR);
TRectype from(rel.curr());
TRectype to(rel.curr());
TString codart;
row.get(so.cid2index(F_ARTICOLO), codart);
rel.add(LF_CLIFO, "TIPOCF==TIPOCF|CODCF==CODCF");
from.put(CODCORR_CODART, codart);
to.put(CODCORR_CODART, codart);
TCursor cur(&rel, "TIPOCF==\"F\"", 1, &from, &to);
cur.items();
cur.freeze();
TForn_ext_sheet sheet(cur, (TEdit_field &)o);
if (sheet.run() == K_ENTER)
{
TToken_string& row = sheet.row(sheet.selected());
const long codcf = row.get_long(0);
o.set(codcf);
}
}
break;
}
}
else
break;
case F_YEAR:
case F_IMPIANTO:

View File

@ -224,6 +224,9 @@
#define FS_LIV2 105
#define FS_LIV3 106
#define FS_LIV4 107
#define FS_TIPOCF 108
#define FS_CODCF 109
#define FS_RAGCF 110
// definizioni per l'archivio giacenze
#include "ve2400d.h"

View File

@ -134,6 +134,9 @@ BEGIN
ITEM "Liv2@6"
ITEM "Liv3@6"
ITEM "Liv4@6"
ITEM "Tipo C/F"
ITEM "Codice C/F"
ITEM "Ragiore Sociale@50"
END
TEXT DLG_NULL

View File

@ -1,7 +1,7 @@
// SHEET 2 (codici alternativi) DI VE2400
PAGE "Pagina 1" 8 5 65 15
PAGE "Pagina 1" 5 5 75 15
STRING FS_CODARTALT 20
BEGIN
@ -92,7 +92,7 @@ END
STRING FS_LIV4 10
BEGIN
FLAGS "U"
PROMPT 40 8 "Livello 4 "
PROMPT 40 9 "Livello 4 "
USE GCG
JOIN FCG ALIAS 500 INTO CODTAB==CODTAB[1,1]
INPUT CODTAB[1,1] "4"
@ -103,6 +103,42 @@ BEGIN
FIELD LIV4
END
LISTBOX FS_TIPOCF 10
BEGIN
PROMPT 2 10 "Tipo "
FIELD TIPOCF
ITEM " |Nessuno" MESSAGE CLEAR,1@
ITEM "C|Cliente" MESSAGE ENABLE,1@
ITEM "F|Fornitore" MESSAGE ENABLE,1@
END
NUMBER FS_CODCF 6
BEGIN
PROMPT 2 11 "Codice "
FIELD CODCF
USE LF_CLIFO
INPUT TIPOCF FS_TIPOCF SELECT
INPUT CODCF FS_CODCF
DISPLAY "Codice " CODCF
DISPLAY "Ragione sociale@50" RAGSOC
DISPLAY "Partita IVA" PAIV
OUTPUT FS_CODCF CODCF
OUTPUT FS_RAGCF RAGSOC
CHECKTYPE REQUIRED
GROUP 1
END
STRING FS_RAGCF 50
BEGIN
PROMPT 2 12 "Ragione sociale "
USE LF_CLIFO KEY 2
INPUT TIPOCF FS_TIPOCF SELECT
INPUT RAGSOC FS_RAGCF
COPY DISPLAY FS_CODCF
COPY OUTPUT FS_CODCF
GROUP 1
END
BUTTON DLG_OK 10 2
BEGIN
PROMPT -13 -1 ""