Patch level : 10.0
Files correlati : tp0.exe Ricompilazione Demo : [ ] Commento : Corretta importazione NS e VS banca Importati periodi di non accettazione effetti git-svn-id: svn://10.65.10.50/branches/R_10_00@22561 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
605becd52b
commit
bb763f194a
@ -332,7 +332,7 @@ bool TPack_clifo::trasferisci()
|
||||
TString_array lista_clifo, lista_cfven, lista_agenti;
|
||||
ini.list_variables(lista_clifo, true, "CLIFO", true);
|
||||
ini.list_variables(lista_cfven, true, "CFVEN", true);
|
||||
ini.list_variables(lista_agenti, true, "AGENTI", true);
|
||||
ini.list_variables(lista_agenti,true, "AGENTI",true);
|
||||
|
||||
TFast_isamfile clifo(LF_CLIFO);
|
||||
TFast_isamfile cfven(LF_CFVEN);
|
||||
@ -446,12 +446,48 @@ bool TPack_clifo::trasferisci()
|
||||
// agente
|
||||
rec_cfven.put(CFV_CODAG, get_agente());
|
||||
|
||||
aggiorna_record(clifo, lista_clifo);
|
||||
aggiorna_record(cfven, lista_cfven);
|
||||
// Gestione periodo non accettazione effetti (18-01-2012)
|
||||
TString80 field;
|
||||
TToken_string nonacceff(80, ';'), nonscadeff(80, ';');
|
||||
for (int p = 1; p <= 3; p++)
|
||||
{
|
||||
field.format("DayExpEffFrom%02d", p);
|
||||
const int day_from = get_long(field);
|
||||
if (day_from <= 0)
|
||||
break;
|
||||
field.format("MonthExpEffFrom%02d", p);
|
||||
const int month_from = get_long(field);
|
||||
|
||||
field.format("DayExpEffTo%02d", p);
|
||||
const int day_to = get_long(field);
|
||||
|
||||
field.format("MonthExpEffTo%02d", p);
|
||||
const int month_to = get_long(field);
|
||||
|
||||
field.format("DayNewEffect%02d", p);
|
||||
const int day_new = get_long(field);
|
||||
|
||||
field.format("MonthNewEffect%02d", p);
|
||||
const int month_new = get_long(field);
|
||||
|
||||
field.format("%d-%d,%d-%d", day_from, month_from, day_to, month_to);
|
||||
nonacceff.add(field);
|
||||
|
||||
field.format("%d-%d", day_new, month_new);
|
||||
nonscadeff.add(field);
|
||||
}
|
||||
if (nonacceff.full())
|
||||
{
|
||||
cfven.put(CFV_NONACCEFF, nonacceff);
|
||||
cfven.put(CFV_NONSCADEFF, nonscadeff);
|
||||
}
|
||||
|
||||
if (get_str("CodIvaNI") == "0") // Caso speciale: significa NON esenti
|
||||
cfven.zero(CFV_ASSFIS); // Azzero il codice di assogettamento fiscale
|
||||
|
||||
aggiorna_record(clifo, lista_clifo);
|
||||
aggiorna_record(cfven, lista_cfven);
|
||||
|
||||
// aggiorna anche record agenti se e' una spia
|
||||
if (flagcustsupp == 'A')
|
||||
{
|
||||
|
@ -673,10 +673,35 @@ bool TPack_ddt::trasferisci()
|
||||
doc->put(DOC_ADDBOLLI, cfven.get(CFV_ADDBOLLI));
|
||||
doc->put(DOC_PERCSPINC, cfven.get(CFV_PERCSPINC));
|
||||
|
||||
/* Old style
|
||||
const TRectype& clifo = cache().get(LF_CLIFO, tok);
|
||||
doc->put(DOC_CODABIA, clifo.get(CLI_CODABI));
|
||||
doc->put(DOC_CODCABA, clifo.get(CLI_CODCAB));
|
||||
doc->put(DOC_IBAN, get_iban(clifo));
|
||||
*/
|
||||
|
||||
// New style 18-01-2012
|
||||
tok.cut(0);
|
||||
tok.add(tipocf); tok.add(codcf);
|
||||
tok.add("V"); tok.add(1);
|
||||
const TRectype& cfban_a = cache().get(LF_CFBAN, tok);
|
||||
if (!cfban_a.empty())
|
||||
{
|
||||
doc->put(DOC_CODABIA, cfban_a.get(CFBAN_ABI));
|
||||
doc->put(DOC_CODCABA, cfban_a.get(CFBAN_CAB));
|
||||
doc->put(DOC_IBAN, cfban_a.get(CFBAN_IBAN));
|
||||
}
|
||||
|
||||
tok.cut(0);
|
||||
tok.add(tipocf); tok.add(codcf);
|
||||
tok.add("N"); tok.add(1);
|
||||
const TRectype& cfban_p = cache().get(LF_CFBAN, tok);
|
||||
if (!cfban_p.empty())
|
||||
{
|
||||
doc->put(DOC_CODABIP, cfban_p.get(CFBAN_ABI));
|
||||
doc->put(DOC_CODCABP, cfban_p.get(CFBAN_CAB));
|
||||
doc->put(DOC_PROGBNP, cfban_p.get(CFBAN_PROGPR));
|
||||
}
|
||||
}
|
||||
}
|
||||
doc->put(DOC_ZONA, decode_field("ZON", "ZoneCode")); // Crea anche la zona se necessario
|
||||
|
Loading…
x
Reference in New Issue
Block a user