Patch level : 12.0 1072
Files correlati : batbtpe.msk f154.dir f154.trr li0400a.msk li0.exe Commento : Aggiunta la possibilità di definire diversi tipi di esenzione da esportare nelle fatture elettroniche con le modificehe consguenti sull fatturazione e la fatturazione elettronica Interno : aggiunta una nuov tabella da indicare nella letera di intento con tipo dato, descrizione per l'invio fatture e flag di stampa sulle fatture della dicitura di esenzione.
This commit is contained in:
parent
2a9d663c09
commit
b749a7b6bf
@ -48,17 +48,17 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
|||||||
{
|
{
|
||||||
case F_ANNO:
|
case F_ANNO:
|
||||||
if (e == fe_modify || e == fe_init || e == fe_close)
|
if (e == fe_modify || e == fe_init || e == fe_close)
|
||||||
{
|
{
|
||||||
if (!is_registro(atoi(o.get())))
|
if (!is_registro(atoi(o.get())))
|
||||||
return error_box(FR("Manca il registro dichiarazioni d'intento per l'anno %d"), atoi(o.get()));
|
return error_box(FR("Manca il registro dichiarazioni d'intento per l'anno %d"), atoi(o.get()));
|
||||||
}
|
}
|
||||||
case F_NUMPROT:
|
case F_NUMPROT:
|
||||||
if (e == fe_close && query_mode())
|
if (e == fe_close && query_mode())
|
||||||
{
|
{
|
||||||
const long numprot = get_long(F_NUMPROT);
|
const long numprot = get_long(F_NUMPROT);
|
||||||
if (!keyforced && numprot > 1)
|
if (!keyforced && numprot > 1)
|
||||||
{
|
{
|
||||||
const int anno = get_int(F_ANNO);
|
const int anno = get_int(F_ANNO);
|
||||||
TLocalisamfile letint(LF_LETINT);
|
TLocalisamfile letint(LF_LETINT);
|
||||||
letint.put(LETINT_ANNO, anno);
|
letint.put(LETINT_ANNO, anno);
|
||||||
letint.put(LETINT_NUMPROT, numprot - 1);
|
letint.put(LETINT_NUMPROT, numprot - 1);
|
||||||
@ -68,13 +68,13 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case F_DATAREG:
|
case F_DATAREG:
|
||||||
if (e == fe_close && insert_mode())
|
if (e == fe_close && insert_mode())
|
||||||
{
|
{
|
||||||
const long numprot = get_long(F_NUMPROT);
|
const long numprot = get_long(F_NUMPROT);
|
||||||
if (numprot > 1)
|
if (numprot > 1)
|
||||||
{
|
{
|
||||||
const int anno = get_int(F_ANNO);
|
const int anno = get_int(F_ANNO);
|
||||||
TLocalisamfile letint(LF_LETINT);
|
TLocalisamfile letint(LF_LETINT);
|
||||||
letint.put(LETINT_ANNO, anno);
|
letint.put(LETINT_ANNO, anno);
|
||||||
letint.put(LETINT_NUMPROT, numprot - 1);
|
letint.put(LETINT_NUMPROT, numprot - 1);
|
||||||
@ -82,59 +82,47 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
|||||||
{
|
{
|
||||||
const TDate& old_data = letint.get_date(LETINT_DATAREG);
|
const TDate& old_data = letint.get_date(LETINT_DATAREG);
|
||||||
if (get_date(F_DATAREG) < old_data)
|
if (get_date(F_DATAREG) < old_data)
|
||||||
return error_box(TR("La data di registrazione non puo' essere antecedente a %s"), (const char*) old_data.string());
|
return error_box(TR("La data di registrazione non puo' essere antecedente a %s"), (const char*)old_data.string());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TDate ultima = ultima_stampa(anno);
|
||||||
|
if (get_date(F_DATAREG) <= ultima)
|
||||||
|
return error_box(TR("La data di registrazione non puo' essere antecedente a %s"), (const char*)ultima.string());
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
TDate ultima = ultima_stampa(anno);
|
|
||||||
if (get_date(F_DATAREG) <= ultima)
|
|
||||||
return error_box(TR("La data di registrazione non puo' essere antecedente a %s"), (const char*)ultima.string());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (e == fe_modify)
|
if (e == fe_modify)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case F_TIPOOP:
|
||||||
|
// Controlli
|
||||||
|
if (e == fe_close)
|
||||||
|
{
|
||||||
|
const int tipo_op = get_int(F_TIPOOP);
|
||||||
|
const TDate data = get_date(F_DAL);
|
||||||
|
|
||||||
case F_DAL:
|
if (!keyforced && tipo_op == 3 && data > TDate(01, 03, 2017) && get(F_TIPOES).blank())
|
||||||
if(e != fe_modify)
|
return error_box(TR("Non può esistere una dichiarazione di intento di tipo \"Nel Periodo\"\ncon data posteriore al 01/03/2017!"));
|
||||||
break;
|
}
|
||||||
case F_TIPOOP:
|
else
|
||||||
// Controlli
|
if (e == fe_init || e == fe_modify) // Abilitazione date
|
||||||
/* if(!keyforced && insert_mode() && get_int(F_TIPOOP) == 3 && get_date(F_DAL) > TDate(01,03,2017))
|
{
|
||||||
{
|
const int tipo_op = get_int(F_TIPOOP);
|
||||||
error_box(TR("Non può esistere una dichiarazione di intento di tipo \"A Periodo\"\ncon data posteriore al 01/03/2017!"));
|
|
||||||
disable(DLG_SAVEREC);
|
enable(F_DAL, tipo_op != 1);
|
||||||
}
|
enable(F_AL, tipo_op == 3);
|
||||||
else
|
if (e == fe_modify)
|
||||||
{
|
{
|
||||||
enable(DLG_SAVEREC);
|
if (tipo_op == 1)
|
||||||
} */
|
reset(F_DAL);
|
||||||
// Abilitazione date
|
if (tipo_op != 3)
|
||||||
switch (get_int(F_TIPOOP))
|
reset(F_DAL);
|
||||||
{
|
}
|
||||||
case 1:
|
}
|
||||||
disable(F_DAL);
|
}
|
||||||
disable(F_AL);
|
|
||||||
set(F_DAL, "");
|
|
||||||
set(F_AL, "");
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
enable(F_DAL);
|
|
||||||
disable(F_AL);
|
|
||||||
set(F_AL, "");
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
enable(F_DAL);
|
|
||||||
enable(F_AL);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user