Patch level : 12.0 356
Files correlati : ve0|ve6 Commento : Modificata dichiarazione di intento: - Aggiunta data inizio dichiarazione - Eliminate dichiarazioni di intento "Nel periodo" - Campo adesso sovrascrive i parametri CFVEN riguardanti la dichiarazione di intento - Aggiunto controllo per chi non ha la dichiarazione di intento in Documenti interattivi git-svn-id: svn://10.65.10.50/branches/R_10_00@23666 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
dc3ea785cf
commit
075f7ba98c
@ -2,6 +2,7 @@
|
||||
#include <defmask.h>
|
||||
#include <relapp.h>
|
||||
#include <tabutil.h>
|
||||
#include "lilib01.h"
|
||||
|
||||
#include "li0.h"
|
||||
#include "li0400a.h"
|
||||
@ -56,28 +57,6 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_VSDATA:
|
||||
if (e == fe_modify)
|
||||
{
|
||||
const TDate datareg(o.mask().get(F_DATAREG));
|
||||
const TDate dataem(o.get());
|
||||
if (dataem > datareg)
|
||||
return error_box(FR("Data di emissione %s superiore alla data di registrazione %s"), (const char *) dataem.string(), (const char *) datareg.string());
|
||||
|
||||
const TDate limite("28-02-2017");
|
||||
TList_field & f = lfield(F_TIPOOP);
|
||||
const TString16 c = f.get_codes();
|
||||
|
||||
if (datareg > limite || dataem > limite)
|
||||
f.delete_item("3");
|
||||
else
|
||||
if (c.find("3") < 0)
|
||||
{
|
||||
f.add_item("3|Nel periodo");
|
||||
f.message(-1, true)->add("ENABLE,1@|CLEAR,F_IMPORTO");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case F_DATAREG:
|
||||
if (e == fe_close && insert_mode())
|
||||
{
|
||||
@ -102,24 +81,22 @@ bool TLetint_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
||||
else
|
||||
if (e == fe_modify)
|
||||
{
|
||||
const TDate datareg(o.mask().get(F_DATAREG));
|
||||
const TDate dataem(o.mask().get(F_VSDATA));
|
||||
const TDate limite("28-02-2017");
|
||||
TList_field & f = lfield(F_TIPOOP);
|
||||
const TString16 c = f.get_codes();
|
||||
|
||||
if (datareg > limite || dataem > limite)
|
||||
f.delete_item("3");
|
||||
else
|
||||
if (c.find("3") < 0)
|
||||
{
|
||||
f.add_item("3|Nel periodo");
|
||||
f.message(-1, true)->add("ENABLE,1@|CLEAR,F_IMPORTO");
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case DLG_SAVEREC:
|
||||
{
|
||||
// Salvo le informazioni nel cliente:
|
||||
TRectype cli = cache().get(LF_CFVEN, TString("C|")<< get_int(F_CODCLI));
|
||||
if(!cli.get("VSNRPROT").empty() && TDate(get(F_DAL)) <= TDate(TODAY))
|
||||
{
|
||||
cli.put("VSNRPROT", get_int(F_VSPROT));
|
||||
cli.put("VSDATAREG", get_date(F_VSDATA));
|
||||
cli.put("NSNPROT", get_int(F_NUMPROT));
|
||||
cli.put("NSDATAREG", get_date(F_DATAREG));
|
||||
cli.rewrite(TLocalisamfile(LF_CFVEN));
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -224,14 +224,12 @@ BEGIN
|
||||
MESSAGE ENABLE,F_IMPORTO|CLEAR,1@
|
||||
ITEM "2|A concorrenza"
|
||||
MESSAGE ENABLE,F_IMPORTO|CLEAR,1@
|
||||
ITEM "3|Nel periodo"
|
||||
MESSAGE ENABLE,1@|CLEAR,F_IMPORTO
|
||||
FIELD TIPOOP
|
||||
END
|
||||
|
||||
BOOLEAN B_CHIUSA
|
||||
BEGIN
|
||||
PROMPT 40 16 "Chiusa: "
|
||||
PROMPT 42 16 "Chiusa"
|
||||
FIELD CHIUSA
|
||||
END
|
||||
|
||||
@ -244,20 +242,10 @@ END
|
||||
|
||||
DATE F_DAL
|
||||
BEGIN
|
||||
PROMPT 1 18 "Data inizio periodo "
|
||||
GROUP 1
|
||||
PROMPT 42 17 "Data inizio periodo"
|
||||
FIELD DAL
|
||||
CHECKTYPE REQUIRED
|
||||
END
|
||||
|
||||
DATE F_AL
|
||||
BEGIN
|
||||
PROMPT 1 19 "Data fine periodo "
|
||||
GROUP 1
|
||||
FIELD AL
|
||||
CHECKTYPE REQUIRED
|
||||
VALIDATE DATE_CMP_FUNC >= F_DAL
|
||||
WARNING "Specificare una 'Data fine periodo' non inferiore alla 'Data inizio perodo'"
|
||||
FLAGS "D"
|
||||
END
|
||||
|
||||
BOOLEAN F_STAMPATO
|
||||
|
@ -30,7 +30,7 @@ void TLi_manager::elabPlafond()
|
||||
filtro.add("ANNO", year);
|
||||
|
||||
// Creo un cursore ordinato e prelevo la prima riga non chiusa
|
||||
TSorted_cursor c_dicint(&letint, "ANNO-|NUMPROT-", "", 2, &filtro, &filtro);
|
||||
TCursor c_dicint(&letint, "", 2, &filtro, &filtro);
|
||||
|
||||
validPlafond = false;
|
||||
bool done = false;
|
||||
@ -47,9 +47,17 @@ void TLi_manager::elabPlafond()
|
||||
|
||||
if(row.get_int("TIPOOP") == SOLUZIONE_UNICA) soluzione = true;
|
||||
year = row.get_int("ANNO");
|
||||
iniDicInt = row.get_date("VSDATA");
|
||||
iniDicInt = row.get_date("DAL");
|
||||
plafond = row.get_real("IMPORTO");
|
||||
validPlafond = true;
|
||||
|
||||
// Salvo le informazioni nel cliente:
|
||||
TRectype cli = cache().get(LF_CFVEN, TString("C|")<<codcli);
|
||||
cli.put("VSNRPROT", row.get_int("VSPROT"));
|
||||
cli.put("VSDATAREG", row.get_date("VSDATA"));
|
||||
cli.put("NSNPROT", row.get_int("NUMPROT"));
|
||||
cli.put("NSDATAREG", row.get_date("DATAREG"));
|
||||
cli.rewrite(TLocalisamfile(LF_CFVEN));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1270,6 +1270,9 @@ void TMotore_application::preview()
|
||||
int TMotore_application::checkPlafondAvaibility(TDocumento d)
|
||||
{
|
||||
TLi_manager plafond(d.tipocf(), d.codcf(), TDate(TODAY).year());
|
||||
if(!plafond.hasValidPlafond()) // Se il cliente non mi interessa
|
||||
return NOERR;
|
||||
|
||||
TAssoc_array tabIva = d.tabella_iva(true);
|
||||
|
||||
real diff(ZERO);
|
||||
|
Loading…
x
Reference in New Issue
Block a user