Patch level : 12.0 412
Files correlati : Commento : Aggiunta bolla doganale, ottimizzata funzione salvataggio record git-svn-id: svn://10.65.10.50/branches/R_10_00@23898 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0c93ddd33c
commit
03060c3e0e
@ -49,10 +49,10 @@ TString getTipoDoc(int id)
|
|||||||
case B_TIPO_STORDOC:
|
case B_TIPO_STORDOC:
|
||||||
ret = "ST";
|
ret = "ST";
|
||||||
break;
|
break;
|
||||||
/*
|
|
||||||
case B_TIPO_BOLLADOG:
|
case B_TIPO_BOLLADOG:
|
||||||
ret = "BD";
|
ret = "BD";
|
||||||
break;
|
break;
|
||||||
|
/*
|
||||||
case B_TIPO_CORRNINC:
|
case B_TIPO_CORRNINC:
|
||||||
ret = "CN";
|
ret = "CN";
|
||||||
break;
|
break;
|
||||||
@ -87,7 +87,7 @@ int getTipoDoc(TString id)
|
|||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
if(id == "AF") ret = B_TIPO_AUTOFATT;
|
if(id == "AF") ret = B_TIPO_AUTOFATT;
|
||||||
// else if(id == "BD") ret = B_TIPO_BOLLADOG;
|
else if(id == "BD") ret = B_TIPO_BOLLADOG;
|
||||||
// else if(id == "CN") ret = B_TIPO_CORRNINC;
|
// else if(id == "CN") ret = B_TIPO_CORRNINC;
|
||||||
// else if(id == "CR") ret = B_TIPO_CORR;
|
// else if(id == "CR") ret = B_TIPO_CORR;
|
||||||
else if(id == "FA") ret = B_TIPO_FATTACQ;
|
else if(id == "FA") ret = B_TIPO_FATTACQ;
|
||||||
@ -165,8 +165,8 @@ static const char* decodTipo(TToken_string* strarr)
|
|||||||
TRectype mov = cache().get(LF_MOV, strarr->get(_numero));
|
TRectype mov = cache().get(LF_MOV, strarr->get(_numero));
|
||||||
TCausale caus(mov.get("CODCAUS"), mov.get_int("ANNOIVA"));
|
TCausale caus(mov.get("CODCAUS"), mov.get_int("ANNOIVA"));
|
||||||
TString tipodoc; tipodoc << strarr->get(_codnum);
|
TString tipodoc; tipodoc << strarr->get(_codnum);
|
||||||
// Le autofatture possono essere solo di tipo TDO1
|
// Le autofatture possono essere solo di tipo TDO1 e le bolle doganali nel dubbio pure
|
||||||
if(tipodoc == "AF")
|
if(tipodoc == "AF" || tipodoc == "BD")
|
||||||
return "TD01";
|
return "TD01";
|
||||||
else if(tipodoc == "FA" || tipodoc == "FV")
|
else if(tipodoc == "FA" || tipodoc == "FV")
|
||||||
{
|
{
|
||||||
@ -233,6 +233,7 @@ static const char* decodTipo(TToken_string* strarr)
|
|||||||
/* Salvo il record modificato in TFCustom */
|
/* Salvo il record modificato in TFCustom */
|
||||||
bool saveRec(TToken_string row, bool esportato)
|
bool saveRec(TToken_string row, bool esportato)
|
||||||
{
|
{
|
||||||
|
static TLocalisamfile trasfatt(LF_TRASFATT);
|
||||||
// Devo inserire la riga in trasfatt
|
// Devo inserire la riga in trasfatt
|
||||||
TRectype rCust(LF_TRASFATT);
|
TRectype rCust(LF_TRASFATT);
|
||||||
if(strcmp(row.get(_spedita), "X") == 0) // Controllo che non sia già stata spedita prima
|
if(strcmp(row.get(_spedita), "X") == 0) // Controllo che non sia già stata spedita prima
|
||||||
@ -240,7 +241,8 @@ bool saveRec(TToken_string row, bool esportato)
|
|||||||
TString key = row.get(_numero); key << "|"<< row.get(_aliquota);
|
TString key = row.get(_numero); key << "|"<< row.get(_aliquota);
|
||||||
rCust = cache().get(LF_TRASFATT, key);
|
rCust = cache().get(LF_TRASFATT, key);
|
||||||
}
|
}
|
||||||
else
|
// Controllo non si sa mai
|
||||||
|
if(rCust.empty())
|
||||||
{
|
{
|
||||||
rCust.put("NUMREG", row.get(_numero));
|
rCust.put("NUMREG", row.get(_numero));
|
||||||
}
|
}
|
||||||
@ -261,7 +263,7 @@ bool saveRec(TToken_string row, bool esportato)
|
|||||||
rCust.put("TFDATA", TDate(TODAY));
|
rCust.put("TFDATA", TDate(TODAY));
|
||||||
}
|
}
|
||||||
|
|
||||||
return rCust.write_rewrite(TLocalisamfile(LF_TRASFATT)) == NOERR;
|
return rCust.write_rewrite(trasfatt) == NOERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -1461,7 +1463,8 @@ bool TTrFa_app::send(TTrFa_mask* msk)
|
|||||||
{
|
{
|
||||||
message_box("Ho esportato correttamente!");
|
message_box("Ho esportato correttamente!");
|
||||||
// Imposto l'esportazione
|
// Imposto l'esportazione
|
||||||
//setEsportato(sheet);
|
if(yesno_box("Vuoi segnare i record esportati?"))
|
||||||
|
setEsportato(sheet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
message_box("Errore durante il salvataggio delle modifiche");
|
message_box("Errore durante il salvataggio delle modifiche");
|
||||||
@ -1809,9 +1812,6 @@ bool TTrFa_app::tff0700(TSheet_field& sheet)
|
|||||||
return false;
|
return false;
|
||||||
if(strcmp(strarr->get(_invio), "X") != 0) continue; // Non mi interessa se non è selezionata
|
if(strcmp(strarr->get(_invio), "X") != 0) continue; // Non mi interessa se non è selezionata
|
||||||
|
|
||||||
if(strcmp(strarr->get(_numero), "86709") == 0 || strcmp(strarr->get(_numero), "86772") == 0)
|
|
||||||
bool tolla = true;
|
|
||||||
|
|
||||||
TString checkFatt; checkFatt << strarr->get_char(_tipocf) << "|" << strarr->get_long(_codcf) << "|" << strarr->get(_numdoc);
|
TString checkFatt; checkFatt << strarr->get_char(_tipocf) << "|" << strarr->get_long(_codcf) << "|" << strarr->get(_numdoc);
|
||||||
if(fattSent.get_pos(checkFatt) < 0)
|
if(fattSent.get_pos(checkFatt) < 0)
|
||||||
{
|
{
|
||||||
@ -1863,7 +1863,8 @@ bool TTrFa_app::tff2200(TToken_string* strarr, int nriga)
|
|||||||
|
|
||||||
tff2200f.set("PL_IMPONIBILE", real(strarr->get(_imponibile))); // Se li converto in real una volta passati vengono parsati da var2str nel formato che vuole l'agenzia delle entrate
|
tff2200f.set("PL_IMPONIBILE", real(strarr->get(_imponibile))); // Se li converto in real una volta passati vengono parsati da var2str nel formato che vuole l'agenzia delle entrate
|
||||||
tff2200f.set("PL_IMPOSTA", real(strarr->get(_importoIVA)));
|
tff2200f.set("PL_IMPOSTA", real(strarr->get(_importoIVA)));
|
||||||
tff2200f.set("PL_ALIQUOTAIVA", strarr->get(_aliquota));
|
real aliquota = cache().get("%IVA", strarr->get(_aliquota), "R0");
|
||||||
|
tff2200f.set("PL_ALIQUOTAIVA", aliquota);
|
||||||
tff2200f.set("PL_NATURA", strarr->get(_natura));
|
tff2200f.set("PL_NATURA", strarr->get(_natura));
|
||||||
real det(strarr->get(_detraibile));
|
real det(strarr->get(_detraibile));
|
||||||
// Nella conversione la vigola viene persa e 100,00 diventa 10.000 quindi divido
|
// Nella conversione la vigola viene persa e 100,00 diventa 10.000 quindi divido
|
||||||
@ -1938,10 +1939,10 @@ bool TTrFa_app::setEsportato(TSheet_field& sheet)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TRectype row = cache().get(LF_RMOV, TString(strarr->get(_numero)));
|
TRectype row = cache().get(LF_MOV, TString(strarr->get(_numero)));
|
||||||
row.put("TFINVIO", "X");
|
row.put("TFINVIO", "X");
|
||||||
row.put("TFDATA", TDate(TODAY).string());
|
row.put("TFDATA", TDate(TODAY).string());
|
||||||
ok = row.rewrite(TLocalisamfile(LF_RMOV)) == NOERR;
|
ok = row.rewrite(TLocalisamfile(LF_MOV)) == NOERR;
|
||||||
if(!ok) return false;
|
if(!ok) return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
#define B_TIPO_FATTVEN 410
|
#define B_TIPO_FATTVEN 410
|
||||||
#define B_TIPO_NOTC 411
|
#define B_TIPO_NOTC 411
|
||||||
#define B_TIPO_NOTD 412
|
#define B_TIPO_NOTD 412
|
||||||
#define B_TIPO_STORDOC 413
|
#define B_TIPO_BOLLADOG 413
|
||||||
|
#define B_TIPO_STORDOC 414
|
||||||
|
|
||||||
#define END_BOOLEAN 413
|
#define END_BOOLEAN 413
|
||||||
|
|
||||||
|
@ -127,9 +127,14 @@ BEGIN
|
|||||||
PROMPT 45 8 "Nota Deb"
|
PROMPT 45 8 "Nota Deb"
|
||||||
FLAGS ""
|
FLAGS ""
|
||||||
END
|
END
|
||||||
|
BOOLEAN B_TIPO_BOLLADOG
|
||||||
|
BEGIN
|
||||||
|
PROMPT 60 8 "Bolla Dog"
|
||||||
|
FLAGS ""
|
||||||
|
END
|
||||||
BOOLEAN B_TIPO_STORDOC
|
BOOLEAN B_TIPO_STORDOC
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 60 8 "Storno Doc"
|
PROMPT 75 8 "Storno Doc"
|
||||||
FLAGS ""
|
FLAGS ""
|
||||||
END
|
END
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user