Patch level : 12.0 1094
Files correlati : ve0.exe ve1.exe ve0200e.msk ve0200f.msk Commento : Aggiornate segnalazioni nell'inserimento documenti. Parametro "Separa la riga esenzioni " per avere una riga vuota prima della riga esenzioni.
This commit is contained in:
parent
626b5d84da
commit
4cd82cde36
@ -249,7 +249,7 @@ END
|
||||
STRING F_CMSCNTFIELD 10
|
||||
BEGIN
|
||||
PROMPT 2 20 "Campo commesse per reperire la causale"
|
||||
FLAGS "U"
|
||||
FLAGS "U"
|
||||
FIELD CMSCNTFIELD
|
||||
END
|
||||
|
||||
|
@ -261,9 +261,15 @@ BEGIN
|
||||
FIELD DESESENZ
|
||||
END
|
||||
|
||||
BOOLEAN F_SEPARA_ESENZ
|
||||
BEGIN
|
||||
PROMPT 2 8 "Separa la riga esenzioni "
|
||||
FIELD SEPARA_ESENZ
|
||||
END
|
||||
|
||||
STRING F_SCTRIGA 4
|
||||
BEGIN
|
||||
PROMPT 2 8 "Tipo riga sconti testa "
|
||||
PROMPT 2 9 "Tipo riga sconti testa "
|
||||
FLAGS "U"
|
||||
USE %TRI SELECT S7=="C"
|
||||
FIELD TRSCONTI
|
||||
|
@ -1377,7 +1377,7 @@ void TMask_generator::genera_testata_1()
|
||||
else
|
||||
{
|
||||
_m->prompt(2, 4, "Fornitore ");
|
||||
_m->warning("IlFornitore #0 non esiste");
|
||||
_m->warning("Il Fornitore #0 non esiste");
|
||||
_m->help("Ragione sociale del fornitore del documento");
|
||||
}
|
||||
_m->flag( "R" );
|
||||
|
@ -1054,6 +1054,7 @@ bool TMask_anamag::handle_sheet_um(TMask_field &fld, KEY k)
|
||||
{
|
||||
TSheet_field &f= (TSheet_field &)fld; // typecast del campo al suo sheet corrispondente
|
||||
TMask_anamag & m= (TMask_anamag &)(fld.mask());
|
||||
|
||||
if (k == K_ENTER && !m.query_mode())
|
||||
{
|
||||
const int items = f.items();
|
||||
|
@ -41,7 +41,7 @@ int TCopydoc_mask::fill_sheet()
|
||||
for (t = 0; t < num1.ntipi_doc(); t++)
|
||||
{
|
||||
const TString& td = num1.tipo_doc(t);
|
||||
tipi.add(td, NULL);
|
||||
tipi.add(td);
|
||||
}
|
||||
|
||||
const TCodice_numerazione num2(n2);
|
||||
|
@ -171,6 +171,7 @@
|
||||
#define F_SPADD 144
|
||||
#define F_MAXADD 145
|
||||
#define F_IMPMINEFF 146
|
||||
#define F_SEPARA_ESENZ 147
|
||||
|
||||
// Campi per ve0200g.uml
|
||||
#define F_EXPLODEDB 101
|
||||
|
@ -1066,7 +1066,11 @@ void TDocumento::set_riga_esenzione()
|
||||
_des_esenz.insert("Fattura non imponibile");
|
||||
}
|
||||
|
||||
|
||||
TString d = _des_esenz;
|
||||
|
||||
if (ini_get_bool(CONFIG_STUDIO, "ve", "SEPARA_ESENZ"))
|
||||
d.insert(" \n"); // nonè uno spazio ma chr(255)
|
||||
const int pos = d.len();
|
||||
TLi_manager & plaf = plafond();
|
||||
TString protinf;
|
||||
|
@ -533,14 +533,14 @@ bool data_hndl( TMask_field& field, KEY key )
|
||||
const TDate dataprev = doc.get_date(DOC_DATADOC);
|
||||
same_key = doc.curr().same_key(m.doc().head(), 1, 1);
|
||||
if (same_key && datadoc < dataprev)
|
||||
return field.error_box("Data documento inferiore alla data del documento precedente");
|
||||
return field.error_box("Data documento inferiore alla data del documento precedente(a %s - s %s)", datadoc.stringa(), doc.get_date(DOC_DATADOC).stringa());
|
||||
}
|
||||
|
||||
doc.curr() = m.doc().head();
|
||||
doc.read(_isgreat);
|
||||
same_key = doc.curr().same_key(m.doc().head(), 1, 1);
|
||||
if (doc.good() && same_key && datadoc > doc.get_date(DOC_DATADOC))
|
||||
return field.error_box("Data documento superiore alla data del documento successivo");
|
||||
if (doc.good() && same_key && datadoc > doc.get_date(DOC_DATADOC))
|
||||
return field.error_box("Data documento superiore alla data del documento successivo (a %s - s %s)", datadoc.stringa(), doc.get_date(DOC_DATADOC).stringa());
|
||||
}
|
||||
if (key == K_ENTER || field.to_check(key))
|
||||
{
|
||||
@ -600,46 +600,40 @@ bool iva_handler( TMask_field& f, KEY key )
|
||||
|
||||
if (key == K_ENTER && f.empty())
|
||||
{
|
||||
const TString& codiva = mask.condv().clifo().vendite().get(CFV_ASSFIS);
|
||||
|
||||
if (codiva.full())
|
||||
f.set(codiva);
|
||||
f.check();
|
||||
}
|
||||
|
||||
if (key == K_ENTER && f.empty())
|
||||
{
|
||||
const TString& codiva = mask.doc().codesiva();
|
||||
|
||||
if (codiva.full())
|
||||
f.set(codiva);
|
||||
f.check();
|
||||
}
|
||||
|
||||
if (key == K_ENTER && f.empty())
|
||||
{
|
||||
const int r = row_mask.get_sheet()->selected() + 1;
|
||||
const TRiga_documento& riga = mask.doc()[r];
|
||||
const int pos_ai = row_mask.id2pos(FR_ADDIVA);
|
||||
bool addiva = false;
|
||||
|
||||
if (pos_ai >= 0)
|
||||
addiva = row_mask.fld(pos_ai).get() == "X"; // Controlla le righe Omaggio solo se è settato l'addebito IVA
|
||||
|
||||
const bool check = riga.is_merce() || riga.is_spese() || riga.is_prestazione() ||
|
||||
(riga.is_omaggio() && addiva);
|
||||
|
||||
const int r = row_mask.get_sheet()->selected() + 1;
|
||||
const TRiga_documento& riga = mask.doc()[r];
|
||||
const int pos_ai = row_mask.id2pos(FR_ADDIVA);
|
||||
const bool addiva = (pos_ai >= 0) && row_mask.fld(pos_ai).get() == "X"; // Controlla le righe Omaggio solo se è settato l'addebito IVA
|
||||
const bool check = riga.is_merce() || riga.is_spese() || riga.is_prestazione() || (riga.is_omaggio() && addiva);
|
||||
|
||||
if (check)
|
||||
{
|
||||
const int pos_p = row_mask.id2pos(FR_PREZZO);
|
||||
const int pos_q = row_mask.id2pos(FR_QTA);
|
||||
const bool pe = pos_p >= 0 && row_mask.fld(pos_p).enabled();
|
||||
const bool qe = pos_q >= 0 && row_mask.fld(pos_q).enabled();
|
||||
const bool pf = pe && row_mask.fld(pos_p).get().not_empty();
|
||||
const bool qf = qe && row_mask.fld(pos_q).get().not_empty();
|
||||
const bool required = pf && !(qe && !qf);
|
||||
if (required)
|
||||
return f.error_box(TR("Il codice IVA è obbligatorio."));
|
||||
const TString& codiva = mask.condv().clifo().vendite().get(CFV_ASSFIS);
|
||||
|
||||
if (codiva.full())
|
||||
f.set(codiva);
|
||||
else
|
||||
{
|
||||
const TString& codivaes = mask.doc().codesiva();
|
||||
|
||||
if (codivaes.full())
|
||||
f.set(codivaes);
|
||||
}
|
||||
f.check();
|
||||
|
||||
if (f.empty())
|
||||
{
|
||||
const int pos_p = row_mask.id2pos(FR_PREZZO);
|
||||
const int pos_q = row_mask.id2pos(FR_QTA);
|
||||
const bool pe = pos_p >= 0 && row_mask.fld(pos_p).enabled();
|
||||
const bool qe = pos_q >= 0 && row_mask.fld(pos_q).enabled();
|
||||
const bool pf = pe && row_mask.fld(pos_p).get().full();
|
||||
const bool qf = qe && row_mask.fld(pos_q).get().full();
|
||||
const bool required = pf && !(qe && !qf);
|
||||
|
||||
if (required)
|
||||
return f.error_box(FR("Il codice IVA è obbligatorio nella riga %d"), r);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (f.running_check(key))
|
||||
|
Loading…
x
Reference in New Issue
Block a user