Patch level : 12.0 386
Files correlati : tf Commento : - Aggiunti trick per far andare chiave la chiave "MESE" con liquidazione trimestrale in tf0200 - Aggiunta lettura rappresentante in tf0500 git-svn-id: svn://10.65.10.50/branches/R_10_00@23781 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
75216c1af6
commit
04e37cc8d6
@ -253,41 +253,23 @@ bool ComLiqPerIva_mask::on_field_event(TOperable_field& o, TField_event e, long
|
|||||||
enable(F_TRIMESTRE);
|
enable(F_TRIMESTRE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(e == fe_init && !query_mode())
|
|
||||||
{
|
|
||||||
// Per trovare un valore tento per 5 anni di vedere se c'è una liquidazione aperta, così da valorizzare tutta la roba
|
|
||||||
int year = TDate(TODAY).year();
|
|
||||||
for(int i = year; i >= year - 5; i--)
|
|
||||||
{
|
|
||||||
TString cod = get(F_CODDITTA);
|
|
||||||
cod << i;
|
|
||||||
if(cache().get("%LIA", cod).empty()) continue;
|
|
||||||
|
|
||||||
// Trovato
|
|
||||||
set(F_ANNO, i);
|
|
||||||
if(cache().get("%LIA", cod, "S7") == "M")
|
|
||||||
{
|
|
||||||
mensile = true;
|
|
||||||
enable(F_MESE);
|
|
||||||
disable(F_TRIMESTRE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
mensile = false;
|
|
||||||
disable(F_MESE);
|
|
||||||
enable(F_TRIMESTRE);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case F_MESE:
|
case F_MESE:
|
||||||
if(e == fe_modify && mensile)
|
if(e == fe_modify && mensile)
|
||||||
set(F_TRIMESTRE, (get_int(F_MESE) - 1) / 3 + 1);
|
set(F_TRIMESTRE, (get_int(F_MESE) - 1) / 3 + 1);
|
||||||
break;
|
break;
|
||||||
case F_TRIMESTRE:
|
case F_TRIMESTRE:
|
||||||
if(e == fe_modify && !mensile)
|
if(e == fe_init && !query_mode())
|
||||||
|
disable(F_TRIMESTRE);
|
||||||
|
if(e == fe_modify && !mensile && query_mode())
|
||||||
|
{
|
||||||
set(F_MESE, get_int(F_TRIMESTRE) * 3);
|
set(F_MESE, get_int(F_TRIMESTRE) * 3);
|
||||||
|
disable(F_TRIMESTRE);
|
||||||
|
send_key(K_TAB, F_ANNO);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DLG_CANCEL:
|
||||||
|
enable(F_TRIMESTRE);
|
||||||
break;
|
break;
|
||||||
case DLG_RECALC:
|
case DLG_RECALC:
|
||||||
// Vado a prendere i dati di quel mese dalla liquidazione IVA
|
// Vado a prendere i dati di quel mese dalla liquidazione IVA
|
||||||
|
@ -66,7 +66,7 @@ BEGIN
|
|||||||
OUTPUT F_TRIMESTRE TRIMESTRE
|
OUTPUT F_TRIMESTRE TRIMESTRE
|
||||||
KEY 1
|
KEY 1
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
FLAGS "A"
|
FLAGS ""
|
||||||
WARNING "Inserire un anno di liquidazione"
|
WARNING "Inserire un anno di liquidazione"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -135,6 +135,10 @@ bool TIvaSend_msk::on_field_event(TOperable_field& o, TField_event e, long jolly
|
|||||||
if(e == fe_modify)
|
if(e == fe_modify)
|
||||||
set(F_AMESE, get_int(F_DAMESE)+2);
|
set(F_AMESE, get_int(F_DAMESE)+2);
|
||||||
break;
|
break;
|
||||||
|
case F_DATRIMESTRE:
|
||||||
|
if(e == fe_modify)
|
||||||
|
set(F_ATRIMESTRE, get_int(F_DATRIMESTRE));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -270,8 +274,20 @@ TToken_string TIvaSend_app::getTestata(TIvaSend_msk& msk)
|
|||||||
testata.add(""); // P.IVA Controllante
|
testata.add(""); // P.IVA Controllante
|
||||||
testata.add(""); // Flag Liq. gruppo
|
testata.add(""); // Flag Liq. gruppo
|
||||||
testata.add(""); // Flag firma comunicazione
|
testata.add(""); // Flag firma comunicazione
|
||||||
testata.add(""); // Cod.Fisc. Dichiarante
|
|
||||||
testata.add(""); // Cod.Carica Dichiarante
|
int codiceCarica = atoi(prefix().firm().get("CARRAPP"));
|
||||||
|
if(codiceCarica > 0)
|
||||||
|
{
|
||||||
|
TString key = "F|"; key << prefix().firm().get("RAPPR");
|
||||||
|
TString codFisc = cache().get(LF_ANAG, key, "COFI");
|
||||||
|
testata.add(codFisc); // Cod.Fisc. Dichiarante
|
||||||
|
testata.add(codiceCarica); // Cod.Carica Dichiarante
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
testata.add(""); // Cod.Fisc. Dichiarante
|
||||||
|
testata.add(""); // Cod.Carica Dichiarante
|
||||||
|
}
|
||||||
testata.add(""); // Cod.Fisc. Soc. Dichiarante
|
testata.add(""); // Cod.Fisc. Soc. Dichiarante
|
||||||
testata.add(""); // Cod.Fisc. Intermediario
|
testata.add(""); // Cod.Fisc. Intermediario
|
||||||
testata.add(""); // Flag Impegno
|
testata.add(""); // Flag Impegno
|
||||||
|
Loading…
x
Reference in New Issue
Block a user