Patch level : 12.0 430
Files correlati : tf Commento : - Corretto errore di creazione record custom da prima nota gia' inviato - Aggiunta Natura nella tabella TRASFATT git-svn-id: svn://10.65.10.50/branches/R_10_00@24041 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a46f3decb5
commit
7713e208a8
@ -233,6 +233,8 @@ const char* decodTipo(TToken_string* strarr)
|
||||
bool saveRec(TToken_string row, bool esportato)
|
||||
{
|
||||
static TLocalisamfile trasfatt(LF_TRASFATT);
|
||||
static TLocalisamfile mov(LF_MOV);
|
||||
|
||||
TString key = row.get(_numero); key << "|"<< row.get(_aliquota);
|
||||
|
||||
TRectype rCust = cache().get(LF_TRASFATT, key);
|
||||
@ -240,6 +242,11 @@ bool saveRec(TToken_string row, bool esportato)
|
||||
if(rCust.empty())
|
||||
{
|
||||
rCust.put("NUMREG", row.get(_numero));
|
||||
// Se il record viene creato al momento svuoto per sicurezza i valori TFINVIO e TFDATA in MOV
|
||||
TRectype rOrig = cache().get(LF_MOV, row.get(_numero));
|
||||
rOrig.put("TFINVIO", "");
|
||||
rOrig.put("TFDATA", "");
|
||||
rOrig.rewrite(mov);
|
||||
}
|
||||
rCust.put("TIPO", row.get(_tipocf));
|
||||
rCust.put("CODCF", row.get(_codcf));
|
||||
@ -251,6 +258,7 @@ bool saveRec(TToken_string row, bool esportato)
|
||||
rCust.put("IMPONIBILE", row.get(_imponibile));
|
||||
rCust.put("IMPOSTA", row.get(_importoIVA));
|
||||
rCust.put("CODIVA", row.get(_aliquota));
|
||||
rCust.put("NATURA", row.get(_natura));
|
||||
rCust.put("AUTOFATT", row.get(_autofatt));
|
||||
if(esportato)
|
||||
{
|
||||
@ -258,7 +266,6 @@ bool saveRec(TToken_string row, bool esportato)
|
||||
rCust.put("TFINVIO", invio);
|
||||
rCust.put("TFDATA", TDate(TODAY));
|
||||
}
|
||||
|
||||
return rCust.write_rewrite(trasfatt) == NOERR;
|
||||
}
|
||||
|
||||
|
@ -630,9 +630,10 @@ void TTrFa_mask::load_sheet()
|
||||
sheet.destroy();
|
||||
TAssoc_array recimposte;
|
||||
int items = c.updateFilters(tipo, codice, dal, al, get_int(F_FATTSEL));
|
||||
TString tipocf, codcf, ocfpi, nat;
|
||||
for(bool ok = true; items > 0 && ok;)
|
||||
{
|
||||
TString tipocf, codcf, ocfpi;
|
||||
tipocf.cut(0), codcf.cut(0), ocfpi.cut(0), nat.cut(0);
|
||||
int err = c.next(recimposte, ok, tipocf, codcf, ocfpi);
|
||||
|
||||
// Carico i clienti
|
||||
@ -654,6 +655,9 @@ void TTrFa_mask::load_sheet()
|
||||
*/
|
||||
TRectype isCust = getTrasFatt(movimento.get("NUMREG"), iva);
|
||||
|
||||
if(isCust.full() && (err < foundcust || err > foundidcust))
|
||||
bool tolla = true;
|
||||
|
||||
row.add(movimento.get("TFINVIO") == "I" ? "X" : "", _spedita); // Spedita
|
||||
row.add("X"); // Da spedire, sempre!
|
||||
row.add(isCust.full() ? "X" : "", _forzata); // Modificato
|
||||
@ -668,7 +672,8 @@ void TTrFa_mask::load_sheet()
|
||||
row.add(movimento.get("TIPODOC"), _codnum); // Tipo documento
|
||||
row.add(movimento.get("NUMDOC"), _numdoc); // Numero documento
|
||||
row.add(movimento.get_date("DATADOC"), _datadoc); // Data documento
|
||||
row.add(natura(iva), _natura); // NATURA!
|
||||
nat.cut(0) << movimento.get("NATURA");
|
||||
row.add(nat.full() ? nat : natura(iva), _natura); // NATURA!
|
||||
row.add(iva, _aliquota); // Codice aliquota!
|
||||
row.add(findDetraib(movimento.get("TIPODET")), _detraibile); // Detraibilità
|
||||
row.add(movimento.get_real("IMPONIBILE"), _imponibile); // Imponibile
|
||||
|
Loading…
x
Reference in New Issue
Block a user