Nuova comunicazione annuale IVA
Nuovi dari per CU git-svn-id: svn://10.65.10.50/branches/R_10_00@23176 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
150972f6e5
commit
5fde0436de
@ -74,6 +74,8 @@ protected:
|
|||||||
static bool tipo_handler(TMask_field& f, KEY key);
|
static bool tipo_handler(TMask_field& f, KEY key);
|
||||||
static bool crea_percipienti(TMask_field& f, KEY key);
|
static bool crea_percipienti(TMask_field& f, KEY key);
|
||||||
static bool percip_handler(TMask_field& f, KEY key);
|
static bool percip_handler(TMask_field& f, KEY key);
|
||||||
|
static bool previd_handler(TMask_field& f, KEY key);
|
||||||
|
|
||||||
static bool email_handler(TMask_field& f, KEY k);
|
static bool email_handler(TMask_field& f, KEY k);
|
||||||
static bool rsoc_handler(TMask_field& f, KEY k);
|
static bool rsoc_handler(TMask_field& f, KEY k);
|
||||||
static bool comi_handler(TMask_field& f, KEY k);
|
static bool comi_handler(TMask_field& f, KEY k);
|
||||||
@ -300,7 +302,6 @@ bool TClifo_application::tipo_handler(TMask_field& f, KEY key)
|
|||||||
TMask& m = f.mask();
|
TMask& m = f.mask();
|
||||||
const bool fis = f.get() == "F";
|
const bool fis = f.get() == "F";
|
||||||
m.show(-5, fis);
|
m.show(-5, fis);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,7 +349,7 @@ bool TClifo_application::crea_percipienti(TMask_field& f, KEY key)
|
|||||||
if (anag.read() == NOERR)
|
if (anag.read() == NOERR)
|
||||||
{
|
{
|
||||||
m.set(F_CODANAGPER, percip);
|
m.set(F_CODANAGPER, percip);
|
||||||
message_box(TR("Esiste già una anagrafica corrispondente al fornitore"));
|
warning_box(TR("Esiste già una anagrafica corrispondente al fornitore"));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -411,25 +412,24 @@ bool TClifo_application::crea_percipienti(TMask_field& f, KEY key)
|
|||||||
bool TClifo_application::percip_handler(TMask_field& f, KEY key)
|
bool TClifo_application::percip_handler(TMask_field& f, KEY key)
|
||||||
{
|
{
|
||||||
TMask& m = f.mask();
|
TMask& m = f.mask();
|
||||||
const bool full = f.get().full();
|
|
||||||
|
|
||||||
if (f.to_check(key, true))
|
if (f.to_check(key, true))
|
||||||
|
{
|
||||||
|
const bool full = !f.empty();
|
||||||
m.enable(DLG_ANAG, !full);
|
m.enable(DLG_ANAG, !full);
|
||||||
|
m.enable(DLG_PERC, full && main_app().has_module(M77AUT));
|
||||||
|
}
|
||||||
if (f.to_check(key) && full)
|
if (f.to_check(key) && full)
|
||||||
{
|
{
|
||||||
const long percip = m.get_long(F_CODANAGPER);
|
const long percip = m.get_long(F_CODANAGPER);
|
||||||
const char tipo = m.get(F_TIPOAPER)[0];
|
const char tipo = m.get(F_TIPOAPER)[0];
|
||||||
TToken_string k;
|
TToken_string k; k.add(tipo); k.add(percip);
|
||||||
|
|
||||||
k.add(tipo);
|
|
||||||
k.add(percip);
|
|
||||||
const TRectype& anag = cache().get(LF_ANAG, k);
|
const TRectype& anag = cache().get(LF_ANAG, k);
|
||||||
const TString& c = m.get(F_COFI), p = m.get(F_PAIV);
|
|
||||||
|
|
||||||
if (key == K_TAB && anag.empty())
|
if (key == K_TAB && anag.empty())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
const TString& c = m.get(F_COFI);
|
||||||
|
const TString& p = m.get(F_PAIV);
|
||||||
if ((c.full() && c != anag.get(ANA_COFI)) ||
|
if ((c.full() && c != anag.get(ANA_COFI)) ||
|
||||||
(p.full() && p != anag.get(ANA_PAIV)))
|
(p.full() && p != anag.get(ANA_PAIV)))
|
||||||
return error_box(TR("Percipiente non corretto: codice fiscale o partita IVA diversa"));
|
return error_box(TR("Percipiente non corretto: codice fiscale o partita IVA diversa"));
|
||||||
@ -468,6 +468,24 @@ bool TClifo_application::percip_handler(TMask_field& f, KEY key)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TClifo_application::previd_handler(TMask_field& f, KEY key)
|
||||||
|
{
|
||||||
|
if (key == K_SPACE)
|
||||||
|
{
|
||||||
|
const TMask& m = f.mask();
|
||||||
|
const TEdit_field& cod = m.efield(F_CODANAGPER);
|
||||||
|
if (cod.empty())
|
||||||
|
return cod.error_box(TR("Specificare un'anagrafica valida"));
|
||||||
|
|
||||||
|
TRectype rec(LF_PERC);
|
||||||
|
rec.put("CODDITTA", main_app().get_firm());
|
||||||
|
rec.put("TIPOA", m.get(F_TIPOAPER));
|
||||||
|
rec.put("CODANAGR", cod.get());
|
||||||
|
rec.edit(LF_PERC, NULL, "770 -2");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool TClifo_application::email_handler(TMask_field& f, KEY k)
|
bool TClifo_application::email_handler(TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
if (k == K_SPACE)
|
if (k == K_SPACE)
|
||||||
@ -1499,6 +1517,7 @@ bool TClifo_application::user_create() // initvar e arrmask
|
|||||||
_msk->set_handler(F_CODANAGPER, percip_handler);
|
_msk->set_handler(F_CODANAGPER, percip_handler);
|
||||||
_msk->set_handler(F_TIPOPERS, tipo_handler);
|
_msk->set_handler(F_TIPOPERS, tipo_handler);
|
||||||
_msk->set_handler(DLG_ANAG, crea_percipienti);
|
_msk->set_handler(DLG_ANAG, crea_percipienti);
|
||||||
|
_msk->set_handler(DLG_PERC, previd_handler);
|
||||||
_msk->set_handler(F_ALLEG, alleg_handler);
|
_msk->set_handler(F_ALLEG, alleg_handler);
|
||||||
_msk->set_handler(F_CODALLEG, codalleg_handler);
|
_msk->set_handler(F_CODALLEG, codalleg_handler);
|
||||||
_msk->set_handler(DLG_EMAIL, email_handler);
|
_msk->set_handler(DLG_EMAIL, email_handler);
|
||||||
|
@ -181,6 +181,7 @@
|
|||||||
#define F_DESENTE 314
|
#define F_DESENTE 314
|
||||||
#define F_INDENTE 315
|
#define F_INDENTE 315
|
||||||
#define F_SPLITPAY 316
|
#define F_SPLITPAY 316
|
||||||
|
#define DLG_PERC 317
|
||||||
|
|
||||||
#define F_TPIMBALLO 401
|
#define F_TPIMBALLO 401
|
||||||
#define F_DIMENSIONE 402
|
#define F_DIMENSIONE 402
|
||||||
|
@ -608,7 +608,7 @@ END
|
|||||||
|
|
||||||
LIST F_SESSO 1 12
|
LIST F_SESSO 1 12
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 38 17 "Sesso"
|
PROMPT 34 17 "Sesso"
|
||||||
HELP "Sesso della persona fisica"
|
HELP "Sesso della persona fisica"
|
||||||
ITEM "M|Maschio"
|
ITEM "M|Maschio"
|
||||||
ITEM "F|Femmina"
|
ITEM "F|Femmina"
|
||||||
@ -616,6 +616,13 @@ BEGIN
|
|||||||
GROUP 5
|
GROUP 5
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BUTTON DLG_PERC 15 1
|
||||||
|
BEGIN
|
||||||
|
PROMPT 57 17 "Dati Previdenziali"
|
||||||
|
GROUP 4
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
NUMBER F_STATONASC 3
|
NUMBER F_STATONASC 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 18 "Stato "
|
PROMPT 2 18 "Stato "
|
||||||
|
@ -3157,13 +3157,21 @@ bool TPrimanota_application::liqdiff_handler(TMask_field& f, KEY key)
|
|||||||
// Certified 99%
|
// Certified 99%
|
||||||
bool TPrimanota_application::ivaxcassa_handler(TMask_field& f, KEY key)
|
bool TPrimanota_application::ivaxcassa_handler(TMask_field& f, KEY key)
|
||||||
{
|
{
|
||||||
if (key == K_SPACE && f.mask().is_running())
|
const TMask& m = f.mask();
|
||||||
|
if (key == K_SPACE && m.is_running())
|
||||||
force_iva_det_bill();
|
force_iva_det_bill();
|
||||||
|
|
||||||
if (key == K_ENTER && f.get().full())
|
if (key == K_ENTER && f.get().full())
|
||||||
{
|
{
|
||||||
if (app().is_fattura_split())
|
if (app().is_fattura_split())
|
||||||
return f.error_box(TR("Non è ammessa IVA per cassa con split payment"));
|
return f.error_box(TR("Non è ammessa IVA per cassa con split payment"));
|
||||||
|
if (m.get(F_CLIFO) == "C")
|
||||||
|
{
|
||||||
|
TString8 key; key.format("C|%ld", m.get_long(F_CLIENTE));
|
||||||
|
const TRectype& clifo = cache().get(LF_CLIFO, key);
|
||||||
|
if (clifo.get_int(CLI_ALLEG) == 6)
|
||||||
|
return f.error_box(TR("Non è ammessa IVA per cassa con clienti privati"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <recarray.h>
|
#include <recarray.h>
|
||||||
#include <reprint.h>
|
#include <reprint.h>
|
||||||
#include <reputils.h>
|
#include <reputils.h>
|
||||||
|
#include <sheet.h>
|
||||||
#include <textset.h>
|
#include <textset.h>
|
||||||
#include <validate.h>
|
#include <validate.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
|
@ -128,7 +128,7 @@ bool TLiquidazione_app::user_create()
|
|||||||
_att_r = &(_nditte->curr(LF_ATTIV));
|
_att_r = &(_nditte->curr(LF_ATTIV));
|
||||||
|
|
||||||
_ditte = new TArray_sheet(-1, -1, -4, -4, TR("Selezione Ditte"),
|
_ditte = new TArray_sheet(-1, -1, -4, -4, TR("Selezione Ditte"),
|
||||||
HR("@1|Codice@R|Ragione Sociale@50|Vers.|Agr.Min"));
|
HR("@1|Codice@R|Ragione Sociale@50|Vers.|IVAxCassa"));
|
||||||
_n_ditte = 0l;
|
_n_ditte = 0l;
|
||||||
|
|
||||||
// Caro tab11, ricordati che un giorno sarai un file unico!
|
// Caro tab11, ricordati che un giorno sarai un file unico!
|
||||||
@ -144,8 +144,7 @@ bool TLiquidazione_app::user_create()
|
|||||||
TDate oggi(TODAY);
|
TDate oggi(TODAY);
|
||||||
_year.format("%d",oggi.year());
|
_year.format("%d",oggi.year());
|
||||||
_month = oggi.month();
|
_month = oggi.month();
|
||||||
TConfig conf(CONFIG_STUDIO);
|
_sind11 = ini_get_bool(CONFIG_STUDIO, "cg", "Sind11");
|
||||||
_sind11 = conf.get_bool("Sind11");
|
|
||||||
}
|
}
|
||||||
else // parse messaggio
|
else // parse messaggio
|
||||||
{
|
{
|
||||||
@ -625,8 +624,7 @@ void TLiquidazione_app::build_nomiditte()
|
|||||||
if (good)
|
if (good)
|
||||||
{
|
{
|
||||||
// check no parametri liquidazione
|
// check no parametri liquidazione
|
||||||
if (!look_lia(dt.get_long("CODDITTA")))
|
good = look_lia(dt.get_long("CODDITTA"));
|
||||||
good = FALSE;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
continue;
|
continue;
|
||||||
@ -639,7 +637,7 @@ void TLiquidazione_app::build_nomiditte()
|
|||||||
if (good)
|
if (good)
|
||||||
{
|
{
|
||||||
d->add(_lia->get("S7"));
|
d->add(_lia->get("S7"));
|
||||||
d->add(_lia->get("B2"));
|
d->add(_lia->get("B5")); // IVA per cassa
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -848,9 +846,9 @@ void TLiquidazione_app::build_ditte_sheet(wht what)
|
|||||||
TToken_string* d = new TToken_string(64);
|
TToken_string* d = new TToken_string(64);
|
||||||
*d = (TToken_string&)_nomiditte[i];
|
*d = (TToken_string&)_nomiditte[i];
|
||||||
const char vers = d->get_char(2);
|
const char vers = d->get_char(2);
|
||||||
const bool agr = d->get_char(3) == 'X';
|
const bool ixc = d->get_char(3) == 'X';
|
||||||
|
|
||||||
const bool unselectable = (vers == '?') || (_month < 13 && agr);
|
const bool unselectable = (vers == '?');
|
||||||
if ((what == mnt && vers == 'T') || (what == trimestre && vers == 'M'))
|
if ((what == mnt && vers == 'T') || (what == trimestre && vers == 'M'))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@ protected:
|
|||||||
bool print_inc_diff_log(int& rw, int tipoatt, int tipoiva);
|
bool print_inc_diff_log(int& rw, int tipoatt, int tipoiva);
|
||||||
bool print_dainc_diff_log(int& rw, int tipoatt, int tipoiva);
|
bool print_dainc_diff_log(int& rw, int tipoatt, int tipoiva);
|
||||||
bool ivadiff_chiusa(const TRectype& mov, const TDate& fine) const;
|
bool ivadiff_chiusa(const TRectype& mov, const TDate& fine) const;
|
||||||
bool sarebbe_da_pagare(const TRectype& mov, const TDate& fine) const;
|
bool sarebbe_maturata(const TRectype& mov, const TDate& inizio, const TDate& fine) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
148
cg/cg4301.cpp
148
cg/cg4301.cpp
@ -305,6 +305,7 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
|||||||
_pla->zero("R15");
|
_pla->zero("R15");
|
||||||
_pla->zero("R16");
|
_pla->zero("R16");
|
||||||
_pla->zero("R17");
|
_pla->zero("R17");
|
||||||
|
_pla->zero("R18");
|
||||||
_pla->put("S1","0");
|
_pla->put("S1","0");
|
||||||
_pla->put("S2","0");
|
_pla->put("S2","0");
|
||||||
_pla->put("S3","0");
|
_pla->put("S3","0");
|
||||||
@ -594,12 +595,25 @@ bool TLiquidazione_app::ivadiff_chiusa(const TRectype& mov, const TDate& fine) c
|
|||||||
return chiusa;
|
return chiusa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static TDate data_maturazione_IVA_diff(const TRectype& mov)
|
||||||
|
{
|
||||||
|
const TDate data_reg = mov.get(MOV_DATAREG);
|
||||||
|
const TDate data_doc = mov.get(MOV_DATADOC);
|
||||||
|
TDate data_rif = data_doc.ok() && data_doc < data_reg ? data_doc : data_reg;
|
||||||
|
data_rif.addyear(1); data_rif.set_end_month();
|
||||||
|
return data_rif;
|
||||||
|
}
|
||||||
|
|
||||||
// Fattura più vecchia di un anno a ente NON pubblico
|
// Fattura più vecchia di un anno a ente NON pubblico
|
||||||
bool TLiquidazione_app::sarebbe_da_pagare(const TRectype& mov, const TDate& fine) const
|
bool TLiquidazione_app::sarebbe_maturata(const TRectype& mov, const TDate& inizio, const TDate& fine) const
|
||||||
{
|
{
|
||||||
if (mov.get_int(MOV_TIPOMOV) != tm_fattura)
|
if (mov.get_int(MOV_TIPOMOV) != tm_fattura)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
const TDate data_lim = data_maturazione_IVA_diff(mov); // Data limite (un anno dopo quella di riferimento)
|
||||||
|
if (data_lim < inizio || data_lim > fine)
|
||||||
|
return false; // maturazione fuori range
|
||||||
|
|
||||||
// La data di riferimento sarebbe quella di consegna della merce, ma non avendola usiamo la data documento.
|
// La data di riferimento sarebbe quella di consegna della merce, ma non avendola usiamo la data documento.
|
||||||
// In assenza della data documento siamo costretti ad usare la data di registrazione
|
// In assenza della data documento siamo costretti ad usare la data di registrazione
|
||||||
const TDate data_reg = mov.get(MOV_DATAREG);
|
const TDate data_reg = mov.get(MOV_DATAREG);
|
||||||
@ -618,16 +632,14 @@ bool TLiquidazione_app::sarebbe_da_pagare(const TRectype& mov, const TDate& fine
|
|||||||
} else
|
} else
|
||||||
if (mov.get_bool(MOV_IVAXCASSA))
|
if (mov.get_bool(MOV_IVAXCASSA))
|
||||||
{
|
{
|
||||||
if (!gestione_IVAxCassa(fine) || _isviaggio) // Le agenzie viaggio non posso aderire al regime IVA per cassa
|
if (_isviaggio || !gestione_IVAxCassa(fine)) // Le agenzie viaggio non posso aderire al regime IVA per cassa
|
||||||
return true; // Ho superato la soglia di applicabilità dell'IVA per cassa
|
return true; // Ho superato la soglia di applicabilità dell'IVA per cassa
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true; // Regime IVA normale
|
return true; // Regime IVA normale
|
||||||
|
|
||||||
TString8 key; key.format("%c|%ld", mov.get_char(MOV_TIPO), mov.get_long(MOV_CODCF));
|
const TRectype& clifo = cache().get_rec(LF_CLIFO, mov.get_char(MOV_TIPO), mov.get_long(MOV_CODCF));
|
||||||
const TRectype& clifo = cache().get(LF_CLIFO, key);
|
|
||||||
int alleg = clifo.get_int(CLI_ALLEG);
|
int alleg = clifo.get_int(CLI_ALLEG);
|
||||||
|
|
||||||
if (alleg == 7 || alleg == 8) // Ente pubblico e amministrazione controllata ...
|
if (alleg == 7 || alleg == 8) // Ente pubblico e amministrazione controllata ...
|
||||||
return false; // ... possono aspettare le calende greche
|
return false; // ... possono aspettare le calende greche
|
||||||
|
|
||||||
@ -654,13 +666,10 @@ bool TLiquidazione_app::sarebbe_da_pagare(const TRectype& mov, const TDate& fine
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ivadiff_chiusa(mov, fine))
|
if (ivadiff_chiusa(mov, min(data_lim,fine)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (giorni >= 365)
|
|
||||||
return true; // E' passato più di un anno!
|
return true; // E' passato più di un anno!
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TLiquidazione_app::residuo_da_liquidare(const TRectype& lastid, real& importo_res, real& imponib_res, real& imposta_res) const
|
bool TLiquidazione_app::residuo_da_liquidare(const TRectype& lastid, real& importo_res, real& imponib_res, real& imposta_res) const
|
||||||
@ -890,6 +899,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
real esenti_c3_bam = ZERO; // Beni ammorizzabili esenti c3
|
real esenti_c3_bam = ZERO; // Beni ammorizzabili esenti c3
|
||||||
real esenti_c1a_bam = ZERO; // Beni ammorizzabili esenti c1a
|
real esenti_c1a_bam = ZERO; // Beni ammorizzabili esenti c1a
|
||||||
real esenti_b14 = ZERO;
|
real esenti_b14 = ZERO;
|
||||||
|
real vendite_rev = ZERO; // Vendire in reverse charge (da escludere in prorata)
|
||||||
|
|
||||||
// Comunicazione dati iva annuale (dal 2003)
|
// Comunicazione dati iva annuale (dal 2003)
|
||||||
real cessioni_cd1_1 = ZERO; // Totale operazioni attive
|
real cessioni_cd1_1 = ZERO; // Totale operazioni attive
|
||||||
@ -906,6 +916,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
real oroargento_cd3_2 = ZERO; // imposta acquisto oro e argento
|
real oroargento_cd3_2 = ZERO; // imposta acquisto oro e argento
|
||||||
real rottami_cd3_3 = ZERO; // imponibile acquisto rottami
|
real rottami_cd3_3 = ZERO; // imponibile acquisto rottami
|
||||||
real rottami_cd3_4 = ZERO; // imposta acquisto rottami
|
real rottami_cd3_4 = ZERO; // imposta acquisto rottami
|
||||||
|
real cessioni_cd1_1s = ZERO; // Totale operazioni attive in split payment
|
||||||
|
|
||||||
real esni_rimb = ZERO; // ci sommo tutti esenti e ni validi per rimborso
|
real esni_rimb = ZERO; // ci sommo tutti esenti e ni validi per rimborso
|
||||||
real corr_CEE = ZERO;
|
real corr_CEE = ZERO;
|
||||||
@ -1027,7 +1038,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
const TDate fromdate(1, month == 13 ? 1 : month, year_int);
|
const TDate fromdate(1, month == 13 ? 1 : month, year_int);
|
||||||
TDate t;
|
TDate t;
|
||||||
|
|
||||||
|
|
||||||
if (_recalc_regis) // Vecchia selezione prima del 1998 o calcolo progressivi per stampa registri bollati
|
if (_recalc_regis) // Vecchia selezione prima del 1998 o calcolo progressivi per stampa registri bollati
|
||||||
{
|
{
|
||||||
t.set_month(month == 13 ? 12 : month);
|
t.set_month(month == 13 ? 12 : month);
|
||||||
@ -1079,8 +1089,12 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
trueatt.cut(5);
|
trueatt.cut(5);
|
||||||
|
|
||||||
TString pimsg;
|
TString pimsg;
|
||||||
pimsg << TR("Ricalcolo attività ") << trueatt << " (" << TR("mese ")
|
pimsg << TR("Ricalcolo attività ") << trueatt << " (";
|
||||||
<< (month > 12 ? "13" : itom(month)) << ' ' << year_int << ')';
|
if (month > 12)
|
||||||
|
pimsg << "13ma ";
|
||||||
|
else
|
||||||
|
pimsg << TR("mese ") << itom(month);
|
||||||
|
pimsg << ' ' << year_int << ')';
|
||||||
|
|
||||||
TProgress_monitor pi(items, pimsg, false);
|
TProgress_monitor pi(items, pimsg, false);
|
||||||
for (; _cur->pos() < items; ++(*_cur))
|
for (; _cur->pos() < items; ++(*_cur))
|
||||||
@ -1106,7 +1120,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (_mov->get_long(MOV_NUMREG) == 19956)
|
if (_mov->get_long(MOV_NUMREG) == 23353)
|
||||||
int cazzone = 1;
|
int cazzone = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1125,11 +1139,34 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
// Gestione SPLIT PAYMENT dal 01-01-2015: movimenti a enti pubblici senza ritenuta e senza reverse charge
|
// Gestione SPLIT PAYMENT dal 01-01-2015: movimenti a enti pubblici senza ritenuta e senza reverse charge
|
||||||
if (tipomov == vendita && (tm == tm_fattura || tm == tm_nota_credito) &&
|
if (tipomov == vendita && (tm == tm_fattura || tm == tm_nota_credito) &&
|
||||||
!cau_intra && date.year() >= 2015 && is_split_payment(_mov->curr()))
|
!cau_intra && date.year() >= 2015 && is_split_payment(_mov->curr()))
|
||||||
|
{
|
||||||
|
// *** aggiunto il 27-01-2016 ***
|
||||||
|
// In tredicesima devo compilare anche CD1_1
|
||||||
|
if (month == 13 && date.year() == year_int)
|
||||||
|
{
|
||||||
|
do // scansione semplificata delle righe IVA
|
||||||
|
{
|
||||||
|
const int rmi_tipoatt = max(_rmoviva->get_int(RMI_TIPOATT), 1); // Poteva capitare tipoatt == 0
|
||||||
|
if (rmi_tipoatt != tipatt)
|
||||||
|
continue;
|
||||||
|
const TString& codiva = _rmoviva->get(RMI_CODIVA);
|
||||||
|
if (!look_iva(codiva))
|
||||||
|
continue;
|
||||||
|
const TString& iva_vpn = _iva->get("S10");
|
||||||
|
if (iva_vpn.full())
|
||||||
|
{
|
||||||
|
const real imponibile_orig = _rmoviva->get(RMI_IMPONIBILE);
|
||||||
|
cessioni_cd1_1s += imponibile_orig;
|
||||||
|
cessioni_cd1_1 += imponibile_orig;
|
||||||
|
}
|
||||||
|
} while (_cur->next_match(LF_RMOVIVA));
|
||||||
|
}
|
||||||
continue; // Ignora movimento di split payment
|
continue; // Ignora movimento di split payment
|
||||||
|
}
|
||||||
|
|
||||||
// Inizio gestione IVA differita
|
// Inizio gestione IVA differita
|
||||||
const bool iva_diff = _mov->get_bool(MOV_LIQDIFF) && is_IVA_diff(_mov->curr());
|
const bool iva_diff = _mov->get_bool(MOV_LIQDIFF) && is_IVA_diff(_mov->curr());
|
||||||
const bool iva_cass = !iva_diff && !_isviaggio && tm > tm_nessuno && _mov->get_bool(MOV_IVAXCASSA) && is_IVAxCassa(_mov->curr());
|
const bool iva_cass = !iva_diff && !_isviaggio && tm > tm_nessuno && is_IVAxCassa(_mov->curr());
|
||||||
const bool bIsMovDiff = (iva_diff || iva_cass) && !_recalc_regis; // Aggiunto test su ricalcolo da registri 13-12-2012
|
const bool bIsMovDiff = (iva_diff || iva_cass) && !_recalc_regis; // Aggiunto test su ricalcolo da registri 13-12-2012
|
||||||
bool dok = is_date_ok(date, month, liqmonth, year_int);
|
bool dok = is_date_ok(date, month, liqmonth, year_int);
|
||||||
|
|
||||||
@ -1138,7 +1175,8 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
|
|
||||||
if (bIsMovDiff && tm == tm_fattura)
|
if (bIsMovDiff && tm == tm_fattura)
|
||||||
{
|
{
|
||||||
const bool id_chiusa = ivadiff_chiusa(_mov->curr(), inizio);
|
// const bool id_chiusa = ivadiff_chiusa(_mov->curr(), inizio);
|
||||||
|
const bool id_chiusa = ivadiff_chiusa(_mov->curr(), TDate(31,12,inizio.year()-1));
|
||||||
if (!dok && id_chiusa)
|
if (!dok && id_chiusa)
|
||||||
continue; // Salta vecchi movimenti differiti già chiusi
|
continue; // Salta vecchi movimenti differiti già chiusi
|
||||||
|
|
||||||
@ -1159,8 +1197,19 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
if (game_found && !id_chiusa)
|
if (game_found && !id_chiusa)
|
||||||
{
|
{
|
||||||
const TRiga_partite& rp = p->riga(row);
|
const TRiga_partite& rp = p->riga(row);
|
||||||
TImporto pg, nc;
|
|
||||||
flag_pg_nc = rp.calcola_pagato_periodo(inizio+1L, fine, pg, nc, &pagscatt);
|
TDate orizzonte = fine; // caso tradizionale
|
||||||
|
|
||||||
|
// esperimento del 15-02-2016
|
||||||
|
if (1)
|
||||||
|
{
|
||||||
|
TDate data_rif = data_maturazione_IVA_diff(_mov->curr());
|
||||||
|
if (data_rif < fine)
|
||||||
|
orizzonte = data_rif;
|
||||||
|
}
|
||||||
|
|
||||||
|
TImporto pg_per, nc_per;
|
||||||
|
flag_pg_nc = rp.calcola_pagato_periodo(inizio+1L, orizzonte, pg_per, nc_per, &pagscatt);
|
||||||
if (pagscatt.items() >= 2)
|
if (pagscatt.items() >= 2)
|
||||||
{
|
{
|
||||||
// Fondo tra loro le righe generate dallo stesso pagamento
|
// Fondo tra loro le righe generate dallo stesso pagamento
|
||||||
@ -1176,13 +1225,14 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sarebbe_da_pagare(_mov->curr(), fine))
|
if (sarebbe_maturata(_mov->curr(), inizio+1L, fine))
|
||||||
{
|
{
|
||||||
TPointer_array pagscaold;
|
TPointer_array pagscaold;
|
||||||
rp.calcola_pagato_periodo(TDate(0L), fine, pg, nc, &pagscaold);
|
TImporto pg_tot, nc_tot;
|
||||||
|
rp.calcola_pagato_periodo(TDate(0L), orizzonte, pg_tot, nc_tot, &pagscaold);
|
||||||
|
|
||||||
// Controllo se ci siam persi delle note di credito negli anni scorsi
|
// Controllo se ci siam persi delle note di credito negli anni scorsi
|
||||||
if (!nc.is_zero() && pagscaold.items() > pagscatt.items())
|
if (!nc_tot.is_zero() && pagscaold.items() > pagscatt.items())
|
||||||
{
|
{
|
||||||
FOR_EACH_ARRAY_ITEM(pagscaold, i, obj)
|
FOR_EACH_ARRAY_ITEM(pagscaold, i, obj)
|
||||||
{
|
{
|
||||||
@ -1221,7 +1271,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TImporto saldo = rp.importo(false);
|
TImporto saldo = rp.importo(false);
|
||||||
saldo += pg; saldo += nc;
|
saldo += pg_tot; saldo += nc_tot;
|
||||||
saldo.normalize(sezfat);
|
saldo.normalize(sezfat);
|
||||||
if (saldo.valore() > ZERO)
|
if (saldo.valore() > ZERO)
|
||||||
tot_da_incassare = saldo.valore();
|
tot_da_incassare = saldo.valore();
|
||||||
@ -1236,15 +1286,16 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Fattura più vecchia di un anno a ente NON pubblico
|
// Fattura più vecchia di un anno a ente NON pubblico
|
||||||
if (sarebbe_da_pagare(_mov->curr(), fine))
|
if (sarebbe_maturata(_mov->curr(), inizio+1L, fine))
|
||||||
tot_da_incassare = _mov->get_real(MOV_TOTDOC);
|
tot_da_incassare = _mov->get_real(MOV_TOTDOC);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Simulo incasso se necessario
|
// Simulo incasso se necessario
|
||||||
if (!tot_da_incassare.is_zero()) // già controllato se sarebbe_da_pagare(_mov->curr(), fine)
|
if (!tot_da_incassare.is_zero()) // già controllato se sarebbe_maturata(_mov->curr(), fine)
|
||||||
{
|
{
|
||||||
tot_incassato = tot_da_incassare;
|
tot_incassato = tot_da_incassare;
|
||||||
datainc = fine;
|
|
||||||
|
datainc = data_maturazione_IVA_diff(_mov->curr());
|
||||||
_mov->put(MOV_DATAINC, datainc);
|
_mov->put(MOV_DATAINC, datainc);
|
||||||
}
|
}
|
||||||
if (tot_incassato > ZERO && is_date_ok(datainc, month, liqmonth, year_int))
|
if (tot_incassato > ZERO && is_date_ok(datainc, month, liqmonth, year_int))
|
||||||
@ -1427,6 +1478,11 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
const char sezpag = tipomov == vendita ? 'A' : 'D';
|
const char sezpag = tipomov == vendita ? 'A' : 'D';
|
||||||
const real totfat = _mov->get(MOV_TOTDOC);
|
const real totfat = _mov->get(MOV_TOTDOC);
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
if (_mov->get_long(MOV_NUMREG) == 23353)
|
||||||
|
int cazzone = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
TLocalisamfile id(LF_IVADIFF);
|
TLocalisamfile id(LF_IVADIFF);
|
||||||
TRectype& idcurr = id.curr();
|
TRectype& idcurr = id.curr();
|
||||||
FOR_EACH_ARRAY_ITEM(pagscatt, r, obj)
|
FOR_EACH_ARRAY_ITEM(pagscatt, r, obj)
|
||||||
@ -1651,8 +1707,8 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
|
|
||||||
const TString& iva_vpn = _iva->get(tipomov == vendita ? "S10" : "S11");
|
const TString& iva_vpn = _iva->get(tipomov == vendita ? "S10" : "S11");
|
||||||
|
|
||||||
// Aggiunto "&& is_detraibile" al test altrimenti somma due volte imponibile_orig (22/01/2015)
|
// Aggiunto "&& is_detraibile==0" al test altrimenti somma due volte imponibile_orig (22/01/2015)
|
||||||
if (iva_vpn.full() && _mov->get(MOV_ANNOIVA) == _year && is_detraibile)
|
if (!bIsMovDiff && iva_vpn.full() && _mov->get_int(MOV_ANNOIVA) == year_int && is_detraibile == 0)
|
||||||
{
|
{
|
||||||
switch (tipomov)
|
switch (tipomov)
|
||||||
{
|
{
|
||||||
@ -1841,16 +1897,16 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
* (Sergio 1995)
|
* (Sergio 1995)
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
/* NO!
|
// Invece non le deve comprendere nell'annuale (Vladimiro 1995, piu' tardi)
|
||||||
* Invece non le deve comprendere nell'annuale
|
|
||||||
* (Vladimiro 1995, piu' tardi)
|
|
||||||
*/
|
|
||||||
if (!(_month == 13 && autodafe))
|
if (!(_month == 13 && autodafe))
|
||||||
{
|
{
|
||||||
cess_amm += imponibile;
|
cess_amm += imponibile;
|
||||||
cess_amm_iva += imposta;
|
cess_amm_iva += imposta;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_detraibile && !imponibile.is_zero() && is_reverse_charge(_mov->curr()))
|
||||||
|
vendite_rev += imponibile;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: // Chissa'... forse in futuro vi sara' un ulteriore tipo di movimento...
|
default: // Chissa'... forse in futuro vi sara' un ulteriore tipo di movimento...
|
||||||
@ -2173,7 +2229,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// corrispettivi
|
// corrispettivi
|
||||||
bool true_corrisp = FALSE;
|
bool true_corrisp = false;
|
||||||
if (corrisp)
|
if (corrisp)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@ -2423,12 +2479,15 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
if (tipomov == vendita)
|
if (tipomov == vendita)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
if (month == 13 && reg == "VEN" && !incdiff_iva.is_zero())
|
if (codiva=="10" && !incdiff_iva.is_zero())
|
||||||
{
|
{
|
||||||
const real oldv = tab->get("R29");
|
const real oldv = tab->get("R29");
|
||||||
const real newv = oldv + incdiff_iva;
|
const real newv = oldv + incdiff_iva;
|
||||||
|
const long numreg = _mov->get_long(MOV_NUMREG);
|
||||||
|
if (numreg == 23260)
|
||||||
|
int cazzone = 1;
|
||||||
__trace("%s %s\t%s\t%s\t%7ld\t%s\t+\t%s\t=\t%s", tab->name(), (const char*)tab->curr().get("CODTAB"), (const char*)reg, (const char*)tipocr_s,
|
__trace("%s %s\t%s\t%s\t%7ld\t%s\t+\t%s\t=\t%s", tab->name(), (const char*)tab->curr().get("CODTAB"), (const char*)reg, (const char*)tipocr_s,
|
||||||
_mov->get_long(MOV_NUMREG), oldv.stringa(12, 2), incdiff_iva.stringa(12, 2), newv.stringa(12, 2));
|
numreg, oldv.stringa(12, 2), incdiff_iva.stringa(12, 2), newv.stringa(12, 2));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
// fatture vendita a liquidazione differita
|
// fatture vendita a liquidazione differita
|
||||||
@ -2676,6 +2735,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
_pom->put("R8", leasing_iva);
|
_pom->put("R8", leasing_iva);
|
||||||
_pom->put("R11", ammort_indet);
|
_pom->put("R11", ammort_indet);
|
||||||
_pom->put("R12", ammort_indet_iva);
|
_pom->put("R12", ammort_indet_iva);
|
||||||
|
|
||||||
_pum->put("R0", cess_amm);
|
_pum->put("R0", cess_amm);
|
||||||
_pum->put("R1", cess_amm_iva);
|
_pum->put("R1", cess_amm_iva);
|
||||||
_pum->put("R2", ammort_6);
|
_pum->put("R2", ammort_6);
|
||||||
@ -2702,6 +2762,9 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
_pum->put("R25", rottami_cd3_4);
|
_pum->put("R25", rottami_cd3_4);
|
||||||
_pum->put("R26", acquisti_cd2_5);
|
_pum->put("R26", acquisti_cd2_5);
|
||||||
_pum->put("R27", cessioni_cd1_5);
|
_pum->put("R27", cessioni_cd1_5);
|
||||||
|
_pum->put("R28", vendite_rev); // Vendite in reverse charge da escludere da prorata
|
||||||
|
_pum->put("R29", cessioni_cd1_1s); // cessioni in split
|
||||||
|
|
||||||
_pam->put("R0", acquisti);
|
_pam->put("R0", acquisti);
|
||||||
_pam->put("R1", vendite);
|
_pam->put("R1", vendite);
|
||||||
_pam->put("R6", assp_imp);
|
_pam->put("R6", assp_imp);
|
||||||
@ -3441,7 +3504,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
|||||||
deltam -= month;
|
deltam -= month;
|
||||||
|
|
||||||
look_lia();
|
look_lia();
|
||||||
const bool new_age_2000 = (year_int >= 2000) && (_lia->get("S9") == "NV");
|
const bool new_age_2000 = (_lia->get("S9") == "NV");
|
||||||
|
|
||||||
real risultato = ZERO;
|
real risultato = ZERO;
|
||||||
|
|
||||||
@ -3682,6 +3745,8 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
|||||||
if (somma_rettifiche)
|
if (somma_rettifiche)
|
||||||
{
|
{
|
||||||
const real rett = _lim->get_real("R5");
|
const real rett = _lim->get_real("R5");
|
||||||
|
if (!rett.is_zero())
|
||||||
|
{
|
||||||
risultato += rett;
|
risultato += rett;
|
||||||
rettifiche += rett;
|
rettifiche += rett;
|
||||||
if (rett.sign() < 0)
|
if (rett.sign() < 0)
|
||||||
@ -3690,6 +3755,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
|||||||
res_debt += rett;
|
res_debt += rett;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Somme varie per 13a
|
* Somme varie per 13a
|
||||||
@ -3851,18 +3917,18 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
|||||||
real es_c3_am = _pla->get_real("R16");
|
real es_c3_am = _pla->get_real("R16");
|
||||||
real es_c1a_am = _pla->get_real("R17");
|
real es_c1a_am = _pla->get_real("R17");
|
||||||
real csamm = _pla->get_real("R4");
|
real csamm = _pla->get_real("R4");
|
||||||
|
real ven_rev = _pla->get_real("R18");
|
||||||
real prorata = 0.0;
|
real prorata = 0.0;
|
||||||
real conguaglio = 0.0;
|
real conguaglio = 0.0;
|
||||||
real topay = 0.0;
|
real topay = 0.0;
|
||||||
const real ris = vf1 + vf2; // gia' esclusi: NS, B3, cess. amm
|
const real ris = vf1 + vf2; // gia' esclusi: NS, B3, cess. amm
|
||||||
|
|
||||||
// calcola nuovo prorata dal 1998 per ogni attivita' (miste: 1+2)
|
// calcola nuovo prorata dal 1998 per ogni attivita' (miste: 1+2)
|
||||||
const real rsa = ris - (es_c1a-es_c1a_am) - (es_c3-es_c3_am);
|
const real rsa = ris - (es_c1a-es_c1a_am) - (es_c3-es_c3_am) - ven_rev;
|
||||||
const real rsn = rsa - es_c1;
|
const real rsn = rsa - es_c1;
|
||||||
if (!rsa.is_zero())
|
if (!rsa.is_zero())
|
||||||
{
|
{
|
||||||
prorata = CENTO - (rsn * CENTO / rsa); // Percentuale di indetraibilita: reciproco della percentuale di detraibilita'
|
prorata = CENTO - (rsn * CENTO / rsa); // Percentuale di indetraibilità: reciproco della detraibilità
|
||||||
prorata.round(0);
|
prorata.round(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3892,7 +3958,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
|||||||
// scrivi nuovo prorata in tabella anno successivo
|
// scrivi nuovo prorata in tabella anno successivo
|
||||||
const TString4 yr = _year;
|
const TString4 yr = _year;
|
||||||
_year.format("%d", atoi(_year) + 1);
|
_year.format("%d", atoi(_year) + 1);
|
||||||
look_pla(att, TRUE);
|
look_pla(att, true);
|
||||||
_pla->put("R8", prorata);
|
_pla->put("R8", prorata);
|
||||||
_pla->rewrite();
|
_pla->rewrite();
|
||||||
if (look_lia(0l, true))
|
if (look_lia(0l, true))
|
||||||
@ -3942,7 +4008,7 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
|||||||
|
|
||||||
look_lim(month+deltam,TRUE);
|
look_lim(month+deltam,TRUE);
|
||||||
// azzeriamo tutto (tranne r1, r5, s1, s0, s7)
|
// azzeriamo tutto (tranne r1, r5, s1, s0, s7)
|
||||||
const TString codtab = _lim->get("CODTAB");
|
const TString16 codtab = _lim->get("CODTAB");
|
||||||
|
|
||||||
real rimborso = _lim->get("R1");
|
real rimborso = _lim->get("R1");
|
||||||
real r5 = _lim->get("R5"); // Rettifiche
|
real r5 = _lim->get("R5"); // Rettifiche
|
||||||
@ -4210,6 +4276,7 @@ void TLiquidazione_app::recalc_annual(const char* att)
|
|||||||
real ven_lrd = 0.0;
|
real ven_lrd = 0.0;
|
||||||
real volaff1 = 0.0;
|
real volaff1 = 0.0;
|
||||||
real volaff2 = 0.0;
|
real volaff2 = 0.0;
|
||||||
|
real ven_rev = 0.0;
|
||||||
|
|
||||||
TString4 codiva,reg,tiva;
|
TString4 codiva,reg,tiva;
|
||||||
TToken_string va7("",'!');
|
TToken_string va7("",'!');
|
||||||
@ -4231,6 +4298,7 @@ void TLiquidazione_app::recalc_annual(const char* att)
|
|||||||
cess_amm = _pla->get_real("R4");
|
cess_amm = _pla->get_real("R4");
|
||||||
pro_pag = _pla->get_real("R12");
|
pro_pag = _pla->get_real("R12");
|
||||||
iva_acq = _pla->get_real("R11");
|
iva_acq = _pla->get_real("R11");
|
||||||
|
ven_rev = _pla->get_real("R18");
|
||||||
|
|
||||||
// Per avere un risultato corretto, si deve totalizzare PIM->R3 per codice iva
|
// Per avere un risultato corretto, si deve totalizzare PIM->R3 per codice iva
|
||||||
// e quindi effettuare lo scorporo dell'imponibile e aggiungere al relativo volume d'affari
|
// e quindi effettuare lo scorporo dell'imponibile e aggiungere al relativo volume d'affari
|
||||||
@ -4319,6 +4387,7 @@ void TLiquidazione_app::recalc_annual(const char* att)
|
|||||||
es_c3_am += _pum->get_real("S4");
|
es_c3_am += _pum->get_real("S4");
|
||||||
es_c1a_am += _pum->get_real("S5");
|
es_c1a_am += _pum->get_real("S5");
|
||||||
cess_amm += _pum->get_real("R0");
|
cess_amm += _pum->get_real("R0");
|
||||||
|
ven_rev += _pum->get_real("R28");
|
||||||
|
|
||||||
// Nota:
|
// Nota:
|
||||||
// l'iva acquisti del mese 13 memorizzata in PLM->R1, e' si' la sommatoria
|
// l'iva acquisti del mese 13 memorizzata in PLM->R1, e' si' la sommatoria
|
||||||
@ -4343,6 +4412,7 @@ void TLiquidazione_app::recalc_annual(const char* att)
|
|||||||
_pla->put("R12", pro_pag);
|
_pla->put("R12", pro_pag);
|
||||||
_pla->put("R14", volaff1);
|
_pla->put("R14", volaff1);
|
||||||
_pla->put("S1", volaff2.string());
|
_pla->put("S1", volaff2.string());
|
||||||
|
_pla->put("R18", ven_rev);
|
||||||
_pla->rewrite();
|
_pla->rewrite();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,9 +100,7 @@ void TLiquidazione_app::recalc_corrispettivi(int month, const char* codatt)
|
|||||||
{
|
{
|
||||||
if (_iva->get("S10").not_empty()) // Solo CD1_1 ha senso coi corrispettivi...
|
if (_iva->get("S10").not_empty()) // Solo CD1_1 ha senso coi corrispettivi...
|
||||||
{
|
{
|
||||||
real cd1_1 = _pum->get_real("R14");
|
_pum->curr().add("R14", imponibile); // CD1_1
|
||||||
cd1_1 += imponibile;
|
|
||||||
_pum->put("R14", cd1_1);
|
|
||||||
_pum->rewrite();
|
_pum->rewrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -343,9 +341,7 @@ void TLiquidazione_app::recalc_ventilation(int month, const char* codatt)
|
|||||||
{
|
{
|
||||||
if (_iva->get("S10").not_empty()) // Solo CD1_1 ha senso coi corrispettivi
|
if (_iva->get("S10").not_empty()) // Solo CD1_1 ha senso coi corrispettivi
|
||||||
{
|
{
|
||||||
real cd1_1 = _pum->get_real("R14");
|
_pum->curr().add("R14", imponibile); // CD1_1
|
||||||
cd1_1 += imponibile;
|
|
||||||
_pum->put("R14", cd1_1);
|
|
||||||
_pum->rewrite();
|
_pum->rewrite();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1087,7 +1087,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
|||||||
|
|
||||||
// sospensione imposta: non piu' due palle, ma QUATTRO...
|
// sospensione imposta: non piu' due palle, ma QUATTRO...
|
||||||
// caro Ferdinando... ora son divenute ben OTTO...
|
// caro Ferdinando... ora son divenute ben OTTO...
|
||||||
// grazie all'iva ad esigibilita' differita da pagare/de"TRARRE"
|
// grazie all'iva ad esigibilità differita da pagare/de"TRARRE"
|
||||||
TToken_string tt(t->_s4);
|
TToken_string tt(t->_s4);
|
||||||
real aqsi(tt.get(0));
|
real aqsi(tt.get(0));
|
||||||
real aqsv(tt.get(1));
|
real aqsv(tt.get(1));
|
||||||
@ -1147,12 +1147,13 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
|||||||
real e5 = _pla->get_real("R16"); // Totale vendite beni ammortizzabili esenti C3
|
real e5 = _pla->get_real("R16"); // Totale vendite beni ammortizzabili esenti C3
|
||||||
real e6 = _pla->get_real("R17"); // Totale vendite beni ammortizzabili esenti C1A
|
real e6 = _pla->get_real("R17"); // Totale vendite beni ammortizzabili esenti C1A
|
||||||
real bam = _pla->get_real("R4"); // Cessione beni ammortizzabili
|
real bam = _pla->get_real("R4"); // Cessione beni ammortizzabili
|
||||||
|
real vrc = _pla->get_real("R18"); // Vendite reverse charge
|
||||||
real iaq = _pla->get_real("R11"); // IVA acquisti
|
real iaq = _pla->get_real("R11"); // IVA acquisti
|
||||||
real ppg = _pla->get_real("R12"); // pro-rata pagato
|
real ppg = _pla->get_real("R12"); // pro-rata pagato
|
||||||
|
|
||||||
// calcola nuovo prorata per ogni attivita' (miste: 1+2)
|
// calcola nuovo prorata per ogni attivita' (miste: 1+2)
|
||||||
real pr;
|
real pr;
|
||||||
const real rsa = ris - (e3-e5) - (e4-e6);
|
const real rsa = ris - (e3-e5) - (e4-e6) - vrc;
|
||||||
if (!rsa.is_zero())
|
if (!rsa.is_zero())
|
||||||
{
|
{
|
||||||
const real rsn = rsa - e1;
|
const real rsn = rsa - e1;
|
||||||
@ -1176,7 +1177,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
|||||||
|
|
||||||
_DescrItem* dd = new _DescrItem(ANNUAL);
|
_DescrItem* dd = new _DescrItem(ANNUAL);
|
||||||
|
|
||||||
// MonsterFish: arrotonda alle 1000 LIRE C1,C2,C3,C1A
|
// MonsterFish: arrotonda all'Euro C1,C2,C3,C1A
|
||||||
round_imposta(e1);
|
round_imposta(e1);
|
||||||
round_imposta(e2);
|
round_imposta(e2);
|
||||||
round_imposta(e3);
|
round_imposta(e3);
|
||||||
@ -1185,10 +1186,13 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
|||||||
round_imposta(e6);
|
round_imposta(e6);
|
||||||
round_imposta(bam);
|
round_imposta(bam);
|
||||||
round_imposta(ris);
|
round_imposta(ris);
|
||||||
|
round_imposta(vrc);
|
||||||
|
|
||||||
// segna flag prorata
|
// segna flag prorata
|
||||||
if ((e1+e2+e3+e4) > ZERO)
|
if ((e1+e2+e3+e4) > ZERO)
|
||||||
|
{
|
||||||
dd->_f0 |= IS_PRORATA;
|
dd->_f0 |= IS_PRORATA;
|
||||||
|
}
|
||||||
dd->_r0 = ris;
|
dd->_r0 = ris;
|
||||||
dd->_r1 = e1;
|
dd->_r1 = e1;
|
||||||
dd->_r2 = pr > ZERO ? pr : ZERO;
|
dd->_r2 = pr > ZERO ? pr : ZERO;
|
||||||
@ -1199,6 +1203,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
|||||||
dd->_r7 = e4;
|
dd->_r7 = e4;
|
||||||
dd->_r8 = e5;
|
dd->_r8 = e5;
|
||||||
dd->_r9 = e6;
|
dd->_r9 = e6;
|
||||||
|
dd->_r10 = vrc;
|
||||||
t->_arr.add(dd);
|
t->_arr.add(dd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1230,16 +1235,16 @@ void TLiquidazione_app::describe_liq(int month, const char* codatts, _DescrItem*
|
|||||||
d->_r33 = _lim->get_real("R33"); // fdiffinc_iva_acq
|
d->_r33 = _lim->get_real("R33"); // fdiffinc_iva_acq
|
||||||
|
|
||||||
TToken_string tt(80);
|
TToken_string tt(80);
|
||||||
tt.add(_lam->get_real("R0").string()); // IVA Vendite
|
tt.add(_lam->get("R0")); // IVA Vendite
|
||||||
tt.add(_lam->get_real("R1").string()); // IVA Acquisti
|
tt.add(_lam->get("R1")); // IVA Acquisti
|
||||||
tt.add(_lam->get_real("R2").string()); // Credito precedente
|
tt.add(_lam->get("R2")); // Credito precedente
|
||||||
tt.add(_lam->get_real("R3").string()); // Debito precedente
|
tt.add(_lam->get("R3")); // Debito precedente
|
||||||
tt.add(_lam->get_real("R4").string());
|
tt.add(_lam->get("R4"));
|
||||||
|
|
||||||
d->_s0 = tt;
|
d->_s0 = tt;
|
||||||
d->_s1 = _lim->get_real("R11").string(); // Acc. dec.
|
d->_s1 = _lim->get("R11"); // Acc. dec.
|
||||||
d->_s2 = _lim->get_real("R12").string();
|
d->_s2 = _lim->get("R12");
|
||||||
d->_s3 = _lim->get_real("R13").string();
|
d->_s3 = _lim->get("R13");
|
||||||
|
|
||||||
// descrizione rettifiche
|
// descrizione rettifiche
|
||||||
if (month < 13)
|
if (month < 13)
|
||||||
@ -1421,7 +1426,7 @@ void TLiquidazione_app::set_firm(_DescrItem& d)
|
|||||||
if (!_isregis)
|
if (!_isregis)
|
||||||
{
|
{
|
||||||
set_header(soh++,FR("Ditta %s %s@107gData @>@125gPag. @#"),
|
set_header(soh++,FR("Ditta %s %s@107gData @>@125gPag. @#"),
|
||||||
(const char*)(d._s0), (const char*)(d._s1));
|
(const char*)d._s0, (const char*)d._s1);
|
||||||
set_header(soh++,"");
|
set_header(soh++,"");
|
||||||
}
|
}
|
||||||
set_header(soh++,sep);
|
set_header(soh++,sep);
|
||||||
@ -1638,10 +1643,6 @@ int TLiquidazione_app::calc_inc_diff(int tipoiva, real& imponibile_diff, real& i
|
|||||||
const real imp = rec.get_real(RMI_IMPONIBILE);
|
const real imp = rec.get_real(RMI_IMPONIBILE);
|
||||||
if (!iva.is_zero() || !imp.is_zero())
|
if (!iva.is_zero() || !imp.is_zero())
|
||||||
{
|
{
|
||||||
#ifdef DBG
|
|
||||||
if (iva.is_zero() && !imp.is_zero())
|
|
||||||
int cazzonga = 1;
|
|
||||||
#endif
|
|
||||||
const int tipodiff = rec.get_int("TIPODIFF");
|
const int tipodiff = rec.get_int("TIPODIFF");
|
||||||
switch (tipodiff)
|
switch (tipodiff)
|
||||||
{
|
{
|
||||||
@ -2117,7 +2118,7 @@ void TLiquidazione_app::set_plm(_DescrItem& d)
|
|||||||
|
|
||||||
void TLiquidazione_app::set_pumpam(const _DescrItem& d)
|
void TLiquidazione_app::set_pumpam(const _DescrItem& d)
|
||||||
{
|
{
|
||||||
bool printed = FALSE;
|
bool printed = false;
|
||||||
|
|
||||||
// d._f1 dice se c'era qualcosa sopra nella stessa pagina
|
// d._f1 dice se c'era qualcosa sopra nella stessa pagina
|
||||||
real spgn(d._s2);
|
real spgn(d._s2);
|
||||||
@ -2189,7 +2190,7 @@ void TLiquidazione_app::set_pumpam(const _DescrItem& d)
|
|||||||
}
|
}
|
||||||
if (! (d._r0.is_zero() && d._r1.is_zero()))
|
if (! (d._r0.is_zero() && d._r1.is_zero()))
|
||||||
{
|
{
|
||||||
printed = TRUE;
|
printed = true;
|
||||||
set_row(row++, FR("Acquisto beni ammortizzabili IVA detraibile@50g%r@69g%r"),
|
set_row(row++, FR("Acquisto beni ammortizzabili IVA detraibile@50g%r@69g%r"),
|
||||||
&(d._r0),
|
&(d._r0),
|
||||||
&(d._r1));
|
&(d._r1));
|
||||||
@ -2730,7 +2731,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
|
|||||||
{
|
{
|
||||||
for (int i = 0; i < d._arr.items(); i++)
|
for (int i = 0; i < d._arr.items(); i++)
|
||||||
{
|
{
|
||||||
_DescrItem& di = (_DescrItem&)d._arr[i];
|
const _DescrItem& di = (_DescrItem&)d._arr[i];
|
||||||
|
|
||||||
if (di._flags == RIMBORSO)
|
if (di._flags == RIMBORSO)
|
||||||
{
|
{
|
||||||
@ -2748,8 +2749,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
|
|||||||
{
|
{
|
||||||
// esenti e non imponibili
|
// esenti e non imponibili
|
||||||
set_row(rw++,"");
|
set_row(rw++,"");
|
||||||
set_row(rw++,TR("1) Soggetto con quota di operazioni esenti e non"
|
set_row(rw++,TR("1) Soggetto con quota di operazioni esenti e non imponibili superiore al 25%%"));
|
||||||
" imponibili superiore al 25%%"));
|
|
||||||
|
|
||||||
real perc = di._r0 * CENTO / di._r1; perc.round(0);
|
real perc = di._r0 * CENTO / di._r1; perc.round(0);
|
||||||
|
|
||||||
@ -2765,8 +2765,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
|
|||||||
if (di._f1)
|
if (di._f1)
|
||||||
{
|
{
|
||||||
set_row(rw++,"");
|
set_row(rw++,"");
|
||||||
set_row(rw++,TR("2) Soggetto con acquisti ad aliquota media "
|
set_row(rw++,TR("2) Soggetto con acquisti ad aliquota media superiore a quella delle vendite"));
|
||||||
"superiore a quella delle vendite"));
|
|
||||||
TString sep(strlen(REAL_PICTURE)+2); sep.fill('-');
|
TString sep(strlen(REAL_PICTURE)+2); sep.fill('-');
|
||||||
set_row(rw++,"");
|
set_row(rw++,"");
|
||||||
set_row(rw++,FR("@26gTotale imposte sugli acquisti@66g%r"), &(di._r5));
|
set_row(rw++,FR("@26gTotale imposte sugli acquisti@66g%r"), &(di._r5));
|
||||||
@ -2779,7 +2778,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
|
|||||||
set_row(rw++,FR("@26gTotale imponibili sulle vendite@66g%r"), &(di._r2));
|
set_row(rw++,FR("@26gTotale imponibili sulle vendite@66g%r"), &(di._r2));
|
||||||
}
|
}
|
||||||
|
|
||||||
set_print_zero(FALSE);
|
set_print_zero(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// prospettino versamento
|
// prospettino versamento
|
||||||
@ -2849,31 +2848,30 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
|
|||||||
bool TLiquidazione_app::set_annual(_DescrItem& d)
|
bool TLiquidazione_app::set_annual(_DescrItem& d)
|
||||||
{
|
{
|
||||||
// chiamata internamente a set_pims
|
// chiamata internamente a set_pims
|
||||||
bool ret = FALSE;
|
bool ret = false;
|
||||||
|
|
||||||
int row = get_maxrow()+1;
|
int row = get_maxrow()+1;
|
||||||
if (row == 1) row = 4;
|
if (row == 1) row = 4;
|
||||||
|
|
||||||
if (d._f0 & IS_PRORATA)
|
if (d._f0 & IS_PRORATA)
|
||||||
{
|
{
|
||||||
// non lo ha stampato prima se annuale, perche' Vladimiro il nefido
|
// non lo ha stampato prima se annuale, perche' Vladimiro il nefido pretende l'assurdo aggiornamento della perc. a quella nuova
|
||||||
// pretende l'assurdo aggiornamento della perc. a quella nuova
|
|
||||||
const int year_int = atoi(_year);
|
const int year_int = atoi(_year);
|
||||||
|
|
||||||
row++;
|
row++;
|
||||||
set_row(++row, year_int > 1997 ? TR("CALCOLO DELLA PERCENTUALE DI DETRAIBILITA'") : TR("CALCOLO DELLA PERCENTUALE DI INDETRAIBILITA'"));
|
set_row(++row, TR("CALCOLO DELLA PERCENTUALE DI DETRAIBILITA'"));
|
||||||
row++;
|
row++;
|
||||||
|
|
||||||
set_bookmark(TR("Calcolo pro-rata"), _att_bookmark);
|
set_bookmark(TR("Calcolo pro-rata"), _att_bookmark);
|
||||||
|
|
||||||
ret = TRUE;
|
ret = true;
|
||||||
set_print_zero(TRUE);
|
set_print_zero(true);
|
||||||
set_row(row++,"");
|
set_row(row++,"");
|
||||||
if (year_int > 1997)
|
|
||||||
{
|
|
||||||
const real perc_det = CENTO - d._r2;
|
const real perc_det = CENTO - d._r2;
|
||||||
const TString16 s1 = perc_det.string();
|
const real vol_aff = d._r0 - d._r10; // Valutare se eliminare d._r10 come valore e sottrarlo a monte
|
||||||
const TString16 s2 = d._r2.string();
|
const TString16 s1 = perc_det.stringa();
|
||||||
|
const TString16 s2 = d._r2.stringa();
|
||||||
set_row(row++, FR("%% PRO-RATA (%s%%) ed IVA non detraibile (%s%%)@69g%r"),
|
set_row(row++, FR("%% PRO-RATA (%s%%) ed IVA non detraibile (%s%%)@69g%r"),
|
||||||
(const char*)s1, (const char*)s2, &(d._r6));
|
(const char*)s1, (const char*)s2, &(d._r6));
|
||||||
|
|
||||||
@ -2883,19 +2881,9 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
|
|||||||
set_row(row++,FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r8));
|
set_row(row++,FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r8));
|
||||||
set_row(row++,FR("C1A - Operazioni esenti di cui all'art.10 n. 27 quinquies @69g%r"), &(d._r7));
|
set_row(row++,FR("C1A - Operazioni esenti di cui all'art.10 n. 27 quinquies @69g%r"), &(d._r7));
|
||||||
set_row(row++,FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r9));
|
set_row(row++,FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r9));
|
||||||
set_row(row++,FR("Volume d'affari @69g%r"), &(d._r0));
|
set_row(row++,FR("Totale vendite al fine del calcolo del pro-rata @69g%r"), &vol_aff);
|
||||||
set_row(row++,FR("Detraibilità @69g%r%%"), &perc_det);
|
set_row(row++,FR("Detraibilità @69g%r%%"), &perc_det);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
set_row(row++, FR("%% PRO-RATA ed IVA non detraibile (%s%%)@69g%r"),
|
|
||||||
(const char*)(d._r2.string()), &(d._r6));
|
|
||||||
set_row(row++,FR("B1 - Operazioni esenti, escluse da nr. 1 a 9 e 11 art. 10 @69g%r"), &(d._r1));
|
|
||||||
set_row(row++,FR("B2 - Operazioni esenti, di cui nr. 11 art. 10 @69g%r"), &(d._r4));
|
|
||||||
set_row(row++,FR("B3 - Operazioni esenti da nr. 1 a 9 art. 10 @69g%r"), &(d._r5));
|
|
||||||
set_row(row++,FR("Volume d'affari - B3 @69g%r"), &(d._r0));
|
|
||||||
set_row(row++,FR("Indetraibilità@69g%r%%"), &(d._r2));
|
|
||||||
}
|
|
||||||
set_print_zero(FALSE);
|
set_print_zero(FALSE);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -3022,8 +3022,7 @@ void TStampa_registri_app::on_page_printed(int file)
|
|||||||
|
|
||||||
bool TStampa_registri_app::stampo_liquidazione(int mese)
|
bool TStampa_registri_app::stampo_liquidazione(int mese)
|
||||||
{
|
{
|
||||||
//test tradotti alla lettera da AS/400
|
//test tradotti alla lettera da AS/400 assolutamente incongruenti !!!
|
||||||
//assolutamente incongruenti !!!
|
|
||||||
const bool trim_month_flag = (_frequiva == 'T' && (mese == 3 || mese == 6 || mese == 9 || mese == 12))
|
const bool trim_month_flag = (_frequiva == 'T' && (mese == 3 || mese == 6 || mese == 9 || mese == 12))
|
||||||
||_frequiva != 'T' || (mese == 12 && _tipo_riepilogativo == 'A');
|
||_frequiva != 'T' || (mese == 12 && _tipo_riepilogativo == 'A');
|
||||||
|
|
||||||
@ -3100,8 +3099,7 @@ void TStampa_registri_app::liq_other_case()
|
|||||||
{
|
{
|
||||||
TFilename app; app.temp();
|
TFilename app; app.temp();
|
||||||
int mese = _fino_a_mese;
|
int mese = _fino_a_mese;
|
||||||
//se la frequenza e' trimestrale
|
//se la frequenza e' trimestrale aggiusta il mese al trimestre a cui appartiene
|
||||||
//aggiusta il mese al trimestre a cui appartiene
|
|
||||||
if (_frequiva == 'T')
|
if (_frequiva == 'T')
|
||||||
mese += 2 - ((mese-1) % 3);
|
mese += 2 - ((mese-1) % 3);
|
||||||
send_message(calc_reg ? 'R' : 'C', app, calc_reg ? _datareg.month() : mese);
|
send_message(calc_reg ? 'R' : 'C', app, calc_reg ? _datareg.month() : mese);
|
||||||
|
@ -19,7 +19,7 @@ class TParametri_ditta : public TConfig_application
|
|||||||
void check_registers(int year);
|
void check_registers(int year);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool check_autorization() const {return FALSE;}
|
virtual bool check_autorization() const {return false;}
|
||||||
virtual const char* get_mask_name() const {return "cg5100a";}
|
virtual const char* get_mask_name() const {return "cg5100a";}
|
||||||
virtual bool preprocess_config (TMask& mask, TConfig& config);
|
virtual bool preprocess_config (TMask& mask, TConfig& config);
|
||||||
virtual bool postprocess_config (TMask& mask, TConfig& config);
|
virtual bool postprocess_config (TMask& mask, TConfig& config);
|
||||||
@ -46,7 +46,7 @@ bool TParametri_ditta::user_create()
|
|||||||
// istanzia array _atts on le attività della ditta corrente
|
// istanzia array _atts on le attività della ditta corrente
|
||||||
_atts.add(r.get(ATT_CODATT));
|
_atts.add(r.get(ATT_CODATT));
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -131,10 +131,10 @@ void TParametri_ditta::swap_file(int logicnum, bool tocom)
|
|||||||
file = dir.filename();
|
file = dir.filename();
|
||||||
if (dir.eox() == 0L || !file.exist())
|
if (dir.eox() == 0L || !file.exist())
|
||||||
{
|
{
|
||||||
set_autoload_new_files(FALSE);
|
set_autoload_new_files(false);
|
||||||
TSystemisamfile s(logicnum);
|
TSystemisamfile s(logicnum);
|
||||||
s.build();
|
s.build();
|
||||||
set_autoload_new_files(TRUE);
|
set_autoload_new_files(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ void TParametri_ditta::load_file(int logicnum)
|
|||||||
TFilename lf;
|
TFilename lf;
|
||||||
lf.format("%sstd/lf%04d.txt", firm2dir(-1), logicnum);
|
lf.format("%sstd/lf%04d.txt", firm2dir(-1), logicnum);
|
||||||
if (lf.exist())
|
if (lf.exist())
|
||||||
f.load(lf, '|', '\0', '\n', TRUE, TRUE);
|
f.load(lf, '|', '\0', '\n', true, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ bool TParametri_ditta::preprocess_config (TMask& mask, TConfig& config)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
mask.disable(-GROUP_CONTABILITA);
|
mask.disable(-GROUP_CONTABILITA);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TParametri_ditta::postprocess_config(TMask& mask, TConfig& config)
|
bool TParametri_ditta::postprocess_config(TMask& mask, TConfig& config)
|
||||||
@ -183,7 +183,7 @@ bool TParametri_ditta::postprocess_config(TMask& mask, TConfig& config)
|
|||||||
// MI3262
|
// MI3262
|
||||||
// La gestione liquidazione differita e' stata spostata sui parametri liquidazione
|
// La gestione liquidazione differita e' stata spostata sui parametri liquidazione
|
||||||
// ovvero cg5300.cpp
|
// ovvero cg5300.cpp
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TParametri_ditta::postprocess_config_changed(const char* par, const char* var,
|
bool TParametri_ditta::postprocess_config_changed(const char* par, const char* var,
|
||||||
@ -192,7 +192,7 @@ bool TParametri_ditta::postprocess_config_changed(const char* par, const char* v
|
|||||||
const bool changed = strcmp(oldv, newv) != 0;
|
const bool changed = strcmp(oldv, newv) != 0;
|
||||||
|
|
||||||
if (!changed)
|
if (!changed)
|
||||||
return TRUE;
|
return true;
|
||||||
const TFixed_string v(var);
|
const TFixed_string v(var);
|
||||||
if (v == "AnCfCm")
|
if (v == "AnCfCm")
|
||||||
{
|
{
|
||||||
@ -202,7 +202,7 @@ bool TParametri_ditta::postprocess_config_changed(const char* par, const char* v
|
|||||||
swap_file(LF_INDSP, *newv == 'X');
|
swap_file(LF_INDSP, *newv == 'X');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else if (v == "PcTcCm")
|
else if (v == "PcTcCm")
|
||||||
{
|
{
|
||||||
@ -225,9 +225,9 @@ bool TParametri_ditta::postprocess_config_changed(const char* par, const char* v
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cg5100 (int argc, char* argv[])
|
int cg5100 (int argc, char* argv[])
|
||||||
|
@ -96,12 +96,12 @@ END
|
|||||||
BOOLEAN CHK_GESSAL
|
BOOLEAN CHK_GESSAL
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 13 "Gestione saldaconto "
|
PROMPT 4 13 "Gestione saldaconto "
|
||||||
MESSAGE TRUE ENABLE,CHK_GESVAL|ENABLE,CHK_NRCLIDX|ENABLE,CHK_NRFORDX
|
MESSAGE true ENABLE,CHK_GESVAL|ENABLE,CHK_NRCLIDX|ENABLE,CHK_NRFORDX
|
||||||
MESSAGE TRUE ENABLE,CHK_DTCFPG|ENABLE,CHK_RIFPRO|ENABLE,FLD_CODLIN
|
MESSAGE true ENABLE,CHK_DTCFPG|ENABLE,CHK_RIFPRO|ENABLE,FLD_CODLIN
|
||||||
MESSAGE TRUE ENABLE,FLD_NUM_EC|ENABLE,FLD_LAST_EC|ENABLE,CHK_EASYSAL
|
MESSAGE true ENABLE,FLD_NUM_EC|ENABLE,FLD_LAST_EC|ENABLE,CHK_EASYSAL
|
||||||
MESSAGE FALSE DISABLE,CHK_GESVAL|DISABLE,CHK_NRCLIDX|DISABLE,CHK_NRFORDX
|
MESSAGE false DISABLE,CHK_GESVAL|DISABLE,CHK_NRCLIDX|DISABLE,CHK_NRFORDX
|
||||||
MESSAGE FALSE DISABLE,CHK_DTCFPG|DISABLE,CHK_RIFPRO|DISABLE,FLD_CODLIN
|
MESSAGE false DISABLE,CHK_DTCFPG|DISABLE,CHK_RIFPRO|DISABLE,FLD_CODLIN
|
||||||
MESSAGE FALSE DISABLE,FLD_NUM_EC|DISABLE,FLD_LAST_EC|CLEAR,CHK_EASYSAL
|
MESSAGE false DISABLE,FLD_NUM_EC|DISABLE,FLD_LAST_EC|CLEAR,CHK_EASYSAL
|
||||||
FIELD GesSal
|
FIELD GesSal
|
||||||
GROUP GROUP_SALDACONTO
|
GROUP GROUP_SALDACONTO
|
||||||
END
|
END
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
|
|
||||||
bool TRiga_array::add_riga(const TRectype& rec_saldi)
|
bool TRiga_array::add_riga(const TRectype& rec_saldi)
|
||||||
{
|
{
|
||||||
bool flsca, found = FALSE;
|
bool flsca, found = false;
|
||||||
int annoes, annoesr;
|
int annoes, annoesr;
|
||||||
char flag = ' ', flagr = ' ';
|
char flag = ' ', flagr = ' ';
|
||||||
char flagfin = ' ', flagfinr = ' ';
|
char flagfin = ' ', flagfinr = ' ';
|
||||||
@ -78,7 +78,7 @@ bool TRiga_array::add_riga(const TRectype& rec_saldi)
|
|||||||
pdarepror += pdarepro;
|
pdarepror += pdarepro;
|
||||||
paverepror = rec_saldi.get_real(SLD_PAVEREPRO);
|
paverepror = rec_saldi.get_real(SLD_PAVEREPRO);
|
||||||
paverepror += paverepro;
|
paverepror += paverepro;
|
||||||
found = TRUE;
|
found = true;
|
||||||
r.put(SLD_FLSCA, flsca);
|
r.put(SLD_FLSCA, flsca);
|
||||||
r.put(SLD_ANNOES, annoes);
|
r.put(SLD_ANNOES, annoes);
|
||||||
r.put(SLD_PDARE, pdarer);
|
r.put(SLD_PDARE, pdarer);
|
||||||
@ -121,7 +121,7 @@ protected:
|
|||||||
virtual bool user_destroy();
|
virtual bool user_destroy();
|
||||||
virtual TRelation* get_relation() const { return _rel; }
|
virtual TRelation* get_relation() const { return _rel; }
|
||||||
virtual TMask* get_mask(int mode) { return _msk; }
|
virtual TMask* get_mask(int mode) { return _msk; }
|
||||||
virtual bool changing_mask(int mode) {return FALSE; }
|
virtual bool changing_mask(int mode) {return false; }
|
||||||
virtual int read(TMask& m);
|
virtual int read(TMask& m);
|
||||||
virtual void init_query_mode(TMask&);
|
virtual void init_query_mode(TMask&);
|
||||||
virtual void init_modify_mode(TMask&);
|
virtual void init_modify_mode(TMask&);
|
||||||
@ -152,7 +152,7 @@ bool TSaldibrowse_application::sheet_action(TSheet_field& s, int r, KEY k)
|
|||||||
void TSaldibrowse_application::init_query_mode(TMask& m)
|
void TSaldibrowse_application::init_query_mode(TMask& m)
|
||||||
{
|
{
|
||||||
_anno = 0;
|
_anno = 0;
|
||||||
_scarongly = FALSE;
|
_scarongly = false;
|
||||||
m.disable(DLG_FINDREC);
|
m.disable(DLG_FINDREC);
|
||||||
m.enable(F_DESCR_CONTO);
|
m.enable(F_DESCR_CONTO);
|
||||||
m.enable(F_ANNO);
|
m.enable(F_ANNO);
|
||||||
@ -180,7 +180,7 @@ bool TSaldibrowse_application::fai_filtro()
|
|||||||
int annop = 0;
|
int annop = 0;
|
||||||
char tipo;
|
char tipo;
|
||||||
|
|
||||||
_saldo_gruppo = _saldo_conto = _saldo_sottoc = FALSE;
|
_saldo_gruppo = _saldo_conto = _saldo_sottoc = false;
|
||||||
TMask& m = curr_mask();
|
TMask& m = curr_mask();
|
||||||
tipo = m.get(F_TIPOCF)[0];
|
tipo = m.get(F_TIPOCF)[0];
|
||||||
if (_anno != 0)
|
if (_anno != 0)
|
||||||
@ -198,10 +198,10 @@ bool TSaldibrowse_application::fai_filtro()
|
|||||||
_s = m.get_long(F_SOTTOC_CLIENTE);
|
_s = m.get_long(F_SOTTOC_CLIENTE);
|
||||||
else _s = m.get_long(F_SOTTOC_FORN);
|
else _s = m.get_long(F_SOTTOC_FORN);
|
||||||
if (_c == 0)
|
if (_c == 0)
|
||||||
_saldo_gruppo = TRUE;
|
_saldo_gruppo = true;
|
||||||
else if (_s == 0l)
|
else if (_s == 0l)
|
||||||
_saldo_conto = TRUE;
|
_saldo_conto = true;
|
||||||
else _saldo_sottoc = TRUE;
|
else _saldo_sottoc = true;
|
||||||
|
|
||||||
TRectype from (LF_SALDI);
|
TRectype from (LF_SALDI);
|
||||||
TRectype to (LF_SALDI);
|
TRectype to (LF_SALDI);
|
||||||
@ -222,7 +222,7 @@ bool TSaldibrowse_application::fai_filtro()
|
|||||||
|
|
||||||
_cur->setregion(from,to);
|
_cur->setregion(from,to);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TSaldibrowse_application::anno_handler(TMask_field& f, KEY key)
|
bool TSaldibrowse_application::anno_handler(TMask_field& f, KEY key)
|
||||||
@ -238,23 +238,23 @@ bool TSaldibrowse_application::anno_handler(TMask_field& f, KEY key)
|
|||||||
app()._anno = anno;
|
app()._anno = anno;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TSaldibrowse_application::flsca_handler(TMask_field& f, KEY key)
|
bool TSaldibrowse_application::flsca_handler(TMask_field& f, KEY key)
|
||||||
{
|
{
|
||||||
if (key == K_SPACE)
|
if (key == K_SPACE)
|
||||||
app()._scarongly = !f.get().blank();
|
app()._scarongly = !f.get().blank();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TSaldibrowse_application::sottoc_handler(TMask_field& f, KEY key)
|
bool TSaldibrowse_application::sottoc_handler(TMask_field& f, KEY key)
|
||||||
{
|
{
|
||||||
bool ok = TRUE;
|
bool ok = true;
|
||||||
|
|
||||||
if (key == K_TAB)
|
if (key == K_TAB)
|
||||||
{
|
{
|
||||||
bool stop = FALSE;
|
bool stop = false;
|
||||||
|
|
||||||
TMask& m = f.mask();
|
TMask& m = f.mask();
|
||||||
int gruppo = m.get_int(F_GRUPPO);
|
int gruppo = m.get_int(F_GRUPPO);
|
||||||
@ -337,7 +337,7 @@ bool TSaldibrowse_application::user_create()
|
|||||||
|
|
||||||
set_search_field(F_GRUPPO);
|
set_search_field(F_GRUPPO);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TSaldibrowse_application::user_destroy()
|
bool TSaldibrowse_application::user_destroy()
|
||||||
@ -348,7 +348,7 @@ bool TSaldibrowse_application::user_destroy()
|
|||||||
delete _cur;
|
delete _cur;
|
||||||
// delete _esc;
|
// delete _esc;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSaldibrowse_application::read(TMask& m)
|
int TSaldibrowse_application::read(TMask& m)
|
||||||
|
@ -38,11 +38,11 @@ protected: // Relapp
|
|||||||
|
|
||||||
virtual TRelation* get_relation() const { return _rel; }
|
virtual TRelation* get_relation() const { return _rel; }
|
||||||
virtual TMask* get_mask(int mode) { return _msk; }
|
virtual TMask* get_mask(int mode) { return _msk; }
|
||||||
virtual bool changing_mask(int mode) { return FALSE; }
|
virtual bool changing_mask(int mode) { return false; }
|
||||||
|
|
||||||
// file intertface
|
// file intertface
|
||||||
virtual bool remove() { return TRUE; }
|
virtual bool remove() { return true; }
|
||||||
virtual bool protected_record(TRectype&) { return TRUE; }
|
virtual bool protected_record(TRectype&) { return true; }
|
||||||
virtual void init_query_mode(TMask&);
|
virtual void init_query_mode(TMask&);
|
||||||
virtual void init_insert_mode(TMask& m);
|
virtual void init_insert_mode(TMask& m);
|
||||||
virtual int rewrite(const TMask& m);
|
virtual int rewrite(const TMask& m);
|
||||||
@ -72,7 +72,7 @@ bool TParaliq_app::ditta_handler(TMask_field& f, KEY k)
|
|||||||
TFirm fr(atol(f.get()));
|
TFirm fr(atol(f.get()));
|
||||||
f.mask().set(F_CODVAL, fr.codice_valuta());
|
f.mask().set(F_CODVAL, fr.codice_valuta());
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TParaliq_app::gelidi_handler(TMask_field& f, KEY k)
|
bool TParaliq_app::gelidi_handler(TMask_field& f, KEY k)
|
||||||
@ -93,7 +93,7 @@ bool TParaliq_app::gelidi_handler(TMask_field& f, KEY k)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TParaliq_app::agrmin_handler(TMask_field& f, KEY k)
|
bool TParaliq_app::agrmin_handler(TMask_field& f, KEY k)
|
||||||
@ -118,7 +118,7 @@ bool TParaliq_app::agrmin_handler(TMask_field& f, KEY k)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TParaliq_app::credres_handler(TMask_field& f, KEY k)
|
bool TParaliq_app::credres_handler(TMask_field& f, KEY k)
|
||||||
@ -144,7 +144,7 @@ bool TParaliq_app::credres_handler(TMask_field& f, KEY k)
|
|||||||
if (id == F_CRED_RES && i != 0 && r == 0.0)
|
if (id == F_CRED_RES && i != 0 && r == 0.0)
|
||||||
return f.error_box(TR("Impostare anche il credito residuo."));
|
return f.error_box(TR("Impostare anche il credito residuo."));
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TParaliq_app::credpreccost_handler(TMask_field& f, KEY k)
|
bool TParaliq_app::credpreccost_handler(TMask_field& f, KEY k)
|
||||||
@ -158,7 +158,7 @@ bool TParaliq_app::credpreccost_handler(TMask_field& f, KEY k)
|
|||||||
r.round(euro ? m.get_int(F_ROUNDDIC) : -3);
|
r.round(euro ? m.get_int(F_ROUNDDIC) : -3);
|
||||||
f.set(r.string());
|
f.set(r.string());
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TParaliq_app::utcred_handler(TMask_field& f, KEY k)
|
bool TParaliq_app::utcred_handler(TMask_field& f, KEY k)
|
||||||
@ -198,7 +198,7 @@ bool TParaliq_app::utcred_handler(TMask_field& f, KEY k)
|
|||||||
else
|
else
|
||||||
m.set(F_MESE_RES_AL, oldmese);
|
m.set(F_MESE_RES_AL, oldmese);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TParaliq_app::check_registers(int year)
|
void TParaliq_app::check_registers(int year)
|
||||||
@ -308,7 +308,7 @@ bool TParaliq_app::user_destroy()
|
|||||||
{
|
{
|
||||||
delete _rel;
|
delete _rel;
|
||||||
delete _msk;
|
delete _msk;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TParaliq_app::sheet_action(TSheet_field& s, int r, KEY k)
|
bool TParaliq_app::sheet_action(TSheet_field& s, int r, KEY k)
|
||||||
@ -326,7 +326,7 @@ void TParaliq_app::init_query_mode(TMask& m)
|
|||||||
void TParaliq_app::init_insert_mode(TMask& m)
|
void TParaliq_app::init_insert_mode(TMask& m)
|
||||||
{
|
{
|
||||||
// Inizializza array delle attività
|
// Inizializza array delle attività
|
||||||
init_array(m, TRUE);
|
init_array(m, true);
|
||||||
m.set(F_ROUNDLIQ, TCurrency::get_firm_dec());
|
m.set(F_ROUNDLIQ, TCurrency::get_firm_dec());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -342,7 +342,7 @@ int TParaliq_app::rewrite(const TMask& m)
|
|||||||
const char freq = m.get(F_FREQ_VERS)[0];
|
const char freq = m.get(F_FREQ_VERS)[0];
|
||||||
|
|
||||||
int err = NOERR;
|
int err = NOERR;
|
||||||
bool was = FALSE;
|
bool was = false;
|
||||||
|
|
||||||
for (int i = 0; err == NOERR && i < sf.items(); i++)
|
for (int i = 0; err == NOERR && i < sf.items(); i++)
|
||||||
{
|
{
|
||||||
@ -457,7 +457,7 @@ int TParaliq_app::read(TMask& m)
|
|||||||
TCursor cur(&relpla, "", 1, &pla, &pla);
|
TCursor cur(&relpla, "", 1, &pla, &pla);
|
||||||
const TRecnotype items = cur.items();
|
const TRecnotype items = cur.items();
|
||||||
|
|
||||||
init_array(m, FALSE); // Carica tutti i codici attività
|
init_array(m, false); // Carica tutti i codici attività
|
||||||
cur.freeze();
|
cur.freeze();
|
||||||
for (cur = 0L; cur.pos() < items; ++cur)
|
for (cur = 0L; cur.pos() < items; ++cur)
|
||||||
{
|
{
|
||||||
|
@ -107,8 +107,8 @@ BOOLEAN F_GESIC
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 4 7 "Gestione IVA per cassa"
|
PROMPT 4 7 "Gestione IVA per cassa"
|
||||||
FIELD B5
|
FIELD B5
|
||||||
MESSAGE FALSE DISABLE,F_ICDAL|DISABLE,F_ICAL
|
MESSAGE false DISABLE,F_ICDAL|DISABLE,F_ICAL
|
||||||
MESSAGE TRUE ENABLE,F_ICDAL|ENABLE,F_ICAL
|
MESSAGE true ENABLE,F_ICDAL|ENABLE,F_ICAL
|
||||||
MODULE IC
|
MODULE IC
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
|||||||
{
|
{
|
||||||
CHECKD(month > 0 && month < 13, "Mese errato ", month);
|
CHECKD(month > 0 && month < 13, "Mese errato ", month);
|
||||||
|
|
||||||
bool ok = TRUE;
|
bool ok = true;
|
||||||
const char * const fieldname = giornale ? MOV_STAMPATO : MOV_REGST;
|
const char * const fieldname = giornale ? MOV_STAMPATO : MOV_REGST;
|
||||||
TRelation rel(LF_MOV);
|
TRelation rel(LF_MOV);
|
||||||
TLocalisamfile& mov = rel.lfile();
|
TLocalisamfile& mov = rel.lfile();
|
||||||
@ -66,7 +66,7 @@ bool TRipristina_stampa::reg_restore(const TString& regist,
|
|||||||
const long nitems = cursor.items();
|
const long nitems = cursor.items();
|
||||||
|
|
||||||
TString msg; msg.format(FR("Ripristino stampa del registro %s"), (const char*)regist);
|
TString msg; msg.format(FR("Ripristino stampa del registro %s"), (const char*)regist);
|
||||||
TProgind p(nitems ? nitems : 1, msg , TRUE, TRUE);
|
TProgind p(nitems ? nitems : 1, msg , true, true);
|
||||||
|
|
||||||
if (giornale)
|
if (giornale)
|
||||||
{
|
{
|
||||||
@ -137,7 +137,7 @@ bool TRipristina_stampa::inl_restore(const TString& lib, int year, int month)
|
|||||||
const TRecnotype items = cur.items();
|
const TRecnotype items = cur.items();
|
||||||
|
|
||||||
cur.freeze();
|
cur.freeze();
|
||||||
bool ok = FALSE;
|
bool ok = false;
|
||||||
|
|
||||||
// Azzera il flag di stampato sugli indici con mese >= month
|
// Azzera il flag di stampato sugli indici con mese >= month
|
||||||
for (cur = 0L; cur.pos() < items; ++cur)
|
for (cur = 0L; cur.pos() < items; ++cur)
|
||||||
@ -187,7 +187,7 @@ void TRipristina_stampa::main_loop()
|
|||||||
{
|
{
|
||||||
long firm = prefix().get_codditta();
|
long firm = prefix().get_codditta();
|
||||||
const TString4 reg = msk.get(F_REG);
|
const TString4 reg = msk.get(F_REG);
|
||||||
bool giornale = FALSE;
|
bool giornale = false;
|
||||||
|
|
||||||
if (_op == restore_reg)
|
if (_op == restore_reg)
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ protected:
|
|||||||
static bool vers_action(TSheet_field& s, int r, KEY k);
|
static bool vers_action(TSheet_field& s, int r, KEY k);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool firm_change_enabled() const { return FALSE; }
|
virtual bool firm_change_enabled() const { return false; }
|
||||||
|
|
||||||
static Visliq_app& app() { return (Visliq_app&)main_app(); }
|
static Visliq_app& app() { return (Visliq_app&)main_app(); }
|
||||||
TArray_sheet* get_ditte_sheet() { return _ditte; }
|
TArray_sheet* get_ditte_sheet() { return _ditte; }
|
||||||
@ -76,7 +76,7 @@ public:
|
|||||||
|
|
||||||
bool look_lia(long ditta = 0l, int year = 0);
|
bool look_lia(long ditta = 0l, int year = 0);
|
||||||
bool look_lim(int m);
|
bool look_lim(int m);
|
||||||
bool look_del(int month, int type, bool create = FALSE);
|
bool look_del(int month, int type, bool create = false);
|
||||||
|
|
||||||
void read_general(TMask& m);
|
void read_general(TMask& m);
|
||||||
void write_general(TMask& m);
|
void write_general(TMask& m);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
bool Visliq_app::look_lim(int m)
|
bool Visliq_app::look_lim(int m)
|
||||||
{
|
{
|
||||||
bool ok = FALSE;
|
bool ok = false;
|
||||||
|
|
||||||
_lim_r->zero();
|
_lim_r->zero();
|
||||||
_lam_r->zero();
|
_lam_r->zero();
|
||||||
@ -64,11 +64,11 @@ bool Visliq_app::look_lia(long ditta, int year)
|
|||||||
|
|
||||||
|
|
||||||
bool Visliq_app::is_trim(int x)
|
bool Visliq_app::is_trim(int x)
|
||||||
// TRUE se il mese passato e' un trimestre
|
// true se il mese passato e' un trimestre
|
||||||
{ return x == 3 || x == 6 || x == 9 || x == 12; }
|
{ return x == 3 || x == 6 || x == 9 || x == 12; }
|
||||||
|
|
||||||
bool Visliq_app::is_month_ok(int x, int month)
|
bool Visliq_app::is_month_ok(int x, int month)
|
||||||
// TRUE se il mese passato e' compatibile con il regime
|
// true se il mese passato e' compatibile con il regime
|
||||||
// di liquidazione e (opz) non e' maggiore di quello scelto
|
// di liquidazione e (opz) non e' maggiore di quello scelto
|
||||||
{
|
{
|
||||||
if (month == -1) month = x;
|
if (month == -1) month = x;
|
||||||
|
@ -54,7 +54,7 @@ bool TRipristino_liq::ch_year_handler(TMask_field& f, KEY key)
|
|||||||
app().build_nomiditte();
|
app().build_nomiditte();
|
||||||
app().build_ditte_sheet();
|
app().build_ditte_sheet();
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ bool TRipristino_liq::create()
|
|||||||
build_ditte_sheet();
|
build_ditte_sheet();
|
||||||
|
|
||||||
dispatch_e_menu(BAR_ITEM_ID(1));
|
dispatch_e_menu(BAR_ITEM_ID(1));
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TRipristino_liq::destroy()
|
bool TRipristino_liq::destroy()
|
||||||
@ -216,7 +216,7 @@ bool TRipristino_liq::restore_firm(long firm)
|
|||||||
zero_cursor("PPA");
|
zero_cursor("PPA");
|
||||||
zero_cursor("RMB");
|
zero_cursor("RMB");
|
||||||
zero_cursor("LIM");
|
zero_cursor("LIM");
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
313
cg/cg5700.cpp
313
cg/cg5700.cpp
@ -4,12 +4,15 @@
|
|||||||
#include <currency.h>
|
#include <currency.h>
|
||||||
#include <form.h>
|
#include <form.h>
|
||||||
#include <prefix.h>
|
#include <prefix.h>
|
||||||
|
#include <progind.h>
|
||||||
#include <recarray.h>
|
#include <recarray.h>
|
||||||
#include <recset.h>
|
#include <recset.h>
|
||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <tabutil.h>
|
#include <tabutil.h>
|
||||||
|
|
||||||
#include <nditte.h>
|
#include <nditte.h>
|
||||||
|
#include <causali.h>
|
||||||
|
#include <mov.h>
|
||||||
#include <rmoviva.h>
|
#include <rmoviva.h>
|
||||||
|
|
||||||
#include "cg5700.h"
|
#include "cg5700.h"
|
||||||
@ -34,12 +37,7 @@ public:
|
|||||||
|
|
||||||
TDich_periodica_selfirm_mask::TDich_periodica_selfirm_mask() : TAutomask("cg5700a")
|
TDich_periodica_selfirm_mask::TDich_periodica_selfirm_mask() : TAutomask("cg5700a")
|
||||||
{
|
{
|
||||||
_ditte = new TArray_sheet(-1, -1, 70, 15, TR("Selezione Ditte"),
|
_ditte = new TArray_sheet(-1, -1, 70, 15, TR("Selezione Ditte"), HR("Codice@6R|Ragione Sociale@50"));
|
||||||
HR("Codice@6R|Ragione Sociale@50"));
|
|
||||||
TDate oggi(TODAY);
|
|
||||||
_year = oggi.year();
|
|
||||||
|
|
||||||
build_ditte_sheet();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TDich_periodica_selfirm_mask::~TDich_periodica_selfirm_mask()
|
TDich_periodica_selfirm_mask::~TDich_periodica_selfirm_mask()
|
||||||
@ -136,7 +134,7 @@ bool TDich_periodica_selfirm_mask::on_field_event(TOperable_field& o, TField_eve
|
|||||||
return select_button();
|
return select_button();
|
||||||
if (e == fe_modify)
|
if (e == fe_modify)
|
||||||
{
|
{
|
||||||
bool found = FALSE;
|
bool found = false;
|
||||||
TString16 ditta = o.get();
|
TString16 ditta = o.get();
|
||||||
for (int i = 0; i < _ditte->items(); i++)
|
for (int i = 0; i < _ditte->items(); i++)
|
||||||
{
|
{
|
||||||
@ -148,7 +146,7 @@ bool TDich_periodica_selfirm_mask::on_field_event(TOperable_field& o, TField_eve
|
|||||||
{
|
{
|
||||||
set(F_CODDITTA, row.get(0));
|
set(F_CODDITTA, row.get(0));
|
||||||
set(F_RAGSOC, row.get(1));
|
set(F_RAGSOC, row.get(1));
|
||||||
found = TRUE;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -158,6 +156,12 @@ bool TDich_periodica_selfirm_mask::on_field_event(TOperable_field& o, TField_eve
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case F_YEAR:
|
case F_YEAR:
|
||||||
|
if (e == fe_init && o.empty())
|
||||||
|
{
|
||||||
|
const TDate oggi(TODAY);
|
||||||
|
o.set(oggi.year()-1);
|
||||||
|
e = fe_modify;
|
||||||
|
}
|
||||||
if (e == fe_modify)
|
if (e == fe_modify)
|
||||||
{
|
{
|
||||||
_year = atoi(o.get());
|
_year = atoi(o.get());
|
||||||
@ -168,12 +172,12 @@ bool TDich_periodica_selfirm_mask::on_field_event(TOperable_field& o, TField_eve
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool change_prompt(TString& p, int year)
|
bool change_prompt(TString& p, int year)
|
||||||
{
|
{
|
||||||
bool changed = FALSE;
|
bool changed = false;
|
||||||
if (p.left(2) == "VP")
|
if (p.left(2) == "VP")
|
||||||
{
|
{
|
||||||
const int vp = atoi(p.mid(2,2));
|
const int vp = atoi(p.mid(2,2));
|
||||||
@ -195,7 +199,7 @@ bool change_prompt(TString& p, int year)
|
|||||||
p.overwrite(n, 2);
|
p.overwrite(n, 2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
changed = TRUE;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -222,6 +226,19 @@ TDich_periodica_iva_form::TDich_periodica_iva_form(int anno) : TForm("cg5700a")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
// TDich_periodica_iva_mask
|
||||||
|
///////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
struct Tcd
|
||||||
|
{
|
||||||
|
real cd1_1, cd1_1s, cd1_2, cd1_3, cd1_4, cd1_5;
|
||||||
|
real cd2_1, cd2_1s, cd2_2, cd2_3, cd2_4, cd2_5;
|
||||||
|
real cd3_1, cd3_2, cd3_3, cd3_4;
|
||||||
|
|
||||||
|
void Reset() { memset(this,0, sizeof(Tcd)); }
|
||||||
|
};
|
||||||
|
|
||||||
class TDich_periodica_iva_mask : public TAutomask
|
class TDich_periodica_iva_mask : public TAutomask
|
||||||
{
|
{
|
||||||
TDich_periodica_selfirm_mask * _sf;
|
TDich_periodica_selfirm_mask * _sf;
|
||||||
@ -230,6 +247,8 @@ class TDich_periodica_iva_mask : public TAutomask
|
|||||||
protected:
|
protected:
|
||||||
void read_iva_data();
|
void read_iva_data();
|
||||||
real imposta_diff(int tipo) const;
|
real imposta_diff(int tipo) const;
|
||||||
|
void calc_cd_new(int anno, Tcd& s) const;
|
||||||
|
void calc_cd_old(int anno, Tcd& s) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void set_prospect();
|
void set_prospect();
|
||||||
@ -276,43 +295,183 @@ real TDich_periodica_iva_mask::imposta_diff(int tipo) const
|
|||||||
id.set_var("#DAL", data_da);
|
id.set_var("#DAL", data_da);
|
||||||
id.set_var("#AL", data_a);
|
id.set_var("#AL", data_a);
|
||||||
|
|
||||||
|
TProgress_monitor pi(id.items(), TR("Calcolo IVA differita"));
|
||||||
for (bool ok = id.move_first(); ok; ok = id.move_next())
|
for (bool ok = id.move_first(); ok; ok = id.move_next())
|
||||||
|
{
|
||||||
imposta += id.get(RMI_IMPOSTA).as_real();
|
imposta += id.get(RMI_IMPOSTA).as_real();
|
||||||
|
pi.add_status();
|
||||||
|
}
|
||||||
return imposta;
|
return imposta;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDich_periodica_iva_mask::read_iva_data()
|
void TDich_periodica_iva_mask::calc_cd_new(int anno, Tcd& s) const
|
||||||
{
|
{
|
||||||
TString8 key; key.format("%4d13", _sf->get_year());
|
s.Reset();
|
||||||
const TRectype& lim = cache().get("LIM", key);
|
|
||||||
|
|
||||||
if (lim.get_bool("B0"))
|
TString query;
|
||||||
|
query << "USE MOV KEY 2"
|
||||||
|
<< "\nSELECT (ANNOIVA==#ANNO)"
|
||||||
|
<< "\nFROM DATAREG=#DAL"
|
||||||
|
<< "\nTO DATAREG=#AL";
|
||||||
|
|
||||||
|
TISAM_recordset movs(query);
|
||||||
|
movs.set_var("#ANNO", long(anno));
|
||||||
|
movs.set_var("#DAL", TDate(1,1,anno));
|
||||||
|
movs.set_var("#AL", TDate(31,12,anno));
|
||||||
|
|
||||||
|
const TRectype& mov = movs.cursor()->curr(LF_MOV);
|
||||||
|
|
||||||
|
TProgress_monitor pi(movs.items(), TR("Ricalcolo righe IVA"));
|
||||||
|
|
||||||
|
TFilename ivalog; ivalog.tempdir(); ivalog.add("cg5700log.txt");
|
||||||
|
ofstream flog(ivalog);
|
||||||
|
flog << "NUMREG\tRIGA\tDATA\tREG\tDIFF\tIMPONIBILE\tIVA\tIMPOSTA\tCD\tNORMALE\tDIFFERITA\tXCASSA\tSPLIT\tNOTE" << endl;
|
||||||
|
|
||||||
|
for (bool go = movs.move_first(); go; go = movs.move_next())
|
||||||
{
|
{
|
||||||
const TRectype & lam = cache().get("LAM", key);
|
if (!pi.add_status())
|
||||||
|
break;
|
||||||
|
|
||||||
TString descrizione(120);
|
TToken_string tok(127, '\t');
|
||||||
descrizione = lim.get("S0");
|
tok.add(mov.get(MOV_NUMREG));
|
||||||
descrizione << lim.get("S1");
|
tok.add(0);
|
||||||
const bool exclude_sign = descrizione.find("$$") >= 0 || descrizione.find(">>") >= 0;
|
tok.add(mov.get(MOV_DATAREG));
|
||||||
|
tok.add(mov.get(MOV_REG));
|
||||||
|
|
||||||
real cd1_1 = ZERO;
|
TString8 regkey; regkey.format("%04d%s", anno, (const char*)mov.get(MOV_REG));
|
||||||
real cd1_2 = ZERO;
|
const TRectype& reg = cache().get("REG", regkey);
|
||||||
real cd1_3 = ZERO;
|
const int tipo_reg = reg.get_int("I0");
|
||||||
real cd1_4 = ZERO;
|
|
||||||
real cd1_5 = ZERO;
|
bool skipped = false;
|
||||||
real cd2_1 = ZERO;
|
if (tipo_reg != 1 && tipo_reg != 2)
|
||||||
real cd2_2 = ZERO;
|
{
|
||||||
real cd2_3 = ZERO;
|
tok.add("Registro nè vendite nè acquisti", 13);
|
||||||
real cd2_4 = ZERO;
|
flog << tok << endl;
|
||||||
real cd2_5 = ZERO;
|
skipped = true;
|
||||||
real cd3_1 = ZERO;
|
}
|
||||||
real cd3_2 = ZERO;
|
const int sosp_imp = reg.get_bool("B1") ? reg.get_int("I9") : 0;
|
||||||
real cd3_3 = ZERO;
|
if (sosp_imp == 1 || sosp_imp == 3)
|
||||||
real cd3_4 = ZERO;
|
{
|
||||||
|
tok.add("Registro in sospensione", 13);
|
||||||
|
flog << tok << endl;
|
||||||
|
skipped = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TString& tipodoc = mov.get(MOV_TIPODOC);
|
||||||
|
if (tipodoc == "AF")
|
||||||
|
{
|
||||||
|
tok.add("Autofattura", 13);
|
||||||
|
flog << tok << endl;
|
||||||
|
skipped = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TRectype& cau = cache().get(LF_CAUSALI, mov.get(MOV_CODCAUS));
|
||||||
|
const bool iva_intra = cau.get_bool(CAU_INTRACOM);
|
||||||
|
const bool iva_split = anno >= 2015 && tipo_reg == 1 && is_split_payment(mov);
|
||||||
|
const bool iva_diff = !iva_split && is_IVA_diff(mov);
|
||||||
|
const bool iva_cassa = !iva_diff && is_IVAxCassa(mov);
|
||||||
|
const bool iva_speciale = iva_split || iva_diff || iva_cassa;
|
||||||
|
|
||||||
|
if (iva_speciale)
|
||||||
|
tok.add(iva_split ? "SPLIT" : (iva_diff ? "DIFF" : "XCASSA"), 4);
|
||||||
|
|
||||||
|
TRecord_array rmoviva(mov.get(MOV_NUMREG), LF_RMOVIVA);
|
||||||
|
const int nlast = rmoviva.last_row();
|
||||||
|
for (int nr = 1; nr <= nlast; nr++)
|
||||||
|
{
|
||||||
|
const TRectype& rmi = rmoviva.row(nr);
|
||||||
|
const real imponibile = rmi.get(RMI_IMPONIBILE);
|
||||||
|
const real imposta = rmi.get(RMI_IMPOSTA);
|
||||||
|
const int tipo_cr = rmi.get_int(RMI_TIPOCR);
|
||||||
|
const TString& codiva = rmi.get(RMI_CODIVA);
|
||||||
|
const TString4 iva_vpn = skipped ? EMPTY_STRING : cache().get("%IVA", codiva, tipo_reg == 1 ? "S10" : "S11");
|
||||||
|
tok.add(nr, 1);
|
||||||
|
tok.add(imponibile.stringe(0, 2), 5);
|
||||||
|
tok.add(codiva, 6);
|
||||||
|
tok.add(imposta.stringe(0, 2), 7);
|
||||||
|
tok.add(iva_vpn, 8);
|
||||||
|
if (iva_vpn.blank())
|
||||||
|
{
|
||||||
|
if (!skipped) tok.add("Codice IVA non rilevante", 13);
|
||||||
|
flog << tok << endl;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tipo_reg == 1)
|
||||||
|
{
|
||||||
|
s.cd1_1 += imponibile;
|
||||||
|
if (iva_speciale)
|
||||||
|
s.cd1_1s += imponibile;
|
||||||
|
|
||||||
|
if (iva_vpn.starts_with("CD1"))
|
||||||
|
{
|
||||||
|
if (tipo_cr == 4)
|
||||||
|
s.cd1_5 += imponibile;
|
||||||
|
}
|
||||||
|
if (!iva_intra)
|
||||||
|
{
|
||||||
|
if (iva_vpn == "CD12")
|
||||||
|
s.cd1_2 += imponibile; else
|
||||||
|
if (iva_vpn == "CD13")
|
||||||
|
s.cd1_3 += imponibile;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (iva_vpn == "CD14")
|
||||||
|
s.cd1_4 += imponibile;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if (tipo_reg == 2)
|
||||||
|
{
|
||||||
|
s.cd2_1 += imponibile;
|
||||||
|
if (iva_speciale)
|
||||||
|
s.cd2_1s += imponibile;
|
||||||
|
if (iva_vpn.starts_with("CD2"))
|
||||||
|
{
|
||||||
|
if (tipo_cr == 2 || tipo_cr == 3 || tipo_cr == 8)
|
||||||
|
s.cd2_5 += imponibile;
|
||||||
|
}
|
||||||
|
if (!iva_intra)
|
||||||
|
{
|
||||||
|
if (iva_vpn == "CD22")
|
||||||
|
s.cd2_2 += imponibile;
|
||||||
|
else
|
||||||
|
if (iva_vpn == "CD23")
|
||||||
|
s.cd2_3 += imponibile;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (iva_vpn == "CD24")
|
||||||
|
s.cd2_4 += imponibile;
|
||||||
|
}
|
||||||
|
if (iva_vpn == "CD31")
|
||||||
|
{
|
||||||
|
s.cd3_1 += imponibile;
|
||||||
|
s.cd3_2 += imposta;
|
||||||
|
}
|
||||||
|
if (iva_vpn == "CD33")
|
||||||
|
{
|
||||||
|
s.cd3_3 += imponibile;
|
||||||
|
s.cd3_4 += imposta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TToken_string row = tok;
|
||||||
|
row.add("", 13);
|
||||||
|
const int index = iva_split ? 12 : (iva_cassa ? 11 : (iva_diff ? 10 : 9));
|
||||||
|
row.add(imponibile.stringe(0, 2), index);
|
||||||
|
flog << row << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void TDich_periodica_iva_mask::calc_cd_old(int anno, Tcd& s) const
|
||||||
|
{
|
||||||
|
s.Reset();
|
||||||
|
|
||||||
TRelation relpum("PUM");
|
TRelation relpum("PUM");
|
||||||
TRectype& pum = relpum.curr();
|
TRectype& pum = relpum.curr();
|
||||||
key.format("%04d",_sf->get_year());
|
TString4 key; key.format("%04d", anno);
|
||||||
pum.put("CODTAB", key);
|
pum.put("CODTAB", key);
|
||||||
TCursor cur(&relpum, "", 1, &pum, &pum);
|
TCursor cur(&relpum, "", 1, &pum, &pum);
|
||||||
|
|
||||||
@ -326,27 +485,60 @@ void TDich_periodica_iva_mask::read_iva_data()
|
|||||||
break;
|
break;
|
||||||
if (atoi(codtab.right(2)) == 13) // Solo annuale
|
if (atoi(codtab.right(2)) == 13) // Solo annuale
|
||||||
{
|
{
|
||||||
cd1_1 += pum.get_real("R14");
|
s.cd1_1 += pum.get_real("R14");
|
||||||
cd1_2 += pum.get_real("R15");
|
s.cd1_2 += pum.get_real("R15");
|
||||||
cd1_3 += pum.get_real("R16");
|
s.cd1_3 += pum.get_real("R16");
|
||||||
cd1_4 += pum.get_real("R17");
|
s.cd1_4 += pum.get_real("R17");
|
||||||
cd2_1 += pum.get_real("R18");
|
s.cd2_1 += pum.get_real("R18");
|
||||||
cd2_2 += pum.get_real("R19");
|
s.cd2_2 += pum.get_real("R19");
|
||||||
cd2_3 += pum.get_real("R20");
|
s.cd2_3 += pum.get_real("R20");
|
||||||
cd2_4 += pum.get_real("R21");
|
s.cd2_4 += pum.get_real("R21");
|
||||||
cd3_1 += pum.get_real("R22");
|
s.cd3_1 += pum.get_real("R22");
|
||||||
cd3_2 += pum.get_real("R23");
|
s.cd3_2 += pum.get_real("R23");
|
||||||
cd3_3 += pum.get_real("R24");
|
s.cd3_3 += pum.get_real("R24");
|
||||||
cd3_4 += pum.get_real("R25");
|
s.cd3_4 += pum.get_real("R25");
|
||||||
cd2_5 += pum.get_real("R26");
|
s.cd2_5 += pum.get_real("R26");
|
||||||
cd1_5 += pum.get_real("R27");
|
s.cd1_5 += pum.get_real("R27");
|
||||||
|
|
||||||
|
// Novità 2016
|
||||||
|
s.cd1_1s += pum.get_real("R29"); // vendite in split dal 2015 (già comprese in cd1_1!)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
void TDich_periodica_iva_mask::read_iva_data()
|
||||||
// Arrotondare tutto all'Euro
|
{
|
||||||
cd1_1.round(); cd1_2.round(); cd1_3.round(); cd1_4.round(); cd1_5.round();
|
const int anno = _sf->get_year();
|
||||||
cd2_1.round(); cd2_2.round(); cd2_3.round(); cd2_4.round(); cd2_5.round();
|
TString8 key; key.format("%4d13", anno);
|
||||||
cd3_1.round(); cd3_2.round(); cd3_3.round(); cd3_3.round();
|
const TRectype& lim = cache().get("LIM", key);
|
||||||
|
|
||||||
|
if (lim.get_bool("B0"))
|
||||||
|
{
|
||||||
|
const TRectype& lam = cache().get("LAM", key);
|
||||||
|
TString descrizione(120); descrizione << lim.get("S0") << lim.get("S1");
|
||||||
|
const bool exclude_sign = descrizione.find("$$") >= 0 || descrizione.find(">>") >= 0;
|
||||||
|
|
||||||
|
Tcd cd_old; calc_cd_old(anno, cd_old);
|
||||||
|
Tcd cd_new; calc_cd_new(anno, cd_new);
|
||||||
|
|
||||||
|
real cd1_1 = cd_new.cd1_1; cd1_1.round();
|
||||||
|
real cd1_1s = cd_new.cd1_1s; cd1_1s.round();
|
||||||
|
real cd1_2 = cd_new.cd1_2; cd1_2.round();
|
||||||
|
real cd1_3 = cd_new.cd1_3; cd1_3.round();
|
||||||
|
real cd1_4 = cd_new.cd1_4; cd1_4.round();
|
||||||
|
real cd1_5 = cd_new.cd1_5; cd1_5.round();
|
||||||
|
|
||||||
|
real cd2_1 = cd_new.cd2_1; cd2_1.round();
|
||||||
|
real cd2_1s = cd_new.cd2_1s; cd2_1s.round();
|
||||||
|
real cd2_2 = cd_new.cd2_2; cd2_2.round();
|
||||||
|
real cd2_3 = cd_new.cd2_3; cd2_3.round();
|
||||||
|
real cd2_4 = cd_new.cd2_4; cd2_4.round();
|
||||||
|
real cd2_5 = cd_new.cd2_5; cd2_5.round();
|
||||||
|
|
||||||
|
real cd3_1 = cd_new.cd3_1; cd3_1.round();
|
||||||
|
real cd3_2 = cd_new.cd3_2; cd3_2.round();
|
||||||
|
real cd3_3 = cd_new.cd3_3; cd3_3.round();
|
||||||
|
real cd3_4 = cd_new.cd3_4; cd3_4.round();
|
||||||
|
|
||||||
const real rettifica = lim.get_real("R5"); // Rettifiche
|
const real rettifica = lim.get_real("R5"); // Rettifiche
|
||||||
|
|
||||||
@ -374,10 +566,11 @@ void TDich_periodica_iva_mask::read_iva_data()
|
|||||||
set(F_CD3_1, cd3_1); set(F_CD3_2, cd3_2); set(F_CD3_3, cd3_3); set(F_CD3_4, cd3_4);
|
set(F_CD3_1, cd3_1); set(F_CD3_2, cd3_2); set(F_CD3_3, cd3_3); set(F_CD3_4, cd3_4);
|
||||||
set(F_CD4, cd4); set(F_CD5, cd5);
|
set(F_CD4, cd4); set(F_CD5, cd5);
|
||||||
set(F_CD6_1, cd6_1); set(F_CD6_2, cd6_2);
|
set(F_CD6_1, cd6_1); set(F_CD6_2, cd6_2);
|
||||||
|
|
||||||
|
set(F_CD1_1S, cd1_1s); // dal 2016
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
error_box("Risultati liquidazione non presenti o da ricalcolare per l'anno %d.", _sf->get_year());
|
error_box("Risultati liquidazione non presenti o da ricalcolare per l'anno %d.", anno);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TDich_periodica_iva_mask::print_prospect()
|
void TDich_periodica_iva_mask::print_prospect()
|
||||||
@ -422,7 +615,7 @@ void TDich_periodica_iva_mask::set_prospect()
|
|||||||
{
|
{
|
||||||
CHECK(_sf, "Invalid mask");
|
CHECK(_sf, "Invalid mask");
|
||||||
|
|
||||||
_dirty_versament = FALSE;
|
_dirty_versament = false;
|
||||||
|
|
||||||
const int anno = _sf->get_year();
|
const int anno = _sf->get_year();
|
||||||
const long ditta = _sf->get_long(F_CODDITTA);
|
const long ditta = _sf->get_long(F_CODDITTA);
|
||||||
@ -434,7 +627,7 @@ void TDich_periodica_iva_mask::set_prospect()
|
|||||||
TFirm frm(ditta);
|
TFirm frm(ditta);
|
||||||
|
|
||||||
TIva_round ir;
|
TIva_round ir;
|
||||||
ir.set_default_iva_mode(anno, FALSE, ditta);
|
ir.set_default_iva_mode(anno, false, ditta);
|
||||||
|
|
||||||
read_iva_data();
|
read_iva_data();
|
||||||
}
|
}
|
||||||
@ -446,7 +639,7 @@ bool TDich_periodica_iva_mask::on_key(KEY k)
|
|||||||
|
|
||||||
bool TDich_periodica_iva_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
bool TDich_periodica_iva_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
class TDich_periodica_iva_app : public TSkeleton_application
|
class TDich_periodica_iva_app : public TSkeleton_application
|
||||||
@ -456,7 +649,7 @@ protected:
|
|||||||
virtual bool destroy();
|
virtual bool destroy();
|
||||||
virtual void main_loop();
|
virtual void main_loop();
|
||||||
public:
|
public:
|
||||||
virtual bool firm_change_enabled() const { return FALSE; }
|
virtual bool firm_change_enabled() const { return false; }
|
||||||
TDich_periodica_iva_app () {};
|
TDich_periodica_iva_app () {};
|
||||||
virtual ~TDich_periodica_iva_app () {};
|
virtual ~TDich_periodica_iva_app () {};
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#define F_CD6_2 120
|
#define F_CD6_2 120
|
||||||
#define F_CD2_5 121
|
#define F_CD2_5 121
|
||||||
#define F_CD1_5 122
|
#define F_CD1_5 122
|
||||||
|
#define F_CD1_1S 151
|
||||||
|
|
||||||
#define FF_YEAR 101
|
#define FF_YEAR 101
|
||||||
#define FF_CODDITTA 102
|
#define FF_CODDITTA 102
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
#include "cg5700.h"
|
#include "cg5700.h"
|
||||||
|
|
||||||
PAGE "Comunicazione Annuale dati IVA" -1 -1 60 8
|
PAGE "Comunicazione Annuale dati IVA" -1 -1 62 4
|
||||||
|
|
||||||
NUMBER F_YEAR 4
|
NUMBER F_YEAR 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 1 "Anno "
|
PROMPT 1 1 "Anno "
|
||||||
FLAGS "A"
|
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_CODDITTA 5
|
NUMBER F_CODDITTA 5
|
||||||
@ -20,15 +19,11 @@ BEGIN
|
|||||||
FLAGS "B"
|
FLAGS "B"
|
||||||
END
|
END
|
||||||
|
|
||||||
BUTTON DLG_OK 10 2
|
ENDPAGE
|
||||||
BEGIN
|
|
||||||
PROMPT -12 -1 ""
|
|
||||||
END
|
|
||||||
|
|
||||||
BUTTON DLG_QUIT 10 2
|
TOOLABR "" 0 0 0 2
|
||||||
BEGIN
|
|
||||||
PROMPT -22 -1 ""
|
#include <stdbar.h>
|
||||||
END
|
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
|
@ -13,144 +13,146 @@ ENDPAGE
|
|||||||
|
|
||||||
PAGE "Comunicazione annuale dati IVA" 0 0 0 2
|
PAGE "Comunicazione annuale dati IVA" 0 0 0 2
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 79 4
|
NUMBER F_YEAR 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 0 0 "@bDitta corrente"
|
PROMPT 1 0 "Anno "
|
||||||
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
NUMBER F_CODDITTA 5
|
NUMBER F_CODDITTA 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 1 "Codice "
|
PROMPT 12 0 "Rag. Soc. "
|
||||||
FLAGS "D"
|
FLAGS "HU"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_RAGSOC 50
|
STRING F_RAGSOC 50
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 16 1 "Rag. Soc. "
|
PROMPT 12 0 "Rag. Soc. "
|
||||||
FLAGS "D"
|
|
||||||
END
|
|
||||||
|
|
||||||
NUMBER F_YEAR 4
|
|
||||||
BEGIN
|
|
||||||
PROMPT 2 2 "Anno "
|
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD1_1 18
|
CURRENCY F_CD1_1 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 4 "@bCD1 Operazioni attive "
|
PROMPT 1 1 "@bCD1 Operazioni attive "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD1_2 18
|
CURRENCY F_CD1_2 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 5 " di cui: operazioni non imponibili "
|
PROMPT 1 2 " di cui: operazioni non imponibili "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD1_3 18
|
CURRENCY F_CD1_3 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 6 " operazioni esenti "
|
PROMPT 1 3 " operazioni esenti "
|
||||||
|
FLAGS "D"
|
||||||
|
END
|
||||||
|
|
||||||
|
CURRENCY F_CD1_1S 18
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 4 " operazioni in split/differita/per cassa "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD1_4 18
|
CURRENCY F_CD1_4 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 7 " cessioni intracomunitarie di beni "
|
PROMPT 1 5 " cessioni intracomunitarie di beni "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD1_5 18
|
CURRENCY F_CD1_5 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 8 "di cui: cess. beni strumentali "
|
PROMPT 1 6 "di cui: cess. beni strumentali "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD2_1 18
|
CURRENCY F_CD2_1 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 9 "@bCD2 Operazioni passive "
|
PROMPT 1 7 "@bCD2 Operazioni passive "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD2_2 18
|
CURRENCY F_CD2_2 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 10 " di cui: operazioni non imponibili "
|
PROMPT 1 8 " di cui: operazioni non imponibili "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD2_3 18
|
CURRENCY F_CD2_3 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 11 " operazioni esenti "
|
PROMPT 1 9 " operazioni esenti "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD2_4 18
|
CURRENCY F_CD2_4 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 12 " acquisti intracomunitari di beni "
|
PROMPT 1 10 " acquisti intracomunitari di beni "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD2_5 18
|
CURRENCY F_CD2_5 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 13 "di cui: acq. beni strumentali "
|
PROMPT 1 11 "di cui: acq. beni strumentali "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT -1
|
TEXT -1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 14 "@bImportazioni di oro industriale e argento puro senza IVA alla dogana "
|
PROMPT 1 13 "@bImportazioni di oro industriale e argento puro senza IVA alla dogana "
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD3_1 18
|
CURRENCY F_CD3_1 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 15 "CD3 Imponibile "
|
PROMPT 1 14 "CD3 Imponibile "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD3_2 18
|
CURRENCY F_CD3_2 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 52 15 "Imposta "
|
PROMPT 52 14 "Imposta "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT -1
|
TEXT -1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 16 "@bRottami e altri materiali di recupero "
|
PROMPT 1 15 "@bRottami e altri materiali di recupero "
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD3_3 18
|
CURRENCY F_CD3_3 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 17 "CD3 Imponibile "
|
PROMPT 1 16 "CD3 Imponibile "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD3_4 18
|
CURRENCY F_CD3_4 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 52 17 "Imposta "
|
PROMPT 52 16 "Imposta "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD4 18
|
CURRENCY F_CD4 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 19 "CD4 Iva esigibile "
|
PROMPT 1 18 "CD4 Iva esigibile "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD5 18
|
CURRENCY F_CD5 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 20 "CD5 Iva detraibile "
|
PROMPT 1 19 "CD5 Iva detraibile "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|
||||||
CURRENCY F_CD6_1 18
|
CURRENCY F_CD6_1 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 21 "CD6 IVA dovuta "
|
PROMPT 1 20 "CD6 IVA dovuta "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
CURRENCY F_CD6_2 18
|
CURRENCY F_CD6_2 18
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 48 21 "o a credito "
|
PROMPT 48 20 "o a credito "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <form.h>
|
#include <form.h>
|
||||||
#include <recarray.h>
|
#include <recarray.h>
|
||||||
#include <reprint.h>
|
#include <reprint.h>
|
||||||
|
#include <sheet.h>
|
||||||
|
|
||||||
#include <nditte.h>
|
#include <nditte.h>
|
||||||
|
|
||||||
@ -234,7 +235,6 @@ void TQuadro_VT_iva_mask::read_iva_data()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
warning_box(FR("Risultati liquidazione non presenti o da ricalcolare per l'anno %d."), _sf->get_year());
|
warning_box(FR("Risultati liquidazione non presenti o da ricalcolare per l'anno %d."), _sf->get_year());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TQuadro_VT_iva_mask::print_prospect()
|
void TQuadro_VT_iva_mask::print_prospect()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
<report libraries="cg5800a" name="cg5800ra" lpi="6">
|
<report name="cg5800ra" lpi="6">
|
||||||
<description>Lista privati per regione per quadro VT</description>
|
<description>Lista privati per regione per quadro VT</description>
|
||||||
<font face="Courier New" size="10" />
|
<font face="Courier New" size="10" />
|
||||||
<section type="Head" height="3">
|
<section type="Head" height="3">
|
||||||
|
@ -522,7 +522,6 @@ real* TRegistro::read_prorata(int anno) const
|
|||||||
|
|
||||||
real* prorata = NULL;
|
real* prorata = NULL;
|
||||||
const TRectype& pla = cache().get("%PLA", chiave);
|
const TRectype& pla = cache().get("%PLA", chiave);
|
||||||
|
|
||||||
if (!pla.empty())
|
if (!pla.empty())
|
||||||
prorata = new real(pla.get("R8"));
|
prorata = new real(pla.get("R8"));
|
||||||
|
|
||||||
@ -569,7 +568,7 @@ bool TRegistro::update(long protiva, const TDate& datareg)
|
|||||||
if (protiva > _rec.get_long("I5"))
|
if (protiva > _rec.get_long("I5"))
|
||||||
{
|
{
|
||||||
_rec.put("I5", protiva);
|
_rec.put("I5", protiva);
|
||||||
updated = FALSE;
|
updated = false;
|
||||||
}
|
}
|
||||||
if (datareg > _rec.get_date("D2"))
|
if (datareg > _rec.get_date("D2"))
|
||||||
{
|
{
|
||||||
@ -927,7 +926,7 @@ int TBill::compare(const TSortable& s) const
|
|||||||
// Certified 95%
|
// Certified 95%
|
||||||
bool TBill::find()
|
bool TBill::find()
|
||||||
{
|
{
|
||||||
bool ok = FALSE;
|
bool ok = false;
|
||||||
|
|
||||||
if ((_tipo != 'C' && _tipo != 'F') || _sottoconto == 0L)
|
if ((_tipo != 'C' && _tipo != 'F') || _sottoconto == 0L)
|
||||||
{
|
{
|
||||||
|
@ -187,7 +187,7 @@ bool is_split_payment(const TRectype& mov)
|
|||||||
{
|
{
|
||||||
TISAM_recordset par("USE PART KEY 2 SELECT ANNO<2015\nFROM NREG=#NR\nTO NREG=#NR");
|
TISAM_recordset par("USE PART KEY 2 SELECT ANNO<2015\nFROM NREG=#NR\nTO NREG=#NR");
|
||||||
par.set_var("#NR", mov.get_long(MOV_NUMREG));
|
par.set_var("#NR", mov.get_long(MOV_NUMREG));
|
||||||
if (!par.empty()) // Se la nota si rifersice a partite vecchie non ha lo split payment
|
if (!par.empty()) // Se la nota si riferisce a partite vecchie non ha lo split payment
|
||||||
yes = false;
|
yes = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,6 +257,7 @@ Item_01 = "Con iva indetraibile", "cg3 -6 I", "F"
|
|||||||
Item_02 = "Per tipo costo/ricavo", "cg3 -6 C", "F"
|
Item_02 = "Per tipo costo/ricavo", "cg3 -6 C", "F"
|
||||||
Item_03 = "Intracomunitarie", "cg3 -6 N", "F"
|
Item_03 = "Intracomunitarie", "cg3 -6 N", "F"
|
||||||
Item_04 = "Doppie", "cg3 -7", "F"
|
Item_04 = "Doppie", "cg3 -7", "F"
|
||||||
|
Item_05 = "Emesse in Split-Payment", "ba8 -4 cgstsplit.rep", "F"
|
||||||
|
|
||||||
[CGMENU_027]
|
[CGMENU_027]
|
||||||
Caption = "Gestione acconti IVA"
|
Caption = "Gestione acconti IVA"
|
||||||
|
114
cg/cgstsplit.rep
Normal file
114
cg/cgstsplit.rep
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<report name="fatt_split" lpi="6">
|
||||||
|
<description>fatture in split</description>
|
||||||
|
<font face="Courier New" size="10" />
|
||||||
|
<section type="Head" pattern="1">
|
||||||
|
<font face="Arial" size="8" />
|
||||||
|
<field type="Stringa" width="50" pattern="1">
|
||||||
|
<source>"Ditta: "+#SYSTEM.RAGSOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="50" type="Stringa" align="right" width="45" pattern="1">
|
||||||
|
<source>"Data di Stampa: "+#SYSTEM.DATE+" - Pag. "+#PAGE</source>
|
||||||
|
</field>
|
||||||
|
<field y="1" type="Stringa" align="center" width="95" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="10" />
|
||||||
|
<source>"Lista Fatture emesse in Split Payment nel periodo: "+#DADATA+" - "+#ADATA</source>
|
||||||
|
</field>
|
||||||
|
<field y="3" type="Testo" align="right" width="7" pattern="1" text="NumReg" />
|
||||||
|
<field x="8" y="3" type="Testo" width="10" pattern="1" text="DataReg" />
|
||||||
|
<field x="18" y="3" type="Testo" width="3" pattern="1" text="Caus" />
|
||||||
|
<field x="22" y="3" type="Testo" width="3" pattern="1" text="Reg." />
|
||||||
|
<field x="25" y="3" type="Testo" align="right" width="6" pattern="1" text="Cli." />
|
||||||
|
<field x="32" y="3" type="Testo" width="35" pattern="1" text="Ragione Sociale" />
|
||||||
|
<field x="67" y="3" type="Testo" width="5" pattern="1" text="C.Iva" />
|
||||||
|
<field x="71.5" y="3" type="Testo" align="right" width="11" pattern="1" text="Imponibile" />
|
||||||
|
<field x="82.5" y="3" type="Testo" align="right" width="9" pattern="1" text="Imposta" />
|
||||||
|
<field x="92" y="3" type="Testo" align="center" width="4" pattern="1" text="Split" />
|
||||||
|
<field border="2" y="4" type="Linea" width="95" height="0" pattern="1" />
|
||||||
|
</section>
|
||||||
|
<section type="Head" level="1" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1</prescript>
|
||||||
|
</section>
|
||||||
|
<section type="Head" level="2" pattern="1">
|
||||||
|
<groupby>RMOVIVA.CODIVA</groupby>
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2</prescript>
|
||||||
|
<field type="Testo" width="10" pattern="1" text="Codice Iva:" />
|
||||||
|
<field x="10" type="Stringa" width="4" id="10" pattern="1">
|
||||||
|
<source>RMOVIVA.CODIVA</source>
|
||||||
|
</field>
|
||||||
|
<field x="15" type="Stringa" width="25" id="20" pattern="1">
|
||||||
|
<prescript description="H2.20 PRESCRIPT">MESSAGE TABLEREAD,%IVA,#10,S0</prescript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Body" pattern="1" />
|
||||||
|
<section type="Body" level="1" pattern="1">
|
||||||
|
<font face="Arial" size="8" />
|
||||||
|
<field type="Numero" align="right" link="23.NUMREG" width="7" pattern="1">
|
||||||
|
<source>RMOVIVA.NUMREG</source>
|
||||||
|
</field>
|
||||||
|
<field x="8" type="Data" width="10" pattern="1">
|
||||||
|
<source>MOV.DATAREG</source>
|
||||||
|
</field>
|
||||||
|
<field x="18" type="Stringa" width="3" pattern="1">
|
||||||
|
<source>MOV.CODCAUS</source>
|
||||||
|
</field>
|
||||||
|
<field x="21.5" type="Stringa" width="3" pattern="1">
|
||||||
|
<source>MOV.REG</source>
|
||||||
|
</field>
|
||||||
|
<field x="25" type="Numero" align="right" link="20.CODCF" width="6" pattern="1">
|
||||||
|
<source>MOV.CODCF</source>
|
||||||
|
</field>
|
||||||
|
<field x="26" type="Stringa" hidden="1" link="20.TIPOCF" width="1" pattern="1">
|
||||||
|
<source>MOV.TIPO</source>
|
||||||
|
</field>
|
||||||
|
<field x="31.5" type="Stringa" width="35" pattern="1">
|
||||||
|
<source>CLIFO.RAGSOC</source>
|
||||||
|
</field>
|
||||||
|
<field x="67.5" type="Stringa" width="4" pattern="1">
|
||||||
|
<source>RMOVIVA.CODIVA</source>
|
||||||
|
</field>
|
||||||
|
<field x="71.5" type="Valuta" align="right" width="11" pattern="1" text="###.###.###,@@">
|
||||||
|
<source>RMOVIVA.IMPONIBILE</source>
|
||||||
|
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F2.100</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="82.5" type="Valuta" align="right" width="9" pattern="1" text="###.###.###,@@">
|
||||||
|
<source>RMOVIVA.IMPOSTA</source>
|
||||||
|
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F2.200</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="93" type="Stringa" width="1" pattern="1">
|
||||||
|
<source>MOV.SPLITPAY</source>
|
||||||
|
</field>
|
||||||
|
<field x="95" type="Stringa" width="1" pattern="1">
|
||||||
|
<source>CLIFO.SPLITPAY</source>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<section type="Foot" pattern="1" />
|
||||||
|
<section type="Foot" level="1" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
<field type="Testo" width="16" pattern="1" text="Totale Generale:" />
|
||||||
|
<field x="71.5" type="Valuta" align="right" width="11" id="100" pattern="1" text="###.###.###,@@" />
|
||||||
|
<field x="82.5" type="Valuta" align="right" width="9" id="200" pattern="1" text="###.###.###,@@" />
|
||||||
|
</section>
|
||||||
|
<section type="Foot" level="2" height="2" pattern="1">
|
||||||
|
<font face="Arial" bold="1" size="8" />
|
||||||
|
<field type="Testo" width="10" pattern="1" text="Totale:" />
|
||||||
|
<field x="10" type="Stringa" width="4" pattern="1">
|
||||||
|
<source>#H2.10</source>
|
||||||
|
</field>
|
||||||
|
<field x="15" type="Stringa" width="30" pattern="1">
|
||||||
|
<source>#H2.20</source>
|
||||||
|
</field>
|
||||||
|
<field x="71.5" type="Valuta" align="right" width="11" id="100" pattern="1" text="###.###.###,@@">
|
||||||
|
<prescript description="F2.100 PRESCRIPT">MESSAGE ADD,F1.100</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="82.5" type="Valuta" align="right" width="9" id="200" pattern="1" text="###.###.###,@@">
|
||||||
|
<prescript description="F2.200 PRESCRIPT">MESSAGE ADD,F1.200</prescript>
|
||||||
|
</field>
|
||||||
|
</section>
|
||||||
|
<sql>USE RMOVIVA SELECT ((MOV.SPLITPAY="S")||((MOV.SPLITPAY="")(20.SPLITPAY="X")))BETWEEN(23.DATAREG,#DADATA,#ADATA)
|
||||||
|
BY RMOVIVA.CODIVA 23.DATAREG
|
||||||
|
JOIN MOV INTO NUMREG==NUMREG
|
||||||
|
JOIN CLIFO TO MOV INTO TIPOCF==TIPO CODCF==CODCF</sql>
|
||||||
|
</report>
|
20
cg/cgstsplit.uml
Normal file
20
cg/cgstsplit.uml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
PA "Estrazione Fatture in Split-Payment" -1 -1 30 4
|
||||||
|
DA 120
|
||||||
|
BE
|
||||||
|
PR 4 1 "Dalla data "
|
||||||
|
FI DADATA
|
||||||
|
CH REQUIRED
|
||||||
|
EN
|
||||||
|
|
||||||
|
DA 121
|
||||||
|
BE
|
||||||
|
PR 4 2 "Alla data "
|
||||||
|
FI ADATA
|
||||||
|
CH REQUIRED
|
||||||
|
EN
|
||||||
|
ENDPAGE
|
||||||
|
TOOLBAR "topbar" 0 0 0 2
|
||||||
|
#include <printbar.h>
|
||||||
|
ENDPAGE
|
||||||
|
ENDMASK
|
@ -50,6 +50,7 @@
|
|||||||
#define F_PROG 153
|
#define F_PROG 153
|
||||||
#define F_CREDITOR_ID 154
|
#define F_CREDITOR_ID 154
|
||||||
#define F_SEPA_FATT 155
|
#define F_SEPA_FATT 155
|
||||||
|
#define F_SEPA_CUC 156
|
||||||
|
|
||||||
|
|
||||||
#endif//__CGTBBNP_H
|
#endif//__CGTBBNP_H
|
||||||
|
@ -405,7 +405,7 @@ ENDPAGE
|
|||||||
|
|
||||||
PAGE "Parametri Distinte" 0 -1 77 20
|
PAGE "Parametri Distinte" 0 -1 77 20
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 7
|
GROUPBOX DLG_NULL 78 8
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 1 "@bParametri distinte SETIF / SEPA"
|
PROMPT 1 1 "@bParametri distinte SETIF / SEPA"
|
||||||
END
|
END
|
||||||
@ -436,9 +436,15 @@ BEGIN
|
|||||||
FIELD S4
|
FIELD S4
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRING F_SEPA_CUC 8
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 6 "Codice CUC assegnato da CBI "
|
||||||
|
FIELD S5
|
||||||
|
END
|
||||||
|
|
||||||
BOOLEAN F_SEPA_FATT
|
BOOLEAN F_SEPA_FATT
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 6 "Dati fattura dettagliati su bonifici e R.I.D. SEPA"
|
PROMPT 2 7 "Riferimenti strutturati su bonifici e R.I.D. SEPA"
|
||||||
FIELD B3
|
FIELD B3
|
||||||
END
|
END
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user