diff --git a/cg/cg4300.h b/cg/cg4300.h index 3382aec0a..60070facb 100755 --- a/cg/cg4300.h +++ b/cg/cg4300.h @@ -171,7 +171,8 @@ public: TString _s0, _s1, _s2, _s3, _s4, _s5, _s6; real _r0, _r1, _r2, _r3, _r4, _r5, _r6, _r7, _r8, _r9, _r10, _r11, _r12, _r13, _r14, _r15, _r16, _r17, _r18, _r19, - _r20, _r21, _r22, _r23, _r24, _r25, _r26, _r27, _r28, _r29; + _r20, _r21, _r22, _r23, _r24, _r25, _r26, _r27, _r28, _r29, + _r30, _r31, _r32, _r33; TArray _arr; TDate _d0; diff --git a/cg/cg4301.cpp b/cg/cg4301.cpp index 22327c953..7a3058b15 100755 --- a/cg/cg4301.cpp +++ b/cg/cg4301.cpp @@ -483,6 +483,7 @@ void TLiquidazione_app::zero_att(int month, const char* codatt) const char* flds[] = { "R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15", "R16", "R17", "R18", "R19", "R20", "R21", "R22", "R23", "R24", "R25", "R26", "R27", "R28", "R29", + "R30", "R31", "R32", "R33", "S0", "S1", "S2" }; TString att, year, codtab; @@ -511,7 +512,7 @@ void TLiquidazione_app::zero_att(int month, const char* codatt) year = codtab.mid(0,4); if (m == month && att == codatt && year == _year) { - for (int j = 0; j < 33; j++) // Ciclo per i campi del record da azzerare + for (int j = 0; j < 34; j++) // Ciclo per i campi del record da azzerare tab->zero(flds[j]); tab->rewrite(); } @@ -648,6 +649,10 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) real fdiff_iva = ZERO; real fdiffinc_imp = ZERO; real fdiffinc_iva = ZERO; + real fdiff_imp_acq = ZERO; + real fdiff_iva_acq = ZERO; + real fdiffinc_imp_acq = ZERO; + real fdiffinc_iva_acq = ZERO; for (int j = 0; j < 23; j++) { @@ -716,16 +721,17 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) TDate f(1, month == 13 ? 1 : month, year_int); TDate fromdate(f); TDate t; + TDate f74; // Spiegazione dell'arcano segreto sulle agenzie viaggio: // non viene applicato lo stesso metodo delle ditte normali perche' si deve // tenere conto della DATA74TER se presente. // Per le agenzie di viaggio si parte da inizio anno precedente if (_isviaggio) - f = TDate(1, 1, year_int-1); + f74 = TDate(1, 1, year_int-1); - if (_isdiff) - f = TDate(1, 1, year_int-5); +// if (_isdiff) +// f = TDate(1, 1, year_int-5); if (year_int < 1998 || _recalc_regis) // Vecchia selezione o calcolo progoressivi per stampa registri bollati { t.set_month(month == 13 ? 12 : month); @@ -745,9 +751,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) from.put(MOV_REG, fromreg); to.put(MOV_REG, toreg); -// from.put(MOV_DATAREG, f); -// to.put(MOV_DATAREG, t); - _cur->freeze(FALSE); _cur->setregion(from, to); @@ -756,9 +759,10 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) if (_isviaggio || _isdiff) { if (_isviaggio) - filter << format("||((ANSI(DATA74TER)>=%ld)&&(ANSI(DATA74TER)<=%ld))", fromdate.date2ansi(), t.date2ansi()); + filter << format("||((ANSI(DATA74TER)>=%ld)&&(ANSI(DATA74TER)<=%ld))", f74.date2ansi(), t.date2ansi()); if (_isdiff) - filter << format("||((ANSI(DATAINC)>=%ld)&&(ANSI(DATAINC)<=%ld))", fromdate.date2ansi(), t.date2ansi()); + filter << "|| NUM(LIQDIFF==\"X\")"; +// format( ||((ANSI(DATAINC)>=%ld)&&(ANSI(DATAINC)<=%ld))", fromdate.date2ansi(), t.date2ansi()); } _cur->setfilter(filter); const long items = _cur->items(); @@ -792,7 +796,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) const TString4 tipodoc = _mov->get(MOV_TIPODOC); const bool corrisp = _reg->get_bool("B0"); const tiporeg tipomov = (tiporeg)_reg->get_int("I0"); - // Controlla se la data del documento si riferisce all'anno precedente (PRORATA 1998) TDate datedoc(_mov->get(MOV_DATADOC)); @@ -807,20 +810,34 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) const bool fattrit = rcs.get_bool("RITFATT"); const bool cau_intra = rcs.get_bool("INTRACOM"); const bool cau_valintra = rcs.get_bool("VALINTRA"); - const bool movdiff = _isdiff && tipomov == vendita && rcs.get_bool(CAU_LIQDIFF); - if (movdiff) - int i = 1; - const TDate datainc = _mov->get_date(MOV_DATAINC); - const bool datainc_ok = is_date_ok(datainc, month, liqmonth, year_int); + const bool movdiff = _isdiff && _mov->get_bool(MOV_LIQDIFF); + // if (movdiff) + // int i = 1; + + TDate datainc = _mov->get_date(MOV_DATAINC); + + if (movdiff && !datainc.ok()) + { + const long codcf = _mov->get_long(MOV_CODCF); + TString8 key(_mov->get(MOV_TIPO)); key << "|" << codcf; + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (clifo.get_int(CLI_ALLEG) < 7) // non e' un ente pubblico + { + datainc = _mov->get_date(MOV_DATADOC); + if (datainc.ok()) + datainc.addyear(); + } + } + + bool datainc_ok = is_date_ok(datainc, month, liqmonth, year_int); const bool diffpayed = movdiff && datainc_ok; - if (diffpayed) - { - date = _mov->get_date(MOV_DATAINC); - if (date.year() != year_int) // Controlla anno di appartenenza, altrimenti is_date_ok potrebbe non funzionare - continue; - } + const bool difftopay = movdiff && !diffpayed; + + if (diffpayed) + date = datainc; + const bool dok = is_date_ok(date, month, liqmonth, year_int); - const bool difftopay = movdiff && dok && (!datainc.ok() || !datainc_ok); /* * check register present, rmoviva present and date OK * @@ -833,9 +850,9 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) const bool sreg = !isreg; const bool rs8 = _reg->get("S8") != trueatt; const bool cmt = !_cur->is_first_match(LF_RMOVIVA); - const bool dok1 = dok || diffpayed; +// const bool dok1 = dok || diffpayed; - if (!dok1 || sreg || rs8 || cmt) + if (!dok || sreg || rs8 || cmt) continue; @@ -1777,15 +1794,30 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) (!diff_imp.is_zero() ||!diff_iva.is_zero() || !incdiff_imp.is_zero() || !incdiff_imp.is_zero())) { - // fatture a liquidazione differita - tab->put("R26", tab->get_real("R26") + diff_imp); - tab->put("R27", tab->get_real("R27") + diff_iva); - tab->put("R28", tab->get_real("R28") + incdiff_imp); - tab->put("R29", tab->get_real("R29") + incdiff_iva); - fdiff_imp += diff_imp; - fdiff_iva += diff_iva; - fdiffinc_imp += incdiff_imp; - fdiffinc_iva += incdiff_iva; + if (tipomov == vendita) + { + // fatture a liquidazione differita + tab->put("R26", tab->get_real("R26") + diff_imp); + tab->put("R27", tab->get_real("R27") + diff_iva); + tab->put("R28", tab->get_real("R28") + incdiff_imp); + tab->put("R29", tab->get_real("R29") + incdiff_iva); + fdiff_imp += diff_imp; + fdiff_iva += diff_iva; + fdiffinc_imp += incdiff_imp; + fdiffinc_iva += incdiff_iva; + } + else + { + // fatture a liquidazione differita + tab->put("R30", tab->get_real("R30") + diff_imp); + tab->put("R31", tab->get_real("R31") + diff_iva); + tab->put("R32", tab->get_real("R32") + incdiff_imp); + tab->put("R33", tab->get_real("R33") + incdiff_iva); + fdiff_imp_acq += diff_imp; + fdiff_iva_acq += diff_iva; + fdiffinc_imp_acq += incdiff_imp; + fdiffinc_iva_acq += incdiff_iva; + } } tab->rewrite(); // rewrite current table @@ -2033,6 +2065,10 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) _plm->put("R27", fdiff_iva); _plm->put("R28", fdiffinc_imp); _plm->put("R29", fdiffinc_iva); + _plm->put("R30", fdiff_imp_acq); + _plm->put("R31", fdiff_iva_acq); + _plm->put("R32", fdiffinc_imp_acq); + _plm->put("R33", fdiffinc_iva_acq); _plm->rewrite(); _pam->rewrite(); @@ -2789,6 +2825,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) real fdiff_iva = ZERO; real fdiffinc_imp = ZERO; real fdiffinc_iva = ZERO; + real fdiff_imp_acq = ZERO; + real fdiff_iva_acq = ZERO; + real fdiffinc_imp_acq = ZERO; + real fdiffinc_iva_acq = ZERO; // totali per annuali real vol_aff_1 = ZERO; @@ -2868,16 +2908,24 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) const real diff_iva = _plm->get_real("R27"); const real diffinc_imp = _plm->get_real("R28"); const real diffinc_iva = _plm->get_real("R29"); + const real diff_imp_acq = _plm->get_real("R30"); + const real diff_iva_acq = _plm->get_real("R31"); + const real diffinc_imp_acq = _plm->get_real("R32"); + const real diffinc_iva_acq = _plm->get_real("R33"); iva_vend += vend; iva_acq += acq; - risultato += (vend - acq + diffinc_iva); + risultato += (vend - acq + diffinc_iva - diffinc_iva_acq); res_debt += vend + diffinc_iva; res_cred += acq; fdiff_imp += diff_imp; fdiff_iva += diff_iva; fdiffinc_imp += diffinc_imp; fdiffinc_iva += diffinc_iva; + fdiff_imp_acq += diff_imp_acq; + fdiff_iva_acq += diff_iva_acq; + fdiffinc_imp_acq += diffinc_imp_acq; + fdiffinc_iva_acq += diffinc_iva_acq; } else { @@ -2899,7 +2947,25 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) acq_noCEE += _plm->get_real("R11"); imp_agr1 += _pum->get_real("R10"); imp_agr2 += _pum->get_real("R11"); - } + + const real diff_imp = _plm->get_real("R26"); + const real diff_iva = _plm->get_real("R27"); + const real diffinc_imp = _plm->get_real("R28"); + const real diffinc_iva = _plm->get_real("R29"); + const real diff_imp_acq = _plm->get_real("R30"); + const real diff_iva_acq = _plm->get_real("R31"); + const real diffinc_imp_acq = _plm->get_real("R32"); + const real diffinc_iva_acq = _plm->get_real("R33"); + + fdiff_imp += diff_imp; + fdiff_iva += diff_iva; + fdiffinc_imp += diffinc_imp; + fdiffinc_iva += diffinc_iva; + fdiff_imp_acq += diff_imp_acq; + fdiff_iva_acq += diff_iva_acq; + fdiffinc_imp_acq += diffinc_imp_acq; + fdiffinc_iva_acq += diffinc_iva_acq; + } detrazioni+= (_plm->get_real("R3")); // detrazioni solo non in regime agricolo @@ -3367,6 +3433,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) _lim->put("R27", fdiff_iva); _lim->put("R28", fdiffinc_imp); _lim->put("R29", fdiffinc_iva); + _lim->put("R30", fdiff_imp_acq); + _lim->put("R31", fdiff_iva_acq); + _lim->put("R32", fdiffinc_imp_acq); + _lim->put("R33", fdiffinc_iva_acq); _lam->put("R0", iva_vend); _lam->put("R1", iva_acq); @@ -3415,8 +3485,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) round_imposta(crediti_speciali); round_imposta(fdiff_iva); round_imposta(fdiffinc_iva); + round_imposta(fdiff_iva_acq); + round_imposta(fdiffinc_iva_acq); - res_cred = iva_acq + versamenti + vers_int + cred_prec - cred_trasf + acc_dec + credito_utilizzato_iva + crediti_speciali; + res_cred = iva_acq + versamenti + vers_int + cred_prec - cred_trasf + acc_dec + credito_utilizzato_iva + crediti_speciali + fdiffinc_iva_acq; res_debt = iva_vend + rimborsi + debt_precd + imposta_non_versata + fdiffinc_iva; if (atoi(_year) < 1998) // Non vale piu' dal 1998 in poi; iva_acq e' gia' ok e cosi' res_cred. @@ -3487,6 +3559,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) _lim->put("R27", fdiff_iva); _lim->put("R28", fdiffinc_imp); _lim->put("R29", fdiffinc_iva); + _lim->put("R30", fdiff_imp_acq); + _lim->put("R31", fdiff_iva_acq); + _lim->put("R32", fdiffinc_imp_acq); + _lim->put("R33", fdiffinc_iva_acq); // ciapa } diff --git a/cg/cg4302.cpp b/cg/cg4302.cpp index d140c48e7..1468d5a0c 100755 --- a/cg/cg4302.cpp +++ b/cg/cg4302.cpp @@ -113,21 +113,21 @@ bool TLiquidazione_app::is_date_ok(const TDate& d, int month, int liqmonth, int // selezionati. Vedi cg4301.cpp per maggiori informazioni // sul nuovo filtro di selezione movimenti. { - bool ok; - + if (d.year() != year) + return false; if (year < 1998 || _recalc_regis) // Vecchia selezione o calcolo progressivi per stampa registri bollati { if (d.month() > month || d.year() != atoi(_year)) - return ok = FALSE; - + return false; + if (month == 13) - ok = d.month() <= month; + return d.month() <= month; else { if (_freqviva == "M") // Guy!!! - ok = d.month() == month; + return d.month() == month; else - ok = d.month() >= month-2 && d.month() <= month; + return d.month() >= month-2 && d.month() <= month; } } else // Nuova selezione dal 1998 in poi @@ -136,11 +136,11 @@ bool TLiquidazione_app::is_date_ok(const TDate& d, int month, int liqmonth, int const int regyear = d.year(); if (month <= 12) - ok = (regmonth == month && liqmonth == 0) || (liqmonth == month); + return (regmonth == month && liqmonth == 0) || (liqmonth == month); else // Annuale, month == 13 - ok = (regyear == year && liqmonth != 12) || (regyear == year + 1 && liqmonth == 12); + return (regyear == year && liqmonth != 12) || (regyear == year + 1 && liqmonth == 12); } - return ok; + return false; } diff --git a/cg/cg4304.cpp b/cg/cg4304.cpp index 785e7beaf..9a2ba4478 100755 --- a/cg/cg4304.cpp +++ b/cg/cg4304.cpp @@ -209,6 +209,7 @@ void TLiquidazione_app::describe_liqacc() d->_r7 = _lia->get_real("R11"); d->_r8 = _lia->get_real("R4"); d->_r29 = _lia->get_real("R29"); + d->_r33 = _lia->get_real("R33"); TToken_string ff(_lia->get("S1"),'!'); real cre_pre (ff.get(0)); real acq_intr (ff.get(1)); @@ -502,10 +503,11 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool const char* tmpatt; int last = _descr_arr.last(); bool issosp = false; - real t0, t1, t2, t3, t4, t5, t26, t27, t28, t29; + real t0, t1, t2, t3, t4, t5, t26, t27, t28, t29, t30, t31, t32, t33; real rt0, rt1, rt2, rt3, rt4, rt5; real autodafe, autodafe_iva, art40, art40_iva; real diffimp, diffiva, diffincimp, diffinciva; + real diffimp_acq, diffiva_acq, diffincimp_acq, diffinciva_acq; bool skip_acq = atts.items() == 1 && _mixed; // descrittore riga autodafe' @@ -567,13 +569,17 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool real rit_imp(s1.get(0)); real rit_iva(s1.get(1)); - if (tipomov == vendita) - { +// if (tipomov == vendita) +// { diffimp = _pim->get_real("R26"); diffiva = _pim->get_real("R27"); diffincimp = _pim->get_real("R28"); diffinciva = _pim->get_real("R29"); - } + diffimp_acq = _pim->get_real("R30"); + diffiva_acq = _pim->get_real("R31"); + diffincimp_acq = _pim->get_real("R32"); + diffinciva_acq = _pim->get_real("R33"); +// } const bool is_rit= tipodet != 0 && month == 13 && rit_imp != 0.0; //Se fattura in ritardo con tipo detr. != 0 e si sta calcolando l'annuale const tipo_sospensione sosp_imp = _reg->get_bool("B1") ? (tipo_sospensione) _reg->get_int("I9") : nessuna; @@ -778,9 +784,10 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool art40_iva += va7v; } } - if (tipomov == vendita) - { - if (!diffimp.is_zero() && !diffiva.is_zero()) +// if (tipomov == vendita) +// { + if ((!diffimp.is_zero() && !diffiva.is_zero()) || + (!diffimp_acq.is_zero() && !diffiva_acq.is_zero())) { const word id = describe_pis ? PIS_ROW_D : PIM_ROW_D; int j; @@ -824,8 +831,13 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool d->_r27 += diffiva; t26 += diffimp; t27 += diffiva; + d->_r30 += diffimp_acq; + d->_r31 += diffiva_acq; + t30 += diffimp_acq; + t31 += diffiva_acq; } - if (!diffincimp.is_zero() && !diffinciva.is_zero()) + if ((!diffincimp.is_zero() && !diffinciva.is_zero()) || + (!diffincimp_acq.is_zero() && !diffinciva_acq.is_zero())) { const word id = describe_pis ? PIS_ROW_DI : PIM_ROW_DI; int j; @@ -868,8 +880,12 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool d->_r29 += diffinciva; t28 += diffincimp; t29 += diffinciva; + d->_r32 += diffincimp_acq; + d->_r33 += diffinciva_acq; + t32 += diffincimp_acq; + t33 += diffinciva_acq; } - } +// } } } // End of _pim cycle @@ -946,11 +962,15 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool { totd->_r26 = t26; totd->_r27 = t27; + totd->_r30 = t30; + totd->_r31 = t31; } if (totdi != NULL) { totdi->_r28 = t28; totdi->_r29 = t29; + totdi->_r32 = t32; + totdi->_r33 = t33; } // Totali progressivi da registri, comprensivi dei valori per calcolo vol affari. if (tot != NULL && issosp) // Setta i valori (e la conseguente stampa della riga) solo se presenti registri in sospensione @@ -1188,6 +1208,7 @@ void TLiquidazione_app::describe_liq(int month, const char* codatts, _DescrItem* d->_r7 = _lim->get_real("R14"); d->_r9 = _lim->get_real("R9"); d->_r29 = _lim->get_real("R29"); + d->_r33 = _lim->get_real("R33"); if (atoi(_year) <= 1997) // Dal 1998 in poi il conguaglio prorata non va stampato, ma conglobato nell'iva acquisti d->_r10 = _lim->get_real("R7"); // totale conguaglio prorata @@ -1598,12 +1619,16 @@ void TLiquidazione_app::set_liqacc_2000(_DescrItem& d) set_row(i++,FR("@11gIva esigibile fino al 20/12@81g%r"), &d._r0); if (d._r29 > ZERO) set_row(i++,FR("@11gIVA a liquidazione differita incassata fino al 20/12@75g%r"), &d._r29); + if (d._r33 > ZERO) + set_row(i++,FR("@11gIVA a liquidazione differita pagata fino al 20/12@64g%r"), &d._r33); } else { set_row(i++,FR("@11gIva sulle operazioni di vendita@81g%r"), &d._r0); if (d._r29 > ZERO) set_row(i++,FR("@11gIVA a liquidazione differita incassata@75g%r"), &d._r29); + if (d._r33 > ZERO) + set_row(i++,FR("@11gIVA a liquidazione differita pagata@64g%r"), &d._r33); } if (!_isdiffacc) { @@ -1740,8 +1765,10 @@ void TLiquidazione_app::set_pim(_DescrItem& d) const bool c = (d._r4 + d._r5) == ZERO; const bool e = (d._r26 + d._r27) == ZERO; const bool f = (d._r28 + d._r29) == ZERO; + const bool g = (d._r30 + d._r31) == ZERO; + const bool h = (d._r32 + d._r33) == ZERO; - if (a && b && c && e && f) + if (a && b && c && e && f && g && h) return; int rw = 1; @@ -1767,16 +1794,16 @@ void TLiquidazione_app::set_pim(_DescrItem& d) else if (d._flags == PIM_ROW_D || d._flags == PIS_ROW_D) { - set_row(rw++,"%4s %s@25g%r@41g%r", + set_row(rw++,"%4s %s@25g%r@41g%r@91g%r@107g%r", (const char*)d._s1, (const char*)d._s2, - &(d._r26), &(d._r27)); + &(d._r26), &(d._r27), &(d._r30), &(d._r31)); } else if (d._flags == PIM_ROW_DI || d._flags == PIS_ROW_DI) { - set_row(rw++,"%4s %s@25g%r@41g%r", + set_row(rw++,"%4s %s@25g%r@41g%r@91g%r@107g%r", (const char*)d._s1, (const char*)d._s2, - &(d._r28), &(d._r29)); + &(d._r28), &(d._r29), &(d._r32), &(d._r33)); } } @@ -1786,9 +1813,9 @@ void TLiquidazione_app::set_plm_diff(_DescrItem& d) set_row(rw++,""); set_row(rw++,""); if (d._flags == TOT_ROW_D) - set_row(rw++,FR("Totale@25g%r@41g%r"), &(d._r26), &(d._r27)); + set_row(rw++,FR("Totale@25g%r@41g%r@91g%r@107g%r"), &(d._r26), &(d._r27), &(d._r30), &(d._r31)); else - set_row(rw++,FR("Totale@25g%r@41g%r"), &(d._r28), &(d._r29)); + set_row(rw++,FR("Totale@25g%r@41g%r@91g%r@107g%r"), &(d._r28), &(d._r29), &(d._r32), &(d._r33)); set_row(rw++,""); } @@ -2231,6 +2258,7 @@ void TLiquidazione_app::set_grand_2000(_DescrItem& d, int &rw) const real& versamenti = d._r8; const real& vers_int = d._r9; const real& diffinc_iva = d._r29; + const real& diffinc_iva_acq = d._r33; TToken_string tt(d._s0); real iva_vend(tt.get(0)); real iva_acq(tt.get(1)); @@ -2269,10 +2297,12 @@ void TLiquidazione_app::set_grand_2000(_DescrItem& d, int &rw) if (!_is_visliq) iva_acq += rett_cred; set_row(rw++,FR("@11gIva che si detrae per il periodo@58g%r"), &iva_acq); + if (diffinc_iva_acq != ZERO) + set_row(rw++,FR("@11gIVA a liquidazione differita pagata@58g%r"), &diffinc_iva_acq); if (_is_visliq) set_row(rw++,FR("@11g$[r]Rettifiche IVA a credito$[n]@58g%r"), &rett_cred); - real iva_deb_cred = iva_vend - iva_acq + diffinc_iva; + real iva_deb_cred = iva_vend - iva_acq + diffinc_iva - diffinc_iva_acq; if (_is_visliq) iva_deb_cred += rett_debt - rett_cred; diff --git a/cg/cg4400.cpp b/cg/cg4400.cpp index c9dbb542d..7276dce15 100755 --- a/cg/cg4400.cpp +++ b/cg/cg4400.cpp @@ -2015,7 +2015,7 @@ bool TStampa_registri_app::preprocess_page(int file, int counter) TString16 codval = mov.get(MOV_CODVALI); real corrval = mov.get_real(MOV_CORRVALUTA); bool autof = caus.get_bool(CAU_AUTOFATT); - bool liqdiff = caus.get_bool(CAU_LIQDIFF); + bool liqdiff = mov.get_bool(MOV_LIQDIFF); TString80 descrcau = caus.get(CAU_DESCR); real totdoc = mov.get_real(MOV_TOTDOC);