Patch level : nopatch

Files correlati     :
Commento        :

Correzione cambio stato fatture
This commit is contained in:
Simoe 2022-01-17 17:03:22 +01:00
parent af7b4d4376
commit 38f1868cf2
3 changed files with 35 additions and 15 deletions

View File

@ -61,7 +61,7 @@ void TListaFido_app::main_loop()
recset->set_var("#CODTO", cod_to);
TDate al = m.get_date(F_ADATA);
if (al.ok())
report.set_datafido(al);

View File

@ -36,7 +36,7 @@
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1</prescript>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" height="4" page_break="" can_break="" pattern="1">
<field deactivated="" type="Immagine" hidden="" link="" dynamic_height="" shade_offset="" width="1" codval="" id="1" pattern="1" hide_zero="" text="">
<field deactivated="" type="Immagine" hidden="" image_resize_type="" link="" dynamic_height="" shade_offset="" width="1" codval="" id="1" pattern="1" hide_zero="" text="">
<source>""</source>
</field>
</section>

View File

@ -447,16 +447,36 @@ int TMovimentoPN_VE::recalc_cg_rows(const TString& descr_cr, TCausale& caus)
bool ok = true;
if (_caus->intra() && _caus->iva() == iva_acquisti)
{
TBill c; _caus->bill(RIGA_RITENUTE_FISCALI, c);
ok = c.ok();
if (ok)
{
const TString80 d = _caus->desc_agg(RIGA_RITENUTE_FISCALI);
const char rowtype = 'F';
set_cg_rec(-1, real2imp(head.get_real(MOV_RITFIS), rowtype), c, d, rowtype);
}
else
return 2;
TBill c;
real imp = head.get_real(MOV_REVCHARGE);
if (imp == ZERO)
imp = head.get_real(MOV_RITFIS);
_caus->bill(RIGA_REVERSE_CHARGE, c);
ok = c.ok();
if (ok)
{
const TString80 d = _caus->desc_agg(RIGA_REVERSE_CHARGE);
set_cg_rec(-1, real2imp(imp, cgrowtype_revcharge), c, d, cgrowtype_revcharge);
}
else
{
_caus->bill(RIGA_RITENUTE_FISCALI, c);
ok = c.ok();
if (ok)
{
const TString80 d = _caus->desc_agg(RIGA_RITENUTE_FISCALI);
set_cg_rec(-1, real2imp(imp, cgrowtype_revcharge), c, d, cgrowtype_revcharge);
}
else
return 2;
}
}
else
{
@ -467,9 +487,9 @@ int TMovimentoPN_VE::recalc_cg_rows(const TString& descr_cr, TCausale& caus)
ok = c.ok();
if (ok)
{
const TString80 d = _caus->desc_agg(RIGA_RITENUTE_FISCALI);
const char rowtype = 'F';
set_cg_rec(-1, real2imp(ritfis, rowtype), c, d, rowtype);
const TString80 d = _caus->desc_agg(RIGA_RITENUTE_FISCALI);
set_cg_rec(-1, real2imp(ritfis, cgrowtype_ritfis), c, d, cgrowtype_ritfis);
}
else
return 1;