From 032938f33eb17a5e5fec3a5360383cfaa95094eb Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Thu, 6 Aug 2020 00:34:01 +0200 Subject: [PATCH] Patch level : 12.0 no-patch Files correlati : Commento : Aggiornati include --- src/cg/cg4300.h | 6 ++--- src/cg/cg4302.cpp | 2 +- src/cg/cg4400.cpp | 4 +-- src/cg/cg4400.h | 2 +- src/cg/cg4500.cpp | 2 +- src/cg/cg4700.cpp | 2 +- src/cg/cg4800.cpp | 2 +- src/cg/cg4900.cpp | 2 +- src/cg/cg5200.cpp | 8 +++--- src/cg/cg5500.cpp | 2 +- src/cg/cg5700.cpp | 2 +- src/cg/cg5800.cpp | 2 +- src/cg/cg5900.cpp | 64 ++++++++++++++++++++++------------------------- 13 files changed, 48 insertions(+), 52 deletions(-) diff --git a/src/cg/cg4300.h b/src/cg/cg4300.h index 0066b7ce8..f93821b2f 100755 --- a/src/cg/cg4300.h +++ b/src/cg/cg4300.h @@ -9,8 +9,8 @@ #include #endif -#ifndef __CGLIB03_H -#include "cglib03.h" +#ifndef __CGLIB_H +#include "cglib.h" #endif class TProgind; @@ -78,7 +78,7 @@ enum recalc { one = 2, never = 4 }; enum wht { all = 1, mnt = 2, trimestre = 3}; enum tbc { precedente = 1, incorso = 2}; enum tiporeg { vendita = 1, acquisto = 2 }; -enum tipo_sospensione { nessuna, normale, vol_affari, liquidazione }; +enum tipo_sospensione { nessuna, sospensione_normale, vol_affari, liquidazione }; // flags per gli items di stampa #define CHG_PARMS 1 // cambiato qualcosa (attivita', ditta...) diff --git a/src/cg/cg4302.cpp b/src/cg/cg4302.cpp index 4db81549a..c5108229b 100755 --- a/src/cg/cg4302.cpp +++ b/src/cg/cg4302.cpp @@ -9,7 +9,7 @@ #include #include -#include "cglib03.h" +#include "cglib.h" #include "cg4300.h" #include diff --git a/src/cg/cg4400.cpp b/src/cg/cg4400.cpp index da589fa82..9d9d539d3 100755 --- a/src/cg/cg4400.cpp +++ b/src/cg/cg4400.cpp @@ -7,7 +7,7 @@ #include "cg4400.h" #include "cg4400a.h" #include "cg4400b.h" -#include "cglib01.h" +#include "cglib.h" #include #include @@ -31,7 +31,7 @@ #include #include -enum tipo_sospensione { nessuna, normale, vol_affari, liquidazione }; +enum tipo_sospensione { nessuna, sospensione_normale, vol_affari, liquidazione }; inline TStampa_registri_app& app() { return (TStampa_registri_app&)main_app(); } diff --git a/src/cg/cg4400.h b/src/cg/cg4400.h index dd75d7f41..104804d30 100755 --- a/src/cg/cg4400.h +++ b/src/cg/cg4400.h @@ -4,7 +4,7 @@ #include #include -#include "cglib03.h" +#include "cglib.h" enum messaggio { no_liquidazione, diff --git a/src/cg/cg4500.cpp b/src/cg/cg4500.cpp index 742a558a9..73c276d15 100755 --- a/src/cg/cg4500.cpp +++ b/src/cg/cg4500.cpp @@ -1,6 +1,6 @@ #include "cg4501.h" #include "cg4500a.h" -#include "cglib01.h" +#include "cglib.h" #include #include diff --git a/src/cg/cg4700.cpp b/src/cg/cg4700.cpp index 76af031d6..2a38235cc 100755 --- a/src/cg/cg4700.cpp +++ b/src/cg/cg4700.cpp @@ -7,7 +7,7 @@ #include #include #include -#include "cglib03.h" +#include "cglib.h" #include "cg4700.h" diff --git a/src/cg/cg4800.cpp b/src/cg/cg4800.cpp index fe4b74238..9607efcb7 100755 --- a/src/cg/cg4800.cpp +++ b/src/cg/cg4800.cpp @@ -15,7 +15,7 @@ #include #include -#include "cglib03.h" +#include "cglib.h" #include "cg4800a.h" #include "cg4800b.h" diff --git a/src/cg/cg4900.cpp b/src/cg/cg4900.cpp index 626585f11..c81148cd5 100755 --- a/src/cg/cg4900.cpp +++ b/src/cg/cg4900.cpp @@ -13,7 +13,7 @@ #include #include -#include "cglib03.h" +#include "cglib.h" #include "cg4900.h" class LiqAcc_app : public TApplication diff --git a/src/cg/cg5200.cpp b/src/cg/cg5200.cpp index 14ef9e2a8..3f93a5168 100755 --- a/src/cg/cg5200.cpp +++ b/src/cg/cg5200.cpp @@ -10,16 +10,16 @@ #include #include -#include "cglib02.h" +#include "cglib.h" #include "cg5200.h" -class TRiga_array : public TArray +class TRiga_array_saldi : public TArray { public: bool add_riga(const TRectype& rec_saldi); }; -bool TRiga_array::add_riga(const TRectype& rec_saldi) +bool TRiga_array_saldi::add_riga(const TRectype& rec_saldi) { bool flsca, found = false; int annoes, annoesr; @@ -109,7 +109,7 @@ class TSaldibrowse_application : public TBrowse_application TMask* _msk; TCursor * _cur; TRelation * _rel,* _rel1; - TRiga_array _riga; + TRiga_array_saldi _riga; int _anno, _annop, _g, _c; long _s; bool _saldo_conto, _saldo_gruppo, _saldo_sottoc, _scarongly; diff --git a/src/cg/cg5500.cpp b/src/cg/cg5500.cpp index fb577523d..e4c8d86f9 100755 --- a/src/cg/cg5500.cpp +++ b/src/cg/cg5500.cpp @@ -13,7 +13,7 @@ #include #include -#include "cglib03.h" +#include "cglib.h" #include "cg5500.h" #include "cg5500a.h" diff --git a/src/cg/cg5700.cpp b/src/cg/cg5700.cpp index 90eb053bd..c7f60ac88 100755 --- a/src/cg/cg5700.cpp +++ b/src/cg/cg5700.cpp @@ -16,7 +16,7 @@ #include #include "cg5700.h" -#include "cglib03.h" +#include "cglib.h" class TDich_periodica_selfirm_mask : public TAutomask { diff --git a/src/cg/cg5800.cpp b/src/cg/cg5800.cpp index c2aa125b4..1612c6485 100755 --- a/src/cg/cg5800.cpp +++ b/src/cg/cg5800.cpp @@ -10,7 +10,7 @@ #include #include "cg5800.h" -#include "cglib03.h" +#include "cglib.h" class TQuadro_VT_selfirm_mask : public TAutomask { diff --git a/src/cg/cg5900.cpp b/src/cg/cg5900.cpp index fe5740cc1..24f514262 100644 --- a/src/cg/cg5900.cpp +++ b/src/cg/cg5900.cpp @@ -8,7 +8,7 @@ #include #include "cg5900a.h" -#include "cglib03.h" +#include "cglib.h" #include #include @@ -20,9 +20,8 @@ // TProrata_set /////////////////////////////////////////////////////////// -static int _year = 0; -static long _attiv = 0; -static TAssoc_array _causali; +static int __year = 0; +static long __attiv = 0; static bool prorata_filter(const TRelation* rel) { @@ -34,37 +33,31 @@ static bool prorata_filter(const TRelation* rel) if (mov.get_char(MOV_PROVVIS) > ' ') // Solo movimenti definitivi return false; - if (_year > 0) + if (__year > 0) { const int anno = mov.get_int(MOV_ANNOIVA); - if (anno != _year) + if (anno != __year) return false; } const TBill zio(rel->curr()); const int cric = zio.tipo_cr(); + const TCausale & caus = cached_causale(mov.get(MOV_CODCAUS), __year); - const TString& codcaus = mov.get(MOV_CODCAUS); - TCausale* caus = (TCausale*)_causali.objptr(codcaus); - if (caus == NULL) + if (caus.iva() != iva_acquisti) + return false; + + if (caus.intra()) + return false; + + if (caus.tipodoc() == "AF") + return false; + + if (__year > 0 && __attiv > 0) { - caus = new TCausale(codcaus, _year); - _causali.add(codcaus, caus); - } - if (caus->iva() != iva_acquisti) - return false; - - if (caus->intra()) - return false; - - if (caus->tipodoc() == "AF") - return false; - - if (_year > 0 && _attiv > 0) - { - const TRegistro& reg = caus->reg(); + const TRegistro& reg = caus.reg(); const long attiv = atol(reg.attivita()); - if (attiv != _attiv) + if (attiv != __attiv) return false; } @@ -140,12 +133,13 @@ bool TProrata_rep::set_recordset(const TString& sql) { TString query = sql; - if (_year > 0 && query.find("FROM ") < 0) + if (__year > 0 && query.find("FROM ") < 0) { - const TDate dal( 1, 1, _year); - const TDate al(31, 12, _year); + const TDate dal( 1, 1, __year); + const TDate al(31, 12, __year); TISAM_recordset mov("USE MOV KEY 2\nFROM DATAREG=#DAL\nTO DATAREG=#AL"); - mov.set_var("#DAL", dal); + + mov.set_var("#DAL", dal); mov.set_var("#AL", al); long danumreg = 0; @@ -197,14 +191,14 @@ real TProrata_msk::get_perc_prorata() codtab.format("%05ld%4d%05ld1", f, y, a); const real pr = cache().get("%PLA", codtab, "R8"); set(F_PRORATA, pr); - _year = y; + __year = y; TToken_string key; key.format("%05ld", prefix().get_codditta()); TRecord_array att(key, LF_ATTIV); if (att.rows() > 1) - _attiv = a; + __attiv = a; else - _attiv = 0; + __attiv = 0; return pr; } @@ -215,12 +209,14 @@ bool TProrata_msk::genera_mov(TFilename& ininame) trans.set("Action", "INSERT"); const TString& codcaus = get(F_CAUSALE); - const TCausale caus(codcaus, _year); + const TCausale caus(codcaus, __year); trans.set_paragraph("23"); trans.set(MOV_CODCAUS, codcaus); trans.set(MOV_DATAREG, TDate(TODAY)); - TString descr; descr << "PRO-RATA " << _year; + + TString descr; descr << "PRO-RATA " << __year; + trans.set(MOV_DESCR, descr); TProrata_rep rep;