Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
riporto dalla 11


git-svn-id: svn://10.65.10.50/branches/R_10_00@20880 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2010-09-17 10:36:03 +00:00
parent faefa5d502
commit 57c9202983
5 changed files with 69 additions and 19 deletions

View File

@ -3,15 +3,17 @@
#define F_STATO_INI_FAT 203 #define F_STATO_INI_FAT 203
#define F_STATO_FIN_FAT 204 #define F_STATO_FIN_FAT 204
//------------------------------ //------------------------------
#define F_CO_ANT_NUM 205 #define F_CO_ANT_NUM 205 //COntratti ANTicipo: NUMerazione
#define F_CO_ANT_TIP 207 #define F_CO_ANT_TIP 207 //COntratti ANTicipo: TIPo
#define F_CO_ANT_SPE 208 //COntratti ANTicipo: codice SPEsa (è il codart della riga di tipo spesa, verigh02)
#define F_NA_ANT_NUM 210 #define F_NA_ANT_NUM 210 //Note Accredito ANTicipo: NUMerazione
#define F_NA_ANT_TIP 212 #define F_NA_ANT_TIP 212 //Note Accredito ANTicipo: TIPo
#define F_NA_ANT_SPE 213 #define F_NA_ANT_SPE 213 //Note Accredito ANTicipo: codice SPEsa (è il codart delle righe delle note di accredito)
//------------------------------ //------------------------------
#define F_CO_POST_NUM 215 #define F_CO_POST_NUM 215
#define F_CO_POST_TIP 217 #define F_CO_POST_TIP 217
//#define F_CO_POST_SPE 218 in teoria questo non potrebbe esistere!
#define F_NA_POST_NUM 220 #define F_NA_POST_NUM 220
#define F_NA_POST_TIP 222 #define F_NA_POST_TIP 222
@ -19,6 +21,7 @@
//------------------------------ //------------------------------
#define F_CO_RIFA_NUM 225 #define F_CO_RIFA_NUM 225
#define F_CO_RIFA_TIP 227 #define F_CO_RIFA_TIP 227
#define F_CO_RIFA_SPE 228
#define F_NA_RIFA_NUM 230 #define F_NA_RIFA_NUM 230
#define F_NA_RIFA_TIP 232 #define F_NA_RIFA_TIP 232

View File

@ -77,27 +77,39 @@ END
STRING F_CO_ANT_NUM 4 STRING F_CO_ANT_NUM 4
BEGIN BEGIN
PROMPT 20 6 "Numerazione " PROMPT 20 6 "Numerazione "
/*USE %NUM USE %NUM
INPUT CODTAB F_CO_ANT_NUM INPUT CODTAB F_CO_ANT_NUM
DISPLAY "Codice@8" CODTAB DISPLAY "Codice@8" CODTAB
DISPLAY "Descrizione@50" S0 DISPLAY "Descrizione@50" S0
OUTPUT F_CO_ANT_NUM CODTAB OUTPUT F_CO_ANT_NUM CODTAB
CHECKTYPE REQUIRED*/ CHECKTYPE REQUIRED
FIELD CoAntNum FIELD CoAntNum
END END
STRING F_CO_ANT_TIP 4 STRING F_CO_ANT_TIP 4
BEGIN BEGIN
PROMPT 42 6 "Tipo " PROMPT 42 6 "Tipo "
/*USE %TIP USE %TIP
INPUT CODTAB F_CO_ANT_TIP INPUT CODTAB F_CO_ANT_TIP
DISPLAY "Codice@8" CODTAB DISPLAY "Codice@8" CODTAB
DISPLAY "Descrizione@50" S0 DISPLAY "Descrizione@50" S0
OUTPUT F_CO_ANT_TIP CODTAB OUTPUT F_CO_ANT_TIP CODTAB
CHECKTYPE REQUIRED*/ CHECKTYPE REQUIRED
FIELD CoAntTip FIELD CoAntTip
END END
STRING F_CO_ANT_SPE 8
BEGIN
PROMPT 58 6 "Spesa "
USE SPP
INPUT CODTAB F_CO_ANT_SPE
DISPLAY "Codice@8" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_CO_ANT_SPE CODTAB
CHECKTYPE REQUIRED
FIELD CoAntSpe
END
TEXT DLG_NULL TEXT DLG_NULL
BEGIN BEGIN
PROMPT 2 7 "@bNote di Accredito" PROMPT 2 7 "@bNote di Accredito"
@ -253,6 +265,18 @@ BEGIN
FIELD CoRifaTip FIELD CoRifaTip
END END
STRING F_CO_RIFA_SPE 8
BEGIN
PROMPT 58 14 "Spesa "
USE SPP
INPUT CODTAB F_CO_RIFA_SPE
DISPLAY "Codice@8" CODTAB
DISPLAY "Descrizione@50" S0
OUTPUT F_CO_RIFA_SPE CODTAB
CHECKTYPE REQUIRED
FIELD CoRifaSpe
END
TEXT DLG_NULL TEXT DLG_NULL
BEGIN BEGIN
PROMPT 2 15 "@bNote di Accredito" PROMPT 2 15 "@bNote di Accredito"

View File

@ -9,6 +9,7 @@
#include "../mg/umart.h" #include "../mg/umart.h"
#include "../ve/condv.h" #include "../ve/condv.h"
#include "../ve/rcondv.h" #include "../ve/rcondv.h"
#include "../ve/clifor.h"
#include "halib.h" #include "halib.h"
#include "ha0.h" #include "ha0.h"
@ -211,9 +212,7 @@ bool TDocumenti_premio::get_next_key(TToken_string& key)
{ {
if (err == NOERR) if (err == NOERR)
doc.prev(); doc.prev();
if (curr.get_char(DOC_PROVV) == provv && if (curr.get_char(DOC_PROVV) == provv && curr.get_int(DOC_ANNO) == anno && curr.get(DOC_CODNUM) == codnum)
curr.get_int(DOC_ANNO) == anno &&
curr.get(DOC_CODNUM) == codnum)
n = curr.get_long(DOC_NDOC); n = curr.get_long(DOC_NDOC);
} }
@ -325,9 +324,30 @@ void TDocumenti_premio::write_rows(const TMask& m)
TRectype& last_rec = righedoc.row(righedoc_items + 1, true); TRectype& last_rec = righedoc.row(righedoc_items + 1, true);
const real anticipato = m.get_real(F_ANTICIPATO); const real anticipato = m.get_real(F_ANTICIPATO);
const real maturato = m.get_real(F_RESTITUITO); const real maturato = m.get_real(F_RESTITUITO);
last_rec.put(RDOC_QTAGG4, anticipato); last_rec.put(RCA_2_ANTICIPATO, anticipato);
last_rec.put(RDOC_QTAGG5, maturato); last_rec.put(RCA_2_RESTITUITO, maturato);
last_rec.put(RDOC_TIPORIGA, HARDY_TIPORIGA_SOMMA); last_rec.put(RDOC_TIPORIGA, HARDY_TIPORIGA_SOMMA);
last_rec.put(RDOC_QTA, 1);
//panegirico sul codice iva (che ci va sennò col cavolo che si riesce a contabilizzare il contratto)
TString80 codspp;
TConfig config(CONFIG_DITTA, "ha");
const char tipo_contr = m.get(F_TIPOCONTR)[0];
switch (tipo_contr)
{
case 'A': codspp = config.get("CoAntSpe"); break;
case 'R': codspp = config.get("CoRifaSpe"); break;
default: break;
}
last_rec.put(RDOC_CODART, codspp);
//cerca se il cliente ha un'iva speciale (1 cliente su 1E+6, ma tant'è...)
TCli_for clifo(m.get(F_TIPOCF)[0], m.get_long(F_CODCF));
TString4 codiva(clifo.vendite().get(CFV_ASSFIS));
//per i restanti 1E+6 - 1 clienti...
if (!codiva.full())
codiva = cache().get("SPP", codspp, "S3");
last_rec.put(RDOC_CODIVA, codiva);
//e alla fine della fiera scrive tutto ufficialmente //e alla fine della fiera scrive tutto ufficialmente
righedoc.rewrite(); righedoc.rewrite();
@ -340,6 +360,9 @@ void TDocumenti_premio::init_query_mode(TMask& m)
void TDocumenti_premio::init_insert_mode(TMask& m) void TDocumenti_premio::init_insert_mode(TMask& m)
{ {
//alla creazione di un nuovo contratto lo stato viene posto = 2
//questo x' il contratto è già stato stampato dal cliente in fase di stesura
m.set(F_STATO, 2);
} }
void TDocumenti_premio::init_modify_mode(TMask& m) void TDocumenti_premio::init_modify_mode(TMask& m)

View File

@ -57,7 +57,7 @@ BEGIN
FLAGS "D" FLAGS "D"
END END
STRING F_CODCF 6 NUMBER F_CODCF 6
BEGIN BEGIN
PROMPT 2 3 "Cliente " PROMPT 2 3 "Cliente "
WARNING "Cliente assente" WARNING "Cliente assente"

View File

@ -13,6 +13,6 @@
#define RC_1_NSCARICO RDOC_QTAGG2 #define RC_1_NSCARICO RDOC_QTAGG2
#define RC_1_BONUS RDOC_QTAGG5 #define RC_1_BONUS RDOC_QTAGG5
#define RCA_2_ANTICIPATO RDOC_QTAGG4 #define RCA_2_ANTICIPATO RDOC_PREZZO
#define RCA_2_RESTITUITO RDOC_QTAGG5 #define RCA_2_RESTITUITO RDOC_QTAGG5