Patch level : 12.0 no-patch

Files correlati     :
Commento            :

Aggiornati include
This commit is contained in:
Alessandro Bonazzi 2020-08-06 00:34:01 +02:00
parent 19a72882f4
commit 032938f33e
13 changed files with 48 additions and 52 deletions

View File

@ -9,8 +9,8 @@
#include <printapp.h> #include <printapp.h>
#endif #endif
#ifndef __CGLIB03_H #ifndef __CGLIB_H
#include "cglib03.h" #include "cglib.h"
#endif #endif
class TProgind; class TProgind;
@ -78,7 +78,7 @@ enum recalc { one = 2, never = 4 };
enum wht { all = 1, mnt = 2, trimestre = 3}; enum wht { all = 1, mnt = 2, trimestre = 3};
enum tbc { precedente = 1, incorso = 2}; enum tbc { precedente = 1, incorso = 2};
enum tiporeg { vendita = 1, acquisto = 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 // flags per gli items di stampa
#define CHG_PARMS 1 // cambiato qualcosa (attivita', ditta...) #define CHG_PARMS 1 // cambiato qualcosa (attivita', ditta...)

View File

@ -9,7 +9,7 @@
#include <recarray.h> #include <recarray.h>
#include <utility.h> #include <utility.h>
#include "cglib03.h" #include "cglib.h"
#include "cg4300.h" #include "cg4300.h"
#include <attiv.h> #include <attiv.h>

View File

@ -7,7 +7,7 @@
#include "cg4400.h" #include "cg4400.h"
#include "cg4400a.h" #include "cg4400a.h"
#include "cg4400b.h" #include "cg4400b.h"
#include "cglib01.h" #include "cglib.h"
#include <defmask.h> #include <defmask.h>
#include <execp.h> #include <execp.h>
@ -31,7 +31,7 @@
#include <occas.h> #include <occas.h>
#include <unloc.h> #include <unloc.h>
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(); } inline TStampa_registri_app& app() { return (TStampa_registri_app&)main_app(); }

View File

@ -4,7 +4,7 @@
#include <printapp.h> #include <printapp.h>
#include <mask.h> #include <mask.h>
#include "cglib03.h" #include "cglib.h"
enum messaggio { enum messaggio {
no_liquidazione, no_liquidazione,

View File

@ -1,6 +1,6 @@
#include "cg4501.h" #include "cg4501.h"
#include "cg4500a.h" #include "cg4500a.h"
#include "cglib01.h" #include "cglib.h"
#include <recarray.h> #include <recarray.h>
#include <relation.h> #include <relation.h>

View File

@ -7,7 +7,7 @@
#include <msksheet.h> #include <msksheet.h>
#include <prefix.h> #include <prefix.h>
#include <tabutil.h> #include <tabutil.h>
#include "cglib03.h" #include "cglib.h"
#include "cg4700.h" #include "cg4700.h"

View File

@ -15,7 +15,7 @@
#include <righef24.h> #include <righef24.h>
#include <modaut.h> #include <modaut.h>
#include "cglib03.h" #include "cglib.h"
#include "cg4800a.h" #include "cg4800a.h"
#include "cg4800b.h" #include "cg4800b.h"

View File

@ -13,7 +13,7 @@
#include <utility.h> #include <utility.h>
#include <config.h> #include <config.h>
#include "cglib03.h" #include "cglib.h"
#include "cg4900.h" #include "cg4900.h"
class LiqAcc_app : public TApplication class LiqAcc_app : public TApplication

View File

@ -10,16 +10,16 @@
#include <clifo.h> #include <clifo.h>
#include <pconti.h> #include <pconti.h>
#include "cglib02.h" #include "cglib.h"
#include "cg5200.h" #include "cg5200.h"
class TRiga_array : public TArray class TRiga_array_saldi : public TArray
{ {
public: public:
bool add_riga(const TRectype& rec_saldi); 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; bool flsca, found = false;
int annoes, annoesr; int annoes, annoesr;
@ -109,7 +109,7 @@ class TSaldibrowse_application : public TBrowse_application
TMask* _msk; TMask* _msk;
TCursor * _cur; TCursor * _cur;
TRelation * _rel,* _rel1; TRelation * _rel,* _rel1;
TRiga_array _riga; TRiga_array_saldi _riga;
int _anno, _annop, _g, _c; int _anno, _annop, _g, _c;
long _s; long _s;
bool _saldo_conto, _saldo_gruppo, _saldo_sottoc, _scarongly; bool _saldo_conto, _saldo_gruppo, _saldo_sottoc, _scarongly;

View File

@ -13,7 +13,7 @@
#include <viswin.h> #include <viswin.h>
#include <reputils.h> #include <reputils.h>
#include "cglib03.h" #include "cglib.h"
#include "cg5500.h" #include "cg5500.h"
#include "cg5500a.h" #include "cg5500a.h"

View File

@ -16,7 +16,7 @@
#include <rmoviva.h> #include <rmoviva.h>
#include "cg5700.h" #include "cg5700.h"
#include "cglib03.h" #include "cglib.h"
class TDich_periodica_selfirm_mask : public TAutomask class TDich_periodica_selfirm_mask : public TAutomask
{ {

View File

@ -10,7 +10,7 @@
#include <nditte.h> #include <nditte.h>
#include "cg5800.h" #include "cg5800.h"
#include "cglib03.h" #include "cglib.h"
class TQuadro_VT_selfirm_mask : public TAutomask class TQuadro_VT_selfirm_mask : public TAutomask
{ {

View File

@ -8,7 +8,7 @@
#include <reprint.h> #include <reprint.h>
#include "cg5900a.h" #include "cg5900a.h"
#include "cglib03.h" #include "cglib.h"
#include <attiv.h> #include <attiv.h>
#include <causali.h> #include <causali.h>
@ -20,9 +20,8 @@
// TProrata_set // TProrata_set
/////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////
static int _year = 0; static int __year = 0;
static long _attiv = 0; static long __attiv = 0;
static TAssoc_array _causali;
static bool prorata_filter(const TRelation* rel) 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 if (mov.get_char(MOV_PROVVIS) > ' ') // Solo movimenti definitivi
return false; return false;
if (_year > 0) if (__year > 0)
{ {
const int anno = mov.get_int(MOV_ANNOIVA); const int anno = mov.get_int(MOV_ANNOIVA);
if (anno != _year) if (anno != __year)
return false; return false;
} }
const TBill zio(rel->curr()); const TBill zio(rel->curr());
const int cric = zio.tipo_cr(); const int cric = zio.tipo_cr();
const TCausale & caus = cached_causale(mov.get(MOV_CODCAUS), __year);
const TString& codcaus = mov.get(MOV_CODCAUS); if (caus.iva() != iva_acquisti)
TCausale* caus = (TCausale*)_causali.objptr(codcaus); return false;
if (caus == NULL)
if (caus.intra())
return false;
if (caus.tipodoc() == "AF")
return false;
if (__year > 0 && __attiv > 0)
{ {
caus = new TCausale(codcaus, _year); const TRegistro& reg = caus.reg();
_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 long attiv = atol(reg.attivita()); const long attiv = atol(reg.attivita());
if (attiv != _attiv) if (attiv != __attiv)
return false; return false;
} }
@ -140,12 +133,13 @@ bool TProrata_rep::set_recordset(const TString& sql)
{ {
TString query = 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 dal( 1, 1, __year);
const TDate al(31, 12, _year); const TDate al(31, 12, __year);
TISAM_recordset mov("USE MOV KEY 2\nFROM DATAREG=#DAL\nTO DATAREG=#AL"); 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); mov.set_var("#AL", al);
long danumreg = 0; long danumreg = 0;
@ -197,14 +191,14 @@ real TProrata_msk::get_perc_prorata()
codtab.format("%05ld%4d%05ld1", f, y, a); codtab.format("%05ld%4d%05ld1", f, y, a);
const real pr = cache().get("%PLA", codtab, "R8"); const real pr = cache().get("%PLA", codtab, "R8");
set(F_PRORATA, pr); set(F_PRORATA, pr);
_year = y; __year = y;
TToken_string key; key.format("%05ld", prefix().get_codditta()); TToken_string key; key.format("%05ld", prefix().get_codditta());
TRecord_array att(key, LF_ATTIV); TRecord_array att(key, LF_ATTIV);
if (att.rows() > 1) if (att.rows() > 1)
_attiv = a; __attiv = a;
else else
_attiv = 0; __attiv = 0;
return pr; return pr;
} }
@ -215,12 +209,14 @@ bool TProrata_msk::genera_mov(TFilename& ininame)
trans.set("Action", "INSERT"); trans.set("Action", "INSERT");
const TString& codcaus = get(F_CAUSALE); const TString& codcaus = get(F_CAUSALE);
const TCausale caus(codcaus, _year); const TCausale caus(codcaus, __year);
trans.set_paragraph("23"); trans.set_paragraph("23");
trans.set(MOV_CODCAUS, codcaus); trans.set(MOV_CODCAUS, codcaus);
trans.set(MOV_DATAREG, TDate(TODAY)); trans.set(MOV_DATAREG, TDate(TODAY));
TString descr; descr << "PRO-RATA " << _year;
TString descr; descr << "PRO-RATA " << __year;
trans.set(MOV_DESCR, descr); trans.set(MOV_DESCR, descr);
TProrata_rep rep; TProrata_rep rep;