Patch level : 12.0 no-patch
Files correlati : Commento : Modificata gestione liquidazione differita e split payment git-svn-id: svn://10.65.10.50/branches/R_10_00@23405 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
cf531a95bc
commit
f79d5d05ba
@ -260,7 +260,11 @@ void TCli_for::cli2doc(TDocumento& doc)
|
|||||||
doc.put(DOC_PERCSPINC, v.get(CFV_PERCSPINC));
|
doc.put(DOC_PERCSPINC, v.get(CFV_PERCSPINC));
|
||||||
doc.put(DOC_ADDBOLLI, v.get(CFV_ADDBOLLI));
|
doc.put(DOC_ADDBOLLI, v.get(CFV_ADDBOLLI));
|
||||||
doc.put(DOC_CATVEN, v.get(CFV_CATVEN));
|
doc.put(DOC_CATVEN, v.get(CFV_CATVEN));
|
||||||
doc.put(DOC_LIQDIFF, get_int(CLI_ALLEG) == 7 && v.get_bool(CFV_FATTSOSP) ? "X" : "");
|
|
||||||
|
const int alleg = get_int(CLI_ALLEG);
|
||||||
|
const bool split_payment = doc.get_date(DOC_DATADOC).year() >= 2015 && get_bool(CLI_SPLITPAY);
|
||||||
|
|
||||||
|
doc.put(DOC_LIQDIFF, !split_payment && alleg == 7 && ini_get_bool(CONFIG_DITTA, "cg", "GesLiqDiff") ? "X" : "");
|
||||||
|
|
||||||
//listino: deve essere attiva la gestione listini nella ditta
|
//listino: deve essere attiva la gestione listini nella ditta
|
||||||
const bool gest_listini = ini_get_bool(CONFIG_DITTA, "ve", "GES", false, 1);
|
const bool gest_listini = ini_get_bool(CONFIG_DITTA, "ve", "GES", false, 1);
|
||||||
|
@ -1196,23 +1196,30 @@ void TDocumento_mask::cli2mask(bool force_load)
|
|||||||
const TDate datadoc = doc().get(DOC_DATADOC);
|
const TDate datadoc = doc().get(DOC_DATADOC);
|
||||||
|
|
||||||
const bool split_payment = datadoc.year() >= 2015 && c.get_bool(CLI_SPLITPAY);
|
const bool split_payment = datadoc.year() >= 2015 && c.get_bool(CLI_SPLITPAY);
|
||||||
const bool ivadiff = !split_payment && ven_rec.get_bool(CFV_FATTSOSP);
|
const bool ivadiff = !split_payment && alleg == 7;
|
||||||
if (ivadiff)
|
|
||||||
{
|
|
||||||
TMask_field* ld = find_by_id(F_LIQDIFF);
|
TMask_field* ld = find_by_id(F_LIQDIFF);
|
||||||
|
|
||||||
if (ld)
|
if (ld)
|
||||||
|
{
|
||||||
|
if (ivadiff)
|
||||||
{
|
{
|
||||||
const bool gld = ini_get_bool(CONFIG_DITTA, "cg", "GesLiqDiff");
|
const bool gld = ini_get_bool(CONFIG_DITTA, "cg", "GesLiqDiff");
|
||||||
if (gld != ld->active())
|
|
||||||
ld->enable(gld);
|
ld->enable(gld);
|
||||||
ld->set(gld ? "X" : "");
|
ld->set(gld ? "X" : "");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ld->disable();
|
||||||
|
ld->set("");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TMask_field* ixc = find_by_id(F_IVAXCASSA);
|
TMask_field* ixc = find_by_id(F_IVAXCASSA);
|
||||||
if (ixc && ixc->active())
|
if (ixc)
|
||||||
{
|
{
|
||||||
const bool IVAxCassa = !split_payment && !ivadiff && alleg < 5 && gestione_IVAxCassa(datadoc);
|
const bool IVAxCassa = !split_payment && !ivadiff && alleg < 5 && gestione_IVAxCassa(datadoc);
|
||||||
|
ixc->enable(IVAxCassa);
|
||||||
ixc->set(IVAxCassa ? "X" : "");
|
ixc->set(IVAxCassa ? "X" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user